From nobody Mon Feb 26 07:24:00 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TjsYn3w3Vz5CZxN; Mon, 26 Feb 2024 07:24:13 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:13b:39f::9f:25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE Root Certificate Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TjsYm0Rldz4cHr; Mon, 26 Feb 2024 07:24:12 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of bzeeb-lists@lists.zabbadoz.net designates 2a01:4f8:13b:39f::9f:25 as permitted sender) smtp.mailfrom=bzeeb-lists@lists.zabbadoz.net Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 88D458D4A221; Mon, 26 Feb 2024 07:24:02 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id EF1B12D029D2; Mon, 26 Feb 2024 07:24:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id Sr2OpuRCgBeq; Mon, 26 Feb 2024 07:24:01 +0000 (UTC) Received: from strong-iwl0.sbone.de (strong-iwl0.sbone.de [IPv6:fde9:577b:c1a9:4902:b66b:fcff:fef3:e3d2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id C34872D029D8; Mon, 26 Feb 2024 07:24:00 +0000 (UTC) Date: Mon, 26 Feb 2024 07:24:00 +0000 (UTC) From: "Bjoern A. Zeeb" To: Andrew Turner cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 47e073941f4e - main - Import the kernel parts of bhyve/arm64 In-Reply-To: <202402211855.41LItsm2033633@gitrepo.freebsd.org> Message-ID: References: <202402211855.41LItsm2033633@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for the main 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; format=flowed X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.30 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; R_SPF_ALLOW(-0.20)[+ip6:2a01:4f8:13b:39f::9f:25]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE]; MIME_TRACE(0.00)[0:+]; MISSING_XM_UA(0.00)[]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-main@FreeBSD.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[zabbadoz.net]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4TjsYm0Rldz4cHr On Wed, 21 Feb 2024, Andrew Turner wrote: > The branch main has been updated by andrew: > > URL: https://cgit.FreeBSD.org/src/commit/?id=47e073941f4e7ca6e9bde3fa65abbfcfed6bfa2b > > commit 47e073941f4e7ca6e9bde3fa65abbfcfed6bfa2b > Author: Andrew Turner > AuthorDate: 2024-01-09 15:22:27 +0000 > Commit: Andrew Turner > CommitDate: 2024-02-21 18:55:32 +0000 > > Import the kernel parts of bhyve/arm64 > > To support virtual machines on arm64 add the vmm code. This is based on > earlier work by Mihai Carabas and Alexandru Elisei at University > Politehnica of Bucharest, with further work by myself and Mark Johnston. > > All AArch64 CPUs should work, however only the GICv3 interrupt > controller is supported. There is initial support to allow the GICv2 > to be supported in the future. Only pure Armv8.0 virtualisation is > supported, the Virtualization Host Extensions are not currently used. > > With a separate userspace patch and U-Boot port FreeBSD guests are able > to boot to multiuser mode, and the hypervisor can be tested with the > kvm unit tests. Linux partially boots, but hangs before entering > userspace. Other operating systems are untested. > > Sponsored by: Arm Ltd > Sponsored by: Innovate UK > Sponsored by: The FreeBSD Foundation > Sponsored by: University Politehnica of Bucharest > Differential Revision: https://reviews.freebsd.org/D37428 > --- > sys/arm64/include/vmm.h | 362 +++++ > sys/arm64/include/vmm_dev.h | 272 ++++ > sys/arm64/include/vmm_instruction_emul.h | 83 ++ > sys/arm64/include/vmm_snapshot.h | 1 + > sys/arm64/vmm/arm64.h | 165 +++ > sys/arm64/vmm/hyp.h | 114 ++ > sys/arm64/vmm/io/vgic.c | 122 ++ > sys/arm64/vmm/io/vgic.h | 52 + > sys/arm64/vmm/io/vgic_if.m | 104 ++ > sys/arm64/vmm/io/vgic_v3.c | 2348 ++++++++++++++++++++++++++++++ > sys/arm64/vmm/io/vgic_v3.h | 57 + > sys/arm64/vmm/io/vgic_v3_reg.h | 129 ++ > sys/arm64/vmm/io/vtimer.c | 503 +++++++ > sys/arm64/vmm/io/vtimer.h | 85 ++ > sys/arm64/vmm/mmu.h | 52 + > sys/arm64/vmm/reset.h | 33 + > sys/arm64/vmm/vmm.c | 1803 +++++++++++++++++++++++ > sys/arm64/vmm/vmm_arm64.c | 1337 +++++++++++++++++ > sys/arm64/vmm/vmm_call.S | 39 + > sys/arm64/vmm/vmm_dev.c | 1054 ++++++++++++++ > sys/arm64/vmm/vmm_hyp.c | 735 ++++++++++ > sys/arm64/vmm/vmm_hyp_el2.S | 39 + > sys/arm64/vmm/vmm_hyp_exception.S | 384 +++++ > sys/arm64/vmm/vmm_instruction_emul.c | 102 ++ > sys/arm64/vmm/vmm_ktr.h | 69 + > sys/arm64/vmm/vmm_mmu.c | 430 ++++++ > sys/arm64/vmm/vmm_reset.c | 177 +++ > sys/arm64/vmm/vmm_stat.c | 165 +++ > sys/arm64/vmm/vmm_stat.h | 145 ++ > sys/conf/files.arm64 | 33 + > sys/conf/ldscript.arm64 | 2 + > sys/conf/options.arm64 | 3 + > sys/modules/Makefile | 2 + > sys/modules/vmm/Makefile | 78 +- > 34 files changed, 11066 insertions(+), 13 deletions(-) I am not exactly sure but I think it is the SYSTEM_LD_BASECMD in files.amr64 which leads to: ld: warning: cannot find entry symbol _start; not setting start address Is there a way to get rid of the warning? From nobody Mon Feb 26 12:58:24 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tk0zP3d5Fz5BLCc; Mon, 26 Feb 2024 12:58: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 4Tk0zP1WQgz41Kt; Mon, 26 Feb 2024 12: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=1708952305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ulwfIzOfc9xn8XrHYq8UZ12fN8vv38fwmNyNYgTBWEM=; b=mGXMiqIhrDPb8FpbUVcNOrTmTI2AyIHycYJ4OVPDHyGPA6jkLVbNdwTrOe6F+nv7S5yQ55 b+p39UTcUghGXlv7ZxJcGc9Xxr/Nt6sl6pUiKowLggCiBiBKxaOyeRtZICrF/AVSZqaA5t YICEZ3Lz+oogy9S5Y0XUHWppCv427vRtBlGkwMYMMFilQWLP8v9csxnng+NDJPtWxHRsEK 9cq6oLBqg3R7kc3SCl7GZJzwQALREFYA1njnkicq8EYoMsadq2R3619xdmlyEBxM/rlTIw T5CtEm79q3D9kHmrC1Ka/uUYvOCV0DMuPaU0xMl7skR+LFCcjtOLZ6rBWKzYpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708952305; a=rsa-sha256; cv=none; b=f+rBC+4BoWz5wdjh6pKS1Owe+iVBWqVq3kp1qBI2VVD1ZiIbUscfZBmLOCs5PBIOJ4IPoz 2pxml1QIsdddBS2OGGcA+X58H+yXyPqRVvYC5fClv61S0KgTOCzcQKm9kX0O9Wigpsu3PD Gm7xgNtU96NXUcHEtsndPlX0eh0dwazEgI+MFCSDLyDcsq9CNYc4Qp20xgxWQa/NLKoqm5 9UukAhrZh5kU5H3FeuYwjU2hp7pzQRHkp2fgNfz0vciVtlG9suaeF5JW8eh187Vys1h44J SOWf8aslPMRm2hlRzl3jh1v5jO6CUkRWhbUvU3dZEkhqnQRCwBIvrKij2LU6pQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708952305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ulwfIzOfc9xn8XrHYq8UZ12fN8vv38fwmNyNYgTBWEM=; b=P0/sRDNn9f5LTPMrxM6mHEStgT7iWgf/r4dyK2Jt1IxhnLrwE9kUiCmklPUltiVnGcaoae 7RmUKrJjqSTRs7P01hwTFe/GDc5ZhYwtnX0H/320sbBKs3iLzldvpnporhx6cfjuiBYC9X /Vjkje7xqvFzdnr3JM2cJlKd5EMOHzDoy/nnO7jyZoSDDzEEVc9/ufTpDAbxx3OB9zM2xq mk73uxl4V7tJPcfx+XTZS94+8BLBJg/hNuVykEhjcuv1uGhmRdKMUHRGR5S3lNwRsVoRq1 VnB05XVa3WVkGOKnzHVfoVdqAJ8D0/0IZQRGOgYzSjOEsVidonlQtpQzppl0ow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tk0zP0T38zT3d; Mon, 26 Feb 2024 12: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 41QCwOfb050771; Mon, 26 Feb 2024 12:58:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41QCwOxD050768; Mon, 26 Feb 2024 12:58:24 GMT (envelope-from git) Date: Mon, 26 Feb 2024 12:58:24 GMT Message-Id: <202402261258.41QCwOxD050768@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: 1b3f4ccb7dd8 - main - loader: we can only env_discard() existing variable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1b3f4ccb7dd8600d010fc6a09b09ee7d74872809 Auto-Submitted: auto-generated The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=1b3f4ccb7dd8600d010fc6a09b09ee7d74872809 commit 1b3f4ccb7dd8600d010fc6a09b09ee7d74872809 Author: Toomas Soome AuthorDate: 2024-02-25 22:34:00 +0000 Commit: Toomas Soome CommitDate: 2024-02-26 12:56:52 +0000 loader: we can only env_discard() existing variable While dropping nvpair from nvstore, we also remove the corresponding environment variable. By doing so, we should be careful not to try to unset non-existing variable. Reviewed by: imp MFC after: 2 week Differential revision: https://reviews.freebsd.org/D44083 --- stand/libsa/zfs/zfs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/stand/libsa/zfs/zfs.c b/stand/libsa/zfs/zfs.c index 3e7c698e650a..70a102f6425d 100644 --- a/stand/libsa/zfs/zfs.c +++ b/stand/libsa/zfs/zfs.c @@ -1264,8 +1264,12 @@ zfs_nvstore_unset_impl(void *vdev, const char *name, bool unset_env) rv = zfs_set_bootenv(vdev, spa->spa_bootenv); } - if (unset_env) - env_discard(env_getenv(name)); + if (unset_env) { + struct env_var *ev = env_getenv(name); + + if (ev != NULL) + env_discard(ev); + } return (rv); } From nobody Mon Feb 26 14:28:04 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tk2yr3GqDz5BTtx; Mon, 26 Feb 2024 14:28: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 4Tk2yr2SRtz49lr; Mon, 26 Feb 2024 14:28:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708957684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1mwuNwC0BMVXr6S8tf/1L/wBZZ65n/LtVAyZYkJStRQ=; b=WANR+xIITLDrEq7V4Y0qdOrvdu4EOeaCIBz3SGfIWqGJFKvSpBKnnidL7NdezjsazPsc8k 5qdhtwA4cjvYxNuuVi7DVeTvCP6JCeoIpc/pljm770GKTJFmFK5m5ahEpR4bmZSqwS3KrP 9CuC8PoaOBwEYRcHktWvh7aLwbGTL6wE3F+f0Y7jO4b8iXetDyo+u+5aw7o/v+WMIePk5f DNlIIgut2LqMsiHTon+g/kPgnFosDRkUoAopZdOVsZ5ZB/8vcx0JB5zjjVljCRhkwR+89k hER7BlOAUxp2tsCn4t3TXOw1VVNDhiMGIMg02BFFWtY33Vl2Fp1QLjBaTEW0Mg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708957684; a=rsa-sha256; cv=none; b=fotSz+qLPZixa8nms9CVfoFdmDYAOngIsMVO8mvsBgv3GYssA+v0dRCw0EajMAUVgNWNDR 8VYeEeRQcS/Ccut6GP5o3ot1MNOd+CNZH5X8wyfs7MtB1KvSld54JZbfncY3gRWTA8oOTe itmZPDjB1VnTlsLHtsga5swADgrxX0XPLl2RRCRn1ACoQG3bfcNRMwpzFWZ28W8NE5VST+ C4dIBB7ThOJG8d6U1RojpMXdWIjGZFIioKHfsk1JGqoiWkyAIGaugC0lMdFOMs69BoXqdv YA4QXYPvd7Ak0gjmhZcqIsKTVPlvDRKLirbsvCPxRhWQuOmvnddRSCpIoiFu3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708957684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1mwuNwC0BMVXr6S8tf/1L/wBZZ65n/LtVAyZYkJStRQ=; b=aFHK1uyJi8uHkFbBPmIgiqz4esP/w6N7OhxKPmm7Je/8xN3VqIlSTv7h46mo3YU3ESNv4I GvCPSTSaXxdTFZPCOs2hcLtKOjvfXBWFTBMwApHNTjzoeqVhCjHmjj/vYVdWL57hCnIxdM vEw7ohvki9Jag3FIjeMyiMS3hyQ1GO1BMaXT9FlNMk69QtMQQAiErZmzPrF7VrTYDInsTM 0fR5Mtc+MYSkf1lbAuui76qjMtqB3Bf1+g8/5yV3ksVaeddG1j7/xV+a7BCvMlD0db5s86 wnjjyojr8c1HmqewoJ6CTB+TrZvz22qwPCn1Wqt7cc39QDhZvy3m7yiE6ez9Uw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tk2yr1X3SzXV9; Mon, 26 Feb 2024 14:28: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 41QES4cG003315; Mon, 26 Feb 2024 14:28:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41QES4om003312; Mon, 26 Feb 2024 14:28:04 GMT (envelope-from git) Date: Mon, 26 Feb 2024 14:28:04 GMT Message-Id: <202402261428.41QES4om003312@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 1a56620b7958 - main - ipsec esp: avoid dereferencing freed secasindex List-Id: Commit messages for the main 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1a56620b7958cac2b9048589cb730c46958ab539 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1a56620b7958cac2b9048589cb730c46958ab539 commit 1a56620b7958cac2b9048589cb730c46958ab539 Author: Konstantin Belousov AuthorDate: 2024-02-25 10:30:48 +0000 Commit: Konstantin Belousov CommitDate: 2024-02-26 14:27:46 +0000 ipsec esp: avoid dereferencing freed secasindex It is possible that SA was removed while processing packed, in which case it is changed to the DEAD state and it index is removed from the tree. Dereferencing sav->sah then touches freed memory. Reviewed by: ae Sponsored by: NVIDIA networking MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44079 --- sys/netipsec/xform_esp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/netipsec/xform_esp.c b/sys/netipsec/xform_esp.c index 16f7b24375fa..7ad6085db87f 100644 --- a/sys/netipsec/xform_esp.c +++ b/sys/netipsec/xform_esp.c @@ -508,6 +508,13 @@ esp_input_cb(struct cryptop *crp) xd = crp->crp_opaque; CURVNET_SET(xd->vnet); sav = xd->sav; + if (sav->state >= SADB_SASTATE_DEAD) { + /* saidx is freed */ + DPRINTF(("%s: dead SA %p spi %#x\n", __func__, sav, sav->spi)); + ESPSTAT_INC(esps_notdb); + error = ESRCH; + goto bad; + } skip = xd->skip; protoff = xd->protoff; cryptoid = xd->cryptoid; From nobody Mon Feb 26 17:35:57 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tk77f1Gs0z5BqSS; Mon, 26 Feb 2024 17:35: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 4Tk77f0jrqz4fkf; Mon, 26 Feb 2024 17:35:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708968958; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NoP1uL6EnIuIlHftWjiBITJJm9mYoBnvMYrVIuBSrx0=; b=xrr+81mbUTEsbOqdA/8Wfqkd232nRt2AVml0G0LL4DM2HbtGHiMf12nOY06ZgUQE2lnWtM CDBfiImnHEqdfhV4q/dENjzLB2q+bNtbuqWLju1K8ITck2JK0edrKLQ5hQre8V2WBcYrQ9 WiS4BrSHIdNe5RaDX+vkMUzwB8dL8bVDOT+Ooc3ByWBpv8av9dg3LkipzWL2gy0yUsBOns 6DYeuoH2mFQdJR4J9ubEt/zHULlQGCAhLCeU2O0+fMfSYWI4/xEkYFioNgWpoYSVjsAmEp cByyHvqBtqfLj7sqTWbje+uLh8jRPFhj8/10hraDiG6vqNZXuWg4yL6HHhQXNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708968958; a=rsa-sha256; cv=none; b=gPc7hY9oIv4bOaWDw/vNoZKLwXampVcYjk7chPCXWkF4LyMFPMc5jVzGHKScgPX8TUPp8D Ky6NKLP3qBbbsMbhHwU8kUmxJ7DXLRVw1O1JrpiuhLPZZDUSCCDSBHl6F4BBgxR9mMX8To ZD8XLifod0vpUUeLWY1tMk7Hgzg1Nv0b6iKGCuCQzu8jJhCvhVQK0cheWVNQbSt0eF7IeN KhxWHtqY0i3bVfdCP6J3XNkTm/Qspnb3sD8DLFlJ9M4wzuy7y+oOB6AOgcUdcgXKJObSrq NS0Y5/OS/uC29XJQf+kBpW2F8KT1OZs8V15u6b/bQWxTN2iccqhPNZ4Qc6U3+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=1708968958; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NoP1uL6EnIuIlHftWjiBITJJm9mYoBnvMYrVIuBSrx0=; b=iYIPI3T33QjRnZrf+3mvc6jDUlgj+BC9lH20joaeYIFO+tiKrb53AdeaA3y6FnkEaN+ubL 5DwkXLV37MZdzoHbZe0uixxkrv7A6WGLtlvmZ59CnIJ9Prh8H+K8S11cffv9wNHXRMfj8W M2KLZAcG8ArcRqnPs7gcLHBo8SDXWjmqSMAkVd0WfuwlSCVVEOf68oyWwhXChvfjBEPWOq 1ozZu3ufPcpYdNglDHl70Xx9jzDh2DmUdmqL5BrcUa8ETxsxO+4J62zYprUyXEJ6twKZgf l4PROl8YFDFPf64BvYURh5UM8U9wQKICyhl9sUF8fyTDuJGRgUvnHqXQ6vZKuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tk77d6vNJzdHP; Mon, 26 Feb 2024 17:35: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 41QHZvwb027961; Mon, 26 Feb 2024 17:35:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41QHZvL1027958; Mon, 26 Feb 2024 17:35:57 GMT (envelope-from git) Date: Mon, 26 Feb 2024 17:35:57 GMT Message-Id: <202402261735.41QHZvL1027958@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 6e69612d5df1 - main - pam: Add pam_xdg 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6e69612d5df1c1d5bd86990ea4d9a170c030b292 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=6e69612d5df1c1d5bd86990ea4d9a170c030b292 commit 6e69612d5df1c1d5bd86990ea4d9a170c030b292 Author: Emmanuel Vadot AuthorDate: 2024-02-21 14:51:05 +0000 Commit: Emmanuel Vadot CommitDate: 2024-02-26 17:34:52 +0000 pam: Add pam_xdg module This is a module to setup the XDG directories and environment variables. For now the only usage is to have a XDG_RUNTIME_DIR environment setup at user login. All other environment variable have a default fallback so no need to export them in this module. The directory is created according to the XDG Base directory specification. The default base directory is /var/run/xdg/ but can be configured using the runtime_dir= module option. According to the spec the directory *must* not survive a reboot so adding var_run_enable="YES" to rc.conf is highly recommanded. Reviewed by: des, pauamma (manpages) Differential Revision: https://reviews.freebsd.org/D44011 Sponsored by: Beckhoff Automation GmbH & Co. KG --- lib/libpam/modules/modules.inc | 1 + lib/libpam/modules/pam_xdg/Makefile | 6 + lib/libpam/modules/pam_xdg/pam_xdg.8 | 56 +++++++ lib/libpam/modules/pam_xdg/pam_xdg.c | 311 +++++++++++++++++++++++++++++++++++ 4 files changed, 374 insertions(+) diff --git a/lib/libpam/modules/modules.inc b/lib/libpam/modules/modules.inc index ddbb326f0312..f3ab65333f4f 100644 --- a/lib/libpam/modules/modules.inc +++ b/lib/libpam/modules/modules.inc @@ -30,3 +30,4 @@ MODULES += pam_ssh .endif MODULES += pam_tacplus MODULES += pam_unix +MODULES += pam_xdg \ No newline at end of file diff --git a/lib/libpam/modules/pam_xdg/Makefile b/lib/libpam/modules/pam_xdg/Makefile new file mode 100644 index 000000000000..2a470e0850bf --- /dev/null +++ b/lib/libpam/modules/pam_xdg/Makefile @@ -0,0 +1,6 @@ + +LIB= pam_xdg +SRCS= pam_xdg.c +MAN= pam_xdg.8 + +.include diff --git a/lib/libpam/modules/pam_xdg/pam_xdg.8 b/lib/libpam/modules/pam_xdg/pam_xdg.8 new file mode 100644 index 000000000000..1a8b53def051 --- /dev/null +++ b/lib/libpam/modules/pam_xdg/pam_xdg.8 @@ -0,0 +1,56 @@ +.\" * SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2024 Beckhoff Automation GmbH & Co. KG +.\" +.\" * Redistribution and use in source and binary forms, with or without +.\" * modification, are permitted provided that the following conditions +.\" * are met: +.\" * 1. Redistributions of source code must retain the above copyright +.\" * notice, this list of conditions and the following disclaimer. +.\" * 2. Redistributions in binary form must reproduce the above copyright +.\" * notice, this list of conditions and the following disclaimer in the +.\" * documentation and/or other materials provided with the distribution. +.\" * +.\" * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" * SUCH DAMAGE. +.Dd February 21, 2024 +.Dt PAM_XDG 8 +.Os +.Sh NAME +.Nm pam_xdg +.Nd XDG PAM module +.Sh SYNOPSIS +.Op Ar service-name +.Ar module-type +.Ar control-flag +.Pa pam_xdg +.Op Ar arguments +.Sh DESCRIPTION +The xdg service module for PAM sets up the runtime directory according +to the XDG specifications. +.Pp +By default the directory is created under +.Pa /var/run/xdg/ . +.Pp +The following option may be passed to the authentication module: +.Bl -tag -width ".Cm runtime_dir" +.It Cm runtime_dir Ns = Ns Ar directory +Use an alternate base directory +.El +.Sh SEE ALSO +.Xr pam 3 , +.Xr pam.conf 5 +.Sh AUTHORS +The +.Nm +module and this manual page were written by +.An Emmanuel Vadot Aq Mt manu@FreeBSD.org . diff --git a/lib/libpam/modules/pam_xdg/pam_xdg.c b/lib/libpam/modules/pam_xdg/pam_xdg.c new file mode 100644 index 000000000000..40012fe463e0 --- /dev/null +++ b/lib/libpam/modules/pam_xdg/pam_xdg.c @@ -0,0 +1,311 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 Beckhoff Automation GmbH & Co. KG + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define PAM_SM_SESSION + +#include +#include +#include + +#define BASE_RUNTIME_DIR_PREFIX "/var/run/xdg" +#define RUNTIME_DIR_PREFIX runtime_dir_prefix != NULL ? runtime_dir_prefix : BASE_RUNTIME_DIR_PREFIX + +#define RUNTIME_DIR_PREFIX_MODE 0711 +#define RUNTIME_DIR_MODE 0700 /* XDG spec */ + +#define XDG_MAX_SESSION 100 /* Arbitrary limit because we need one */ + +static int +_pam_xdg_open(pam_handle_t *pamh, int flags __unused, + int argc __unused, const char *argv[] __unused) +{ + struct passwd *passwd; + const char *user; + const char *runtime_dir_prefix; + struct stat sb; + char *runtime_dir = NULL; + char *xdg_session_file; + int rv, rt_dir_prefix, rt_dir, session_file, i; + + session_file = -1; + rt_dir_prefix = -1; + runtime_dir_prefix = openpam_get_option(pamh, "runtime_dir_prefix"); + + /* Get user info */ + rv = pam_get_item(pamh, PAM_USER, (const void **)&user); + if (rv != PAM_SUCCESS) { + PAM_VERBOSE_ERROR("Can't get user information"); + goto out; + } + if ((passwd = getpwnam(user)) == NULL) { + PAM_VERBOSE_ERROR("Can't get user information"); + rv = PAM_SESSION_ERR; + goto out; + } + + /* Open or create the base xdg directory */ + rt_dir_prefix = open(RUNTIME_DIR_PREFIX, O_DIRECTORY | O_NOFOLLOW); + if (rt_dir_prefix < 0) { + rt_dir_prefix = mkdir(RUNTIME_DIR_PREFIX, RUNTIME_DIR_PREFIX_MODE); + if (rt_dir_prefix != 0) { + PAM_VERBOSE_ERROR("Can't mkdir %s", RUNTIME_DIR_PREFIX); + rv = PAM_SESSION_ERR; + goto out; + } + rt_dir_prefix = open(RUNTIME_DIR_PREFIX, O_DIRECTORY | O_NOFOLLOW); + } + + /* Open or create the user xdg directory */ + rt_dir = openat(rt_dir_prefix, user, O_DIRECTORY | O_NOFOLLOW); + if (rt_dir < 0) { + rt_dir = mkdirat(rt_dir_prefix, user, RUNTIME_DIR_MODE); + if (rt_dir != 0) { + PAM_VERBOSE_ERROR("mkdir: %s/%s (%d)", RUNTIME_DIR_PREFIX, user, rt_dir); + rv = PAM_SESSION_ERR; + goto out; + } + rv = fchownat(rt_dir_prefix, user, passwd->pw_uid, passwd->pw_gid, 0); + if (rv != 0) { + PAM_VERBOSE_ERROR("fchownat: %s/%s (%d)", RUNTIME_DIR_PREFIX, user, rv); + rv = unlinkat(rt_dir_prefix, user, AT_REMOVEDIR); + if (rv == -1) + PAM_VERBOSE_ERROR("unlinkat: %s/%s (%d)", RUNTIME_DIR_PREFIX, user, errno); + rv = PAM_SESSION_ERR; + goto out; + } + } else { + /* Check that the already create dir is correctly owned */ + rv = fstatat(rt_dir_prefix, user, &sb, 0); + if (rv == -1) { + PAM_VERBOSE_ERROR("fstatat %s/%s failed (%d)", RUNTIME_DIR_PREFIX, user, errno); + rv = PAM_SESSION_ERR; + goto out; + } + if (sb.st_uid != passwd->pw_uid || + sb.st_gid != passwd->pw_gid) { + PAM_VERBOSE_ERROR("%s/%s isn't owned by %d:%d\n", RUNTIME_DIR_PREFIX, user, passwd->pw_uid, passwd->pw_gid); + rv = PAM_SESSION_ERR; + goto out; + } + /* Test directory mode */ + if ((sb.st_mode & 0x1FF) != RUNTIME_DIR_MODE) { + PAM_VERBOSE_ERROR("%s/%s have wrong mode\n", RUNTIME_DIR_PREFIX, user); + rv = PAM_SESSION_ERR; + goto out; + } + } + + /* Setup the environment variable */ + asprintf(&runtime_dir, "XDG_RUNTIME_DIR=%s/%s", RUNTIME_DIR_PREFIX, user); + rv = pam_putenv(pamh, runtime_dir); + if (rv != PAM_SUCCESS) { + PAM_VERBOSE_ERROR("pam_putenv: failed (%d)", rv); + rv = PAM_SESSION_ERR; + goto out; + } + + /* Setup the session count file */ + for (i = 0; i < XDG_MAX_SESSION; i++) { + asprintf(&xdg_session_file, "%s/xdg_session.%d", user, i); + printf("Trying to open %s\n", xdg_session_file); + session_file = openat(rt_dir_prefix, xdg_session_file, O_CREAT | O_EXCL, RUNTIME_DIR_MODE); + free(xdg_session_file); + if (session_file >= 0) + break; + } + if (session_file < 0) { + PAM_VERBOSE_ERROR("Too many sessions"); + rv = PAM_SESSION_ERR; + goto out; + } + +out: + if (session_file >= 0) + close(session_file); + if (rt_dir_prefix >= 0) + close(rt_dir_prefix); + + if (runtime_dir) + free(runtime_dir); + return (rv); +} + +static int +remove_dir(int fd) +{ + DIR *dirp; + struct dirent *dp; + + dirp = fdopendir(fd); + if (dirp == NULL) + return (-1); + + while ((dp = readdir(dirp)) != NULL) { + if (dp->d_type == DT_DIR) { + int dirfd; + + if (strcmp(dp->d_name, ".") == 0 || + strcmp(dp->d_name, "..") == 0) + continue; + dirfd = openat(fd, dp->d_name, 0); + remove_dir(dirfd); + close(dirfd); + unlinkat(fd, dp->d_name, AT_REMOVEDIR); + continue; + } + unlinkat(fd, dp->d_name, 0); + } + + return (0); +} + +static int +_pam_xdg_close(pam_handle_t *pamh __unused, int flags __unused, + int argc __unused, const char *argv[] __unused) +{ + struct passwd *passwd; + const char *user; + const char *runtime_dir_prefix; + struct stat sb; + char *xdg_session_file; + int rv, rt_dir_prefix, rt_dir, session_file, i; + + rt_dir = -1; + rt_dir_prefix = -1; + runtime_dir_prefix = openpam_get_option(pamh, "runtime_dir_prefix"); + + /* Get user info */ + rv = pam_get_item(pamh, PAM_USER, (const void **)&user); + if (rv != PAM_SUCCESS) { + PAM_VERBOSE_ERROR("Can't get user information"); + goto out; + } + if ((passwd = getpwnam(user)) == NULL) { + PAM_VERBOSE_ERROR("Can't get user information"); + rv = PAM_SESSION_ERR; + goto out; + } + + /* Open the xdg base directory */ + rt_dir_prefix = open(RUNTIME_DIR_PREFIX, O_DIRECTORY | O_NOFOLLOW); + if (rt_dir_prefix < 0) { + PAM_VERBOSE_ERROR("open: %s failed (%d)\n", runtime_dir_prefix, rt_dir_prefix); + rv = PAM_SESSION_ERR; + goto out; + } + /* Check that the already created dir is correctly owned */ + rv = fstatat(rt_dir_prefix, user, &sb, 0); + if (rv == -1) { + PAM_VERBOSE_ERROR("fstatat %s/%s failed (%d)", RUNTIME_DIR_PREFIX, user, errno); + rv = PAM_SESSION_ERR; + goto out; + } + if (sb.st_uid != passwd->pw_uid || + sb.st_gid != passwd->pw_gid) { + PAM_VERBOSE_ERROR("%s/%s isn't owned by %d:%d\n", RUNTIME_DIR_PREFIX, user, passwd->pw_uid, passwd->pw_gid); + rv = PAM_SESSION_ERR; + goto out; + } + /* Test directory mode */ + if ((sb.st_mode & 0x1FF) != RUNTIME_DIR_MODE) { + PAM_VERBOSE_ERROR("%s/%s have wrong mode\n", RUNTIME_DIR_PREFIX, user); + rv = PAM_SESSION_ERR; + goto out; + } + + /* Open the user xdg directory */ + rt_dir = openat(rt_dir_prefix, user, O_DIRECTORY | O_NOFOLLOW); + if (rt_dir < 0) { + PAM_VERBOSE_ERROR("openat: %s/%s failed (%d)\n", RUNTIME_DIR_PREFIX, user, rt_dir_prefix); + rv = PAM_SESSION_ERR; + goto out; + } + + /* Get the last session file created */ + for (i = XDG_MAX_SESSION; i >= 0; i--) { + asprintf(&xdg_session_file, "%s/xdg_session.%d", user, i); + session_file = openat(rt_dir_prefix, xdg_session_file, 0); + if (session_file >= 0) { + unlinkat(rt_dir_prefix, xdg_session_file, 0); + free(xdg_session_file); + break; + } + free(xdg_session_file); + } + if (session_file < 0) { + PAM_VERBOSE_ERROR("Can't find session number\n"); + rv = PAM_SESSION_ERR; + goto out; + } + close(session_file); + + /* Final cleanup if last user session */ + if (i == 0) { + remove_dir(rt_dir); + if (unlinkat(rt_dir_prefix, user, AT_REMOVEDIR) != 0) { + PAM_VERBOSE_ERROR("Can't cleanup %s/%s\n", runtime_dir_prefix, user); + rv = PAM_SESSION_ERR; + goto out; + } + } + + rv = PAM_SUCCESS; +out: + if (rt_dir >= 0) + close(rt_dir); + if (rt_dir_prefix >= 0) + close(rt_dir_prefix); + return (rv); +} + +PAM_EXTERN int +pam_sm_open_session(pam_handle_t *pamh, int flags, + int argc, const char *argv[]) +{ + + return (_pam_xdg_open(pamh, flags, argc, argv)); +} + +PAM_EXTERN int +pam_sm_close_session(pam_handle_t *pamh, int flags, + int argc, const char *argv[]) +{ + + return (_pam_xdg_close(pamh, flags, argc, argv)); +} + +PAM_MODULE_ENTRY("pam_xdg"); From nobody Mon Feb 26 17:35:59 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tk77g3L1bz5Bqhm; Mon, 26 Feb 2024 17:35: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 4Tk77g1l8Pz4fhP; Mon, 26 Feb 2024 17:35:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708968959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G4fI1mvG5x7MAPSoCGmLrAH74Shtjdseh4TSFCJU2eE=; b=RIlvg+k/ErEfQv3WA8pDydTXD7baA5sgrjfAoZo9rn66dea85DweNKNsZOkW8HJKFhlsNF jcFERl/DYmwM9QHiMxH4LAqjg9yQJdsfzdT2TpbNWQKK9f57jU22IxApgCB2S2TOR9qJtf tKQe+N3UobMT1ypgBBjIK9MY0H7JZJoo0ip9D3Cgblt7cZvoReat/f7iIkuIvagba8pP8A PP5EjJMncvAH028l97nxxsHLQ1Wx3WgJ+8qwuc4KADZCK7v/M8jl/39BhWknuFElpOyegj VeEhow3FvGde1aAlSEmUZD7RWAwzmfaZ1XE1y6ivUhcojUwf3/AhWU+7aeowXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708968959; a=rsa-sha256; cv=none; b=Mz202J+LJ0WehM9gY4SoHos9gj6hLB3te5lN6hbOBQzrSAvyXx+8gIQicyB/HB/u9rnqF4 I6Ew0ctWi7KIu2Ed3WBCuR70HqUvE8F5gHUVpS9jY6w9lrhUZ8rctSUrzno3AEvX1qLyQ6 wuYvNW5/gZqyi29UwK1aA1jv0cjFr7XSoBdtIGoxq7cfWzHnADjg78jLP9CaQOXrhaKQp8 kZdzFIBbEaIeT5G052dYDih/k+uumb+CEpOAP8vRVzYZYa0Ua8iVDrmP0+k7/yOuaX8e3s MzA7Ewt8GUu3NqPBloL8QX+a2eB9DgbgX8RHUVSK1a2Xb5xCNwoEr8tsAKj6qQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708968959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G4fI1mvG5x7MAPSoCGmLrAH74Shtjdseh4TSFCJU2eE=; b=E00Vc4anGN6Ol6mOkekqQSfzrmncdvbFDPf6A24SSLpF0EjlDzxVBNkGkwxY1900yTOHi8 bRvEBX8/ypj5HmIU3rk3zAr3VzSr/4IAV6dF+egumKp9Se7N/HvMpoeY+oXjMwKM2iKz4V YJkL5UISqNfYIphYVmSmUjrvp7BKJbLVx09aMG8833mXub2WaQVGNwSJ3AfJd4vHxRq7+5 +vuSK0ia91WimPrXbRJ9W89WKFf3nY28HyCoboe/XkjqcKU1+GURiWt/UcL1t6MRdCloeR Ww8Tk9I2AUwilN74P8yjFn7kCd9zqFeOQynF/tOzBs25xxl4CUR3Ek5UPxaqxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tk77g0p1yzd7f; Mon, 26 Feb 2024 17:35: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 41QHZxHB028012; Mon, 26 Feb 2024 17:35:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41QHZxjB028009; Mon, 26 Feb 2024 17:35:59 GMT (envelope-from git) Date: Mon, 26 Feb 2024 17:35:59 GMT Message-Id: <202402261735.41QHZxjB028009@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 6b9e6f12e5bb - main - pam: Always use pam_xdg for session and xdm List-Id: Commit messages for the main 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b9e6f12e5bbfe347dba8ff8e1e161f9180a1edd Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=6b9e6f12e5bbfe347dba8ff8e1e161f9180a1edd commit 6b9e6f12e5bbfe347dba8ff8e1e161f9180a1edd Author: Emmanuel Vadot AuthorDate: 2024-02-22 05:46:08 +0000 Commit: Emmanuel Vadot CommitDate: 2024-02-26 17:35:22 +0000 pam: Always use pam_xdg for session and xdm This ensure that the XDG_RUNTIME_DIR is always created and the environment variable is present which is a must for any wayland user (at least). The only "cost" of it is a directory is created and unused. Reviewed by: des Differential Revision: https://reviews.freebsd.org/D44012 Sponsored by: Beckhoff Automation GmbH & Co. KG --- lib/libpam/pam.d/system | 1 + lib/libpam/pam.d/xdm | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/libpam/pam.d/system b/lib/libpam/pam.d/system index 5ba5567ea9c8..0b5ae5c8fff8 100644 --- a/lib/libpam/pam.d/system +++ b/lib/libpam/pam.d/system @@ -16,6 +16,7 @@ account required pam_unix.so # session #session optional pam_ssh.so want_agent session required pam_lastlog.so no_fail +session required pam_xdg.so # password #password sufficient pam_krb5.so no_warn try_first_pass diff --git a/lib/libpam/pam.d/xdm b/lib/libpam/pam.d/xdm index da4ac9f65c28..7f603ab640fd 100644 --- a/lib/libpam/pam.d/xdm +++ b/lib/libpam/pam.d/xdm @@ -16,6 +16,7 @@ account required pam_unix.so # session #session required pam_ssh.so want_agent session required pam_lastlog.so no_fail +session required pam_xdg.so # password password required pam_deny.so From nobody Mon Feb 26 18:08:56 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tk7sh3VcNz5BtPC; Mon, 26 Feb 2024 18:08:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tk7sh31rVz4lrB; Mon, 26 Feb 2024 18:08:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708970936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7AlgVJ7PXsoCokmkMMiR/dSAIYu4N1FP41tQvyV636Q=; b=b9PxX7FNc8nU9LS0KIpRlwfPsMMaNMLzTKA1qQNqoOSUvwb0RaxWTM785xBb4vyWEW0Nf2 TJN8Y24a2ah4o1YieSZSMnwXEsUsbziikEB3dSZUFQ2SiI1n1Yc9jI9qAQVlP0oUIvULYj x1FdlRWi79LTzyZQENHzo6yMWDvUs+CcuTShzXcDYfwCciUQ1AagGFL9GB4FzwDP2rNq9V 0D0+MJ2b4NfokTJ3AFmbXYvJuMaUXF2z//YITf8vbn64c68IUi9r/KRF9kQx6u15qfO/WC +kDUbx66BwZqh0V2aP39R8h5w9eh511m3S3RWFx6gAm3Xc7czVmrTRu5Go4FoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708970936; a=rsa-sha256; cv=none; b=ythVJeYRMjyY4GepoqQ3J3fpLX/nj8QGLHtb/PbtWNJh5Rp7YMALpGdD908Opy1aGkw/Ak GyJw1Z/I45hDRUu5EtEAujEPXJMIX3ie+pN5a4RqN1ZMMjalW2ZuFKtFTLTGQcLQxfdPX1 ovP8MN4QTVlpr7vMyUnIM2bu8Sw8gwfSOIawKP51eVuO6yId0nH987NT5f1fPB5WH0/23J Y3yy9bH3oOrAetI53ViaCVlOQdalkFwBRNU3xe3MJEsTUEMhYNO9chMKIic3F80TMxyYCq 7Lom44VfBo34nqlFlw/9Kd+oroXsMW/3VQ3YTnp0YZlhQTOQs0JF/sst1bW9Jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708970936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7AlgVJ7PXsoCokmkMMiR/dSAIYu4N1FP41tQvyV636Q=; b=agNDYovmUCQz/wkPP/9bTHmrdlsC8kufpg9q4zac29I5yomE4GK26LZ9iAqv/jUuJ8RM0G fzbalyRwBU420HZ5tMDbtnma1YKy1vp1GmmvUjPT+EBy6e3QsSesaG8UK+8bCRGvrBSu2V C9sfKmAPvReeYVhcdSkzrLCPEmkfEVXEYYxZRPD7qBWdvSBMuaAhg4XGnzRCfccNpq+/Au IM2lQV30qWrn6XT1DpKUUdHLoJ2ToNhHrOOQPhfNRQy/RnD34zzndzK3f4bFFZ6d8JcWWS aJ59tb/LAF9RLa80aWHvzE0Fw9Rg5wPl7JYImby0w0Z5zezcV2DHepwlXu7Y1A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tk7sh25pSzdXV; Mon, 26 Feb 2024 18:08:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41QI8u4s081218; Mon, 26 Feb 2024 18:08:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41QI8u4C081215; Mon, 26 Feb 2024 18:08:56 GMT (envelope-from git) Date: Mon, 26 Feb 2024 18:08:56 GMT Message-Id: <202402261808.41QI8u4C081215@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: 53de23f4d140 - main - diff: Fix --expand-tabs and --side-by-side. List-Id: Commit messages for the main 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: 53de23f4d140becc3166e87665b0064f215a220e Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=53de23f4d140becc3166e87665b0064f215a220e commit 53de23f4d140becc3166e87665b0064f215a220e Author: Dag-Erling Smørgrav AuthorDate: 2024-02-26 18:08:06 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-02-26 18:08:06 +0000 diff: Fix --expand-tabs and --side-by-side. * Overhaul column width and padding calculation. * Rewrite print_space() so it is now a) correct and b) understandable. * Rewrite tab expansion in fetch() for the same reason. This brings us in line with GNU diff for all cases I could think of. Sponsored by: Klara, Inc. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D44014 --- usr.bin/diff/diff.1 | 9 ++++ usr.bin/diff/diff.c | 12 ++---- usr.bin/diff/diffreg.c | 113 ++++++++++++++++++++++++++++--------------------- 3 files changed, 78 insertions(+), 56 deletions(-) diff --git a/usr.bin/diff/diff.1 b/usr.bin/diff/diff.1 index 10a349348cfd..34658ad69da0 100644 --- a/usr.bin/diff/diff.1 +++ b/usr.bin/diff/diff.1 @@ -427,6 +427,15 @@ Output at most .Ar number columns when using side by side format. The default value is 130. +Note that unless +.It Fl t +was specified, +.Nm +will always align the second column to a tab stop, so values of +.Fl -width +smaller than approximately five times the value of +.Fl -tabsize +may yield surprising results. .It Fl -changed-group-format Ar GFMT Format input groups in the provided .Pp diff --git a/usr.bin/diff/diff.c b/usr.bin/diff/diff.c index 03eb363fc323..d947c1e01705 100644 --- a/usr.bin/diff/diff.c +++ b/usr.bin/diff/diff.c @@ -276,10 +276,8 @@ main(int argc, char **argv) break; case 'W': width = (int) strtonum(optarg, 1, INT_MAX, &errstr); - if (errstr) { - warnx("Invalid argument for width"); - usage(); - } + if (errstr) + errx(1, "width is %s: %s", errstr, optarg); break; case 'X': read_excludes_file(optarg); @@ -317,10 +315,8 @@ main(int argc, char **argv) break; case OPT_TSIZE: tabsize = (int) strtonum(optarg, 1, INT_MAX, &errstr); - if (errstr) { - warnx("Invalid argument for tabsize"); - usage(); - } + if (errstr) + errx(1, "tabsize is %s: %s", errstr, optarg); break; case OPT_STRIPCR: dflags |= D_STRIPCR; diff --git a/usr.bin/diff/diffreg.c b/usr.bin/diff/diffreg.c index 348741f8ccca..c67f3105290f 100644 --- a/usr.bin/diff/diffreg.c +++ b/usr.bin/diff/diffreg.c @@ -166,7 +166,6 @@ struct context_vec { enum readhash { RH_BINARY, RH_OK, RH_EOF }; -#define MIN_PAD 1 static FILE *opentemp(const char *); static void output(char *, FILE *, char *, FILE *, int); static void check(FILE *, FILE *, int); @@ -206,7 +205,7 @@ static int len[2]; static int pref, suff; /* length of prefix and suffix */ static int slen[2]; static int anychange; -static int hw, padding; /* half width and padding */ +static int hw, lpad, rpad; /* half width and padding */ static int edoffset; static long *ixnew; /* will be overlaid on file[1] */ static long *ixold; /* will be overlaid on klist */ @@ -251,21 +250,44 @@ diffreg(char *file1, char *file2, int flags, int capsicum) lastline = 0; lastmatchline = 0; - /* - * hw excludes padding and make sure when -t is not used, - * the second column always starts from the closest tab stop - */ + /* + * In side-by-side mode, we need to print the left column, a + * change marker surrounded by padding, and the right column. + * + * If expanding tabs, we don't care about alignment, so we simply + * subtract 3 from the width and divide by two. + * + * If not expanding tabs, we need to ensure that the right column + * is aligned to a tab stop. We start with the same formula, then + * decrement until we reach a size that lets us tab-align the + * right column. We then adjust the width down if necessary for + * the padding calculation to work. + * + * Left padding is half the space left over, rounded down; right + * padding is whatever is needed to match the width. + */ if (diff_format == D_SIDEBYSIDE) { - hw = width >> 1; - padding = tabsize - (hw % tabsize); - if ((flags & D_EXPANDTABS) != 0 || (padding % tabsize == 0)) - padding = MIN_PAD; - - hw = (width >> 1) - - ((padding == MIN_PAD) ? (padding << 1) : padding) - 1; + if (flags & D_EXPANDTABS) { + if (width > 3) { + hw = (width - 3) / 2; + } else { + /* not enough space */ + hw = 0; + } + } else if (width <= 3 || width <= tabsize) { + /* not enough space */ + hw = 0; + } else { + hw = (width - 3) / 2; + while (hw > 0 && roundup(hw + 3, tabsize) + hw > width) + hw--; + if (width - (roundup(hw + 3, tabsize) + hw) < tabsize) + width = roundup(hw + 3, tabsize) + hw; + } + lpad = (width - hw * 2 - 1) / 2; + rpad = (width - hw * 2 - 1) - lpad; } - if (flags & D_IGNORECASE) chrtran = cup2low; else @@ -866,7 +888,7 @@ output(char *file1, FILE *f1, char *file2, FILE *f2, int flags) while (i0 <= m && J[i0] == J[i0 - 1] + 1) { if (diff_format == D_SIDEBYSIDE && suppress_common != 1) { nc = fetch(ixold, i0, i0, f1, '\0', 1, flags); - print_space(nc, (hw - nc) + (padding << 1) + 1, flags); + print_space(nc, hw - nc + lpad + 1 + rpad, flags); fetch(ixnew, J[i0], J[i0], f2, '\0', 0, flags); printf("\n"); } @@ -1144,10 +1166,10 @@ proceed: else if (color && c > d) printf("\033[%sm", del_code); if (a > b) { - print_space(0, hw + padding , *pflags); + print_space(0, hw + lpad, *pflags); } else { nc = fetch(ixold, a, b, f1, '\0', 1, *pflags); - print_space(nc, hw - nc + padding, *pflags); + print_space(nc, hw - nc + lpad, *pflags); } if (color && a > b) printf("\033[%sm", add_code); @@ -1156,7 +1178,7 @@ proceed: printf("%c", (a > b) ? '>' : ((c > d) ? '<' : '|')); if (color && c > d) printf("\033[m"); - print_space(hw + padding + 1 , padding, *pflags); + print_space(hw + lpad + 1, rpad, *pflags); fetch(ixnew, c, d, f2, '\0', 0, *pflags); printf("\n"); } @@ -1262,30 +1284,24 @@ fetch(long *f, int a, int b, FILE *lb, int ch, int oldfile, int flags) printf("\n\\ No newline at end of file\n"); return (col); } - /* - * when using --side-by-side, col needs to be increased - * in any case to keep the columns aligned - */ if (c == '\t') { - if (flags & D_EXPANDTABS) { - newcol = ((col / tabsize) + 1) * tabsize; - do { - printf(" "); - } while (++col < newcol && col < hw); + /* + * Calculate where the tab would bring us. + * If it would take us to the end of the + * column, either clip it (if expanding + * tabs) or return right away (if not). + */ + newcol = roundup(col + 1, tabsize); + if ((flags & D_EXPANDTABS) == 0) { + if (hw > 0 && newcol >= hw) + return (col); + printf("\t"); } else { - if (diff_format == D_SIDEBYSIDE) { - if ((col + tabsize) > hw) { - printf("%*s", hw - col, ""); - col = hw; - } else { - printf("\t"); - col += tabsize - 1; - } - } else { - printf("\t"); - col++; - } + if (hw > 0 && newcol > hw) + newcol = hw; + printf("%*s", newcol - col, ""); } + col = newcol; } else { if (diff_format == D_EDIT && j == 1 && c == '\n' && lastc == '.') { @@ -1665,18 +1681,19 @@ print_header(const char *file1, const char *file2) * nc is the preceding number of characters */ static void -print_space(int nc, int n, int flags) { - int i, col; +print_space(int nc, int n, int flags) +{ + int col, newcol, tabstop; - col = n; + col = nc; + newcol = nc + n; + /* first, use tabs if allowed */ if ((flags & D_EXPANDTABS) == 0) { - /* first tabstop may be closer than tabsize */ - i = tabsize - (nc % tabsize); - while (col >= tabsize) { + while ((tabstop = roundup(col + 1, tabsize)) <= newcol) { printf("\t"); - col -= i; - i = tabsize; + col = tabstop; } } - printf("%*s", col, ""); + /* finish with spaces */ + printf("%*s", newcol - col, ""); } From nobody Mon Feb 26 18:14:34 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tk80F4QhFz5Btvq for ; Mon, 26 Feb 2024 18:14:37 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) (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 4Tk80F2nhFz4mm7 for ; Mon, 26 Feb 2024 18:14:37 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Authentication-Results: mx1.freebsd.org; none Received: by mail-ot1-x330.google.com with SMTP id 46e09a7af769-6e125818649so1434301a34.1 for ; Mon, 26 Feb 2024 10:14:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; t=1708971276; x=1709576076; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=PDYV1pNznPfOI6LQC7ytV1Z60kvi0s9XnRkGd4hF2pI=; b=T3wD4+hAoPXoqHWI8RcViYY3wnP32g+O+ova6Ca5B/EXb6jP21XbtouDswO4J5qReC pi7tQahMkHi8rY0EYoe0FdNi/IzH2muazFOGD+yZlFNyZwyH+omQOMOtkbfvqgCDd5XD YiCAbxGbvfZCUifOysJ8Lr4y/2xWfmtFERgK9BE5nNuoh8qrFS2slYT7TE+mzsFQLzWJ 3BgXNnJV9ZlSXxIhDOZZdmGo3tRpzlhkfL+ELRIK3foPperHHByYjfg9qiVaWM1VIPD8 GxLLSO90OsTikGxmOpZStjTt/xkegcwZObXQ6obYYOAymyTD4mnQWRNff3B/Momi6w8p EnUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708971276; x=1709576076; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=PDYV1pNznPfOI6LQC7ytV1Z60kvi0s9XnRkGd4hF2pI=; b=QaAZWamIBVy74yjot+u1ty91MqJM4HnSFnqwemSR9GYUyjUkjEvNONUDuYfKDLl0cR HhRpFdnx8s+3Ka6LVRgzRlc0RsfF5VpZKx3AzEdnvc07PsVRqK93RmkcZRdYrinNla7W cI57/RqhL4cnczFtXCWk8i6pQ/Keu7zAQnKw5dWosHDQujSzal+CXo0FKDaSFVxP8hEV NZ2GbH0bKetonoOEvYRYYOKQDyv8P1z57kDD6uKCKyT9325WOWk20PsfCEXJhYT+cQvU xX4HPRmL+gQ0vvknmIC4/soVppoaoS7SUhoyb8agiZ+W2+78KY3cdR1rWAKNKplZ2fFP Ebvg== X-Forwarded-Encrypted: i=1; AJvYcCXU1Kq16FeX8wcJ4afEg0Nvaegwo8Fq730SN5SXUlk4GjA+qUthXMaxCFjw1QWB/l2jYSs+8AB4gfFKmUaRt2r5YJ1eaFNqWGrIhroB6IATgQ== X-Gm-Message-State: AOJu0Yzn2qCYwPH/O4/fjFfo4kT8bGl9melaTwX6MulgM48HvsB0gMQ2 QpQMmoPg2Yzj9v7IxhbzdfrctfoEp0HA9i73UWVYDlbRgjgfaFB73PYppcz7qT8= X-Google-Smtp-Source: AGHT+IFFPH4XUAcoeTW7eMPbrzVRnu800MrURqSKCUaaX3xVvHkXzM9Gwc2Rd5dacUoPzb+ZplSKSg== X-Received: by 2002:a05:6870:c115:b0:21f:a837:500c with SMTP id f21-20020a056870c11500b0021fa837500cmr8972942oad.34.1708971276163; Mon, 26 Feb 2024 10:14:36 -0800 (PST) Received: from mutt-hbsd (174-24-72-211.clsp.qwest.net. [174.24.72.211]) by smtp.gmail.com with ESMTPSA id l28-20020a0568301d7c00b006e4539f3af4sm1188762oti.71.2024.02.26.10.14.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 10:14:35 -0800 (PST) Date: Mon, 26 Feb 2024 18:14:34 +0000 From: Shawn Webb To: Emmanuel Vadot Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 6e69612d5df1 - main - pam: Add pam_xdg module Message-ID: <2zwthawswhf5surxumjhhmvqpg6bauwl7ucog5kv3d33bej4ai@tpqxvtitsnt4> X-Operating-System: FreeBSD mutt-hbsd 15.0-CURRENT-HBSD FreeBSD 15.0-CURRENT-HBSD X-PGP-Key: https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/blob/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc References: <202402261735.41QHZvL1027958@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: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="b5b3qdh2angfxah3" Content-Disposition: inline In-Reply-To: <202402261735.41QHZvL1027958@gitrepo.freebsd.org> X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4Tk80F2nhFz4mm7 --b5b3qdh2angfxah3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 26, 2024 at 05:35:57PM +0000, Emmanuel Vadot wrote: > The branch main has been updated by manu: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3D6e69612d5df1c1d5bd86990ea4= d9a170c030b292 >=20 > commit 6e69612d5df1c1d5bd86990ea4d9a170c030b292 > Author: Emmanuel Vadot > AuthorDate: 2024-02-21 14:51:05 +0000 > Commit: Emmanuel Vadot > CommitDate: 2024-02-26 17:34:52 +0000 >=20 > pam: Add pam_xdg module > =20 > This is a module to setup the XDG directories and environment variabl= es. > For now the only usage is to have a XDG_RUNTIME_DIR environment setup= at > user login. > All other environment variable have a default fallback so no need to = export > them in this module. > The directory is created according to the XDG Base directory specific= ation. > =20 > The default base directory is /var/run/xdg/ but can be conf= igured > using the runtime_dir=3D module option. > =20 > According to the spec the directory *must* not survive a reboot so ad= ding > var_run_enable=3D"YES" to rc.conf is highly recommanded. > =20 > Reviewed by: des, pauamma (manpages) > Differential Revision: https://reviews.freebsd.org/D44011 > Sponsored by: Beckhoff Automation GmbH & Co. KG > --- > lib/libpam/modules/modules.inc | 1 + > lib/libpam/modules/pam_xdg/Makefile | 6 + > lib/libpam/modules/pam_xdg/pam_xdg.8 | 56 +++++++ > lib/libpam/modules/pam_xdg/pam_xdg.c | 311 +++++++++++++++++++++++++++++= ++++++ > 4 files changed, 374 insertions(+) [snip] > diff --git a/lib/libpam/modules/pam_xdg/pam_xdg.c b/lib/libpam/modules/pa= m_xdg/pam_xdg.c > new file mode 100644 > index 000000000000..40012fe463e0 > --- /dev/null > +++ b/lib/libpam/modules/pam_xdg/pam_xdg.c > @@ -0,0 +1,311 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause > + * > + * Copyright (c) 2024 Beckhoff Automation GmbH & Co. KG > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distributio= n. > + * > + * 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 PU= RPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIAB= LE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUE= NTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOO= DS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, S= TRICT > + * 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 > + > +#define PAM_SM_SESSION > + > +#include > +#include > +#include > + > +#define BASE_RUNTIME_DIR_PREFIX "/var/run/xdg" > +#define RUNTIME_DIR_PREFIX runtime_dir_prefix !=3D NULL ? runtime_dir_pr= efix : BASE_RUNTIME_DIR_PREFIX > + > +#define RUNTIME_DIR_PREFIX_MODE 0711 > +#define RUNTIME_DIR_MODE 0700 /* XDG spec */ > + > +#define XDG_MAX_SESSION 100 /* Arbitrary limit because we need one */ > + > +static int > +_pam_xdg_open(pam_handle_t *pamh, int flags __unused, > + int argc __unused, const char *argv[] __unused) > +{ > + struct passwd *passwd; > + const char *user; > + const char *runtime_dir_prefix; > + struct stat sb; > + char *runtime_dir =3D NULL; > + char *xdg_session_file; > + int rv, rt_dir_prefix, rt_dir, session_file, i; > + > + session_file =3D -1; > + rt_dir_prefix =3D -1; > + runtime_dir_prefix =3D openpam_get_option(pamh, "runtime_dir_prefix"); > + > + /* Get user info */ > + rv =3D pam_get_item(pamh, PAM_USER, (const void **)&user); > + if (rv !=3D PAM_SUCCESS) { > + PAM_VERBOSE_ERROR("Can't get user information"); > + goto out; > + } > + if ((passwd =3D getpwnam(user)) =3D=3D NULL) { > + PAM_VERBOSE_ERROR("Can't get user information"); > + rv =3D PAM_SESSION_ERR; > + goto out; > + } > + > + /* Open or create the base xdg directory */ > + rt_dir_prefix =3D open(RUNTIME_DIR_PREFIX, O_DIRECTORY | O_NOFOLLOW); > + if (rt_dir_prefix < 0) { > + rt_dir_prefix =3D mkdir(RUNTIME_DIR_PREFIX, RUNTIME_DIR_PREFIX_MODE); > + if (rt_dir_prefix !=3D 0) { > + PAM_VERBOSE_ERROR("Can't mkdir %s", RUNTIME_DIR_PREFIX); > + rv =3D PAM_SESSION_ERR; > + goto out; > + } > + rt_dir_prefix =3D open(RUNTIME_DIR_PREFIX, O_DIRECTORY | O_NOFOLLOW); > + } > + > + /* Open or create the user xdg directory */ > + rt_dir =3D openat(rt_dir_prefix, user, O_DIRECTORY | O_NOFOLLOW); > + if (rt_dir < 0) { > + rt_dir =3D mkdirat(rt_dir_prefix, user, RUNTIME_DIR_MODE); > + if (rt_dir !=3D 0) { > + PAM_VERBOSE_ERROR("mkdir: %s/%s (%d)", RUNTIME_DIR_PREFIX, user, rt_d= ir); > + rv =3D PAM_SESSION_ERR; > + goto out; > + } > + rv =3D fchownat(rt_dir_prefix, user, passwd->pw_uid, passwd->pw_gid, 0= ); > + if (rv !=3D 0) { > + PAM_VERBOSE_ERROR("fchownat: %s/%s (%d)", RUNTIME_DIR_PREFIX, user, r= v); > + rv =3D unlinkat(rt_dir_prefix, user, AT_REMOVEDIR); > + if (rv =3D=3D -1) > + PAM_VERBOSE_ERROR("unlinkat: %s/%s (%d)", RUNTIME_DIR_PREFIX, user, = errno); > + rv =3D PAM_SESSION_ERR; > + goto out; > + } > + } else { > + /* Check that the already create dir is correctly owned */ > + rv =3D fstatat(rt_dir_prefix, user, &sb, 0); > + if (rv =3D=3D -1) { > + PAM_VERBOSE_ERROR("fstatat %s/%s failed (%d)", RUNTIME_DIR_PREFIX, us= er, errno); > + rv =3D PAM_SESSION_ERR; > + goto out; > + } > + if (sb.st_uid !=3D passwd->pw_uid || > + sb.st_gid !=3D passwd->pw_gid) { > + PAM_VERBOSE_ERROR("%s/%s isn't owned by %d:%d\n", RUNTIME_DIR_PREFIX,= user, passwd->pw_uid, passwd->pw_gid); > + rv =3D PAM_SESSION_ERR; > + goto out; > + } > + /* Test directory mode */ > + if ((sb.st_mode & 0x1FF) !=3D RUNTIME_DIR_MODE) { > + PAM_VERBOSE_ERROR("%s/%s have wrong mode\n", RUNTIME_DIR_PREFIX, user= ); > + rv =3D PAM_SESSION_ERR; > + goto out; > + } > + } > + > + /* Setup the environment variable */ > + asprintf(&runtime_dir, "XDG_RUNTIME_DIR=3D%s/%s", RUNTIME_DIR_PREFIX, u= ser); > + rv =3D pam_putenv(pamh, runtime_dir); > + if (rv !=3D PAM_SUCCESS) { > + PAM_VERBOSE_ERROR("pam_putenv: failed (%d)", rv); > + rv =3D PAM_SESSION_ERR; > + goto out; > + } > + > + /* Setup the session count file */ > + for (i =3D 0; i < XDG_MAX_SESSION; i++) { > + asprintf(&xdg_session_file, "%s/xdg_session.%d", user, i); If asprintf fails, xdg_session_file will be NULL. > + printf("Trying to open %s\n", xdg_session_file); > + session_file =3D openat(rt_dir_prefix, xdg_session_file, O_CREAT | O_E= XCL, RUNTIME_DIR_MODE); If xdg_session_file is NULL, there is a NULL pointer dereference vulnerability in the above call to openat(2). > + free(xdg_session_file); > + if (session_file >=3D 0) > + break; Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD Tor-ified Signal: +1 303-901-1600 https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A= 4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --b5b3qdh2angfxah3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmXc1P0ACgkQ/y5nonf4 4fpsJA//dsUTrurhgPoofonbjZfhXiv1lXpdSToscxMogUEG1TAsGrMn+cvJPNne 0RUDc9FSuKz7mn/VCDxO9N1dEND9kbyZy2XEc0FJ64GFbM0Lr2eqKfO9Ez3lWI/l P7bSfiD3NONgtlmHQDtYE4PmRi0q8kHq596OvQlOAuADHK2xT5BuOyqsLCZp1aPM Db2zQxqt1+G6J46oOjGMWRaZH1l+ZCH4Q52cl9JDyZ0y7TlHyHCAsqm30e0C/7k+ u1UGBbwSeQYq4btlUBtjS7Yiivse+a65Dmdlz5GvKgf6fWgu144Py8GcV1ilACPQ u0h20GJVsOKqiDdxVHZzZVCsnTyyMMo6ifW31WU9Ob0H14O2p3ftywYIdd8UOirV EC1cuqmgtLcNwmGvn+wuRvmHteqzX+aoMnS/iRceuBK2Pt69AbMMgY1rLv0tQOwK /9k/K8IRVDMU2c3bOZRd6TSpv1579O8uVZhn9agBlJ78nqnsOf9BbCb6yh9wG4Fj cM0tk5KfHqrXWZdxHclg+LwA7aEsjuxsViI5KKPisIrhBIC5ZKu84f7Ki8qsvbt/ 9fyKTPEctzO4cKNJoO/7XGnsWmw56a1ElLjVP0UTkuLBCc/T0C+CZNqLB7LjhFtf 4AjmqJRinqSLJxPQs1E/NMAERZVtu5X01TcDe3tV5mNGlR2Zto8= =jG4B -----END PGP SIGNATURE----- --b5b3qdh2angfxah3-- From nobody Mon Feb 26 18:22:12 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tk8914Z0Xz5Bvjr; Mon, 26 Feb 2024 18:22: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 4Tk891058Mz4nF6; Mon, 26 Feb 2024 18:22:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708971733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3vYply4QTy5JQbgktJlHdFKHPnfZ98qeNilx3r0e09c=; b=Sh2iq1nQ6Z2s/UvEXoahhbLNHbHOSwwb49qDZt2frYLUNNohIhz27E0XBTcKWNBW8ZCw22 sA4pr4xYdzlNsBDHHeEXybxrHAb2xNV8S5pDVAmb+hXepVLT0QwCXtM6T6HwONz5rtJyi3 5KW+4OpAxyIR3B7qi20aYRUcBTE6PQj+B3wEFqTEDjpACV/5bac9z68T7UP2VqVp2pbGes ZU651J0jjwUAEQUDvlq60Ygge6VDZfnk4DzU+mzOggotYFtf3wEfA9vAWKEie46H/abx2C 087leA/LfGdMMZmGFpcA+DCpWyR3sJDiQwTtnK45w/JsBHQLE5JxjRybZUMfMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708971733; a=rsa-sha256; cv=none; b=f4mQKspcR3SE+MuTn6NFItQnaxaJ/94stT5lHVemtU5F0WXEqrRG4AMl6FLBe0gg2KHmw+ tRaobnod+A3mh7vFWCVjU4Bd7w9HtJGNZULITMPvYPr+qfv/W+531XgENI3ykABLyk8dms 1SSHDYIVlnOL0SzXmc22aWcjei9JG8q5wwDaQeaOsmU/xjbLMijyWFBCmeFWtPMRWNx8z1 AcQ41rQOZJzJBIrOb6UKeNg8WuRTktqXpeioMyZCLiQFB/fX0FDqCXRyorWtBF16+YmhlF EvtvH+IzpkGJu3uFeqBgEak7b4MgVDggKL3CAxGat/GxOYCIiKZ7Qfa0pLtQSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708971733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3vYply4QTy5JQbgktJlHdFKHPnfZ98qeNilx3r0e09c=; b=KqofyuaJlDrGBDxwI/esyHN91mIINSbcuAN4uVZM7Qbhq73zxZ2yh54TJZnKNTAeknsRR0 xen7sj4oXZlKCqojU6pXnBc2PhcgG75DN/vDNUE7XFj1bl7MfMPORZd4RP8KWwOd0xwTHE oBA8xZ3lr8xy/5ZcqUTg7M5iacxCoCQmsWNwnQqzBlR+UsOjhnhRK8RCfQhAGm8Gc0qGM7 1BrDDbQFql0rcrcrJROv6DXWX6awDrNXD/9MzCE8/CazU23HN1MhvVaGDffe+epejXbnZ3 72I7iVgU//Kh615moyTKbzi4nGnvQTB6WY325PT5Kzxflx/HaQYHwuUbOByVaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tk8906HtfzfXq; Mon, 26 Feb 2024 18:22: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 41QIMCvm014211; Mon, 26 Feb 2024 18:22:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41QIMCNP014208; Mon, 26 Feb 2024 18:22:12 GMT (envelope-from git) Date: Mon, 26 Feb 2024 18:22:12 GMT Message-Id: <202402261822.41QIMCNP014208@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: 312b1076c6b0 - main - diff: Bump manual page 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: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 312b1076c6b0aff9bbcaff058b93385eaf607685 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=312b1076c6b0aff9bbcaff058b93385eaf607685 commit 312b1076c6b0aff9bbcaff058b93385eaf607685 Author: Dag-Erling Smørgrav AuthorDate: 2024-02-26 18:21:40 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-02-26 18:21:40 +0000 diff: Bump manual page date. Sponsored by: Klara, Inc. --- usr.bin/diff/diff.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/diff/diff.1 b/usr.bin/diff/diff.1 index 34658ad69da0..6351c58114e0 100644 --- a/usr.bin/diff/diff.1 +++ b/usr.bin/diff/diff.1 @@ -27,7 +27,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 10, 2022 +.Dd February 26, 2024 .Dt DIFF 1 .Os .Sh NAME From nobody Mon Feb 26 18:21:57 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tk8LN1jfpz5Bvlm; Mon, 26 Feb 2024 18:30:20 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (using TLSv1.3 with cipher TLS_AES_256_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 4Tk8LM6VgPz4pcD; Mon, 26 Feb 2024 18:30:19 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Authentication-Results: mx1.freebsd.org; none Date: Mon, 26 Feb 2024 19:21:57 +0100 Author: Steffen Nurpmeso From: Steffen Nurpmeso To: Emmanuel Vadot Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 6e69612d5df1 - main - pam: Add pam_xdg module Message-ID: <20240226182157.DX4n91EM@steffen%sdaoden.eu> In-Reply-To: <202402261735.41QHZvL1027958@gitrepo.freebsd.org> References: <202402261735.41QHZvL1027958@gitrepo.freebsd.org> Mail-Followup-To: Emmanuel Vadot , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org User-Agent: s-nail v14.9.24-601-g936bf2d4d8 OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. 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:15987, ipnet:217.144.128.0/20, country:DE] X-Rspamd-Queue-Id: 4Tk8LM6VgPz4pcD List-Id: Commit messages for the main 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 |commit 6e69612d5df1c1d5bd86990ea4d9a170c030b292 |Author: Emmanuel Vadot |AuthorDate: 2024-02-21 14:51:05 +0000 |Commit: Emmanuel Vadot |CommitDate: 2024-02-26 17:34:52 +0000 | | pam: Add pam_xdg module Wonderful. Well my pam_xdg (same name, btw) carefully avoids not to unroll the directory removals because of ordering issues and things like modified rights ("w-bit removed") and such. Then again my thing also has to run on Linux and there are containers and namespaces, and in fact Linux PAM effectively runs with different UID and GID, why i also have to play umask and egid games for mkdirat etc. Glad you do not need it! --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) From nobody Mon Feb 26 18:35:31 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tk8SQ06rFz5BwY9; Mon, 26 Feb 2024 18:35:34 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (using TLSv1.3 with cipher TLS_AES_256_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 4Tk8SP3JmDz4qD9; Mon, 26 Feb 2024 18:35:33 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Authentication-Results: mx1.freebsd.org; none Date: Mon, 26 Feb 2024 19:35:31 +0100 Author: Steffen Nurpmeso From: Steffen Nurpmeso To: Shawn Webb Cc: Emmanuel Vadot , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 6e69612d5df1 - main - pam: Add pam_xdg module Message-ID: <20240226183531.WAZIpBUq@steffen%sdaoden.eu> In-Reply-To: <2zwthawswhf5surxumjhhmvqpg6bauwl7ucog5kv3d33bej4ai@tpqxvtitsnt4> References: <202402261735.41QHZvL1027958@gitrepo.freebsd.org> <2zwthawswhf5surxumjhhmvqpg6bauwl7ucog5kv3d33bej4ai@tpqxvtitsnt4> Mail-Followup-To: Shawn Webb , Emmanuel Vadot , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org User-Agent: s-nail v14.9.24-601-g936bf2d4d8 OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. 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:15987, ipnet:217.144.128.0/20, country:DE] X-Rspamd-Queue-Id: 4Tk8SP3JmDz4qD9 List-Id: Commit messages for the main 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 Shawn Webb wrote in <2zwthawswhf5surxumjhhmvqpg6bauwl7ucog5kv3d33bej4ai@tpqxvtitsnt4>: ... |> + /* Setup the session count file */ |> + for (i = 0; i < XDG_MAX_SESSION; i++) { |> + asprintf(&xdg_session_file, "%s/xdg_session.%d", user, i); | |If asprintf fails, xdg_session_file will be NULL. | |> + printf("Trying to open %s\n", xdg_session_file); |> + session_file = openat(rt_dir_prefix, xdg_session_file, \ |> O_CREAT | O_EXCL, RUNTIME_DIR_MODE); | |If xdg_session_file is NULL, there is a NULL pointer dereference |vulnerability in the above call to openat(2). | |> + free(xdg_session_file); |> + if (session_file >= 0) |> + break; | |Thanks, I want to point out again that unless process reaper is handled alongside, PAM sessions are a fragile thing that can be left as easily as "sleep 5 /dev/null 2>&1 &" in a shell. Unfortunately noone cares, but all go systemd, which does all of that. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) From nobody Mon Feb 26 20:08:35 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TkBWt1Lg6z5C4wK for ; Mon, 26 Feb 2024 20:08:42 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TkBWs0b86z44dX for ; Mon, 26 Feb 2024 20:08:41 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hardenedbsd.org header.s=google header.b=Jv8rkO05; dmarc=none; spf=pass (mx1.freebsd.org: domain of shawn.webb@hardenedbsd.org designates 2607:f8b0:4864:20::235 as permitted sender) smtp.mailfrom=shawn.webb@hardenedbsd.org Received: by mail-oi1-x235.google.com with SMTP id 5614622812f47-3c19b79535aso1578749b6e.0 for ; Mon, 26 Feb 2024 12:08:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; t=1708978120; x=1709582920; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=uh+zO0LUTpuFYJffRlExyuTvYKY03hQwGUYtK48SO84=; b=Jv8rkO05xVnnRaT7SBpgStu+tk7CkyuHS1V3sifwHwpoFG300iRybIjvmcxdM7pmjs L/OzXMe7/T+8iLS8IRKJ3ZpLxujz+urpgmGZlGINEiWqNRooW5zN8bdBtUbfG6lINijb 0XyRcdwlG3ajeg65BD5Kc9ZT7RjmLVnwhGqE4MKdAxKGmNWUdyNHTIEHDHjWxgR7woKp Pr6ZMZwQRIrVVqLX5lFC61KKoAAPE5tbrgKYX2e5iiUoTAT3F+NvPeeoYGmpMv77lDCY kDHLZt6Q+Wn848yL6cksgVgxqbAg+6FiUyNxno2kDrJ2gMlAF1FehrEhHEXNKFFFNIoJ KmXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708978120; x=1709582920; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=uh+zO0LUTpuFYJffRlExyuTvYKY03hQwGUYtK48SO84=; b=YYLy6NhKMlu23g9TNuEOmQ9tnZaKOrqfzVOq3ESSwFZ+P2iVl1WF8EkhJDiIYG5/MD L30YksBD+YjWf1isfNJhv4irqKrAe0hZZ2w9iR5xCarvtDyZCck499G3r/uxD+jdc9bQ o7lNmXVVnx23M60mx+lhOxnXr3JrXacyr35mg+NADXLr0LqV5czMYz9JwHkLkVYKsklZ 6UermnH3SFYpT/AIu0tOxrxGeKnippgCMhn7dgV248BqzBtCwRPJBHmoMpW1UHvTCMlY AAUBu+oerFdD22RUWwrEz/PZwpM11L9ihxPhNJgrnyK0FyL/eHMrOnxqksSLYQEmhwZy jfGw== X-Forwarded-Encrypted: i=1; AJvYcCWMXC7FVTPjAJk4aKQ0gofymZXyFUv5sz+wuan8jZigjhlDhtXLY4k6Ozza/bhJyEefkWj4SckooU6s1+9tVsoGrqvAXv60MeZYpEKZcOds6w== X-Gm-Message-State: AOJu0Yw403CGYZAC8JmEjkwoEQ+PLRB75BduR9HrBvIRvKAGw7Bh7O4C My+3JnC807RSUf5J/DI8NZtnhd/xQZWxKDdG/Bp5REQt+kJSHjR9msHDwFurxHE= X-Google-Smtp-Source: AGHT+IGInoimoLmQTJsb2jR823jS+K7+qtGur7e5W7Fhhd/fi1ElyiEXGs+Z1r0+3JQtkbsE4aCC4w== X-Received: by 2002:a05:6808:1286:b0:3c0:3e27:b122 with SMTP id a6-20020a056808128600b003c03e27b122mr159904oiw.39.1708978119774; Mon, 26 Feb 2024 12:08:39 -0800 (PST) Received: from mutt-hbsd (174-24-72-211.clsp.qwest.net. [174.24.72.211]) by smtp.gmail.com with ESMTPSA id s21-20020a05680810d500b003c1973dbca6sm1035304ois.2.2024.02.26.12.08.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 12:08:39 -0800 (PST) Date: Mon, 26 Feb 2024 20:08:35 +0000 From: Shawn Webb To: Emmanuel Vadot Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 6e69612d5df1 - main - pam: Add pam_xdg module Message-ID: X-Operating-System: FreeBSD mutt-hbsd 15.0-CURRENT-HBSD FreeBSD 15.0-CURRENT-HBSD X-PGP-Key: https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/blob/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc References: <202402261735.41QHZvL1027958@gitrepo.freebsd.org> <2zwthawswhf5surxumjhhmvqpg6bauwl7ucog5kv3d33bej4ai@tpqxvtitsnt4> List-Id: Commit messages for the main 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/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="plr4rvdeq7gdc5hf" Content-Disposition: inline In-Reply-To: <2zwthawswhf5surxumjhhmvqpg6bauwl7ucog5kv3d33bej4ai@tpqxvtitsnt4> X-Spamd-Bar: ----- X-Spamd-Result: default: False [-5.10 / 15.00]; SIGNED_PGP(-2.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MID_RHS_NOT_FQDN(0.50)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; R_DKIM_ALLOW(-0.20)[hardenedbsd.org:s=google]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; MISSING_XM_UA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::235:from]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DMARC_NA(0.00)[hardenedbsd.org]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; DKIM_TRACE(0.00)[hardenedbsd.org:+] X-Rspamd-Queue-Id: 4TkBWs0b86z44dX --plr4rvdeq7gdc5hf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 26, 2024 at 06:14:34PM +0000, Shawn Webb wrote: > On Mon, Feb 26, 2024 at 05:35:57PM +0000, Emmanuel Vadot wrote: > > The branch main has been updated by manu: > >=20 > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D6e69612d5df1c1d5bd86990e= a4d9a170c030b292 > >=20 > > commit 6e69612d5df1c1d5bd86990ea4d9a170c030b292 > > Author: Emmanuel Vadot > > AuthorDate: 2024-02-21 14:51:05 +0000 > > Commit: Emmanuel Vadot > > CommitDate: 2024-02-26 17:34:52 +0000 > >=20 > > pam: Add pam_xdg module > > =20 > > This is a module to setup the XDG directories and environment varia= bles. > > For now the only usage is to have a XDG_RUNTIME_DIR environment set= up at > > user login. > > All other environment variable have a default fallback so no need t= o export > > them in this module. > > The directory is created according to the XDG Base directory specif= ication. > > =20 > > The default base directory is /var/run/xdg/ but can be co= nfigured > > using the runtime_dir=3D module option. > > =20 > > According to the spec the directory *must* not survive a reboot so = adding > > var_run_enable=3D"YES" to rc.conf is highly recommanded. > > =20 > > Reviewed by: des, pauamma (manpages) > > Differential Revision: https://reviews.freebsd.org/D44011 > > Sponsored by: Beckhoff Automation GmbH & Co. KG > > --- > > lib/libpam/modules/modules.inc | 1 + > > lib/libpam/modules/pam_xdg/Makefile | 6 + > > lib/libpam/modules/pam_xdg/pam_xdg.8 | 56 +++++++ > > lib/libpam/modules/pam_xdg/pam_xdg.c | 311 +++++++++++++++++++++++++++= ++++++++ > > 4 files changed, 374 insertions(+) >=20 > [snip] >=20 > > diff --git a/lib/libpam/modules/pam_xdg/pam_xdg.c b/lib/libpam/modules/= pam_xdg/pam_xdg.c > > new file mode 100644 > > index 000000000000..40012fe463e0 > > --- /dev/null > > +++ b/lib/libpam/modules/pam_xdg/pam_xdg.c > > @@ -0,0 +1,311 @@ > > +/*- > > + * SPDX-License-Identifier: BSD-2-Clause > > + * > > + * Copyright (c) 2024 Beckhoff Automation GmbH & Co. KG > > + * > > + * Redistribution and use in source and binary forms, with or without > > + * modification, are permitted provided that the following conditions > > + * are met: > > + * 1. Redistributions of source code must retain the above copyright > > + * notice, this list of conditions and the following disclaimer. > > + * 2. Redistributions in binary form must reproduce the above copyright > > + * notice, this list of conditions and the following disclaimer in = the > > + * documentation and/or other materials provided with the distribut= ion. > > + * > > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' = AND > > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, T= HE > > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR = PURPOSE > > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LI= ABLE > > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQ= UENTIAL > > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE G= OODS > > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTIO= N) > > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,= STRICT > > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN A= NY 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 > > + > > +#define PAM_SM_SESSION > > + > > +#include > > +#include > > +#include > > + > > +#define BASE_RUNTIME_DIR_PREFIX "/var/run/xdg" > > +#define RUNTIME_DIR_PREFIX runtime_dir_prefix !=3D NULL ? runtime_dir_= prefix : BASE_RUNTIME_DIR_PREFIX > > + > > +#define RUNTIME_DIR_PREFIX_MODE 0711 > > +#define RUNTIME_DIR_MODE 0700 /* XDG spec */ > > + > > +#define XDG_MAX_SESSION 100 /* Arbitrary limit because we need one */ > > + > > +static int > > +_pam_xdg_open(pam_handle_t *pamh, int flags __unused, > > + int argc __unused, const char *argv[] __unused) > > +{ > > + struct passwd *passwd; > > + const char *user; > > + const char *runtime_dir_prefix; > > + struct stat sb; > > + char *runtime_dir =3D NULL; > > + char *xdg_session_file; > > + int rv, rt_dir_prefix, rt_dir, session_file, i; > > + > > + session_file =3D -1; > > + rt_dir_prefix =3D -1; > > + runtime_dir_prefix =3D openpam_get_option(pamh, "runtime_dir_prefix"); > > + > > + /* Get user info */ > > + rv =3D pam_get_item(pamh, PAM_USER, (const void **)&user); > > + if (rv !=3D PAM_SUCCESS) { > > + PAM_VERBOSE_ERROR("Can't get user information"); > > + goto out; > > + } > > + if ((passwd =3D getpwnam(user)) =3D=3D NULL) { > > + PAM_VERBOSE_ERROR("Can't get user information"); > > + rv =3D PAM_SESSION_ERR; > > + goto out; > > + } > > + > > + /* Open or create the base xdg directory */ > > + rt_dir_prefix =3D open(RUNTIME_DIR_PREFIX, O_DIRECTORY | O_NOFOLLOW); > > + if (rt_dir_prefix < 0) { > > + rt_dir_prefix =3D mkdir(RUNTIME_DIR_PREFIX, RUNTIME_DIR_PREFIX_MODE); > > + if (rt_dir_prefix !=3D 0) { > > + PAM_VERBOSE_ERROR("Can't mkdir %s", RUNTIME_DIR_PREFIX); > > + rv =3D PAM_SESSION_ERR; > > + goto out; > > + } > > + rt_dir_prefix =3D open(RUNTIME_DIR_PREFIX, O_DIRECTORY | O_NOFOLLOW); > > + } > > + > > + /* Open or create the user xdg directory */ > > + rt_dir =3D openat(rt_dir_prefix, user, O_DIRECTORY | O_NOFOLLOW); > > + if (rt_dir < 0) { > > + rt_dir =3D mkdirat(rt_dir_prefix, user, RUNTIME_DIR_MODE); > > + if (rt_dir !=3D 0) { > > + PAM_VERBOSE_ERROR("mkdir: %s/%s (%d)", RUNTIME_DIR_PREFIX, user, rt= _dir); > > + rv =3D PAM_SESSION_ERR; > > + goto out; > > + } > > + rv =3D fchownat(rt_dir_prefix, user, passwd->pw_uid, passwd->pw_gid,= 0); > > + if (rv !=3D 0) { > > + PAM_VERBOSE_ERROR("fchownat: %s/%s (%d)", RUNTIME_DIR_PREFIX, user,= rv); > > + rv =3D unlinkat(rt_dir_prefix, user, AT_REMOVEDIR); > > + if (rv =3D=3D -1) > > + PAM_VERBOSE_ERROR("unlinkat: %s/%s (%d)", RUNTIME_DIR_PREFIX, user= , errno); > > + rv =3D PAM_SESSION_ERR; > > + goto out; > > + } > > + } else { > > + /* Check that the already create dir is correctly owned */ > > + rv =3D fstatat(rt_dir_prefix, user, &sb, 0); > > + if (rv =3D=3D -1) { > > + PAM_VERBOSE_ERROR("fstatat %s/%s failed (%d)", RUNTIME_DIR_PREFIX, = user, errno); > > + rv =3D PAM_SESSION_ERR; > > + goto out; > > + } > > + if (sb.st_uid !=3D passwd->pw_uid || > > + sb.st_gid !=3D passwd->pw_gid) { > > + PAM_VERBOSE_ERROR("%s/%s isn't owned by %d:%d\n", RUNTIME_DIR_PREFI= X, user, passwd->pw_uid, passwd->pw_gid); > > + rv =3D PAM_SESSION_ERR; > > + goto out; > > + } > > + /* Test directory mode */ > > + if ((sb.st_mode & 0x1FF) !=3D RUNTIME_DIR_MODE) { > > + PAM_VERBOSE_ERROR("%s/%s have wrong mode\n", RUNTIME_DIR_PREFIX, us= er); > > + rv =3D PAM_SESSION_ERR; > > + goto out; > > + } > > + } > > + > > + /* Setup the environment variable */ > > + asprintf(&runtime_dir, "XDG_RUNTIME_DIR=3D%s/%s", RUNTIME_DIR_PREFIX,= user); > > + rv =3D pam_putenv(pamh, runtime_dir); > > + if (rv !=3D PAM_SUCCESS) { > > + PAM_VERBOSE_ERROR("pam_putenv: failed (%d)", rv); > > + rv =3D PAM_SESSION_ERR; > > + goto out; > > + } > > + > > + /* Setup the session count file */ > > + for (i =3D 0; i < XDG_MAX_SESSION; i++) { > > + asprintf(&xdg_session_file, "%s/xdg_session.%d", user, i); >=20 > If asprintf fails, xdg_session_file will be NULL. >=20 > > + printf("Trying to open %s\n", xdg_session_file); > > + session_file =3D openat(rt_dir_prefix, xdg_session_file, O_CREAT | O= _EXCL, RUNTIME_DIR_MODE); >=20 > If xdg_session_file is NULL, there is a NULL pointer dereference > vulnerability in the above call to openat(2). >=20 > > + free(xdg_session_file); > > + if (session_file >=3D 0) > > + break; >=20 Fixed in HardenedBSD: https://git.hardenedbsd.org/hardenedbsd/HardenedBSD/-/commit/0b5bf32630b342= 9e0b5a321e6621a404dc93ecc5 But in that commit, I made a typo, which was subsequently fixed here: https://git.hardenedbsd.org/hardenedbsd/HardenedBSD/-/commit/865994a5cf2093= 7224bde0662bb1f96ba18e072f Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD Tor-ified Signal: +1 303-901-1600 https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A= 4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --plr4rvdeq7gdc5hf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmXc77sACgkQ/y5nonf4 4frNBxAAkD4MulAP10MfCQAhQBseqbNnfElzhn+7QE2fH+wClhcYbURgpui86mA6 jGaJ+pneopM8Q/NdTVfcXodi0fSQaDMBCgwL1ojquuvlOmQ3HJQHYHZMnrnCQfYl KajJJFwcGgy9ZCjCSvcfIFluSjPfFdgQR8uzSf11w7Pum3tAbmju2n7b3/NZT7Z9 MmLSxWHA0loTNnsHnafa7Ita2h9oM+PbIT+EDk2745IjFqbjFo+q/0jCwgYA2sQ6 pNQhPQdd6Ik5lDc58xLPEwoCKI2eM7TsrYUdp0uOTmZ68yuL+8PNLhKlaFdP8dt2 WHk3wee1OGyGuHEKOYSZCwBnt7BFQMcXXXx9VmQtW95kp9bA7om0hQERQJzMifML JuUk9Z9bovK+HBdO1zoaenNHs8ZJyTyYs2lXn1Z8ldnOEU9I85F1Nmr0S4geMRdu VgOMNumYr7O8M9XkCV6FuQ/vvmL3rjQ9A25umYzcxYZlnU1YKxOGCHBnIa3vas5U OQJuJ4rnUWKiCknQptn+VAiu90jHz1GtGDsSa/VjUe5KRb+vbkA85JDtwhhDjRPx QEzG8fEqYUS68GT/k8KXtVR3XM0OAzrVV89miW9cFX8C3reTtADCb09Z49f8qqnq d9gulgLiMrYsPby5XArVR6NltlYXpU9vG2jBFtVyk4xabiRJJJk= =4zqP -----END PGP SIGNATURE----- --plr4rvdeq7gdc5hf-- From nobody Mon Feb 26 20:13:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TkBdd1fLdz5C5VF; Mon, 26 Feb 2024 20:13: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 4TkBdd0ttwz45P7; Mon, 26 Feb 2024 20:13:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708978421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RuJ972vOX1OLfiq0tTtdO1hQ1tIlLLB253PI4LzAqJE=; b=RuPO8FeuyKjIytCkV1NDH3Spy2TzweLmi1pjvy7fc9ZNwwfuyIV09KZ34YFD0jpvDgHPDo C9p+Pu6Vy3iVEu8ntra8GpAcd3aHlG7QrugHlGJneFSnWSgPreaMxX+fjRX6u1MDLh9IV0 Is44Da7p+7T50heBTtsP6iq6yv743MdU69fGJJfhgj16oSwDoq0ukF9OL1CYYoaSI3DYJe EFaqzDMBX0UMQMyWrUCQ2a1L4l7U64OMu+7hsQtGQLNa5qakR9+sFm1QHlYv69bnQwyesc xd5j/wLmMAEeQLPJv5YzBVCv4eKqGfQFLhA/zc0MOIEXA+USNAh64Lqb7ePkHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708978421; a=rsa-sha256; cv=none; b=q7YYgTUxt9qop2Os0JnOCPPRViiRirk/PVHyGKGYnKrUvpk/PoeUgmsVTeyf28CQFjEung KPWwO0Vg9wagYcIT1MlqBZOxCQu1nzu6ZWvcX5jpg/KtJGenhue585+npDbQmr1Q/yaO3w 0HD7Fyh8pEnC3YPAbm+QexFYZXy2N5TaAOdnvso0I04aJKvQxANEalFjroo6/2m6woKhSn hlYiUaKFiopQBPwttf6eoyHpy1rwrSFSJtebBlgik635RiRoOJ6Igy7a+VOr+4yLMUyKoT bR8Bh4Iz4VI/wwTDOvyCQSAwU2o/UWGCgXrBGHH4CYXK8qxTOoldQhW2HSx1tA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708978421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RuJ972vOX1OLfiq0tTtdO1hQ1tIlLLB253PI4LzAqJE=; b=BB3EW3NmLoLc8gZB4sQGraU4JNR+g5dShqIrwlgqiI2R1RYMxYhX4bAN1swbET86b2oDpD UhnPcYTlLdm8n8UelvTTafrbtcCv9d6Sv5z2T00F+1z5CyegorOuC1fvrIrzMedWBmcrlE ZVjTOLhQ6Y74QZ3IlwZnUObmavj2RYs3X3s4LjhZF0cZr8ejGaVd+lGUkFDTO7QBWBapMW mZqJY5dGfhYu1frWVOCRXFS1mcvU4WkRI4Ma2EdwUaboR8hX52kpPLTqd32PIoqaakd0Ee tNizS7UuF3Zjf2/36hLP0sdxyf1Kp0pjZbTzfNB0oPJDRGXGEWVOWQpKNnMy1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TkBdc73Tyzj79; Mon, 26 Feb 2024 20:13: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 41QKDeGG004301; Mon, 26 Feb 2024 20:13:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41QKDeuN004298; Mon, 26 Feb 2024 20:13:40 GMT (envelope-from git) Date: Mon, 26 Feb 2024 20:13:40 GMT Message-Id: <202402262013.41QKDeuN004298@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: 975d7730828a - main - kern: fix panic with disabled ttys List-Id: Commit messages for the main 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: 975d7730828a8bde28c2a0092b6e95c4c4e22f34 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=975d7730828a8bde28c2a0092b6e95c4c4e22f34 commit 975d7730828a8bde28c2a0092b6e95c4c4e22f34 Author: Ed Maste AuthorDate: 2024-02-26 15:38:45 +0000 Commit: Ed Maste CommitDate: 2024-02-26 20:11:27 +0000 kern: fix panic with disabled ttys PR: 277240, 277329 Reviewed by: kib (earlier version) Fixes: f1d0a0cbecf2 ("jail: Fix information leak.") MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D44086 --- sys/kern/tty.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/kern/tty.c b/sys/kern/tty.c index ba20f5727829..b6e300321e9c 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1315,7 +1315,8 @@ sysctl_kern_ttys(SYSCTL_HANDLER_ARGS) struct xtty *xtlist, *xt; struct tty *tp; struct proc *p; - int cansee, error; + int error; + bool cansee; sx_slock(&tty_list_sx); lsize = tty_list_count * sizeof(struct xtty); @@ -1328,8 +1329,8 @@ sysctl_kern_ttys(SYSCTL_HANDLER_ARGS) TAILQ_FOREACH(tp, &tty_list, t_list) { tty_lock(tp); - if (tp->t_session != NULL) { - p = tp->t_session->s_leader; + if (tp->t_session != NULL && + (p = atomic_load_ptr(&tp->t_session->s_leader)) != NULL) { PROC_LOCK(p); cansee = (p_cansee(td, p) == 0); PROC_UNLOCK(p); From nobody Mon Feb 26 22:34:06 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TkFlf2H9hz5BpCC; Mon, 26 Feb 2024 22:34: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 4TkFlf1nQ7z4Ptv; Mon, 26 Feb 2024 22:34:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708986846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eFB4yk8Oi5Be9j18J0oOvvu2nSTGfIbiHKU8RMrpLmY=; b=Y2VyNy2fMQc2dZqRNgkhSB9LN3oCKI9B7uPnxL0hpuqINlr0hRhetHEGtJXH2q1trgvEyP 21PdTx7kDAHJwcOTMYNILvYtk/0g+dG20mp6NVF6gvZQsquJZ7Jdbsh6oG5Z/by9JIE0x9 uNcC3ZDNQm9TqHM4OiAxCbSMFSrCK2987/hUE++9mUdCcY6tiAnVIzb7RBUsW0baJp89eU m+buK+fDwJczHM2+K5yBZHlBzSmm3Vpm4ZT4IpzpnXmpstRi6uhhFqGSjZ0y6jUsg0RwGi 9O00Zpqy9IjbN3/PW5DAH5u9Bd+83bgP7LEdm/t2P73oS+FzIvKQaJFCLSDMOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708986846; a=rsa-sha256; cv=none; b=wd60duVvYwckOMrsplKGfgoT6UZTIj4KcvvWgxu8HDMdfWhsg8UAbyb9OFZeZXlF4kIWyU Eqf5/oiouSsPVSmwsWAYqOmcWEqyZAcPKrbWH7DBjny1dfdYZ26JJoj9QmiEAMqVXJZY61 d08qoPWR9Qnn7u1D2GmfntdBkMcImm/h6Uq3XwKm8Sszb2STu770swoOl4CHTZw8NL6MPJ faTjfaiMw0yLAWAKCIiLIZknmDtyC+EPkZYX7d1xZUt+5xro91vMVK9w5AUf2ukszrL3Hz 2FlWfzN+7oZL5D6Ig7SJpO/gu/PTY3lSnkwcNF8swmsixyjRVim1Gzy9IqPvVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708986846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eFB4yk8Oi5Be9j18J0oOvvu2nSTGfIbiHKU8RMrpLmY=; b=wloEG3PV/6oR6qyyzuyL9V5XZpBxpKwiS/z6IIg7tS+2xucIsS/YXgdePtM4Cg+zET3NnQ exEZ43Vb6Omx1n0AuXQyyYLCtv4oE+kXqWFk5qxpR75JdRBI2JOYkubeOF8TZpAtprYJTu 9boE+KQJf8K927VRqZvxfrMbJIGaunnA0mYtLJ268yYdzsX5gkRaB5t0mFTP20Qpw6zeRH gsm6UIZ7rQoQ/Sy8se7nZOQU8Vuk083x6E/uQJfqh0Ir2BTcAqz07DgAeFfieryjqfbrNE r7QvF+SpKDPpyczApX8hIsKaTTY05Hs7uJPuzOUnPjHKz1z72e/mcfvqc2B6Qw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TkFlf0s5LzmNF; Mon, 26 Feb 2024 22:34: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 41QMY6D3043393; Mon, 26 Feb 2024 22:34:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41QMY6cS043390; Mon, 26 Feb 2024 22:34:06 GMT (envelope-from git) Date: Mon, 26 Feb 2024 22:34:06 GMT Message-Id: <202402262234.41QMY6cS043390@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Stefan =?utf-8?Q?E=C3=9Fer?= Subject: git: 7b77d37a561b - main - rtld-elf: support either byte-order of hints file List-Id: Commit messages for the main 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: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7b77d37a561b47db093a2528b8032dbfe5791698 Auto-Submitted: auto-generated The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=7b77d37a561b47db093a2528b8032dbfe5791698 commit 7b77d37a561b47db093a2528b8032dbfe5791698 Author: Stefan Eßer AuthorDate: 2024-02-26 22:18:12 +0000 Commit: Stefan Eßer CommitDate: 2024-02-26 22:18:12 +0000 rtld-elf: support either byte-order of hints file Accept either little-endian or big-endian representation of the ELF hints magic number in the header of a hints file and convert the parameters to the native byte-order of the repsective system. This is a pre-requisite for a planned change to always write the byte order in little-endian format on all architectures. The only relvant architecture that uses big-endian data is powerpc64, and it is not likely that new architectures will choose that representation of data in memory. When all supported architectures use little-endian data in the hints file, the byte swap logic can be enabled for big-endian CPUs at compile time. Up to that point, there is a very small run-time penalty that is paid on all systems to check the byte-order of the hints file and to provide the option to byte-swap the parameters read from the hints file header. This commit contains the changes from review D44080 (which had been split off from this patch for easier review), Reviewed by: kib MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D44053 --- libexec/rtld-elf/rtld.c | 76 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 60 insertions(+), 16 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 30ed48b5c615..4b6d19104343 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -2050,6 +2050,9 @@ find_symdef(unsigned long symnum, const Obj_Entry *refobj, return (def); } +/* Convert between native byte order and forced little resp. big endian. */ +#define COND_SWAP(n) (is_le ? le32toh(n) : be32toh(n)) + /* * Return the search path from the ldconfig hints file, reading it if * necessary. If nostdlib is true, then the default search paths are @@ -2073,6 +2076,12 @@ gethints(bool nostdlib) int fd; size_t flen; uint32_t dl; + uint32_t magic; /* Magic number */ + uint32_t version; /* File version (1) */ + uint32_t strtab; /* Offset of string table in file */ + uint32_t dirlist; /* Offset of directory list in string table */ + uint32_t dirlistlen; /* strlen(dirlist) */ + bool is_le; bool skip; /* First call, read the hints file */ @@ -2080,8 +2089,10 @@ gethints(bool nostdlib) /* Keep from trying again in case the hints file is bad. */ hints = ""; - if ((fd = open(ld_elf_hints_path, O_RDONLY | O_CLOEXEC)) == -1) + if ((fd = open(ld_elf_hints_path, O_RDONLY | O_CLOEXEC)) == -1) { + dbg("failed to open hints file \"%s\"", ld_elf_hints_path); return (NULL); + } /* * Check of hdr.dirlistlen value against type limit @@ -2089,29 +2100,62 @@ gethints(bool nostdlib) * paranoia leads to checks that dirlist is fully * contained in the file range. */ - if (read(fd, &hdr, sizeof hdr) != sizeof hdr || - hdr.magic != ELFHINTS_MAGIC || - hdr.version != 1 || hdr.dirlistlen > UINT_MAX / 2 || - fstat(fd, &hint_stat) == -1) { + if (read(fd, &hdr, sizeof hdr) != sizeof hdr) { + dbg("failed to read %lu bytes from hints file \"%s\"", + (u_long)sizeof hdr, ld_elf_hints_path); cleanup1: close(fd); hdr.dirlistlen = 0; return (NULL); } - dl = hdr.strtab; - if (dl + hdr.dirlist < dl) + is_le = /*le32toh(1) == 1 || */ hdr.magic == ELFHINTS_MAGIC; + magic = COND_SWAP(hdr.magic); + version = COND_SWAP(hdr.version); + strtab = COND_SWAP(hdr.strtab); + dirlist = COND_SWAP(hdr.dirlist); + dirlistlen = COND_SWAP(hdr.dirlistlen); + if (magic != ELFHINTS_MAGIC) { + dbg("invalid magic number %#08x (expected: %#08x)", + magic, ELFHINTS_MAGIC); goto cleanup1; - dl += hdr.dirlist; - if (dl + hdr.dirlistlen < dl) + } + if (version != 1) { + dbg("hints file version %d (expected: 1)", version); goto cleanup1; - dl += hdr.dirlistlen; - if (dl > hint_stat.st_size) + } + if (dirlistlen > UINT_MAX / 2) { + dbg("directory list is to long: %d > %d", + dirlistlen, UINT_MAX / 2); goto cleanup1; - p = xmalloc(hdr.dirlistlen + 1); - if (pread(fd, p, hdr.dirlistlen + 1, - hdr.strtab + hdr.dirlist) != (ssize_t)hdr.dirlistlen + 1 || - p[hdr.dirlistlen] != '\0') { + } + if (fstat(fd, &hint_stat) == -1) { + dbg("failed to find length of hints file \"%s\"", + ld_elf_hints_path); + goto cleanup1; + } + dl = strtab; + if (dl + dirlist < dl) { + dbg("invalid string table position %d", dl); + goto cleanup1; + } + dl += dirlist; + if (dl + dirlistlen < dl) { + dbg("invalid directory list offset %d", dirlist); + goto cleanup1; + } + dl += dirlistlen; + if (dl > hint_stat.st_size) { + dbg("hints file \"%s\" is truncated (%d vs. %jd bytes)", + ld_elf_hints_path, dl, (uintmax_t)hint_stat.st_size); + goto cleanup1; + } + p = xmalloc(dirlistlen + 1); + if (pread(fd, p, dirlistlen + 1, + strtab + dirlist) != (ssize_t)dirlistlen + 1 || + p[dirlistlen] != '\0') { free(p); + dbg("failed to read %d bytes starting at %d from hints file \"%s\"", + dirlistlen + 1, strtab + dirlist, ld_elf_hints_path); goto cleanup1; } hints = p; @@ -2174,7 +2218,7 @@ cleanup1: */ fndx = 0; fcount = 0; - filtered_path = xmalloc(hdr.dirlistlen + 1); + filtered_path = xmalloc(dirlistlen + 1); hintpath = &hintinfo->dls_serpath[0]; for (hintndx = 0; hintndx < hmeta.dls_cnt; hintndx++, hintpath++) { skip = false; From nobody Mon Feb 26 23:17:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TkGjM4YYHz5Bt6b; Mon, 26 Feb 2024 23:17: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 4TkGjM44Tzz4T4p; Mon, 26 Feb 2024 23:17:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708989431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7qs1Zwhh2D9uFZXFrJVkTCjCZEXLODPDjgZa9pOfiXM=; b=Taru1yzHScxYRnjl7GXZtyGEaFdzihpZ3rrkip/3W9M0InolZuKtkX+P2ADMFVWAVAjusz j00XXQyZXRyFsVvVxZEaLwFkkjF7IOWgvqhPoVXRqeVAixF/zmY8L50KupJvbjpaPYnUsx l0VXTXvF8vTMV78S0IJxDacesID5jAuv/HWQqdGY85U+HK2Y4Y7ceAD3fvie5xNISqedv3 0PiOEN7G/eVSDua8zxIrNz1prjsXJ8nstBczauzZnvcJO/7tW6B+bPr6AKCrC5q1RYE6AC C2hjRfZEogaVAYOG7AeRd4Nlf7rIrxwGAVHWUvIYwnnAT3YWmeByGdnAXSAfSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708989431; a=rsa-sha256; cv=none; b=ymiC7zRSr3MIuGUr8VCC/EEBjO+auo1mo2LE0lEJadS8AxrwZtbek923pQrgAJ7J0VaT09 eftMVW2bb856QkM3cVRowpLOaSGm4pUC4a3vvit5UbU1o3v1/M1a+33atri1Elkob9I4/u vSZfgye2j7E5KjL8AUUj6qXexNEyjb8AyniBz//38ophAGZ292PntIIIyfI9rH2ciL71tu Pd89+8FpD9Ii/0j579YEAUOWpkoPOIUuTIuKUAhJIsTVK4tq/q6uRincqMMdb2OplOvuS7 oAhk36e/XA4Cfhho9UCi8CKfIkRdGiRzYe4d2IntvrOobTSmLzkGV99Ds2cwWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708989431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7qs1Zwhh2D9uFZXFrJVkTCjCZEXLODPDjgZa9pOfiXM=; b=pd58VZvEZGxg+mwl/rhzTaE9jMktJjCyffF3adh2zRNZkqwCtv4HvQi8Qw1/1Xzi7kW3MZ przfjq1Tzr6RW2+FfhJEJ7yHUxqAwXPKcYPga8t/NqyWwM1/emsZQASJo4kCRGDsCUAIGz fWfg5rBOx+z4ynlHzY5Y/ZqIcAsbvk1BFDhfpAVzb1s1FEDNONfiQqihmIBT4hSRmOcEOh VVdhnwSmT2iKT+21d8ilTVxgA+lJJZgyrM5xAxIyCzZl6bJumDEHRIhKvFHyLT4V3MSErR 047PnbPm/p4nqy/BzfjuIhtZeoqhh3LUKYTTt2V2LhjDpdSliXaWAcowY+6s3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TkGjM33GLznS6; Mon, 26 Feb 2024 23:17: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 41QNHB8Z012264; Mon, 26 Feb 2024 23:17:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41QNHBZa012261; Mon, 26 Feb 2024 23:17:11 GMT (envelope-from git) Date: Mon, 26 Feb 2024 23:17:11 GMT Message-Id: <202402262317.41QNHBZa012261@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: bc4c7e78f845 - main - ofwdump: Convert ints that are booleans to bool. List-Id: Commit messages for the main 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: bc4c7e78f84577c33bec6c1a4ab60e99560a4bf7 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=bc4c7e78f84577c33bec6c1a4ab60e99560a4bf7 commit bc4c7e78f84577c33bec6c1a4ab60e99560a4bf7 Author: Warner Losh AuthorDate: 2024-02-26 23:14:53 +0000 Commit: Warner Losh CommitDate: 2024-02-26 23:15:55 +0000 ofwdump: Convert ints that are booleans to bool. No functional changes... Sponsored by: Netflix --- usr.sbin/ofwdump/ofwdump.c | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/usr.sbin/ofwdump/ofwdump.c b/usr.sbin/ofwdump/ofwdump.c index f2bcad8b7c1f..335ae38afa5d 100644 --- a/usr.sbin/ofwdump/ofwdump.c +++ b/usr.sbin/ofwdump/ofwdump.c @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -47,10 +48,10 @@ static void usage(void); static void ofw_indent(int); -static void ofw_dump_properties(int, phandle_t, int, int, int); +static void ofw_dump_properties(int, phandle_t, int, bool, bool); static void ofw_dump_property(int fd, phandle_t n, int level, - const char *prop, int raw, int str); -static void ofw_dump(int, const char *, int, int, const char *, int, int); + const char *prop, bool raw, bool str); +static void ofw_dump(int, const char *, bool, bool, const char *, bool, bool); static void usage(void) @@ -66,42 +67,42 @@ int main(int argc, char *argv[]) { int opt, i, fd; - int aflag, pflag, rflag, Rflag, Sflag; + bool aflag, pflag, rflag, Rflag, Sflag; char *Parg; - aflag = pflag = rflag = Rflag = Sflag = 0; + aflag = pflag = rflag = Rflag = Sflag = false; Parg = NULL; while ((opt = getopt(argc, argv, "-aprP:RS")) != -1) { if (opt == '-') break; switch (opt) { case 'a': - aflag = 1; - rflag = 1; + aflag = true; + rflag = true; break; case 'p': if (Parg != NULL) usage(); - pflag = 1; + pflag = true; break; case 'r': - rflag = 1; + rflag = true; break; case 'P': if (pflag) usage(); - pflag = 1; + pflag = true; Parg = optarg; break; case 'R': if (Sflag) usage(); - Rflag = 1; + Rflag = true; break; case 'S': if (Rflag) usage(); - Sflag = 1; + Sflag = true; break; case '?': default: @@ -139,7 +140,7 @@ ofw_indent(int level) } static void -ofw_dump_properties(int fd, phandle_t n, int level, int raw, int str) +ofw_dump_properties(int fd, phandle_t n, int level, bool raw, bool str) { int nlen; char prop[OFIOCSUGGPROPNAMELEN]; @@ -150,8 +151,8 @@ ofw_dump_properties(int fd, phandle_t n, int level, int raw, int str) } static void -ofw_dump_property(int fd, phandle_t n, int level, const char *prop, int raw, - int str) +ofw_dump_property(int fd, phandle_t n, int level, const char *prop, bool raw, + bool str) { static void *pbuf = NULL; static char *visbuf = NULL; @@ -207,7 +208,7 @@ ofw_dump_property(int fd, phandle_t n, int level, const char *prop, int raw, static void ofw_dump_node(int fd, phandle_t n, int level, int rec, int prop, - const char *pmatch, int raw, int str) + const char *pmatch, bool raw, bool str) { static void *nbuf = NULL; static int nblen = 0; @@ -238,8 +239,8 @@ ofw_dump_node(int fd, phandle_t n, int level, int rec, int prop, } static void -ofw_dump(int fd, const char *start, int rec, int prop, const char *pmatch, - int raw, int str) +ofw_dump(int fd, const char *start, bool rec, bool prop, const char *pmatch, + bool raw, bool str) { phandle_t n; From nobody Mon Feb 26 23:29:29 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TkGzY3gr2z5Bv2H; Mon, 26 Feb 2024 23: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 4TkGzY2qJgz4YBJ; Mon, 26 Feb 2024 23:29:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708990169; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n4m3elA+1cGepddmTPNjNAfgfvheY3BAqnYZqGQQink=; b=lzpCp2Ui7jABTvhX6BlWI/Lc1xeRRrNzA1HN9yq7kvaUWAgUW86y7pFXLEbYCoe6Xk3VQQ 84YvBD7Umet27dO4mTUO2G1vtlDKocoqwzvBBaiTaIdARLOV2ObnnsKiXbVNpbtcKwRaLR IS/HkM0ZHklwsP1LIpUaqK29noag4gNsYUjVRShocLZ5DfoCEVEAwjoJEA14M2sR2r7fGw QwiJQWFw2xlG6y/OtRttBdQhwaMh8FbamZ+rh+/UXquX5cpKFL4Ikwf0gV7/lUiW7CO15w pC/eVinUrTbTJZNq8UFKLjC/bvXKHofY5jDpGzN+KkrP/3e3KfcAUDvw/2CO1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708990169; a=rsa-sha256; cv=none; b=tJo2T6niQmnHhsXbqHs1Wwq8KpGoq7qLpLoXd+H5lYuO4naX+VqPmt6JJOPdOccN8DmcCR lv2Jfge1ZOq/UbblPI1bU2D2L4uyfEPgljm60VjK5sp1fu47GOdq2zMJkHIkqN6tLTwwYH u9Hj+ithOfPMgPn6euuen6/SvMbwxfMkz+pUQhGBzpZ0d30AyBlVyEdZy6mttU5jiGMQ3V kTvkUTL8pPCZ8sVn/HiuUeIgP74+XPC5f9Hy33ESul4Cnf5krAOoPVdokqHZUSrqzSQidx BaCy+WTATwTNnSDu9BrCblyLv+siItswiKmD2xhGzc2Q8Kd4IHKJ9vHbE6dbmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708990169; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n4m3elA+1cGepddmTPNjNAfgfvheY3BAqnYZqGQQink=; b=LGQiFkW/ZisawYF8NMtCa46RMID6jBwBowqa8gUY74Pm8TDjjPYDZTOkf+TXaNipgBRBj2 hFEUKdDPkEXlbY4mpGts8rEiTKIC5mGgaC0tsVTjyJzdH3Ogt/n692I9BCBk+97Q3NwlII DEko8Kv87YoEh6T9QM1CDmumJguf5OM/oPkYRUu/GqvLkpdiT5H38IFmCoYdASs7bxbWK7 BXWZ1f43NgI5+PcPFZ2fP++7BNvHhecHXiAU4zYjkvs4bZfAsVmdYbNmndAoDn8PVgtces 1TH6dqwK1bK8TIl3DiT9C+mEEsz+O0VRmK0R/mHKJrbK/siIIZEeh4+bA2850w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TkGzY1v08zp7S; Mon, 26 Feb 2024 23:29:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41QNTTQ6030561; Mon, 26 Feb 2024 23:29:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41QNTTdM030558; Mon, 26 Feb 2024 23:29:29 GMT (envelope-from git) Date: Mon, 26 Feb 2024 23:29:29 GMT Message-Id: <202402262329.41QNTTdM030558@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: a9341f0f0ae0 - main - snd_uaudio(4): Fix sample rate selection after 42fdcd9fd917. List-Id: Commit messages for the main 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a9341f0f0ae01b4d249dbf3bacfa420152c46aef Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=a9341f0f0ae01b4d249dbf3bacfa420152c46aef commit a9341f0f0ae01b4d249dbf3bacfa420152c46aef Author: Florian Walpen AuthorDate: 2024-02-26 23:27:47 +0000 Commit: Christos Margiolis CommitDate: 2024-02-26 23:27:47 +0000 snd_uaudio(4): Fix sample rate selection after 42fdcd9fd917. The sample rate selection of snd_uaudio(4) at runtime was implicitly relying on a specific order in the device config list. In case a default was set through the hw.usb.uaudio.default_rate sysctl tunable, commit 42fdcd9fd917 removed a duplicate sample rate entry from that list, which inadvertently broke sample rate selection at runtime. Implement sample rate selection in a way that works for any order in the device config list. Reported by: Lexi Winter MFC after: 1 week Reviewed by: christos Differential Revision: https://reviews.freebsd.org/D44051 --- sys/dev/sound/usb/uaudio.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index 26d95bf3ee9f..5d7396c527e0 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -2768,20 +2768,19 @@ int uaudio_chan_set_param_speed(struct uaudio_chan *ch, uint32_t speed) { struct uaudio_softc *sc; - uint8_t x; + uint8_t x, y; sc = ch->priv_sc; - for (x = 0; x < ch->num_alt; x++) { - if (ch->usb_alt[x].sample_rate < speed) { - /* sample rate is too low */ - break; - } + for (x = 0, y = 1; y < ch->num_alt; y++) { + /* prefer sample rate closer to and greater than requested */ + if ((ch->usb_alt[x].sample_rate < speed && + ch->usb_alt[x].sample_rate < ch->usb_alt[y].sample_rate) || + (speed <= ch->usb_alt[y].sample_rate && + ch->usb_alt[y].sample_rate < ch->usb_alt[x].sample_rate)) + x = y; } - if (x != 0) - x--; - usb_proc_explore_lock(sc->sc_udev); ch->set_alt = x; usb_proc_explore_unlock(sc->sc_udev); From nobody Mon Feb 26 23:29:30 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TkGzZ4nvMz5Bv6m; Mon, 26 Feb 2024 23:29: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 4TkGzZ3nYtz4YPq; Mon, 26 Feb 2024 23:29:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708990170; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MYip/eBHqTzisa91/O86j1UUJxS5uwjXN5b+WSE0PVc=; b=xvSmVzJrwf6hrvuePB7AW2cNf9sQeMr4r0Bt9YJjTUCOi+tmR3IlJjZAbjnzqwGShnr2Iu pXO4wAEsxQ/kyQCVCpCoBgN0ltY0oPq0HY7BEpz0XGe4ygajofYzr02U0exSkj0wy3gFgF /AYF9veu0T2MDivwd1tHacafOH1ejo0sYUe8fBK3H3jWDbSVKxLon0a4YQrFndJttyt/MN 15VDLvXipvkYFUJfp3VSq/XgdhAjT+ixZeJwoxlqFgjlSCOPh1Ps5gGzmq/LPjSKZi5W9p N4C9pslNUUcvc+uCnbpyK6Ew+XypDybDNLSLrG0/QgW4jbFZx9DYeZb7HuuSkw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708990170; a=rsa-sha256; cv=none; b=yKwXDZGqQLsB7h/yQP2lVeEC1eMHlFE/cdWkFMpckIe/PJ4cGf4oq8ZEjcqTUIkZeqdg1l 91oFUY2iwb4/R6/xA/GXF+Q4H9+Wn96hBmdET+BXvJ0LClxtNnUVBSuMFyPFUJ1sI0foVu AzHlwK4wUpBc6AUaLkwBnL4y6+1krckfoNARGiBtjYGqybzH6AoBGcffgJXFR7zes4b9lT H1gL5bt4jZ53ewCs48km4Fpyh8du8f3qP4TtnFaZQeqalO5hiF7DANmamVVoh7NNfY4NtM 4qNft4zdMUpSyckkU2GiiR0ofstFwew+H+K4h2owH7eZ2LpZQpaqD7kGMQW3wA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708990170; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MYip/eBHqTzisa91/O86j1UUJxS5uwjXN5b+WSE0PVc=; b=rkbFLxQXDU7Y+wAE/OQJv7o/r/r7VDLBjC6qWTGkshgp4HPPXtBBRn2Y/GMUoBV/kXmd85 XynLXQX5L6A4DBCUKlgq3FjEx+0pYIADvxuTsLBgtkgwHhulxfKTJJfMiYBmcz6US4zNB6 J8uOv0aIRAXQ5GlSfwTJqxpRNr/3j/NhoRTu0Lu4skAq619o9RMvjNrnRGUJhIKNhKU7du nMpi4z00sGf/KCaYN5jhLCnaD5dYKichVhGutcx4x1TtIgPOKjhpqG47ohBGgmDWul+xtm ECcEBBhJyWvmYbp+jJm6RzLxoQ2MAhVleeFzTxUYtHWe9tE8cZHUZsEAEm98fg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TkGzZ2rYpzp7T; Mon, 26 Feb 2024 23:29: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 41QNTUYD030602; Mon, 26 Feb 2024 23:29:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41QNTUam030599; Mon, 26 Feb 2024 23:29:30 GMT (envelope-from git) Date: Mon, 26 Feb 2024 23:29:30 GMT Message-Id: <202402262329.41QNTUam030599@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 8bfb23abf882 - main - pcm.4: Fix lint warnings List-Id: Commit messages for the main 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8bfb23abf882afdca0a0530ef1231ac59963bc4a Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=8bfb23abf882afdca0a0530ef1231ac59963bc4a commit 8bfb23abf882afdca0a0530ef1231ac59963bc4a Author: Christos Margiolis AuthorDate: 2024-02-26 23:28:53 +0000 Commit: Christos Margiolis CommitDate: 2024-02-26 23:28:53 +0000 pcm.4: Fix lint warnings Ignore the "manual not found" warnings for snd_ai2s(4) and snd_davbus(4). Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43996 --- share/man/man4/pcm.4 | 97 ++++++++++++++++++---------------------------------- 1 file changed, 33 insertions(+), 64 deletions(-) diff --git a/share/man/man4/pcm.4 b/share/man/man4/pcm.4 index 54efd86a2b52..cd0d29519f0c 100644 --- a/share/man/man4/pcm.4 +++ b/share/man/man4/pcm.4 @@ -167,16 +167,16 @@ This will mute the input channel per default. Multichannel audio, popularly referred to as .Dq surround sound is supported and enabled by default. -The FreeBSD multichannel matrix processor supports up to 18 interleaved -channels, but the limit is currently set to 8 channels (as commonly used -for 7.1 surround sound). +The +.Fx +multichannel matrix processor supports up to 18 interleaved channels, but the +limit is currently set to 8 channels (as commonly used for 7.1 surround sound). The internal matrix mapping can handle reduction, expansion or re-routing of channels. This provides a base interface for related multichannel .Fn ioctl support. -Multichannel audio works both with and without -.Tn VCHANs . +Multichannel audio works both with and without VCHANs. .Pp Most bridge device drivers are still missing multichannel matrixing support, but in most cases this should be trivial to implement. @@ -202,21 +202,18 @@ tunable. Each device can optionally support more playback and recording channels than physical hardware provides by using .Dq virtual channels -or -.Tn VCHANs . -.Tn VCHAN -options can be configured via the +or VCHANs. +VCHAN options can be configured via the .Xr sysctl 8 interface but can only be manipulated while the device is inactive. .Ss VPC -FreeBSD supports independent and individual volume controls for each active +.Fx +supports independent and individual volume controls for each active application, without touching the master .Nm volume. This is sometimes referred to as Volume Per Channel (VPC). -The -.Tn VPC -feature is enabled by default. +The VPC feature is enabled by default. .Ss Loader Tunables The following loader tunables are used to set driver configuration at the .Xr loader 8 @@ -238,12 +235,9 @@ Enabling this will make bass and treble controls appear in mixer applications. This tunable is undefined by default. Equalizing is disabled by default. .It Va hint.pcm.%d.vpc -Set to 1 or 0 to explicitly enable (1) or disable (0) the -.Tn VPC -feature. +Set to 1 or 0 to explicitly enable (1) or disable (0) the VPC feature. This tunable is undefined by default. -.Tn VPC -is however enabled by default. +VPC is however enabled by default. .El .Ss Runtime Configuration There are a number of @@ -365,16 +359,12 @@ in possible underruns if the application cannot keep up with a rapid irq rate, especially during high workload. The default value is 1, which is considered a moderate/safe latency profile. .It Va hw.snd.maxautovchans -Global -.Tn VCHAN -setting that only affects devices with at least one playback or recording channel available. -The sound system will dynamically create up to this many -.Tn VCHANs . +Global VCHAN setting that only affects devices with at least one playback or +recording channel available. +The sound system will dynamically create up to this many VCHANs. Set to .Dq 0 -if no -.Tn VCHANs -are desired. +if no VCHANs are desired. Maximum value is 256. .It Va hw.snd.report_soft_formats Controls the internal format conversion if it is @@ -419,13 +409,11 @@ This means that any changes to the volume will be lost. Enabling this will preserve the volume, at the cost of possible confusion when applications tries to re-open the same device. .It Va hw.snd.vpc_mixer_bypass -The recommended way to use the -.Tn VPC -feature is to teach applications to use -the correct +The recommended way to use the VPC feature is to teach applications to use the +correct .Fn ioctl : -.Dv SNDCTL_DSP_GETPLAYVOL, SNDCTL_DSP_SETPLAYVOL, -.Dv SNDCTL_DSP_SETRECVOL, SNDCTL_DSP_SETRECVOL. +.Dv SNDCTL_DSP_GETPLAYVOL , SNDCTL_DSP_SETPLAYVOL , +.Dv SNDCTL_DSP_SETRECVOL , SNDCTL_DSP_SETRECVOL . This is however not always possible. Enable this to allow applications to use their own existing mixer logic to control their own channel volume. @@ -438,30 +426,19 @@ matrixing, rate converting and equalizing. The pure .Nm stream will be fed directly to the hardware. -If -.Tn VCHANs -are enabled, the bitperfect mode will use the -.Tn VCHAN -format/rate as the definitive format/rate target. -The recommended way to use bitperfect mode is to disable -.Tn VCHANs -and enable this sysctl. +If VCHANs are enabled, the bitperfect mode will use the VCHAN format/rate as +the definitive format/rate target. +The recommended way to use bitperfect mode is to disable VCHANs and enable this +sysctl. Default is disabled. .It Va dev.pcm.%d.[play|rec].vchans -The current number of -.Tn VCHANs -allocated per device. -This can be set to preallocate a certain number of -.Tn VCHANs . +The current number of VCHANs allocated per device. +This can be set to preallocate a certain number of VCHANs. Setting this value to .Dq 0 -will disable -.Tn VCHANs -for this device. +will disable VCHANs for this device. .It Va dev.pcm.%d.[play|rec].vchanformat -Format for -.Tn VCHAN -mixing. +Format for VCHAN mixing. All playback paths will be converted to this format before the mixing process begins. By default only 2 channels are enabled. @@ -491,8 +468,7 @@ Quadraphonic, 4 channels (front/rear left and right). 8 channels (4.0 + center + LFE + left and right side). .El .It Va dev.pcm.%d.[play|rec].vchanmode -.Tn VCHAN -format/rate selection. +VCHAN format/rate selection. Available options include: .Bl -tag -width 2n .It fixed @@ -527,9 +503,7 @@ The downside is that the hardware DMA mode needs to be restarted, which may cause annoying pops or clicks. .El .It Va dev.pcm.%d.[play|rec].vchanrate -Sample rate speed for -.Tn VCHAN -mixing. +Sample rate speed for VCHAN mixing. All playback paths will be converted to this sample rate before the mixing process begins. .It Va dev.pcm.%d.polling @@ -552,17 +526,12 @@ Channel statistics are only kept while the device is open. So with situations involving overruns and underruns, consider the output while the errant application is open and running. .Ss IOCTL Support -The driver supports most of the -.Tn OSS +The driver supports most of the OSS .Fn ioctl functions, and most applications work unmodified. A few differences exist, while memory mapped playback is -supported natively and in -.Tn Linux -emulation, memory mapped recording is -not due to -.Tn VM -system design. +supported natively and in Linux emulation, memory mapped recording is not due +to VM system design. As a consequence, some applications may need to be recompiled with a slightly modified audio module. See From nobody Tue Feb 27 01:28:41 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TkKd86RsJz5C6v1 for ; Tue, 27 Feb 2024 01:28:44 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) (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 4TkKd84fMyz4qQM for ; Tue, 27 Feb 2024 01:28:44 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Authentication-Results: mx1.freebsd.org; none Received: by mail-ot1-x32d.google.com with SMTP id 46e09a7af769-6dc8b280155so2751791a34.0 for ; Mon, 26 Feb 2024 17:28:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; t=1708997323; x=1709602123; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=uKMpjW3WPqEDuTWn5P+YAgn1Dx9IWUWnlK2oRNiLvDI=; b=Cn32LGzafhNbubrQxSYsoVwaqJrSTAk+bfCuGIJLmC367+eiCvReptPo7OBYr1fuz8 PzhGfkt3090SzoXQZaP+TNCg1mWInJt1pJGUpBVjg0EY2oCgtQgauBdAn59NSSv9bivx y3uW1/qnWU4uw+oX7mXi8E/+vrjeP2vhPcHCbMJuaX7l8TxqCR+HTt6L4WYNrRarjN7m PbkLi5fqrN9jp8eufXfr8gXO8/144mQIeLdMFw+5ze0WCatLy/uOESM99Q+dPJSMtrlf pUnGU8Jws3GoJ4Qb/frtUVXGOo6g62JFUDOJo0EBS4uDScDeIS7LeiLZtlWhrhX6Msw+ FnUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708997323; x=1709602123; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=uKMpjW3WPqEDuTWn5P+YAgn1Dx9IWUWnlK2oRNiLvDI=; b=CHl2s64pnitcineLOZ3wA7487zOy+NQ+EukD4NHMvqEvYPzkAuPTIlLX2pOdt7SXZo 8YG0YpLmT/Yh6z8It884hE273lAT4H86dCrx8O6T7Im60TW4dMbzKqoIHFRHXopo6y6L ND7axalzKSGejgZaYuCvAbBn+f0QYvr0GTt64rRvyNJWyXIqLBN/ge23dn1REpJzaOOM 2FlmXb2Jc/3ehZ9yCffk+a4DTktesJLvxNrfHYt2f3MPQfe+Xnp/RZegl2123vGxGyw5 5SXXPgATGAU/6SnXNtnJ0g28xNlr+P2q1cfD/9XMNCJQr6hv19pJTT3pFPlGn4Rsg/ku +GOg== X-Forwarded-Encrypted: i=1; AJvYcCVVVW2KchF+ITHdbapPO0GH+AWs5Yds9Lb7oZmQguWh7kw4ckfJzvchNAidl4zXxQKYXdyYtdXIGr39fsmB78BY/KUr4SEul0S+LDQCSl1sag== X-Gm-Message-State: AOJu0YzcKyYXeGONuJ88JPluZTfRQ7dNBVbYvvbo04IRyb5naY73q5Tf GMVcphegTKPS6A56NR8cxZqmZLf4snYX6BLjU4FQwKSXGvk2MvWbgqTCnpjPovA= X-Google-Smtp-Source: AGHT+IFBk0DURbCX5j6gkkXY9zcqW/A6qTu+Zyd6JGvPboz7L9btI0dQFIdAXpNWDB7XZqJ9wP/Phw== X-Received: by 2002:a05:6830:1b69:b0:6e4:738c:a034 with SMTP id d9-20020a0568301b6900b006e4738ca034mr8349661ote.27.1708997323391; Mon, 26 Feb 2024 17:28:43 -0800 (PST) Received: from mutt-hbsd (174-24-72-211.clsp.qwest.net. [174.24.72.211]) by smtp.gmail.com with ESMTPSA id k24-20020a4a8518000000b0059a975f3b8esm1474140ooh.33.2024.02.26.17.28.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 17:28:42 -0800 (PST) Date: Tue, 27 Feb 2024 01:28:41 +0000 From: Shawn Webb To: Emmanuel Vadot Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 6e69612d5df1 - main - pam: Add pam_xdg module Message-ID: X-Operating-System: FreeBSD mutt-hbsd 15.0-CURRENT-HBSD FreeBSD 15.0-CURRENT-HBSD X-PGP-Key: https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/blob/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc References: <202402261735.41QHZvL1027958@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: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cfvii5ondjlkuq5a" Content-Disposition: inline In-Reply-To: <202402261735.41QHZvL1027958@gitrepo.freebsd.org> X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4TkKd84fMyz4qQM --cfvii5ondjlkuq5a Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 26, 2024 at 05:35:57PM +0000, Emmanuel Vadot wrote: > The branch main has been updated by manu: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3D6e69612d5df1c1d5bd86990ea4= d9a170c030b292 >=20 > commit 6e69612d5df1c1d5bd86990ea4d9a170c030b292 > Author: Emmanuel Vadot > AuthorDate: 2024-02-21 14:51:05 +0000 > Commit: Emmanuel Vadot > CommitDate: 2024-02-26 17:34:52 +0000 >=20 > pam: Add pam_xdg module > =20 > This is a module to setup the XDG directories and environment variabl= es. > For now the only usage is to have a XDG_RUNTIME_DIR environment setup= at > user login. > All other environment variable have a default fallback so no need to = export > them in this module. > The directory is created according to the XDG Base directory specific= ation. > =20 > The default base directory is /var/run/xdg/ but can be conf= igured > using the runtime_dir=3D module option. > =20 > According to the spec the directory *must* not survive a reboot so ad= ding > var_run_enable=3D"YES" to rc.conf is highly recommanded. > =20 > Reviewed by: des, pauamma (manpages) > Differential Revision: https://reviews.freebsd.org/D44011 > Sponsored by: Beckhoff Automation GmbH & Co. KG > --- > lib/libpam/modules/modules.inc | 1 + > lib/libpam/modules/pam_xdg/Makefile | 6 + > lib/libpam/modules/pam_xdg/pam_xdg.8 | 56 +++++++ > lib/libpam/modules/pam_xdg/pam_xdg.c | 311 +++++++++++++++++++++++++++++= ++++++ > 4 files changed, 374 insertions(+) [snip] > + > +static int > +remove_dir(int fd) > +{ > + DIR *dirp; > + struct dirent *dp; > + > + dirp =3D fdopendir(fd); > + if (dirp =3D=3D NULL) > + return (-1); > + > + while ((dp =3D readdir(dirp)) !=3D NULL) { > + if (dp->d_type =3D=3D DT_DIR) { > + int dirfd; > + > + if (strcmp(dp->d_name, ".") =3D=3D 0 || > + strcmp(dp->d_name, "..") =3D=3D 0) > + continue; > + dirfd =3D openat(fd, dp->d_name, 0); > + remove_dir(dirfd); A defensive programming technique commonly implemented in functions that recurse is to place a limit on how many times we recurse. HardenedBSD now places an arbitrarily picked limit of 1000 recursions: https://git.hardenedbsd.org/hardenedbsd/HardenedBSD/-/commit/148478d5743a8d= d4362fd31dca4371618716d0a8 The limit can be changed at compile-time by defining REMOVEDIR_MAX_RECUR to a different integer value. Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD Tor-ified Signal: +1 303-901-1600 https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A= 4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --cfvii5ondjlkuq5a Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmXdOsIACgkQ/y5nonf4 4fpgDg/+KNMG0ZfLWcQsMGSGaEM/BD08Z92jxfnrklQGnRz3N6GhurdcHfoGVP9x Bq4hbAMhX7USQ1W4VWDELiadUitlzBKOewvCsZOjRvhjGTUN9LHVe+CJXgMACHWZ KKORR/bE5Sy/M4tQPFPLC80yaLKwy6WlNFRd9rwz01Q6z4PIXe3+OHdzmTvdR8Hu cWv77h56P4274GLk9M8q/3IrNgBVp3euG/wqML8MvNrY49Ki2yv8OupahOQOtqQh l/FDsBRLJaHlrDUnfqjdh54LwFAHVhYlfcC2CFX/+YYH+/7WOPmCwMg3fp1j+KzI LD7FZoWdYl51job3+w4tDryoA7g/gqeOcZXVvs0+nQ8hKXb4Ps9h5UwTeXuU2cVt I9XLaBM+qM1AohZK4iWsscrLA+OCUesO7r5OAOc8DK3JPA28ehJPqv1gqytCNfTQ bMYTHVSCNopg4aAlI7mvpSJuCMdST29JFPFdWXx6e8vbs4sWT8NtfY/HtJasw9im B8eiGJPO/8glbRo9VFi5zTd7fcuiyxKE4LK/IEaALksF+VVN23fIK5NHcQlu/4Ph fh7vmvcAdj0FpmhNvLoLmL+ez3lIdRB4QytOPbfVKICNrzaTO79cVUs23ivUrJ9A dOfM5fU9Zee9yl1p4pp4GvcErqU86oQx9icoV8yIk0G+nr0SCBI= =J1BL -----END PGP SIGNATURE----- --cfvii5ondjlkuq5a-- From nobody Tue Feb 27 03:50:16 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TkNmT1wwdz5CLrt; Tue, 27 Feb 2024 03:50: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 4TkNmT0tdFz47qm; Tue, 27 Feb 2024 03:50:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709005817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P2Xj0RqDxN/DWwlRryINQBcfGF3YRs6jpQTcvt2jrJU=; b=es6EmSJAeV7i4j097DUBCkVFJbRfopbSnvSnv1QJtM6SGPM6p07nK6Camu+KsCC58y6pJ8 /ECAsnj92CogjYipGuvyDPs1BdEvxZ+x4pU0dvzc7uma+jGXx2dzx2GWKd6pgGNfX2sHIZ 0i5k2bZOzY5LVXVOmrZOLAvXOCYobfu4eNZ3thkTO1zl+bfCSmcm9/TCfEvzcfLlWyAeUS CnjN6sOUAkn2MANsoyFtDw4cGbTBOg4ZfCaqP/aLX2qzw2KjNSJqnnNo7GDSIOfNPCw3wR dyP+d43XxRlP6W71lDqFQNgjS+/3cwdDRq6NkJgZnc3J1qTHV6CdAUyO36dWIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709005817; a=rsa-sha256; cv=none; b=rFU16UcPzUZJnjxVCl1sptWH3+d8WIWo5pUC0rGb5DXNOn2tDgtb+UDvbsCSmxMYJT6H5H t284hN9TSeOUdNAnGiwmG29LPMGb67rvi0Y54B2MRPR5yqNKd5NThRfyHBkHX6sFx1WPYY Gn9Mo01owK/K/1OpOhUC5Hi5yP9rHWdhAYJtpXgaYU2Rj9bdIPHwJFRJLODeZw5aTHNqOo 4rTMu5NmUr1yFJVudk/hMY4ZuIZW1e7WL4Fur4EiEDB7v663niRE8Y6JaSoxBjOmiRYY6f KDAWLw7UuIHP/5keZFWYjE6lQiDzT1jf3blNeCFyydm2ChlGD37XtvsSpR0S9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709005817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P2Xj0RqDxN/DWwlRryINQBcfGF3YRs6jpQTcvt2jrJU=; b=GNNU05i8UF//pSOYg0VaIrjQH9KSHGLiYE40bI0xX42PC0bJ7GPP1LbGLZmbO5BFGG8t42 QSq7QL5EWGjC/R9d22kIKpTgfIWm/+NsYOCfPyqwFzG1iooK0TLztR+IrW8qCLMgvVskAp uvdspPhn1vBz9BdmY62pmz5dlbb8TY/QHNxyjZRktW/KeFfGFKKZ/MKyF3/Giz+0ZRRYWY iy6vHPGh/z62oIZsATRDK+lBKcz9AjTv+/koFEwq/mML7+YJ3SM1NxdZeI/85IMQFUPcM6 tXCAZdvTdKrs9ff/2GxlsTy+GBn5q9CzqkUIyMIHUVWc36rsXy4MdlBJ1p73FQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TkNmS73QjzwmP; Tue, 27 Feb 2024 03:50: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 41R3oGp9079553; Tue, 27 Feb 2024 03:50:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41R3oGEc079548; Tue, 27 Feb 2024 03:50:16 GMT (envelope-from git) Date: Tue, 27 Feb 2024 03:50:16 GMT Message-Id: <202402270350.41R3oGEc079548@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: 9398a495eb30 - main - loader: Add loader.exit List-Id: Commit messages for the main 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: 9398a495eb305d5bf240bc998ee2f6128d75f4ca Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9398a495eb305d5bf240bc998ee2f6128d75f4ca commit 9398a495eb305d5bf240bc998ee2f6128d75f4ca Author: Warner Losh AuthorDate: 2024-02-27 03:19:58 +0000 Commit: Warner Losh CommitDate: 2024-02-27 03:49:46 +0000 loader: Add loader.exit Add loader.exit(status). While one can get alomst this behavior with loader.perform("quit"), quit doesn't allow a value to be returned to the firmware. The interpretation of 'status' is firmware specific. This can be used when autobooting doesn't work in scripts, for example, to allow the firmware to try something else... Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D44094 --- stand/liblua/lutils.c | 16 ++++++++++++---- stand/lua/loader.lua.8 | 4 ++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/stand/liblua/lutils.c b/stand/liblua/lutils.c index 0be9f5f28ac3..874dc8bf7d5d 100644 --- a/stand/liblua/lutils.c +++ b/stand/liblua/lutils.c @@ -109,6 +109,13 @@ lua_perform(lua_State *L) return 1; } +static int +lua_exit(lua_State *L) +{ + exit(luaL_checkinteger(L, 1)); + return 0; +} + static int lua_command_error(lua_State *L) { @@ -380,14 +387,15 @@ lua_writefile(lua_State *L) #define REG_SIMPLE(n) { #n, lua_ ## n } static const struct luaL_Reg loaderlib[] = { - REG_SIMPLE(delay), - REG_SIMPLE(command_error), REG_SIMPLE(command), - REG_SIMPLE(interpret), - REG_SIMPLE(parse), + REG_SIMPLE(command_error), + REG_SIMPLE(delay), + REG_SIMPLE(exit), REG_SIMPLE(getenv), REG_SIMPLE(has_command), REG_SIMPLE(has_feature), + REG_SIMPLE(interpret), + REG_SIMPLE(parse), REG_SIMPLE(perform), REG_SIMPLE(printc), /* Also registered as the global 'printc' */ REG_SIMPLE(setenv), diff --git a/stand/lua/loader.lua.8 b/stand/lua/loader.lua.8 index ff3b91ddfb09..e5aee7e8602d 100644 --- a/stand/lua/loader.lua.8 +++ b/stand/lua/loader.lua.8 @@ -61,6 +61,10 @@ Returns the error string from the last command to fail. Like .Fn perform but the arguments are already parsed onto the stack. +.It Fn exit status +Exit the boot loader back to the firmware with a status of +.Va status . +The interpretation of this value is firmware specific. .It Fn interpret str Execute the loader builtin command .Va str From nobody Tue Feb 27 06:42:59 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TkSbl5Cq6z5Cb2H; Tue, 27 Feb 2024 06:42: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 4TkSbl4gjBz4T62; Tue, 27 Feb 2024 06:42:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709016179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eKKSIah0qanpACwqWEAHgLrYF8RA4cpiT7I7Wd04su4=; b=jo27OnoNnFKMTBf8BgJ4tXqXNQfz5V8TYfek/l2Z+Hv0ZM5u94ktC6Ok8HDZqw+yFxYUV2 WdZtJ6ilf4jeG9It9LMExF291/IvhVDLjAB9mGHt8NiH+AwfhjHmL9ntXfSd7EgaoJxKV5 dXzLn4c+vattMoXl5apybmTB9780K9vkIAZy0yLAZHrjt3sj+1H/LgeOTEJsqN2N405A0+ 1IjUhX1L88UdrwLfEgrGwi/fKtA3kvzpMiY3HxQy29DF+cCzfbSoyYQTp3u6g3UhfCzS6E OjQL2lMIJr1VsWTLZgT/exlwcOap4XaGeUAagSYkFY68Xk6QljBrIQwTfdBs9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709016179; a=rsa-sha256; cv=none; b=BWTI9NU/N6MxsAMqoSxeS2ozL1MVY+2omq0ON/fjmPedSmDdsTzJrGrmluJXNtUV29/MR4 H+uG8aWH2+YtmpKbBISm7LA8KnwEI69LVito9MpOZ/j7fFE+HoNiixtDt6AMz7yHDWnf9H upZwHfDfmMo5DoXJzIumaxI85XBsnPww0Fe2RcF72wCeSKpPK0COHNClAroayCjcV1EDIW Olrtx2BeTWMjXbcWoyiD7gFNzMO2XEIpKHz2iRXoBVpnqxDXASDZfH0E4PzzcEq9Yp4xmK 6mxUHvmcNzmvTJ0vZKKBkNcKtTHMdlw9GEsdeN8QBdOJdXnllSTDjUXwx7nh6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709016179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eKKSIah0qanpACwqWEAHgLrYF8RA4cpiT7I7Wd04su4=; b=GD/TJKB7Okwwav//aEeNM8Sy3cPCuQ21YDBHpcj17CxUqrDUG/Z8/zbpdJF+/YawGVnLI9 CxdvSvFFfTB5+fHs7VUNSZKpRmx1dUQ+mOJxeH2/s0J9xTdzdYrRYFCsx6Ztyv28+tCNrg ygJ4Qc1sKfxh6gCiq3yvVMCF7ukVY2KKzzjziTe6i1zClig52iIzd/AUqNjWJOMJYUCIQ9 bMwBS7bLC2bWQ9D7W2p4lS3ZlWJiVdaKQLwXELqS7CRjMyom9S9Yb8p5LUor2FFkvRZpzK RQ+7Dg4bvwAlMeV98BJC7DD1BAIwnfbcOIBM6H0HzKTzZViGm3X3u2eY8gEyVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TkSbl3kscz11yl; Tue, 27 Feb 2024 06:42: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 41R6gxmQ074257; Tue, 27 Feb 2024 06:42:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41R6gxZ6074254; Tue, 27 Feb 2024 06:42:59 GMT (envelope-from git) Date: Tue, 27 Feb 2024 06:42:59 GMT Message-Id: <202402270642.41R6gxZ6074254@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 84329908c522 - main - pam_xdg: Remove leftover debug printf List-Id: Commit messages for the main 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 84329908c522b428e4dc858a9bac769117927cd3 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=84329908c522b428e4dc858a9bac769117927cd3 commit 84329908c522b428e4dc858a9bac769117927cd3 Author: Emmanuel Vadot AuthorDate: 2024-02-27 06:39:13 +0000 Commit: Emmanuel Vadot CommitDate: 2024-02-27 06:42:47 +0000 pam_xdg: Remove leftover debug printf Sponsored by: Beckhoff Automation GmbH & Co. KG Fixes: 6e69612d5df1 ("pam: Add pam_xdg module") --- lib/libpam/modules/pam_xdg/pam_xdg.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/libpam/modules/pam_xdg/pam_xdg.c b/lib/libpam/modules/pam_xdg/pam_xdg.c index 40012fe463e0..d218bc0425f2 100644 --- a/lib/libpam/modules/pam_xdg/pam_xdg.c +++ b/lib/libpam/modules/pam_xdg/pam_xdg.c @@ -141,7 +141,6 @@ _pam_xdg_open(pam_handle_t *pamh, int flags __unused, /* Setup the session count file */ for (i = 0; i < XDG_MAX_SESSION; i++) { asprintf(&xdg_session_file, "%s/xdg_session.%d", user, i); - printf("Trying to open %s\n", xdg_session_file); session_file = openat(rt_dir_prefix, xdg_session_file, O_CREAT | O_EXCL, RUNTIME_DIR_MODE); free(xdg_session_file); if (session_file >= 0) From nobody Tue Feb 27 06:43:00 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TkSbm6Z6Rz5CZpB; Tue, 27 Feb 2024 06:43: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 4TkSbm5cVgz4TNK; Tue, 27 Feb 2024 06:43:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709016180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ByypU4Nk1p/18UtF5C3sWtdaVtNVqwlibQqh4+b1r9U=; b=E+A0gwhUdVA6NlgCbHsCDO+S+ZIgKjUo8aNAB7ZeSj3M3rYM+I0DtsbqGI/aDp2U34PtvG sLuxJM/tpxiSaNmiCzFPfzgibedx3val1IIzlNRS0BYHohC50FRI2ui7r6no96+Rjp2Sj6 0d/oaXj130V/MbUvgn2l7SdtxQPI+81BFyxOv1KY9PeR4MZ38y5sCZlnDaQVmSWJAPlORp 5qqiAUbXqv04BeNjYwUpa85xQQNnrzcO1dxd9z2LTpEToSqoZ75faTCn1h9PepJ4SRv9aY UEa3GdbrwxWMIypNv2zhyYlRwMZ9HsU1rl44zyVEjpjsZQcmM+CVIhhdO3yx/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709016180; a=rsa-sha256; cv=none; b=EXQsn3SYC25p7RZH43mKH1Jw71vCcuNp+BbK5jvhJtYFRu5D7G2Bi6RXnvc9Ey8t/+R8lY ui4HMDf4/ZvlpaVEL7N78yfF0IOnlZLx29uVtE7+yx7864nkf/9f4vQ/99k+SegTTEjYPv tDw/ub4zFnd/OU/e7rvcRagpsT2ALGR3b/+KNj3XC5ggcjR05lRHpuhMuwXlVjEAdVXV2B xXD3SMaZKoBTQBH+1I3qSs5nnfprXWamx8Opy7sfUoVWOuKgdVxH3Bjyg6QNUNldaTd8wy po+u9Jh3jKLefa7qWRKPXwWTwpCm2vRxsf4HYQQDv43HxlQ5tdCdFrBN0X3HtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709016180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ByypU4Nk1p/18UtF5C3sWtdaVtNVqwlibQqh4+b1r9U=; b=K88ZB3q/V+HIqaEtg7Iekwm+3Orsyro+UpWOOkTOLBRjZnUT7WjlUTJt1dkp4ApLYVspL+ TyqTaB4865LrMNYToGO8rYRu1XRM3qqbETyBs0rH4LAHFA77lYPiP03LxthVNiLduHs5RQ gnXw1qToIii6TDl0Dl/8VJqKV4UqJLYNBFVE37DorF9fEngJRVxbKG/PzNDP6rZ9Yt++02 ycBGJsV2yydtov6PSmzUXLmg95+f+6G+4WTt7tzJlSEqmYx/pKh7I9UqCqt8e8ywqPf04x aeMay9x6fJZ2eZ7ehUHYZg67RQghOql0VdzvIN6FDX3z03mRhHvPPVTUbie+Gg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TkSbm4kMWz11XM; Tue, 27 Feb 2024 06:43: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 41R6h0FD074305; Tue, 27 Feb 2024 06:43:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41R6h0XM074302; Tue, 27 Feb 2024 06:43:00 GMT (envelope-from git) Date: Tue, 27 Feb 2024 06:43:00 GMT Message-Id: <202402270643.41R6h0XM074302@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 2d2950c88933 - main - pam_xdg: Check asprintf return value List-Id: Commit messages for the main 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2d2950c889335b24af7a92f3aaf9946de47bb0bc Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=2d2950c889335b24af7a92f3aaf9946de47bb0bc commit 2d2950c889335b24af7a92f3aaf9946de47bb0bc Author: Emmanuel Vadot AuthorDate: 2024-02-27 06:41:59 +0000 Commit: Emmanuel Vadot CommitDate: 2024-02-27 06:42:47 +0000 pam_xdg: Check asprintf return value Reported by: Shawn Webb Sponsored by: Beckhoff Automation GmbH & Co. KG Fixes: 6e69612d5df1 ("pam: Add pam_xdg module") --- lib/libpam/modules/pam_xdg/pam_xdg.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/lib/libpam/modules/pam_xdg/pam_xdg.c b/lib/libpam/modules/pam_xdg/pam_xdg.c index d218bc0425f2..d8ba6899da2f 100644 --- a/lib/libpam/modules/pam_xdg/pam_xdg.c +++ b/lib/libpam/modules/pam_xdg/pam_xdg.c @@ -130,7 +130,12 @@ _pam_xdg_open(pam_handle_t *pamh, int flags __unused, } /* Setup the environment variable */ - asprintf(&runtime_dir, "XDG_RUNTIME_DIR=%s/%s", RUNTIME_DIR_PREFIX, user); + rv = asprintf(&runtime_dir, "XDG_RUNTIME_DIR=%s/%s", RUNTIME_DIR_PREFIX, user); + if (rv < 0) { + PAM_VERBOSE_ERROR("asprintf failed %d\n", rv); + rv = PAM_SESSION_ERR; + goto out; + } rv = pam_putenv(pamh, runtime_dir); if (rv != PAM_SUCCESS) { PAM_VERBOSE_ERROR("pam_putenv: failed (%d)", rv); @@ -140,7 +145,12 @@ _pam_xdg_open(pam_handle_t *pamh, int flags __unused, /* Setup the session count file */ for (i = 0; i < XDG_MAX_SESSION; i++) { - asprintf(&xdg_session_file, "%s/xdg_session.%d", user, i); + rv = asprintf(&xdg_session_file, "%s/xdg_session.%d", user, i); + if (rv < 0) { + PAM_VERBOSE_ERROR("asprintf failed %d\n", rv); + rv = PAM_SESSION_ERR; + goto out; + } session_file = openat(rt_dir_prefix, xdg_session_file, O_CREAT | O_EXCL, RUNTIME_DIR_MODE); free(xdg_session_file); if (session_file >= 0) @@ -256,7 +266,12 @@ _pam_xdg_close(pam_handle_t *pamh __unused, int flags __unused, /* Get the last session file created */ for (i = XDG_MAX_SESSION; i >= 0; i--) { - asprintf(&xdg_session_file, "%s/xdg_session.%d", user, i); + rv = asprintf(&xdg_session_file, "%s/xdg_session.%d", user, i); + if (rv < 0) { + PAM_VERBOSE_ERROR("asprintf failed %d\n", rv); + rv = PAM_SESSION_ERR; + goto out; + } session_file = openat(rt_dir_prefix, xdg_session_file, 0); if (session_file >= 0) { unlinkat(rt_dir_prefix, xdg_session_file, 0); From nobody Tue Feb 27 06:44:17 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TkSdT3wGnz5CbFN; Tue, 27 Feb 2024 06:44:29 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_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 4TkSdS5q5gz4VCj; Tue, 27 Feb 2024 06:44:28 +0000 (UTC) (envelope-from manu@bidouilliste.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1709016260; 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=ah2Nk6f3Domio0py0DQ2lbAwW/kbpEDQBiU7LmFv4qQ=; b=iKcJWJlvQlGI4CiUfrTX1T8JcLmBOtbzgnma8o8iltc4vhlgAjCBvFvih7fMzoh+BQQncX /LQ45u6ZXt48GGxu2LJ5RgCJhkXI74BJHWMWpllwNIrLGLdpmoVnzWapCEBXRhj7qlqiNc 4qTRpuLeE8ZFAgg89aXd1vmjqBFytQI= Received: from skull.home.blih.net (lfbn-lyo-1-2174-135.w90-66.abo.wanadoo.fr [90.66.97.135]) by mx.blih.net (OpenSMTPD) with ESMTPSA id fb94078a (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 27 Feb 2024 06:44:19 +0000 (UTC) Date: Tue, 27 Feb 2024 07:44:17 +0100 From: Emmanuel Vadot To: Shawn Webb Cc: Emmanuel Vadot , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 6e69612d5df1 - main - pam: Add pam_xdg module Message-Id: <20240227074417.cdb7dac6abd23c5118fba558@bidouilliste.com> In-Reply-To: <2zwthawswhf5surxumjhhmvqpg6bauwl7ucog5kv3d33bej4ai@tpqxvtitsnt4> References: <202402261735.41QHZvL1027958@gitrepo.freebsd.org> <2zwthawswhf5surxumjhhmvqpg6bauwl7ucog5kv3d33bej4ai@tpqxvtitsnt4> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd15.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=US-ASCII Content-Transfer-Encoding: 7bit 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:12876, ipnet:212.83.128.0/19, country:FR] X-Rspamd-Queue-Id: 4TkSdS5q5gz4VCj Hi Shawn, On Mon, 26 Feb 2024 18:14:34 +0000 Shawn Webb wrote: > On Mon, Feb 26, 2024 at 05:35:57PM +0000, Emmanuel Vadot wrote: > > The branch main has been updated by manu: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=6e69612d5df1c1d5bd86990ea4d9a170c030b292 > > > > commit 6e69612d5df1c1d5bd86990ea4d9a170c030b292 > > Author: Emmanuel Vadot > > AuthorDate: 2024-02-21 14:51:05 +0000 > > Commit: Emmanuel Vadot > > CommitDate: 2024-02-26 17:34:52 +0000 > > > > pam: Add pam_xdg module > > > > This is a module to setup the XDG directories and environment variables. > > For now the only usage is to have a XDG_RUNTIME_DIR environment setup at > > user login. > > All other environment variable have a default fallback so no need to export > > them in this module. > > The directory is created according to the XDG Base directory specification. > > > > The default base directory is /var/run/xdg/ but can be configured > > using the runtime_dir= module option. > > > > According to the spec the directory *must* not survive a reboot so adding > > var_run_enable="YES" to rc.conf is highly recommanded. > > > > Reviewed by: des, pauamma (manpages) > > Differential Revision: https://reviews.freebsd.org/D44011 > > Sponsored by: Beckhoff Automation GmbH & Co. KG > > --- > > lib/libpam/modules/modules.inc | 1 + > > lib/libpam/modules/pam_xdg/Makefile | 6 + > > lib/libpam/modules/pam_xdg/pam_xdg.8 | 56 +++++++ > > lib/libpam/modules/pam_xdg/pam_xdg.c | 311 +++++++++++++++++++++++++++++++++++ > > 4 files changed, 374 insertions(+) > > [snip] > > > diff --git a/lib/libpam/modules/pam_xdg/pam_xdg.c b/lib/libpam/modules/pam_xdg/pam_xdg.c > > new file mode 100644 > > index 000000000000..40012fe463e0 > > --- /dev/null > > +++ b/lib/libpam/modules/pam_xdg/pam_xdg.c > > @@ -0,0 +1,311 @@ > > +/*- > > + * SPDX-License-Identifier: BSD-2-Clause > > + * > > + * Copyright (c) 2024 Beckhoff Automation GmbH & Co. KG > > + * > > + * Redistribution and use in source and binary forms, with or without > > + * modification, are permitted provided that the following conditions > > + * are met: > > + * 1. Redistributions of source code must retain the above copyright > > + * notice, this list of conditions and the following disclaimer. > > + * 2. Redistributions in binary form must reproduce the above copyright > > + * notice, this list of conditions and the following disclaimer in the > > + * documentation and/or other materials provided with the distribution. > > + * > > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > > + * SUCH DAMAGE. > > + */ > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#define PAM_SM_SESSION > > + > > +#include > > +#include > > +#include > > + > > +#define BASE_RUNTIME_DIR_PREFIX "/var/run/xdg" > > +#define RUNTIME_DIR_PREFIX runtime_dir_prefix != NULL ? runtime_dir_prefix : BASE_RUNTIME_DIR_PREFIX > > + > > +#define RUNTIME_DIR_PREFIX_MODE 0711 > > +#define RUNTIME_DIR_MODE 0700 /* XDG spec */ > > + > > +#define XDG_MAX_SESSION 100 /* Arbitrary limit because we need one */ > > + > > +static int > > +_pam_xdg_open(pam_handle_t *pamh, int flags __unused, > > + int argc __unused, const char *argv[] __unused) > > +{ > > + struct passwd *passwd; > > + const char *user; > > + const char *runtime_dir_prefix; > > + struct stat sb; > > + char *runtime_dir = NULL; > > + char *xdg_session_file; > > + int rv, rt_dir_prefix, rt_dir, session_file, i; > > + > > + session_file = -1; > > + rt_dir_prefix = -1; > > + runtime_dir_prefix = openpam_get_option(pamh, "runtime_dir_prefix"); > > + > > + /* Get user info */ > > + rv = pam_get_item(pamh, PAM_USER, (const void **)&user); > > + if (rv != PAM_SUCCESS) { > > + PAM_VERBOSE_ERROR("Can't get user information"); > > + goto out; > > + } > > + if ((passwd = getpwnam(user)) == NULL) { > > + PAM_VERBOSE_ERROR("Can't get user information"); > > + rv = PAM_SESSION_ERR; > > + goto out; > > + } > > + > > + /* Open or create the base xdg directory */ > > + rt_dir_prefix = open(RUNTIME_DIR_PREFIX, O_DIRECTORY | O_NOFOLLOW); > > + if (rt_dir_prefix < 0) { > > + rt_dir_prefix = mkdir(RUNTIME_DIR_PREFIX, RUNTIME_DIR_PREFIX_MODE); > > + if (rt_dir_prefix != 0) { > > + PAM_VERBOSE_ERROR("Can't mkdir %s", RUNTIME_DIR_PREFIX); > > + rv = PAM_SESSION_ERR; > > + goto out; > > + } > > + rt_dir_prefix = open(RUNTIME_DIR_PREFIX, O_DIRECTORY | O_NOFOLLOW); > > + } > > + > > + /* Open or create the user xdg directory */ > > + rt_dir = openat(rt_dir_prefix, user, O_DIRECTORY | O_NOFOLLOW); > > + if (rt_dir < 0) { > > + rt_dir = mkdirat(rt_dir_prefix, user, RUNTIME_DIR_MODE); > > + if (rt_dir != 0) { > > + PAM_VERBOSE_ERROR("mkdir: %s/%s (%d)", RUNTIME_DIR_PREFIX, user, rt_dir); > > + rv = PAM_SESSION_ERR; > > + goto out; > > + } > > + rv = fchownat(rt_dir_prefix, user, passwd->pw_uid, passwd->pw_gid, 0); > > + if (rv != 0) { > > + PAM_VERBOSE_ERROR("fchownat: %s/%s (%d)", RUNTIME_DIR_PREFIX, user, rv); > > + rv = unlinkat(rt_dir_prefix, user, AT_REMOVEDIR); > > + if (rv == -1) > > + PAM_VERBOSE_ERROR("unlinkat: %s/%s (%d)", RUNTIME_DIR_PREFIX, user, errno); > > + rv = PAM_SESSION_ERR; > > + goto out; > > + } > > + } else { > > + /* Check that the already create dir is correctly owned */ > > + rv = fstatat(rt_dir_prefix, user, &sb, 0); > > + if (rv == -1) { > > + PAM_VERBOSE_ERROR("fstatat %s/%s failed (%d)", RUNTIME_DIR_PREFIX, user, errno); > > + rv = PAM_SESSION_ERR; > > + goto out; > > + } > > + if (sb.st_uid != passwd->pw_uid || > > + sb.st_gid != passwd->pw_gid) { > > + PAM_VERBOSE_ERROR("%s/%s isn't owned by %d:%d\n", RUNTIME_DIR_PREFIX, user, passwd->pw_uid, passwd->pw_gid); > > + rv = PAM_SESSION_ERR; > > + goto out; > > + } > > + /* Test directory mode */ > > + if ((sb.st_mode & 0x1FF) != RUNTIME_DIR_MODE) { > > + PAM_VERBOSE_ERROR("%s/%s have wrong mode\n", RUNTIME_DIR_PREFIX, user); > > + rv = PAM_SESSION_ERR; > > + goto out; > > + } > > + } > > + > > + /* Setup the environment variable */ > > + asprintf(&runtime_dir, "XDG_RUNTIME_DIR=%s/%s", RUNTIME_DIR_PREFIX, user); > > + rv = pam_putenv(pamh, runtime_dir); > > + if (rv != PAM_SUCCESS) { > > + PAM_VERBOSE_ERROR("pam_putenv: failed (%d)", rv); > > + rv = PAM_SESSION_ERR; > > + goto out; > > + } > > + > > + /* Setup the session count file */ > > + for (i = 0; i < XDG_MAX_SESSION; i++) { > > + asprintf(&xdg_session_file, "%s/xdg_session.%d", user, i); > > If asprintf fails, xdg_session_file will be NULL. > > > + printf("Trying to open %s\n", xdg_session_file); > > + session_file = openat(rt_dir_prefix, xdg_session_file, O_CREAT | O_EXCL, RUNTIME_DIR_MODE); > > If xdg_session_file is NULL, there is a NULL pointer dereference > vulnerability in the above call to openat(2). > > > + free(xdg_session_file); > > + if (session_file >= 0) > > + break; > > Thanks, > > -- > Shawn Webb > Cofounder / Security Engineer > HardenedBSD > > Tor-ified Signal: +1 303-901-1600 > https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc Done in https://cgit.freebsd.org/src/commit/?id=2d2950c889335b24af7a92f3aaf9946de47bb0bc Cheers, -- Emmanuel Vadot From nobody Tue Feb 27 07:06:34 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TkT6y4rDJz5Ccjy; Tue, 27 Feb 2024 07:06: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 4TkT6y3xFTz4Wmy; Tue, 27 Feb 2024 07:06:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709017594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2DVqDP60MmBL9emluXw62YNJIa3p3e1cD1VwQO6BcOg=; b=GjTQ2ZG/JIveyeQQ7ORolT8bMjNB0XqQJemVTSIJt85c04zAFp+QfeuIqG+4S+/NlwCNRi wo9LRZPvYsJ2JkAE82toQJLwHbWUcL+MLDO/3U27snKe7YwbOf0ZOK3pCV26Flf6Sk3uk5 0WTZG+LnmZwHLbzvg5gLjwJSl1Am0K5chZkTq3/ELxaJ0e3rqBQcLP3R2hTX3ELi+7fJUj 7lRBsgoPKWswR2GhrF5bYr7iKCUHSaOdN2fAO9CFveDhBYRjp75agkST6rGZNMseRhdbFA BQjP9GeJTHiITNyaC/rGu/JTaoU6ZJjxv9ztRFQT9nrHcNGJyOO/HhbFHNJMUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709017594; a=rsa-sha256; cv=none; b=Bj07dMre8lzs/+cRAJUw8rb8d6dKHZpG7U0lhJKYFnrcjP/ZNW+pP/iTpwZcxxqEHFcL+P PIMyrFZJThPMDGCaugdL+ps6fK1ObfgEzW72frQPFrrjG98INQZLmu6nBLma4xS6wqjJpn G90ZUjXG9OEA8HP72UtMyqkhBTw20Ie9W3DOo+b6xoxGOy4CMdhke3j/OfZl+NnSBUvRFU JwNWkuRNpi56Zrwk0Ea5cXvQRzVYuPAUi9FedMrpZAjddedqy4VpFSveJ1va4JD6OEGB+a wbJYZNJmiQtJ398HbShPhozZ5Q6lXUtrD3uxBmbus6eiLl+aTYyQ+E1eaffrPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709017594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2DVqDP60MmBL9emluXw62YNJIa3p3e1cD1VwQO6BcOg=; b=Gx9XXkzTgEuWSGB6Qs9psWS3q8WF/FEck2v+ciDgSMmAMHngB62xms/coegpauIBXPAv3p eGGtvfq7uiGCU1X4204sfhsnmISZX3wvuaq80jaMY70NlV2duxYYdCU/k6o8yFJf6MEPx4 vh0vwW0gG/YyZYXW7NWtQl0N1T/cG0M8dQnh1j7ouh8olKFtN9PLfQ9V1WDLlHusFWlTLj fyUU4KGTzJbn4hcb6eAnips6wzltokvl2Nhlf9La46Qeoby3CpEyFatU6V+ZSabComUn/F a3PjZtN2JsC5iv7L2ULHvbQkha13zZ97jgg1yEJRLCwOPWDeY3i8BjeYRfY93A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TkT6y2vmtz12vv; Tue, 27 Feb 2024 07:06: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 41R76Ylt010164; Tue, 27 Feb 2024 07:06:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41R76YU4010161; Tue, 27 Feb 2024 07:06:34 GMT (envelope-from git) Date: Tue, 27 Feb 2024 07:06:34 GMT Message-Id: <202402270706.41R76YU4010161@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 5acbe6d1fb55 - main - pam_xdg: Reset rv to 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5acbe6d1fb552eeaf44955c2780f2e9d4a70cad3 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=5acbe6d1fb552eeaf44955c2780f2e9d4a70cad3 commit 5acbe6d1fb552eeaf44955c2780f2e9d4a70cad3 Author: Emmanuel Vadot AuthorDate: 2024-02-27 07:05:00 +0000 Commit: Emmanuel Vadot CommitDate: 2024-02-27 07:06:02 +0000 pam_xdg: Reset rv to 0 Otherwise on success it ontain the return value of asprintf. Sponsored by: Beckhoff Automation GmbH & Co. KG Fixes: 2d2950c88933 ("pam_xdg: Check asprintf return value") --- lib/libpam/modules/pam_xdg/pam_xdg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libpam/modules/pam_xdg/pam_xdg.c b/lib/libpam/modules/pam_xdg/pam_xdg.c index d8ba6899da2f..f1a9b13d581c 100644 --- a/lib/libpam/modules/pam_xdg/pam_xdg.c +++ b/lib/libpam/modules/pam_xdg/pam_xdg.c @@ -151,6 +151,7 @@ _pam_xdg_open(pam_handle_t *pamh, int flags __unused, rv = PAM_SESSION_ERR; goto out; } + rv = 0; session_file = openat(rt_dir_prefix, xdg_session_file, O_CREAT | O_EXCL, RUNTIME_DIR_MODE); free(xdg_session_file); if (session_file >= 0) @@ -272,6 +273,7 @@ _pam_xdg_close(pam_handle_t *pamh __unused, int flags __unused, rv = PAM_SESSION_ERR; goto out; } + rv = 0; session_file = openat(rt_dir_prefix, xdg_session_file, 0); if (session_file >= 0) { unlinkat(rt_dir_prefix, xdg_session_file, 0); From nobody Tue Feb 27 09:00:16 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TkWf83VLQz5Cmkv; Tue, 27 Feb 2024 09:00: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 4TkWf82mDqz4h6n; Tue, 27 Feb 2024 09:00:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709024416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2iTtPBNbJ9q8BSLFGWz22GvlwuHt86rS+0b6ukH5ET0=; b=Zwq3LjOxfoGZfdLqN52BhKHzwVM2z7A07QJnPLk/AgL0Wvf8ED9geCQMQv75r+qYD70BH0 0MKWeUB8Dnuv+tr2maaOVCstZxzesuFWKU+D/8Rxbj6GvyBXrr0lUGCZb+lEvXNFA3Ncr8 sd5sU6I855KfY6xGYuhsqAQm7BGwx0CawoJyfFHl0uNEoZURy1EuWqArVwgBmiYy2e+JBJ aBTHybSEnCeB3+uy4dMMtEdebyXL2SgWQS653DHDudKv4cTqzQVKWffUBDl7035KsG4uaY Fn7o2gmCARXZX+gK39O1HlvP0CyHV098KZR8mKKXXrmGCwGX6i2rmqcJSOwMog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709024416; a=rsa-sha256; cv=none; b=HiJEdPvk+Z9qwPtxU0kyZeDpiGC7OLrEwButY5gn2/Bz8emlnPdzousbaGACMlsX1Mc4yM hQvhbSpDpYwT73wlYmzqrbpsJvvMYnqwe26u1RKovWf/t2tloTlIaD0hPkKqFnuzzmkmEq LMHwJL/rd2hruv0v33ZcuPPUwCeAC0U2gnozVm6UnE5e02bV0JsdcDlWZK9mdvMH8PH9B7 1VJ06noGI6rJLKO/hr8FTWh9d1EPDFwzaIFRO+2Hpo9eL1UXDiamzUPPSFRh+b2Gxx1sbV zckhETX6tnr9izZNftlyZWY0NOladIvRnJsq7iFg62Lf83QbqrJb2MELQtqMXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709024416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2iTtPBNbJ9q8BSLFGWz22GvlwuHt86rS+0b6ukH5ET0=; b=JwUHvbskCDl1r+HDIGik0Hnh6MHTV9g5MmymnpzGKcPZJU0GkZpq2A4niM8qG0iba/paKo xvriYmR4H7KMfMCwa1tU10SP8luRmy5k/RBd7PO9v5uhH/n8M/MMjwD2DYt/tQyFEE7CFj KAQaOpcQQGdDMrSxDgK6OAR72mCUbW/eDtlFcZyQfi35Oumovnbzd0e0lKPfFiFQa9Jdbh +l+howgMrh1Tsp4FP+BBHW2rXOrLvNLAG5PVavb/i5T6SJPMdooGF7c+ESdjicb0g3aP4j 2A6RBpVO52XUt7x5jw7E6oQ77F9XBZ6D7kZu7XIW50lJrCAIlgk1hM1YRAmAOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TkWf81rW7z15D4; Tue, 27 Feb 2024 09:00: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 41R90GVh003365; Tue, 27 Feb 2024 09:00:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41R90GNe003356; Tue, 27 Feb 2024 09:00:16 GMT (envelope-from git) Date: Tue, 27 Feb 2024 09:00:16 GMT Message-Id: <202402270900.41R90GNe003356@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 1df8700aa6cf - main - PP mutexes: unlock: Reset inherited prio regardless of privileges List-Id: Commit messages for the main 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1df8700aa6cff7c759e90f7e507de4b8714435a4 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=1df8700aa6cff7c759e90f7e507de4b8714435a4 commit 1df8700aa6cff7c759e90f7e507de4b8714435a4 Author: Olivier Certner AuthorDate: 2024-02-20 13:52:40 +0000 Commit: Olivier Certner CommitDate: 2024-02-27 08:59:20 +0000 PP mutexes: unlock: Reset inherited prio regardless of privileges 'uq_inherited_pri' contains the current priority inherited from Priority Protection mutexes. If -1 is passed through 'm_ceilings[1]', meaning that there are no such mutexes held anymore, this must be reflected into it by setting it to PRI_MAX, regardless of whether the thread has privilege to set realtime priorities (PRI_MAX is also obviously not a realtime priority level). By contrast, it shall not be updated and the computed 'new_inherited_pri' shall stay unused if the thread doesn't have the ability to set a realtime priority, possibly keeping an older such priority acquired previously. Reviewed by: kib Approved by: emaste (mentor) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43984 --- sys/kern/kern_umtx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index 57ff74f5421e..9c7225863bb1 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -2684,7 +2684,8 @@ do_unlock_pp(struct thread *td, struct umutex *m, uint32_t flags, bool rb) struct umtx_q *uq, *uq2; struct umtx_pi *pi; uint32_t id, owner, rceiling; - int error, pri, new_inherited_pri, su; + int error, pri, new_inherited_pri; + bool su; id = td->td_tid; uq = td->td_umtxq; @@ -2739,7 +2740,7 @@ do_unlock_pp(struct thread *td, struct umutex *m, uint32_t flags, bool rb) error = EFAULT; else { mtx_lock(&umtx_lock); - if (su != 0) + if (su || new_inherited_pri == PRI_MAX) uq->uq_inherited_pri = new_inherited_pri; pri = PRI_MAX; TAILQ_FOREACH(pi, &uq->uq_pi_contested, pi_link) { From nobody Tue Feb 27 09:00:17 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TkWf93vjXz5CmYR; Tue, 27 Feb 2024 09:00: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 4TkWf93Pl4z4hVC; Tue, 27 Feb 2024 09:00:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709024417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KrlR3s/KK3vzt4AWHNJuf3b3N+QYmGtrtjv5+bSSmGg=; b=PZWDBXH/BNxPdkTgPdPWxqQxk7Svy2P0aAj9MlLZgHcfeFG79mCK5mawb3G5aj9xySFEec IzEmz90VQlhL8u7WvIJbflBr37MlxWK/Rn1G5O3BMneS1AkreNPMlHrWqQNGMCNmGPSjkf EA9N+X6ozmo/E+yAUpiG5JHV6zSKjdn2wHyCy+GckcJSf9cGaSPWdpf3BMSgw8e6Llpp9w ZD0L6SdHKWVmBHfvNiLviO9IGji/om/W1LRSxgQynYZh5+S2UJR3pMBKchbhF/pf/vH0hx Ui3Ntrnn1kB67zCAIYpEavnU6A01hzG11R5gcQBg1aQtPPFNnRNtbuXNszOKGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709024417; a=rsa-sha256; cv=none; b=wj7MvAsv+o6e44bTcdVWGn5TEtOcNS0U1biTXGUB8RpSA4y6T69u/pYfp1YOpr6eiuBU0m ylc1Upafzz5s9iZ4+N/QOfuZlt7fFomJxPEf6yCF/EtO3MzxKuzjtADvZG5/OfgtA/w0Q6 Umn+5ipQw5Jkf+vCvmSvawMcLnHVPXnmATCUfsBf/ZBHFxS1QQkVEyJ2Fv6vIRbX8rpqaA Q4eN3gKtwOcoByMXw38YDN3uHbztK6YZfl8Oe4dCofao4dOki9KMxT4WwlOFB02CznpoaX BtCGme5Pjyo0NPn68nB9HVoYFFdAeVIWxSSaL7h3LjPwU6eW8EunKmpnsybuCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709024417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KrlR3s/KK3vzt4AWHNJuf3b3N+QYmGtrtjv5+bSSmGg=; b=H3w+SlJBo1XdTXrj6By2px7pappTfnQMODALLNOfixJn8NrzNv6L8CxrKpt/O/oNf5KjMN x76wMXa6NenWZWj4uIuwL0zuDCKcRh2MHmI05YlehGzBKcNMNLT7Y0aX904yoxL3IXopM8 vH4q6/ITOQ/eZPjM9CRy3fAtjP6bIoPcBgrq6czlXe4uWyPzK1O5rBdjT5AUB0ZWUT2UwH 59ZPASk8PN8QJl7O3WZ0rjInptuiooukeoE+bXvrR5cdOZBXkIG+IF13XO4OquRLpOvdw6 kO7ZA+yN4nX2mHsAOBOIaaQSIwcZ3WzNXQpTnwm+vTk0m+KAfY0xoU5AdLAXDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TkWf92S9Rz154g; Tue, 27 Feb 2024 09:00: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 41R90Hcu004021; Tue, 27 Feb 2024 09:00:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41R90HbS004016; Tue, 27 Feb 2024 09:00:17 GMT (envelope-from git) Date: Tue, 27 Feb 2024 09:00:17 GMT Message-Id: <202402270900.41R90HbS004016@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 9ac3ac9ece62 - main - PP mutexes: lock: Check if priority is too high against base one List-Id: Commit messages for the main 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9ac3ac9ece6269365ac314fa5fdb484e96d4a32e Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=9ac3ac9ece6269365ac314fa5fdb484e96d4a32e commit 9ac3ac9ece6269365ac314fa5fdb484e96d4a32e Author: Olivier Certner AuthorDate: 2024-02-22 08:53:51 +0000 Commit: Olivier Certner CommitDate: 2024-02-27 08:59:36 +0000 PP mutexes: lock: Check if priority is too high against base one Doing this instead of using the current (user) priority, which includes current lendings, prevents gratuitous failures for threads involved in multiple locking groups, where each group is defined as the threads that can lock a particular PP or PI mutex. No deadlock can occur in this case. Indeed, if a thread holds such a lock A giving it a higher priority than the ceiling of some other lock B that is PP, and B is acquired by another thread, effectively the latter may not be able to run but this situation can only last until the first thread releases A, which it will do eventually. Reviewed by: kib Approved by: emaste (mentor) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D44044 --- sys/kern/kern_umtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index 9c7225863bb1..5abc1e71d763 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -2551,7 +2551,7 @@ do_lock_pp(struct thread *td, struct umutex *m, uint32_t flags, } mtx_lock(&umtx_lock); - if (UPRI(td) < PRI_MIN_REALTIME + ceiling) { + if (td->td_base_user_pri < PRI_MIN_REALTIME + ceiling) { mtx_unlock(&umtx_lock); error = EINVAL; goto out; From nobody Tue Feb 27 09:00:18 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TkWfB5sRZz5Cms8; Tue, 27 Feb 2024 09:00: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 4TkWfB4Rgpz4h6s; Tue, 27 Feb 2024 09:00:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709024418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dx4glNr+vGdAWasQ2hgIfBfazYTHz3uzH1fe7bamD84=; b=fOsxRIEAkpoMeKwg4nTQdT9BVRXzCLCXwmxqaeTXZvHPACZjtJDRJujFpVlX4hMifx4h9T SSWNCn7P6V/KR3WHDGmBpKTycFfubF9hAayyYP+esUkFO9aULbjzxUqpMSGGydGdk1WiOr 9JzUC0C1ybm2fnqL28R63sWduixV28GmWEOGvlwKN2XGxGTGkQh4ZX3D+TZlCAMtDnn1pW qQIB4NSEZ+VaogrvX3U1F57pMt0ZVD8Uc8NBSt29tke24VP8Ia/OPEF+1lVl0wRSTu+kaw NP+HKoU75vJUUZtIxtcJbk4Xq0rRqrdlYisCJ+qdh5iEtGZfV+epXDI7Pmj/HQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709024418; a=rsa-sha256; cv=none; b=LraokMQVU02JqxgRGHrVexy0mIguA3WlQ97RGeLMcMfqhYNoDGZfnHI20BPlXn4KwvpcEy Fp+iE6YS1RA8LsQQmBIHfMnnZ5/UPc/QMayUAofBN68uP+6nyfJU8hhc2CTPdFhRey53Aa H31zP3UqHPVx9Y4o+rzKOmmbNXZFsga8OkHMQoQk8SBYcyIbluMXwY/iwOtkdcDKAT4c/F ArA2zaBQdhVldCVv4mJSPmtxmpyKrJb6AKH7FlJvuvpmpFIor3b73kMm1TSk+ptRuIwNh3 B5OTgKkXST2Nq4GfMQoxqeRg90bHJUOenMhpLzdHhoKE2sIBGd+oVwLfclx57w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709024418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dx4glNr+vGdAWasQ2hgIfBfazYTHz3uzH1fe7bamD84=; b=X4b5Ok7B5kmBgl3YFIesThg9RUSG/Ywd0qsx4W/KDjhi8nOaCixcv1K98R6tSBucfrpUq/ H/5PgGRAIrV4PPvTLBLFF6xtGpLn8XN2heQk+ReJ0qX0egk83tjGiU+17p/rXNmxEtj1PS /jO+RNJuZ93Z5yoGoAo6Cw7Twzi/vqMfd6A258NvTWD+PWFSIqBgk1pcqgruSjEIVevzdr WgNRThDVcAHT6F/abhk6hyQ7nJNPCKaRLMeyYilLSsNAobzEMXMHHnGP0o5YAvGxzH42LX 3LXhWQOrp4yHl4IDznkyGFW/XuqMHzFP/eEYNnwRByeF1V8GMkSFFvYRQ1zPCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TkWfB3DGSz159Q; Tue, 27 Feb 2024 09:00: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 41R90IaZ004650; Tue, 27 Feb 2024 09:00:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41R90IJV004647; Tue, 27 Feb 2024 09:00:18 GMT (envelope-from git) Date: Tue, 27 Feb 2024 09:00:18 GMT Message-Id: <202402270900.41R90IJV004647@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 39e4665c9694 - main - PP mutexes: lock: Reduce 'umtx_lock' holding before taking the user lock List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 39e4665c9694b9f9b07d1cfa85befc288cabe906 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=39e4665c9694b9f9b07d1cfa85befc288cabe906 commit 39e4665c9694b9f9b07d1cfa85befc288cabe906 Author: Olivier Certner AuthorDate: 2024-02-22 09:13:38 +0000 Commit: Olivier Certner CommitDate: 2024-02-27 08:59:42 +0000 PP mutexes: lock: Reduce 'umtx_lock' holding before taking the user lock There is no need to have it for the priority check (that the thread doesn't have a higher priority than the mutex's ceiling), and there's also no need to take it if the thread doesn't have privileges to set its priority to the mutex's ceiling. While here, turn 'su' into a 'bool' and compute the internal priority corresponding to the mutex's ceiling once and for all, putting it in new 'new_pri'. Reviewed by: kib Approved by: emaste (mentor) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D44045 --- sys/kern/kern_umtx.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index 5abc1e71d763..092fcade9d19 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -2520,7 +2520,8 @@ do_lock_pp(struct thread *td, struct umutex *m, uint32_t flags, struct umtx_pi *pi; uint32_t ceiling; uint32_t owner, id; - int error, pri, old_inherited_pri, su, rv; + int error, pri, old_inherited_pri, new_pri, rv; + bool su; id = td->td_tid; uq = td->td_umtxq; @@ -2549,21 +2550,23 @@ do_lock_pp(struct thread *td, struct umutex *m, uint32_t flags, error = EINVAL; goto out; } + new_pri = PRI_MIN_REALTIME + ceiling; - mtx_lock(&umtx_lock); - if (td->td_base_user_pri < PRI_MIN_REALTIME + ceiling) { - mtx_unlock(&umtx_lock); + if (td->td_base_user_pri < new_pri) { error = EINVAL; goto out; } - if (su && PRI_MIN_REALTIME + ceiling < uq->uq_inherited_pri) { - uq->uq_inherited_pri = PRI_MIN_REALTIME + ceiling; - thread_lock(td); - if (uq->uq_inherited_pri < UPRI(td)) - sched_lend_user_prio(td, uq->uq_inherited_pri); - thread_unlock(td); + if (su) { + mtx_lock(&umtx_lock); + if (new_pri < uq->uq_inherited_pri) { + uq->uq_inherited_pri = new_pri; + thread_lock(td); + if (new_pri < UPRI(td)) + sched_lend_user_prio(td, new_pri); + thread_unlock(td); + } + mtx_unlock(&umtx_lock); } - mtx_unlock(&umtx_lock); rv = casueword32(&m->m_owner, UMUTEX_CONTESTED, &owner, id | UMUTEX_CONTESTED); From nobody Tue Feb 27 09:00:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TkWfC6gnLz5Cms9; Tue, 27 Feb 2024 09:00:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TkWfC5LxCz4h74; Tue, 27 Feb 2024 09:00:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709024419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/KWdYOV1RlCeqV2mRRuwrobnx8GSXFVXynEvRmPEVpI=; b=CVp+jA/WMeE0ZS52Js6uFaf9Jz9Yp+Uqcrdiiedwsz9Nwxhb+alnxZAhNBNMz9nglQ2knO PSiLAAIXZPT9g0ixibvn4ZMfnPDLE+w49/JCu4zuD7IGdhwvoycDFau9sYchZiHMmtk+wK 42/dTbR0Bub6UJPOAxfgSuatuU2mUfZXLTuzYoNdPaShd8MX2Kqtv4w/GQNFeUZbFPBnyU 87jYssoNCoBlGiOQJZYZiPgp31NtnVKphocmQWDNbWc0yjK0BiIAD5x5Anh/EELa+bx1zW z/JymaX7kYpRmBF7oo2RRMtUKzvdr3593D4GwhYNz84QKhUWdwFzB0obRXaUqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709024419; a=rsa-sha256; cv=none; b=OhoSf+7paIOvbMIt3rVfdhWEMhqDlzH42KycWIZfnJhc3zzTBU/4ZpXA5yiywOD8I4oYMj o4ZZligqXwC2ch0rvM/f3Jk0SEnLfSD/ciZipoDYkG0GhfuZzG2aG/WrYRHMvFKkZVge8d cW7O3b3JYWZK4wLkbT32tuG7gIcUMaclFS7obVjt4oktGJ3DuFmrTwRiSP49d4dbTI7/8d KHmNLC8mu6+L/B60QgT5MfFZgfnUeLzixpT24gHLR2ybrK1X977+qgt8r+ry87250NsQ8e DDRHULG0IWP+vY2uyfeFZ5Te59hMsGiunNUA06k27YPRhFVhLjUX/Ozn277zkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709024419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/KWdYOV1RlCeqV2mRRuwrobnx8GSXFVXynEvRmPEVpI=; b=F5BHAUcApRjIHaEfeAkA/3l5QBcAXIuUeO51WuBEzixxDdCIyg0SpqYwK0CKqlYb1weIW7 C+0MK1ALJAgPk7QMIo+xZg4mp79k3rFnvCojb0JGus0Qfb7UiGBPPfO8mC/60vUvqJ/SVa 4HJWyVTw/IGGIHmlsQw1NJHa+X3G1DPh1Uq3s+CFZtgkQv76U6rCMVD6Dc7npthBU3wz66 6jfgun6Xk/1ePPWKS3D/IfCVlmWg7q03qZR3KecDHCCg25Uk/1H59gy0gFXBMaDqL70RCG yV9x9Ll7PwS20amUWNnz/LQP8lovZa3j08cLGHwMzgTbJ1Y62s3XgHkSeiHlkg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TkWfC4RnGz15Th; Tue, 27 Feb 2024 09:00:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41R90JJK004691; Tue, 27 Feb 2024 09:00:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41R90J0H004688; Tue, 27 Feb 2024 09:00:19 GMT (envelope-from git) Date: Tue, 27 Feb 2024 09:00:19 GMT Message-Id: <202402270900.41R90J0H004688@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: aeff15b392e6 - main - sched: Simplify sched_lend_user_prio_cond() List-Id: Commit messages for the main 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aeff15b392e68f5f193fff3bb01728b965cacc3a Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=aeff15b392e68f5f193fff3bb01728b965cacc3a commit aeff15b392e68f5f193fff3bb01728b965cacc3a Author: Olivier Certner AuthorDate: 2024-02-09 18:03:22 +0000 Commit: Olivier Certner CommitDate: 2024-02-27 08:59:48 +0000 sched: Simplify sched_lend_user_prio_cond() If 'td_lend_user_pri' has the expected value, there is no need to check the fields that sched_lend_user_prio() modifies, they either are already good or soon will be ('td->td_lend_user_pri' has just been changed by a concurrent update). Reviewed by: kib Approved by: emaste (mentor) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D44050 --- sys/kern/sched_4bsd.c | 12 +++--------- sys/kern/sched_ule.c | 10 ++-------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index f0fffeb08e2d..ff1e57746404 100644 --- a/sys/kern/sched_4bsd.c +++ b/sys/kern/sched_4bsd.c @@ -981,15 +981,9 @@ void sched_lend_user_prio_cond(struct thread *td, u_char prio) { - if (td->td_lend_user_pri != prio) - goto lend; - if (td->td_user_pri != min(prio, td->td_base_user_pri)) - goto lend; - if (td->td_priority != td->td_user_pri) - goto lend; - return; - -lend: + if (td->td_lend_user_pri == prio) + return; + thread_lock(td); sched_lend_user_prio(td, prio); thread_unlock(td); diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index c0d085fcf906..502802047cd4 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -2007,15 +2007,9 @@ void sched_lend_user_prio_cond(struct thread *td, u_char prio) { - if (td->td_lend_user_pri != prio) - goto lend; - if (td->td_user_pri != min(prio, td->td_base_user_pri)) - goto lend; - if (td->td_priority != td->td_user_pri) - goto lend; - return; + if (td->td_lend_user_pri == prio) + return; -lend: thread_lock(td); sched_lend_user_prio(td, prio); thread_unlock(td); From nobody Tue Feb 27 10:05:53 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TkY5t139Yz5CsTr; Tue, 27 Feb 2024 10:05:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TkY5t0StXz4p0f; Tue, 27 Feb 2024 10:05:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709028354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XmqfSHthReQ4ed6lJilcCey5i8gwA+R83R3voHszYhM=; b=eR4GWm/vz8A6XxXr6AhI/XVZzYOVTg+1leJI5e1dHyo7Ql+IUt0yvxFyoyi9dUdOI5IoNC JSyFfpIMedtKH3uXYFwqbMw5GKoHp6BUkB0kJgPAQSf7Zuls+ezh3eM4Xvs0qIHTrNXjtg KrU4KZ2Et4XxoKelzkAwXdPW4+YwzL65WxDc4XTGznAXgkaXVloK6W8GVVFTEnv8L3dofw aMXMyVUkEU1NpGQWuinDZYkJBwmUZu6dtcKhbgCnF8yxEbPX1EjWnsIijCoQbh9sKP7Shf 7/visduL7E3u4+67sPVoHmA/zOfTetvm7OdYRbuYwYWzG3IOqcr8tIVVtuwMrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709028354; a=rsa-sha256; cv=none; b=sZUnSdvfduJe9maHzx2N+NnrbZshYpwLGYIWwHET1JhMeuqUCNCo8YFil1x5nobojxK144 YFSenZ87mx+okwiOuaI5KDRDq+sFKV/AyCarbjZjIA41k+T8EQfT4VGbGkBS5FZA1YqU/p p3zLVMw+LpaRYsf6cCzzSw7I5oHp2DjgAcKCikBsHJ9qqcYdpB9MvqTiJ5TzDpCa6isIn/ RthVws9EqaMuNJjZXqaeOHBZHT6c31gYuixy+Jet6XrCnLzG5EvGCKrzF20p1bZYsYsytb YAagV1lGnZgmA1r1iRGDUVevs+PWdH7CqAqWBzQL5LGiDXJyUpvGsiJue4cUjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709028354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XmqfSHthReQ4ed6lJilcCey5i8gwA+R83R3voHszYhM=; b=OH6dvuIaueJUzRYb8iVuWZ8uYpxTmwdBrzye4ApMTjR2fZikvnGzItuDTZA2XtB0FSblR3 Tb0YKl6HDrtpJk0iF1DfA9AMGvv/h+QXmnwiinBP6t7LqA33IUOCUgyNoG51BfTHhYSbWA YozNDeqblO0eGTvPCLjtBqAuP1p83B5exDjHO874XlTicFWwbrPC0SaFaEz2PY/ifh9ZBP K/YlMwOVWZqDkrGyYVUJb9pxXgftzEVeiDO8/9E1ttD73/EDLtXLS3YVPM1Yu73IgciW0F v6tMRvbIKgOcrTt5WRILGPzr8uix8mnxtJCx2FRFJDylBzpF/aqMvM+KKRa3pA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TkY5s6f12z16rD; Tue, 27 Feb 2024 10:05: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 41RA5rcw013264; Tue, 27 Feb 2024 10:05:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41RA5ra3013261; Tue, 27 Feb 2024 10:05:53 GMT (envelope-from git) Date: Tue, 27 Feb 2024 10:05:53 GMT Message-Id: <202402271005.41RA5ra3013261@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: 81b7ebe32edd - main - stress2: Added a few regression tests List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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: 81b7ebe32edd4be705fe2d50c8d061191ba41573 Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=81b7ebe32edd4be705fe2d50c8d061191ba41573 commit 81b7ebe32edd4be705fe2d50c8d061191ba41573 Author: Peter Holm AuthorDate: 2024-02-27 10:05:26 +0000 Commit: Peter Holm CommitDate: 2024-02-27 10:05:26 +0000 stress2: Added a few regression tests --- tools/test/stress2/misc/mapwrite.sh | 189 ++++++++++++++++++++++++++++++++++++ tools/test/stress2/misc/mmap41.sh | 160 ++++++++++++++++++++++++++++++ tools/test/stress2/misc/mmap42.sh | 101 +++++++++++++++++++ tools/test/stress2/misc/mmap43.sh | 182 ++++++++++++++++++++++++++++++++++ 4 files changed, 632 insertions(+) diff --git a/tools/test/stress2/misc/mapwrite.sh b/tools/test/stress2/misc/mapwrite.sh new file mode 100755 index 000000000000..1fef81942b64 --- /dev/null +++ b/tools/test/stress2/misc/mapwrite.sh @@ -0,0 +1,189 @@ +#!/bin/sh + +# File corruption scenario + +# Test program by Rob Norris +# Test program obtained from: https://gist.github.com/robn/9804c60cd0275086d26893d73e7af35c +# https://github.com/openzfs/zfs/issues/15654 + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +. ../default.cfg + +set -u +prog=$(basename "$0" .sh) +cat > /tmp/$prog.c < /sys/modules/zfs/parameters/zfs_bclone_enabled + * zpool create tank ... + * cd /tank + * mapwrite + * + * [ 7.666305] VERIFY(arc_released(db->db_buf)) failed + * [ 7.666443] PANIC at dbuf.c:2150:dbuf_redirty() + * [ 7.666489] Showing stack for process 608 + * [ 7.666534] CPU: 1 PID: 608 Comm: mapwrite Tainted: P O 5.10.170 #3 + * [ 7.666610] Call Trace: + * [ 7.666646] dump_stack+0x57/0x6e + * [ 7.666717] spl_panic+0xd3/0xfb [spl] + * [ 7.667113] ? zfs_btree_find+0x16a/0x300 [zfs] + * [ 7.667278] ? range_tree_find_impl+0x55/0xa0 [zfs] + * [ 7.667333] ? _cond_resched+0x1a/0x50 + * [ 7.667371] ? __kmalloc_node+0x14a/0x2b0 + * [ 7.667415] ? spl_kmem_alloc_impl+0xb0/0xd0 [spl] + * [ 7.667555] ? __list_add+0x12/0x30 [zfs] + * [ 7.667681] spl_assert+0x17/0x20 [zfs] + * [ 7.667807] dbuf_redirty+0xad/0xb0 [zfs] + * [ 7.667963] dbuf_dirty+0xe76/0x1310 [zfs] + * [ 7.668011] ? mutex_lock+0xe/0x30 + * [ 7.668133] ? dbuf_noread+0x112/0x240 [zfs] + * [ 7.668271] dmu_write_uio_dnode+0x101/0x1b0 [zfs] + * [ 7.668411] dmu_write_uio_dbuf+0x4a/0x70 [zfs] + * [ 7.668555] zfs_write+0x500/0xc80 [zfs] + * [ 7.668610] ? page_add_file_rmap+0xe/0xb0 + * [ 7.668740] zpl_iter_write+0xe4/0x130 [zfs] + * [ 7.668803] new_sync_write+0x119/0x1b0 + * [ 7.668843] vfs_write+0x1ce/0x260 + * [ 7.668880] __x64_sys_pwrite64+0x91/0xc0 + * [ 7.668918] do_syscall_64+0x30/0x40 + * [ 7.668957] entry_SYSCALL_64_after_hwframe+0x61/0xc6 + */ + +#define _GNU_SOURCE + +#include +#include +#include +#include +#include +#include +#include +#include + +#define DATASIZE (1024*1024) +char data[DATASIZE]; + +#define NDATA (512) + +#define FILE_NAME "file" +#define CLONE_NAME "clone" + +static int +_create_file(void) +{ + memset(data, 0x5a, DATASIZE); + + int fd; + if ((fd = open(FILE_NAME, O_RDWR | O_CREAT | O_APPEND, + S_IRUSR | S_IWUSR)) < 0) { + perror("open '" FILE_NAME "'"); + abort(); + } + + for (int i = 0; i < NDATA; i++) { + int nwr = write(fd, data, DATASIZE); + if (nwr < 0) { + perror("write"); + abort(); + } + if (nwr < DATASIZE) { + fprintf(stderr, "short write\n"); + abort(); + } + } + + if (lseek(fd, 0, SEEK_SET) < 0) { + perror("lseek"); + abort(); + } + + sync(); + + return (fd); +} + +static int +_clone_file(int sfd) +{ + int dfd; + if ((dfd = open(CLONE_NAME, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR)) < 0) { + perror("open '" CLONE_NAME "'"); + abort(); + } + + if (copy_file_range(sfd, 0, dfd, 0, DATASIZE * NDATA, 0) < 0) { + perror("copy_file_range"); + abort(); + } + + return (dfd); +} + +static void * +_map_file(int fd) +{ + void *p = mmap(NULL, DATASIZE*NDATA, PROT_READ, MAP_SHARED, fd, 0); + if (p == MAP_FAILED) { + perror("mmap"); + abort(); + } + + return (p); +} + +static void +_map_write(void *p, int fd) +{ + if (pwrite(fd, p, DATASIZE, 0) < 0) { + perror("pwrite"); + abort(); + } +} + +int +main(void) +{ + int sfd = _create_file(); + int dfd = _clone_file(sfd); + void *p = _map_file(dfd); + _map_write(p, dfd); + return (0); +} +EOF +mycc -o /tmp/$prog -Wall -Wextra -O2 /tmp/$prog.c || exit 1 + +mount | grep -q "on $mntpoint " && umount -f $mntpoint +mdconfig -l | grep -q md$mdstart && mdconfig -d -u $mdstart +mdconfig -s 5g -u $mdstart + +newfs -n $newfs_flags /dev/md$mdstart > /dev/null +mount /dev/md$mdstart $mntpoint + +mycc -o /tmp/swap -Wall -Wextra -O0 ../tools/swap.c || exit 1 +timeout -k 90 60 /tmp/swap -d 100 & +for i in `jot 10`; do + capacity=`swapinfo | tail -1 | sed 's/.* //; s/%//'` + [ $capacity -gt 1 ] && break + sleep 2 # Wait for swapping +done + +cd $mntpoint +/tmp/$prog; s=$? +pkill swap +wait +cmp $mntpoint/file $mntpoint/clone || { echo Fail; s=1; } +cd - + +umount $mntpoint +mdconfig -d -u $mdstart +rm /tmp/$prog /tmp/$prog.c +exit $s diff --git a/tools/test/stress2/misc/mmap41.sh b/tools/test/stress2/misc/mmap41.sh new file mode 100755 index 000000000000..5051681aaf31 --- /dev/null +++ b/tools/test/stress2/misc/mmap41.sh @@ -0,0 +1,160 @@ +#!/bin/sh + +# +# Copyright (c) 2024 Peter Holm +# +# SPDX-License-Identifier: BSD-2-Clause +# + +# Based on code from https://syzkaller.appspot.com/text?tag=ReproC&x=15d9baada80000 +# No problems seen + +. ../default.cfg + +prog=$(basename "$0" .sh) +odir=`pwd` +cd /tmp +sed '1,/^EOF/d' < $odir/$0 > $prog.c +mycc -o $prog -Wall -Wextra -O0 $prog.c -lpthread || exit 1 +rm -f $prog.c + +set -e +mount | grep "on $mntpoint " | grep -q /dev/md && umount -f $mntpoint +[ -c /dev/md$mdstart ] && mdconfig -d -u $mdstart +mdconfig -a -t swap -s 2g -u $mdstart +newfs $newfs_flags md$mdstart > /dev/null +mount /dev/md$mdstart $mntpoint +set +e + +$odir/../testcases/swap/swap -t 2m -i 10 > /dev/null & +cd $mntpoint +/tmp/$prog +cd $odir +while pkill swap; do :; done +wait + +for i in `jot 6`; do + mount | grep -q "on $mntpoint " || break + umount $mntpoint && break || sleep 10 + [ $i -eq 6 ] && + { echo FATAL; fstat -mf $mntpoint; exit 1; } +done +mdconfig -d -u $mdstart +rm -f /tmp/$prog +exit 0 + +EOF +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#define DEBUG 0 /* 1 to enable */ +#define THREADS 2 + +static volatile int go; +static int fd; +static char *p, path[128]; + +#define ADDR (void *) 0x20000000ul +#define LEN 0x1000000ul + +void * +thr(void *arg) +{ + struct iovec iov; + long n, w; + char *p1; + + if (*(int *)arg == 0) { + while (go == 0) + usleep(100); + while (go == 1) { + if ((p1 = mmap(ADDR, LEN, PROT_WRITE, MAP_ANON|MAP_FIXED|MAP_PRIVATE, -1, 0)) == MAP_FAILED) + err(1, "mmap() in %s", __func__); + usleep(arc4random() % 50); + if ((p1 = mmap(ADDR, LEN, PROT_READ|PROT_WRITE, MAP_ANON|MAP_FIXED|MAP_PRIVATE, -1, 0)) == MAP_FAILED) + err(1, "mmap() in %s", __func__); + usleep(arc4random() % 10000); + } + } else { + while (go == 0) + usleep(100); + n = w = 0; + while (go == 1) { + iov.iov_base = p; + iov.iov_len = 0x100000; + if (pwritev(fd, &iov, 1, 0) != -1) + w++; + n++; + } + if (DEBUG == 1) + fprintf(stderr, "%ld out of %ld writes (%ld%%)\n", w, n, w * 100 / n); + } + + + return (0); +} + +void +test(void) +{ + pthread_t threads[THREADS]; + int nr[THREADS]; + int i, r; + + sprintf(path, "mmap.%06d", getpid()); + if ((fd = open(path, O_CREAT | O_TRUNC | O_RDWR, 0622)) == -1) + err(1,"open()"); + + + if ((p = mmap(ADDR, LEN, PROT_READ|PROT_WRITE, MAP_ANON|MAP_FIXED|MAP_PRIVATE, -1, 0)) == MAP_FAILED) + err(1, "mmap() in %s", __func__); + + go = 0; + for (i = 0; i < THREADS; i++) { + nr[i] = i; + if ((r = pthread_create(&threads[i], NULL, thr, + (void *)&nr[i])) != 0) + errc(1, r, "pthread_create()"); + } + + go = 1; + sleep(60); + go = 2; + + for (i = 0; i < THREADS; i++) { + if ((r = pthread_join(threads[i], NULL)) != 0) + errc(1, r, "pthread_join(%d)", i); + } + close(fd); + if (DEBUG == 0) { + if (unlink(path) == -1) + err(1, "unlink(%s)", path); + } + + _exit(0); +} + +int +main(void) +{ + pid_t pid; + int i; + + for (i = 0; i < 2; i++) { + if ((pid = fork()) == 0) + test(); + if (waitpid(pid, NULL, 0) != pid) + err(1, "waitpid()"); + } +} diff --git a/tools/test/stress2/misc/mmap42.sh b/tools/test/stress2/misc/mmap42.sh new file mode 100755 index 000000000000..11235e581e73 --- /dev/null +++ b/tools/test/stress2/misc/mmap42.sh @@ -0,0 +1,101 @@ +#!/bin/sh + +# Test scenario by: kib@ +# Test program obtained from Kyle Evans + +# Demonstrate UFS SU file corruption: +# ffs: on write into a buffer without content + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +. ../default.cfg + +set -u +prog=$(basename "$0" .sh) +s=0 +cat > /tmp/$prog.c < +#include + +#include +#include +#include +#include +#include + +#define FILE "file" + +int +main(void) +{ + struct stat sb; + ssize_t wsz; + size_t bufsz; + void *buf, *obuf; + int mfd, fd; + int done = 0; + + mfd = open(FILE, O_RDONLY); + assert(mfd >= 0); + + assert(fstat(mfd, &sb) == 0); + bufsz = sb.st_size; + buf = obuf = mmap(NULL, bufsz, PROT_READ, MAP_SHARED, mfd, 0); + assert(buf != MAP_FAILED); + + /* O_RDWR */ + fd = open(FILE, O_RDWR); + if (fd < 0) + err(1, "open"); + assert(fd >= 0); + +again: + while (bufsz > 0) { + wsz = write(fd, buf, bufsz); + if (wsz < 0) + err(1, "write"); + else if (wsz == 0) + fprintf(stderr, "Huh?\n"); + bufsz -= wsz; + buf += wsz; + } + + bufsz = sb.st_size; + buf = obuf; + + if (++done < 2) + goto again; + + close(fd); + munmap(obuf, sb.st_size); + close(mfd); + return (0); +} +EOF +mycc -o /tmp/$prog -Wall -Wextra -O0 /tmp/$prog.c || exit 1 + +mount | grep -q "on $mntpoint " && umount -f $mntpoint +mdconfig -l | grep -q md$mdstart && mdconfig -d -u $mdstart +mdconfig -s 32m -u $mdstart + +pagesize=$(sysctl -n hw.pagesize) +newfs -Un -b $pagesize /dev/md$mdstart > /dev/null +mount /dev/md$mdstart $mntpoint +dd if=/dev/random of=/mnt/file.orig bs=${pagesize} count=1 status=none +cp $mntpoint/file.orig $mntpoint/file +cat $mntpoint/file $mntpoint/file > $mntpoint/file.post +umount $mntpoint + +mount /dev/md$mdstart $mntpoint +(cd $mntpoint; /tmp/$prog) + +if ! cmp $mntpoint/file $mntpoint/file.post; then + echo "Files differ" + ls -l $mntpoint/file $mntpoint/file.post + s=1 +fi + +umount $mntpoint +mdconfig -d -u $mdstart +rm /tmp/$prog /tmp/$prog.c +exit $s diff --git a/tools/test/stress2/misc/mmap43.sh b/tools/test/stress2/misc/mmap43.sh new file mode 100755 index 000000000000..98f1de174d54 --- /dev/null +++ b/tools/test/stress2/misc/mmap43.sh @@ -0,0 +1,182 @@ +#!/bin/sh + +# Test program obtained from Kyle Evans + +# Demonstrate UFS SU file corruption + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +. ../default.cfg + +set -u +prog=$(basename "$0" .sh) +log=/tmp/$prog.log +rm -f $log +cat > /tmp/$prog.c < +#include + +#include +#include +#include +#include +#include + +#define FILE "file" + +int +main(void) +{ + struct stat sb; + ssize_t wsz; + size_t bufsz; + void *buf, *obuf; + int mfd, fd; + int done = 0; + + mfd = open(FILE, O_RDONLY); + assert(mfd >= 0); + + assert(fstat(mfd, &sb) == 0); + bufsz = sb.st_size; + buf = obuf = mmap(NULL, bufsz, PROT_READ, MAP_SHARED, mfd, 0); + assert(buf != MAP_FAILED); + + /* O_RDWR */ + fd = open(FILE, O_RDWR); + if (fd < 0) + err(1, "open"); + assert(fd >= 0); + +again: + while (bufsz > 0) { + wsz = write(fd, buf, bufsz); + if (wsz < 0) + err(1, "write"); + else if (wsz == 0) + fprintf(stderr, "Huh?\n"); + bufsz -= wsz; + buf += wsz; + } + + bufsz = sb.st_size; + buf = obuf; + + if (++done < 2) + goto again; + + close(fd); + munmap(obuf, sb.st_size); + close(mfd); + return (0); +} +EOF +mycc -o /tmp/$prog -Wall -Wextra -O0 /tmp/$prog.c || exit 1 + +cat > /tmp/$prog.serial.c < +#include +#include +#include +#include +#include +#include + +int +main(int argc, char *argv[]) +{ + size_t i, size; + long ix, *lp; + int fd; + char *file; + + if (argc != 3) { + fprintf(stderr, "Usage: %s \n", argv[0]); + exit(1); + } + file = argv[1]; + size = atol(argv[2]); + + if ((fd = open(file, O_RDWR | O_CREAT | O_TRUNC, 0600)) < 0) + err(1, "%s", file); + + if (lseek(fd, size - 1, SEEK_SET) == -1) + err(1, "lseek error"); + + /* write a dummy byte at the last location */ + if (write(fd, "\0", 1) != 1) + err(1, "write error"); + + if ((lp = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0)) == MAP_FAILED) + err(1, "mmap()"); + + for (i = 0, ix = 0; i < size; i += sizeof(long), ix++) + lp[ix] = ix; + + if (munmap(lp, size) == -1) + err(1, "munmap"); + close(fd); +} +EOF +mycc -o /tmp/$prog.serial -Wall -Wextra -O0 /tmp/$prog.serial.c || exit 1 + +mount | grep -q "on $mntpoint " && umount -f $mntpoint +mdconfig -l | grep -q md$mdstart && mdconfig -d -u $mdstart +mdconfig -s 5g -u $mdstart + +newfs -n $newfs_flags /dev/md$mdstart > /dev/null +mount /dev/md$mdstart $mntpoint + +here=`pwd` +cd $mntpoint + +size=875998990 +pagesize=`sysctl -n hw.pagesize` +tail=$((size % pagesize)) +/tmp/$prog.serial file $size + +cat file file > file.post +mv file file.orig +md5=`md5 < file.post` + +cp /usr/bin/sort /tmp/$prog.sort +counter=1 +n=$((`sysctl -n hw.ncpu`)) +[ $n -gt 10 ] && n=10 +s=0 +start=`date +%s` +while [ $((`date +%s` - start)) -lt 300 ]; do + st=`date +%s` + cp file.orig file + for i in `jot $n`; do + timeout -k 70s 1m /tmp/$prog.sort /dev/zero & + done + sleep $n + /tmp/$prog + while pkill $prog.sort; do sleep .2; done + wait + m=`md5 < file` + if [ $md5 != $m ]; then + echo "Failed @ iteration $counter" + ls -l + od -t x8 file > /var/tmp/$prog.file1 + od -t x8 file.post > /var/tmp/$prog.file2 + diff /var/tmp/$prog.file1 /var/tmp/$prog.file2 > $log + head -10 $log + rm /var/tmp/$prog.file1 /var/tmp/$prog.file2 + s=1 + break + fi + echo "`date +%T` Loop #$counter, elapsed $((`date +%s` - st)) seconds." + counter=$((counter + 1)) +done +cd $here + +umount $mntpoint +mdconfig -d -u $mdstart +rm /tmp/$prog /tmp/$prog.c /tmp/$prog.sort +[ $s -eq 0 ] && + printf "OK File size is %9d, tail is %4d bytes. (%3d loops)\n" $size $tail $counter || + printf "FAIL File size is %9d, tail is %4d bytes. (%3d loops)\n" $size $tail $counter +exit $s From nobody Tue Feb 27 12:42:33 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TkcZd6hlvz5BcgS; Tue, 27 Feb 2024 12:42: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 4TkcZd6HPfz4D3Q; Tue, 27 Feb 2024 12:42:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709037753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=suFpwgdcNnwXW9ReR1aNfPXkTV0jzTtk8JGdFueAhWw=; b=TvV+c7zWuaj5iPbeViF7voFjU1NWw0aeT+b4Yczyp97gZilU6g2yXToeHn+rgaEnl3/NFA XbSZtPElSWiDV2v4AzzclslNhx9vgtF15w9pqw04R16l2BZvokSRyP8E+t0Cdk150G8rj/ ctwEVJ6u2sDPevt4ioc1k+dpRsOim/VnsMljg478Hpv86SrWBBi5ndOTyUCJvjdZ+tNg5h SfjjxDopzvbabncTblnZu5lPicGtU7RmFGdwNK4Sk/ZepTk2v8e39djzmRBpvSxVr/ym5T 4VTXJYZEEyfkjbBNk4ZPGtj3s+G3XaY1nGxIvlE4yQ9cz8ZEI5VnDhIuGr5bow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709037753; a=rsa-sha256; cv=none; b=CX+CGmriFkphWZVj8oKUnutgGIMubIvknVrxhKJXReZfU8/P94FbAUL0gUC8eTGdfiQPDj Yv/yuxCIKA9dvI5W2VSXPOoVw5G9kPcctayvqJdvqnM3nLPc0UR/1eoRcPNPawZgnenNAu mKOo6r2OfJi4R/rGUBp+/XG4iHsnXLjRJhrNSqaoRXldQLH3iY/Z3zIjwfbYkce0PyygvM wirQqpZ4TtBgZA2FJ/lJm2umwvfBOLNhMg0i15fdRv+VBuUbLSPgsgVHRd0piD05jpgvxS hBYKbzLTpgO1ZM45P9l8pqukc/2PtE/2t8ps1IvzA58O1E1eCGuDBa5q/d5vkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709037753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=suFpwgdcNnwXW9ReR1aNfPXkTV0jzTtk8JGdFueAhWw=; b=QZQESaZxo3PDbhwZRoT+NvNacydSIFSsyus8/waoOIBK1fYMuEd25kVN2qxmDisfAoP/Kg RqHFMCS65Vj44IUzqSvGkn+Q8wAR6M3nA6cUd0NyAS5CbsNta66KVC5G6lXyQbygVNmZYj 9HQxdwrjTiqx7TNi0fmrie32OJB7LBSn1hiKxkLFyI5eaitzmT9gF02rOXqgk7IAOuRpnC jjxlImUBAbskRls7u9MYWGUgiPPy2V2aCEjeVyA/KJt9nCxP35ysb5CNMH5VQwlfkZoCgU HX0QpkHJH8uA/vvbODCG2UXL27VXDp5SNbC9lU2Z0Yzzl88HUPMXWTc8WiYWJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TkcZd5NK5z1C1V; Tue, 27 Feb 2024 12:42: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 41RCgXBa082257; Tue, 27 Feb 2024 12:42:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41RCgXmJ082254; Tue, 27 Feb 2024 12:42:33 GMT (envelope-from git) Date: Tue, 27 Feb 2024 12:42:33 GMT Message-Id: <202402271242.41RCgXmJ082254@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 04d5a8ae0401 - main - vge(4): Fix a typo in a source code 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 04d5a8ae04013fd34e3bde5e401b6eaff46ac9c2 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=04d5a8ae04013fd34e3bde5e401b6eaff46ac9c2 commit 04d5a8ae04013fd34e3bde5e401b6eaff46ac9c2 Author: Gordon Bergling AuthorDate: 2024-02-27 12:42:10 +0000 Commit: Gordon Bergling CommitDate: 2024-02-27 12:42:10 +0000 vge(4): Fix a typo in a source code comment - s/opration/operation/ MFC after: 3 days --- 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 fcc47598454e..37606f28ba17 100644 --- a/sys/dev/vge/if_vge.c +++ b/sys/dev/vge/if_vge.c @@ -1218,7 +1218,7 @@ vge_discard_rxbuf(struct vge_softc *sc, int prod) /* * Note: the manual fails to document the fact that for - * proper opration, the driver needs to replentish the RX + * proper operation, the driver needs to replentish the RX * DMA ring 4 descriptors at a time (rather than one at a * time, like most chips). We can allocate the new buffers * but we should not set the OWN bits until we're ready From nobody Tue Feb 27 12:49:35 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tkckl4XHcz5Bd9Z; Tue, 27 Feb 2024 12:49: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 4Tkckl3ywqz4DYS; Tue, 27 Feb 2024 12:49:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709038175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DePDwRyPmlOh/aM3oiL0p1L6DSB0GR891sbLam75Ji8=; b=egE7SByXFELOAgYR6n6QC+9KQo3z+iMVnPrS2f0YEQS6faxi1SPLGG/3IjDtYfBjHg0LKM Qld6UKTS7GJwSf8IX0SagFhMDgy5aXx326z2GrtLvbCwMfhG1AKpTyKe+5Z/Kr78gsBuHv Je/lUfeqM2mRIx5lbIPEzTBwRzyNOab4+sHetTxOSOe3XHf5zXIjGeGJEIC5LOHPS2djGu ex93wbUGLy+c/BWMQm78yx7YuCMEDu7bCi3UYJ4VgpES5bQmCZTBcQrHBmjvWuQj4hcY2R +3fm2pgD2nk1L2YtU/TMo3kQRLHdCKDyv2qGeZ2qwAm7JLJcjvzz7lk7OR/AUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709038175; a=rsa-sha256; cv=none; b=AX6aCc9yluCoeEEeCy+J1mdm6pglT48dDc7F8gV6NaIUib2PZf7oeHm1c0h/U06m6tdeNf WZ5FhCUi8hQzEWByYTjzaedFVuqVaP2lZnD7puchLfCYEzuIu2yd4WRv0UjHHyfkOytnpr 51BTDi1lUetr1G8y/hXN5QkLpQfugTV/R/LPQHyU7eThSA+mnGg9gzTKQKQzpp8IVpSeGQ s96VioSvatzCkTSVO/j0dViIT0e4CF4PAV/fH5jz5Wh18cgS2k0GSd1dq6bMRwgwKMH+F2 ROM9LFc3U//ZinO32y5YxM7yWXYdXn8qGtmSFkAs5WNuywxbojqHbnrxj5mK2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709038175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DePDwRyPmlOh/aM3oiL0p1L6DSB0GR891sbLam75Ji8=; b=tLX+pLeLN50++5FAteI9ECjY814dAL2svKhOvhwIzcitRvIChn+iebVQIIrUWYXJyUghaa A5YXOgersVC/Bo/GgpAnJ3qyHTxZGTEYwK5j3UgrK18Mszi5Siio5VxvF+I9Irsy0umr+2 rxTpmqY2GPaoJ7cZayPTj8+j/rAG0uwci3Jg9AHpQhFJecxHXYxGaEzHfDe8HgJSkCBgY5 Lb+HiwScdFcM4fjZc+TG23K9+th4zV+X99TIORvu+vN00XwAkUeAnEG6l/VKOqwXtMbOH8 EqKpim2OKJklhhWLfd78Qn9wEEogqovjnY5PPcru+FP7yqE47cGJHbCdr6V5EA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tkckl31NBz1CBw; Tue, 27 Feb 2024 12:49: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 41RCnZqb083541; Tue, 27 Feb 2024 12:49:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41RCnZPJ083538; Tue, 27 Feb 2024 12:49:35 GMT (envelope-from git) Date: Tue, 27 Feb 2024 12:49:35 GMT Message-Id: <202402271249.41RCnZPJ083538@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 8f87d402e321 - main - dumprestore.h: Fix typos in source code comments List-Id: Commit messages for the main 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8f87d402e32178974038212fbf4b1564447df0e0 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=8f87d402e32178974038212fbf4b1564447df0e0 commit 8f87d402e32178974038212fbf4b1564447df0e0 Author: Gordon Bergling AuthorDate: 2024-02-27 12:49:21 +0000 Commit: Gordon Bergling CommitDate: 2024-02-27 12:49:21 +0000 dumprestore.h: Fix typos in source code comments - s/dumpped/dumped/ MFC after: 3 days --- include/protocols/dumprestore.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/protocols/dumprestore.h b/include/protocols/dumprestore.h index 4a1f0ec1ed52..3964e26d2a7b 100644 --- a/include/protocols/dumprestore.h +++ b/include/protocols/dumprestore.h @@ -114,9 +114,9 @@ extern union u_spcl { char c_addr[TP_NINDIR]; /* 1 => data; 0 => hole in inode */ char c_label[LBLSIZE]; /* dump label */ int32_t c_level; /* level of this dump */ - char c_filesys[NAMELEN]; /* name of dumpped file system */ - char c_dev[NAMELEN]; /* name of dumpped device */ - char c_host[NAMELEN]; /* name of dumpped host */ + char c_filesys[NAMELEN]; /* name of dumped file system */ + char c_dev[NAMELEN]; /* name of dumped device */ + char c_host[NAMELEN]; /* name of dumped host */ int32_t c_flags; /* additional information */ int32_t c_old_firstrec; /* first record on volume */ int64_t c_date; /* date of this dump */ From nobody Tue Feb 27 13:01:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tkd0J04Mhz5Bf8G; Tue, 27 Feb 2024 13:01: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 4Tkd0H70qlz4FtZ; Tue, 27 Feb 2024 13:01:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709038879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mk7yMK789UcrdZC0EDRcNSLDYqKocHDTAqjEy5WG7Z4=; b=L3ZEkBajudDCV1oxoVdBs08LgY6D3B8hX+CE+XbuW1AEjspatff6vQnszZUyWgWWMk3bSC gVXYX53cpgzZRz7W1a9PcP8ZJEbIAXinx6F1Em7WFvK8nr+JL2iHkMs9CknaU658zEZA8v UZ8e/UIrJhewmMiWoswkvCS5q4wbxtDaOlvdcyCBFL14yX4bBJX5ob1aOQLFoqSoCNvxur NV5J8efSH+ATufwItNp8mmbbzuLDt6hMm4qwyJhHMfnJoKBEv9fMi4qvpM5ifj6VLCDk/g PoDkhliVey3bT+rc5G8Syrj6CLK9LGgx3Ode3/8wclMkfz3llwZm0LOeaBCvOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709038879; a=rsa-sha256; cv=none; b=VRxhDkGFwMAtHSJBE3vMqtevs14Be+F64vQR1/CweHY2jWleJFx+mLjfL0tQOS6hpguV8f FyMcgrMY6j94wPdSQ4Ox3cKrIZZ1L+07/aEKYZcgdUq4dqdK4FOhAWT+2Ad+NsgvlCqmBt yIya7FjIZBHz6YqeB99MZbXggA87PBZ2fr9bVvNPdGoxenUcgg/Pi8efMp6ovGMZAYKtkp /hFanxaevi7shXCH1MoH8jm6wnhA67Ia8Ib8LwYApzMd3UWgGo74sIYCbUXAWGXEYlSG6y 9TG46nq9QcBszSyPNlZkFHW0EfypjJOZ/VuSIN+v2pkt3UL8NmGBqHMhYgF1sA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709038879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mk7yMK789UcrdZC0EDRcNSLDYqKocHDTAqjEy5WG7Z4=; b=N4c8q4HWLa1NT5L3T6URFXkJuHbNaDYnEo2LYb1p59JdYwH/8/nFBxzlUicScojQqL3qjn vHiLE2NvExlMh3R4wMTAb5MMApOYyNFLyTugcf5sSe5hYnfpba/hXNSwEpkDvwFV36sbxD 1xV6UGm07BsN4vKFRQGftCbmhiAeTIcOKMGzmmKCnrSdWG0lH7kTJJ7HGBfn8u+1f9Fz4G dSrF6BvG4UKJjB6Qofr0JQCaKX8NKHzXun6jAMAujxEVT4p73Fxe4WRR2me3OSc0gerkLh JYhopNUw3wtDjWVNxQSgvzvwjdiu3aXajS2CEFxcQCpX7VrfBdAu8karfjQMRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tkd0H649jz1CYj; Tue, 27 Feb 2024 13:01:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41RD1JD7013073; Tue, 27 Feb 2024 13:01:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41RD1JgQ012963; Tue, 27 Feb 2024 13:01:19 GMT (envelope-from git) Date: Tue, 27 Feb 2024 13:01:19 GMT Message-Id: <202402271301.41RD1JgQ012963@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: cce3a70a77a9 - main - pci_vendors: update to 2024.02.02 List-Id: Commit messages for the main 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: cce3a70a77a94751ce2d65890e539e24ff6081a3 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=cce3a70a77a94751ce2d65890e539e24ff6081a3 commit cce3a70a77a94751ce2d65890e539e24ff6081a3 Author: Baptiste Daroussin AuthorDate: 2024-02-27 13:01:11 +0000 Commit: Baptiste Daroussin CommitDate: 2024-02-27 13:01:11 +0000 pci_vendors: update to 2024.02.02 --- share/misc/pci_vendors | 723 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 615 insertions(+), 108 deletions(-) diff --git a/share/misc/pci_vendors b/share/misc/pci_vendors index bad1d0bd066b..ca3e5af4c97c 100644 --- a/share/misc/pci_vendors +++ b/share/misc/pci_vendors @@ -1,8 +1,8 @@ # # List of PCI ID's # -# Version: 2023.11.11 -# Date: 2023-11-11 03:15:02 +# Version: 2024.02.02 +# Date: 2024-02-02 14:41:33 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at https://pci-ids.ucw.cz/. @@ -48,7 +48,11 @@ 7a15 Vivante GPU (Graphics Processing Unit) 7a19 PCI-to-PCI Bridge 7a24 OHCI USB Controller +# Found on 7A2000 PCH + 7a25 LG100 GPU 7a29 PCI-to-PCI Bridge +# Found on 7A2000 PCH + 7a36 Display Controller 0018 Fn-Link Technology Limited 6252 6252CPUB 802.11ax PCIe Wireless Network Adapter 001c PEAK-System Technik GmbH @@ -82,14 +86,24 @@ 8139 HNE-300 (RealTek RTL8139c) [iPaq Networking] 025e Solidigm 0b60 NVMe DC SSD [Sentinel Rock Plus controller] + 025e 8008 NVMe DC SSD U.2 15mm [D7-P5510] 025e 8208 NVMe DC SSD U.2 15mm [D7-P5810] + 025e 8d1d NVMe DC SSD E1.L 9.5mm [D5-P5316] + 025e 9008 NVMe DC SSD U.2 15mm [D7-P5520] + 025e 900c NVMe DC SSD E1.S 9.5mm [D7-P5520] + 025e 900d NVMe DC SSD E1.S 15mm [D7-P5520] + 025e 901c NVMe DC SSD E1.L 9.5mm [D7-P5520] + 025e 9108 NVMe DC SSD U.2 15mm [D7-P5620] + 025e c008 NVMe DC SSD U.2 15mm [D5-P5530] 025e d408 NVMe DC SSD U.2 15mm [D5-P5430] 025e d40c NVMe DC SSD E1.S 9.5mm [D5-P5430] 025e d419 NVMe DC SSD E3.S 7.5mm [D5-P5430] 025e d808 NVMe DC SSD U.2 15mm [D5-P5336] 025e d819 NVMe DC SSD E3.S 7.5mm [D5-P5336] + 025e d81c NVMe DC SSD E1.L 18mm [D5-P5336] 025e d81d NVMe DC SSD E1.L 9.5mm [D5-P5336] 0b70 NVMe DC SSD [Yorktown controller] + 2b59 NVMe DC SSD [Atomos Prime] f1ab P41 Plus NVMe SSD (DRAM-less) [Echo Harbor] f1ac P44 Pro NVMe SSD [Hollywood Beach] 0270 Hauppauge computer works Inc. (Wrong ID) @@ -177,6 +191,12 @@ 0a06 RCB672FXX 672-channel modular analog telephony card 0bae Bachmann electronic GmbH 0ccd Preferred Networks, Inc. + 0110 MN-Core + 0120 MN-Core 2 + 0ccd 0000 MN-Core 2 16GB + 0ccd 0010 MN-Core 2 32GB + 0200 MN-Core Direct Connect + 0201 MN-Core 2 Middle-plane 0e11 Compaq Computer Corporation 0001 PCI to EISA Bridge 0002 PCI to ISA Bridge @@ -821,6 +841,22 @@ 1000 5030 eHBA 9700-16e 24G SAS/PCIe Storage Adapter 1028 22d2 PERC H975i Front 1028 22d3 PERC H975i Adapter + 1d49 020b ThinkSystem 460-16e SAS/SATA PCIe Gen5 24Gb HBA + 00b5 Fusion-MPT 24G SAS/PCIe SAS50xx/SAS51xx +# 9760W 32 internal port RAID controller + 1000 5000 MegaRAID 9760W-32i 24G SAS/PCIe Storage Adapter +# 9760W 16 internal port RAID controller + 1000 5001 MegaRAID 9760W-16i 24G SAS/PCIe Storage Adapter +# 9760W 16 internal and 16 external port RAID controller + 1000 5010 MegaRAID 9760W-16i16e 24G SAS/PCIe Storage Adapter +# 9700W 32 internal port Storage controller + 1000 5020 eHBA 9700W-32i 24G SAS/PCIe Storage Adapter +# 9700W 16 internal port Storage controller + 1000 5021 eHBA 9700W-16i 24G SAS/PCIe Storage Adapter +# 9700 16 external port Storage controller + 1000 5030 eHBA 9700-16e 24G SAS/PCIe Storage Adapter +# Broadcom next-gen MPT PCIe switch + 00b8 Fusion-MPT Switch SAS50xx/SAS51xx 00be SAS3504 Fusion-MPT Tri-Mode RAID On Chip (ROC) 00bf SAS3404 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) 00c0 SAS3324 PCI-Express Fusion-MPT SAS-3 @@ -1057,10 +1093,12 @@ 15d9 1c6e AOC-SLG4-2H8M2 Storage Adapter 1d49 0505 ThinkSystem RAID 540-8i PCIe Gen4 12Gb Adapter 1d49 0506 ThinkSystem RAID 540-16i PCIe Gen4 12Gb Adapter + 1d49 0507 ThinkSystem RAID 545-8i PCIe Gen4 12Gb Adapter 1d49 0700 ThinkSystem M.2 RAID B540i-2i SATA/NVMe Enablement Kit 1d49 0701 ThinkSystem 7mm RAID B540p-2HS SATA/NVMe Enablement Kit 1d49 0702 ThinkSystem M.2 RAID B540p-2HS SATA/NVMe Enablement Kit 1d49 0703 ThinkSystem M.2 RAID B540d-2HS SATA/NVMe Enablement Kit + 1d49 0704 ThinkSystem M.2 RAID B545i-2i SATA/NVMe Enablement Kit 10e7 MegaRAID 12GSAS/PCIe Unsupported SAS38xx 1960 MegaRAID 1000 0518 MegaRAID 518 SCSI 320-2 Controller @@ -1076,6 +1114,7 @@ 8086 0520 MegaRAID RAID Controller SRCU41L 8086 0523 MegaRAID RAID Controller SRCS16 3050 SAS2008 PCI-Express Fusion-MPT SAS-2 + 3150 1068e 6001 DX1 Multiformat Broadcast HD/SD Encoder/Decoder c010 PEX880xx PCIe Gen 4 Switch 1000 100b PEX88000 PCIe Gen 4 Virtual Upstream/Downstream Port @@ -1172,6 +1211,8 @@ 13e9 Ariel/Navi10Lite 13f9 Oberon/Navi12Lite 13fe Cyan Skillfish [BC-250] +# Used in the Steam Deck OLED + 1435 Sephiroth [AMD Custom GPU 0405] 145a Dummy Function (absent graphics controller) 1478 Navi 10 XL Upstream Port of PCI Express Switch 1479 Navi 10 XL Downstream Port of PCI Express Switch @@ -1211,7 +1252,7 @@ 1637 Renoir Radeon High Definition Audio Controller 1638 Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] 1043 16c2 Radeon Vega 8 -# Used in the Steam Deck +# Used in the Steam Deck LCD 163f VanGogh [AMD Custom GPU 0405] 1640 Rembrandt Radeon High Definition Audio Controller 164c Lucienne @@ -2732,6 +2773,7 @@ 1028 2120 Radeon HD 6450 103c 2128 Radeon HD 6450 103c 2aee Radeon HD 7450A + 1043 047b EAH6450 SILENT/DI/1GD3(LP) 1092 6450 Radeon HD 6450 1462 2125 Radeon HD 6450 1462 2346 Radeon HD 7450 @@ -3729,6 +3771,7 @@ 6980 Polaris12 6981 Lexa XT [Radeon PRO WX 3200] 6985 Lexa XT [Radeon PRO WX 3100] + 103c 83b5 Radeon PRO WX 3100 6986 Polaris12 6987 Lexa [Radeon 540X/550X/630 / RX 640 / E9171 MCM] 698f Lexa XT [Radeon PRO WX 3100 / Barco MXRT 4700] @@ -3919,6 +3962,7 @@ 73a5 Navi 21 [Radeon RX 6950 XT] 1849 5230 Navi 21 [ASRock OC Forumla Radeon RX 6950XT] 1da2 441d Navi 21 [Sapphire Nitro+ Radeon RX 6950 XT] + 1eae 6950 Navi 21 [XFX Speedster MERC319 Radeon RX 6950 XT] 73ab Navi 21 Pro-XLA [Radeon Pro W6800X/Radeon Pro W6800X Duo] 73ae Navi 21 [Radeon Pro V620 MxGPU] 73af Navi 21 [Radeon RX 6900 XT] @@ -3938,8 +3982,11 @@ 1043 16c2 Radeon RX 6800M 1458 2408 Radeon RX 6750 XT GAMING OC 12G 1462 3980 Radeon RX 6700 XT Mech 2X 12G [MSI] + 148c 2409 Red Devil RX 6700 XT 1849 5219 Radeon RX 6700 XT Challenger D 1849 5222 RX 6700 XT Challenger D OC +# Gaming 1440/QHD Overclock edition with 12 Gb GDDR6 and PCIe 4.0 of Radeon RX 6700 XT by Sapphire PULSE manufactured on autumn 2022 / C1 reviseion + 1da2 445e Radeon RX 6700 XT GAMING OC 12G [Sapphire PULSE] 1da2 465e Radeon RX 6750 XT PULSE OC 1da2 e445 Sapphire Radeon RX 6700 1eae 6601 Speedster QICK 319 RX 6700 XT @@ -3968,17 +4015,20 @@ 1da2 e457 PULSE AMD Radeon RX 6500 XT 7446 Navi 31 USB 7448 Navi 31 [Radeon Pro W7900] - 744c Navi 31 [Radeon RX 7900 XT/7900 XTX] + 744c Navi 31 [Radeon RX 7900 XT/7900 XTX/7900M] 1002 0e3b RX 7900 GRE [XFX] 1da2 471e PULSE RX 7900 XTX 1da2 e471 NITRO+ RX 7900 XTX Vapor-X 1eae 7901 RX-79XMERCB9 [SPEEDSTER MERC 310 RX 7900 XTX] 745e Navi 31 [Radeon Pro W7800] + 7470 Navi 32 [Radeon PRO W7700] 747e Navi 32 [Radeon RX 7700 XT / 7800 XT] 7480 Navi 33 [Radeon RX 7700S/7600/7600S/7600M XT/PRO W7600] 1849 5313 RX 7600 Challenger OC 7483 Navi 33 [Radeon RX 7600M/7600M XT] 7489 Navi 33 [Radeon Pro W7500] + 74a0 Aqua Vanjaram [Instinct MI300A] + 74a1 Aqua Vanjaram [Instinct MI300X] 7833 RS350 Host Bridge 7834 RS350 [Radeon 9100 PRO/XT IGP] 7835 RS350M [Mobility Radeon 9000 IGP] @@ -4362,6 +4412,7 @@ aa90 Turks HDMI Audio [Radeon HD 6500/6600 / 6700M Series] 1028 04a3 Precision M4600 aa98 Caicos HDMI Audio [Radeon HD 6450 / 7450/8450/8490 OEM / R5 230/235/235X OEM] + 1043 aa98 EAH6450 SILENT/DI/1GD3(LP) 174b aa98 Radeon HD 6450 1GB DDR3 aaa0 Tahiti HDMI Audio [Radeon HD 7870 XT / 7950/7970] aab0 Oland/Hainan/Cape Verde/Pitcairn HDMI Audio [Radeon HD 7000 Series] @@ -4835,6 +4886,7 @@ 5343 SPEA 3D Accelerator 1018 Unisys Systems 1019 Elitegroup Computer Systems + 9602 RS780/RS880 PCI to PCI bridge (int gfx) 101a AT&T GIS (NCR) 0005 100VG ethernet 0007 BYNET BIC4G/2C/2G @@ -5345,7 +5397,7 @@ 1716 Family 12h/14h Processor Function 5 1718 Family 12h/14h Processor Function 6 1719 Family 12h/14h Processor Function 7 - 2000 79c970 [PCnet32 LANCE] + 2000 79C97x [PCnet32 LANCE] 1014 2000 NetFinity 10/100 Fast Ethernet 1022 2000 PCnet - Fast 79C971 103c 104c Ethernet with LAN remote power Adapter @@ -5359,7 +5411,7 @@ 1259 2454 AT-2450v4 10Mb Ethernet Adapter 1259 2700 AT-2700TX 10/100 Fast Ethernet 1259 2701 AT-2700FX 100Mb Ethernet - 1259 2702 AT-2700FTX 10/100 Mb Fiber/Copper Fast Ethernet + 1259 2702 AT-2700FTX (AM79C976KD [PCnet-PRO] chipset) 10/100 Mb Fiber/Copper Fast Ethernet 1259 2703 AT-2701FX 1259 2704 AT-2701FTX 10/100 Mb Fiber/Copper Fast Ethernet 4c53 1000 CC7/CR7/CP7/VC7/VP7/VR7 mainboard @@ -5373,7 +5425,7 @@ 1092 0a78 Multimedia Home Network Adapter 1668 0299 ActionLink Home Network Adapter 2003 Am 1771 MBW [Alchemy] - 2020 53c974 [PCscsi] + 2020 AM53/79C974 [PC-SCSI] 1af4 1100 QEMU Virtual Machine 2040 79c974 2080 CS5536 [Geode companion] Host Bridge @@ -5418,6 +5470,10 @@ 43ee 500 Series Chipset USB 3.1 XHCI Controller # maybe 1b21 1142 ASM1042A USB 3.0 Host Controller + 43f4 600 Series Chipset PCIe Switch Upstream Port + 43f5 600 Series Chipset PCIe Switch Downstream Port + 43f6 600 Series Chipset SATA Controller + 43f7 600 Series Chipset USB 3.2 Controller 57a3 Matisse PCIe GPP Bridge 57a4 Matisse PCIe GPP Bridge 57ad Matisse Switch Upstream @@ -6404,6 +6460,7 @@ 103c Hewlett-Packard Company 1005 A4977A Visualize EG 1008 Visualize FX + 1020 548XX Scope Interface 1028 Tach TL Fibre Channel Host Adapter 1029 Tach XL2 Fibre Channel Host Adapter 107e 000f Interphase 5560 Fibre Channel Adapter @@ -6560,8 +6617,6 @@ 3010 Samurai_1 3020 Samurai_IDE 1043 ASUSTeK Computer Inc. - 0464 Radeon R9 270x GPU - 0521 RX580 [RX 580 Dual O8G] 0675 ISDNLink P-IN100-ST-D 0675 1704 ISDN Adapter (PCI Bus, D, C) 0675 1707 ISDN Adapter (PCI Bus, DV, W) @@ -7020,6 +7075,7 @@ 90dc Baikal DMA Controller 90dd Baikal Memory (DDR3/SPM) 90de Baikal USB 3.0 xHCI Host Controller + 90eb CXD90062GG 9121 Nextorage NEM-PA NVMe SSD for PlayStation 104e Oak Technology, Inc 0017 OTI-64017 @@ -7251,6 +7307,7 @@ c350 80333 [SuperTrak EX12350] e350 80333 [SuperTrak EX24350] 105b Foxconn International, Inc. + 9602 RS780/RS880 PCI to PCI bridge (int gfx) e0c3 T99W175 5G Modem [Snapdragon X55] 105c Wipro Infotech Limited 105d Number 9 Computer Company @@ -7492,7 +7549,7 @@ 1076 Chaintech Computer Co. Ltd 1077 QLogic Corp. 1016 ISP10160 Single Channel Ultra3 SCSI Processor - 1020 ISP1020 Fast-wide SCSI + 1020 ISP1020/1040 Fast-wide SCSI 1022 ISP1022 Fast-wide SCSI 1080 ISP1080 SCSI Host Adapter 1216 ISP12160 Dual Channel Ultra3 SCSI Processor @@ -10320,6 +10377,7 @@ 1043 402f AGP-V8200 DDR 1048 0c70 GLADIAC 920 0201 NV20 [GeForce3 Ti 200] + 1462 8503 G3Ti200 Pro VT128 0202 NV20 [GeForce3 Ti 500] 1043 405b V8200 T5 1545 002f Xtasy 6964 @@ -11619,6 +11677,7 @@ 1025 0753 GeForce GT 620M 1025 0754 GeForce GT 620M 17aa 3977 GeForce GT 640M LE + 1b0a 20c6 GeForce GT 630M 1b0a 2210 GeForce GT 635M 0dea GF108M [GeForce 610M] 17aa 365a GeForce 615 @@ -12477,6 +12536,9 @@ 15f7 GP100GL [Tesla P100 PCIe 12GB] 15f8 GP100GL [Tesla P100 PCIe 16GB] 15f9 GP100GL [Tesla P100 SXM2 16GB] + 15fa GP100GL [DGX Station / PH402 SKU 200] + 15fb GP100GL [GP100 SKU 200] + 15ff GP100GL [GP100 SKU 15ff] 1617 GM204M [GeForce GTX 980M] 1618 GM204M [GeForce GTX 970M] 1619 GM204M [GeForce GTX 965M] @@ -12646,6 +12708,7 @@ 10de 131d Tesla V100-SXM3-32GB-H 1dba GV100GL [Quadro GV100] 10de 12eb TITAN V CEO Edition + 1dbd GV100GL [Tesla GV100 DGX1-V] 1dbe GV100 Engineering Sample 1dc1 GV100 [CMP 100-200] 1df0 GV100GL [Tesla PG500-216] @@ -12801,6 +12864,7 @@ 21ae TU116GL 21bf TU116GL 21c2 TU116 + 21c3 TU116 21c4 TU116 [GeForce GTX 1660 SUPER] 21d1 TU116BM [GeForce GTX 1660 Ti Mobile] 2200 GA102 @@ -12846,9 +12910,10 @@ 2339 GH100 [H100 SXM5 94GB] 233a GH100 [H800L 94GB] 233d GH100 [H100 96GB] - 2342 GH100 [GH200 120GB] + 2342 GH100 [GH200 120GB / 480GB] 2343 GH100 - 2345 GH100 [GH200 480GB] + 2345 GH100 [GH100-88K-A1] + 237f GH100 [Skinny Joe] 23b0 GH100 23f0 GH100 2414 GA103 [GeForce RTX 3060 Ti] @@ -12945,25 +13010,33 @@ 25fb GA107 [RTX A500 Embedded GPU] 2681 AD102 [RTX TITAN Ada] 2684 AD102 [GeForce RTX 4090] + 2685 AD102 [GeForce RTX 4090 D] 26b1 AD102GL [RTX 6000 Ada Generation] 26b2 AD102GL [RTX 5000 Ada Generation] + 26b3 AD102GL [RTX 5880 Ada Generation] 26b5 AD102GL [L40] + 26b7 AD102GL [L20] 26b8 AD102GL [L40G] 26b9 AD102GL [L40S] + 26ba AD102GL [L20] 26f5 AD102GL [L40 CNX] + 2702 AD103 [GeForce RTX 4080 SUPER] 2703 AD103 [GeForce RTX 4080 SUPER] 2704 AD103 [GeForce RTX 4080] + 2705 AD103 [GeForce RTX 4070 Ti SUPER] 2717 GN21-X11 [GeForce RTX 4090 Laptop GPU] 2730 AD103GLM [RTX 5000 Ada Generation Laptop GPU] 2757 GN21-X11 2770 AD103GLM [RTX 5000 Ada Generation Embedded GPU] 2782 AD104 [GeForce RTX 4070 Ti] + 2783 AD104 [GeForce RTX 4070 SUPER] 2785 AD104 [AC AD104 20GB] 2786 AD104 [GeForce RTX 4070] 27a0 AD104M [GeForce RTX 4080 Max-Q / Mobile] 27b0 AD104GL [RTX 4000 SFF Ada Generation] 27b1 AD104GL [RTX 4500 Ada Generation] 27b2 AD104GL [RTX 4000 Ada Generation] + 27b6 AD104GL [L2] 27b7 AD104GL [L16] 27b8 AD104GL [L4] 27ba AD104GLM [RTX 4000 Ada Generation Laptop GPU] @@ -13193,6 +13266,7 @@ 8111 Twist3 Frame Grabber 10ec Realtek Semiconductor Co., Ltd. 0139 RTL-8139/8139C/8139C+ Ethernet Controller + 2600 Killer E2600 GbE Controller 3000 Killer E3000 2.5GbE Controller 4321 RTL8852BE 802.11ax PCIe Wireless Network Adapter 5208 RTS5208 PCI Express Card Reader @@ -13314,7 +13388,7 @@ 1458 e000 GA-MA69G-S3H Motherboard 1462 235c P965 Neo MS-7235 mainboard 1462 236c 945P Neo3-F motherboard - 8168 RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller + 8168 RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet Controller 1019 8168 RTL8111/8168 PCI Express Gigabit Ethernet controller 1025 1094 Acer Aspire E5-575G 1028 0283 Vostro 220 @@ -13353,6 +13427,7 @@ 1462 4180 Wind PC MS-7418 1462 7522 X58 Pro-E 1462 7c37 X570-A PRO motherboard + 1734 11c0 RTL8211DN on Esprimo P510 D3171 motherboard 1775 11cc CC11/CL11 17aa 3098 ThinkCentre E73 17aa 3814 Z50-75 @@ -13431,6 +13506,7 @@ c821 RTL8821CE 802.11ac PCIe Wireless Network Adapter c822 RTL8822CE 802.11ac PCIe Wireless Network Adapter c82f RTL8822CE 802.11ac PCIe Wireless Network Adapter + c852 RTL8852CE PCIe 802.11ax Wireless Network Controller d723 RTL8723DE 802.11b/g/n PCIe Adapter 10ed Ascii Corporation 7310 V7310 @@ -13690,6 +13766,8 @@ 0644 RocketRAID 644 4 Port SATA-III Controller (eSATA) 0645 RocketRAID 644L 4 Port SATA-III Controller (eSATA) 0646 RocketRAID 644LS SATA-III Controller (4 eSATA devices connected by 1 SAS cable) + 0750 Rocket 750 PCIe Gen2 SATA III Controller + 0840 RocketRAID 840 PCIe Gen3 SATA III Controller 1720 RocketRAID 1720 (2x SATA II RAID Controller) 1740 RocketRAID 1740 1742 RocketRAID 1742 @@ -13701,6 +13779,7 @@ 2322 RocketRAID 2322 SATA-II Controller 2340 RocketRAID 2340 16 Port SATA-II Controller 2640 RocketRAID 2640 SAS/SATA Controller + 2720 RocketRAID 2720 PCIe Gen2 6Gb/s SAS/SATA Controller 2722 RocketRAID 2722 # SFF-8087 Mini-SAS 16 port internal 2740 RocketRAID 2740 @@ -13708,12 +13787,21 @@ 2744 RocketRaid 2744 # SFF-8088 8 port external / SFF-8087 24 port internal 2782 RocketRAID 2782 + 2840 RocketRAID 2840 PCIe Gen3 6Gb/s SAS/SATA Controller 3120 RocketRAID 3120 3220 RocketRAID 3220 3320 RocketRAID 3320 + 3520 RocketRAID 3520 PCIe Gen1 8-Port SATA II Controller + 3530 RocketRAID 3530 PCIe Gen1 12-Port SATA II Controller + 3740 RocketRAID 3740 PCIe Gen3 12Gb/s SAS/SATA Controller 4310 RocketRaid 4310 + 4320 RocketRAID 4320 SAS Controller + 7103 SSD7103 PCIe Gen3 x16 4-Port M.2 NVMe RAID Controller + 7105 SSD7105 PCIe Gen3 x16 4-Port M.2 NVMe RAID Controller + 7110 SSD7110 PCIe Gen3 x16 NVMe RAID Controller 7505 SSD7505 PCIe Gen4 x16 4-Port M.2 NVMe RAID Controller 7540 SSD7540 PCIe Gen4 x16 8-Port M.2 NVMe RAID Controller + 7580 SSD7580 PCIe Gen4 x16 8-Port M.2 NVMe RAID Controller 1104 RasterOps Corp. 1105 Sigma Designs, Inc. 1105 REALmagic Xcard MPEG 1/2/3/4 DVD Decoder @@ -13899,6 +13987,7 @@ 1043 808c VT62xx USB1.1 4 port controller 1043 80a1 A7V8X-X motherboard 1043 80ed A7V600/K8V-X/A8V Deluxe motherboard + 1106 3038 USB 1.1 UHCI controller 1179 0001 Magnia Z310 1234 0925 MVP3 USB Controller 1458 5004 GA-7VAX Mainboard @@ -13931,6 +14020,7 @@ 1462 590d KT6 Delta-FIS2R (MS-6590) 1462 702d K8T NEO 2 motherboard 1462 971d MS-6917 + 153b 1146 Cameo DV Firewire controller 3050 VT82C596 Power Management 3051 VT82C596 Power Management 3053 VT6105M [Rhine-III] @@ -14026,7 +14116,7 @@ 1043 808c A7V8X motherboard 1043 80a1 A7V8X-X motherboard rev 1.01 1043 80ed A7V600/K8V-X/A8V Deluxe motherboard - 1106 3104 USB 2.0 Controller + 1106 3104 USB 2.0 EHCI controller 1297 f641 FX41 motherboard 1458 5004 GA-7VAX Mainboard 1462 5901 KT6 Delta-FIS2R (MS-6590) @@ -14344,6 +14434,8 @@ # Superfastcom-PCI (Commtech, Inc.) or DSCC4 WAN Adapter 2102 DSCC4 PEB/PEF 20534 DMA Supported Serial Communication Controller with 4 Channels 2104 Eicon Diva 2.02 compatible passive ISDN card +# S30807-Q5474 + 3101 HiPath 4000 PCI card 3141 SIMATIC NET CP 5611 / 5621 3142 SIMATIC NET CP 5613 / 5614 3143 SIMATIC NET CP 1613 @@ -15473,6 +15565,7 @@ 0805 SD TypA Controller 0d01 FIR Port Type-DO 1179 0001 FIR Port Type-DO + 9602 RS780/RS880 PCI to PCI bridge (int gfx) 117a A-Trend Technology 117b L G Electronics, Inc. 117c ATTO Technology, Inc. @@ -16988,7 +17081,7 @@ 1274 2000 Creative CT4810 [Sound Blaster AudioPCI 128] 1274 2003 Creative SoundBlaster AudioPCI 128 1274 5880 Creative CT4750 [Sound Blaster PCI 128] - 1274 8001 Sound Blaster 16PCI 4.1ch + 1274 8001 Creative CT4750 [Sound Blaster 16 PCI/PCI 128/4.1 Digital] 1458 a000 5880 AudioPCI On Motherboard 6OXET 1462 6880 5880 AudioPCI On Motherboard MS-6188 1.00 270f 2001 5880 AudioPCI On Motherboard 6CTR @@ -17192,6 +17285,7 @@ 1000 PXD1000 1296 Kofax Image Products 1297 Holco Enterprise Co, Ltd/Shuttle Computer + 9602 RS780/RS880 PCI to PCI bridge (int gfx) 1298 Spellcaster Telecommunications Inc. 1299 Knowledge Technology Lab. 129a VMetro, inc. @@ -17348,6 +17442,7 @@ 0009 DAC64 0018 Riva128 1048 0c10 VICTORY Erazor + 1048 0c15 VICTORY Erazor LT-8 107b 8030 STB Velocity 128 1092 0350 Viper V330 1092 1092 Viper V330 @@ -17387,13 +17482,14 @@ # PI7C9X20508GP 5Port-8Lane PCI Express Switch GreenPacket Family 0508 PI7C9X20508GP PCI Express Switch 5Port-8Lane 2304 PI7C9X2G304 EL/SL PCIe2 3-Port/4-Lane Packet Switch - 2308 PI7C9X2G308GP 8-lane PCI Express 2.0 Switch with 3 PCI Express ports + 2308 PI7C9X2G308GP 3-Ports/8-lane PCIe 2.0 Switch 2404 PI7C9X2G404 EL/SL PCIe2 4-Port/4-Lane Packet Switch 2608 PI7C9X2G608GP PCIe2 6-Port/8-Lane Packet Switch ea50 cc10 RXi2-BP - 400a PI7C9X442SL PCI Express Bridge Port - 400e PI7C9X442SL USB OHCI Controller - 400f PI7C9X442SL USB EHCI Controller + 400a PI7C9X442SL PCIe Bridge Port + 400c PI7C9X440SL PCIe Bridge Port + 400e PI7C9X440SL/PI7C9X442SL USB OHCI Controller + 400f PI7C9X440SL/PI7C9X442SL USB EHCI Controller 71e2 PI7C7300A/PI7C7300D PCI-to-PCI Bridge 71e3 PI7C7300A/PI7C7300D PCI-to-PCI Bridge (Secondary Bus 2) 8140 PI7C8140A PCI-to-PCI Bridge @@ -17402,9 +17498,11 @@ 8152 PI7C8152A/PI7C8152B/PI7C8152BI PCI-to-PCI Bridge 8154 PI7C8154A/PI7C8154B/PI7C8154BI PCI-to-PCI Bridge 8619 PI7C9X2G1616PR PCIe2 16-Port/16-Lane Packet Switch - e110 PI7C9X110 PCI Express to PCI bridge + e110 PI7C9X110 PCIe- to-PCI bridge 1775 11cc CC11/CL11 CompactPCI Bridge e111 PI7C9X111SL PCIe-to-PCI Reversible Bridge + e112 PI7C9X112SL PCIe-to-PCI Bridge + e113 PI7C9X113SL/PI7C9X118SL PCIe-to-PCI Bridge e130 PCI Express to PCI-XPI7C9X130 PCI-X Bridge 12d9 Aculab PLC 0002 PCI Prosody @@ -17798,6 +17896,7 @@ 5411 2450 NVMe SSD [HendrixV] (DRAM-less) 5413 2400 NVMe SSD (DRAM-less) 5414 3460 NVMe SSD + 5415 3500 NVMe SSD 5416 2550 NVMe SSD (DRAM-less) 6001 2100AI NVMe SSD [Nitro] 1345 Arescom Inc @@ -19945,6 +20044,7 @@ 14c3 MEDIATEK Corp. 0608 MT7921K (RZ608) Wi-Fi 6E 80MHz 0616 MT7922 802.11ax PCI Express Wireless Network Adapter + 7603 MT7603E 802.11bgn PCI Express Wireless Network Adapter 7612 MT7612E 802.11acbgn PCI Express Wireless Network Adapter 7615 MT7615E 802.11ac PCI Express Wireless Network Adapter 7630 MT7630e 802.11bgn Wireless Network Adapter @@ -19957,6 +20057,7 @@ 7922 MT7922 802.11ax PCI Express Wireless Network Adapter 1a3b 5300 ASUS PCE-AXE59BT 7961 MT7921 802.11ax PCI Express Wireless Network Adapter + 8650 MT7650 Bluetooth 14c4 IWASAKI Information Systems Co Ltd 14c5 Automation Products AB 14c6 Data Race Inc @@ -20204,6 +20305,8 @@ 14e4 d166 BCM95719-P41 4x1GBT Ethernet NIC 14e4 d366 BCM95719-N41 4x1GBT Ethernet NIC 193d 1025 NIC-ETH330T-LP-4P +# NIC-ETH330T-3S-4P 4xGE 1000Base-T for OCP3.0 + 193d 1086 NIC-ETH330T-3S-4P 1659 NetXtreme BCM5721 Gigabit Ethernet PCI Express 1014 02c6 eServer xSeries server mainboard 1028 01e6 PowerEdge 860 @@ -20485,6 +20588,8 @@ 152d 8b22 BCM57412 NetXtreme-E 25Gb RDMA Ethernet Controller # NIC-ETH531F-LP-2P BCM57412 2 x 10G SFP+ Ethernet PCIe Card 193d 1024 NIC-ETH531F-LP-2P +# NIC-ETH531F-3S-2P 2x10GbE SFP+ Adapter for OCP3.0 + 193d 1087 NIC-ETH531F-3S-2P 16d7 BCM57414 NetXtreme-E 10Gb/25Gb RDMA Ethernet Controller 117c 00cc FastFrame N422 Dual-port 25Gb Ethernet Adapter 14e4 1402 BCM957414A4142CC 10Gb/25Gb Ethernet PCIe @@ -20575,6 +20680,8 @@ 14e4 5425 NetXtreme-E Quad-port 25G SFP28 Ethernet OCP 3.0 Adapter (BCM957504-N425G) 14e4 d142 NetXtreme-E P425D BCM57504 4x25G SFP28 PCIE 1752 BCM57502 NetXtreme-E 10Gb/25Gb/40Gb/50Gb Ethernet + 1760 BCM57608 NetXtreme-E 10Gb/25Gb/50Gb/100Gb/200Gb/400Gb Ethernet + 14e4 d125 BCM57608 2x200G PCIe Ethernet NIC 1800 BCM57502 NetXtreme-E Ethernet Partition 1801 BCM57504 NetXtreme-E Ethernet Partition 1802 BCM57508 NetXtreme-E Ethernet Partition @@ -20592,6 +20699,7 @@ 1809 BCM5750X NetXtreme-E RDMA Virtual Function 14e4 df24 BCM57508 NetXtreme-E NGM2100D 2x100G KR Mezz RDMA Virtual Function 2711 BCM2711 PCIe Bridge + 2712 BCM2712 PCIe Bridge 3352 BCM3352 3360 BCM3360 4210 BCM4210 iLine10 HomePNA 2.0 @@ -21435,6 +21543,7 @@ be00 PCI Express Bridge 1557 MEDIASTAR Co Ltd 1558 CLEVO/KAPOK Computer + 9602 RS780/RS880 PCI to PCI bridge (int gfx) 1559 SI LOGIC Ltd 155a INNOMEDIA Inc 155b PROTAC INTERNATIONAL Corp @@ -21639,6 +21748,8 @@ 0283 ArcusE RMA 0284 Sagitta 0285 Sagitta RMA + 0286 LibraE Flash Recovery + 0287 LibraE RMA 1002 MT25400 Family [ConnectX-2 Virtual Function] 1003 MT27500 Family [ConnectX-3] 1014 04b5 PCIe3 40GbE RoCE Converged Host Bus Adapter for Power @@ -21817,6 +21928,7 @@ a2de BF4 Family Crypto disabled [BlueField-4 SoC Crypto disabled] a2df BF4 Family integrated network controller [BlueField-4 integrated network controller] b200 ArcusE + b201 LibraE c2d1 BlueField DPU Family Auxiliary Communication Channel [BlueField Family] c2d2 MT416842 BlueField SoC management interfac c2d3 MT42822 BlueField-2 SoC Management Interface @@ -21890,6 +22002,7 @@ 5028 WD CH SN560 NVMe SSD 5030 WD Black SN850X NVMe SSD 5041 WD Blue SN580 NVMe SSD (DRAM-less) + 5042 WD Black SN770M NVMe SSD (DRAM-less) 15b8 ADDI-DATA GmbH 1001 APCI1516 SP controller (16 digi outputs) 1003 APCI1032 SP controller (32 digi inputs w/ opto coupler) @@ -21911,6 +22024,10 @@ 117c 0022 Celerity FC-42XS Fibre Channel Adapter 117c 0025 Celerity FC-44ES Fibre Channel Adapter 117c 0026 Celerity FC-42ES Fibre Channel Adapter + 0500 Infiniium Memory Controller Interface + 0501 Infiniium Acquisition System Interface + 0507 Infiniium Acquisition System (80000 series) + 0508 Infiniium Acquisition Support 0b01 82350B PCI GPIB 1100 E8001-66442 PCI Express CIC 1218 82351A PCI Express GPIB @@ -21951,7 +22068,6 @@ 15d8 Cybernetics Technology Co Ltd 15d9 Super Micro Computer Inc 1b64 SCC-B8SB80-B1 - 1b67 AOC-S3916L-H16iR-32DD 1b9d Supermicro AOC-S3816L-L16IR 1c6e Supermicro AOC-SLG4-2H8M2 15da Cyberfirm Inc @@ -22610,6 +22726,9 @@ 7054 APA7-504 Reconfigurable Artix-7 52,160 Cell FPGA module 24 LVDS channels 7072 AP731 Multi-function I/O Module with 12-bit DAC 7073 AP730 Multi-function I/O Module 16 Digital I/O 8 Differential Analog In 4 Analog Out + 7731 APZU-301 Zynq Ultrascale+ Module 28 TTL channels + 7733 APZU-303 Zynq Ultrascale+ Module 20 TTL & 3 RS485/422 channels + 7734 APZU-304 Zynq Ultrascale+ Module 14 LVDS channels 16da Advantech Co., Ltd. 0011 INES GPIB-PCI 16df PIKA Technologies Inc. @@ -22710,6 +22829,7 @@ 13c8 AEP SureWare Runner 1000V3 # nee Fujitsu Siemens Computers GmbH 1734 Fujitsu Technology Solutions + 9602 RS780/RS880 PCI to PCI bridge (int gfx) 1735 Aten International Co. Ltd. 1737 Linksys 0029 WPG54G ver. 4 PCI Card @@ -22732,6 +22852,7 @@ 1745 ViXS Systems, Inc. 2020 XCode II Series 2100 XCode 2100 Series + 1043 48c9 My Cinema PE6200 Analoog 1749 RLX Technologies 174b PC Partner Limited / Sapphire Technology 174d WellX Telecom SA @@ -22988,6 +23109,7 @@ 0006 LENSE30512GMSP34MEAT3TA 3181 ThinkCentre M75n IoT 402b Intel 82599ES 10Gb 2-port Server Adapter X520-2 + 9602 RS780/RS880 PCI to PCI bridge (int gfx) 17ab Phillips Components 17af Hightech Information System Ltd. 17b3 Hawking Technologies @@ -23009,20 +23131,30 @@ 0002 AGN300 802.11 a/b/g True MIMO Wireless Card 1385 6d00 WPNT511 RangeMax 240 Mbps Wireless CardBus Adapter 1737 0054 WPC54GX4 v1 802.11g Wireless-G Notebook Adapter with SRX400 + 0104 APQ8096 PCIe Root Complex [Snapdragon 820] 0105 MSM8998 PCIe Root Complex + 0106 SDM850 PCIe Root Complex [Snapdragon 850] + 0107 SDM850 PCIe Root Port [Snapdragon 850] 0108 SM8150 PCIe Root Complex 0109 SA8195P PCIe Root Complex + 010b SM8250 PCIe Root Complex [Snapdragon 865/870 5G] + 010c SM8350 PCIe Root Complex [Snapdragon 888] 010e SC8280XP PCI Express Root Port + 0110 SM8475 PCIe Root Complex [Snapdragon 8+ Gen 1] 0300 MDM9x35 LTE Modem [Snapdragon X7] 0301 MDM9x45 LTE Modem [Snapdragon X12] 0302 MDM9x55 LTE Modem [Snapdragon X16] + 0304 SDX24 [Snapdragon X24 4G] + 0306 SDX55 [Snapdragon X55 5G] 0400 Datacenter Technologies QDF2432 PCI Express Root Port 0401 Datacenter Technologies QDF2400 PCI Express Root Port 1000 QCS405 PCIe Root Complex 1101 QCA6390 Wireless Network Adapter 1103 QCNFA765 Wireless Network Adapter 1104 QCN6024/9024/9074 Wireless Network Adapter - 1108 IPQ95xx/97xx PCI Express Root Port + 1107 WCN785x Wi-Fi 7(802.11be) 320MHz 2x2 [FastConnect 7800] + 105b e0f7 High Band Simultaneous Wireless Network Adapter + 1108 IPQ95xx/97xx PCIe Root Port 1109 QCN62xx/92xx Wireless Network Adapter 17cc NetChip Technology, Inc 2280 USB 2.0 @@ -23319,6 +23451,7 @@ 0701 RT2760 Wireless 802.11n 1T/2R 1737 0074 WMP110 v2 802.11n RangePlus Wireless PCI Adapter 0781 RT2790 Wireless 802.11n 1T/2R PCIe + 11ad 7600 HP WN7600R 1814 2790 RT2790 Wireless 802.11n 1T/2R PCIe 3060 RT3060 Wireless 802.11n 1T/1R 1186 3c04 DWA-525 Wireless N 150 Desktop Adapter (rev.A1) @@ -23371,6 +23504,7 @@ 08b0 MVC200-DC 1846 Alcatel-Lucent 1849 ASRock Incorporation + 9602 RS780/RS880 PCI to PCI bridge (int gfx) 184a Thales Computers 1100 MAX II cPLD 1850 Advantest Corporation @@ -23919,10 +24053,12 @@ 1043 1477 N56VZ 10a0 QCA8172 Fast Ethernet 10a1 QCA8171 Gigabit Ethernet + 2010 QCA8175 card reader controller 2048 Attansic L2 Fast Ethernet 2060 AR8152 v1.1 Fast Ethernet 2062 AR8152 v2.0 Fast Ethernet 1043 8468 Eee PC 1015PX + 3010 QCA8175 SD controller # E2200, E2201, E2205 e091 Killer E220x Gigabit Ethernet Controller e0a1 Killer E2400 Gigabit Ethernet Controller @@ -23985,7 +24121,7 @@ 16ff OX16C954 HOST-B 1987 Phison Electronics Corporation 5007 E7 NVMe Controller - 5008 E8 PCIe3 NVMe Controller + 5008 E8 PCIe3 x2 NVMe Controller 5012 E12 NVMe Controller 5013 PS5013-E13 PCIe3 NVMe Controller (DRAM-less) 5015 PS5015-E15 PCIe3 NVMe Controller (DRAM-less) @@ -23994,6 +24130,7 @@ 5019 PS5019-E19 PCIe4 NVMe Controller (DRAM-less) 5021 PS5021-E21 PCIe4 NVMe Controller (DRAM-less) 5026 PS5026-E26 PCIe5 NVMe Controller + 5027 PS5027-E27T PCIe4 NVMe Controller (DRAM-less) 1989 Montilio Inc. 0001 RapidFile Bridge 8001 RapidFile @@ -24458,41 +24595,57 @@ 1af5 Netezza Corp. 1afa J & W Electronics Co., Ltd. 1b00 Montage Technology Co., Ltd. + c001 CXL Memory Expander Controller M88MX5891 + 1ff9 00a2 CXL Memory Expander + 1ff9 00a4 CXL Memory Expander 1b03 Magnum Semiconductor, Inc, 6100 DXT/DXTPro Multiformat Broadcast HD/SD Encoder/Decoder/Transcoder 7000 D7 Multiformat Broadcast HD/SD Encoder/Decoder/Transcoder 1b08 MSC Technologies GmbH 1b0a Pegatron + 9602 RS780/RS880 PCI to PCI bridge (int gfx) 1b13 Jaton Corp 1b1a K&F Computing Research Co. 0e70 GRAPE 1b1c Corsair 1b21 ASMedia Technology Inc. - 0611 ASM1061 SATA IDE Controller - 0612 ASM1062 Serial ATA Controller + 0611 ASM1061 Serial ATA Controller + 0612 ASM1061/ASM1062 Serial ATA Controller 1849 0612 Motherboard + 0622 ASM106x Serial ATA AHCI Controller + 0624 ASM106x SATA/RAID Controller 0625 106x SATA/RAID Controller - 1040 ASM1040 XHCI Controller + 1040 ASM1040 SuperSpeed USB Host Controller + 1041 ASM1041 SuperSpeed USB Host Controller 1042 ASM1042 SuperSpeed USB Host Controller 1043 1059 K53SM motherboard 1043 8488 P8B WS Motherboard 1849 1042 Motherboard + 1064 ASM1064 Serial ATA Controller 1080 ASM1083/1085 PCIe to PCI Bridge 1849 1080 Motherboard 1142 ASM1042A USB 3.0 Host Controller + 1164 ASM1164 Serial ATA AHCI Controller 1166 ASM1166 Serial ATA Controller 1182 ASM1182e 2-Port PCIe x1 Gen2 Packet Switch 1b21 118f ASM1182e 2-Port PCIe x1 Gen2 Packet Switch 1184 ASM1184e 4-Port PCIe x1 Gen2 Packet Switch 1849 1184 ASM1184e 4-Port PCIe x1 Gen2 Packet Switch 1187 ASM1187e 7-Port PCIe x1 Gen2 Packet Switch + 118f ASM1187e 7-Port PCIe x1 Gen2 Packet Switch 1242 ASM1142 USB 3.1 Host Controller 1343 ASM1143 USB 3.1 Host Controller + 1806 ASM1806 4-Port PCIe x2 Gen2 Packet Switch 1812 ASM1812 6-Port PCIe x4 Gen2 Packet Switch + 1824 ASM1824 12-Port PCIe x8 Gen2 Packet Switch 2142 ASM2142/ASM3142 USB 3.1 Host Controller 1462 7a72 H270 PC MATE + 2806 ASM2806 4-Port PCIe x2 Gen3 Packet Switch + 2812 ASM2812 6-Port PCIe x4 Gen3 Packet Switch 2824 ASM2824 PCIe Gen3 Packet Switch 3042 ASM3042 USB 3.2 Gen 1 xHCI Controller + 3142 ASM3142 USB 3.2 Gen 2x1 xHCI Controller + 3241 ASM3241 USB 3.2 Gen 2 Host Controller 3242 ASM3242 USB 3.2 Host Controller 1b26 Netcope Technologies, a.s. c132 COMBO-LXT155 @@ -24862,7 +25015,13 @@ 1bfc Duagon AG 1bfd EeeTOP 1c00 Nanjing Qinheng Microelectronics Co., Ltd. + 2170 CH351 PCIe Parallel Port Adapter + 2273 CH351 PCIe Dual Port Serial Adapter + 3050 CH382L PCIe Parallel Port Adapter + 3250 CH384 Dual Port Serial and Parallel Port Adapter 3252 CH382 PCIe Dual Port Serial Adapter +# Device ID reused: CH352 is for PCI bus, CH382 for PCIe. + 3253 CH352/CH382 PCI/PCIe Dual Port Serial Adapter 1c09 CSP, Inc. 4254 10G-PCIE3-8D-2S 4255 10G-PCIE3-8D-Q @@ -24889,6 +25048,7 @@ 0020 FD2110 0021 FD722 0022 FD788 + 0023 FD722-M2 1c28 Lite-On IT Corp. / Plextor 0122 M6e PCI Express SSD [Marvell 88SS9183] # previously Fiberblaze @@ -24917,6 +25077,7 @@ a000 FBC2CGG3 Capture 2x40Gb [Mango_02] a001 FBC2CGG3 Capture 2x100Gb [Mango_02] a003 FBC2CGG3 Capture 16x10Gb [Mango] + a006 FBC2CGG3 Capture 2x100Gb [Mango] a007 FBC2CGG3 Capture 2x40Gb [Mango] a008 FBC2CGG3 Capture 2x25Gb [Mango] a009 FBC2CGG3 Capture 16x10Gb [Mango] @@ -24929,6 +25090,8 @@ a013 FB2CGHH Capture 2x25Gb [Tivoli] a014 FB2CGHH Capture 8x10Gb [Tivoli] a015 FB2CGHH Capture 2x100Gb [Tivoli] + a016 FB2CG Capture 8x25Gb [Savona] + a017 FB2CGHH Capture 8x25Gb [Tivoli] a017 # Used on V120 VME Crate Controller 1c32 Highland Technology, Inc. 1c33 Daktronics, Inc @@ -25144,16 +25307,19 @@ 33f4 IM2P33F4 NVMe SSD (DRAM-less) 33f8 IM2P33F8 series NVMe SSD (DRAM-less) 41c3 SM2P41C3 NVMe SSD (DRAM-less) + 41c8 SM2P41C8 NVMe SSD (DRAM-less) 5236 XPG GAMMIX S70 BLADE NVMe SSD - 5350 XPG GAMMIX S50 NVMe SSD - 5762 FALCON NVMe SSD + 5350 XPG GAMMIX S50, S50 Lite NVMe SSD +# PREMIUM NVMe SSD for PlayStation 5 + 5370 GAMMIX S70 BLADE, PS5 PREMIUM NVMe SSD + 5762 FALCON, GAMMIX S41, SPECTRIX S40G NVMe SSD (DRAM-less) 5763 XPG GAMMIX S5 NVMe SSD (DRAM-less) - 5766 ADATA XPG GAMMIXS1 1L Media (256 GB SSD) + 5766 XPG GAMMIXS1 1L, XPG GAMMIX S5, LEGEND 710 / 740, SWORDFISH NVMe SSD (DRAM-less) 612a LEGEND 750 NVMe SSD (DRAM-less) - 613a LEGEND 840 NVMe SSD (DRAM-less) + 613a ATOM 50, LEGEND 840 NVMe SSD (DRAM-less) 621a LEGEND 850 NVMe SSD (DRAM-less) 622a LEGEND 960 NVMe SSD - 624a LEGEND 700 NVMe SSD (DRAM-less) + 624a LEGEND 700, XPG GAMMIX S20 NVMe SSD (DRAM-less) # 1TB 627a LEGEND 800 NVMe SSD (DRAM-less) # 500GB @@ -25260,6 +25426,7 @@ 7164 NeuronDevice (Trainium) 1d0f 0000 Trainium 7264 NeuronDevice (Inferentia2) + 7364 NeuronDevice (Trainium2) 8061 NVMe EBS Controller cd01 NVMe SSD Controller ec20 Elastic Network Adapter (ENA) @@ -25275,55 +25442,67 @@ 0714 ZX-100/ZX-200 PCI Express Root Port 0715 ZX-100/ZX-200 PCI Express Root Port 0716 ZX-D PCI Express Root Port - 0717 KX-5000/KX-6000/KX-6000G/KH-40000 PCI Express Root Port - 0718 KX-5000/KX-6000/KX-6000G/KH-40000 PCI Express Root Port - 0719 KX-5000/KX-6000/KX-6000G/KH-40000 PCI Express Root Port + 0717 KX-5000/KX-6000/KX-6000G/KH-40000/KX-7000 PCI Express Root Port + 0718 KX-5000/KX-6000/KX-6000G/KH-40000/KX-7000 PCI Express Root Port + 0719 KX-5000/KX-6000/KX-6000G/KH-40000/KX-7000 PCI Express Root Port 071a KX-5000/KX-6000/KX-6000G/KH-40000 PCI Express Root Port - 071b KX-5000/KX-6000/KX-6000G/KH-40000 PCI Express Root Port - 071c KX-5000/KX-6000/KX-6000G/KH-40000 PCI Express Root Port + 071b KX-5000/KX-6000/KX-6000G/KH-40000/KX-7000 PCI Express Root Port + 071c KX-5000/KX-6000/KX-6000G/KH-40000/KX-7000 PCI Express Root Port 071d KX-5000/KX-6000/KX-6000G/KH-40000 PCI Express Root Port - 071e KX-5000/KX-6000/KX-6000G/KH-40000 PCI Express Root Port + 071e KX-5000/KX-6000/KX-6000G/KH-40000/KX-7000 PCI Express Root Port 071f ZX-200 Upstream Port of PCI Express Switch 0720 ZX-200 PCIE RC6 controller 0721 ZX-200 Downstream Port of PCI Express Switch 0722 ZX-200 PCIE P2C bridge 0731 KH-40000 PCI Express Root Port - 0732 KH-40000 PCI Express Root Port + 0732 KH-40000/KX-7000 PCI Express Root Port + 0733 KX-7000 PCIE Express Root Port + 0734 KX-7000 PCIE Express Root Port + 0735 KX-7000 PCIE Express Root Port + 0736 KX-7000 PCIE Express Root Port + 0737 KX-7000 PCIE Express Root Port + 0738 KX-7000 PCIE Express Root Port + 0739 KX-7000 PCIE Express Root Port + 073a KX-7000 PCIE Express Root Port + 073b KX-7000 PCIE Express Root Port 1000 ZX-D Standard Host Bridge - 1001 ZX-D/ZX-E/KH-40000 Miscellaneous Bus + 1001 ZX-D/ZX-E/KH-40000/KX-7000 Miscellaneous Bus 1003 ZX-E Standard Host Bridge 1005 KH-40000 Standard Host Bridge 1006 KX-6000G Standard Host Bridge + 1007 KX-7000 Standard Host Bridge 3001 ZX-100 Standard Host Bridge 300a ZX-100 Miscellaneous Bus - 3038 ZX-100/ZX-200/KX-6000/KX-6000G/KH-40000 Standard Universal PCI to USB Host Controller - 3104 ZX-100/ZX-200/KX-6000/KX-6000G/KH-40000 Standard Enhanced PCI to USB Host Controller - 31b0 ZX-100/KX-5000/KX-6000/KX-6000G/KH-40000 Standard Host Bridge - 31b1 ZX-100/KX-5000/KX-6000/KX-6000G/KH-40000 Standard Host Bridge - 31b2 ZX-100/KX-5000/KX-6000/KX-6000G/KH-40000 DRAM Controller - 31b3 ZX-100/KX-5000/KX-6000/KX-6000G/KH-40000 Power Management Controller - 31b4 ZX-100/KX-5000/KX-6000/KX-6000G/KH-40000 I/O APIC - 31b5 ZX-100/KX-5000/KX-6000/KX-6000G/KH-40000 Scratch Device - 31b7 ZX-100/KX-5000/KX-6000/KX-6000G/KH-40000 Standard Host Bridge + 3038 ZX-100/ZX-200/KX-6000/KX-6000G/KH-40000/KX-7000 Standard Universal PCI to USB Host Controller + 3104 ZX-100/ZX-200/KX-6000/KX-6000G/KH-40000/KX-7000 Standard Enhanced PCI to USB Host Controller + 31b0 ZX-100/KX-5000/KX-6000/KX-6000G/KH-40000/KX-7000 Standard Host Bridge + 31b1 ZX-100/KX-5000/KX-6000/KX-6000G/KH-40000/KX-7000 Standard Host Bridge + 31b2 ZX-100/KX-5000/KX-6000/KX-6000G/KH-40000/KX-7000 DRAM Controller + 31b3 ZX-100/KX-5000/KX-6000/KX-6000G/KH-40000/KX-7000 Power Management Controller + 31b4 ZX-100/KX-5000/KX-6000/KX-6000G/KH-40000/KX-7000 I/O APIC + 31b5 ZX-100/KX-5000/KX-6000/KX-6000G/KH-40000/KX-7000 Scratch Device + 31b7 ZX-100/KX-5000/KX-6000/KX-6000G/KH-40000/KX-7000 Standard Host Bridge 31b8 ZX-100/ZX-D PCI to PCI Bridge - 3288 ZX-100/KX-5000/KX-6000/KX-6000G/KH-40000 High Definition Audio Controller + 3200 KX-7000 Host Bridge + 3288 ZX-100/KX-5000/KX-6000/KX-6000G/KH-40000/KX-7000 High Definition Audio Controller 345b ZX-100/KX-5000/KX-6000/KX-6000G/KH-40000 Miscellaneous Bus 3a02 ZX-100 C-320 GPU 3a03 ZX-D C-860 GPU - 3a04 ZX-E C-960 GPU + 3a04 KX-6000 C-960 GPU + 3a05 KX-7000 C-1190 GPU 3b01 KH-40000 OPI Controller 3b02 KH-40000 OPI Controller 3b03 KH-40000 OPI Controller 3b04 KH-40000 OPI Controller *** 1250 LINES SKIPPED *** From nobody Tue Feb 27 15:26:00 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TkhCF1Km9z5Btg5; Tue, 27 Feb 2024 15:26: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 4TkhCF0bmrz4XMY; Tue, 27 Feb 2024 15:26:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709047561; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YLTn1AzBBSI6CGpciPeOOim21garxuo03PxdOYSG+ew=; b=Mq4yaF3wk/IwFRnof29D0LzI2UiBHAVoBiwnkGEp0ZaLiaGyjmrpLd4qksi4v2SgnWGoON oZT5M9xOQJYgxYWII8Iar6JnPneNuZD4NBW3m9U9gJxm7+LLHIyJAAqIwh9OHAcl/2b0Jc 0FO6ehvsidX+bZ8MS+gBr5kmNKQ5VQaVXCWTw0MuYX+tsMv01ymKiQD6hzoYLyAbch+MLd F/2ud+CKmj3Hu7UJWEKLmafyeE69efLBq1AZW7VOE873Nee7aDm9bQSwb4Pz9mXk6TtBu9 009OvEOf4BcprHYoyZcN88Sp2BsS4jGNsRT0vqVkqW0q/mlIzslI5fsB9omdPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709047561; a=rsa-sha256; cv=none; b=uFyBCiuIN/F7n48XOKW/igoH4sv/0H2HIEz0YEeUrUg+MEBDoiaT9jInR33kG4ZQGUnrhe sOwynOSV/yMPw8eZn6dYESyyi/SyWmaizxFoGiX/JjJsKjHp4z6BL/0inTHKTkjP5+WoXn 0L/30KZKtiLW8tW1yA2PZiua7YZiJXhed8KrAvJcFbIz4BvNkFYpdhRS6FqQ1oKxYanC+m XKGYJCWHMLeVA5TYCDJ49CrRATSnwBP/DCUrp1J9h5lpkAVl8hfBGwJJ+J+/Am+g9QNCxq 4QxvSd/BfQwzqNLX2d3d+LuhlmLP/q/qAQSI/CX3pWwPj6uCCQjO3pWzTw1PuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709047561; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YLTn1AzBBSI6CGpciPeOOim21garxuo03PxdOYSG+ew=; b=xlIm0Ki5Zoj+MD+zccSExosMHeKRwM+9F6rqUSOmdbIrKQllCQToZmF/aVSfpZWcx0W8TF jTaB5hukzWGGjDopo+utZZaCuWRFjjnwxlWEQE5L69mRebx9OInC+TKZdJ6yRoMDIjsjyD jVze4K9aZYIrTXpYwlAJpQx6+jzP1VgfvhlrdM8mPaStmO40tw8lO/CMmRn3njfEMbwN1+ ddONDYPqeklFLHNDwyR6Ys5htdDIHpmpiPwshnkfjABZC8HFZzaw4Pt+jkaxNpdL5UNmvp 52+9V+Fpd2NRHVhezrUTjw4nMQErYsfNQSlxew0vLXyL4W4gmf9pf5cgOzKYlA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TkhCD6lNnzHkh; Tue, 27 Feb 2024 15:26: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 41RFQ0Qx052743; Tue, 27 Feb 2024 15:26:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41RFQ05Q052740; Tue, 27 Feb 2024 15:26:00 GMT (envelope-from git) Date: Tue, 27 Feb 2024 15:26:00 GMT Message-Id: <202402271526.41RFQ05Q052740@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: 9566d9272600 - main - pf: fix packet-to-big for route-to as well List-Id: Commit messages for the main 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: 9566d9272600a472be3a608ea79197c57cad1dc3 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=9566d9272600a472be3a608ea79197c57cad1dc3 commit 9566d9272600a472be3a608ea79197c57cad1dc3 Author: Kristof Provost AuthorDate: 2024-02-27 13:24:25 +0000 Commit: Kristof Provost CommitDate: 2024-02-27 13:38:38 +0000 pf: fix packet-to-big for route-to as well When we handle a packet via route-to (i.e. pf_route6()) we still need to verify the MTU. However, we only run that check in the forwarding case. Set the PFIL_FWD tag when running the pf_test6(PF_OUT) check from pf_route6(). We are in fact forwarding, so should call the test function as such. This will cause us to run the MTU check, and generate an ICMP6 packet-too-big error when required. See also: 54c62e3e5d8cd90c5571a1d4c8c5f062d580480e See also: f1c0030bb05cfa01bdd500e50befbb425fecc4c4 See also: https://redmine.pfsense.org/issues/14290 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 4 ++-- tests/sys/netpfil/pf/nat66.py | 47 +++++++++++++++++++++++++++++++++++-------- 2 files changed, 41 insertions(+), 10 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 8bfda12b2b2e..46f01f986d05 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -7333,7 +7333,7 @@ pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, goto bad; if (pd->dir == PF_IN) { - if (pf_test(PF_OUT, 0, ifp, &m0, inp, &pd->act) != PF_PASS) + if (pf_test(PF_OUT, PFIL_FWD, ifp, &m0, inp, &pd->act) != PF_PASS) goto bad; else if (m0 == NULL) goto done; @@ -7555,7 +7555,7 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, goto bad; if (pd->dir == PF_IN) { - if (pf_test6(PF_OUT, 0, ifp, &m0, inp, &pd->act) != PF_PASS) + if (pf_test6(PF_OUT, PFIL_FWD, ifp, &m0, inp, &pd->act) != PF_PASS) goto bad; else if (m0 == NULL) goto done; diff --git a/tests/sys/netpfil/pf/nat66.py b/tests/sys/netpfil/pf/nat66.py index 006ab5afee7f..12d3cb25af0a 100644 --- a/tests/sys/netpfil/pf/nat66.py +++ b/tests/sys/netpfil/pf/nat66.py @@ -59,21 +59,23 @@ class TestNAT66(VnetTestTemplate): def vnet2_handler(self, vnet): ifname = vnet.iface_alias_map["if1"].name ToolsHelper.print_output("/sbin/ifconfig %s mtu 9000" % ifname) + outifname = vnet.iface_alias_map["if2"].name ToolsHelper.print_output("/sbin/pfctl -e") ToolsHelper.pf_rules([ "set reassemble yes", "binat inet6 from 2001:db8::/64 to 2001:db8:1::/64 -> 2001:db8:42::/64", "binat inet6 from 2001:db8:1::/64 to 2001:db8:42::/64 -> 2001:db8::/64", - "pass inet6 proto icmp6"]) + "pass inet6 proto icmp6", + "pass in route-to ( %s 2001:db8:1::2 ) inet6 from 2001:db8::3 to 2001:db8:1::/64" % outifname]) ToolsHelper.print_output("/sbin/sysctl net.inet6.ip6.forwarding=1") def vnet3_handler(self, vnet): ToolsHelper.print_output("/sbin/route add -6 2001:db8:42::/64 2001:db8:1::1") - def check_icmp_too_big(self, sp, payload_size, frag_size=None): - packet = sp.IPv6(src="2001:db8::2", dst="2001:db8:1::2") \ + def check_icmp_too_big(self, sp, payload_size, frag_size=None, src="2001:db8::2"): + packet = sp.IPv6(src=src, dst="2001:db8:1::2") \ / sp.ICMPv6EchoRequest(data=sp.raw(bytes.fromhex('f0') * payload_size)) if frag_size is not None: @@ -97,14 +99,14 @@ class TestNAT66(VnetTestTemplate): # Error is from the router vnet assert ip6.src == "2001:db8::1" - assert ip6.dst == "2001:db8::2" + assert ip6.dst == src # And the relevant MTU is 1500 assert icmp6.mtu == 1500 # The icmp6 error contains our original IPv6 packet err = icmp6.getlayer(sp.IPerror6) - assert err.src == "2001:db8::2" + assert err.src == src assert err.dst == "2001:db8:1::2" assert err.nh == 58 @@ -112,8 +114,8 @@ class TestNAT66(VnetTestTemplate): assert found - def check_icmp_echo(self, sp, payload_size): - packet = sp.IPv6(src="2001:db8::2", dst="2001:db8:1::2") \ + def check_icmp_echo(self, sp, payload_size, src="2001:db8::2"): + packet = sp.IPv6(src=src, dst="2001:db8:1::2") \ / sp.ICMPv6EchoRequest(data=sp.raw(bytes.fromhex('f0') * payload_size)) # Delay the send so the sniffer is running when we transmit. @@ -131,7 +133,7 @@ class TestNAT66(VnetTestTemplate): # Error is from the router vnet assert ip6.src == "2001:db8:1::2" - assert ip6.dst == "2001:db8::2" + assert ip6.dst == src found = True @@ -164,3 +166,32 @@ class TestNAT66(VnetTestTemplate): # A ping that arrives fragmented self.check_icmp_too_big(sp, 12000, 5000) + + @pytest.mark.require_user("root") + def test_npt_route_to_icmp(self): + cl_vnet = self.vnet_map["vnet1"] + ifname = cl_vnet.iface_alias_map["if1"].name + ToolsHelper.print_output("/sbin/ifconfig %s mtu 9000" % ifname) + ToolsHelper.print_output("/sbin/ifconfig %s inet6 alias 2001:db8::3/64" % ifname) + + ToolsHelper.print_output("/sbin/route add -6 2001:db8:1::/64 2001:db8::1") + + # For unclear reasons vnet3 doesn't respond to the first ping. + # Just send two for now. + ToolsHelper.print_output("/sbin/ping -6 -c 1 -S 2001:db8::3 2001:db8:1::2") + ToolsHelper.print_output("/sbin/ping -6 -c 1 -S 2001:db8::3 2001:db8:1::2") + + # Import in the correct vnet, so at to not confuse Scapy + import scapy.all as sp + + # A ping that easily passes without fragmentation + self.check_icmp_echo(sp, 128, src="2001:db8::3") + + # Send a ping that just barely doesn't need to be fragmented + self.check_icmp_echo(sp, 1452, src="2001:db8::3") + + # Send a ping that just barely needs to be fragmented + self.check_icmp_too_big(sp, 1453, src="2001:db8::3") + + # A ping that arrives fragmented + self.check_icmp_too_big(sp, 12000, 5000, src="2001:db8::3") From nobody Tue Feb 27 16:39:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tkjqg5y9nz5C1Lc; Tue, 27 Feb 2024 16:39:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tkjqg5VFHz4drv; Tue, 27 Feb 2024 16:39:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709051951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sXEgwB/jAzQNGqWvHGyf6ZTBa/J6ODEpk397+N2BIwA=; b=wYqAjmjPbmOYsdzpPvSP4xb9w87WNJHlXs9i8whXlBSHFa3rSCs8+WJgUMQOYAm4ZNT5BO w5et79iZUyzByGqICJdxY3bgfSl2AWtd9H2xkeMpfF0M0A4aFrzfhQVd7RWi13EPS1a9Ad OgOM9aZRQuIdV3K2jPEQ1aBIoPzqEVRieC3s9mws92plV4hXub33iCUP9X+9cDsjbccX9G J4iD44QrWc9xWxcRETMXzyH+OZRnwLtNgSv2p0jTtTn16L/c1h9I2s3F/4EgZ2CJKySNQH Wy+Ohu0+7IFg3X4g5nMvCm1stqLP+j75NecobgZDezw9HG/tmkVMybSQlAXuhg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709051951; a=rsa-sha256; cv=none; b=HHTniy9HB8K33vJzhn7zug8PvMxbXBUn4Qj2mGzY0GTTYB0WM1KNeXTesmkus6lFqwCnx1 ZuR04F4QPQGloRczlosm8SnLqKMfVbXFqv8FyyhGPdjhUguiu6dIHgQfACHOVYItf+H6g0 0F8jxD2bPp8sEFJ2gVL1JDh1L6otmS/KTNylPVc/7XJOoE1QFOokGvsCCQW/U9AzUngS3l 6/KfsffOhjtazGqRaF53hV3iZ5dVpQ+QmyA/qxKA3vkpclWThg7zLW4twj07WmpgQXdwId 2A+ACl7tNlN8Sf49HMABQm8DUjlbwkq5MK9YPhwR5JjurCs8k1j4R9jp6eUiig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709051951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sXEgwB/jAzQNGqWvHGyf6ZTBa/J6ODEpk397+N2BIwA=; b=IscLWXTB838eBoWlhxDI9ZVXI93H4vrP1e6M+shZVx+rJH71kuK1rte8nNjhOITVtePB3i upUtjun2pcIigrHEUI/ywIRF03Zykgg0QQYPCZCsjZ2cJLewIU6JxLFj+7G+T3jeE6Zns/ wGC30yYPOjTtoedh1uolV42whBvmAWsB5vNyiRgzOftReQd30Ba1zjG70B4crfnHjg85LM +YbZEdW1IpAe0ql4CCp04+MYf0gpK0NrDZL5xVolEYpPxnbGjl5CMYbPmEN3YKEyI5XFb9 ZvwjBzvD68vXE3IfLHfQZaAhMcOAsyZzndTRqPq3091ibo8ZeZURAuFJ7WwlHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tkjqg4Y1KzKdB; Tue, 27 Feb 2024 16:39: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 41RGdBVS071101; Tue, 27 Feb 2024 16:39:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41RGdBaX071098; Tue, 27 Feb 2024 16:39:11 GMT (envelope-from git) Date: Tue, 27 Feb 2024 16:39:11 GMT Message-Id: <202402271639.41RGdBaX071098@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: e2f364961369 - main - bxe(4): Fix two typos in a kernel 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e2f36496136975d4b591b230a71986f1508629c1 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=e2f36496136975d4b591b230a71986f1508629c1 commit e2f36496136975d4b591b230a71986f1508629c1 Author: Gordon Bergling AuthorDate: 2024-02-27 16:38:53 +0000 Commit: Gordon Bergling CommitDate: 2024-02-27 16:38:53 +0000 bxe(4): Fix two typos in a kernel messages - s/successfull/successful/ MFC after: 3 days --- sys/dev/bxe/bxe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/bxe/bxe.c b/sys/dev/bxe/bxe.c index 36b03ee5c135..8350d02cb2a3 100644 --- a/sys/dev/bxe/bxe.c +++ b/sys/dev/bxe/bxe.c @@ -12516,7 +12516,7 @@ bxe_parity_recover(struct bxe_softc *sc) error_unrecovered++; sc->recovery_state = BXE_RECOVERY_FAILED; sc->state = BXE_STATE_ERROR; - BLOGE(sc, "Recovery is NOT successfull, " + BLOGE(sc, "Recovery is NOT successful, " " state=0x%x recovery_state=0x%x error=%x\n", sc->state, sc->recovery_state, sc->error_status); sc->error_status = 0; @@ -12524,7 +12524,7 @@ bxe_parity_recover(struct bxe_softc *sc) sc->recovery_state = BXE_RECOVERY_DONE; error_recovered++; - BLOGI(sc, "Recovery is successfull from errors %x," + BLOGI(sc, "Recovery is successful from errors %x," " state=0x%x" " recovery_state=0x%x \n", sc->error_status, sc->state, sc->recovery_state); From nobody Tue Feb 27 16:40:06 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tkjrl1RjCz5C1HH; Tue, 27 Feb 2024 16:40: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 4Tkjrl00Ydz4fPl; Tue, 27 Feb 2024 16:40:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709052007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uexoLvn30CAqfrjSm6cMvAR+tidlTARYt1eNnXMmOIk=; b=IzGP5fKkHBvUMydWdT4VU1bzn+SSIBFir6BOHQ6zj35tKaEbjWn/QCfAdXRVOI6rZwnj7I XgnR8ppqR0K9CS2+fURQw93LvbvOwnn9aKCL9132mCKVDTH1x7csAGTqOUdt/4PIrRZFsp 0ZKl8rH6Q9f+nsYCQQiA459lAyUnVddtcVYawajWPBeY42Om6mDFdsIJxSGyoE2IwBZUwv wHpo4IV3Zdb8il3pVhUF5d4vVRYnGm80yl0lDSXWe2krXdyqj1gcvbs4j1fXUZA2sl8PAu wkPxsA8o99t8irQi1iFMsTv1wx1ZutGY1acQNheuMsGUoYlxfHLvEPi+5gZv2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709052007; a=rsa-sha256; cv=none; b=v1ePo/D/lsRVoyk2JhNDuJ3xRWndturBUwmPxvOozFZwUmQZQCKirF5kt5BpHApP754Hqi OqFzv7l38r10WL09xp0IDGTluOFgiZ07wuyvUF3IZUGw90f8nbNDK3pKwoashtLuyE78zn Fsw47w0kPSCpcQN55x2/69OZpZIQtCZ1zRZdkiwf7DtQVKtK7mP6cH3zpKvoePnTP8Bgve n1hayW8+HXhYpo/bsQ/LSLntVgT2WfXHLNjuaazfZD9xFayI9BexCC2FX9gyRgLosBPRdI N5uGw8RQFjGzlOQeeq15ywjQuL82mRExunlt2vIcihZM5LIzXNrlByzVrhGcBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709052007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uexoLvn30CAqfrjSm6cMvAR+tidlTARYt1eNnXMmOIk=; b=JGL4lS86K8v2etIhHiaQunOGL5ZAyXd+z9yg3URlzmOYOSgjuFTxF0y0mL9ZLhp+RWh4PW q3juk/CvamCGPknL3ELH7XrAqWi/36dXe2QlUMbv3EKvj0fAp+nT52d9FTdY/EPtVrI1AN wI8V53ugsar7r4tZsqR1ZMcejFAH379hGDPLatCg1a2+0jz5Nq4KvnqfRoCHwV63OzDkD1 D3ik7BGykAo1bKTrer/2dKf6HwJhpOt8x4yuuIMV7kb3BtvU+QYHPtVio0ObkoOSMji8op 9R7zXV4RawBVcuCGWAfO0Rf9ecK1QgnwNM/NU1owM7R6x5CqNBJ1Kbg/gI/jZw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tkjrk6920zKFs; Tue, 27 Feb 2024 16:40: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 41RGe6vZ074280; Tue, 27 Feb 2024 16:40:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41RGe6ul074275; Tue, 27 Feb 2024 16:40:06 GMT (envelope-from git) Date: Tue, 27 Feb 2024 16:40:06 GMT Message-Id: <202402271640.41RGe6ul074275@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 6bce41a38e32 - main - carp(4): Fix a typo in a source code 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6bce41a38e32decbce80bb1586cdd9400c83eb97 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=6bce41a38e32decbce80bb1586cdd9400c83eb97 commit 6bce41a38e32decbce80bb1586cdd9400c83eb97 Author: Gordon Bergling AuthorDate: 2024-02-27 16:39:57 +0000 Commit: Gordon Bergling CommitDate: 2024-02-27 16:39:57 +0000 carp(4): Fix a typo in a source code comment - s/successfull/successful/ MFC after: 3 days --- sys/netinet/ip_carp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 66ec28e49af3..ddbc13e7c878 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -885,7 +885,7 @@ carp_send_ad_error(struct carp_softc *sc, int error) { /* - * We track errors and successfull sends with this logic: + * We track errors and successful sends with this logic: * - Any error resets success counter to 0. * - MAX_ERRORS triggers demotion. * - MIN_SUCCESS successes resets error counter to 0. From nobody Tue Feb 27 18:52:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tkmnh3KGlz5CF23; Tue, 27 Feb 2024 18: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 4Tkmnh2V1Hz51Vs; Tue, 27 Feb 2024 18: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=1709059960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FqMVvScY5TE3MSvi9AV3beQqRFC/jYXhTNNZHm8IXik=; b=xkdctNwvUsdwcHtL0RrWkNkFlATwlSyU5Q40xoxOTKJi60teBAUcqml6LCWVqOGscImact ZsHQX8rEV5LgWE2Gvo/L3ux6ls/wZU4Ma9GnrOKNB0Y2WqTzpvNB478eDOXEXD7ZAbCj6U JcKOcHPy0tOEqRwd7/z/xkk9clnAwUDdS5G24asjciOfWri8z/I3Bw52IslZngIKCiEsNm DBzR5YAKvcgAqBvymggk90hAK0HYTdzQECVuP/oL9K9gshbe4LzLCeiO3y5HEZ9J1d7saz DbT/qG3zepX3jWSeXS0Rmruq/ZYSvVBjOPIXq1a+ammQInNTDr/JQkEeEGcHOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709059960; a=rsa-sha256; cv=none; b=Zp8gftU3s8wpBFn9Izxm89XUdqCp+6XCVmuCJmuF9RM4ykZVkddiqWxQkPXB9wgQe6dOct oaImycC6Opxfn9PTE6di7ZNZ4f4pjLqP66szc9RQWktRy2beN1skvXCgb69b4rwZUK3IPf 39AuhhEKZybepWz/g3G1AsMFFGqoWNSHm7xuZVcg20Q7MmeXaGNgJMIHB7g/tvCPTVrhts ZMWnWdCEh5jIhdqQPhcKFcpKXUrEuIypADodFwbijCi8N+dLe8U0IKwvKuDzGFq7R8s9Cu batz6RHKXF7atS2KIu99ZQYTM4uevCwzks9/ggupYD0nYPqZnrtXT0w3daeWGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709059960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FqMVvScY5TE3MSvi9AV3beQqRFC/jYXhTNNZHm8IXik=; b=o0GPaKtMsVqCCrlhxywHmFQXm4m6p+kepowekgX3/H8ipQmw1z9kK4GWRHeEclxHUPJ+zr fjDIn0jkHjhoUayb92poEkXEUxMVp5YeVPl2qH1lMhQiYcluebcPNeLEb3U00WDiKvxzEa L+KKqOXbtHTD+EMThOlWNR3evyeiuBOd2BQ1Xzwjfg7LEPsq5oRhqjlsroGDs04/uoMBBW 7yKD4EVk2GB9nZK/YBmy+SCihEj+d0OnBBBVaz9wLPHmzM+iTXM4JIO2Ro3E5CyFo0bT/2 gfypkWpd8ZIhyfu6HBoY2VVbtZPSbSwTNZwXJHeRmmKjLFviXbhIIQ9k+lMeuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tkmnh1WjYzPnQ; Tue, 27 Feb 2024 18: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 41RIqeqD007629; Tue, 27 Feb 2024 18: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 41RIqeLD007626; Tue, 27 Feb 2024 18:52:40 GMT (envelope-from git) Date: Tue, 27 Feb 2024 18:52:40 GMT Message-Id: <202402271852.41RIqeLD007626@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: 7c667affb7b0 - main - CTL: Drop Format Device and Rigid Disk Geometry mode pages List-Id: Commit messages for the main 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: 7c667affb7b09fcdcb81f6f2635e9dfab7bc1fa8 Auto-Submitted: auto-generated The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=7c667affb7b09fcdcb81f6f2635e9dfab7bc1fa8 commit 7c667affb7b09fcdcb81f6f2635e9dfab7bc1fa8 Author: Alexander Motin AuthorDate: 2024-02-27 18:28:44 +0000 Commit: Alexander Motin CommitDate: 2024-02-27 18:28:44 +0000 CTL: Drop Format Device and Rigid Disk Geometry mode pages Those mode pages are obsolete since SBC-2 specification almost 20 years ago. First I was trying to understand possible relations between physical block and physical sector terms in different specs. Then was thinking about possible relations to device CHS geometry and compatibility issues. Finally I just decided that none of it worth the efforts and should rest in piece. PR: 276524 --- sys/cam/ctl/ctl.c | 194 ---------------------------------------------- sys/cam/ctl/ctl_private.h | 63 --------------- 2 files changed, 257 deletions(-) diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index 3d6eb0382cc9..5230a2694544 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -124,72 +124,6 @@ const static struct scsi_da_rw_recovery_page rw_er_page_changeable = { /*recovery_time_limit*/{0, 0}, }; -const static struct scsi_format_page format_page_default = { - /*page_code*/SMS_FORMAT_DEVICE_PAGE, - /*page_length*/sizeof(struct scsi_format_page) - 2, - /*tracks_per_zone*/ {0, 0}, - /*alt_sectors_per_zone*/ {0, 0}, - /*alt_tracks_per_zone*/ {0, 0}, - /*alt_tracks_per_lun*/ {0, 0}, - /*sectors_per_track*/ {(CTL_DEFAULT_SECTORS_PER_TRACK >> 8) & 0xff, - CTL_DEFAULT_SECTORS_PER_TRACK & 0xff}, - /*bytes_per_sector*/ {0, 0}, - /*interleave*/ {0, 0}, - /*track_skew*/ {0, 0}, - /*cylinder_skew*/ {0, 0}, - /*flags*/ SFP_HSEC, - /*reserved*/ {0, 0, 0} -}; - -const static struct scsi_format_page format_page_changeable = { - /*page_code*/SMS_FORMAT_DEVICE_PAGE, - /*page_length*/sizeof(struct scsi_format_page) - 2, - /*tracks_per_zone*/ {0, 0}, - /*alt_sectors_per_zone*/ {0, 0}, - /*alt_tracks_per_zone*/ {0, 0}, - /*alt_tracks_per_lun*/ {0, 0}, - /*sectors_per_track*/ {0, 0}, - /*bytes_per_sector*/ {0, 0}, - /*interleave*/ {0, 0}, - /*track_skew*/ {0, 0}, - /*cylinder_skew*/ {0, 0}, - /*flags*/ 0, - /*reserved*/ {0, 0, 0} -}; - -const static struct scsi_rigid_disk_page rigid_disk_page_default = { - /*page_code*/SMS_RIGID_DISK_PAGE, - /*page_length*/sizeof(struct scsi_rigid_disk_page) - 2, - /*cylinders*/ {0, 0, 0}, - /*heads*/ CTL_DEFAULT_HEADS, - /*start_write_precomp*/ {0, 0, 0}, - /*start_reduced_current*/ {0, 0, 0}, - /*step_rate*/ {0, 0}, - /*landing_zone_cylinder*/ {0, 0, 0}, - /*rpl*/ SRDP_RPL_DISABLED, - /*rotational_offset*/ 0, - /*reserved1*/ 0, - /*rotation_rate*/ {(CTL_DEFAULT_ROTATION_RATE >> 8) & 0xff, - CTL_DEFAULT_ROTATION_RATE & 0xff}, - /*reserved2*/ {0, 0} -}; - -const static struct scsi_rigid_disk_page rigid_disk_page_changeable = { - /*page_code*/SMS_RIGID_DISK_PAGE, - /*page_length*/sizeof(struct scsi_rigid_disk_page) - 2, - /*cylinders*/ {0, 0, 0}, - /*heads*/ 0, - /*start_write_precomp*/ {0, 0, 0}, - /*start_reduced_current*/ {0, 0, 0}, - /*step_rate*/ {0, 0}, - /*landing_zone_cylinder*/ {0, 0, 0}, - /*rpl*/ 0, - /*rotational_offset*/ 0, - /*reserved1*/ 0, - /*rotation_rate*/ {0, 0}, - /*reserved2*/ {0, 0} -}; - const static struct scsi_da_verify_recovery_page verify_er_page_default = { /*page_code*/SMS_VERIFY_ERROR_RECOVERY_PAGE, /*page_length*/sizeof(struct scsi_da_verify_recovery_page) - 2, @@ -4124,134 +4058,6 @@ ctl_init_page_index(struct ctl_lun *lun) (uint8_t *)lun->mode_pages.rw_er_page; break; } - case SMS_FORMAT_DEVICE_PAGE: { - struct scsi_format_page *format_page; - - KASSERT(page_index->subpage == SMS_SUBPAGE_PAGE_0, - ("subpage %#x for page %#x is incorrect!", - page_index->subpage, page_code)); - - /* - * Sectors per track are set above. Bytes per - * sector need to be set here on a per-LUN basis. - */ - memcpy(&lun->mode_pages.format_page[CTL_PAGE_CURRENT], - &format_page_default, - sizeof(format_page_default)); - memcpy(&lun->mode_pages.format_page[ - CTL_PAGE_CHANGEABLE], &format_page_changeable, - sizeof(format_page_changeable)); - memcpy(&lun->mode_pages.format_page[CTL_PAGE_DEFAULT], - &format_page_default, - sizeof(format_page_default)); - memcpy(&lun->mode_pages.format_page[CTL_PAGE_SAVED], - &format_page_default, - sizeof(format_page_default)); - - format_page = &lun->mode_pages.format_page[ - CTL_PAGE_CURRENT]; - scsi_ulto2b(lun->be_lun->blocksize, - format_page->bytes_per_sector); - - format_page = &lun->mode_pages.format_page[ - CTL_PAGE_DEFAULT]; - scsi_ulto2b(lun->be_lun->blocksize, - format_page->bytes_per_sector); - - format_page = &lun->mode_pages.format_page[ - CTL_PAGE_SAVED]; - scsi_ulto2b(lun->be_lun->blocksize, - format_page->bytes_per_sector); - - page_index->page_data = - (uint8_t *)lun->mode_pages.format_page; - break; - } - case SMS_RIGID_DISK_PAGE: { - struct scsi_rigid_disk_page *rigid_disk_page; - uint32_t sectors_per_cylinder; - uint64_t cylinders; -#ifndef __XSCALE__ - int shift; -#endif /* !__XSCALE__ */ - - KASSERT(page_index->subpage == SMS_SUBPAGE_PAGE_0, - ("subpage %#x for page %#x is incorrect!", - page_index->subpage, page_code)); - - /* - * Rotation rate and sectors per track are set - * above. We calculate the cylinders here based on - * capacity. Due to the number of heads and - * sectors per track we're using, smaller arrays - * may turn out to have 0 cylinders. Linux and - * FreeBSD don't pay attention to these mode pages - * to figure out capacity, but Solaris does. It - * seems to deal with 0 cylinders just fine, and - * works out a fake geometry based on the capacity. - */ - memcpy(&lun->mode_pages.rigid_disk_page[ - CTL_PAGE_DEFAULT], &rigid_disk_page_default, - sizeof(rigid_disk_page_default)); - memcpy(&lun->mode_pages.rigid_disk_page[ - CTL_PAGE_CHANGEABLE],&rigid_disk_page_changeable, - sizeof(rigid_disk_page_changeable)); - - sectors_per_cylinder = CTL_DEFAULT_SECTORS_PER_TRACK * - CTL_DEFAULT_HEADS; - - /* - * The divide method here will be more accurate, - * probably, but results in floating point being - * used in the kernel on i386 (__udivdi3()). On the - * XScale, though, __udivdi3() is implemented in - * software. - * - * The shift method for cylinder calculation is - * accurate if sectors_per_cylinder is a power of - * 2. Otherwise it might be slightly off -- you - * might have a bit of a truncation problem. - */ -#ifdef __XSCALE__ - cylinders = (lun->be_lun->maxlba + 1) / - sectors_per_cylinder; -#else - for (shift = 31; shift > 0; shift--) { - if (sectors_per_cylinder & (1 << shift)) - break; - } - cylinders = (lun->be_lun->maxlba + 1) >> shift; -#endif - - /* - * We've basically got 3 bytes, or 24 bits for the - * cylinder size in the mode page. If we're over, - * just round down to 2^24. - */ - if (cylinders > 0xffffff) - cylinders = 0xffffff; - - rigid_disk_page = &lun->mode_pages.rigid_disk_page[ - CTL_PAGE_DEFAULT]; - scsi_ulto3b(cylinders, rigid_disk_page->cylinders); - - if ((value = dnvlist_get_string(lun->be_lun->options, - "rpm", NULL)) != NULL) { - scsi_ulto2b(strtol(value, NULL, 0), - rigid_disk_page->rotation_rate); - } - - memcpy(&lun->mode_pages.rigid_disk_page[CTL_PAGE_CURRENT], - &lun->mode_pages.rigid_disk_page[CTL_PAGE_DEFAULT], - sizeof(rigid_disk_page_default)); - memcpy(&lun->mode_pages.rigid_disk_page[CTL_PAGE_SAVED], - &lun->mode_pages.rigid_disk_page[CTL_PAGE_DEFAULT], - sizeof(rigid_disk_page_default)); - - page_index->page_data = - (uint8_t *)lun->mode_pages.rigid_disk_page; - break; - } case SMS_VERIFY_ERROR_RECOVERY_PAGE: { KASSERT(page_index->subpage == SMS_SUBPAGE_PAGE_0, ("subpage %#x for page %#x is incorrect!", diff --git a/sys/cam/ctl/ctl_private.h b/sys/cam/ctl/ctl_private.h index 04846f80e913..9dfe979bcb7f 100644 --- a/sys/cam/ctl/ctl_private.h +++ b/sys/cam/ctl/ctl_private.h @@ -168,61 +168,6 @@ union ctl_softcs { /* * Mode page defaults. */ -#if 0 -/* - * These values make Solaris trim off some of the capacity. - */ -#define CTL_DEFAULT_SECTORS_PER_TRACK 63 -#define CTL_DEFAULT_HEADS 255 -/* - * These values seem to work okay. - */ -#define CTL_DEFAULT_SECTORS_PER_TRACK 63 -#define CTL_DEFAULT_HEADS 16 -/* - * These values work reasonably well. - */ -#define CTL_DEFAULT_SECTORS_PER_TRACK 512 -#define CTL_DEFAULT_HEADS 64 -#endif - -/* - * Solaris is somewhat picky about how many heads and sectors per track you - * have defined in mode pages 3 and 4. These values seem to cause Solaris - * to get the capacity more or less right when you run the format tool. - * They still have problems when dealing with devices larger than 1TB, - * but there isn't anything we can do about that. - * - * For smaller LUN sizes, this ends up causing the number of cylinders to - * work out to 0. Solaris actually recognizes that and comes up with its - * own bogus geometry to fit the actual capacity of the drive. They really - * should just give up on geometry and stick to the read capacity - * information alone for modern disk drives. - * - * One thing worth mentioning about Solaris' mkfs command is that it - * doesn't like sectors per track values larger than 256. 512 seems to - * work okay for format, but causes problems when you try to make a - * filesystem. - * - * Another caveat about these values: the product of these two values - * really should be a power of 2. This is because of the simplistic - * shift-based calculation that we have to use on the i386 platform to - * calculate the number of cylinders here. (If you use a divide, you end - * up calling __udivdi3(), which is a hardware FP call on the PC. On the - * XScale, it is done in software, so you can do that from inside the - * kernel.) - * - * So for the current values (256 S/T, 128 H), we get 32768, which works - * very nicely for calculating cylinders. - * - * If you want to change these values so that their product is no longer a - * power of 2, re-visit the calculation in ctl_init_page_index(). You may - * need to make it a bit more complicated to get the number of cylinders - * right. - */ -#define CTL_DEFAULT_SECTORS_PER_TRACK 256 -#define CTL_DEFAULT_HEADS 128 - #define CTL_DEFAULT_ROTATION_RATE SVPD_NON_ROTATING struct ctl_page_index; @@ -271,10 +216,6 @@ struct ctl_logical_block_provisioning_page { static const struct ctl_page_index page_index_template[] = { {SMS_RW_ERROR_RECOVERY_PAGE, 0, sizeof(struct scsi_da_rw_recovery_page), NULL, CTL_PAGE_FLAG_DIRECT | CTL_PAGE_FLAG_CDROM, NULL, ctl_default_page_handler}, - {SMS_FORMAT_DEVICE_PAGE, 0, sizeof(struct scsi_format_page), NULL, - CTL_PAGE_FLAG_DIRECT, NULL, NULL}, - {SMS_RIGID_DISK_PAGE, 0, sizeof(struct scsi_rigid_disk_page), NULL, - CTL_PAGE_FLAG_DIRECT, NULL, NULL}, {SMS_VERIFY_ERROR_RECOVERY_PAGE, 0, sizeof(struct scsi_da_verify_recovery_page), NULL, CTL_PAGE_FLAG_DIRECT | CTL_PAGE_FLAG_CDROM, NULL, ctl_default_page_handler}, {SMS_CACHING_PAGE, 0, sizeof(struct scsi_caching_page), NULL, @@ -300,8 +241,6 @@ static const struct ctl_page_index page_index_template[] = { struct ctl_mode_pages { struct scsi_da_rw_recovery_page rw_er_page[4]; - struct scsi_format_page format_page[4]; - struct scsi_rigid_disk_page rigid_disk_page[4]; struct scsi_da_verify_recovery_page verify_er_page[4]; struct scsi_caching_page caching_page[4]; struct scsi_control_page control_page[4]; @@ -313,8 +252,6 @@ struct ctl_mode_pages { }; #define MODE_RWER mode_pages.rw_er_page[CTL_PAGE_CURRENT] -#define MODE_FMT mode_pages.format_page[CTL_PAGE_CURRENT] -#define MODE_RDISK mode_pages.rigid_disk_page[CTL_PAGE_CURRENT] #define MODE_VER mode_pages.verify_er_page[CTL_PAGE_CURRENT] #define MODE_CACHING mode_pages.caching_page[CTL_PAGE_CURRENT] #define MODE_CTRL mode_pages.control_page[CTL_PAGE_CURRENT] From nobody Tue Feb 27 19:45:03 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tkny76p0Yz5CJpp; Tue, 27 Feb 2024 19:45:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tkny76J9bz56yw; Tue, 27 Feb 2024 19:45:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709063103; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U76g92ywWRar5mGhxmlFx6m2Irk7kWZq6CkfH7BOZIg=; b=tl/ZVYbn34cxjOompjgZOeUXSsYw+sykAJuDOxFBbACsJS6IFqJNdD4++/lkhq+4wRCJyl KtJ72roGnuIwBl0Rw6FlS4lAgVA2fXJ4DkeweZjT7huGG06gR/nqv821bJZUpN0xbWtDuA SgMFfYNZLez9Mpvn/8VpOfiDHrMNdfeDV8VZb5MrXjsG3AYBajjDdjusZyaIaz/dnQieeM iZr0H6YHSjxrfJ932W5qKZ9TUMxfaN0LNqFT+K048z6WtrM/mpkurlPooWmcJ0/6oK1PvL YSYZA/+fok3Mtr10qpuEFXUh9asihLsQK0U4x3qLCO0Guu4hchezz9EV5058fw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709063103; a=rsa-sha256; cv=none; b=UB3tYwJq7sMhlzk+ppIij43W77wv2qVThjvZJ2KM8C0hqO4tfri69awRROkRLiX1ogSWd/ h1aJtB2flsoPPaj/LJfuC9RsFlMcuagYF7V7jiCikaluWeQz9jhRVvi57jtUvSAY4FnlJI /SlnqJZEJvvJCPG9RcCqJlSnPhCAgwU0dZ2/eA7KIUCZQMLaVqFi/zvJXXfM6ArJKFPHT4 L1/xqaJbOkfYLsL18qFcp8HDLFYXqrK3Vekbmxx7mdyEB9YJ+SQ4vVzUjFOXpeLLOKecoB ndzdd6OozZKEQzEs29E/VWWjDD7dP53QrGjnvYnw7lvGMnDG4RhK1zIYfMCipg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709063103; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U76g92ywWRar5mGhxmlFx6m2Irk7kWZq6CkfH7BOZIg=; b=HgbakhKEejMIDQKl/xE6gKlIuW0Xpn0G3XWGgkhHPp1BbTkQk7vd8G2SAB4QO8M2gW4+7Z fkyzDWHLT6BS0QNqSRhOW6KA7GZFzPqGerlKpGSqEkxY+CcAJ7hvhosgPIVD8CPXzjaq5C y1GdIRd0kSS3b0JuWNrVQ3ciE11WzWSSOkZdHrdZR9TqaulfDYBbfLfBSrghS9MHxWf/fY p6qNlETpmKdch7/78u/ubhHrPY1JSV3NkImwMMSepPVEnUBG1UBasAzik7g4Pl29CQiv+F 2OFFJQZmSj1NUKxxtmQim7+GW93oovJMVcQ/AdcaHkwyrr4Tbihg4yatmf/n/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 4Tkny75MKszQbs; Tue, 27 Feb 2024 19:45:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41RJj3v7092924; Tue, 27 Feb 2024 19:45:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41RJj3d4092921; Tue, 27 Feb 2024 19:45:03 GMT (envelope-from git) Date: Tue, 27 Feb 2024 19:45:03 GMT Message-Id: <202402271945.41RJj3d4092921@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: 04fc3fb8fcf6 - main - rman: Remove rman_set_start/end List-Id: Commit messages for the main 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: 04fc3fb8fcf631889ec9a181504e6ae1daebd3cd Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=04fc3fb8fcf631889ec9a181504e6ae1daebd3cd commit 04fc3fb8fcf631889ec9a181504e6ae1daebd3cd Author: John Baldwin AuthorDate: 2024-02-27 19:43:34 +0000 Commit: John Baldwin CommitDate: 2024-02-27 19:43:34 +0000 rman: Remove rman_set_start/end These functions are not safe as the rman implementation assumes that all regions (including allocated resources) are sorted by address in the internal linked-list. Differential Revision: https://reviews.freebsd.org/D43936 --- sys/kern/subr_rman.c | 14 -------------- sys/sys/rman.h | 2 -- 2 files changed, 16 deletions(-) diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c index 90a35ef885bf..792d03726c74 100644 --- a/sys/kern/subr_rman.c +++ b/sys/kern/subr_rman.c @@ -808,13 +808,6 @@ rman_make_alignment_flags(uint32_t size) return(RF_ALIGNMENT_LOG2(i)); } -void -rman_set_start(struct resource *r, rman_res_t start) -{ - - r->__r_i->r_start = start; -} - rman_res_t rman_get_start(struct resource *r) { @@ -822,13 +815,6 @@ rman_get_start(struct resource *r) return (r->__r_i->r_start); } -void -rman_set_end(struct resource *r, rman_res_t end) -{ - - r->__r_i->r_end = end; -} - rman_res_t rman_get_end(struct resource *r) { diff --git a/sys/sys/rman.h b/sys/sys/rman.h index bb63c4dfb100..9e8e3b878c5a 100644 --- a/sys/sys/rman.h +++ b/sys/sys/rman.h @@ -153,11 +153,9 @@ struct resource *rman_reserve_resource_bound(struct rman *rm, rman_res_t start, void rman_set_bushandle(struct resource *_r, bus_space_handle_t _h); void rman_set_bustag(struct resource *_r, bus_space_tag_t _t); void rman_set_device(struct resource *_r, device_t _dev); -void rman_set_end(struct resource *_r, rman_res_t _end); void rman_set_irq_cookie(struct resource *_r, void *_c); void rman_set_mapping(struct resource *, struct resource_map *); void rman_set_rid(struct resource *_r, int _rid); -void rman_set_start(struct resource *_r, rman_res_t _start); void rman_set_virtual(struct resource *_r, void *_v); extern struct rman_head rman_head; From nobody Tue Feb 27 19:45:04 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tkny90KPwz5CK3S; Tue, 27 Feb 2024 19:45:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tkny86fjHz56wP; Tue, 27 Feb 2024 19:45:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709063104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7NOXUT3Fx35O7OsybsuC6cwfctFYd8BI7LXG7BUp/3U=; b=pEpFxapPVu795KPTAKE2FB1MUxNyx2g7CBado3ErGACWooFNXksym+3G4F7JZpEU6h+PeF uNzruic0yhZyqIN8KX6nBP3+sW+PYA6IYxjE2pnR7+BkXutqQ3BFcse/IDWqtN3qPOT1Rt wfiYWyLpxUk2rYAg+42nkkdakmFjOK89CPZ25HD0KxgjjgUXdvzB+SXQrFaG+gfA1Vy19b /o5DV7IFNS8F+vNJvMpcdVMZLsnrzDwZ4s174/sfDWTzlcnacpbyF9n/GRHfHdqAyvJ+Dg xNn/5oyLo9FyVkrOD9QPvzkVqwUmVN9gAWFDHCPLS1RPkdRtdsGJb+VhvdaqvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709063104; a=rsa-sha256; cv=none; b=amWCF+VIoEcBbCSNi9eZ07LXgCAcRcMLVnPB/MmYEp6fE/V/JYhZkfL/qOkYAtcclNx88u a/FX2mXkoYeEadbaNCqC4tM9Ixd8inBYM3ZC9rXr7t1P/TRs08yniQaMZakOpvdJBPNkZk V6dU51fh4GkKyML3ixI7n576U9Jwsyl9ZRiBlkI+tSFHBGtUTo+ckP7JH18+16QEDTiX/p 1pwSkinpGA+nCtvDKOVHEALTqhk2lLJkOul9o0/1K11a7U4Wec729PfOYlZHOARCLY/O7D TAuOPs5A7oay9WtsKImKikcPGwQTN/+7VdtvSSx6RD7TMV8lSclU61rxsvWvhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709063104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7NOXUT3Fx35O7OsybsuC6cwfctFYd8BI7LXG7BUp/3U=; b=G5DPBt995K8MGW6OOnqlYK0wSc1Mk7qnzxGF1y/c4aw+hdGkqSX5VchXulQ/bCldKn79Re xH7ybBHmLdQvXmR7W/MRUtusHJWxvZr/N0b6wlaOVwlV4+S9aOeC4Bl4pS91uu7cbKResP s5TDA5BFrVxaB+zQmgJzES7b3qwGZYyucmO3LuqeAS6dAwzcxZcoU+TEivEHIvukpYWeaY fNRnaoPuLndTfsSz/KWgEyvac8LpvMYDt5SKRIW7dexbxOGxgVpM/jgvhBEw8kfPxS/bUc JbtNDMq7hnUkAHQmArzdITQV3vJxTSMx18rBJMSnKiiNiwj+0EIn7asVzxEKFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tkny85kpkzQQ7; Tue, 27 Feb 2024 19:45: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 41RJj4cl092967; Tue, 27 Feb 2024 19:45:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41RJj4Cd092964; Tue, 27 Feb 2024 19:45:04 GMT (envelope-from git) Date: Tue, 27 Feb 2024 19:45:04 GMT Message-Id: <202402271945.41RJj4Cd092964@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: 9b619f0e9082 - main - dpaa2: Use bus_generic_rman_* List-Id: Commit messages for the main 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: 9b619f0e9082b8f97f0e20ec5176fe40ba8565f8 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9b619f0e9082b8f97f0e20ec5176fe40ba8565f8 commit 9b619f0e9082b8f97f0e20ec5176fe40ba8565f8 Author: John Baldwin AuthorDate: 2024-02-27 19:43:50 +0000 Commit: John Baldwin CommitDate: 2024-02-27 19:43:50 +0000 dpaa2: Use bus_generic_rman_* Reviewed by: dsl Differential Revision: https://reviews.freebsd.org/D43937 --- sys/dev/dpaa2/dpaa2_mc.c | 76 +++++++++++++++++-------------------------- sys/dev/dpaa2/dpaa2_mc.h | 1 + sys/dev/dpaa2/dpaa2_mc_acpi.c | 1 + sys/dev/dpaa2/dpaa2_mc_fdt.c | 1 + 4 files changed, 33 insertions(+), 46 deletions(-) diff --git a/sys/dev/dpaa2/dpaa2_mc.c b/sys/dev/dpaa2/dpaa2_mc.c index 0deebf7e8b24..6d11e50b1f98 100644 --- a/sys/dev/dpaa2/dpaa2_mc.c +++ b/sys/dev/dpaa2/dpaa2_mc.c @@ -115,7 +115,6 @@ static struct resource_spec dpaa2_mc_spec[] = { static u_int dpaa2_mc_get_xref(device_t, device_t); static u_int dpaa2_mc_map_id(device_t, device_t, uintptr_t *); -static struct rman *dpaa2_mc_rman(device_t, int); static int dpaa2_mc_alloc_msi_impl(device_t, device_t, int, int, int *); static int dpaa2_mc_release_msi_impl(device_t, device_t, int, int *); @@ -312,10 +311,10 @@ dpaa2_mc_alloc_resource(device_t mcdev, device_t child, int type, int *rid, struct rman *rm; int error; - rm = dpaa2_mc_rman(mcdev, type); - if (!rm) - return (BUS_ALLOC_RESOURCE(device_get_parent(mcdev), child, - type, rid, start, end, count, flags)); + rm = dpaa2_mc_rman(mcdev, type, flags); + if (rm == NULL) + return (bus_generic_alloc_resource(mcdev, child, type, rid, + start, end, count, flags)); /* * Skip managing DPAA2-specific resource. It must be provided to MC by @@ -331,24 +330,10 @@ dpaa2_mc_alloc_resource(device_t mcdev, device_t child, int type, int *rid, } } - res = rman_reserve_resource(rm, start, end, count, flags, child); - if (!res) { - device_printf(mcdev, "rman_reserve_resource() failed: " - "start=%#jx, end=%#jx, count=%#jx\n", start, end, count); + res = bus_generic_rman_alloc_resource(mcdev, child, type, rid, start, + end, count, flags); + if (res == NULL) goto fail; - } - - rman_set_rid(res, *rid); - - if (flags & RF_ACTIVE) { - if (bus_activate_resource(child, type, *rid, res)) { - device_printf(mcdev, "bus_activate_resource() failed: " - "rid=%d, res=%#jx\n", *rid, (uintmax_t) res); - rman_release_resource(res); - goto fail; - } - } - return (res); fail: device_printf(mcdev, "%s() failed: type=%d, rid=%d, start=%#jx, " @@ -363,9 +348,10 @@ dpaa2_mc_adjust_resource(device_t mcdev, device_t child, int type, { struct rman *rm; - rm = dpaa2_mc_rman(mcdev, type); + rm = dpaa2_mc_rman(mcdev, type, rman_get_flags(r)); if (rm) - return (rman_adjust_resource(r, start, end)); + return (bus_generic_rman_adjust_resource(mcdev, child, type, r, + start, end)); return (bus_generic_adjust_resource(mcdev, child, type, r, start, end)); } @@ -375,12 +361,10 @@ dpaa2_mc_release_resource(device_t mcdev, device_t child, int type, int rid, { struct rman *rm; - rm = dpaa2_mc_rman(mcdev, type); - if (rm) { - KASSERT(rman_is_region_manager(r, rm), ("rman mismatch")); - rman_release_resource(r); - } - + rm = dpaa2_mc_rman(mcdev, type, rman_get_flags(r)); + if (rm) + return (bus_generic_rman_release_resource(mcdev, child, type, + rid, r)); return (bus_generic_release_resource(mcdev, child, type, rid, r)); } @@ -388,26 +372,26 @@ int dpaa2_mc_activate_resource(device_t mcdev, device_t child, int type, int rid, struct resource *r) { - int rc; - - if ((rc = rman_activate_resource(r)) != 0) - return (rc); + struct rman *rm; - return (BUS_ACTIVATE_RESOURCE(device_get_parent(mcdev), child, type, - rid, r)); + rm = dpaa2_mc_rman(mcdev, type, rman_get_flags(r)); + if (rm) + return (bus_generic_rman_activate_resource(mcdev, child, type, + rid, r)); + return (bus_generic_activate_resource(mcdev, child, type, rid, r)); } int dpaa2_mc_deactivate_resource(device_t mcdev, device_t child, int type, int rid, struct resource *r) { - int rc; - - if ((rc = rman_deactivate_resource(r)) != 0) - return (rc); + struct rman *rm; - return (BUS_DEACTIVATE_RESOURCE(device_get_parent(mcdev), child, type, - rid, r)); + rm = dpaa2_mc_rman(mcdev, type, rman_get_flags(r)); + if (rm) + return (bus_generic_rman_deactivate_resource(mcdev, child, type, + rid, r)); + return (bus_generic_deactivate_resource(mcdev, child, type, rid, r)); } /* @@ -498,7 +482,7 @@ dpaa2_mc_manage_dev(device_t mcdev, device_t dpaa2_dev, uint32_t flags) if (flags & DPAA2_MC_DEV_ALLOCATABLE) { /* Select rman based on a type of the DPAA2 device. */ - rm = dpaa2_mc_rman(mcdev, dinfo->dtype); + rm = dpaa2_mc_rman(mcdev, dinfo->dtype, 0); if (!rm) return (ENOENT); /* Manage DPAA2 device as an allocatable resource. */ @@ -523,7 +507,7 @@ dpaa2_mc_get_free_dev(device_t mcdev, device_t *dpaa2_dev, return (EINVAL); /* Select resource manager based on a type of the DPAA2 device. */ - rm = dpaa2_mc_rman(mcdev, devtype); + rm = dpaa2_mc_rman(mcdev, devtype, 0); if (!rm) return (ENOENT); /* Find first free DPAA2 device of the given type. */ @@ -749,8 +733,8 @@ dpaa2_mc_map_id(device_t mcdev, device_t child, uintptr_t *id) * @internal * @brief Obtain a resource manager based on the given type of the resource. */ -static struct rman * -dpaa2_mc_rman(device_t mcdev, int type) +struct rman * +dpaa2_mc_rman(device_t mcdev, int type, u_int flags) { struct dpaa2_mc_softc *sc; diff --git a/sys/dev/dpaa2/dpaa2_mc.h b/sys/dev/dpaa2/dpaa2_mc.h index 9a21c9724b82..40b318c4c9e7 100644 --- a/sys/dev/dpaa2/dpaa2_mc.h +++ b/sys/dev/dpaa2/dpaa2_mc.h @@ -179,6 +179,7 @@ int dpaa2_mc_detach(device_t dev); /* For bus interface. */ +struct rman *dpaa2_mc_rman(device_t mcdev, int type, u_int flags); struct resource * dpaa2_mc_alloc_resource(device_t mcdev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); diff --git a/sys/dev/dpaa2/dpaa2_mc_acpi.c b/sys/dev/dpaa2/dpaa2_mc_acpi.c index 388bb764afff..2007c18bec67 100644 --- a/sys/dev/dpaa2/dpaa2_mc_acpi.c +++ b/sys/dev/dpaa2/dpaa2_mc_acpi.c @@ -352,6 +352,7 @@ static device_method_t dpaa2_mc_acpi_methods[] = { DEVMETHOD(device_detach, dpaa2_mc_detach), /* Bus interface */ + DEVMETHOD(bus_get_rman, dpaa2_mc_rman), DEVMETHOD(bus_alloc_resource, dpaa2_mc_alloc_resource), DEVMETHOD(bus_adjust_resource, dpaa2_mc_adjust_resource), DEVMETHOD(bus_release_resource, dpaa2_mc_release_resource), diff --git a/sys/dev/dpaa2/dpaa2_mc_fdt.c b/sys/dev/dpaa2/dpaa2_mc_fdt.c index 8e9ab10dec9d..a6babfc89ca9 100644 --- a/sys/dev/dpaa2/dpaa2_mc_fdt.c +++ b/sys/dev/dpaa2/dpaa2_mc_fdt.c @@ -355,6 +355,7 @@ static device_method_t dpaa2_mc_fdt_methods[] = { DEVMETHOD(device_detach, dpaa2_mc_detach), /* Bus interface */ + DEVMETHOD(bus_get_rman, dpaa2_mc_rman), DEVMETHOD(bus_alloc_resource, dpaa2_mc_alloc_resource), DEVMETHOD(bus_adjust_resource, dpaa2_mc_adjust_resource), DEVMETHOD(bus_release_resource, dpaa2_mc_release_resource), From nobody Tue Feb 27 19:45:05 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TknyB27lRz5CKBl; Tue, 27 Feb 2024 19:45: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 4TknyB0qcMz572T; Tue, 27 Feb 2024 19:45:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709063106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9OZdavtyx8zP38kfn5xSQz+m1y0/Pl53xH16Ab50d9U=; b=TuFcXQOGKagcgjxkSFI6nzqW/rj63y5M5rhhn52MaMcwrTGWfTa1M4XcwRTlY64vdQTBhS kuaY2kG8RgpDwoWddPRpEhLMZeaH5n8P9vsorUa9lpupkqLbOYoXq/aICIGBTYkaWaH8kG IlONKR7U1m1xW1SNfbqyb91/B9kBehK6x8h+XCbSZ/KAe7Ztlo4aoIZc+9oxqe2wSZgn+0 t5gOM/OiMtyLraZK2dhHR/7CfagaLzjWCDED6fpIhXnAEygEpBWADFKRQbZCPK8EZdam7c IKiKWWHnHwYo/d2TdkNyL0DxhZY7DO9mIhQAtu0LbEMJxDHYlkTSuN1YRj3Z0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709063106; a=rsa-sha256; cv=none; b=U7d6DVioobtcXT1/F+El+cVjMnz03KlR71JTdQQJ3Gz550neghvZt6Tq5W2lnyrsmFon6S V4OOFFqfw71wt2+wos8HKwm9nxLa50c0rGPpxVDcI4zaaTfnizVY48T4iQr8T3CSV2/vLE iV+vnaRAvs9229PEIB8hnsq81v+n1JCVwtrDvvUBhCEDd+RyxGf4k/tXwbTdr50UGEGlpU qibOBb8HKJEL2mKXY32ISbhdm/dWWCSyfr8n/6UKGJ8VCDb9epDLikUTPy//G1WiBc4hLR Wlkc/gDabm+FEYs9qekbj3QjZsiWzO+/6hhM/8usL4mPrSuqDI01V/IPiO52dQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709063106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9OZdavtyx8zP38kfn5xSQz+m1y0/Pl53xH16Ab50d9U=; b=S1GP93XW86sscZSi7ssZ5hFhRfuEZ700IKGN5XbvtFt+Y5o7MqEIjW5tSx+EvNx21S+WI9 MA9GReXXcC/Fr1VrHc6TFVGUOtSs36caUWjJf/asY0N2+QmIL34cRQAm5Tuji7qsWrAKsS JIyrGLdOOF1U2KiNhPC86hhVKuqGP7iI0MppJxjzl8ncp57W5FWf8fmXRGAYSxU+OuuFEF PU7lJjOdmeqQI6lPpyOAjgeEeodGfJtA4Q6LZmd7vlV6zLE9jZkdGpq90/M5f7wCw3rBlq Z1hHlJxWyFh6N0wpudDR7BWK8h8fY2Xx5fxcQBgs2cM6AFZLsGdjiy7cumK4Wg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tkny96yqvzQYV; Tue, 27 Feb 2024 19:45:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41RJj5mj093009; Tue, 27 Feb 2024 19:45:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41RJj5OY093006; Tue, 27 Feb 2024 19:45:05 GMT (envelope-from git) Date: Tue, 27 Feb 2024 19:45:05 GMT Message-Id: <202402271945.41RJj5OY093006@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: b25f03a1a272 - main - bhnd_usb: Use bus_generic_rman_* List-Id: Commit messages for the main 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: b25f03a1a27256c8d638a7e82ac3f6248994d5f3 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b25f03a1a27256c8d638a7e82ac3f6248994d5f3 commit b25f03a1a27256c8d638a7e82ac3f6248994d5f3 Author: John Baldwin AuthorDate: 2024-02-27 19:44:03 +0000 Commit: John Baldwin CommitDate: 2024-02-27 19:44:03 +0000 bhnd_usb: Use bus_generic_rman_* For SYS_RES_MEMORY, use bus_generic_rman_* for activate/deactivate_resource methods as well as custom map/unmap_resource methods that request submappings of the sc_mem resource allocated from the parent bus. Differential Revision: https://reviews.freebsd.org/D43938 --- sys/dev/bhnd/cores/usb/bhnd_usb.c | 111 +++++++++++++++++++++++++++++--------- 1 file changed, 85 insertions(+), 26 deletions(-) diff --git a/sys/dev/bhnd/cores/usb/bhnd_usb.c b/sys/dev/bhnd/cores/usb/bhnd_usb.c index e3bcd8f40bf8..68701df14c50 100644 --- a/sys/dev/bhnd/cores/usb/bhnd_usb.c +++ b/sys/dev/bhnd/cores/usb/bhnd_usb.c @@ -234,6 +234,19 @@ bhnd_usb_attach(device_t dev) return (0); } +static struct rman * +bhnd_usb_get_rman(device_t bus, int type, u_int flags) +{ + struct bhnd_usb_softc *sc = device_get_softc(bus); + + switch (type) { + case SYS_RES_MEMORY: + return (&sc->sc_mem_rman); + default: + return (NULL); + } +} + static struct resource * bhnd_usb_alloc_resource(device_t bus, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) @@ -241,12 +254,10 @@ bhnd_usb_alloc_resource(device_t bus, device_t child, int type, int *rid, struct resource *rv; struct resource_list *rl; struct resource_list_entry *rle; - int passthrough, isdefault, needactivate; - struct bhnd_usb_softc *sc = device_get_softc(bus); + int passthrough, isdefault; isdefault = RMAN_IS_DEFAULT_RANGE(start,end); passthrough = (device_get_parent(child) != bus); - needactivate = flags & RF_ACTIVE; rle = NULL; if (!passthrough && isdefault) { @@ -272,20 +283,11 @@ bhnd_usb_alloc_resource(device_t bus, device_t child, int type, int *rid, * attempt to satisfy the allocation ourselves. */ if (type == SYS_RES_MEMORY) { - rv = rman_reserve_resource(&sc->mem_rman, start, end, count, - flags, child); + rv = bus_generic_rman_alloc_resource(bus, child, type, rid, + start, end, count, flags); if (rv == NULL) { - BHND_ERROR_DEV(bus, "could not reserve resource"); - return (0); - } - - rman_set_rid(rv, *rid); - - if (needactivate && - bus_activate_resource(child, type, *rid, rv)) { - BHND_ERROR_DEV(bus, "could not activate resource"); - rman_release_resource(rv); - return (0); + BHND_ERROR_DEV(bus, "could not allocate resource"); + return (NULL); } return (rv); @@ -327,14 +329,8 @@ bhnd_usb_release_resource(device_t dev, device_t child, int type, r)); } - /* Deactivate resources */ - if (rman_get_flags(r) & RF_ACTIVE) { - error = BUS_DEACTIVATE_RESOURCE(dev, child, type, rid, r); - if (error) - return (error); - } - - if ((error = rman_release_resource(r))) + error = bus_generic_rman_release_resource(dev, child, type, rid, r); + if (error != 0) return (error); if (!passthrough) { @@ -348,6 +344,66 @@ bhnd_usb_release_resource(device_t dev, device_t child, int type, return (0); } +static int +bhnd_usb_activate_resource(device_t dev, device_t child, int type, int rid, + struct resource *r) +{ + if (type != SYS_RES_MEMORY) + return (bus_generic_activate_resource(dev, child, type, rid, + r)); + return (bus_generic_rman_activate_resource(dev, child, type, rid, r)); +} + +static int +bhnd_usb_deactivate_resource(device_t dev, device_t child, int type, int rid, + struct resource *r) +{ + if (type != SYS_RES_MEMORY) + return (bus_generic_deactivate_resource(dev, child, type, rid, + r)); + return (bus_generic_rman_deactivate_resource(dev, child, type, rid, r)); +} + +static int +bhnd_usb_map_resource(device_t dev, device_t child, int type, + struct resource *r, struct resource_map_request *argsp, + struct resource_map *map) +{ + struct bhnd_usb_softc *sc = device_get_softc(dev); + struct resource_map_request args; + rman_res_t length, start; + int error; + + if (type != SYS_RES_MEMORY) + return (bus_generic_map_resource(dev, child, type, r, argsp, + map)); + + /* Resources must be active to be mapped. */ + if (!(rman_get_flags(r) & RF_ACTIVE)) + return (ENXIO); + + resource_init_map_request(&args); + error = resource_validate_map_request(r, argsp, &args, &start, &length); + if (error) + return (error); + + args.offset = start - rman_get_start(sc->sc_mem); + args.length = length; + return (bus_generic_map_resource(dev, child, type, sc->sc_mem, &args, + map)); +} + +static int +bhnd_usb_unmap_resource(device_t dev, device_t child, int type, + struct resource *r, struct resource_map *map) +{ + struct bhnd_usb_softc *sc = device_get_softc(dev); + + if (type == SYS_RES_MEMORY) + r = sc->sc_mem; + return (bus_generic_unmap_resource(dev, child, type, r, map)); +} + static int bhnd_usb_print_all_resources(device_t dev) { @@ -478,11 +534,14 @@ static device_method_t bhnd_usb_methods[] = { DEVMETHOD(bus_child_deleted, bhnd_usb_child_deleted), DEVMETHOD(bus_alloc_resource, bhnd_usb_alloc_resource), DEVMETHOD(bus_get_resource_list, bhnd_usb_get_reslist), + DEVMETHOD(bus_get_rman, bhnd_usb_get_rman), DEVMETHOD(bus_print_child, bhnd_usb_print_child), DEVMETHOD(bus_release_resource, bhnd_usb_release_resource), + DEVMETHOD(bus_activate_resource, bhnd_usb_activate_resource), + DEVMETHOD(bus_deactivate_resource, bhnd_usb_deactivate_resource), + DEVMETHOD(bus_map_resource, bhnd_usb_map_resource), + DEVMETHOD(bus_unmap_resource, bhnd_usb_unmap_resource), /* Bus interface: generic part */ - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), From nobody Tue Feb 27 19:45:07 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TknyC3kbYz5CKF7; Tue, 27 Feb 2024 19:45: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 4TknyC1y6mz57FC; Tue, 27 Feb 2024 19:45:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709063107; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eDiC2lF1v10+ZLumGmrUAJ3pprrMwz3quvuQRm6E2uw=; b=WJh5pv9+/htPeN8XsCIoQ9SapJYJqd27X3CLrnPCnXr85cSYcFr78pYquOnk1+GeUKqUqi YDytSBZfaOvVQdnh2AKkfKej0tRhqo0YXaQpZ8P6zTjoXyIS2mT0iUa76njruU9A70uUdV oeTh92Yi0+zig6XNIO21FICYU9J58DsUEiHlJrEijJ/ihMPGKqQfhkVnqpwVqG9f+tt8x7 dtkyFMBcWHq1p+WPX4nCD5ywdP2reX+WO69bMxHRaGw9pqCAFxkbrHn0UtYeObVAK9sBjv aVPxr4AMYYG3RzwL3ZzCusSJN+dcxLVV7rOmuWssP6Z1hP21ItkHXeXMuGo8cw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709063107; a=rsa-sha256; cv=none; b=eTh556g5NR5SM0iCroHvAVmEiCkhjjBciyZ5sUa6FOVgO/mCdKzq7tSVWTb/kOv0GE0497 vjf4gBct606yeIrLdWv0HHPwzHjRvTKaGNDllxOINKvljJIrRRC2oQDIa5DcRduIPI9uvq F5w+R8zbK9lTWrFhYZvp3Vn5fE2Nc/qtw5gOXfuG9EjzR4pFhlKsNJSUgJ1Kco9CU8xV6z 1EJeVHkck/XcaCU+L53LqDF74SNxq0xgXmVSibSF5WZe0wAgcUhKcbAZoS9bjgvT/6/mHP LVKWFyqVHf0AXvuDfvlA9YklSB556Low7tKqWMWdWe79Zz0RhwqGhoqZ1GExkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709063107; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eDiC2lF1v10+ZLumGmrUAJ3pprrMwz3quvuQRm6E2uw=; b=djw4ppFmhuSHN5m9wDCjy1sbRIfPZ0pA/Fxs4FhBH84DEHXWHPwmwxvXh7ey0yS4II3nlW z/zRyUkCAqtuDJBTWxGjmrGWIuRo3TnZXdULxBspHOej2vBxjPNac8ShHaIRmhr4RNyA0N +ToTAEAHVCDpPz7oMloVs4IUxrZXM/cZbDIuS/DvdRt6ZUtAzLHmKi6qifQdLKax2vGVmm QqrFxVNBKG1VT7RHwtACs7RYC0JdlkkkcIskK/i/YWYzvopx6XicDgzv2nx4LwKlpuGax0 0Bl76VpEfbbD37AgCN5abuXca4w7JHy0YEw6sK/SaqawdbEA7G0dCXCx52osbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TknyC0tDKzQnD; Tue, 27 Feb 2024 19:45: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 41RJj7ZS093063; Tue, 27 Feb 2024 19:45:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41RJj7SD093060; Tue, 27 Feb 2024 19:45:07 GMT (envelope-from git) Date: Tue, 27 Feb 2024 19:45:07 GMT Message-Id: <202402271945.41RJj7SD093060@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: 3a48dfe115f3 - main - bhnd_chipc: Make use of bus_generic_rman_* to simplify some code List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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: 3a48dfe115f35abac6c2d9ec03a6a574baeaf0bc Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3a48dfe115f35abac6c2d9ec03a6a574baeaf0bc commit 3a48dfe115f35abac6c2d9ec03a6a574baeaf0bc Author: John Baldwin AuthorDate: 2024-02-27 19:44:22 +0000 Commit: John Baldwin CommitDate: 2024-02-27 19:44:22 +0000 bhnd_chipc: Make use of bus_generic_rman_* to simplify some code This uses bus_generic_rman_alloc/release_resource to reduce some code duplication. However, I've left the custom activate/deactivate methods as-is. Differential Revision: https://reviews.freebsd.org/D43939 --- sys/dev/bhnd/cores/chipc/chipc.c | 68 +++++++++++++--------------------------- 1 file changed, 22 insertions(+), 46 deletions(-) diff --git a/sys/dev/bhnd/cores/chipc/chipc.c b/sys/dev/bhnd/cores/chipc/chipc.c index 0510a3195015..f99f42fb3ac3 100644 --- a/sys/dev/bhnd/cores/chipc/chipc.c +++ b/sys/dev/bhnd/cores/chipc/chipc.c @@ -123,13 +123,13 @@ static void chipc_disable_otp_power(struct chipc_softc *sc); static int chipc_enable_sprom_pins(struct chipc_softc *sc); static void chipc_disable_sprom_pins(struct chipc_softc *sc); -static int chipc_try_activate_resource(struct chipc_softc *sc, +static int chipc_try_activate_resource(device_t dev, device_t child, int type, int rid, struct resource *r, bool req_direct); static int chipc_init_rman(struct chipc_softc *sc); static void chipc_free_rman(struct chipc_softc *sc); -static struct rman *chipc_get_rman(struct chipc_softc *sc, int type); +static struct rman *chipc_get_rman(device_t dev, int type, u_int flags); /* quirk and capability flag convenience macros */ #define CHIPC_QUIRK(_sc, _name) \ @@ -747,10 +747,13 @@ chipc_free_rman(struct chipc_softc *sc) * * @param sc The chipc device state. * @param type The resource type (e.g. SYS_RES_MEMORY, SYS_RES_IRQ, ...) + * @param flags Resource flags (e.g. RF_PREFETCHABLE) */ static struct rman * -chipc_get_rman(struct chipc_softc *sc, int type) +chipc_get_rman(device_t dev, int type, u_int flags) { + struct chipc_softc *sc = device_get_softc(dev); + switch (type) { case SYS_RES_MEMORY: return (&sc->mem_rman); @@ -782,7 +785,7 @@ chipc_alloc_resource(device_t dev, device_t child, int type, rle = NULL; /* Fetch the resource manager, delegate request if necessary */ - rm = chipc_get_rman(sc, type); + rm = chipc_get_rman(dev, type, flags); if (rm == NULL) { /* Requested resource type is delegated to our parent */ rv = bus_generic_rl_alloc_resource(dev, child, type, rid, @@ -851,31 +854,13 @@ chipc_alloc_resource(device_t dev, device_t child, int type, return (NULL); /* Make our rman reservation */ - rv = rman_reserve_resource(rm, start, end, count, flags & ~RF_ACTIVE, - child); + rv = bus_generic_rman_alloc_resource(dev, child, type, rid, start, end, + count, flags); if (rv == NULL) { chipc_release_region(sc, cr, RF_ALLOCATED); return (NULL); } - rman_set_rid(rv, *rid); - - /* Activate */ - if (flags & RF_ACTIVE) { - error = bus_activate_resource(child, type, *rid, rv); - if (error) { - device_printf(dev, - "failed to activate entry %#x type %d for " - "child %s: %d\n", - *rid, type, device_get_nameunit(child), error); - - chipc_release_region(sc, cr, RF_ALLOCATED); - rman_release_resource(rv); - - return (NULL); - } - } - /* Update child's resource list entry */ if (rle != NULL) { rle->res = rv; @@ -900,7 +885,7 @@ chipc_release_resource(device_t dev, device_t child, int type, int rid, sc = device_get_softc(dev); /* Handled by parent bus? */ - rm = chipc_get_rman(sc, type); + rm = chipc_get_rman(dev, type, rman_get_flags(r)); if (rm == NULL || !rman_is_region_manager(r, rm)) { return (bus_generic_rl_release_resource(dev, child, type, rid, r)); @@ -912,13 +897,8 @@ chipc_release_resource(device_t dev, device_t child, int type, int rid, return (EINVAL); /* Deactivate resources */ - if (rman_get_flags(r) & RF_ACTIVE) { - error = BUS_DEACTIVATE_RESOURCE(dev, child, type, rid, r); - if (error) - return (error); - } - - if ((error = rman_release_resource(r))) + error = bus_generic_rman_release_resource(dev, child, type, rid, r); + if (error != 0) return (error); /* Drop allocation reference */ @@ -943,7 +923,7 @@ chipc_adjust_resource(device_t dev, device_t child, int type, sc = device_get_softc(dev); /* Handled by parent bus? */ - rm = chipc_get_rman(sc, type); + rm = chipc_get_rman(dev, type, rman_get_flags(r)); if (rm == NULL || !rman_is_region_manager(r, rm)) { return (bus_generic_adjust_resource(dev, child, type, r, start, end)); @@ -978,16 +958,17 @@ chipc_adjust_resource(device_t dev, device_t child, int type, * as RF_ACTIVE if bhnd direct resource allocation fails. */ static int -chipc_try_activate_resource(struct chipc_softc *sc, device_t child, int type, +chipc_try_activate_resource(device_t dev, device_t child, int type, int rid, struct resource *r, bool req_direct) { + struct chipc_softc *sc = device_get_softc(dev); struct rman *rm; struct chipc_region *cr; bhnd_size_t cr_offset; rman_res_t r_start, r_end, r_size; int error; - rm = chipc_get_rman(sc, type); + rm = chipc_get_rman(dev, type, rman_get_flags(r)); if (rm == NULL || !rman_is_region_manager(r, rm)) return (EINVAL); @@ -1033,21 +1014,18 @@ static int chipc_activate_bhnd_resource(device_t dev, device_t child, int type, int rid, struct bhnd_resource *r) { - struct chipc_softc *sc; struct rman *rm; int error; - sc = device_get_softc(dev); - /* Delegate non-locally managed resources to parent */ - rm = chipc_get_rman(sc, type); + rm = chipc_get_rman(dev, type, rman_get_flags(r->res)); if (rm == NULL || !rman_is_region_manager(r->res, rm)) { return (bhnd_bus_generic_activate_resource(dev, child, type, rid, r)); } /* Try activating the chipc region resource */ - error = chipc_try_activate_resource(sc, child, type, rid, r->res, + error = chipc_try_activate_resource(dev, child, type, rid, r->res, false); if (error) return (error); @@ -1064,20 +1042,17 @@ static int chipc_activate_resource(device_t dev, device_t child, int type, int rid, struct resource *r) { - struct chipc_softc *sc; struct rman *rm; - sc = device_get_softc(dev); - /* Delegate non-locally managed resources to parent */ - rm = chipc_get_rman(sc, type); + rm = chipc_get_rman(dev, type, rman_get_flags(r)); if (rm == NULL || !rman_is_region_manager(r, rm)) { return (bus_generic_activate_resource(dev, child, type, rid, r)); } /* Try activating the chipc region-based resource */ - return (chipc_try_activate_resource(sc, child, type, rid, r, true)); + return (chipc_try_activate_resource(dev, child, type, rid, r, true)); } /** @@ -1095,7 +1070,7 @@ chipc_deactivate_resource(device_t dev, device_t child, int type, sc = device_get_softc(dev); /* Handled by parent bus? */ - rm = chipc_get_rman(sc, type); + rm = chipc_get_rman(dev, type, rman_get_flags(r)); if (rm == NULL || !rman_is_region_manager(r, rm)) { return (bus_generic_deactivate_resource(dev, child, type, rid, r)); @@ -1396,6 +1371,7 @@ static device_method_t chipc_methods[] = { DEVMETHOD(bus_activate_resource, chipc_activate_resource), DEVMETHOD(bus_deactivate_resource, chipc_deactivate_resource), DEVMETHOD(bus_get_resource_list, chipc_get_resource_list), + DEVMETHOD(bus_get_rman, chipc_get_rman), DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), From nobody Tue Feb 27 19:56:30 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TkpCL5wC2z5CKlV; Tue, 27 Feb 2024 19:56: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 4TkpCL5Q9Zz58kb; Tue, 27 Feb 2024 19:56:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709063790; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mXwFatZhYZcIDQ+tiCdEBVkFUuc72tygL3mGWBbyEr4=; b=uYdVwvloZDQViHqECk/85nKAlsbFk6uVW86s5u7uKBYHfjfDa5ooervZlwbEQEY/+P4GLW Fqm1No1YxJRh26TBkK9RKc0QUBz0cPE1b/CfeVhJd9WK/65INGQRElNVViJYlhAqjTdKVB 4iXMpgZgeHzHtSVRG+xdLBIpgMhCUvoMlAi9S4FgYPmRS3t2iZ0jc4wcZDfF3mLPbwlM4g OZEbJAERjqa7nnCO+9GnR6weFf9gYmILI0swYTVcBt/FZTjBSOuO3KfII1Q1NmU14IJa+t p2hPvMksg3ICT+8Ks79L0QPGODqQUQrs4AdfQH09/bQE4L6Aq44lUjdL7dChbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709063790; a=rsa-sha256; cv=none; b=gA/YQFnoSqeGzD5fwOX9/py3D8MiQTW1f7HgFgSdEFj/RTELOd+V4j99nBGsphNnPrlS2s Jpm1VI3NK9keUadGDaDT3uRFJxTkxcmlm3F/5qpQeQtrAxRu5z7PD8FPQaQQfISPdIDLzi RwP/IeIgyUjKDH2ZagF5FnLVfCjvQo3bFm7ehI/ArpXw9ZuH+AXfmJpSdhRFCApA4rm2PS Swk/KuocJ54+iwx6uHhDuz3YUW53nWUrjrXG81HCtD2YhDXeylDnGPKpDcx4O4DTDrNcbb jv2xe6tky/ksp/AvMJxHaTC7EJ01OGRGIZoIONrScfSItCwk+7HXBEvBoxtcOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709063790; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mXwFatZhYZcIDQ+tiCdEBVkFUuc72tygL3mGWBbyEr4=; b=vIQmu9R2M7uKmgepzXqbNqbJOuWhEtTK8MH/3nJkGVuPtQ9SFNj8bfdvuqD6lCVud6DKh4 vwaaSYo9bbmIu2Yxs+tOYYONKwQHTbcKjxQ9FDU5JiKL8vvsSdTlEjcB7pEk2a/ENTb0/c F7FZY08X14iZwMem6mFZ+LrViKLNQyUyXuo09JsfaaV6n7KJeOlIONq7rgtnETmutpJQgv xl0p/2tC29aUTN7fiD/wsI4bLcFLbABCKiPAfq9Sln6gx/OBL+H4FKKTR3XII5/1kPULgd qIn+bKfWR4s4KiU1lUt5TctF3qOjeXXRA0p+SMNhcO3ZXRY0TJtrMixek+stDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TkpCL49lMzQp6; Tue, 27 Feb 2024 19:56: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 41RJuUWZ009866; Tue, 27 Feb 2024 19:56:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41RJuUCr009863; Tue, 27 Feb 2024 19:56:30 GMT (envelope-from git) Date: Tue, 27 Feb 2024 19:56:30 GMT Message-Id: <202402271956.41RJuUCr009863@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eugene Grosbein Subject: git: d1797fb5bbae - main - mkimg.1: add new PARTITION SPECIFICATION section List-Id: Commit messages for the main 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: eugen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d1797fb5bbaeb212501a72b916d647fb2e021d50 Auto-Submitted: auto-generated The branch main has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=d1797fb5bbaeb212501a72b916d647fb2e021d50 commit d1797fb5bbaeb212501a72b916d647fb2e021d50 Author: Eugene Grosbein AuthorDate: 2024-02-27 19:53:31 +0000 Commit: Eugene Grosbein CommitDate: 2024-02-27 19:56:26 +0000 mkimg.1: add new PARTITION SPECIFICATION section The specification follows a commentary to the function parse_part() in the source code and the code itself. MFC after: 3 days --- usr.bin/mkimg/mkimg.1 | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/usr.bin/mkimg/mkimg.1 b/usr.bin/mkimg/mkimg.1 index adf0e2707e22..820fb9ad1d5a 100644 --- a/usr.bin/mkimg/mkimg.1 +++ b/usr.bin/mkimg/mkimg.1 @@ -22,7 +22,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 8, 2020 +.Dd February 28, 2024 .Dt MKIMG 1 .Os .Sh NAME @@ -287,6 +287,42 @@ is moved accordingly. This is typically not part of the conversion process. If possible, use an output format specifically for the environment in which the file is intended to be used. +.Sh PARTITION SPECIFICATION +An option +.Fl p +may be used multiple times to specify a list of created partition entries. +A specification that is a single dash indicates an unused partition entry. +Otherwise, a partition specification has the following format: +.Bd -literal -offset indent + ':' +.Ed +.Bl -tag -width indent +.It Cm type +the partition type alias (f.e.: freebsd-swap) +that may be optionally followed by a '/' separator +and a label for partitioning schemes that feature partition labels +(see the +.Sx EXAMPLES +Section below) +.It Cm kind +the interpretation of the contents specification: +.Bl -tag -width indent +.It Cm ':' +contents holds the size of an empty partition, +a number that may be suffixed with one of K, M, G, T, P or E +(either upper or lower case) following the SI power of two convention +(see also +.Xr expand_number 3 ) +.It Cm '=' +contents holds the name of a file to read +.It Cm '-' +contents holds a command to run; the output of which is the contents +of the partition. +Multi-word strings should be quoted according to the shell rules. +.El +.It Cm contents +the specification of a partition's contents +.El .Sh ENVIRONMENT .Bl -tag -width "TMPDIR" -compact .It Ev TMPDIR @@ -358,6 +394,7 @@ In the following example the file system partition is labeled as 'backup': .Dl % mkimg -s gpt -p freebsd-ufs/backup:=file-system.ufs -o gpt.img .Sh SEE ALSO .Xr dd 1 , +.Xr expand_number 3 , .Xr gpart 8 , .Xr makefs 8 , .Xr mdconfig 8 , From nobody Tue Feb 27 20:00:07 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TkpHW6rZMz5CKrq; Tue, 27 Feb 2024 20:00: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 4TkpHW60q2z59QR; Tue, 27 Feb 2024 20:00:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709064007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nnT+oaUcUq5tZxvvmPt+dIceGu1sMPcC7uSWLQWFnpg=; b=wPk4aCbvUMF1zIahvebhd9tCiL2mSQQ38MXjtfP/FMmT+8jRsNx7f+HqkC9xkMRivgd1y/ zTW4NJdizXDI03L9ksSV1UR4wPUz6STw/rRDlamXemVSUyAjq/RsktY/99mpThbT5msony WSwEXoFSLwEV5WDFTaPL6Nl1LNeXSvwvP7HY1JGxYyJslMVWK2c03i0QgRbZb/SegS0H/p lNthZbxbyXI2fHV+unkmUaCY9DF1lQlVi0X1awC5LaHcCeEKv15wXBkZCamGnJ1VN8YNEW sJCiGLW3tqf6axCymXXAKOLvpS798ifeknFzEmhZT111S1ot1f6c1QQGn9X0rg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709064007; a=rsa-sha256; cv=none; b=YQKyHRNBbiB7l14nsLCDBQcsUjNF7geVDzbya5xPCaisaH7YNu0HIVoLvd1snILeDLFP2X WK+iht2IB/KCrAjHTEfKFGemDNETR1QetStNUmTqaRLzi6J1UcTIjCR9Mza1WbLAUbq+73 2kVvvoR7rWDY2QOZtgLKxhi7hw0iADMVo7qNSMjlsyD+r5HoVfcu8zHmpr+PlTU+gLw0IR rtMLF+jbf+hPq6tnQebqgtYKH5vPP4AngxMqq8uzebujRvAZqzQzElgUsLr+VJ9kgEmuQm mXyn5SG/FYnB4KYbFH74yZ6rv2GubZp8KrHy60+KirSfiakAyeEGvqn3sUKmhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709064007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nnT+oaUcUq5tZxvvmPt+dIceGu1sMPcC7uSWLQWFnpg=; b=pXS73aMAtGQvLmjX3bS+TyCjtFfvyYg6jrHKIByU5PJMNp5Fhz5lHJdcDHZTs0Bp10Ptve QeoYX/qOvaWbMSiDqWQs33eocOJ+sZL+AUtbmv2KFC0SRtEQhlQfd8A+3f3erl7TeapOXp 4SyYNavNR+3yL4D/FTKrzcnNvpvctzAawElsyvJPapBvNJSIYNT3C8o+G+fs6MiSD3MZzk Gc1QbWsq1DL3jS01Nq9rj6cKdgDjwAEiPsDu+iSwwn5UED5eXI8u2Z+weZCEYAMUkCJOow 2roEZY47kdwhwHueabCfRGWiKL/wrlXepVuXO4ZxGSgwATLzJgpvj2R9LUMpLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TkpHW55tZzR8d; Tue, 27 Feb 2024 20:00: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 41RK07v4014655; Tue, 27 Feb 2024 20:00:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41RK07Hk014650; Tue, 27 Feb 2024 20:00:07 GMT (envelope-from git) Date: Tue, 27 Feb 2024 20:00:07 GMT Message-Id: <202402272000.41RK07Hk014650@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: 69945c49fea7 - main - netlink: Don't use a zero-length array List-Id: Commit messages for the main 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: 69945c49fea7ac2352c1fd7d22f70f2e3861ba81 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=69945c49fea7ac2352c1fd7d22f70f2e3861ba81 commit 69945c49fea7ac2352c1fd7d22f70f2e3861ba81 Author: John Baldwin AuthorDate: 2024-02-27 19:59:52 +0000 Commit: John Baldwin CommitDate: 2024-02-27 19:59:52 +0000 netlink: Don't use a zero-length array Define SNL_DECLARE_FIELD_PARSER* macros to create a parser that has no output attributes only input fields and use this to define the snl_donemsg_parser. This removes the need for the zero-length nla_p_donemsg[] variable. Zero length arrays are not valid in ISO C. Reviewed by: jrtc27, melifaro Differential Revision: https://reviews.freebsd.org/D43918 --- sys/netlink/netlink_snl.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/sys/netlink/netlink_snl.h b/sys/netlink/netlink_snl.h index 6636d53f2353..89ba5b5aef5d 100644 --- a/sys/netlink/netlink_snl.h +++ b/sys/netlink/netlink_snl.h @@ -174,6 +174,18 @@ static const struct snl_hdr_parser _name = { \ #define SNL_DECLARE_PARSER(_name, _t, _fp, _np) \ SNL_DECLARE_PARSER_EXT(_name, sizeof(_t), 0, _fp, _np, NULL) +#define SNL_DECLARE_FIELD_PARSER_EXT(_name, _sz_h_in, _sz_out, _fp, _cb) \ +static const struct snl_hdr_parser _name = { \ + .in_hdr_size = _sz_h_in, \ + .out_size = _sz_out, \ + .fp = &((_fp)[0]), \ + .fp_size = NL_ARRAY_LEN(_fp), \ + .cb_post = _cb, \ +} + +#define SNL_DECLARE_FIELD_PARSER(_name, _t, _fp) \ + SNL_DECLARE_FIELD_PARSER_EXT(_name, sizeof(_t), 0, _fp, NULL) + #define SNL_DECLARE_ATTR_PARSER_EXT(_name, _sz_out, _np, _cb) \ static const struct snl_hdr_parser _name = { \ .out_size = _sz_out, \ @@ -921,14 +933,12 @@ SNL_DECLARE_PARSER(snl_errmsg_parser, struct nlmsgerr, nlf_p_errmsg, nla_p_errms #define _IN(_field) offsetof(struct nlmsgerr, _field) #define _OUT(_field) offsetof(struct snl_errmsg_data, _field) -static const struct snl_attr_parser nla_p_donemsg[] = {}; - static const struct snl_field_parser nlf_p_donemsg[] = { { .off_in = _IN(error), .off_out = _OUT(error), .cb = snl_field_get_uint32 }, }; #undef _IN #undef _OUT -SNL_DECLARE_PARSER(snl_donemsg_parser, struct nlmsgerr, nlf_p_donemsg, nla_p_donemsg); +SNL_DECLARE_FIELD_PARSER(snl_donemsg_parser, struct nlmsgerr, nlf_p_donemsg); static inline bool snl_parse_errmsg(struct snl_state *ss, struct nlmsghdr *hdr, struct snl_errmsg_data *e) From nobody Tue Feb 27 20:47:52 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TkqLd2gxKz5CPPY; Tue, 27 Feb 2024 20:47:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TkqLd11Mnz43Yc; Tue, 27 Feb 2024 20:47:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709066873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4WXvp1v1dDiwmh5IDUSfXwGLjisnCLskn3uTo0v11KI=; b=iLyFkCQ0nlp88PTVr/GRLrmofZY/UXhHkFAV1X2lktP1FHtKnR3VtskV7A0o+g+oGWlBGZ IUngg5s6OG6hl3HN1hYZrprMrqdTAW8QLvh8uIYkE5To32tLBbvdbFdZGNY3eXKjazNowh J5HlY1gsz0rhTE7ezc/j+8ROqHfNkizgquxfC3SLWIQ0XfqIMqLMZa1W4MUhqX0NA3yRAR KYDP9kLuDbAJL8qtocgLWytPJf35BvKE9trTj5MYsFHHWLNAL0X51KQRwigtrY6Ys4RWUz iF0fCTM0DCJIzQuZLEZyGyk9srkj6HfzSvz3l5J6UuEXUUl6/yJtC4eLfRyN8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709066873; a=rsa-sha256; cv=none; b=cRu0G6Xd2a3ORbSOzaG3IOq9qgwemyBckqtqQZtxcNzi0XoKmTa9tspuEYVJSd4xgxltP6 CbZxop/ifkL1aotqfQfGD0dxGZI26LUQZHarrW8k0VRlDw+PKXCGjicsasbOZ7M3kYUOJ9 lcmmmX2nQ2YFKhu3hu0hmurfxe8YFVwA+IgJfcB0dtR0J8J4sAYRBzGLSDsxsBdY8ralgS 9RyiEOIdenr1zEF6fWQSa5jtkmmgs0byhFu08LzRJu0KViwTAxC5JBLXMoEJoh7JlbNxUv utu1OZa9O13ipo7cY9nUfp+gt3EPNgr+7lMr7tbkWFoN118X72GfwOR8V6E2GA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709066873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4WXvp1v1dDiwmh5IDUSfXwGLjisnCLskn3uTo0v11KI=; b=urVaW+wuD+aaFijEJvcYMl4A/V/+ARZh6SdoCoEVndgn8ABMmA+a4MmvA9hDtPVgqA1FWh wVnNZFvj4WhA0V1L6VVfsx6TOxYbiMcIXC/9Ll12VcY56eZp0mlvFDrglrq1aI7a0BJPs5 lFWuqcvCWoJtrirbzN2RBU7XUif/fZZFpbSwH8yLC8RiZ+03e7xfmXBRtt+Sf4eh+Yqmu0 PB8JDMdtcQyI8PlJSjnhEL8ZRE/NaqaWc3mHwC4LLwxEOQrUlKkYHPDKTDBSbKcGElDYUd ysjXq9WPI3783BZdPUYkmC98LEnn1dUKpwzzHe8WlxCr0xhs+nDMJ9+xAyX6kw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TkqLd05SKzSRW; Tue, 27 Feb 2024 20:47: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 41RKlqRk094806; Tue, 27 Feb 2024 20:47:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41RKlqFZ094803; Tue, 27 Feb 2024 20:47:52 GMT (envelope-from git) Date: Tue, 27 Feb 2024 20:47:52 GMT Message-Id: <202402272047.41RKlqFZ094803@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 41ce9c8b8891 - main - netlink: restore original buffer if nlmsgs_to_linux() fails List-Id: Commit messages for the main 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 41ce9c8b8891eee82b2824c733f103e6671b5731 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=41ce9c8b8891eee82b2824c733f103e6671b5731 commit 41ce9c8b8891eee82b2824c733f103e6671b5731 Author: Gleb Smirnoff AuthorDate: 2024-02-27 20:45:54 +0000 Commit: Gleb Smirnoff CommitDate: 2024-02-27 20:45:54 +0000 netlink: restore original buffer if nlmsgs_to_linux() fails Caller is responsible to free it or reuse. Fixes: 17083b94a91563aba15ba03d1c74796a35bb1c26 --- sys/compat/linux/linux_netlink.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/compat/linux/linux_netlink.c b/sys/compat/linux/linux_netlink.c index af172fb27ba7..d2afec24fe71 100644 --- a/sys/compat/linux/linux_netlink.c +++ b/sys/compat/linux/linux_netlink.c @@ -548,7 +548,7 @@ static bool nlmsgs_to_linux(struct nl_writer *nw, struct nlpcb *nlp) { struct nl_buf *nb, *orig; - u_int offset, msglen, orig_messages __diagused; + u_int offset, msglen, orig_messages; RT_LOG(LOG_DEBUG3, "%p: in %u bytes %u messages", __func__, nw->buf->datalen, nw->num_messages); @@ -558,9 +558,7 @@ nlmsgs_to_linux(struct nl_writer *nw, struct nlpcb *nlp) if (__predict_false(nb == NULL)) return (false); nw->buf = nb; -#ifdef INVARIANTS orig_messages = nw->num_messages; -#endif nw->num_messages = 0; /* Assume correct headers. Buffer IS mutable */ @@ -574,6 +572,8 @@ nlmsgs_to_linux(struct nl_writer *nw, struct nlpcb *nlp) RT_LOG(LOG_DEBUG, "failed to process msg type %d", hdr->nlmsg_type); nl_buf_free(nb); + nw->buf = orig; + nw->num_messages = orig_messages; return (false); } } From nobody Tue Feb 27 21:39:09 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TkrTn5f9Lz5CT8J; Tue, 27 Feb 2024 21:39: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 4TkrTn4X4Mz47Y4; Tue, 27 Feb 2024 21:39:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709069949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WcsUv8GUQNmqcvUUcTnFMex4IC+hcvqC/gcrdzFts2k=; b=xfwSc7EMMcdtJoz3sqz1qQFfZ6wWzSHezY7gB17q3/ec+jq8ZnpRXM23XIg2KeAlclb7Ox iALCzug80vLAyD/X4utMC4e7vjPPY9ylDN4fNzquVx3TJKDTll21gU+cA4vLIZcx3vri/A B14GWFKMt4u8i4i7WhLpomjMyAkCjvScZcDsMxjSFgJZazCWqWbUilhOUhk3hh+5pUonlR JgSLvVxlRMmpgl1oNMvkMwUiCIn4uPSGKu9ngXFo++tGy62d5CPC1XMtIMbrPhTj3WSBKJ VCNXTMXOziUrPTDOqyfipUmsVQVX51rL9o0zG8NVhhtkQWZP6qxxZOFW77hzMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709069949; a=rsa-sha256; cv=none; b=czFyusoIQvJ6qM+sC3KAirDRODd1W8w7mnjxDHD0nsODILwObjhHUcDL1K6+p8QsiOD/07 UPyFinnS3HNG723QFazW1FzZC2bH/vSbEaAfeMMGkKFOLOrwYB06xMMYx7Tt+fsnDS3B2Z LULG9LI+bszN8rRO7DGQlrzbepy37wWg3ues8T2klt9o92TaBEbyogjsje2YKw0IgVNun4 sTZrulxiHS8KbIDvZsqJ5W9v1aPm6GQ1IIU9tMSskhSmrauqYpt+qNjdBPATf84Jaqzy3f xaUrcYTFAVRfHG3BQ6BNDHmZERV5wACetGe4Hff5C1J6P4e7/Qwp3Rmyyly6mg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709069949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WcsUv8GUQNmqcvUUcTnFMex4IC+hcvqC/gcrdzFts2k=; b=fxhekjPF5OlMx4SwWyxWXyZIYWJ9RjqIeTfvhND1BlejNXnCRzn+Ke2KuMibKT7Xn6BUg4 F8g+os3ycxB5lNQ2vGi1ZqNqxtuX4QDvP+OYugkYwzkdeW1CHIfMwc1Vx5aJ4GcELr5UVI VDByRlX73Agd/e6ACyBiR5Rg0xWTt+PuVq7CaE5E5pQBvSHN048GE9MCXgNTTYZS/+ZAoj d0ldRiAFv79pSXlfWpZrld/EPLFkKq2wIo2C/AbjD4nl/+ESJ9UWOBSVfDfbBD+3/fjPMI lLpGL0Pq2UV+nmVE9epGCxVxHYmrVY4gL7G0pD4MLg5wulCSsPuw6DebBQps7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TkrTn3bldzV26; Tue, 27 Feb 2024 21:39: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 41RLd91l079917; Tue, 27 Feb 2024 21:39:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41RLd9jo079914; Tue, 27 Feb 2024 21:39:09 GMT (envelope-from git) Date: Tue, 27 Feb 2024 21:39:09 GMT Message-Id: <202402272139.41RLd9jo079914@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: 8aea77bc3bf4 - main - Add share/mk/local.dirdeps-targets.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: 8aea77bc3bf4623c069a0f889fec4363daaebc69 Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=8aea77bc3bf4623c069a0f889fec4363daaebc69 commit 8aea77bc3bf4623c069a0f889fec4363daaebc69 Author: Simon J. Gerraty AuthorDate: 2024-02-27 21:36:20 +0000 Commit: Simon J. Gerraty CommitDate: 2024-02-27 21:37:50 +0000 Add share/mk/local.dirdeps-targets.mk To include site.dirdeps-targets.mk --- share/mk/local.dirdeps-targets.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/share/mk/local.dirdeps-targets.mk b/share/mk/local.dirdeps-targets.mk new file mode 100644 index 000000000000..f07708c2c551 --- /dev/null +++ b/share/mk/local.dirdeps-targets.mk @@ -0,0 +1 @@ +.-include <${.PARSEFILE:S/local/site/}> From nobody Tue Feb 27 22:10:38 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TksB66bdDz5Bmwk; Tue, 27 Feb 2024 22: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 4TksB664Gvz49tQ; Tue, 27 Feb 2024 22: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=1709071838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ol6vt9FYfYEahFetvk08EV8OAQSqX2/RpJ2DysCZnrk=; b=ndVEu9s0HxrPxmrdiBTkM3N1/VHm5bF70DdLMkDTdNFtq75CF9vcKB1fiS6MZhAYFVKVeN v88m/QfMx1G2cQz2r5bwTunPcAQnTEyCX0stMJvhtO17B8jCHBIC+jxhvrbL10jRwmlUjy VkFN6qyLQBRESArTsi75xrFynS/+yHpnINcBh2Kn1BNJvbOFdn4JHOMScZJKcjxf+IyUdR HzC9DTYWT7DGYvVSDLqEHBq/qsNm9p5V3KbG2rPtxyQwSiLtjiSx2+wguTB6vTNFPPrA1D WEKxnsDgDi9VJrs/DefcrQCGn9xliXOMDTDU7BueQvC0DN4VdLgmC5Hu/NDYlQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709071838; a=rsa-sha256; cv=none; b=sbiir9d9iGlq12X4PPIUMu6HLvlCHpNyyYOKKWwy4OMhTCH6h2hOXDfmpR/srT7BjQSOEu ZdMFNrt1BVb6N0NoOG/Q2QkUPyyqR42jYw40s2QooyIDKKi9pLecMtZTZ80ubKLusuGAhU edZ6rBQy32ihJ+LqsH9okhLo0OCI5NmdSfpUjRzyUpUyQXTavmdBNxbOJBQlu8NQNqUHmo 7sYs0TZQnf8HnZPNVPvOhqKW9cky+loUjZ9e1eeL52TCGD1ZeehpqmxRwAv5Z/xm1EMLpp /PM0nfZfwkDlVlLsg1BqMURom3+45DuTdFn7r3M+6q+pmX1FqxViuWYp6jVPpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709071838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ol6vt9FYfYEahFetvk08EV8OAQSqX2/RpJ2DysCZnrk=; b=cdphOE2fUU2Q5tXDDHABx2VzPop2VLd2E6hk8W77btqj5VSeen/SISzlt67+k/IDEhuI6y jAM263rIlletnlqV9ujHdJeYiQ9P2xlfOUFF9V84QKPnDSsAs8e2kr7S5gNQjTWgpuzeSS wg98NP5LBldOKsapkQZYV59Jz1wf0A4s9KuTJus0F7HpjZ8QvWnEADDnY/qIIE3oqdiywx oTr/MIIlM2zAt7EACJMEbK/Uy7EMhqwChfxQqMMsJJUkP81D8XZkYBjA/k6aigPF6hCz4U U1GfNgcyf+v0z0rXUP3PnJqDWosaT26/hoFnMQOHYvZg6zDj+efqG7XlLJPBdw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TksB656r9zWjq; Tue, 27 Feb 2024 22: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 41RMAcap040273; Tue, 27 Feb 2024 22: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 41RMAcXW040271; Tue, 27 Feb 2024 22:10:38 GMT (envelope-from git) Date: Tue, 27 Feb 2024 22:10:38 GMT Message-Id: <202402272210.41RMAcXW040271@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: fae39d8da9d5 - main - dwc: fix DEBUG macro name List-Id: Commit messages for the main 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: fae39d8da9d5ddf4239fc2143522340c941f6612 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=fae39d8da9d5ddf4239fc2143522340c941f6612 commit fae39d8da9d5ddf4239fc2143522340c941f6612 Author: Mitchell Horne AuthorDate: 2024-02-27 21:59:24 +0000 Commit: Mitchell Horne CommitDate: 2024-02-27 22:10:14 +0000 dwc: fix DEBUG macro name It conflicts with the general "DEBUG" macro defined as an option in LINT builds. Since this is actually unused, just rename it to GMAC_DEBUG. Reviewed by: manu MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D44102 --- sys/dev/dwc/dwc1000_reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/dwc/dwc1000_reg.h b/sys/dev/dwc/dwc1000_reg.h index f581bf135cd8..5b67da2447ac 100644 --- a/sys/dev/dwc/dwc1000_reg.h +++ b/sys/dev/dwc/dwc1000_reg.h @@ -70,7 +70,7 @@ #define FLOW_CONTROL_TX (1 << 1) /* TX Flow control enable */ #define GMAC_VLAN_TAG 0x1C #define VERSION 0x20 -#define DEBUG 0x24 +#define GMAC_DEBUG 0x24 #define LPI_CONTROL_STATUS 0x30 #define LPI_TIMERS_CONTROL 0x34 #define INTERRUPT_STATUS 0x38 From nobody Tue Feb 27 22:10:39 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TksB81HJGz5Bn01; Tue, 27 Feb 2024 22: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 4TksB76y1Kz4Bp2; Tue, 27 Feb 2024 22:10:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709071840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9RfF3KS0/PTKrMdimOVHI2SC14PDKlgkzadEJ9Cz/PQ=; b=cMNm5BFS//jCoSvddcq9I7ZkPI1EkxRF2L1e5BUibAyMwbtmo5vQfqpTMfS8Dl+qh2gUuJ tria4XJp9jHXPfKM8RuN/zT5JHdQfi8AIRkUvgLV3KNEJjZWacnCRoDTWC6pSO/6BlDYIM 0XMkiUpkVevflTqSA3Zejt/cC7vNXwYz5ZWPZ4mKvp5NszPIqIVyw3PrYujYPVs9Nm7Yrd uQPDNTjXIrfDZrtRYFDFdya5RjH/fVnfB7x5X7PMz72ya+PRYfdep4kwCoH74GywIX7Xcw 3GwBzTa4XUWCj/FQYrd3KJX5qEG6cLr75QxYkPbk+OoE5H8bdvmeCTtBJcyo6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709071840; a=rsa-sha256; cv=none; b=oS1h23/E3XkkkYWjjY3A22jDbMZnSLfzUtY4s6v5I4GWJ1jTVq0eHQcqrBF9A2OJv8F6bP xHx7t480zqTSAlFPJRBKZrJdfkN/8hboWEfdIqeTDSk/2Tn8xrSVZFTLGfvHbjFDTKdE7m TUh33hgXcjAMRVMZpmuPJ2z9GZi/nT8+7rvVTWLiFok4MO0XgHPdW1wBrDU3QdAJYpvHac UWOujqlfU8zuc1ekQvymZarK9B3Ego5N1JGnQIIajNiWRmI4veBSNbR78hMHGhRHaOPIrz 1oHa97eKf8IO16Ornk2qJcAGrFDarll9WBRZf5oGVzBAttKx4RzkiLhIvEflMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709071840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9RfF3KS0/PTKrMdimOVHI2SC14PDKlgkzadEJ9Cz/PQ=; b=MsQi/YauzGVzwabeY/ueFM2jD6U8So0LY8V0gjRn/+NaNBL8D6Ojl0AzQ8vGJyp5Y63NSp aTdklVMaxnCQ8NHnlUqftkfA6We/vNvnWpS21sLXMp9f4l87SYk2W/6mu0vYc358mVA0EO pDKX6dzDomHtbTvPDeyiMcNs2gJLulrwsXevdqSoeF2YQ1nQNvqt+Y8EZFhnRHzZKP2Acz I8Xj+iIhVJ0fETI/U4zQEZA4hIlIJmM8w/U893wBdg0mXxvB9Dp/LaKgKTErFCVj2Tc9Kr gPX18XtDaxdgB1EXVBLKA+x5Pl84m2B/NTD8Lry4sQ7KUiy/PeAqvhfaAPSCCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TksB75xBlzWjs; Tue, 27 Feb 2024 22:10: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 41RMAdPk040330; Tue, 27 Feb 2024 22: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 41RMAddh040327; Tue, 27 Feb 2024 22:10:39 GMT (envelope-from git) Date: Tue, 27 Feb 2024 22:10:39 GMT Message-Id: <202402272210.41RMAddh040327@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: a01dc140b27e - main - conf: deduplicate dwc config logic List-Id: Commit messages for the main 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: a01dc140b27e98c200eef173e1db6e750f7d3ea0 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=a01dc140b27e98c200eef173e1db6e750f7d3ea0 commit a01dc140b27e98c200eef173e1db6e750f7d3ea0 Author: Mitchell Horne AuthorDate: 2024-02-27 21:59:53 +0000 Commit: Mitchell Horne CommitDate: 2024-02-27 22:10:14 +0000 conf: deduplicate dwc config logic Move the core dwc(4) file entries to the MI conf/files. Platform-specific versions e.g. rk_dwc are retained in their current position. On arm64 this necessitates adding an additional 'device dwc' option. This hardware is found on several available/emerging RISC-V SoCs, so we will soon need it on this architecture. Reviewed by: manu MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D44103 --- sys/arm64/conf/NOTES | 1 + sys/arm64/conf/std.altera | 1 + sys/arm64/conf/std.rockchip | 1 + sys/conf/files | 4 ++++ sys/conf/files.arm | 4 ---- sys/conf/files.arm64 | 4 ---- 6 files changed, 7 insertions(+), 8 deletions(-) diff --git a/sys/arm64/conf/NOTES b/sys/arm64/conf/NOTES index 48cd2647df70..21b1b22a5f01 100644 --- a/sys/arm64/conf/NOTES +++ b/sys/arm64/conf/NOTES @@ -93,6 +93,7 @@ device neta # Marvell Armada 370/38x/XP/3700 NIC device smc # SMSC LAN91C111 device vnic # Cavium ThunderX NIC device al_eth # Annapurna Alpine Ethernet NIC +device dwc # Synopsys Designware GMAC Ethernet device dwc_rk # Rockchip Designware device dwc_socfpga # Altera SOCFPGA Ethernet MAC device ice # Intel 800 Series Physical Function diff --git a/sys/arm64/conf/std.altera b/sys/arm64/conf/std.altera index 8ef17481c9e1..5a15c20f6624 100644 --- a/sys/arm64/conf/std.altera +++ b/sys/arm64/conf/std.altera @@ -12,6 +12,7 @@ device dwgpio # Synopsys DesignWare APB GPIO Controller device uart_snps # Ethernet NICs +device dwc # Synopsys DesignWare GMAC controller device dwc_socfpga # Altera SOCFPGA Ethernet MAC # MMC/SD/SDIO Card slot support diff --git a/sys/arm64/conf/std.rockchip b/sys/arm64/conf/std.rockchip index 8f8084379d62..3733ddc4eeae 100644 --- a/sys/arm64/conf/std.rockchip +++ b/sys/arm64/conf/std.rockchip @@ -35,6 +35,7 @@ device rk_pwm device uart_snps # Ethernet NICs +device dwc # Synopsys DesignWare GMAC controller device dwc_rk # Rockchip Designware device eqos # Synopsys Designware Ethernet QoS controller diff --git a/sys/conf/files b/sys/conf/files index b5f28b848800..cc476dc88210 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1591,6 +1591,10 @@ dev/drm2/ttm/ttm_execbuf_util.c optional drm2 dev/drm2/ttm/ttm_memory.c optional drm2 dev/drm2/ttm/ttm_page_alloc.c optional drm2 dev/drm2/ttm/ttm_bo_vm.c optional drm2 +dev/dwc/if_dwc.c optional dwc fdt +dev/dwc/if_dwc_if.m optional dwc fdt +dev/dwc/dwc1000_core.c optional dwc fdt +dev/dwc/dwc1000_dma.c optional dwc fdt dev/efidev/efidev.c optional efirt dev/efidev/efirt.c optional efirt dev/efidev/efirtc.c optional efirt diff --git a/sys/conf/files.arm b/sys/conf/files.arm index 28e80016d97b..110c0a9e9dbf 100644 --- a/sys/conf/files.arm +++ b/sys/conf/files.arm @@ -86,10 +86,6 @@ contrib/openzfs/module/icp/asm-arm/sha2/sha512-armv7.S optional zfs compile-with crypto/des/des_enc.c optional netsmb dev/cpufreq/cpufreq_dt.c optional cpufreq fdt -dev/dwc/if_dwc.c optional dwc -dev/dwc/if_dwc_if.m optional dwc -dev/dwc/dwc1000_core.c optional dwc -dev/dwc/dwc1000_dma.c optional dwc dev/fb/fb.c optional sc dev/fdt/fdt_arm_platform.c optional platform fdt dev/video/crtc_if.m optional vt diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index cc217b3ce78f..5ff090fcf8b2 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -258,10 +258,6 @@ dev/dpaa2/memac_mdio_fdt.c optional soc_nxp_ls dpaa2 fdt dev/dpaa2/memac_mdio_if.m optional soc_nxp_ls dpaa2 acpi | soc_nxp_ls dpaa2 fdt # Synopsys DesignWare Ethernet Controller -dev/dwc/if_dwc.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 | fdt dwc_socfpga soc_intel_stratix10 -dev/dwc/if_dwc_if.m optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 | fdt dwc_socfpga soc_intel_stratix10 -dev/dwc/dwc1000_core.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 | fdt dwc_socfpga soc_intel_stratix10 -dev/dwc/dwc1000_dma.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 | fdt dwc_socfpga soc_intel_stratix10 dev/dwc/if_dwc_rk.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 dev/dwc/if_dwc_socfpga.c optional fdt dwc_socfpga From nobody Tue Feb 27 22:10:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TksB93R9Qz5Bmwm; Tue, 27 Feb 2024 22: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 4TksB90y40z4BNx; Tue, 27 Feb 2024 22: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=1709071841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lX91vGGkl6PGwHJSgs9BvFMOARiWAmNTSd097iBkkE4=; b=RUh8qQvnmTPpfQraCoZKexQuFnxHwg8JdBXyEl52Tst9KF8LiWiZxS+E0eBj9kp+iZ8IZh jHRHzBgdd8DGh9JDOMxl7w3htVfnjhFL3vIKwMLQ7icORn0gTbwO4wluqViLUAjyj3YfLT +wG1CQ57yoxxEL+b1M/StleGFUUrBzzrYHFN8gbS6B68Qz//Eo6FqyI9DPmAsn5HYrwP7W 5hSOFlI4otJbihhlxGim9ndnZ+7D1a/aXIR9tmD7MpGYRnARe+TFsybLBHkItwBtodUhuS rqVF2J5R8Rln49ZmuFWiX+Vfs/yJ0JYMDc6o9xmnGMUg3PQC4c7/xWlfZeD6Iw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709071841; a=rsa-sha256; cv=none; b=Bi+HSrhKVO7XttvdYk/G4bkgpTk6s8ooqAOLU3MX26hRJmVNC6dR2ouel7H67nacJYPQpI dbCUHB7xB8Q/NWy20v8S1IZWGMcMGxwSfaLTthRfAmJjHF74TXPEu1V9W2Bn71gFsRx+ox UU7amfD5I6fivKaC5S0z18/AhcKWFO+Q0vQYjay465a04/XQBuTw1bwShyv1bhMVC0sMA9 jpHby1tcsfB3MKqesmU/EbXmOJCOvmsbety9v2GuICW3z9kdzie1eawBm2rTHnl76O+Ndo tN05enIFBk4N0OEiIFVK3/zibCSemRo0At11eurlrghhx+tuDNcdzEvOX94a5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709071841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lX91vGGkl6PGwHJSgs9BvFMOARiWAmNTSd097iBkkE4=; b=YYmzAmMfzY/4eKJo7g8L92Tj0eqWh90j6dZ5CEVPlMyQpclQGmYIbpf6uWXdtMzuSNAz4v I2JU5qKjJ/QqMKNHizqq6Q5RzGA1gaxTaS1rD6jCp+G+wQGufKV9ILa1/R9OWa/SUcMX5R 3IOs1qZdI3Jj6VLmu/tMbb3Gxw3nJ3UhKkOMr5KbRNOtC+MbbXrkQ4IJtgxkei39tKX2iT u0qEDQuvONK0CZk7Ipu3QdKWRzKmchEyGH/qvKhmiKeX51ac1nREuDDVm2msS/qKGHL6tI w6iVpmmK+6SBYV1T36mTk5R/ezzFCaGoava9kL6gFjqx7SXZwkhR3L+CSJLV1A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TksB86x5mzWJd; Tue, 27 Feb 2024 22: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 41RMAe0e040375; Tue, 27 Feb 2024 22:10:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41RMAelO040372; Tue, 27 Feb 2024 22:10:40 GMT (envelope-from git) Date: Tue, 27 Feb 2024 22:10:40 GMT Message-Id: <202402272210.41RMAelO040372@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: f84e9df6d0e5 - main - conf: deduplicate dwmmc config logic List-Id: Commit messages for the main 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: f84e9df6d0e56168d8d5d0514557cc345938bef7 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=f84e9df6d0e56168d8d5d0514557cc345938bef7 commit f84e9df6d0e56168d8d5d0514557cc345938bef7 Author: Mitchell Horne AuthorDate: 2024-02-27 22:00:24 +0000 Commit: Mitchell Horne CommitDate: 2024-02-27 22:10:14 +0000 conf: deduplicate dwmmc config logic The core of this driver is supported by multiple architectures. Move the config entries to the MI conf/files. This hardware is found on several available/emerging RISC-V SoCs, so we will soon need it on this architecture. Reviewed by: manu MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D44104 --- sys/arm/altera/socfpga/files.socfpga | 1 - sys/arm/rockchip/files.rk32xx | 1 - sys/conf/files | 1 + sys/conf/files.arm64 | 1 - 4 files changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/arm/altera/socfpga/files.socfpga b/sys/arm/altera/socfpga/files.socfpga index 986c08184570..1cf8d95b9fa3 100644 --- a/sys/arm/altera/socfpga/files.socfpga +++ b/sys/arm/altera/socfpga/files.socfpga @@ -5,7 +5,6 @@ arm/altera/socfpga/socfpga_manager.c standard arm/altera/socfpga/socfpga_rstmgr.c standard arm/altera/socfpga/socfpga_mp.c optional smp -dev/mmc/host/dwmmc.c optional dwmmc dev/mmc/host/dwmmc_altera.c optional dwmmc # Arria 10 diff --git a/sys/arm/rockchip/files.rk32xx b/sys/arm/rockchip/files.rk32xx index 5f15a22cc334..a9ca6cb1b5ae 100644 --- a/sys/arm/rockchip/files.rk32xx +++ b/sys/arm/rockchip/files.rk32xx @@ -26,5 +26,4 @@ dev/iicbus/pmic/act8846.c standard dev/iicbus/pmic/act8846_regulator.c standard dev/iicbus/pmic/fan53555.c standard dev/iicbus/rtc/hym8563.c standard -dev/mmc/host/dwmmc.c optional dwmmc dev/mmc/host/dwmmc_rockchip.c optional dwmmc diff --git a/sys/conf/files b/sys/conf/files index cc476dc88210..3c87c0b88528 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -2408,6 +2408,7 @@ dev/mlxfw/mlxfw_mfa2_tlv_multi.c optional mlxfw \ dev/mlx/mlx.c optional mlx dev/mlx/mlx_disk.c optional mlx dev/mlx/mlx_pci.c optional mlx pci +dev/mmc/host/dwmmc.c optional dwmmc fdt dev/mmc/mmc_subr.c optional mmc | mmcsd !mmccam dev/mmc/mmc.c optional mmc !mmccam dev/mmc/mmcbr_if.m standard diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 5ff090fcf8b2..ef00857b61c0 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -384,7 +384,6 @@ dev/ipmi/ipmi_smic.c optional ipmi dev/mailbox/arm/arm_doorbell.c optional fdt arm_doorbell dev/mbox/mbox_if.m optional soc_brcm_bcm2837 -dev/mmc/host/dwmmc.c optional dwmmc fdt dev/mmc/host/dwmmc_altera.c optional dwmmc dwmmc_altera fdt dev/mmc/host/dwmmc_hisi.c optional dwmmc dwmmc_hisi fdt dev/mmc/host/dwmmc_rockchip.c optional dwmmc rk_dwmmc fdt From nobody Tue Feb 27 22:10:41 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TksBB6Zzfz5BnFL; Tue, 27 Feb 2024 22: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 4TksBB24Kkz4BrL; Tue, 27 Feb 2024 22: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=1709071842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AbaN3DJDLP2pkP3aQmZOc8IATccKiUGUj6gLTQjJTNU=; b=l2OUmHt/dfHdZEG0F5Ou88G1oy1/h1TiL9g3aCq/J79W7oRs6irjqb1CeyXBbX64sB4t/i vb6bXDKmDRwiLx7RY5aZXgkFj8kGGrqBgW1K0gOxZIFiAvRTeVCftFdaPbTvjP1+FI25Mg haxzf8DlUL87dOm3R8b+aoS7uNpNGgRp36jzPBNHMPrfhRGNzykMjj26kaAL85eVMCQPd4 UyuFxh/bKZ41hD2UEBh+d1zT2IXrexofAZrX/IRKynW7N5Bcf1j9NiKu1d1u9+Ztc6ax0F qtHWl0h3rcwBBuIwl5dERKz8+3C1XTeGu7U949T0h4RVV6CPCrtlcZPp0wo3Pg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709071842; a=rsa-sha256; cv=none; b=NkAORLnR+FVAoox3Jo0CMY3cH1hF+KIRKf0jIdmzum8zBOh2s0p8q2gAILCWG4LfUqa4wk 7jcltf7SV1ZyY2I5xgcV3iXbVdHQZP9F7GQsEezv5OJFy9x7sQf3Fdp0Qm8vkvbq1rhKAL M/GWOIm409r4nnpqaJxU1crVQMqIjcDcm2Wa0THzPMiZ1q9V/9YbirKy0Y2M100FXMFw4J xcpIPIM5uRIeCALWZn4PYT6wAUCasO9LSGdZmjJiLWmyrJ6HZcr76SzrIAOXtzhBN4rBnH GLd0zNIinHjiCTjfZyQ4xbY2k4XX+jURx0XSOzp8ZXew8o/A94LX5fR+yT1C0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709071842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AbaN3DJDLP2pkP3aQmZOc8IATccKiUGUj6gLTQjJTNU=; b=DklozyMPG6RoECZYZEck3O0AFpR6Ew+TnLrdUrc7aPB3fZMAJ9d6ARKpXbDcPKPaAF1CqY aSQaJCwFmUNrCjUgNaCFKMAD06rqKyslNxzGyFsjKKIHTG6+p4KXYje1FTu0v41waNRHaB CRMFXCa2Lg6R+aWwXqfbB/T1+f0EznBkmIeOYNOEdGxeCFHFoccDvLUfgGJ/dml3ya0B64 7d/e/YKho5X0FaRiS8JVDQxcU0xhvQlpt3kJZuoMqeJLSLIOzNhzpXvRd6Qy09q2NnZrla K+99kH1I97Sj/mp4KXOdUzoVdCDTkqbHebctt05EszEFu5pssbfD2T9T/iMKzg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TksBB0M7JzVyg; Tue, 27 Feb 2024 22: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 41RMAfEe040428; Tue, 27 Feb 2024 22: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 41RMAfTL040425; Tue, 27 Feb 2024 22:10:41 GMT (envelope-from git) Date: Tue, 27 Feb 2024 22:10:41 GMT Message-Id: <202402272210.41RMAfTL040425@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: 036ce936a5aa - main - riscv: add dwc, dwmmc to NOTES List-Id: Commit messages for the main 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: 036ce936a5aa566ff4bfe2140d3f192f736a4a6b Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=036ce936a5aa566ff4bfe2140d3f192f736a4a6b commit 036ce936a5aa566ff4bfe2140d3f192f736a4a6b Author: Mitchell Horne AuthorDate: 2024-02-27 22:03:18 +0000 Commit: Mitchell Horne CommitDate: 2024-02-27 22:10:14 +0000 riscv: add dwc, dwmmc to NOTES In the future these drivers will be enabled in GENERIC. For now, ensure they build with LINT. Sponsored by: The FreeBSD Foundation --- sys/riscv/conf/NOTES | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/riscv/conf/NOTES b/sys/riscv/conf/NOTES index 52720f6d83d1..f6b27a626dfb 100644 --- a/sys/riscv/conf/NOTES +++ b/sys/riscv/conf/NOTES @@ -45,6 +45,9 @@ device nvme # base NVMe driver options NVME_USE_NVD=0 # prefer the cam(4) based nda(4) driver device nvd # expose NVMe namespaces as disks, depends on nvme +# MMC/SD/SDIO Card slot support +device dwmmc + # NOTE: dtrace introduces CDDL-licensed components into the kernel device dtrace # dtrace core device dtraceall # include all dtrace modules @@ -58,6 +61,7 @@ device da9063_rtc # Dialog Semiconductor DA9063 RTC device goldfish_rtc # QEMU RTC # Ethernet drivers +device dwc # Synopsys Designware GMAC Ethernet device xae # Xilinx AXI Ethernet MAC # DMA support From nobody Tue Feb 27 22:10:43 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TksBC4bPdz5BnFN; Tue, 27 Feb 2024 22: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 4TksBC2hTQz4BpF; Tue, 27 Feb 2024 22: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=1709071843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l69x36r8CIO7YQtgJhIwncF40FCv3f3KK82dl23EMZM=; b=gG8JXbbdjheUZ3quEm4dZCpXxPveFYyu0xXEaLJ6KAfktILCNv7BDR2uI7S0oFenBf+Csx XSXq74mn0AVVk+T0jfDuIUZEJnPnC75pPMbG+tPE8H8I/cybMHqJgsN3U6MVbxujMbN7P/ yLX3JFwDTqKn7zaoPoN+GmWF0+YqYuZGXUawgo4ohZwhbV100tqquhacL0TJWKwT/EwN4j /KeUBmbl311eYPU0HBmD393fjQUIG/PgQ1S+F3sryQwkfz8MipY8prUhgzjwnc8x1WmNzy 6LHb3HYllCMzR6pdW81Cq8tfj8c2Tyo7Y1OOndExfznpRdSiGctuvCjI3gpSOg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709071843; a=rsa-sha256; cv=none; b=SSOdD0PKIqOTKMMDUKGYt/KXyQwWEiONq/gY/g1g/J7Zst4eELr53iaWKknQ0QLyrk73Jf 0199GcuFZ7kPibCBSGd1OreS+DQR449Vhq7jGLZy0ZZC5wIS0gP4qwImrFFZyuUEKUFBPM 2th/VJD+4fO7q2G4HhQk6BooL0CqRnDRDY25kZyX7pQUrp/palK5qXYjeAWO3NU/W75xoV yE1JzFOQKqVNAa/KIHSYokx3+2Q52YQr8Mho/b4O9XgxIJPUrwNypgm7CG5isRGoqmoK6c IbGGmBISDjUZhNlbf0JRcpz1cOF2jPfvKdTGhqqj+8NfaqUT4Imtjypqr7QiZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709071843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l69x36r8CIO7YQtgJhIwncF40FCv3f3KK82dl23EMZM=; b=g4BImt0OErk7oOVvFwdLwERaizn3vk0KCz0czc5Ux8cWOgxsVtL0ie+u4ztncnPZEWvZgS 9NDqXeKy2QnlxUqc5kWolEcExWUoU1A1heaUK6oqre4SRO3s6y92hAxRr+L6FmF7DcnmXx mWceKz/V7BWD4XW0lkOa6V+ZqgIKR8bKrcu11EiG/3/SsXlSG3vE2AKql7whQUAKVBRUmz Ud9VeZpE7CmXGOKuC/A6bhfy+YvSR5fGG1aXYhSlTWtps3dDJAdcbDLo566Vg8lJEZvtMz l0R4I2iFmpqKyg0uN+BqxuzGGOvtyc/QQfHONKtY0JVFaNQhUhWFEGKlpAu+HQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TksBC1PwVzTHp; Tue, 27 Feb 2024 22: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 41RMAhiU040470; Tue, 27 Feb 2024 22: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 41RMAhYa040467; Tue, 27 Feb 2024 22:10:43 GMT (envelope-from git) Date: Tue, 27 Feb 2024 22:10:43 GMT Message-Id: <202402272210.41RMAhYa040467@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: 749e318da39e - main - riscv: add starfive kernelconf template List-Id: Commit messages for the main 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: 749e318da39efc58107fdef517cf9c357053413a Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=749e318da39efc58107fdef517cf9c357053413a commit 749e318da39efc58107fdef517cf9c357053413a Author: Mitchell Horne AuthorDate: 2024-02-27 22:00:44 +0000 Commit: Mitchell Horne CommitDate: 2024-02-27 22:10:14 +0000 riscv: add starfive kernelconf template Enable the Synopsis UART driver. Other drivers will be added in the future. Reviewed by: jrtc27 Sponsored by: The FreeBSD Foundatino Differential Revision: https://reviews.freebsd.org/D44105 --- sys/riscv/conf/GENERIC | 1 + sys/riscv/conf/std.starfive | 7 +++++++ sys/riscv/starfive/files.starfive | 0 3 files changed, 8 insertions(+) diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index b6c7bb54050f..74ca1a94fc87 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -205,3 +205,4 @@ device iicoc # OpenCores I2C controller support # Include SoC specific configuration include "std.allwinner" include "std.sifive" +include "std.starfive" diff --git a/sys/riscv/conf/std.starfive b/sys/riscv/conf/std.starfive new file mode 100644 index 000000000000..578110dfd5a9 --- /dev/null +++ b/sys/riscv/conf/std.starfive @@ -0,0 +1,7 @@ +# +# StarFive SoC support +# + +device uart_snps # DesignWare Synopsis UART driver + +files "../starfive/files.starfive" diff --git a/sys/riscv/starfive/files.starfive b/sys/riscv/starfive/files.starfive new file mode 100644 index 000000000000..e69de29bb2d1 From nobody Wed Feb 28 07:18:20 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tl5L51KZzz5CpsV; Wed, 28 Feb 2024 07:18: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 4Tl5L50n5rz43LD; Wed, 28 Feb 2024 07:18:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709104701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5eTkC1ClR3crUkrRHHPljiCpCbO0qPQNjYywIDNB1go=; b=qMbWPHOM6xKX82SEZ2sqlKgn0JulR1ZDODz768tIRKEzmBLPPt4mYB4OPkwX4ZYwcCqz8+ 51H17mOcwgUczxLlfzF0uPg9zpTBLHbB++j66f9uRW0EWOrPLeUhqINErq8b/WJHpazIzD 2CHzNgzOL2TdVJjMOztfY0dH3IgN6lg44kKXpwLl/oXV9O4ju94YXPLXzZHOVl36zJtuez EyYF2qObXZ8+1fclC6H0iW7c+rYK0w0fTtDeokIIM78pzLzhRWNjIXJbrMNLs3Q4dK4mrv vZa7U7OB8ihrVwiQz+l8GLIKqhjwE6zJohgssMeMlRLhKMXast99F2411cj8Fw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709104701; a=rsa-sha256; cv=none; b=SwiP2hT4uOAF7VBnex2hrNXjHImm6c9UHYtvNTwQoDBH2vJOXSh1uBVMIbcwZjLV2JoqaD JsmHzg8WaQnpjatmLvPMJ8o+a0sw/lEL+kriXYkKsDWL/S3SCV1wvBTNv14sBgOKD4miBu GstSgBczFeKSSpkNixS+dvifuV+s9qYuZzVtsfPLinZfK9r/XH6PZDVGNJkSlz5npbpP1Z g0WpEE7VmWg4fPqjtj1dgPhBnpkAjKd4sl8wgnOhr5GEweJHrxlc6yGRgE2ROKgH2W/vEu 4mhPD6YuHZANiIAgQEzYvnKdYqYbB6r9WKCKqADtOFGHamoDsxBd4E56AcQhgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709104701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5eTkC1ClR3crUkrRHHPljiCpCbO0qPQNjYywIDNB1go=; b=ax5+ZrZIG3n8eg9z4HWnlSafYYINHg3YdcJNsWGDy6TJHUD9g3T3RX5NnwrRrYQ0OfKM0V QlxEzL0fB2WS2QF4YY79ksD62oykFuHZSjhKvO9007Iu6sdEX9dRwDnjmc8YBSr+5HY9Bq Bx+OhL0cPbGLdXt0wLfMCNA4rhnHTuPAgmYhf7JXTbUHs/s5XlCzEZpfcbt3C2N1qrjIyP /6OFmR+loAHm9xAfWU2DIcbyN/COtJscMVJuwfEnMVetoU44Tc1y02Py+FzrcYVq4M+n6o d0Wwl3Q4qZDb/czme0QEiIGZk+P8dEmcXGe9X3Yq/XvJYTePqFpfm++PJ1I0aA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tl5L46yFDznmD; Wed, 28 Feb 2024 07:18: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 41S7IKL6057286; Wed, 28 Feb 2024 07:18:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41S7IKOX057283; Wed, 28 Feb 2024 07:18:20 GMT (envelope-from git) Date: Wed, 28 Feb 2024 07:18:20 GMT Message-Id: <202402280718.41S7IKOX057283@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 72b045386dd3 - main - rc: Set var_run_enable to enable by default List-Id: Commit messages for the main 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 72b045386dd3db8b31ec3067cb9e160cbd1cfbc6 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=72b045386dd3db8b31ec3067cb9e160cbd1cfbc6 commit 72b045386dd3db8b31ec3067cb9e160cbd1cfbc6 Author: Emmanuel Vadot AuthorDate: 2024-02-27 17:33:52 +0000 Commit: Emmanuel Vadot CommitDate: 2024-02-28 07:17:58 +0000 rc: Set var_run_enable to enable by default This will load/save the /var/run directories at boot/shutdown if and only if /var/run/ is a tmpfs mount so it is a win for tmpfs users and a no-op for everyone else. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D44097 Sponsored by: Beckhoff Automation GmbH & Co. KG --- libexec/rc/rc.conf | 4 ++-- libexec/rc/rc.d/var_run | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 20f0a6375a9e..2fa3b676cb38 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -61,8 +61,8 @@ varmfs_flags="-S" # Extra mount options for the mfs /var mfs_type="auto" # "md", "tmpfs", "auto" to prefer tmpfs with md as fallback populate_var="AUTO" # Set to YES to always (re)populate /var, NO to never cleanvar_enable="YES" # Clean the /var directory -var_run_enable="NO" # Save/restore /var/run structure at shutdown/reboot -var_run_autosave="NO" # Only restore /var/run structure at shutdown/reboot +var_run_enable="YES" # Save/restore /var/run structure at shutdown/reboot +var_run_autosave="YES" # Only restore /var/run structure at shutdown/reboot # The user is expected to issue service var_run save to # manually save the /var/run mtree var_run_mtree="/var/db/mtree/BSD.var-run.mtree" diff --git a/libexec/rc/rc.d/var_run b/libexec/rc/rc.d/var_run index daff06ce1a3f..bf8f0cb737b4 100755 --- a/libexec/rc/rc.d/var_run +++ b/libexec/rc/rc.d/var_run @@ -17,11 +17,6 @@ stop_cmd="_var_run_stop" load_rc_config $name -# Set defaults -: ${var_run_enable:="NO"} -: ${var_run_mtree:="/var/db/mtree/BSD.var-run.mtree"} -: ${var_run_autosave:="YES"} - _var_run_load() { test -f ${var_run_mtree} && mtree -U -i -q -f ${var_run_mtree} -p /var/run > /dev/null From nobody Wed Feb 28 08:26:54 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tl6sB43Hjz5CvLm; Wed, 28 Feb 2024 08:26: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 4Tl6sB3TJ6z4BpR; Wed, 28 Feb 2024 08:26:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709108814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KVNtd3Ss48q0La4NJp0NFt6umi6fXMGnAd5eTC6hyIU=; b=diM1c2oVH43rb+sH4dnwJ7TwcALyGHP1EnbsFGwhC6E9Zu0StSI+6Pr9FS/GM0rDXfQHpF G+CBYQb+YgP0xkfSbDrD1FtGZWqaRU9tKYrD62knOq6IK1K217lZy5okWTXUd8vkerpLau MFcf+W7NV0JsOfmCfMUOmqUvKqgDdSphdL2Z+0AFcC3oYgF6L62Qbp2WyqPNMDPJYL0tuV ENIPHeQ1JbuzU3ojkgXPTRrZyRG/mH7CkoOiDPGDGG6f3pX+5XraPcgNYK7cszmhmKp4HZ E1HuI21kX6gW0q6eSgzFHca93tHLMlKXwxtzGRyJxEWTsmuoAWoK+NB8KS6akw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709108814; a=rsa-sha256; cv=none; b=WN7ILxYJrZNwnbAA1vDtpupLYKtCu+Km1Rl7CYYHT3Akbg7S7mATcUB93b0SOIgWyFF9IS OoXzL9stNE7ZpLOdTzVOUy7UNAya+iUGfdkPlxx7rYryMfLu3eUXsMnHSYO9bPe0VH11V4 mMgruApcftKfsGU1FxSdTUodqUXhFC4tfVYvvadcvzOsxY2e7CD/c8vHKF9slHYVJ2l78s HIur1kIU/l7ZWyaion5KmLcP9MgRqjHfvGVOqJsjX2uRaONzmvxzl1/E4FAYRzGhOuHG31 eT24g0dT6TT+LrAfx8ilkK0Y5F9VHGw049/3MXtpOW+2ut8ZGGAiXUQS/xrF8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709108814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KVNtd3Ss48q0La4NJp0NFt6umi6fXMGnAd5eTC6hyIU=; b=CCiUy/by+dcpxnfKrDXOuOA9Q6cH1ANXSMc92R0rHCrm33PFe8pOdQyeOhX+Bak6RsR+Jf mAgGjhBcYX9BphQTBpqmOVH4ivrCNkzd/wZSQt4XK7Gj+eOTNphErXMcaub9DWe1IhV9mK /eWY6cUIL378BWI/ogAKvkRcLMOie/Ib6TR+RGiQfWKqWfjn4OUIaIr/uLUwTBwl0bw/xk y4G9uFsF7H2QguKORK1sLIHTufYWKtJizIhS/S8jBb/YLdiTIdCqmSj4We/uyi0waJOYNc 6l1vZtiRmjamKKuUPcVsl7/ZMptxtAAuTTm6MHE/HJvUNVQ9N9UevHo0Ml6ZSQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tl6sB2W6yzqRJ; Wed, 28 Feb 2024 08:26: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 41S8QsV0075425; Wed, 28 Feb 2024 08:26:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41S8QsGK075422; Wed, 28 Feb 2024 08:26:54 GMT (envelope-from git) Date: Wed, 28 Feb 2024 08:26:54 GMT Message-Id: <202402280826.41S8QsGK075422@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 77f6c0ce9288 - main - nvmecontrol.8: Fix the SYNOPSIS section List-Id: Commit messages for the main 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 77f6c0ce92888d047d91e87b931242403764902b Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=77f6c0ce92888d047d91e87b931242403764902b commit 77f6c0ce92888d047d91e87b931242403764902b Author: Stefan Schlosser AuthorDate: 2024-02-28 08:26:20 +0000 Commit: Gordon Bergling CommitDate: 2024-02-28 08:26:20 +0000 nvmecontrol.8: Fix the SYNOPSIS section The manpage of nvmecontrol(8) has the following SYNOPSIS: nvmecontrol format [-f fmt] [-m mset] [-o pi] [-l pil] [-E] [-C] The correct switch for the pi option is -p according to sbin/nvmecontrol/format.c: OPT("pi", 'p', arg_uint32, opt, pi, "Protective information") So correct the SYNOPSIS section accordingly. PR: 276554 Reviewed by: imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D44099 --- sbin/nvmecontrol/nvmecontrol.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/nvmecontrol/nvmecontrol.8 b/sbin/nvmecontrol/nvmecontrol.8 index c4ab4429f5cd..edeeb9afa10f 100644 --- a/sbin/nvmecontrol/nvmecontrol.8 +++ b/sbin/nvmecontrol/nvmecontrol.8 @@ -33,7 +33,7 @@ .\" .\" Author: Jim Harris .\" -.Dd December 14, 2022 +.Dd February 28, 2022 .Dt NVMECONTROL 8 .Os .Sh NAME @@ -155,7 +155,7 @@ .Ic format .Op Fl f Ar fmt .Op Fl m Ar mset -.Op Fl o Ar pi +.Op Fl p Ar pi .Op Fl l Ar pil .Op Fl E .Op Fl C From nobody Wed Feb 28 08:32:48 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tl7010GJ1z5Cvmc; Wed, 28 Feb 2024 08:32: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 4Tl7004w5lz4Ctm; Wed, 28 Feb 2024 08:32:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709109168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7lbOldYW3VX3RoPUP0JqmIBrZ/KwGeQfkSYAd6BI5YQ=; b=xkwMnn86SdbDSEbF9mlfTFFvvpA/cS8PzMq9el1rwl9O3GikeRU20731x+qy4e92vGQDsp nuBzNKddKesRFEp2yM3yxNpTMs4JpPsg/nDuYzrzpc8ijNSq6F/16kXCfNeZ7TW5yIHVAV AOFNUVKSfpPOXPxzq6uykk9AkE1So1rAomzGrftWeydNFIvPwNatOc5FxCTkxrA6XL5o8h hQGeK/xPRKTZ7UKCC41vSkk+68UvRYcjP1edTzaDS09zoGUUVH1PyGaUWbfzwbIE6Qa3RT eWsXVodhy6BTqAzool8dfXbR9XbI+BR9v8L9bZS/BFczTumIl+mKsEdZ8898og== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709109168; a=rsa-sha256; cv=none; b=kVqhKBuMsGERJEly1KebsZ91TwoKuis7jild0O/26tyBJnEwvJwO48JpJYJQgA1d5LhaCb ieZxencJbb0qROtpn5FTvc6DJVyX5GeMJW0gTTRSoM6+rfFlNl4xJ7sDAPWB+BWHUTFLhe rM8PExOCsC+LtWJn2esPG1wteBXz1Hl3636MWZFq6HTcbEZJ9CeZp09lCHYzV4lLasIPLj nmHZHXkiR8Vh6utwJVspNZorrZ7aja6LqVq2cLfejA4UemQLBPsB0x+ChPdwJWQGrbZnU0 lkP1U1H0SsADUVzel83QcXjdtAro8PeuGmYTv0A9NEnA9Li8uwLccADoKz8gwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709109168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7lbOldYW3VX3RoPUP0JqmIBrZ/KwGeQfkSYAd6BI5YQ=; b=GsAUmJQTXTPGP2paLX0PvBt3wBHYx9GyAGfCOYqiCy7percSATeCN99HnNP/2U1cramzHf GqaNFcnXqdgEQpcpIbj0VtHH2/PCVBaFn8yPTej3n0sMOyVqkr0p5nsPXsEwLrNiigijJm bzSI6R/9vIHHNHYs1t+fT1ylsfmlz62/yCWaCwJe/TmBAsSkSKKFZ1fIzcoxIyJA88Z9fG 56a/tBGL+Ts+t0POwIVCCPxClYPhRxqXxRmd5BQYCo6Pwkh5V4Gv2lv5XqdenEw2Xjdp1U BQcdSrLk6J9H8KSMLo8Rhgc/aCehTG28Bt+3fxResIy3L++guWjvi/F9dOYBFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tl70040QbzqS4; Wed, 28 Feb 2024 08:32: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 41S8Wm8Y091146; Wed, 28 Feb 2024 08:32:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41S8Wm6h091143; Wed, 28 Feb 2024 08:32:48 GMT (envelope-from git) Date: Wed, 28 Feb 2024 08:32:48 GMT Message-Id: <202402280832.41S8Wm6h091143@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 865baeaf1abe - main - md5.1: Fix an example List-Id: Commit messages for the main 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 865baeaf1abeb14327ad6a4a1f8ce722e242ff73 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=865baeaf1abeb14327ad6a4a1f8ce722e242ff73 commit 865baeaf1abeb14327ad6a4a1f8ce722e242ff73 Author: Stefan Schlosser AuthorDate: 2024-02-28 08:31:28 +0000 Commit: Gordon Bergling CommitDate: 2024-02-28 08:31:28 +0000 md5.1: Fix an example The last example in the manpage md5(1) wants to demonstrate GNU mode (md5sum), but uses BSD mode (md5) instead: In GNU mode, the -c option does not compare against a hash string passed as parameter. Instead, it expects a digest file, as created under the name digest for /boot/loader.conf in the example above. PR: 276560 Reviewed by: mhorne MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D44098 --- sbin/md5/md5.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/md5/md5.1 b/sbin/md5/md5.1 index 0a8dc46f3b1f..88b795da74b1 100644 --- a/sbin/md5/md5.1 +++ b/sbin/md5/md5.1 @@ -1,4 +1,4 @@ -.Dd February 13, 2024 +.Dd February 28, 2024 .Dt MD5 1 .Os .Sh NAME @@ -367,7 +367,7 @@ for .Pa /boot/loader.conf in the example above. .Bd -literal -offset indent -$ md5 -c digest /boot/loader.conf +$ md5sum -c digest /boot/loader.conf /boot/loader.conf: OK .Ed .Pp From nobody Wed Feb 28 14:10:39 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlGTq6GhDz5BfVL; Wed, 28 Feb 2024 14: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 4TlGTq66mHz4fWq; Wed, 28 Feb 2024 14:10:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709129439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rN43Uu2jZQ32hOFO3t2e3ffbTLBeBCj5W6FWIdr41Pk=; b=oIIWXefBKMMshDz4K/yzfs1z+mKQ+j0MIoUr1QcdpRKOh8wtaKRsSY+vQXDteNRp5kLQ/B jn+X8UOCE6JdmjsG7SaaVka+XvXWTPv5DDwBHENpMu2dVK3StffKERctBNKrG02ZSRqlkb /qR44Fs6kLyXDvJVP/oD8Wg0TWFpxWuuXcQdywmxs7N4SyLyt1ALBJXnkwBnQAQ/dpo/uM 3ykz9dSeW6iCX3J1JB+WRwAbZi3tW5w3vY46uzjfWwV56M35MyeiEP1iFEPuF/H+yCMguU fpZwtBTe/rnuMLrsqy2dRa0J/TePojZpG4saNCQ3DM8h1wJ8DxRwFHyLIQ2rGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709129439; a=rsa-sha256; cv=none; b=rGKhoyNHotaEir62h37ybJAf/njfIJpLE4kHHuTMeU3M+q6SoWXU9adhTPGcFPYux2WlEU Ih9BgMSAznxNSzxpkHCWnQnaU3Hdp3GhaW2k57+zqK7VETYDTq51R+XOGRDSu4Jn6H5iKR QXEReYBT1Ul48kwhp6rgPiw9guwOB+pC2xX5Sm3oV47bF0NLQSzdMPl6K58GkdJ+iMYMPq 85kFLd2HIP7r6orIWgDDdJZQJZrzO21gadiO/h/5Ine1Ey4eKwb+u0W1E1zbVNENmaaJ/I laG0Kve6YFK5ux1rFIwgDa9TpbwjCMNxOPQLVLm37GxzFIZUJTW31QovsPt/pA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709129439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rN43Uu2jZQ32hOFO3t2e3ffbTLBeBCj5W6FWIdr41Pk=; b=obVJN+4btlXnHh78T44nokIZ6eJnY47yF7+UGiJTEIoYijNypDi/XPB8PInSRvPeDiF1i6 ZcP7I3MQiaDv/+wGZCUlo7BUdtKDGvzLhbJ5BvKzbqqZ16kGjLFI08/wuwT07vJqc6Yt4Q cvOT/t9bQhQbbkVL6xmOpkDUOiUNgpWRXBUncdzgN/t+b3UdpcM97LQcSc/flQ1BQSmZ2u /Y6XBYkbxNY4ILvAOyVZawzdriHtdOMOwnGBRdv+1tZcK0ZVG68o5Q66nq/2h9DXr/eCrN CHPr9+vEewTB0UI84RB6UdDApDcs7wHWsm9N7pdvA0dWdW/SR1tztSAvInKN8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlGTq5CbPz10mY; Wed, 28 Feb 2024 14:10: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 41SEAdIR057098; Wed, 28 Feb 2024 14: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 41SEAd7S057095; Wed, 28 Feb 2024 14:10:39 GMT (envelope-from git) Date: Wed, 28 Feb 2024 14:10:39 GMT Message-Id: <202402281410.41SEAd7S057095@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: 07d600649ef8 - main - stand: Remove dangling mips references List-Id: Commit messages for the main 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: 07d600649ef804b9a492ba2d690f676f0513ae08 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=07d600649ef804b9a492ba2d690f676f0513ae08 commit 07d600649ef804b9a492ba2d690f676f0513ae08 Author: Warner Losh AuthorDate: 2024-02-27 22:59:30 +0000 Commit: Warner Losh CommitDate: 2024-02-28 14:09:41 +0000 stand: Remove dangling mips references Remove mips support files from ficl. Sponsored by: Netflix --- stand/ficl/mips/sysdep.c | 98 ----------- stand/ficl/mips/sysdep.h | 431 --------------------------------------------- stand/ficl/mips64/sysdep.c | 98 ----------- stand/ficl/mips64/sysdep.h | 431 --------------------------------------------- 4 files changed, 1058 deletions(-) diff --git a/stand/ficl/mips/sysdep.c b/stand/ficl/mips/sysdep.c deleted file mode 100644 index 87bed142d684..000000000000 --- a/stand/ficl/mips/sysdep.c +++ /dev/null @@ -1,98 +0,0 @@ -/******************************************************************* -** s y s d e p . c -** Forth Inspired Command Language -** Author: John Sadler (john_sadler@alum.mit.edu) -** Created: 16 Oct 1997 -** Implementations of FICL external interface functions... -** -*******************************************************************/ - - -#ifdef TESTMAIN -#include -#include -#else -#include -#endif -#include "ficl.h" - -/* -******************* FreeBSD P O R T B E G I N S H E R E ******************** Michael Smith -*/ - -#if PORTABLE_LONGMULDIV == 0 -DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) -{ - DPUNS q; - uint64_t qx; - - qx = (uint64_t)x * (uint64_t) y; - - q.hi = (uint32_t)( qx >> 32 ); - q.lo = (uint32_t)( qx & 0xFFFFFFFFL); - - return q; -} - -UNSQR ficlLongDiv(DPUNS q, FICL_UNS y) -{ - UNSQR result; - uint64_t qx, qh; - - qh = q.hi; - qx = (qh << 32) | q.lo; - - result.quot = qx / y; - result.rem = qx % y; - - return result; -} -#endif - -void ficlTextOut(FICL_VM *pVM, char *msg, int fNewline) -{ - IGNORE(pVM); - - while(*msg != 0) - putchar(*(msg++)); - if (fNewline) - putchar('\n'); - - return; -} - -void *ficlMalloc (size_t size) -{ - return malloc(size); -} - -void *ficlRealloc (void *p, size_t size) -{ - return realloc(p, size); -} - -void ficlFree (void *p) -{ - free(p); -} - - -/* -** Stub function for dictionary access control - does nothing -** by default, user can redefine to guarantee exclusive dict -** access to a single thread for updates. All dict update code -** is guaranteed to be bracketed as follows: -** ficlLockDictionary(TRUE); -** -** ficlLockDictionary(FALSE); -** -** Returns zero if successful, nonzero if unable to acquire lock -** befor timeout (optional - could also block forever) -*/ -#if FICL_MULTITHREAD -int ficlLockDictionary(short fLock) -{ - IGNORE(fLock); - return 0; -} -#endif /* FICL_MULTITHREAD */ diff --git a/stand/ficl/mips/sysdep.h b/stand/ficl/mips/sysdep.h deleted file mode 100644 index 9c2f1d2140b9..000000000000 --- a/stand/ficl/mips/sysdep.h +++ /dev/null @@ -1,431 +0,0 @@ -/******************************************************************* - s y s d e p . h -** Forth Inspired Command Language -** Author: John Sadler (john_sadler@alum.mit.edu) -** Created: 16 Oct 1997 -** Ficl system dependent types and prototypes... -** -** Note: Ficl also depends on the use of "assert" when -** FICL_ROBUST is enabled. This may require some consideration -** in firmware systems since assert often -** assumes stderr/stdout. -** $Id: sysdep.h,v 1.6 2001-04-26 21:41:55-07 jsadler Exp jsadler $ -*******************************************************************/ -/* -** Copyright (c) 1997-2001 John Sadler (john_sadler@alum.mit.edu) -** All rights reserved. -** -** Get the latest Ficl release at http://ficl.sourceforge.net -** -** L I C E N S E and D I S C L A I M E R -** -** 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. -** -** I am interested in hearing from anyone who uses ficl. If you have -** a problem, a success story, a defect, an enhancement request, or -** if you would like to contribute to the ficl release, please send -** contact me by email at the address above. -** -** $Id: sysdep.h,v 1.6 2001-04-26 21:41:55-07 jsadler Exp jsadler $ -*/ - -#if !defined (__SYSDEP_H__) -#define __SYSDEP_H__ - -#include - -#include /* size_t, NULL */ -#include -#include - -#if !defined IGNORE /* Macro to silence unused param warnings */ -#define IGNORE(x) &x -#endif - -/* -** TRUE and FALSE for C boolean operations, and -** portable 32 bit types for CELLs -** -*/ -#if !defined TRUE -#define TRUE 1 -#endif -#if !defined FALSE -#define FALSE 0 -#endif - - -/* -** System dependent data type declarations... -*/ -#if !defined INT32 -#define INT32 int -#endif - -#if !defined UNS32 -#define UNS32 unsigned int -#endif - -#if !defined UNS16 -#define UNS16 unsigned short -#endif - -#if !defined UNS8 -#define UNS8 unsigned char -#endif - -#if !defined NULL -#define NULL ((void *)0) -#endif - -/* -** FICL_UNS and FICL_INT must have the same size as a void* on -** the target system. A CELL is a union of void*, FICL_UNS, and -** FICL_INT. -** (11/2000: same for FICL_FLOAT) -*/ -#if !defined FICL_INT -#define FICL_INT INT32 -#endif - -#if !defined FICL_UNS -#define FICL_UNS UNS32 -#endif - -#if !defined FICL_FLOAT -#define FICL_FLOAT float -#endif - -/* -** Ficl presently supports values of 32 and 64 for BITS_PER_CELL -*/ -#if !defined BITS_PER_CELL -#define BITS_PER_CELL 32 -#endif - -#if ((BITS_PER_CELL != 32) && (BITS_PER_CELL != 64)) - Error! -#endif - -typedef struct -{ - FICL_UNS hi; - FICL_UNS lo; -} DPUNS; - -typedef struct -{ - FICL_UNS quot; - FICL_UNS rem; -} UNSQR; - -typedef struct -{ - FICL_INT hi; - FICL_INT lo; -} DPINT; - -typedef struct -{ - FICL_INT quot; - FICL_INT rem; -} INTQR; - - -/* -** B U I L D C O N T R O L S -*/ - -#if !defined (FICL_MINIMAL) -#define FICL_MINIMAL 0 -#endif -#if (FICL_MINIMAL) -#define FICL_WANT_SOFTWORDS 0 -#define FICL_WANT_FILE 0 -#define FICL_WANT_FLOAT 0 -#define FICL_WANT_USER 0 -#define FICL_WANT_LOCALS 0 -#define FICL_WANT_DEBUGGER 0 -#define FICL_WANT_OOP 0 -#define FICL_PLATFORM_EXTEND 0 -#define FICL_MULTITHREAD 0 -#define FICL_ROBUST 1 -#define FICL_EXTENDED_PREFIX 0 -#endif - -/* -** FICL_PLATFORM_EXTEND -** Includes words defined in ficlCompilePlatform -*/ -#if !defined (FICL_PLATFORM_EXTEND) -#define FICL_PLATFORM_EXTEND 1 -#endif - -/* -** FICL_WANT_FILE -** Includes the FILE and FILE-EXT wordset and associated code. Turn this off if you do not -** have a filesystem! -** Contributed by Larry Hastings -*/ -#if !defined (FICL_WANT_FILE) -#define FICL_WANT_FILE 0 -#endif - -/* -** FICL_WANT_FLOAT -** Includes a floating point stack for the VM, and words to do float operations. -** Contributed by Guy Carver -*/ -#if !defined (FICL_WANT_FLOAT) -#define FICL_WANT_FLOAT 0 -#endif - -/* -** FICL_WANT_DEBUGGER -** Inludes a simple source level debugger -*/ -#if !defined (FICL_WANT_DEBUGGER) -#define FICL_WANT_DEBUGGER 1 -#endif - -/* -** User variables: per-instance variables bound to the VM. -** Kinda like thread-local storage. Could be implemented in a -** VM private dictionary, but I've chosen the lower overhead -** approach of an array of CELLs instead. -*/ -#if !defined FICL_WANT_USER -#define FICL_WANT_USER 1 -#endif - -#if !defined FICL_USER_CELLS -#define FICL_USER_CELLS 16 -#endif - -/* -** FICL_WANT_LOCALS controls the creation of the LOCALS wordset and -** a private dictionary for local variable compilation. -*/ -#if !defined FICL_WANT_LOCALS -#define FICL_WANT_LOCALS 1 -#endif - -/* Max number of local variables per definition */ -#if !defined FICL_MAX_LOCALS -#define FICL_MAX_LOCALS 16 -#endif - -/* -** FICL_WANT_OOP -** Inludes object oriented programming support (in softwords) -** OOP support requires locals and user variables! -*/ -#if !(FICL_WANT_LOCALS) || !(FICL_WANT_USER) -#if !defined (FICL_WANT_OOP) -#define FICL_WANT_OOP 0 -#endif -#endif - -#if !defined (FICL_WANT_OOP) -#define FICL_WANT_OOP 1 -#endif - -/* -** FICL_WANT_SOFTWORDS -** Controls inclusion of all softwords in softcore.c -*/ -#if !defined (FICL_WANT_SOFTWORDS) -#define FICL_WANT_SOFTWORDS 1 -#endif - -/* -** FICL_MULTITHREAD enables dictionary mutual exclusion -** wia the ficlLockDictionary system dependent function. -** Note: this implementation is experimental and poorly -** tested. Further, it's unnecessary unless you really -** intend to have multiple SESSIONS (poor choice of name -** on my part) - that is, threads that modify the dictionary -** at the same time. -*/ -#if !defined FICL_MULTITHREAD -#define FICL_MULTITHREAD 0 -#endif - -/* -** PORTABLE_LONGMULDIV causes ficlLongMul and ficlLongDiv to be -** defined in C in sysdep.c. Use this if you cannot easily -** generate an inline asm definition -*/ -#if !defined (PORTABLE_LONGMULDIV) -#define PORTABLE_LONGMULDIV 0 -#endif - -/* -** INLINE_INNER_LOOP causes the inner interpreter to be inline code -** instead of a function call. This is mainly because MS VC++ 5 -** chokes with an internal compiler error on the function version. -** in release mode. Sheesh. -*/ -#if !defined INLINE_INNER_LOOP -#if defined _DEBUG -#define INLINE_INNER_LOOP 0 -#else -#define INLINE_INNER_LOOP 1 -#endif -#endif - -/* -** FICL_ROBUST enables bounds checking of stacks and the dictionary. -** This will detect stack over and underflows and dictionary overflows. -** Any exceptional condition will result in an assertion failure. -** (As generated by the ANSI assert macro) -** FICL_ROBUST == 1 --> stack checking in the outer interpreter -** FICL_ROBUST == 2 also enables checking in many primitives -*/ - -#if !defined FICL_ROBUST -#define FICL_ROBUST 2 -#endif - -/* -** FICL_DEFAULT_STACK Specifies the default size (in CELLs) of -** a new virtual machine's stacks, unless overridden at -** create time. -*/ -#if !defined FICL_DEFAULT_STACK -#define FICL_DEFAULT_STACK 128 -#endif - -/* -** FICL_DEFAULT_DICT specifies the number of CELLs to allocate -** for the system dictionary by default. The value -** can be overridden at startup time as well. -** FICL_DEFAULT_ENV specifies the number of cells to allot -** for the environment-query dictionary. -*/ -#if !defined FICL_DEFAULT_DICT -#define FICL_DEFAULT_DICT 12288 -#endif - -#if !defined FICL_DEFAULT_ENV -#define FICL_DEFAULT_ENV 260 -#endif - -/* -** FICL_DEFAULT_VOCS specifies the maximum number of wordlists in -** the dictionary search order. See Forth DPANS sec 16.3.3 -** (file://dpans16.htm#16.3.3) -*/ -#if !defined FICL_DEFAULT_VOCS -#define FICL_DEFAULT_VOCS 16 -#endif - -/* -** FICL_MAX_PARSE_STEPS controls the size of an array in the FICL_SYSTEM structure -** that stores pointers to parser extension functions. I would never expect to have -** more than 8 of these, so that's the default limit. Too many of these functions -** will probably exact a nasty performance penalty. -*/ -#if !defined FICL_MAX_PARSE_STEPS -#define FICL_MAX_PARSE_STEPS 8 -#endif - -/* -** FICL_EXTENDED_PREFIX enables a bunch of extra prefixes in prefix.c and prefix.fr (if -** included as part of softcore.c) -*/ -#if !defined FICL_EXTENDED_PREFIX -#define FICL_EXTENDED_PREFIX 0 -#endif - -/* -** FICL_ALIGN is the power of two to which the dictionary -** pointer address must be aligned. This value is usually -** either 1 or 2, depending on the memory architecture -** of the target system; 2 is safe on any 16 or 32 bit -** machine. 3 would be appropriate for a 64 bit machine. -*/ -#if !defined FICL_ALIGN -#define FICL_ALIGN 2 -#define FICL_ALIGN_ADD ((1 << FICL_ALIGN) - 1) -#endif - -/* -** System dependent routines -- -** edit the implementations in sysdep.c to be compatible -** with your runtime environment... -** ficlTextOut sends a NULL terminated string to the -** default output device - used for system error messages -** ficlMalloc and ficlFree have the same semantics as malloc and free -** in standard C -** ficlLongMul multiplies two UNS32s and returns a 64 bit unsigned -** product -** ficlLongDiv divides an UNS64 by an UNS32 and returns UNS32 quotient -** and remainder -*/ -struct vm; -void ficlTextOut(struct vm *pVM, char *msg, int fNewline); -void *ficlMalloc (size_t size); -void ficlFree (void *p); -void *ficlRealloc(void *p, size_t size); -/* -** Stub function for dictionary access control - does nothing -** by default, user can redefine to guarantee exclusive dict -** access to a single thread for updates. All dict update code -** must be bracketed as follows: -** ficlLockDictionary(TRUE); -** -** ficlLockDictionary(FALSE); -** -** Returns zero if successful, nonzero if unable to acquire lock -** before timeout (optional - could also block forever) -** -** NOTE: this function must be implemented with lock counting -** semantics: nested calls must behave properly. -*/ -#if FICL_MULTITHREAD -int ficlLockDictionary(short fLock); -#else -#define ficlLockDictionary(x) 0 /* ignore */ -#endif - -/* -** 64 bit integer math support routines: multiply two UNS32s -** to get a 64 bit product, & divide the product by an UNS32 -** to get an UNS32 quotient and remainder. Much easier in asm -** on a 32 bit CPU than in C, which usually doesn't support -** the double length result (but it should). -*/ -DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y); -UNSQR ficlLongDiv(DPUNS q, FICL_UNS y); - -/* -** FICL_HAVE_FTRUNCATE indicates whether the current OS supports -** the ftruncate() function (available on most UNIXes). This -** function is necessary to provide the complete File-Access wordset. -*/ -#if !defined (FICL_HAVE_FTRUNCATE) -#define FICL_HAVE_FTRUNCATE 0 -#endif - - -#endif /*__SYSDEP_H__*/ diff --git a/stand/ficl/mips64/sysdep.c b/stand/ficl/mips64/sysdep.c deleted file mode 100644 index 87bed142d684..000000000000 --- a/stand/ficl/mips64/sysdep.c +++ /dev/null @@ -1,98 +0,0 @@ -/******************************************************************* -** s y s d e p . c -** Forth Inspired Command Language -** Author: John Sadler (john_sadler@alum.mit.edu) -** Created: 16 Oct 1997 -** Implementations of FICL external interface functions... -** -*******************************************************************/ - - -#ifdef TESTMAIN -#include -#include -#else -#include -#endif -#include "ficl.h" - -/* -******************* FreeBSD P O R T B E G I N S H E R E ******************** Michael Smith -*/ - -#if PORTABLE_LONGMULDIV == 0 -DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y) -{ - DPUNS q; - uint64_t qx; - - qx = (uint64_t)x * (uint64_t) y; - - q.hi = (uint32_t)( qx >> 32 ); - q.lo = (uint32_t)( qx & 0xFFFFFFFFL); - - return q; -} - -UNSQR ficlLongDiv(DPUNS q, FICL_UNS y) -{ - UNSQR result; - uint64_t qx, qh; - - qh = q.hi; - qx = (qh << 32) | q.lo; - - result.quot = qx / y; - result.rem = qx % y; - - return result; -} -#endif - -void ficlTextOut(FICL_VM *pVM, char *msg, int fNewline) -{ - IGNORE(pVM); - - while(*msg != 0) - putchar(*(msg++)); - if (fNewline) - putchar('\n'); - - return; -} - -void *ficlMalloc (size_t size) -{ - return malloc(size); -} - -void *ficlRealloc (void *p, size_t size) -{ - return realloc(p, size); -} - -void ficlFree (void *p) -{ - free(p); -} - - -/* -** Stub function for dictionary access control - does nothing -** by default, user can redefine to guarantee exclusive dict -** access to a single thread for updates. All dict update code -** is guaranteed to be bracketed as follows: -** ficlLockDictionary(TRUE); -** -** ficlLockDictionary(FALSE); -** -** Returns zero if successful, nonzero if unable to acquire lock -** befor timeout (optional - could also block forever) -*/ -#if FICL_MULTITHREAD -int ficlLockDictionary(short fLock) -{ - IGNORE(fLock); - return 0; -} -#endif /* FICL_MULTITHREAD */ diff --git a/stand/ficl/mips64/sysdep.h b/stand/ficl/mips64/sysdep.h deleted file mode 100644 index 6c1d8486137c..000000000000 --- a/stand/ficl/mips64/sysdep.h +++ /dev/null @@ -1,431 +0,0 @@ -/******************************************************************* - s y s d e p . h -** Forth Inspired Command Language -** Author: John Sadler (john_sadler@alum.mit.edu) -** Created: 16 Oct 1997 -** Ficl system dependent types and prototypes... -** -** Note: Ficl also depends on the use of "assert" when -** FICL_ROBUST is enabled. This may require some consideration -** in firmware systems since assert often -** assumes stderr/stdout. -** $Id: sysdep.h,v 1.6 2001-04-26 21:41:55-07 jsadler Exp jsadler $ -*******************************************************************/ -/* -** Copyright (c) 1997-2001 John Sadler (john_sadler@alum.mit.edu) -** All rights reserved. -** -** Get the latest Ficl release at http://ficl.sourceforge.net -** -** L I C E N S E and D I S C L A I M E R -** -** 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. -** -** I am interested in hearing from anyone who uses ficl. If you have -** a problem, a success story, a defect, an enhancement request, or -** if you would like to contribute to the ficl release, please send -** contact me by email at the address above. -** -** $Id: sysdep.h,v 1.6 2001-04-26 21:41:55-07 jsadler Exp jsadler $ -*/ - -#if !defined (__SYSDEP_H__) -#define __SYSDEP_H__ - -#include - -#include /* size_t, NULL */ -#include -#include - -#if !defined IGNORE /* Macro to silence unused param warnings */ -#define IGNORE(x) &x -#endif - -/* -** TRUE and FALSE for C boolean operations, and -** portable 32 bit types for CELLs -** -*/ -#if !defined TRUE -#define TRUE 1 -#endif -#if !defined FALSE -#define FALSE 0 -#endif - - -/* -** System dependent data type declarations... -*/ -#if !defined INT32 -#define INT32 int -#endif - -#if !defined UNS32 -#define UNS32 unsigned int -#endif - -#if !defined UNS16 -#define UNS16 unsigned short -#endif - -#if !defined UNS8 -#define UNS8 unsigned char -#endif - -#if !defined NULL -#define NULL ((void *)0) -#endif - -/* -** FICL_UNS and FICL_INT must have the same size as a void* on -** the target system. A CELL is a union of void*, FICL_UNS, and -** FICL_INT. -** (11/2000: same for FICL_FLOAT) -*/ -#if !defined FICL_INT -#define FICL_INT long -#endif - -#if !defined FICL_UNS -#define FICL_UNS unsigned long -#endif - -#if !defined FICL_FLOAT -#define FICL_FLOAT float -#endif - -/* -** Ficl presently supports values of 32 and 64 for BITS_PER_CELL -*/ -#if !defined BITS_PER_CELL -#define BITS_PER_CELL 64 -#endif - -#if ((BITS_PER_CELL != 32) && (BITS_PER_CELL != 64)) - Error! -#endif - -typedef struct -{ - FICL_UNS hi; - FICL_UNS lo; -} DPUNS; - -typedef struct -{ - FICL_UNS quot; - FICL_UNS rem; -} UNSQR; - -typedef struct -{ - FICL_INT hi; - FICL_INT lo; -} DPINT; - -typedef struct -{ - FICL_INT quot; - FICL_INT rem; -} INTQR; - - -/* -** B U I L D C O N T R O L S -*/ - -#if !defined (FICL_MINIMAL) -#define FICL_MINIMAL 0 -#endif -#if (FICL_MINIMAL) -#define FICL_WANT_SOFTWORDS 0 -#define FICL_WANT_FILE 0 -#define FICL_WANT_FLOAT 0 -#define FICL_WANT_USER 0 -#define FICL_WANT_LOCALS 0 -#define FICL_WANT_DEBUGGER 0 -#define FICL_WANT_OOP 0 -#define FICL_PLATFORM_EXTEND 0 -#define FICL_MULTITHREAD 0 -#define FICL_ROBUST 1 -#define FICL_EXTENDED_PREFIX 0 -#endif - -/* -** FICL_PLATFORM_EXTEND -** Includes words defined in ficlCompilePlatform -*/ -#if !defined (FICL_PLATFORM_EXTEND) -#define FICL_PLATFORM_EXTEND 1 -#endif - -/* -** FICL_WANT_FILE -** Includes the FILE and FILE-EXT wordset and associated code. Turn this off if you do not -** have a filesystem! -** Contributed by Larry Hastings -*/ -#if !defined (FICL_WANT_FILE) -#define FICL_WANT_FILE 0 -#endif - -/* -** FICL_WANT_FLOAT -** Includes a floating point stack for the VM, and words to do float operations. -** Contributed by Guy Carver -*/ -#if !defined (FICL_WANT_FLOAT) -#define FICL_WANT_FLOAT 0 -#endif - -/* -** FICL_WANT_DEBUGGER -** Inludes a simple source level debugger -*/ -#if !defined (FICL_WANT_DEBUGGER) -#define FICL_WANT_DEBUGGER 1 -#endif - -/* -** User variables: per-instance variables bound to the VM. -** Kinda like thread-local storage. Could be implemented in a -** VM private dictionary, but I've chosen the lower overhead -** approach of an array of CELLs instead. -*/ -#if !defined FICL_WANT_USER -#define FICL_WANT_USER 1 -#endif - -#if !defined FICL_USER_CELLS -#define FICL_USER_CELLS 16 -#endif - -/* -** FICL_WANT_LOCALS controls the creation of the LOCALS wordset and -** a private dictionary for local variable compilation. -*/ -#if !defined FICL_WANT_LOCALS -#define FICL_WANT_LOCALS 1 -#endif - -/* Max number of local variables per definition */ -#if !defined FICL_MAX_LOCALS -#define FICL_MAX_LOCALS 16 -#endif - -/* -** FICL_WANT_OOP -** Inludes object oriented programming support (in softwords) -** OOP support requires locals and user variables! -*/ -#if !(FICL_WANT_LOCALS) || !(FICL_WANT_USER) -#if !defined (FICL_WANT_OOP) -#define FICL_WANT_OOP 0 -#endif -#endif - -#if !defined (FICL_WANT_OOP) -#define FICL_WANT_OOP 1 -#endif - -/* -** FICL_WANT_SOFTWORDS -** Controls inclusion of all softwords in softcore.c -*/ -#if !defined (FICL_WANT_SOFTWORDS) -#define FICL_WANT_SOFTWORDS 1 -#endif - -/* -** FICL_MULTITHREAD enables dictionary mutual exclusion -** wia the ficlLockDictionary system dependent function. -** Note: this implementation is experimental and poorly -** tested. Further, it's unnecessary unless you really -** intend to have multiple SESSIONS (poor choice of name -** on my part) - that is, threads that modify the dictionary -** at the same time. -*/ -#if !defined FICL_MULTITHREAD -#define FICL_MULTITHREAD 0 -#endif - -/* -** PORTABLE_LONGMULDIV causes ficlLongMul and ficlLongDiv to be -** defined in C in sysdep.c. Use this if you cannot easily -** generate an inline asm definition -*/ -#if !defined (PORTABLE_LONGMULDIV) -#define PORTABLE_LONGMULDIV 0 -#endif - -/* -** INLINE_INNER_LOOP causes the inner interpreter to be inline code -** instead of a function call. This is mainly because MS VC++ 5 -** chokes with an internal compiler error on the function version. -** in release mode. Sheesh. -*/ -#if !defined INLINE_INNER_LOOP -#if defined _DEBUG -#define INLINE_INNER_LOOP 0 -#else -#define INLINE_INNER_LOOP 1 -#endif -#endif - -/* -** FICL_ROBUST enables bounds checking of stacks and the dictionary. -** This will detect stack over and underflows and dictionary overflows. -** Any exceptional condition will result in an assertion failure. -** (As generated by the ANSI assert macro) -** FICL_ROBUST == 1 --> stack checking in the outer interpreter -** FICL_ROBUST == 2 also enables checking in many primitives -*/ - -#if !defined FICL_ROBUST -#define FICL_ROBUST 2 -#endif - -/* -** FICL_DEFAULT_STACK Specifies the default size (in CELLs) of -** a new virtual machine's stacks, unless overridden at -** create time. -*/ *** 118 LINES SKIPPED *** From nobody Wed Feb 28 14:10:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlGTs0Gz4z5BfSf; Wed, 28 Feb 2024 14: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 4TlGTr6j3jz4ffm; Wed, 28 Feb 2024 14:10:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709129440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WpbOyaJOF4aFi3Q/iblo0+aTrpTv3IDI14kwFrJ9kD4=; b=ksHsM3N4PWVKNJ+CGYrSZUvtdW7NxjmtxiBdSf0tvk9Z44rVMdtxN2cPGatb1JhlZvH+qF rZUTA5io70FcLel9jP+Pvv8+ppYCz1Tqu8hJGam7zSzl0CSLYEszRvqWC2MSMDBlacB6x7 k9qUS3IneAodZmUmH0HC4jFuKOTRJ+/CJic/+EZevvudU9JDMWwEzprxQAoiosw+VDb9uU lEX1GvrediEabnbyc7TtngsjrB3DpeGT4HBNrIDpDc5j5AsomGo/Xiqu0aNDmWMWZBR0Dh d3lIQlDkuZfdypeypFBi72RbxD2gHpLrFe/LBVmrgaAKsKvlGgU7GLCYRp8nMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709129440; a=rsa-sha256; cv=none; b=q39+ve038czijWDszaBXlHVwyDfv6kcr8tbXg+3rrRj5Jhla4zkuDpLQVFb1/tSDkMYM97 YtiZf/lDvVuPwlaxAAyqrapzwJsUQBvVnB0zvyGspcNrg1pfLlX1XxLRNODD7qXVBa9W5s 6a71ATgKAppYvNhNa6RHxala1MHL2eHptf5eOc++SIGlFAxeRvV+URKlIDI+Xb1b4181eg bI/PKpZZHYpE/Fd2g1WZPn7DLXzVTBnzHFmK89fCBhqGh7FdokONwW6kYMHmy/DsXeqY2g VPTOlw5DnTUcTE/G/1jlb7VDaEqFvhltb/wIuTOos8e52tk2tza7ZZ3fzv+YDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709129440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WpbOyaJOF4aFi3Q/iblo0+aTrpTv3IDI14kwFrJ9kD4=; b=XnGxLSd9AyZ0lIoW9Y1VOIUIvuPQkBVWdawe26uS3OfzeJRlvR4RKKAWyiWsOVFJ66pA/e P8BEs4AzxODdakCshGHM10GLz6jRxao4Gdcz1Zrwvus1FUHS8bGC1Y2qFG9/VAHE8cSNHL HYcBV4m54XvW+j8eaESmFJqVepWVm1cF7NOwQ8W3cZBAraEIsrMJoiIDZT3bAw6bRxXfxh Gvw1xj4ptjQg4Gl8d1vFtbqsVgGHFyrsUiKSi4cx4CwInCQ1YNUf6v2SqAvaZpf2bX+snT en1PIxpzaLhkC9gULcVKZCLHKra80H6tVRGRZAS7tROKKTgKcUhBiKHV9MBX2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlGTr5q5Mz10xT; Wed, 28 Feb 2024 14: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 41SEAe6H057146; Wed, 28 Feb 2024 14:10:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41SEAe8S057143; Wed, 28 Feb 2024 14:10:40 GMT (envelope-from git) Date: Wed, 28 Feb 2024 14:10:40 GMT Message-Id: <202402281410.41SEAe8S057143@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: 15c8a610a80d - main - gicv3: Change how we initialize its children. List-Id: Commit messages for the main 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: 15c8a610a80dfe1980e043174d0fcc8034868676 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=15c8a610a80dfe1980e043174d0fcc8034868676 commit 15c8a610a80dfe1980e043174d0fcc8034868676 Author: Warner Losh AuthorDate: 2024-02-28 14:08:15 +0000 Commit: Warner Losh CommitDate: 2024-02-28 14:09:42 +0000 gicv3: Change how we initialize its children. The current code is written such that all the attach routines can do so in parallel. However, newbus serializes children today, and is likely to do so in the future. Only allocate memory for the first time. Add an assertion that this memory is allocated for larger units. Sponsored by: Netflix Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D44032 --- sys/arm64/arm64/gicv3_its.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c index 42a8fb8a9c26..195e07af3288 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -291,8 +291,6 @@ struct gicv3_its_softc { vm_page_t ma; /* fake msi page */ }; -static void *conf_base; - typedef void (its_quirk_func_t)(device_t); static its_quirk_func_t its_quirk_cavium_22375; @@ -680,20 +678,26 @@ gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) static void gicv3_its_conftable_init(struct gicv3_its_softc *sc) { - void *conf_table; - - conf_table = atomic_load_ptr(&conf_base); - if (conf_table == NULL) { - conf_table = contigmalloc(LPI_CONFTAB_SIZE, - M_GICV3_ITS, M_WAITOK, 0, LPI_CONFTAB_MAX_ADDR, - LPI_CONFTAB_ALIGN, 0); + /* note: we assume the ITS children are serialized by the parent */ + static void *conf_table; - if (atomic_cmpset_ptr((uintptr_t *)&conf_base, - (uintptr_t)NULL, (uintptr_t)conf_table) == 0) { - contigfree(conf_table, LPI_CONFTAB_SIZE, M_GICV3_ITS); - conf_table = atomic_load_ptr(&conf_base); - } + /* + * The PROPBASER is a singleton in our parent. We only set it up the + * first time through. conf_table is effectively global to all the units + * and we rely on subr_bus to serialize probe/attach. + */ + if (conf_table != NULL) { + sc->sc_conf_base = conf_table; + return; } + + /* + * Just allocate contiguous pages. We'll configure the PROPBASER + * register later in its_init_cpu_lpi(). + */ + conf_table = contigmalloc(LPI_CONFTAB_SIZE, + M_GICV3_ITS, M_WAITOK, 0, LPI_CONFTAB_MAX_ADDR, + LPI_CONFTAB_ALIGN, 0); sc->sc_conf_base = conf_table; /* Set the default configuration */ From nobody Wed Feb 28 14:10:41 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlGTt44Nvz5BfVN; Wed, 28 Feb 2024 14: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 4TlGTt0P4Cz4frX; Wed, 28 Feb 2024 14: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=1709129442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PzmA+l2Ws/USoXmHtwLftPs/nkaxu3DuKe/48VlFvAU=; b=kFuE3xVkjUCWk+GtKFCHUk2/V0XX3hbUI5CoC8GpJk0Ig1fRxwsggp+wQ1ooE/49XCNjXw YU+g4l6g9xw6dXYulbiI91JSBU7MynB3qw1CODmQnDtHSaLU/rzhzJbGeOoIjS8EaVgh97 0gL1RX2/uVAn9uO2kb9bAiR3z8Ah0SsvZJt171KZk3jA9Dx7EazTAgpFO5LmWxYA5dkb5A aBohkf9Q1E7eO8lynB4hWZ+GFdwF9EF2cO1WpmXIm9nPpGHXIdPTel2t+cvWfHW4ezUp9w WzBrXU95YphPkVlSGOEUwBLFJG6vlwjl7yM5ORJp+WvgctnX5yxA1+tCar3a7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709129442; a=rsa-sha256; cv=none; b=CFLapf3yajBdW3aK/Bsu6yxEP4zGr35ge2ttE6MBizVtTyJLCriNVVw6veKLaTgagrRzZL 139w74N4D9/iZOLNRL5A3ju8se+OmMiM5F7bUIdd2+st18dFjjTXJQiD6Dv5cMZIvHUnCc 1R9hfnomvll6/7QuzOGBg8xw3Qo0Qihf9Tmy+36W/D6L/swslL96wc4NqArQe4uwnx5gYj zsgzxZ9bkFQBXctkTRbyz031rVQkO7+0ZZrq9p7Y0bZb8AzwAzqLQQEkv2rv1ffmmwX+1T tTdWy9B3zeGEtsIHuKgZ+h1Hmd8QjTMTDKLbqlYCZTiPFpY9TZ4LcNp0Rm3oSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709129442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PzmA+l2Ws/USoXmHtwLftPs/nkaxu3DuKe/48VlFvAU=; b=eaim3huje7463Vut3bO1Kx7DZbZeDbO6x5KA9IzDd5iRWwQw4hUj55qDWUQS5X2RzbsH1C ut6xE6asOw7NUxBa0f+KEkUJwxXSpv3ys2ou4QvNYA10Qi3cpl+m1qceEwIwxnV3+nGfo1 pGY4S4aW+5e2h70hebbHLZ2BoxyRotD6iwYJ0+xOuIq1HHIDiQ50uXe7UmGuIbjl+5PYEe iC1AszBgG3aTHz8rhxsCNcxUB5ISAk7yYcV2y2Q15roTGVsin/fLxzTOLCrMtuq2Av2kNo 5b1kpAoxoOyaTyuHmFpN4SkZkhOkgZiPuK8D6q8bYp5XtB/1iw0UtCheKVNwtg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlGTs6cBPz10mf; Wed, 28 Feb 2024 14: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 41SEAfFQ057194; Wed, 28 Feb 2024 14: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 41SEAfe7057191; Wed, 28 Feb 2024 14:10:41 GMT (envelope-from git) Date: Wed, 28 Feb 2024 14:10:41 GMT Message-Id: <202402281410.41SEAfe7057191@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: 51c57ca92ed3 - main - gicv3: Panic if the gicv3 already running List-Id: Commit messages for the main 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: 51c57ca92ed3d0caf8f3e8c61345ac670d494901 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=51c57ca92ed3d0caf8f3e8c61345ac670d494901 commit 51c57ca92ed3d0caf8f3e8c61345ac670d494901 Author: Warner Losh AuthorDate: 2024-02-28 14:08:24 +0000 Commit: Warner Losh CommitDate: 2024-02-28 14:09:42 +0000 gicv3: Panic if the gicv3 already running Due to undefined behavior, it's impossible to re-program a gicv3 ITS table once it's programmed once. Memory corruption happens otherwise. Panic if we detect the LPI is already enabled. Sponsored by: Netflix Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D44033 --- sys/arm64/arm64/gicv3_its.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c index 195e07af3288..d3df0a571e95 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -680,6 +680,8 @@ gicv3_its_conftable_init(struct gicv3_its_softc *sc) { /* note: we assume the ITS children are serialized by the parent */ static void *conf_table; + device_t gicv3; + uint32_t ctlr; /* * The PROPBASER is a singleton in our parent. We only set it up the @@ -691,13 +693,20 @@ gicv3_its_conftable_init(struct gicv3_its_softc *sc) return; } - /* - * Just allocate contiguous pages. We'll configure the PROPBASER - * register later in its_init_cpu_lpi(). - */ - conf_table = contigmalloc(LPI_CONFTAB_SIZE, - M_GICV3_ITS, M_WAITOK, 0, LPI_CONFTAB_MAX_ADDR, - LPI_CONFTAB_ALIGN, 0); + gicv3 = device_get_parent(sc->dev); + ctlr = gic_r_read_4(gicv3, GICR_CTLR); + if ((ctlr & GICR_CTLR_LPI_ENABLE) != 0) { + panic("gicv3 already enabled, can't reprogram."); + } else { + + /* + * Otherwise just allocate contiguous pages. We'll configure the + * PROPBASER register later in its_init_cpu_lpi(). + */ + conf_table = contigmalloc(LPI_CONFTAB_SIZE, + M_GICV3_ITS, M_WAITOK, 0, LPI_CONFTAB_MAX_ADDR, + LPI_CONFTAB_ALIGN, 0); + } sc->sc_conf_base = conf_table; /* Set the default configuration */ From nobody Wed Feb 28 14:10:42 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlGTv3Qfjz5BfMc; Wed, 28 Feb 2024 14: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 4TlGTv1Hf5z4fSK; Wed, 28 Feb 2024 14: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=1709129443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nwPFf6zD1JR6cjNGBJ7WwP0/OukdLSWvI/DtIzrUzqY=; b=fKFF6A31mEbs5cbYIt81WYxxq5Ldi0cO6IvbSd8tvsf2eUxh/qvp7aSEMD5GUq5G04Pd8g Jd/MgTWjvw5/55r4M2gsahMcy4ipiBiPSXiTv0Fpxm0kG0O8KkpfW0uDCQJeOO4XcVc3Df I52cD3eyClW9o80StO7Divw/RVk/eiF/vi5AIHSh+iL5nOulFwJnUQi4cJvqNNpQwBLtcG Y2iUOWfPb7SS6PpQh4GpstjNzp3e5upHr4ViQOkgeEdVo01jMcx0YCWmVgv7XtxM4ViqVk KwJXdE8+0wBClm0bfQ1TBM9lkPM/g7SS5wfMxGMrxqHVnuYSq9UU5Hdd7PNQcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709129443; a=rsa-sha256; cv=none; b=D3UFUBPgPmqeN4Pvh64pe7fuXr/AlKMBKLSYWcFxuMk59oWxd6PXSb1P4BjLKVEVIqjK4+ kIE1Osm2lBwkagzyLVadzQ1+a1NDngdjKY3S8jgmwCvGbhfeltLrXHLCEotj6dEiXAJvyI Kh+hmTPsxAjx60TIiCNuPnw/Dj8wWTPswYvEfNQQIguaG/hpp4fNTFZ6l6GrN7l+e7xasT 0fUOxReZI8cw2ru5jUTmY5gFMD8DUbIbxrtYkEwrnFvkb/eVPAZPt5y540CJaSN1LysG9q aO11Y5T/NpJvRUbRxhq/4/9uWRt6Mo6uEr9rFLxzJmGe1ocKzCPDsyo/itKW9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709129443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nwPFf6zD1JR6cjNGBJ7WwP0/OukdLSWvI/DtIzrUzqY=; b=GgOC05JHOxP1sbGZLYU5NQGaSUH/KI4q+kY3JaHy84l7uzRP2X/z00XkDAb4k0bepOFKpg 7HmZ4YuuCDvg1iIZbDHiG/NENpmwdXY9zI8cHfWEZ7az7RPOjSZs2z77DelbVpEpxVokQa eaRmrP5OzRTNKKpQPdvGhQmtIs3tcTxx5q0FVA5O1rlRKwcttBcR2I38eS7BHPJ8QXh5Mp YSyhdVfe9loZIg++alCV4aLJXL54fUfkvi6juH4zJByv98flFpgBHBG03nOGNTUQFCYaqS RHEbMDftk5/MXJcr/jDJ4ZE4X/kbJTo4DILzxnkabeOGm6HiZi6e2QQTlVtDcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlGTv0P3rz1113; Wed, 28 Feb 2024 14: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 41SEAgSO058156; Wed, 28 Feb 2024 14: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 41SEAgJg058144; Wed, 28 Feb 2024 14:10:42 GMT (envelope-from git) Date: Wed, 28 Feb 2024 14:10:42 GMT Message-Id: <202402281410.41SEAgJg058144@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: ddd98f5a626d - main - gicv3: Don't allocate pend_base if we're already started List-Id: Commit messages for the main 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: ddd98f5a626df5de51fd5c2460592d9b95a49179 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ddd98f5a626df5de51fd5c2460592d9b95a49179 commit ddd98f5a626df5de51fd5c2460592d9b95a49179 Author: Warner Losh AuthorDate: 2024-02-28 14:08:32 +0000 Commit: Warner Losh CommitDate: 2024-02-28 14:09:42 +0000 gicv3: Don't allocate pend_base if we're already started If the gicv3 is already started, then don't allocate memory for the pend_base tables. Sponsored by: Netflix Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D44034 --- sys/arm64/arm64/gicv3_its.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c index d3df0a571e95..c7e9ef7a3733 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -286,6 +286,7 @@ struct gicv3_its_softc { #define ITS_FLAGS_CMDQ_FLUSH 0x00000001 #define ITS_FLAGS_LPI_CONF_FLUSH 0x00000002 #define ITS_FLAGS_ERRATA_CAVIUM_22375 0x00000004 +#define ITS_FLAGS_LPI_PREALLOC 0x00000008 u_int sc_its_flags; bool trace_enable; vm_page_t ma; /* fake msi page */ @@ -680,6 +681,7 @@ gicv3_its_conftable_init(struct gicv3_its_softc *sc) { /* note: we assume the ITS children are serialized by the parent */ static void *conf_table; + int extra_flags = 0; device_t gicv3; uint32_t ctlr; @@ -696,6 +698,7 @@ gicv3_its_conftable_init(struct gicv3_its_softc *sc) gicv3 = device_get_parent(sc->dev); ctlr = gic_r_read_4(gicv3, GICR_CTLR); if ((ctlr & GICR_CTLR_LPI_ENABLE) != 0) { + extra_flags = ITS_FLAGS_LPI_PREALLOC; panic("gicv3 already enabled, can't reprogram."); } else { @@ -708,6 +711,7 @@ gicv3_its_conftable_init(struct gicv3_its_softc *sc) LPI_CONFTAB_ALIGN, 0); } sc->sc_conf_base = conf_table; + sc->sc_its_flags |= extra_flags; /* Set the default configuration */ memset(sc->sc_conf_base, GIC_PRIORITY_MAX | LPI_CONF_GROUP1, @@ -720,18 +724,20 @@ gicv3_its_conftable_init(struct gicv3_its_softc *sc) static void gicv3_its_pendtables_init(struct gicv3_its_softc *sc) { - int i; - for (i = 0; i <= mp_maxid; i++) { - if (CPU_ISSET(i, &sc->sc_cpus) == 0) - continue; + if ((sc->sc_its_flags & ITS_FLAGS_LPI_PREALLOC) == 0) { + for (int i = 0; i <= mp_maxid; i++) { + if (CPU_ISSET(i, &sc->sc_cpus) == 0) + continue; - sc->sc_pend_base[i] = (vm_offset_t)contigmalloc( - LPI_PENDTAB_SIZE, M_GICV3_ITS, M_WAITOK | M_ZERO, - 0, LPI_PENDTAB_MAX_ADDR, LPI_PENDTAB_ALIGN, 0); + sc->sc_pend_base[i] = (vm_offset_t)contigmalloc( + LPI_PENDTAB_SIZE, M_GICV3_ITS, M_WAITOK | M_ZERO, + 0, LPI_PENDTAB_MAX_ADDR, LPI_PENDTAB_ALIGN, 0); - /* Flush so the ITS can see the memory */ - cpu_dcache_wb_range(sc->sc_pend_base[i], LPI_PENDTAB_SIZE); + /* Flush so the ITS can see the memory */ + cpu_dcache_wb_range(sc->sc_pend_base[i], + LPI_PENDTAB_SIZE); + } } } From nobody Wed Feb 28 14:10:44 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlGTw5CKvz5BfSn; Wed, 28 Feb 2024 14: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 4TlGTw2RD9z4fgW; Wed, 28 Feb 2024 14: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=1709129444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uZABjtx+ikSrt4hFBymsOvrZUlEFk/TafnuHCIntJwk=; b=f1ZgHLzhmhiIv/aqFpBrJNH44qW1gG2kri25t5AyaLMsepiOiAJc2+6CzCi3h/8KWGcFNU xHpK9yJn2yH1LSw0Z7KPrWfey68pv7SYRY5CdyGNrdKCYsq3zf1zcDBFAtEdnYya5bLfFH LO/vyck+UqTMNBq063H5cduRtEt91SGpcLu9Pjd3+ErzQ2RTJOMbUk1JMKHkmVXKTRn0u1 gUdM5SbEtefH6LGT64adqFTX4JPdrOGIJSfdijm5qO5QD2S0xlFenUhmHDsvf2XddT5mgk DSV3N2NCf5kVP540eMLtflRSCGjQM1dgT8OnLS4RYNWbvguGsACnLzjjTmia7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709129444; a=rsa-sha256; cv=none; b=R2MqVh8NzK5wKj5/3S+8n5nMLrB8CGhcKWO47oywgDCJa+q8rysQD9V9ZGXTODIOiz5fpw 0JYJ5H7hDqlNkt1vefw66Bj3Zf4zFPWjBYtDipGE+byvxRQpLG9aQKpNPzk0Yw+hUwYMB2 t/J3Lt+muvOYvFRzdajB0DgyENijXh8oGECrLJfyYvm7Ef/dHouKtq6sq97+Z8ptR6hLLu Mm7fjaeuaDVb/9IqbEeVBDcn7EDqNbH1t+Q3jI1tbjjYXCK0NhG00UJNjEE5CX5Y+b+A5W Qo0KRByGfHRqKe0rWgKqf0EH71ZnKwTL0Yfbh7LZGGA/NLu0sMZkQMNp3dqz2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709129444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uZABjtx+ikSrt4hFBymsOvrZUlEFk/TafnuHCIntJwk=; b=hxvBsjqMoOchhSqLXc5cPbD+kAffkzoLgCg9Me9RW1YAlMweU8wRHnsNfQj8IA1k9/FMgm RkVTqOZEwX5l1HPsSQyXxfYBX83tU2sUFkjZMU/6e7jmJapBJdUF7i/zIyAl3BvVOalPKz 1L/NZEG1M5RkXZsX2Ctiui299lThIHh6FEmkouHmYfpEBURsgk9tduaxrgEIvLMVUWZfy3 px5RyTYNP7K2DitGVTf61d5mV2MhcKx2M818f/uEPMjS23aJpyqF5uiEIe7Jd0r15Vdful qbB15+MdOe87tXh5nMD+0hofSRnJNzV8w0shqAuCZREaeubmB50EfKVodrFddQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlGTw1PxRz113R; Wed, 28 Feb 2024 14: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 41SEAiFk058230; Wed, 28 Feb 2024 14: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 41SEAiIS058227; Wed, 28 Feb 2024 14:10:44 GMT (envelope-from git) Date: Wed, 28 Feb 2024 14:10:44 GMT Message-Id: <202402281410.41SEAiIS058227@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: ae84491a3594 - main - gicv3: Only set the redistributor base if we're not prealloced List-Id: Commit messages for the main 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: ae84491a3594c542f2aedc9340581cbb30386c1e Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ae84491a3594c542f2aedc9340581cbb30386c1e commit ae84491a3594c542f2aedc9340581cbb30386c1e Author: Warner Losh AuthorDate: 2024-02-28 14:08:39 +0000 Commit: Warner Losh CommitDate: 2024-02-28 14:09:42 +0000 gicv3: Only set the redistributor base if we're not prealloced Only set the redistributor base if we're not reallocated. If we are preallocated, leave it all alone. Sponsored by: Netflix Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D44035 --- sys/arm64/arm64/gicv3_its.c | 134 +++++++++++++++++++++++--------------------- 1 file changed, 71 insertions(+), 63 deletions(-) diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c index c7e9ef7a3733..74d6f617bbba 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -745,81 +745,89 @@ static void its_init_cpu_lpi(device_t dev, struct gicv3_its_softc *sc) { device_t gicv3; - uint64_t xbaser, tmp; + uint64_t xbaser, tmp, size; uint32_t ctlr; u_int cpuid; gicv3 = device_get_parent(dev); cpuid = PCPU_GET(cpuid); - /* Disable LPIs */ - ctlr = gic_r_read_4(gicv3, GICR_CTLR); - ctlr &= ~GICR_CTLR_LPI_ENABLE; - gic_r_write_4(gicv3, GICR_CTLR, ctlr); - - /* Make sure changes are observable my the GIC */ - dsb(sy); - /* - * Set the redistributor base + * Set the redistributor base. If we're reusing what we found on boot + * since the gic was already running, then don't touch it here. We also + * don't need to disable / enable LPI if we're not changing PROPBASER, + * so only do that if we're not prealloced. */ - xbaser = vtophys(sc->sc_conf_base) | - (GICR_PROPBASER_SHARE_IS << GICR_PROPBASER_SHARE_SHIFT) | - (GICR_PROPBASER_CACHE_NIWAWB << GICR_PROPBASER_CACHE_SHIFT) | - (flsl(LPI_CONFTAB_SIZE | GIC_FIRST_LPI) - 1); - gic_r_write_8(gicv3, GICR_PROPBASER, xbaser); - - /* Check the cache attributes we set */ - tmp = gic_r_read_8(gicv3, GICR_PROPBASER); - - if ((tmp & GICR_PROPBASER_SHARE_MASK) != - (xbaser & GICR_PROPBASER_SHARE_MASK)) { - if ((tmp & GICR_PROPBASER_SHARE_MASK) == - (GICR_PROPBASER_SHARE_NS << GICR_PROPBASER_SHARE_SHIFT)) { - /* We need to mark as non-cacheable */ - xbaser &= ~(GICR_PROPBASER_SHARE_MASK | - GICR_PROPBASER_CACHE_MASK); - /* Non-cacheable */ - xbaser |= GICR_PROPBASER_CACHE_NIN << - GICR_PROPBASER_CACHE_SHIFT; - /* Non-shareable */ - xbaser |= GICR_PROPBASER_SHARE_NS << - GICR_PROPBASER_SHARE_SHIFT; - gic_r_write_8(gicv3, GICR_PROPBASER, xbaser); + if ((sc->sc_its_flags & ITS_FLAGS_LPI_PREALLOC) == 0) { + /* Disable LPIs */ + ctlr = gic_r_read_4(gicv3, GICR_CTLR); + ctlr &= ~GICR_CTLR_LPI_ENABLE; + gic_r_write_4(gicv3, GICR_CTLR, ctlr); + + /* Make sure changes are observable my the GIC */ + dsb(sy); + + size = (flsl(LPI_CONFTAB_SIZE | GIC_FIRST_LPI) - 1); + + xbaser = vtophys(sc->sc_conf_base) | + (GICR_PROPBASER_SHARE_IS << GICR_PROPBASER_SHARE_SHIFT) | + (GICR_PROPBASER_CACHE_NIWAWB << GICR_PROPBASER_CACHE_SHIFT) | + size; + + gic_r_write_8(gicv3, GICR_PROPBASER, xbaser); + + /* Check the cache attributes we set */ + tmp = gic_r_read_8(gicv3, GICR_PROPBASER); + + if ((tmp & GICR_PROPBASER_SHARE_MASK) != + (xbaser & GICR_PROPBASER_SHARE_MASK)) { + if ((tmp & GICR_PROPBASER_SHARE_MASK) == + (GICR_PROPBASER_SHARE_NS << GICR_PROPBASER_SHARE_SHIFT)) { + /* We need to mark as non-cacheable */ + xbaser &= ~(GICR_PROPBASER_SHARE_MASK | + GICR_PROPBASER_CACHE_MASK); + /* Non-cacheable */ + xbaser |= GICR_PROPBASER_CACHE_NIN << + GICR_PROPBASER_CACHE_SHIFT; + /* Non-shareable */ + xbaser |= GICR_PROPBASER_SHARE_NS << + GICR_PROPBASER_SHARE_SHIFT; + gic_r_write_8(gicv3, GICR_PROPBASER, xbaser); + } + sc->sc_its_flags |= ITS_FLAGS_LPI_CONF_FLUSH; } - sc->sc_its_flags |= ITS_FLAGS_LPI_CONF_FLUSH; - } - /* - * Set the LPI pending table base - */ - xbaser = vtophys(sc->sc_pend_base[cpuid]) | - (GICR_PENDBASER_CACHE_NIWAWB << GICR_PENDBASER_CACHE_SHIFT) | - (GICR_PENDBASER_SHARE_IS << GICR_PENDBASER_SHARE_SHIFT); - - gic_r_write_8(gicv3, GICR_PENDBASER, xbaser); - - tmp = gic_r_read_8(gicv3, GICR_PENDBASER); - - if ((tmp & GICR_PENDBASER_SHARE_MASK) == - (GICR_PENDBASER_SHARE_NS << GICR_PENDBASER_SHARE_SHIFT)) { - /* Clear the cahce and shareability bits */ - xbaser &= ~(GICR_PENDBASER_CACHE_MASK | - GICR_PENDBASER_SHARE_MASK); - /* Mark as non-shareable */ - xbaser |= GICR_PENDBASER_SHARE_NS << GICR_PENDBASER_SHARE_SHIFT; - /* And non-cacheable */ - xbaser |= GICR_PENDBASER_CACHE_NIN << - GICR_PENDBASER_CACHE_SHIFT; - } + /* + * Set the LPI pending table base + */ + xbaser = vtophys(sc->sc_pend_base[cpuid]) | + (GICR_PENDBASER_CACHE_NIWAWB << GICR_PENDBASER_CACHE_SHIFT) | + (GICR_PENDBASER_SHARE_IS << GICR_PENDBASER_SHARE_SHIFT); + + gic_r_write_8(gicv3, GICR_PENDBASER, xbaser); + + tmp = gic_r_read_8(gicv3, GICR_PENDBASER); + + if ((tmp & GICR_PENDBASER_SHARE_MASK) == + (GICR_PENDBASER_SHARE_NS << GICR_PENDBASER_SHARE_SHIFT)) { + /* Clear the cahce and shareability bits */ + xbaser &= ~(GICR_PENDBASER_CACHE_MASK | + GICR_PENDBASER_SHARE_MASK); + /* Mark as non-shareable */ + xbaser |= GICR_PENDBASER_SHARE_NS << GICR_PENDBASER_SHARE_SHIFT; + /* And non-cacheable */ + xbaser |= GICR_PENDBASER_CACHE_NIN << + GICR_PENDBASER_CACHE_SHIFT; + } - /* Enable LPIs */ - ctlr = gic_r_read_4(gicv3, GICR_CTLR); - ctlr |= GICR_CTLR_LPI_ENABLE; - gic_r_write_4(gicv3, GICR_CTLR, ctlr); + /* Enable LPIs */ + ctlr = gic_r_read_4(gicv3, GICR_CTLR); + ctlr |= GICR_CTLR_LPI_ENABLE; + gic_r_write_4(gicv3, GICR_CTLR, ctlr); - /* Make sure the GIC has seen everything */ - dsb(sy); + /* Make sure the GIC has seen everything */ + dsb(sy); + } } static int From nobody Wed Feb 28 14:10:46 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlGTy5pv8z5BfSw; Wed, 28 Feb 2024 14: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 4TlGTy3gxBz4fy9; Wed, 28 Feb 2024 14: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=1709129446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9TzylsARr2OV408aDTnpUCBNnOxDKvZE5VfIT9vTlO0=; b=RSvGRmaFtYTrIX6BlFQQmwQt1D3BO1P8p0w6KqmP1wUg8t+NouORwjSMuL6SYT9sWiKw74 yyKznOTgZYr+iO0ks7Quye0XP57Ld1ECmdLB9DMBENDShSF6w7r+/U9pcEyn/hFOArpQtX zuarJHJvuv0u4crysR10aTyWLRjNR0baAG/utI5sx9MRntCVRJjDQF052npZN2UPhhfKpV fMZsPf0LxJmqHs7PpR/I8bBcJpSdyP26SxxpL4hA56+n/6ZPecy2O4v4tlNvBk5AUM3KkR jAl8DbjVUnWN9BgI4wPRQsnER2UhHF98cLdnSCQsJ+/CFfQTJeCACO4UO8ZBOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709129446; a=rsa-sha256; cv=none; b=VEk10hsrozWFlvfBpbdr0gUYx+3YhlSrv9ehKTMwCUr9bVmXhIRCiiENuzqwKrBL1V+ypi +H/ICtWu06oAXVbaQO/hI2/TzuXPrLHy8wTF/ZUQRUQ+sQd9y93s2dSMEV7hiSaqh2NY6b mkDVJ3N8Ht/3tzQJ0KTfHQFhnZ5XeJekxVaKiGM9ChqRaUT13SRgnaQFb4/vlRChcvL2cO 3VcX+n9679Gab2LXJBgeawn+aSyWNh7DzGCI+1RgJRoR6JoXkavcyJUVm/SGQWCDTPi8R4 H8HJPh/HRvT+CMXQssch8r5PUAhQ/t83e0O9WVa1KRtPRv/tpzIU3E/4orVAFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709129446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9TzylsARr2OV408aDTnpUCBNnOxDKvZE5VfIT9vTlO0=; b=GHUu9Es6wqXIA8AfpvX0gOFxKeS/VermksHbfELzQb+LOlTmG/kqDz6lxOd1FVZ0g78K+U zbJHipRW6yQJszHQZS5x4lWYDdcvtV2xFGiGqPZfXzAK2YNdaxDPOunFEcK+u2gQq7abjg tE2fsStwyo2YcM8jWEdQDOEksus74O8zk7fsq/mdDP14SE4mkqM7QguMlUFfcT7vGmi6U2 kepATSs+Dp0VuuVLNImE8EFxGlMIPGLiJy7Hk2rQe8z5YP3d6r9aQJYkjWghCl6rFpmvIx akIF0RK5ZFyJwRMYOkS/UBwSCqKB9ZaY8A8ZRNCJ0LSEL3RMk7rSJ+Ebn8sVWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlGTy2nbfz10mh; Wed, 28 Feb 2024 14: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 41SEAkZh058330; Wed, 28 Feb 2024 14: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 41SEAkUl058327; Wed, 28 Feb 2024 14:10:46 GMT (envelope-from git) Date: Wed, 28 Feb 2024 14:10:46 GMT Message-Id: <202402281410.41SEAkUl058327@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: a3f164a0c7af - main - gicv3: Define PA masks for the PENDBASR and PROPBASER registers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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: a3f164a0c7af17b6b1903e8f13d1b70072e1ccd0 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a3f164a0c7af17b6b1903e8f13d1b70072e1ccd0 commit a3f164a0c7af17b6b1903e8f13d1b70072e1ccd0 Author: Warner Losh AuthorDate: 2024-02-28 14:09:02 +0000 Commit: Warner Losh CommitDate: 2024-02-28 14:09:42 +0000 gicv3: Define PA masks for the PENDBASR and PROPBASER registers Define masks for these registers to find the PA of where these are pointing. Sponsored by: Netflix Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D44096 --- sys/arm64/arm64/gic_v3_reg.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sys/arm64/arm64/gic_v3_reg.h b/sys/arm64/arm64/gic_v3_reg.h index 16b1cd438350..792b532196a9 100644 --- a/sys/arm64/arm64/gic_v3_reg.h +++ b/sys/arm64/arm64/gic_v3_reg.h @@ -182,6 +182,15 @@ #define GICR_PROPBASER_OUTER_CACHE_MASK \ (0x7UL << GICR_PROPBASER_OUTER_CACHE_SHIFT) +/* + * The PROPBASER LPI Configuration Table is 4k aligned, so bits 51:12 are + * defined to be the PA, for 40 potentially significant bits. + */ +#define GICR_PROPBASER_PA_SHIFT 12 +#define GICR_PROPBASER_PA_SIZE 40 +#define GICR_PROPBASER_PA_MASK \ + (((1UL << GICR_PROPBASER_PA_SIZE) - 1) << GICR_PROPBASER_PA_SHIFT) + #define GICR_PENDBASER 0x0078 /* * Cacheability @@ -225,6 +234,15 @@ #define GICR_PENDBASER_OUTER_CACHE_MASK \ (0x7UL << GICR_PENDBASER_OUTER_CACHE_SHIFT) +/* + * The LPI Pending Table (PENDBASER) is 64k aligned. So bits 51:16 are defined to be the PA, for 36 + * potentially significant bits. + */ +#define GICR_PENDBASER_PA_SHIFT 16 +#define GICR_PENDBASER_PA_SIZE 36 +#define GICR_PENDBASER_PA_MASK \ + (((1UL << GICR_PENDBASER_PA_SIZE) - 1) << GICR_PENDBASER_PA_SHIFT) + #define GICR_INVLPIR 0x00a0 #define GICR_INVALLR 0x00b0 #define GICR_SYNCR 0x00c0 From nobody Wed Feb 28 14:10:45 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlGTx4vQ8z5BfbD; Wed, 28 Feb 2024 14: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 4TlGTx4BG0z4fxw; Wed, 28 Feb 2024 14: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=1709129445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jZy+ewvNGgvycZtgvW4WOhyMUaIJS4LO0yTXOmO3164=; b=EQlK92WxfkbQm5j68gRf7hP9LlHEUYixYVUHynhNB5qSYdZqTuIKvsgWVvyd+6vIt4gzaN fpV7+kvSlJwC4u7pP3/n8KiPXpqt6y2h0Wad3gTykphALB800guBCJKqppcGIZhp7gn874 QkftkNvmI/n/K23Fb4GUOdEbK7NmyQWUcqYI+3Uoigb48lUA8OCLTLoIOsPLQvNVKGay9R LtAHu+eFyC5JFy3E/Yh9w1Vb/BvFTfairPk5nsu4wsO8C03lkvmpSFYAkfSeko/0spzR/S e81I/BUu71eeREQdmfEoMbFopFNK9RS54ET+Ne0ywIOuWxbq/0P6dtLJg1FMVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709129445; a=rsa-sha256; cv=none; b=jag4LX+Zzfwa8sxqT5ckKXjm//0BC27DoecOgeF3JILpHEg5FF77Kr4kPpzvOYqcbaR/2P e1NQuwciHZ2CnCCOXTo6EZxxnrNLzEeSlJm1yYoUQCsWOjq9jVb+rMgkNRRgja/5wUp8xl hqOSgWfEOOtstiIq7jacqDFguVaGSO8t8522R/kGLHb8c1KzI7krAHq4l327/k9ULuSHEw YcXDlMzRI5/ZIL+hkt+OrEQMH1hVteqwtlafL5wQ/RPXZBhYk3yJ5euEJS/rdVW1Eg/H29 XdCuMj7O9aZG61j/xgY2/wtuOzOgD1rxxmaSMTYJKM+3UeGnZ2BR5klVRPJQCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709129445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jZy+ewvNGgvycZtgvW4WOhyMUaIJS4LO0yTXOmO3164=; b=AuhwfdhalQzaSqmDKygND2mG8mEIuraHWId/F54CoXyc97SD/P9i7FIYWQQvZMbq6lvZ++ D1gKpFKD5FZWBgJ2cwccI8Fi/dSFT2muK0T+ThndmJQgwT9Z9xOSjNRkCKQ/P3TZDITj19 AdjV5VB8bzRZZTjkRKhM+hTWFFIkX4zx8DdMvK1v/mXNKFoi09m6nBK8pnorx2Ybifxe3S C7tIzOkbL3w+zvsUETPiNkmf4/nILQCBLn6lrw3C8ipYvTCNFKbYEVTjeJ+SKaF+mGEjsZ GOow54lDd+dXcE0YIM6bmquQPLk2s0sS+yF0azHMrHi65RR14IqaHKKrCTa5mA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlGTx2NYSz1114; Wed, 28 Feb 2024 14: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 41SEAjaG058273; Wed, 28 Feb 2024 14: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 41SEAjXw058270; Wed, 28 Feb 2024 14:10:45 GMT (envelope-from git) Date: Wed, 28 Feb 2024 14:10:45 GMT Message-Id: <202402281410.41SEAjXw058270@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: b4368e83891e - main - gicv3: Report PENDBASE when bootverbose List-Id: Commit messages for the main 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: b4368e83891ed9eba72c0ceccf25f7642f2bad40 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b4368e83891ed9eba72c0ceccf25f7642f2bad40 commit b4368e83891ed9eba72c0ceccf25f7642f2bad40 Author: Warner Losh AuthorDate: 2024-02-28 14:08:55 +0000 Commit: Warner Losh CommitDate: 2024-02-28 14:09:42 +0000 gicv3: Report PENDBASE when bootverbose Report some stats about PENDBASE when we're running under bootverbose. We don't do this by default because experience has been excess output in this routine hangs the system. Sponsored by: Netflix Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D44036 --- sys/arm64/arm64/gicv3_its.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c index 74d6f617bbba..fa172c871150 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -828,6 +828,11 @@ its_init_cpu_lpi(device_t dev, struct gicv3_its_softc *sc) /* Make sure the GIC has seen everything */ dsb(sy); } + + if (bootverbose) + device_printf(gicv3, "using %sPENDBASE of %#lx on cpu %d\n", + (sc->sc_its_flags & ITS_FLAGS_LPI_PREALLOC) ? "pre-existing " : "", + vtophys(sc->sc_pend_base[cpuid]), cpuid); } static int From nobody Wed Feb 28 14:10:48 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlGV10bmkz5BfdP; Wed, 28 Feb 2024 14: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 4TlGV05ss2z4ff5; Wed, 28 Feb 2024 14: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=1709129448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/9FUCQM/aYNCe7RmfHjo6HGhyw2uCpIGbIlGIqw8YxI=; b=B4W1IVQ7D308fkypcc/sjINu3zSUfcSibLFiBQQXA+O+zK81PKuFofRHces3b2BAMb5NjJ wVyNpmdbvCX8WsOK6DMi3aeQJg4PWC3aT9xREepHEC/AnUt7z0DDa3lVF1YjAIcVF8APme apGj2h0fqPMwFexDXEOGsD73RjsXic0jPmUcoMuJ16aOc8vqZAkVxt6PpYxv386y9MZrL2 p8K9OmZkY4nH5pT/VB+6gELxaS/Lsvu8PecurJxiadLpwi5z5iO8r8T1krBPir5id4Aemh omx6RMCW5B4EO3Rnv2O84hl+5TRad2eP1ea53SInKRiG3MTNlZD6xJvLSK1ITw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709129448; a=rsa-sha256; cv=none; b=SiZSOyC0zQSXUAqQPialbuIahU1+wYopGRzEeRuhdrxhoRLliZ4JsTE2+/AlEQpXi81MJH 7TxHx95PSJYTZ9Rh0LuT/KIqMh0AzJqv2x1i2W6DVsT8WCvA1MxgUwW7fwe2vnv+nnNX9/ /aMghtDvIOqPbj9xUI18xKom1NU6SIF03WYEqQNcV+HZhTw9/YbWjRBYC/T97kIZmJxUWd AfdMQ3uYArJEG9IZr60KT97+2iVCppJ6qRpQYipefT5zN88X2pQ/KPX3YXc/5qZoMi44V+ 7SFezEl5H7zx8ppEWhjV488RI9XLgVvECkYAV6TcNEiHuApjzbS5Aws1CH73fA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709129448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/9FUCQM/aYNCe7RmfHjo6HGhyw2uCpIGbIlGIqw8YxI=; b=SSOAb6ureJf2cQRiwQzD9QUXCfP6NDrTXSAqfshoBUjyqmO/R9+9jLrXlbIe0Tm3TMaPvS DRh7DBhPA++6UmSe0GkfZgnvFyxvzZXij45wD3Z5BHiMIhlduR3JLLpXLNTZi74YxpE78a GpVOUKDtucZEuUHOHX6pWBzh+/aSlwjDYk2qe5oA9SDOybJkSD+laOFsByns2NhPpR38YC IDFEUOxrhQxf7+n0OZlLFPdfX4X0yoHO8C//5C8QhTT8xar0cI2USQtsKTy5Inih1YXzGO F4j4dIbgiFWtvBt4UzxhoNvIru0Pr5s1NhU+WEM8d2T8kaP3FVebvbQw81sXPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlGV04zgqz10Tl; Wed, 28 Feb 2024 14:10: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 41SEAmLG058432; Wed, 28 Feb 2024 14: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 41SEAm6X058429; Wed, 28 Feb 2024 14:10:48 GMT (envelope-from git) Date: Wed, 28 Feb 2024 14:10:48 GMT Message-Id: <202402281410.41SEAm6X058429@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: cb4a83cff01c - main - gicv3: If the LPI is already allocated, remember 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: cb4a83cff01cdf871c78115c942c5b34412914d2 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cb4a83cff01cdf871c78115c942c5b34412914d2 commit cb4a83cff01cdf871c78115c942c5b34412914d2 Author: Warner Losh AuthorDate: 2024-02-28 14:09:17 +0000 Commit: Warner Losh CommitDate: 2024-02-28 14:09:43 +0000 gicv3: If the LPI is already allocated, remember it If the LPI Configuration Tabel has been pre-allocated by the boot loader, then we have to remember PROPBASER and use it rather than allocating memory for it ourselves. Linux provides us with a reserved table that contains all the gicv3 allocations, so make sure what we read from PROPBASER matches something in that table. Normally, bare metal boot loaders leave the gic in a reset state. However, Linux brings it up fully so it can do I/O to boot the next kernel via kexec. Since the gicv3 PENDBASER can't be reset while running due to undefined behavior, we must reuse what's there for both PENDBASER and PROPBASER. With this commit, the workaround is complete. Details are at https://lkml.iu.edu/hypermail/linux/kernel/1809.2/06246.html and pointers in the thread. Sponsored by: Netflix Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D44038 --- sys/arm64/arm64/gicv3_its.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c index 71620eec8fce..9fcf13fe433b 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -685,6 +685,8 @@ gicv3_its_conftable_init(struct gicv3_its_softc *sc) int extra_flags = 0; device_t gicv3; uint32_t ctlr; + vm_paddr_t conf_pa; + vm_offset_t conf_va; /* * The PROPBASER is a singleton in our parent. We only set it up the @@ -699,8 +701,32 @@ gicv3_its_conftable_init(struct gicv3_its_softc *sc) gicv3 = device_get_parent(sc->dev); ctlr = gic_r_read_4(gicv3, GICR_CTLR); if ((ctlr & GICR_CTLR_LPI_ENABLE) != 0) { - extra_flags = ITS_FLAGS_LPI_PREALLOC; - panic("gicv3 already enabled, can't reprogram."); + conf_pa = gic_r_read_8(gicv3, GICR_PROPBASER); + conf_pa &= GICR_PROPBASER_PA_MASK; + /* + * If there was a pre-existing PROPBASER, then we need to honor + * it because implemenetation defined behavior in gicv3 makes it + * impossible to quiesce to change it out. We will only see a + * pre-existing one when we've been kexec'd from a Linux kernel, + * or from a LinuxBoot environment. + * + * Linux provides us with a MEMRESERVE table that we put into + * the excluded physmem area. If PROPBASER isn't in this tabke, + * the system cannot run due to random memory corruption, + * so we panic for this case. + */ + if (!physmem_excluded(conf_pa, LPI_CONFTAB_SIZE)) + panic("gicv3 PROPBASER needs to reuse %#lx, but not reserved\n", + conf_pa); + conf_va = PHYS_TO_DMAP(conf_pa); + if (!pmap_klookup(conf_va, NULL)) + panic("Can't mapped prior LPI mapping into VA\n"); + conf_table = (void *)conf_va; + extra_flags = ITS_FLAGS_LPI_PREALLOC | ITS_FLAGS_LPI_CONF_FLUSH; + if (bootverbose) + device_printf(sc->dev, + "LPI enabled, conf table using pa %#lx va %lx\n", + conf_pa, conf_va); } else { /* From nobody Wed Feb 28 14:10:47 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlGV00gmvz5BfMn; Wed, 28 Feb 2024 14: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 4TlGTz5Xx7z4fw5; Wed, 28 Feb 2024 14:10:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709129447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m18J/xqAAf7887yVqTbtIpkbUvpZdwDKei3mELx6iig=; b=aD/HnLcpPgss31j6fmx/zsvnfRdXtVO1H1Dt8SwyJq8K+WDeZqutervol3EFM+qwrsQQQF g0TDMJBK9Uk6cuyb5wNloLl/Yx+7yJ2voRIzJTS0wIlRGJiSKNyK1E3GDsQmcdnzHG1Mo0 877TxGBJFbuI4sgHonC/EA3k6YRB38KyOvpC185a0U4oC/4F/QAEk0B9v9Gs8srGmiWL/o cZoQmzLF/cdYOkgCtTvTKWGX58gCyBNxLchm0+04lDxyUcIUlJp3vsU/xZAZbS6jUPKrVE pfzzopT0tGEmdEHEeweBJb7abDWYyatNMX5BoM6zERGQK5rpEBWHToByGzkljA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709129447; a=rsa-sha256; cv=none; b=vJMS97NG84cTTG9wttHtO5nHAxyksnqbsqRzqFI3bZr3IQmHJDJh5h/uKu6DljAvAF4kHP W0rTMd+klhbHbvP8XSdCvY7SBbG0GekcsizTLNKu5IeElIZ9rTxLolOr5nnXsdqdM7dOHA vuS4b9ZwyUNOn987nWohR5k/bpLc5t2jqH7f03NrHkxrAvXQ9EVhYwDgn+m5k14K2ARVZY WzXtSHe9PBM/ECFjEuOBmc7grFwW6jPN2CJjel8G1WaisvSz4btWv2MdRg9BQa9mAKr5Xx 7ykk8YwsAvddzA2KmZC6ikp3XIbmyZ5G8cdeKA2M8usP1vK28lz3nlVVCY3OKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709129447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m18J/xqAAf7887yVqTbtIpkbUvpZdwDKei3mELx6iig=; b=jg1uK0sFzFR5Yzu0VR/K84CZzoRXAv5+OcVBcQMEaagwmKK9WkZwk8ImDEf+VW1DAltRrh AgnM3RVQSGRgNjSY5VjgyUDLZynYz47nTH9Uu9Dzg1210lAz4+zY9mdEKDVBd73XBc1kkS jHcyF2a1huJRa0CRZuhuhCcqu4Z3+9R3mmBYxbnIPGC9xMvbaGMg31DdUyK/mZarCQPHOY ICzybK1pA2gR93IPDs9G5QlPJD4xyBab9lBFukH8CC6a9vS9rUrCPxsu8XU7Ckuna+x/5z +xBjp3Cm1i02c8BVx5SPLI5jhQQ/kki4lVDyHVX+Q0WlerMJyHhlNaSTIlAF/A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlGTz4124zyrw; Wed, 28 Feb 2024 14: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 41SEAl5W058378; Wed, 28 Feb 2024 14: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 41SEAlkE058375; Wed, 28 Feb 2024 14:10:47 GMT (envelope-from git) Date: Wed, 28 Feb 2024 14:10:47 GMT Message-Id: <202402281410.41SEAlkE058375@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: 1d13cc200820 - main - gicv3: In its_init_cpu_lpi record each cpu's PENDBASER List-Id: Commit messages for the main 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: 1d13cc200820a020d7875563b036b5f43800ef38 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1d13cc200820a020d7875563b036b5f43800ef38 commit 1d13cc200820a020d7875563b036b5f43800ef38 Author: Warner Losh AuthorDate: 2024-02-28 14:09:10 +0000 Commit: Warner Losh CommitDate: 2024-02-28 14:09:42 +0000 gicv3: In its_init_cpu_lpi record each cpu's PENDBASER When we're using the preallocated memory for gicv3, record each cpu's PENDBASER where we'd normally allocate memory for it. Make sure that memory is in the excluded list and map the PA to VA and store that, to mimic what we do with the allocation case. Sponsored by: Netflix Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D44037 --- sys/arm64/arm64/gicv3_its.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c index fa172c871150..71620eec8fce 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -827,8 +828,18 @@ its_init_cpu_lpi(device_t dev, struct gicv3_its_softc *sc) /* Make sure the GIC has seen everything */ dsb(sy); + } else { + KASSERT(sc->sc_pend_base[cpuid] == 0, + ("PREALLOC too soon cpuid %d", cpuid)); + tmp = gic_r_read_8(gicv3, GICR_PENDBASER); + tmp &= GICR_PENDBASER_PA_MASK; + if (!physmem_excluded(tmp, LPI_PENDTAB_SIZE)) + panic("gicv3 PENDBASER on cpu %d needs to reuse 0x%#lx, but not reserved\n", + cpuid, tmp); + sc->sc_pend_base[cpuid] = PHYS_TO_DMAP(tmp); } + if (bootverbose) device_printf(gicv3, "using %sPENDBASE of %#lx on cpu %d\n", (sc->sc_its_flags & ITS_FLAGS_LPI_PREALLOC) ? "pre-existing " : "", From nobody Wed Feb 28 15:44:33 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlJZ96Cs6z5Bp3j; Wed, 28 Feb 2024 15:44:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TlJZ95Rglz4tNq; Wed, 28 Feb 2024 15:44:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709135073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dZK0LmntiEoOsI00dp4/rSPeHUSifSYjWDh80PCpQFU=; b=ftlc8ECO6sqGE8apWWweiRvsb0FgiWAraWLWPqNw1fYmD5W36Vd5fun86UQ0+ORgv7Cd1u bDAlAEaNpsfg5xu1DJAqAVkhzEO/Vwtdk2RDd92QP6gSZqiOfPSf5rdjMpSVk1qMMZkBjH jURi9JgZZOya8/jsC9MDFzHp+VuQSh92iqhQYJvff+1whRKxxjJOzUD+mwQe/FsT2q7BcN Jy7nCH0518rpEyoLJcOTyFZZQ0ycub2OUcxaWw2lcdvcl9MfjzT0Q8EOuM0Q4n6xeCVFan YcW2cCovoWHHeCSMiDv9tc4yifUlwMOJJQrXltqR+Oa4W9/JS/Upfw0h913pbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709135073; a=rsa-sha256; cv=none; b=sM+QMwVxwhT0amolT9c9SgYChlhkm3NthVkfSpCb2p48gOkqkLC6Czlk3NY4YIUdx9JZ0+ VRjolquohS7xRQvCqLVhcBUrjnqjwjiZ+q8w3bvUY5dXS6u8QK/4q4TuwXqlaWROXdA/EQ kvTISp3KDww7vXpAOnvWck8mpoOkcXE8R5f3XNpo0YslFvRsBL2PG+0/o5QolZCls2rcTZ PPWq12OjIsbmoo4Cgo4y2CU+pAV+jY4NET+JPlqEAsDtkTjRDr+mJTi/v5ov4gQ/g6o76r tkGHcSRsfTbANaPZnzJZwtp3hDv8/ljP43nfd8pumNfukjqbseKVy6KMwRap/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=1709135073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dZK0LmntiEoOsI00dp4/rSPeHUSifSYjWDh80PCpQFU=; b=jInGAVdXHC9w8H5/4YFMHxETLCeU5xwBu4xaunD4RjtvAeGY1Od5LVcClbW1Zabjijx5oA 0/ep1b0V4YdfO/jlMV6BnYW24n2epD4dI5EA426H3/GWSrXi3rCo0igoieRz8xFu0hk21V 1rYEJbgDz7alc+HXUoeLvjmzPDeymDp+eeYlx+cn9sSE/pT5yADUhirsj2rK0jdle7pLPU st5ZQTzOuMSdGUVkHAvcvnYe/D0IPDL7tHT2/VQ5yDe6MThkXzPfZAy0GtAcYk2qreFp13 IqBHqrwA+ygvMZHIyd0pggopE5wk++l9Kg/YsHtHXhn1N0PsBe0qaobmb74Rrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlJZ94B42z13S6; Wed, 28 Feb 2024 15:44: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 41SFiX6F017186; Wed, 28 Feb 2024 15:44:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41SFiXMu017183; Wed, 28 Feb 2024 15:44:33 GMT (envelope-from git) Date: Wed, 28 Feb 2024 15:44:33 GMT Message-Id: <202402281544.41SFiXMu017183@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: 5c7b986c21ed - main - lorder: Clean up and improve robustness. List-Id: Commit messages for the main 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: 5c7b986c21ed47545203e8f630fe2281b83112d2 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5c7b986c21ed47545203e8f630fe2281b83112d2 commit 5c7b986c21ed47545203e8f630fe2281b83112d2 Author: Dag-Erling Smørgrav AuthorDate: 2024-02-28 15:37:36 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-02-28 15:37:36 +0000 lorder: Clean up and improve robustness. * Properly parse (no) command-line options. * Ensure that errors go to stderr and result in a non-zero exit. * Drop the special-case code for a single argument, as it will produce the wrong outcome if the file does not exist or is corrupted. * Don't print anything until after we've collected all the data. * Always create all temporary files before setting the trap. This ensures that the trap can safely fire at any moment, regardless of any previous definition of `T`. * Use a temporary file rather than a pipe between `nm` and `sed` to ensure proper termination if `nm` fails due to a missing or invalid input. * The check for self-referential entries was conditional on testing our argument list against a regex looking for archives. This was a needless and unreliable optimization; make the check unconditional. * Document that lorder will not work properly if any of its inputs have spaces in their name. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D44133 --- usr.bin/lorder/lorder.1 | 22 ++++++------ usr.bin/lorder/lorder.sh | 92 ++++++++++++++++++++++++++++++------------------ 2 files changed, 69 insertions(+), 45 deletions(-) diff --git a/usr.bin/lorder/lorder.1 b/usr.bin/lorder/lorder.1 index b71756b03b49..4c70cd2f4729 100644 --- a/usr.bin/lorder/lorder.1 +++ b/usr.bin/lorder/lorder.1 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 21, 2023 +.Dd February 27, 2024 .Dt LORDER 1 .Os .Sh NAME @@ -44,13 +44,10 @@ The .Nm utility uses .Xr nm 1 -to determine interdependencies in the list of object files -and library archives -specified on the command line. -The -.Nm -utility outputs a list of file names where the first file contains a symbol -which is defined by the second file. +to determine interdependencies between object files and library +archives listed on its command line. +It then outputs a list of pairs of file names such that the first file +in each pair references at least one symbol defined by the second. .Pp The output is normally used with .Xr tsort 1 @@ -58,11 +55,11 @@ when a library is created to determine the optimum ordering of the object modules so that all references may be resolved in a single pass of the loader. .Pp -When linking static binaries, +Similarly, when linking static binaries, .Nm and .Xr tsort 1 -can be used to properly order library archives automatically. +can be used to sort libraries in order of dependency. .Pp The use of .Nm @@ -97,3 +94,8 @@ A .Nm utility appeared in .At v7 . +.Sh CAVEATS +The +.Nm +utility will not work properly if given file names with spaces or +newlines in them. diff --git a/usr.bin/lorder/lorder.sh b/usr.bin/lorder/lorder.sh index a24f844e5790..be28eec8b9bc 100644 --- a/usr.bin/lorder/lorder.sh +++ b/usr.bin/lorder/lorder.sh @@ -29,35 +29,50 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. -# only one argument is a special case, just output the name twice -case $# in - 0) - echo "usage: lorder file ..."; - exit ;; - 1) - echo $1 $1; - exit ;; -esac +export LC_CTYPE=C +export LC_COLLATE=C +set -e -# temporary files +usage() { + echo "usage: lorder file ..." >&2 + exit 1 +} + +while getopts "" opt ; do + case $opt in + *) + usage + ;; + esac +done +shift $(($OPTIND - 1)) +if [ $# -eq 0 ] ; then + usage +fi + +# +# Create temporary files. +# +N=$(mktemp -t _nm_) R=$(mktemp -t _reference_) S=$(mktemp -t _symbol_) +T=$(mktemp -t _temp_) NM=${NM:-nm} -# remove temporary files on HUP, INT, QUIT, PIPE, TERM -trap "rm -f $R $S $T; exit 1" 1 2 3 13 15 - -# make sure all the files get into the output -for i in $*; do - echo $i $i -done +# +# Remove temporary files on termination. +# +trap "rm -f $N $R $S $T" EXIT 1 2 3 13 15 -# if the line has " [RTDW] " it's a globally defined symbol, put it -# into the symbol file. # -# if the line has " U " it's a globally undefined symbol, put it into -# the reference file. -${NM} ${NMFLAGS} -go $* | sed " +# A line matching " [RTDW] " indicates that the input defines a symbol +# with external linkage; put it in the symbol file. +# +# A line matching " U " indicates that the input references an +# undefined symbol; put it in the reference file. +# +${NM} ${NMFLAGS} -go "$@" >$N +sed -e " / [RTDW] / { s/:.* [RTDW] / / w $S @@ -68,21 +83,28 @@ ${NM} ${NMFLAGS} -go $* | sed " w $R } d -" +" <$N -export LC_ALL=C -# eliminate references that can be resolved by the same library. -if [ $(expr "$*" : '.*\.a[[:>:]]') -ne 0 ]; then - sort -u -o $S $S - sort -u -o $R $R - T=$(mktemp -t _temp_) - comm -23 $R $S >$T - mv $T $R -fi +# +# Elide entries representing a reference to a symbol from within the +# library that defines it. +# +sort -u -o $S $S +sort -u -o $R $R +comm -23 $R $S >$T +mv $T $R + +# +# Make sure that all inputs get into the output. +# +for i ; do + echo "$i" "$i" +done -# sort references and symbols on the second field (the symbol), -# join on that field, and print out the file names. +# +# Sort references and symbols on the second field (the symbol), join +# on that field, and print out the file names. +# sort -k 2 -o $R $R sort -k 2 -o $S $S join -j 2 -o 1.1 2.1 $R $S -rm -f $R $S From nobody Wed Feb 28 15:44:34 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlJZB6y19z5BpTL; Wed, 28 Feb 2024 15:44: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 4TlJZB6L5Dz4t9d; Wed, 28 Feb 2024 15:44:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709135074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xxRFP7bZNs6VAfgV6yNYugjvs15BKxX/Tjw6H6cZu9s=; b=GBM+CNN9NFPEex/U0pNZuHKMeU9+bVJhpWkAi/hljb8ohMcVIiAg9mTieZNl/epbHb56/S 6FRnK3TATSk3F9Chh2FV5lBvIZw1DX2of5I6IQNfl5ju68W4zRolt2SXzxy6f7lXA1tm9N V5kwMd/HDLLslBzrW55VzHS40tP4sRqE9ShpnqnfDc3H/XVrz7HzjBj8AY4Y2o1PI8dl8W e9CeWZ3OBcgAs0u4IsRXSv3s3tEoxwqKZAbRWPhSUoxPmQJmWDTKC+dC2XMmOGRU2o+XFI elQbWmVsSOn/bltyIkioinEgAr4IWn4STaVRBtUE6JFU7vTnQ1LkqftL/0HTHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709135074; a=rsa-sha256; cv=none; b=CKR56LNd4albAPawokmqsNOm+T31Zzw6HVqhc+7Gs73T8LJwFvzBwDpS9nIDHM1WVfLuNR ngc0iSiwm1/Zu5F14T7YvSSjfg9Gz2tmQA6dlljA8d4SFRl3llzfGKiDxUa5F2RohA3BMI PH7TfOOJJKV/DB2G6KyXXpd2LvbFwW1//Besu51iKRj3cnD+Hl8spGeX4QhzJkCTID+bS4 qvNAq8fopvE9np1thYqV1INdVrGOInu1hdw9uMog3wa3oyetuLQJegWgsZlYO09dnBCqcu sqQFtv9xp6WpKlQcMbLrL1vUnqQO5iucLJ1v8rHGl5B96kJ3gTgojBmTIjCEQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709135074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xxRFP7bZNs6VAfgV6yNYugjvs15BKxX/Tjw6H6cZu9s=; b=PEia+jxtpT/4QmZKxZt3vDKTFG48GOs9k9fCF9XSGDf7dJ5AAxxj27ZSJM62LaGq1Tdr42 4+eIywsyajFOzhB0RBwveZ0Oce6srmE+wiNs6brc3/d1vCV2PxgtwVi9rObUJWCvEoEKfP l1oevcje7j9BvOLbLeSX9u0zpOVvUMI07Z7Mblk769FcigDJq92wNPuhXsqQ5kN8GZNSMR 1IAxZ8p1U/Yiwd0Q6+/6z/dlo2pbSvAXTGDSIL6RE9ZVthPbu1wmgtMH4uIQb+fIRk9ZYx w/0kg4qDbeAdrYS3nlf7tQwqouCi+OlV6jloNeLFb52NcOugr2V5/+n7EWa3sA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlJZB57Njz13NF; Wed, 28 Feb 2024 15:44: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 41SFiYEA017232; Wed, 28 Feb 2024 15:44:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41SFiYuM017229; Wed, 28 Feb 2024 15:44:34 GMT (envelope-from git) Date: Wed, 28 Feb 2024 15:44:34 GMT Message-Id: <202402281544.41SFiYuM017229@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: 96da41b6dbf3 - main - lorder: Add unit tests. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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: 96da41b6dbf383436018f11ad8a672faab2d3789 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=96da41b6dbf383436018f11ad8a672faab2d3789 commit 96da41b6dbf383436018f11ad8a672faab2d3789 Author: Dag-Erling Smørgrav AuthorDate: 2024-02-28 15:37:41 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-02-28 15:37:41 +0000 lorder: Add unit tests. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D44134 --- etc/mtree/BSD.tests.dist | 2 + usr.bin/lorder/Makefile | 4 ++ usr.bin/lorder/tests/Makefile | 4 ++ usr.bin/lorder/tests/lorder_test.sh | 111 ++++++++++++++++++++++++++++++++++++ 4 files changed, 121 insertions(+) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 2f7d74cb58f8..64b5f88ff2cc 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -1137,6 +1137,8 @@ .. lockf .. + lorder + .. m4 .. mkimg diff --git a/usr.bin/lorder/Makefile b/usr.bin/lorder/Makefile index a7bf77dc263a..5dc868f96c7e 100644 --- a/usr.bin/lorder/Makefile +++ b/usr.bin/lorder/Makefile @@ -1,5 +1,9 @@ +.include SCRIPTS=lorder.sh MAN= lorder.1 +HAS_TESTS= +SUBDIR.${MK_TESTS}= tests + .include diff --git a/usr.bin/lorder/tests/Makefile b/usr.bin/lorder/tests/Makefile new file mode 100644 index 000000000000..21207f413a8d --- /dev/null +++ b/usr.bin/lorder/tests/Makefile @@ -0,0 +1,4 @@ +PACKAGE= tests +ATF_TESTS_SH= lorder_test + +.include diff --git a/usr.bin/lorder/tests/lorder_test.sh b/usr.bin/lorder/tests/lorder_test.sh new file mode 100644 index 000000000000..449cda29f825 --- /dev/null +++ b/usr.bin/lorder/tests/lorder_test.sh @@ -0,0 +1,111 @@ +# +# Copyright (c) 2024 Klara, Inc. +# +# SPDX-License-Identifier: BSD-2-Clause +# + +atf_test_case noargs +noargs_head() { + atf_set descr "No arguments" +} +noargs_body() { + atf_check -s exit:1 -e match:"^usage:" \ + lorder +} + +atf_test_case onearg +onearg_head() { + atf_set descr "One argument" +} +onearg_body() { + echo "void a(void) { }" >a.c + cc -o a.o -c a.c + echo "a.o a.o" >output + atf_check -o file:output \ + lorder *.o +} + +atf_test_case dashdash +dashdash_head() { + atf_set descr "One argument" +} +dashdash_body() { + echo "void a(void) { }" >a.c + cc -o a.o -c a.c + echo "a.o a.o" >output + atf_check -o file:output \ + lorder -- *.o +} + +atf_test_case nonexistent +nonexistent_head() { + atf_set descr "Nonexistent file" +} +nonexistent_body() { + atf_check -s not-exit:0 -e match:"No such file" -o empty \ + lorder nonexistent.o +} + +atf_test_case invalid +invalid_head() { + atf_set descr "Invalid file" +} +invalid_body() { + echo "not an object file" >invalid.o + atf_check -s not-exit:0 -e match:"File format not" -o empty \ + lorder invalid.o +} + +atf_test_case objects +objects_head() { + atf_set descr "Order objects" +} +objects_body() { + echo "void a(void) { }" >a.c + echo "void a(void); void b(void) { a(); }" >b.c + echo "void b(void); void c(void) { b(); }" >c.c + for n in a b c ; do + cc -o $n.o -c $n.c + echo "$n.o $n.o" + done >output + echo "b.o a.o" >>output + echo "c.o b.o" >>output + atf_check -o file:output \ + lorder *.o +} + +atf_test_case archives +archives_head() { + atf_set descr "Order archives" +} +archives_body() { + echo "void a(void) { }" >a.c + echo "void a(void); void b(void) { a(); }" >b.c + echo "void b(void); void c(void) { b(); }" >c.c + echo "void e(void); void d(void) { e(); }" >d.c + echo "void d(void); void e(void) { d(); }" >e.c + for n in a b c d e ; do + cc -o $n.o -c $n.c + done + for n in a b c ; do + ar -crs $n.a $n.o + echo "$n.a $n.a" + done >output + ar -crs z.a d.o e.o + echo "z.a z.a" >>output + echo "b.a a.a" >>output + echo "c.a b.a" >>output + atf_check -o file:output \ + lorder *.a +} + +atf_init_test_cases() +{ + atf_add_test_case noargs + atf_add_test_case onearg + atf_add_test_case dashdash + atf_add_test_case nonexistent + atf_add_test_case invalid + atf_add_test_case objects + atf_add_test_case archives +} From nobody Wed Feb 28 15:44:35 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlJZD14cwz5BpWQ; Wed, 28 Feb 2024 15:44: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 4TlJZC71G5z4tNy; Wed, 28 Feb 2024 15:44:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709135076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mbRHP3/dJmxGbyXiIjdLBNP6dQiX0wxbwV03zs9Cuoc=; b=T+wWFMb2/fsSW2ML2XcUdY4CJR3X93/hxPPPtMp8A63xBSdDa02F89CW9WoRceUlbPdhQB RSwXSEQ+U7F95Q8tebve6BcDgAz15dhD2wBy+3UyidVHdqkT7gmTHab+rPqALQ7UZzA7wI HTTGpH/hgVc94O2F7Ommf18k0sssTJm9pz6uxSerOocXmjPhRA7Vv28pPZzVlBD3LK4szd Yz+u9BgCBqEocMFgzQqtkioLmiri2wHShZqd/DcIBX6pB0UJMaon2JaInYsnqXevuiBhxm 7OXXb9gEwWdPUXI4cgg61RG9Z1ssrknXxFnJlX/Fd8OceOAc2Fs9nE+d6LFHkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709135076; a=rsa-sha256; cv=none; b=fhVr2af5PLuhBEoPbvoaY08IBiSP28ihWo19sGgbIWeIU+5WRFzCkJiISONNrPBF7EFpmB ndPYbnGEe/mKOrVHJ+XF1QjxxHl99Zmv7Ym8HPMZN6TpEQZZjtXe8Wp8SeynM18/vIkoim bAjFWX65Ntp5j+n1zoDI/jxO4KVg4ptYJJ87u5FpAMZCeelbHGPhfvctNJ6PGa7m52WCuE iPZc9baJd9W9ObDQ8aI1oXv3ehkKRF4DQMf+ozLroLnn0JWhNrtrkPiQ+ceXA4QMtZx1ef ZDxgA9LiMpI2ZAy8ZwSEXG+mMVIMcqCdUOeOLc7JyRqf/cJPWhRW0e/4ER7NIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709135076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mbRHP3/dJmxGbyXiIjdLBNP6dQiX0wxbwV03zs9Cuoc=; b=tbgsYRgLy7M68piQxCyVbuLQ60EvqFm/onwT0v5gVK8rxUgnANeW1Dt6/tD63FyujSHm0f w2eu73hKUUmfsQaUbpuMK7TeSLXz8h1SFfECJFFSmzsK23cDYjU5X3Od5U9QusNnFaLyb3 K7KcZmiOGwgF2R7XB2pwdQOlSNk7KV4oKxuU7EMIaFUvZU4TILPLDNOn8M8O92CWYd3/2Z 4oFrJ5yQrZ4ixk//6suR8WVFABNa87d3lt0X/uz4Kz2ZdZTYhmZsI8TOGxRIBJSyHV0sgO HP2Qh+ghv3Y8HwbbEpCVpjqF9n4/uuJa/YwfVhFuh2oBI6cqtdewRkCYoQix8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlJZC66HQz13NG; Wed, 28 Feb 2024 15:44: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 41SFiZHN017268; Wed, 28 Feb 2024 15:44:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41SFiZHb017265; Wed, 28 Feb 2024 15:44:35 GMT (envelope-from git) Date: Wed, 28 Feb 2024 15:44:35 GMT Message-Id: <202402281544.41SFiZHb017265@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: cf4d9bf8b388 - main - lorder: Undeprecate. List-Id: Commit messages for the main 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: cf4d9bf8b38819da12c6d686d5cf6dbd6353cd61 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=cf4d9bf8b38819da12c6d686d5cf6dbd6353cd61 commit cf4d9bf8b38819da12c6d686d5cf6dbd6353cd61 Author: Dag-Erling Smørgrav AuthorDate: 2024-02-28 15:37:44 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-02-28 15:37:44 +0000 lorder: Undeprecate. While lorder is not required by our current toolchain (or any toolchain we've used in the past decade or two), it still occasionally shows up in build systems of third party software, including The Open Group's UNIX conformance test suite, and the maintenance cost is negligible. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: imp, allanjude, emaste Differential Revision: https://reviews.freebsd.org/D44135 --- usr.bin/lorder/lorder.1 | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/usr.bin/lorder/lorder.1 b/usr.bin/lorder/lorder.1 index 4c70cd2f4729..18c53b6cb918 100644 --- a/usr.bin/lorder/lorder.1 +++ b/usr.bin/lorder/lorder.1 @@ -31,11 +31,6 @@ .Sh NAME .Nm lorder .Nd list dependencies for object files -.Sh DEPRECATION NOTICE -.Nm -is obsolete and may not be present in -.Fx 14 -and later. .Sh SYNOPSIS .Nm .Ar @@ -61,12 +56,10 @@ and .Xr tsort 1 can be used to sort libraries in order of dependency. .Pp -The use of -.Nm -is not required by contemporary linkers, and -.Nm -may be removed from a future version of -.Fx . +While contemporary linkers no longer require the use of +.Nm , +it is provided for the benefit of legacy code bases and build +systems which still insist on it. .Sh ENVIRONMENT .Bl -tag -width indent .It Ev NM From nobody Wed Feb 28 18:08:35 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlMmN15rZz5C2f3; Wed, 28 Feb 2024 18:08: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 4TlMmN0Wtzz49sB; Wed, 28 Feb 2024 18:08:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709143716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=12CUBMiWKAViNIy/4mAl8RcSrrCrre9FSO8rsNYW67g=; b=C/XzUqG7e/GLRjbWZIceWOlC5OBAGNHfrq+JyDQZ08VdBj9GKfILoDORzkCxhByj35uJeN CMXDeCFifr1Smg62kaV9J9/N5lQMcK4WuGMbZoG56tCIqYJPNjIxrQRRJvx8uDB8jm88vR iXmBCOz1rL8PaXw6Sygz2hhTd1f/azmiHarv1Z7F+th4vy+ORExSvOWyEngf/qzxFhTZUC odI7bOlZRwwMib6uN4tU8l2Wzgrauoqxyi1genID7gkhHI9FqOMMvvLduCi5iCF7Al29Au WwqVrj8RqD0CKehvH10JiQsgWWSlOdOypfcKcJL7Jbag+JeQMssI/BZJsFXDGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709143716; a=rsa-sha256; cv=none; b=rhbwNdHQhgaPBzkinFgQIuBRp4vBn2uc6i5qa2kwMid7jYA2bkpzlaZu8ItMBtbD9AKOSH 5FMN+V2CX0JYwLNAbasF9oPYxgRaPH3O/Ku+jmcmoaptCve7cLJorAfrZ87z331OtUxX5E u+k/jLhlC/QOGlWArsWEWhDvbk0hEynD3OqoM5T8SQULXjxiixjB3gAaVwJ1ZU6208LY6v Pkkz9ode4EjDk0aDK9PBN+7BtTt06vhYwk1AF7JBU6rUggKu8ycRqwGDm6SNlt5dBE8kvS rxp8n7GkmyTy83m+uj2qAFPpoS/plX4iNWQbqMrOOsdaeSRScXWYkYvctPcDHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709143716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=12CUBMiWKAViNIy/4mAl8RcSrrCrre9FSO8rsNYW67g=; b=VyfvOdLyxnCv9OsmlMOdur6/RpVWaAwRCInp961pQ29OtgRnIK15A7yQ7a9jiJXJG56Ag1 1MLsIUa/O3wxe1s4suOLPC6WeE7jts6cZ1UX74LB/8UVPP3tDjmhj/1RMdIzzbdnfjCL+M GPw7yUa/EcN1GDKYsPC9Ziudcs8OQfn936Kj7Ip1dvB/FYE8LdGjkox0LdIQtSL7cwz+S7 8L0X5yid/aPjiMbCbySaoy/EmxcISnE0wYiEGkT1GgnVx7AVOfQY4K0urqj8cbE1+d6txX 8hdaPZIr1smUpN3VIO6+GTGTh5BkPQYZh7bkPoQT8jnB9fLDKUPK6tmj4o8AHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlMmM6hBTz16C5; Wed, 28 Feb 2024 18:08: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 41SI8ZNP055621; Wed, 28 Feb 2024 18:08:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41SI8Z1S055618; Wed, 28 Feb 2024 18:08:35 GMT (envelope-from git) Date: Wed, 28 Feb 2024 18:08:35 GMT Message-Id: <202402281808.41SI8Z1S055618@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Stefan =?utf-8?Q?E=C3=9Fer?= Subject: git: e0dfecadf594 - main - ldconfig: support hints files of either byte-order List-Id: Commit messages for the main 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: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e0dfecadf5946b6a8ad423be4eb1c14017b3a8a7 Auto-Submitted: auto-generated The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=e0dfecadf5946b6a8ad423be4eb1c14017b3a8a7 commit e0dfecadf5946b6a8ad423be4eb1c14017b3a8a7 Author: Stefan Eßer AuthorDate: 2024-02-28 17:49:29 +0000 Commit: Stefan Eßer CommitDate: 2024-02-28 17:49:29 +0000 ldconfig: support hints files of either byte-order Make the ldconfig program accept hints files in little-endian and big-endian format on all architectures. The default format is the native byte-order of the respective host. This is expected to change when a version of the pkg command is available that implements support for either byte-order in its internal ldconfig function. (Already committed in the development tree of the pkg utility, a release is expected at the end of Q1/2024). This update adds the -B option to the ldconfig program. It enforces the creation of a big-endian hints file on a little-endian host. The main purpose to is support of tests with non-native byte-order files on little-endian hosts. It will be removed when all supported FreeBSD releases use little-endian hints files by default. When little-endian hints files are generally used, support of either byte-order in libexec/rtld can also be removed. When support for big-endian hints files is no longer required, the COND_SWAP macro in ldconfig and rtld shall be replaced by le32toh(), which just return their argument on little-endian architectures. Approved by: kib MFC after: 1 month Relnotes: yes Differential Revision: https://reviews.freebsd.org/D44093 --- sbin/ldconfig/elfhints.c | 46 ++++++++++++++++++++++++++++++++-------------- sbin/ldconfig/ldconfig.8 | 11 ++++++++--- sbin/ldconfig/ldconfig.c | 13 ++++++++----- sbin/ldconfig/ldconfig.h | 2 +- 4 files changed, 49 insertions(+), 23 deletions(-) diff --git a/sbin/ldconfig/elfhints.c b/sbin/ldconfig/elfhints.c index 72b9273ab93a..d6ee5e0918d6 100644 --- a/sbin/ldconfig/elfhints.c +++ b/sbin/ldconfig/elfhints.c @@ -27,6 +27,7 @@ */ #include +#include #include #include @@ -48,11 +49,12 @@ static void add_dir(const char *, const char *, bool); static void read_dirs_from_file(const char *, const char *); -static void read_elf_hints(const char *, bool); +static void read_elf_hints(const char *, bool, bool); static void write_elf_hints(const char *); static const char *dirs[MAXDIRS]; static int ndirs; +static bool is_be; bool insecure; static void @@ -95,7 +97,7 @@ list_elf_hints(const char *hintsfile) int i; int nlibs; - read_elf_hints(hintsfile, 1); + read_elf_hints(hintsfile, true, false); printf("%s:\n", hintsfile); printf("\tsearch directories:"); for (i = 0; i < ndirs; i++) @@ -183,8 +185,11 @@ read_dirs_from_file(const char *hintsfile, const char *listfile) fclose(fp); } +/* Convert between native byte order and forced little resp. big endian. */ +#define COND_SWAP(n) (is_be ? be32toh(n) : le32toh(n)) + static void -read_elf_hints(const char *hintsfile, bool must_exist) +read_elf_hints(const char *hintsfile, bool must_exist, bool force_be) { int fd; struct stat s; @@ -193,6 +198,7 @@ read_elf_hints(const char *hintsfile, bool must_exist) char *strtab; char *dirlist; char *p; + int hdr_version; if ((fd = open(hintsfile, O_RDONLY)) == -1) { if (errno == ENOENT && !must_exist) @@ -214,14 +220,18 @@ read_elf_hints(const char *hintsfile, bool must_exist) close(fd); hdr = (struct elfhints_hdr *)mapbase; - if (hdr->magic != ELFHINTS_MAGIC) + is_be = be32toh(hdr->magic) == ELFHINTS_MAGIC; + if (COND_SWAP(hdr->magic) != ELFHINTS_MAGIC) errx(1, "\"%s\": invalid file format", hintsfile); - if (hdr->version != 1) + if (force_be && !is_be) + errx(1, "\"%s\": incompatible endianness requested", hintsfile); + hdr_version = COND_SWAP(hdr->version); + if (hdr_version != 1) errx(1, "\"%s\": unrecognized file version (%d)", hintsfile, - hdr->version); + hdr_version); - strtab = (char *)mapbase + hdr->strtab; - dirlist = strtab + hdr->dirlist; + strtab = (char *)mapbase + COND_SWAP(hdr->strtab); + dirlist = strtab + COND_SWAP(hdr->dirlist); if (*dirlist != '\0') while ((p = strsep(&dirlist, ":")) != NULL) @@ -229,13 +239,19 @@ read_elf_hints(const char *hintsfile, bool must_exist) } void -update_elf_hints(const char *hintsfile, int argc, char **argv, bool merge) +update_elf_hints(const char *hintsfile, int argc, char **argv, bool merge, + bool force_be) { struct stat s; int i; + /* + * Remove "be32toh(1) == 1" from this condition to create + * little-endian hints files on all architectures by default. + */ + is_be = be32toh(1) == 1 || force_be; if (merge) - read_elf_hints(hintsfile, false); + read_elf_hints(hintsfile, false, force_be); for (i = 0; i < argc; i++) { if (stat(argv[i], &s) == -1) warn("warning: %s", argv[i]); @@ -265,9 +281,9 @@ write_elf_hints(const char *hintsfile) if ((fp = fdopen(fd, "wb")) == NULL) err(1, "fdopen(%s)", tempname); - hdr.magic = ELFHINTS_MAGIC; - hdr.version = 1; - hdr.strtab = sizeof hdr; + hdr.magic = COND_SWAP(ELFHINTS_MAGIC); + hdr.version = COND_SWAP(1); + hdr.strtab = COND_SWAP(sizeof hdr); hdr.strsize = 0; hdr.dirlist = 0; memset(hdr.spare, 0, sizeof hdr.spare); @@ -278,8 +294,10 @@ write_elf_hints(const char *hintsfile) for (i = 1; i < ndirs; i++) hdr.strsize += 1 + strlen(dirs[i]); } - hdr.dirlistlen = hdr.strsize; + hdr.dirlistlen = COND_SWAP(hdr.strsize); hdr.strsize++; /* For the null terminator */ + /* convert in-place from native to target endianness */ + hdr.strsize = COND_SWAP(hdr.strsize); /* Write the header. */ if (fwrite(&hdr, 1, sizeof hdr, fp) != sizeof hdr) diff --git a/sbin/ldconfig/ldconfig.8 b/sbin/ldconfig/ldconfig.8 index 47e0dfa99b50..88d99567912e 100644 --- a/sbin/ldconfig/ldconfig.8 +++ b/sbin/ldconfig/ldconfig.8 @@ -32,7 +32,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 May 15, 2021 +.Dd February 28, 2024 .Dt LDCONFIG 8 .Os .Sh NAME @@ -41,7 +41,7 @@ .Sh SYNOPSIS .Nm .Op Fl 32 -.Op Fl Rimrv +.Op Fl BRimrv .Op Fl f Ar hints_file .Op Ar directory | Ar .Sh DESCRIPTION @@ -105,6 +105,11 @@ Generate the hints for 32-bit ABI shared libraries on 64-bit systems that support running 32-bit binaries. .It Fl elf Ignored for backwards compatibility. +.It Fl B +Force writing big-endian binary data´to the hints file. +The default is to create little-endian hints files on all architectures. +Reading of and merging into hints files preserves the endianness of the +existing hints file. .It Fl R Appends pathnames on the command line to the directory list from the hints file. @@ -159,7 +164,7 @@ invocations with .El .Sh SEE ALSO .Xr ld 1 , -.Xr ld-elf.so.1 , +.Xr ld-elf.so.1 1 , .Xr link 5 .Sh HISTORY A diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c index 2f5cdbd6505e..0eb9cb801ac2 100644 --- a/sbin/ldconfig/ldconfig.c +++ b/sbin/ldconfig/ldconfig.c @@ -57,9 +57,9 @@ main(int argc, char **argv) { const char *hints_file; int c; - bool is_32, justread, merge, rescan, verbose; + bool is_32, justread, merge, rescan, force_be, verbose; - is_32 = justread = merge = rescan = verbose = false; + force_be = is_32 = justread = merge = rescan = verbose = false; while (argc > 1) { if (strcmp(argv[1], "-aout") == 0) { @@ -80,8 +80,11 @@ main(int argc, char **argv) hints_file = __PATH_ELF_HINTS("32"); else hints_file = _PATH_ELF_HINTS; - while((c = getopt(argc, argv, "Rf:imrsv")) != -1) { + while((c = getopt(argc, argv, "BRf:imrsv")) != -1) { switch (c) { + case 'B': + force_be = true; + break; case 'R': rescan = true; break; @@ -115,7 +118,7 @@ main(int argc, char **argv) if (argc == optind) rescan = true; update_elf_hints(hints_file, argc - optind, - argv + optind, merge || rescan); + argv + optind, merge || rescan, force_be); } exit(0); } @@ -124,7 +127,7 @@ static void usage(void) { fprintf(stderr, - "usage: ldconfig [-32] [-elf] [-Rimrv] [-f hints_file] " + "usage: ldconfig [-32] [-elf] [-BRimrv] [-f hints_file]" "[directory | file ...]\n"); exit(1); } diff --git a/sbin/ldconfig/ldconfig.h b/sbin/ldconfig/ldconfig.h index e03ba928be7d..aa7ad810bacd 100644 --- a/sbin/ldconfig/ldconfig.h +++ b/sbin/ldconfig/ldconfig.h @@ -36,7 +36,7 @@ extern bool insecure; /* -i flag, needed here for elfhints.c */ __BEGIN_DECLS void list_elf_hints(const char *); -void update_elf_hints(const char *, int, char **, bool); +void update_elf_hints(const char *, int, char **, bool, bool); __END_DECLS #endif From nobody Wed Feb 28 22:27:12 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlTVm4mKbz5CXYV; Wed, 28 Feb 2024 22:27: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 4TlTVm4BhVz4n8M; Wed, 28 Feb 2024 22:27:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709159232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=diFKItAb+afAmS7K21sl4AE9e+7yDWPMh/OouSCbQ8E=; b=Gw/hsrnHleSS3x8DBpMKYAxxhpAVNaJFagN7ob7Mb7xm7d5MYFQuyMeNFYqHyoq0t3UCcw wdsSkucQvmPWloFnQrYHw5z6EmMI/QgBcLVzw7qpfUpveFPY9lVBYp/lMPJHdS+x7N+pjQ /1w/74NEqN6uoJtXrTkvJUaEvdT8g6zbyuBmafY0aZuJX85ICFyVvmn+QhiQz2sbbnJtdT 8mHfmchwW4s8dUXFCtE4/5V1NaS8DLHnr+YWHvNvrtT/Iyzsy9uCmMxk2dYfSbjEGVwoX/ 8KzmLqD37h8MghuTNGFGkBzTrJH5q7sZrj2Azw8TywzCejH0YD5QsyjKNEi3pQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709159232; a=rsa-sha256; cv=none; b=E4antmMDwFGoK0JD+uOF6s8VoAemOrQxs5+wvFQKoFXVHZOQnDUOiiIC5jLzRvzD5N5P+0 vvG+rEsfFe8L6N8WEXzSKrUrnqsEVXUmPsJl/PCiI6JUko8WBe6yu8bvSmwpRER3EoFpy8 D/D0PG80yt8u+h06mwo4b2Jmk5dOLF7VPVXTR+9UWU1b33HbQl8KrJBoPm4zNwX4v09+Vx czU97YgMDbVGIb1ql+jSpdN5CYNPMOgxkp+8kEWBRLbo29YURNsr3GUbDDvMMqUKiGOILq osVtw9o0tZ2MBlt0KvV5H7tNRF00vMSjzy4fQeshMKK3RPoFiI3mY7/8KuK97w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709159232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=diFKItAb+afAmS7K21sl4AE9e+7yDWPMh/OouSCbQ8E=; b=GS7ih0+NbxLfYKO3alXGC/MixWmwYeuYd+3/abSIlMtlSdwCivtEXlZ69uu+Vis+QK9waf qAEbGzM8/rzHNT4I8DoYXP1aY1QjuCxI7OYUlXHwNv5hLHbHIyIqAxca9q5hwl4A1/uqbl PqS/R/CkWgK1PvEiM1CrIVFCIkSD2QABTUolv7Dak9uoEP6q+6SplclzX/jEJ46D5GIFME bI+NZ1B9AAZ0rxNjoBJqCO/8RqjZGRmBk26RqcNjltyg4n/w7k0Hm/m1wARsOJL64DWvv5 2Eh87vyhtcKVbtIxy8fWK4jxWTlby8aQHqdqdRtI0ZPJtckXCp9kEQ6lCEZdIA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlTVm3clkzGCc; Wed, 28 Feb 2024 22:27: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 41SMRCAS094274; Wed, 28 Feb 2024 22:27:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41SMRC1j094271; Wed, 28 Feb 2024 22:27:12 GMT (envelope-from git) Date: Wed, 28 Feb 2024 22:27:12 GMT Message-Id: <202402282227.41SMRC1j094271@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: 48f33b55b014 - main - netlink: fix casts List-Id: Commit messages for the main 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: 48f33b55b0148c3c8991e53156f37c42b8bc22e9 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=48f33b55b0148c3c8991e53156f37c42b8bc22e9 commit 48f33b55b0148c3c8991e53156f37c42b8bc22e9 Author: Kristof Provost AuthorDate: 2024-02-26 10:18:30 +0000 Commit: Kristof Provost CommitDate: 2024-02-28 22:26:17 +0000 netlink: fix casts Reviewed by: melifaro MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D44088 --- sys/netlink/netlink_message_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netlink/netlink_message_parser.c b/sys/netlink/netlink_message_parser.c index 4440f8df2df2..8caa13fbf3ce 100644 --- a/sys/netlink/netlink_message_parser.c +++ b/sys/netlink/netlink_message_parser.c @@ -321,7 +321,7 @@ nlattr_get_uint8(struct nlattr *nla, struct nl_pstate *npt, const void *arg, voi nla->nla_type, NLA_DATA_LEN(nla)); return (EINVAL); } - *((uint16_t *)target) = *((const uint16_t *)NL_RTA_DATA_CONST(nla)); + *((uint8_t *)target) = *((const uint8_t *)NL_RTA_DATA_CONST(nla)); return (0); } From nobody Wed Feb 28 22:27:13 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlTVn5JWCz5CXSp; Wed, 28 Feb 2024 22:27:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TlTVn4Z2zz4nK9; Wed, 28 Feb 2024 22:27:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709159233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QXc38HIo3QWqFm/lvX66ruzjpcwrhsCI9Yo6t37fG+0=; b=LE+WFUQ8W5dzw+y1X7kzE9HVE4M54aRdJ+3aIabq60GSBRw6tb0P4txO9WFYvHa8Dw6TBM 9pwX5OZHSRVoM29iCpo0BOkJ5BWam+a+NG2L6YcHgXehISelVtAuLv/UZTVDJvI8UgfLBh i6gy/PW/Y6f0n3Jh36Z8Mm6Wd5bBPmmYWUJ9f1LTh5wMSCi1z3uPTyBbTHP+R9G1mlP6T+ gcBnm6WE1GNLLCAqXijyFq1kOYy/9oeRV49HR3i8lrLVcbRIl1qu3WZpENGutsfGsyIjX/ nF4NbMZNe3cYW6eBv8y0z2TLaxBP1n5NXE37Gs851DkbUKeM+Vc6GM+j4s0ZyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709159233; a=rsa-sha256; cv=none; b=i6WFhaXtxq1DqbqMGA9BL2XF/nrekcJf1spADQMyzTqXrrlXeC547xHMpedB/BH11pKwAc ve+kvvrMtCDtilEZ0wBSIybXjyZQbUGrntM0MNtwSACs9MuwH3GS/VQO7ZAGsJIpnCglTY ZMQptmrmHrRL7tygO2GzKNwzqW+7u6z0AroKSFZpe6WvGjOJEJNQ9OMWcOC1HwZSLf8uLJ wtnA/75D+vY9EMVPmRwC6bmisKuY5v/yaJEAA/7K6v9Fms7ekZ9nTXKzAYuF2g7wJ4fD9H aY7ZUdcFLXELroHqJ3olCth3ICr29LDJRJWST6H/Znd0ej2JF457y34YzCynsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709159233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QXc38HIo3QWqFm/lvX66ruzjpcwrhsCI9Yo6t37fG+0=; b=C46LNUL6/OREjMe0JMJu4vkYIszVvTblxqfmYw90kO6bVOjFxf/qFfgCsnNON2WN7XpzQJ koKSH+rR/MrrbE2tKPmNuM1a7DjIcYCuhqhAciOtKCwjajehYQy5jszXapn75lzotAO7AN 2XCKG5sXVF60ow5fNYpn3IO7UTztFxxubdYwehqFHbaDJglHEGQWQnac/QAULBVYqa85SW kbGxaM6FpcBn9TTGjUoOT1NkK0EkB5IcifZc0sPaT5tv2g0tfTQX6H4dIffVxQVh1Sjh5J 3wxTKmdVOJoX8/dtTq3GJ8RfUVdAQfHw9TY52WYpOTSPWxPTSLG+d0BOwm8N9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlTVn3v62zFtX; Wed, 28 Feb 2024 22:27:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41SMRD57094322; Wed, 28 Feb 2024 22:27:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41SMRDV3094320; Wed, 28 Feb 2024 22:27:13 GMT (envelope-from git) Date: Wed, 28 Feb 2024 22:27:13 GMT Message-Id: <202402282227.41SMRDV3094320@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: dfed87b5ce9c - main - netlink: add bool type support List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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: dfed87b5ce9c4e82b0227c14a3ed0cafeb814b16 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=dfed87b5ce9c4e82b0227c14a3ed0cafeb814b16 commit dfed87b5ce9c4e82b0227c14a3ed0cafeb814b16 Author: Kristof Provost AuthorDate: 2024-02-26 10:19:28 +0000 Commit: Kristof Provost CommitDate: 2024-02-28 22:26:18 +0000 netlink: add bool type support Reviewed by: melifaro Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D44089 --- sys/netlink/netlink_message_parser.c | 11 +++++++++++ sys/netlink/netlink_message_parser.h | 2 ++ sys/netlink/netlink_snl.h | 6 ++++++ 3 files changed, 19 insertions(+) diff --git a/sys/netlink/netlink_message_parser.c b/sys/netlink/netlink_message_parser.c index 8caa13fbf3ce..eafc2d83cbfb 100644 --- a/sys/netlink/netlink_message_parser.c +++ b/sys/netlink/netlink_message_parser.c @@ -312,6 +312,17 @@ nlattr_get_ipvia(struct nlattr *nla, struct nl_pstate *npt, const void *arg, voi return (error); } +int +nlattr_get_bool(struct nlattr *nla, struct nl_pstate *npt, const void *arg, void *target) +{ + if (__predict_false(NLA_DATA_LEN(nla) != sizeof(bool))) { + NLMSG_REPORT_ERR_MSG(npt, "nla type %d size(%u) is not bool", + nla->nla_type, NLA_DATA_LEN(nla)); + return (EINVAL); + } + *((bool *)target) = *((const bool *)NL_RTA_DATA_CONST(nla)); + return (0); +} int nlattr_get_uint8(struct nlattr *nla, struct nl_pstate *npt, const void *arg, void *target) diff --git a/sys/netlink/netlink_message_parser.h b/sys/netlink/netlink_message_parser.h index 7a417c00fc46..49bec646b29e 100644 --- a/sys/netlink/netlink_message_parser.h +++ b/sys/netlink/netlink_message_parser.h @@ -173,6 +173,8 @@ int nlattr_get_flag(struct nlattr *nla, struct nl_pstate *npt, const void *arg, void *target); int nlattr_get_ip(struct nlattr *nla, struct nl_pstate *npt, const void *arg, void *target); +int nlattr_get_bool(struct nlattr *nla, struct nl_pstate *npt, + const void *arg, void *target); int nlattr_get_uint8(struct nlattr *nla, struct nl_pstate *npt, const void *arg, void *target); int nlattr_get_uint16(struct nlattr *nla, struct nl_pstate *npt, diff --git a/sys/netlink/netlink_snl.h b/sys/netlink/netlink_snl.h index 89ba5b5aef5d..6553a391a8f5 100644 --- a/sys/netlink/netlink_snl.h +++ b/sys/netlink/netlink_snl.h @@ -1147,6 +1147,12 @@ snl_add_msg_attr_raw(struct snl_writer *nw, const struct nlattr *nla_src) return (snl_add_msg_attr(nw, nla_src->nla_type, attr_len, (const void *)(nla_src + 1))); } +static inline bool +snl_add_msg_attr_bool(struct snl_writer *nw, int attrtype, bool value) +{ + return (snl_add_msg_attr(nw, attrtype, sizeof(bool), &value)); +} + static inline bool snl_add_msg_attr_u8(struct snl_writer *nw, int attrtype, uint8_t value) { From nobody Wed Feb 28 22:27:14 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlTVq1Bcgz5CXSq; Wed, 28 Feb 2024 22:27:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TlTVp6rJfz4nKb; Wed, 28 Feb 2024 22:27:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709159234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pxqrA8qRDbpVXb3CekJMVqmTbOVOaU2whNdtvVUhuSE=; b=i1sWPDoFNPj3WXJLdWytBDhX1x+J2fAtd7j2BOTZkdzObQY4V+9dJ/MmTDHcXb58sISyY8 iJRns3RKQyBI849s58s3y0U4H3NaP4lDIDHPOtYu36VCG1YaqUHSVgyKU9oI1vdq1GAqyT Bb8Oyf4nbg492u4VDw59sxYQQizxT/QFp/Ulrxju1APKipXx+rbW0C4AaM17D4TBlkl/1C sAGA9Sn95HiLaBJWfxegLBIUbWckzwXmoNPVtpysRk0sK5PeHRqvQng17xmIf4cDA8eI4j zbG/+6clX50GlHEMToVCACuSnq4cqqyZds5FCqZr87hkrd9aaLjZowh0+AwgoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709159234; a=rsa-sha256; cv=none; b=j8+oawtgkPYn2xhrfWpgOKNcyFHFGO/LnOlH0jzo43ySK1aJadJFkZTVe4HRMU5Hci/Q8k 1OkDOZVJsK9O3/eKzuqVTJRQysHzU3TayIcOd0m/Pg+FISVP16fF97xx2Oukz5izgcW0f3 KkOsaIejDpZYqaRm6IYzkjmp/aAIHjOjGsuF2Nbb5ab0EQ1lRyc5EWfysgeDjwCRS+rsM1 Z73n2l+YPaYC0aEZ9YN4yITGQzazUxPwoKCUUBJwA22WMzRI9h0vzDPfKqDUJySBGVcPVN kuWkHePyyoHtslt5Qsre2Pq3whV1eIc+0Qxy/5DId8hna7dB/VRx8kKSFfcqmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709159234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pxqrA8qRDbpVXb3CekJMVqmTbOVOaU2whNdtvVUhuSE=; b=gD809Fks9gskdufgfkRJrGi9Qlhv7m0W7fiJFuwIfgPVXObP+mnlSacXx74HPPCCkkYJbW xI47Jk18H3qcIxnlRACiG3pWtMmXWaLSXQh3/1djzC0If/lOM2GxcjxsA+mbz8xb69XhRW RGBZiwak4OITYImgVo1R4NAs4uAcDE+HW6TTeCu03Tlh5qRgazQa0IYPPiZR09LzXnfoxT Xg0F4+eAhT/0lZKRMA8zp/D5p/PH+7sP87el8Z3x5q/0b8hjQn1PY8WWJtKe9dLatHqpnC 3dl+dC52fZJVzMSnfi3orI9JRa83hXI01BZ2sBJGNxcs2y+od3I41411lbAWCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlTVp50VDzG25; Wed, 28 Feb 2024 22:27:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41SMREeX094375; Wed, 28 Feb 2024 22:27:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41SMREHG094372; Wed, 28 Feb 2024 22:27:14 GMT (envelope-from git) Date: Wed, 28 Feb 2024 22:27:14 GMT Message-Id: <202402282227.41SMREHG094372@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: 706d465dae6a - main - pf: convert kill/clear state to use netlink List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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: 706d465dae6aa3e1b567299b9e80eb574b6c5abf Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=706d465dae6aa3e1b567299b9e80eb574b6c5abf commit 706d465dae6aa3e1b567299b9e80eb574b6c5abf Author: Kristof Provost AuthorDate: 2024-02-26 10:20:29 +0000 Commit: Kristof Provost CommitDate: 2024-02-28 22:26:18 +0000 pf: convert kill/clear state to use netlink Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D44090 --- contrib/pf/authpf/authpf.c | 8 +-- lib/libpfctl/libpfctl.c | 128 ++++++++++++++++++++++++++++++--------------- lib/libpfctl/libpfctl.h | 4 ++ sbin/pfctl/pfctl.c | 12 ++--- sys/net/pfvar.h | 3 ++ sys/netpfil/pf/pf_ioctl.c | 7 +-- sys/netpfil/pf/pf_nl.c | 96 +++++++++++++++++++++++++++++++++- sys/netpfil/pf/pf_nl.h | 19 +++++++ 8 files changed, 221 insertions(+), 56 deletions(-) diff --git a/contrib/pf/authpf/authpf.c b/contrib/pf/authpf/authpf.c index 9858c1c50ced..81dbcb747f5f 100644 --- a/contrib/pf/authpf/authpf.c +++ b/contrib/pf/authpf/authpf.c @@ -57,6 +57,7 @@ static int change_table(int, const char *); static void authpf_kill_states(void); int dev; /* pf device */ +struct pfctl_handle *pfh; char anchorname[PF_ANCHOR_NAME_SIZE] = "authpf"; char rulesetname[MAXPATHLEN - PF_ANCHOR_NAME_SIZE - 2]; char tablename[PF_TABLE_NAME_SIZE] = "authpf_users"; @@ -135,7 +136,8 @@ main(void) } /* open the pf device */ dev = open(PATH_DEVFILE, O_RDWR); - if (dev == -1) { + pfh = pfctl_open(PATH_DEVFILE); + if (dev == -1 || pfh == NULL) { syslog(LOG_ERR, "cannot open packet filter device (%m)"); goto die; } @@ -906,7 +908,7 @@ authpf_kill_states(void) sizeof(kill.src.addr.v.a.addr)); memset(&kill.src.addr.v.a.mask, 0xff, sizeof(kill.src.addr.v.a.mask)); - if (pfctl_kill_states(dev, &kill, NULL)) + if (pfctl_kill_states_h(pfh, &kill, NULL)) syslog(LOG_ERR, "pfctl_kill_states() failed (%m)"); /* Kill all states to ipsrc */ @@ -915,7 +917,7 @@ authpf_kill_states(void) sizeof(kill.dst.addr.v.a.addr)); memset(&kill.dst.addr.v.a.mask, 0xff, sizeof(kill.dst.addr.v.a.mask)); - if (pfctl_kill_states(dev, &kill, NULL)) + if (pfctl_kill_states_h(pfh, &kill, NULL)) syslog(LOG_ERR, "pfctl_kill_states() failed (%m)"); } diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index 71546c4709c2..f12e45291fc1 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -1630,22 +1630,6 @@ pfctl_get_creatorids(struct pfctl_handle *h, uint32_t *creators, size_t *len) return (error); } -static void -pfctl_nv_add_state_cmp(nvlist_t *nvl, const char *name, - const struct pfctl_state_cmp *cmp) -{ - nvlist_t *nv; - - nv = nvlist_create(0); - - nvlist_add_number(nv, "id", cmp->id); - nvlist_add_number(nv, "creatorid", htonl(cmp->creatorid)); - nvlist_add_number(nv, "direction", cmp->direction); - - nvlist_add_nvlist(nvl, name, nv); - nvlist_destroy(nv); -} - static inline bool snl_attr_get_pfaddr(struct snl_state *ss __unused, struct nlattr *nla, const void *arg __unused, void *target) @@ -1848,48 +1832,110 @@ pfctl_free_states(struct pfctl_states *states) bzero(states, sizeof(*states)); } +struct pfctl_nl_clear_states { + uint32_t killed; +}; +#define _OUT(_field) offsetof(struct pfctl_nl_clear_states, _field) +static struct snl_attr_parser ap_clear_states[] = { + { .type = PF_CS_KILLED, .off = _OUT(killed), .cb = snl_attr_get_uint32 }, +}; +static struct snl_field_parser fp_clear_states[] = {}; +#undef _OUT +SNL_DECLARE_PARSER(clear_states_parser, struct genlmsghdr, fp_clear_states, ap_clear_states); + static int -_pfctl_clear_states(int dev, const struct pfctl_kill *kill, - unsigned int *killed, uint64_t ioctlval) +_pfctl_clear_states_h(struct pfctl_handle *h, const struct pfctl_kill *kill, + unsigned int *killed, int cmd) { - nvlist_t *nvl; - int ret; + struct snl_writer nw; + struct snl_errmsg_data e = {}; + struct pfctl_nl_clear_states attrs = {}; + struct nlmsghdr *hdr; + uint32_t seq_id; + int family_id; - nvl = nvlist_create(0); + family_id = snl_get_genl_family(&h->ss, PFNL_FAMILY_NAME); + if (family_id == 0) + return (ENOTSUP); - pfctl_nv_add_state_cmp(nvl, "cmp", &kill->cmp); - nvlist_add_number(nvl, "af", kill->af); - nvlist_add_number(nvl, "proto", kill->proto); - pfctl_nv_add_rule_addr(nvl, "src", &kill->src); - pfctl_nv_add_rule_addr(nvl, "dst", &kill->dst); - pfctl_nv_add_rule_addr(nvl, "rt_addr", &kill->rt_addr); - nvlist_add_string(nvl, "ifname", kill->ifname); - nvlist_add_string(nvl, "label", kill->label); - nvlist_add_bool(nvl, "kill_match", kill->kill_match); - nvlist_add_bool(nvl, "nat", kill->nat); - - if ((ret = pfctl_do_ioctl(dev, ioctlval, 1024, &nvl)) != 0) - goto out; + snl_init_writer(&h->ss, &nw); + hdr = snl_create_genl_msg_request(&nw, family_id, cmd); + hdr->nlmsg_flags |= NLM_F_DUMP; + + snl_add_msg_attr_u64(&nw, PF_CS_CMP_ID, kill->cmp.id); + snl_add_msg_attr_u32(&nw, PF_CS_CMP_CREATORID, htonl(kill->cmp.creatorid)); + snl_add_msg_attr_u8(&nw, PF_CS_CMP_DIR, kill->cmp.direction); + snl_add_msg_attr_u8(&nw, PF_CS_AF, kill->af); + snl_add_msg_attr_u8(&nw, PF_CS_PROTO, kill->proto); + snl_add_msg_attr_rule_addr(&nw, PF_CS_SRC, &kill->src); + snl_add_msg_attr_rule_addr(&nw, PF_CS_DST, &kill->dst); + snl_add_msg_attr_rule_addr(&nw, PF_CS_RT_ADDR, &kill->rt_addr); + snl_add_msg_attr_string(&nw, PF_CS_IFNAME, kill->ifname); + snl_add_msg_attr_string(&nw, PF_CS_LABEL, kill->label); + snl_add_msg_attr_bool(&nw, PF_CS_KILL_MATCH, kill->kill_match); + snl_add_msg_attr_bool(&nw, PF_CS_NAT, kill->nat); + + if ((hdr = snl_finalize_msg(&nw)) == NULL) + return (ENXIO); + + seq_id = hdr->nlmsg_seq; + + if (! snl_send_message(&h->ss, hdr)) + return (ENXIO); + + while ((hdr = snl_read_reply_multi(&h->ss, seq_id, &e)) != NULL) { + if (! snl_parse_nlmsg(&h->ss, hdr, &clear_states_parser, &attrs)) + continue; + } if (killed) - *killed = nvlist_get_number(nvl, "killed"); + *killed = attrs.killed; + + return (e.error); +} + +int +pfctl_clear_states_h(struct pfctl_handle *h, const struct pfctl_kill *kill, + unsigned int *killed) +{ + return(_pfctl_clear_states_h(h, kill, killed, PFNL_CMD_CLRSTATES)); +} + +int +pfctl_kill_states_h(struct pfctl_handle *h, const struct pfctl_kill *kill, + unsigned int *killed) +{ + return(_pfctl_clear_states_h(h, kill, killed, PFNL_CMD_KILLSTATES)); +} + +static int +_pfctl_clear_states(int dev __unused, const struct pfctl_kill *kill, + unsigned int *killed, uint64_t cmd) +{ + struct pfctl_handle *h; + int ret; + + h = pfctl_open(PF_DEVICE); + if (h == NULL) + return (ENODEV); + + ret = _pfctl_clear_states_h(h, kill, killed, cmd); + pfctl_close(h); -out: - nvlist_destroy(nvl); return (ret); } int -pfctl_clear_states(int dev, const struct pfctl_kill *kill, +pfctl_clear_states(int dev __unused, const struct pfctl_kill *kill, unsigned int *killed) { - return (_pfctl_clear_states(dev, kill, killed, DIOCCLRSTATESNV)); + return (_pfctl_clear_states(dev, kill, killed, PFNL_CMD_CLRSTATES)); } int -pfctl_kill_states(int dev, const struct pfctl_kill *kill, unsigned int *killed) +pfctl_kill_states(int dev __unused, const struct pfctl_kill *kill, unsigned int *killed) { - return (_pfctl_clear_states(dev, kill, killed, DIOCKILLSTATESNV)); + return (_pfctl_clear_states(dev, kill, killed, PFNL_CMD_KILLSTATES)); } int diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h index f05044a9a985..b16caf1f6480 100644 --- a/lib/libpfctl/libpfctl.h +++ b/lib/libpfctl/libpfctl.h @@ -446,6 +446,10 @@ int pfctl_clear_states(int dev, const struct pfctl_kill *kill, unsigned int *killed); int pfctl_kill_states(int dev, const struct pfctl_kill *kill, unsigned int *killed); +int pfctl_clear_states_h(struct pfctl_handle *h, const struct pfctl_kill *kill, + unsigned int *killed); +int pfctl_kill_states_h(struct pfctl_handle *h, const struct pfctl_kill *kill, + unsigned int *killed); int pfctl_clear_rules(int dev, const char *anchorname); int pfctl_clear_nat(int dev, const char *anchorname); int pfctl_clear_eth_rules(int dev, const char *anchorname); diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index c583279750f1..f8ecded066d2 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -545,7 +545,7 @@ pfctl_clear_iface_states(int dev, const char *iface, int opts) if (opts & PF_OPT_KILLMATCH) kill.kill_match = true; - if (pfctl_clear_states(dev, &kill, &killed)) + if (pfctl_clear_states_h(pfh, &kill, &killed)) err(1, "DIOCCLRSTATES"); if ((opts & PF_OPT_QUIET) == 0) fprintf(stderr, "%d states cleared\n", killed); @@ -801,13 +801,13 @@ pfctl_net_kill_states(int dev, const char *iface, int opts) errx(1, "Unknown address family %d", kill.af); - if (pfctl_kill_states(dev, &kill, &newkilled)) + if (pfctl_kill_states_h(pfh, &kill, &newkilled)) err(1, "DIOCKILLSTATES"); killed += newkilled; } freeaddrinfo(res[1]); } else { - if (pfctl_kill_states(dev, &kill, &newkilled)) + if (pfctl_kill_states_h(pfh, &kill, &newkilled)) err(1, "DIOCKILLSTATES"); killed += newkilled; } @@ -873,7 +873,7 @@ pfctl_gateway_kill_states(int dev, const char *iface, int opts) else errx(1, "Unknown address family %d", kill.af); - if (pfctl_kill_states(dev, &kill, &newkilled)) + if (pfctl_kill_states_h(pfh, &kill, &newkilled)) err(1, "DIOCKILLSTATES"); killed += newkilled; } @@ -907,7 +907,7 @@ pfctl_label_kill_states(int dev, const char *iface, int opts) sizeof(kill.label)) errx(1, "label too long: %s", state_kill[1]); - if (pfctl_kill_states(dev, &kill, &killed)) + if (pfctl_kill_states_h(pfh, &kill, &killed)) err(1, "DIOCKILLSTATES"); if ((opts & PF_OPT_QUIET) == 0) @@ -946,7 +946,7 @@ pfctl_id_kill_states(int dev, const char *iface, int opts) usage(); } - if (pfctl_kill_states(dev, &kill, &killed)) + if (pfctl_kill_states_h(pfh, &kill, &killed)) err(1, "DIOCKILLSTATES"); if ((opts & PF_OPT_QUIET) == 0) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index f3a808f8ad26..88fb99ead84e 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2208,6 +2208,9 @@ extern int pf_state_insert(struct pfi_kkif *, struct pf_kstate *); extern struct pf_kstate *pf_alloc_state(int); extern void pf_free_state(struct pf_kstate *); +extern void pf_killstates(struct pf_kstate_kill *, + unsigned int *); +extern unsigned int pf_clear_states(const struct pf_kstate_kill *); static __inline void pf_ref_state(struct pf_kstate *s) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index d83933cd293f..1b22d49a6255 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -227,9 +227,6 @@ struct cdev *pf_dev; * XXX - These are new and need to be checked when moveing to a new version */ static void pf_clear_all_states(void); -static unsigned int pf_clear_states(const struct pf_kstate_kill *); -static void pf_killstates(struct pf_kstate_kill *, - unsigned int *); static int pf_killstates_row(struct pf_kstate_kill *, struct pf_idhash *); static int pf_killstates_nv(struct pfioc_nv *); @@ -5944,7 +5941,7 @@ on_error: return (error); } -static unsigned int +unsigned int pf_clear_states(const struct pf_kstate_kill *kill) { struct pf_state_key_cmp match_key; @@ -6013,7 +6010,7 @@ relock_DIOCCLRSTATES: return (killed); } -static void +void pf_killstates(struct pf_kstate_kill *kill, unsigned int *killed) { struct pf_kstate *s; diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index 120ce88f8720..e4558c156aef 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -782,6 +782,7 @@ static const struct nlattr_parser nla_p_getrules[] = { }; static const struct nlfield_parser nlf_p_getrules[] = { }; +#undef _IN #undef _OUT NL_DECLARE_PARSER(getrules_parser, struct genlmsghdr, nlf_p_getrules, nla_p_getrules); @@ -842,6 +843,8 @@ static const struct nlattr_parser nla_p_getrule[] = { }; static const struct nlfield_parser nlf_p_getrule[] = { }; +#undef _IN +#undef _OUT NL_DECLARE_PARSER(getrule_parser, struct genlmsghdr, nlf_p_getrule, nla_p_getrule); static int @@ -1000,10 +1003,87 @@ out: return (error); } +#define _IN(_field) offsetof(struct genlmsghdr, _field) +#define _OUT(_field) offsetof(struct pf_kstate_kill, _field) +static const struct nlattr_parser nla_p_clear_states[] = { + { .type = PF_CS_CMP_ID, .off = _OUT(psk_pfcmp.id), .cb = nlattr_get_uint64 }, + { .type = PF_CS_CMP_CREATORID, .off = _OUT(psk_pfcmp.creatorid), .cb = nlattr_get_uint32 }, + { .type = PF_CS_CMP_DIR, .off = _OUT(psk_pfcmp.direction), .cb = nlattr_get_uint8 }, + { .type = PF_CS_AF, .off = _OUT(psk_af), .cb = nlattr_get_uint8 }, + { .type = PF_CS_PROTO, .off = _OUT(psk_proto), .cb = nlattr_get_uint8 }, + { .type = PF_CS_SRC, .off = _OUT(psk_src), .arg = &rule_addr_parser, .cb = nlattr_get_nested }, + { .type = PF_CS_DST, .off = _OUT(psk_dst), .arg = &rule_addr_parser, .cb = nlattr_get_nested }, + { .type = PF_CS_RT_ADDR, .off = _OUT(psk_rt_addr), .arg = &rule_addr_parser, .cb = nlattr_get_nested }, + { .type = PF_CS_IFNAME, .off = _OUT(psk_ifname), .arg = (void *)IFNAMSIZ, .cb = nlattr_get_chara }, + { .type = PF_CS_LABEL, .off = _OUT(psk_label), .arg = (void *)PF_RULE_LABEL_SIZE, .cb = nlattr_get_chara }, + { .type = PF_CS_KILL_MATCH, .off = _OUT(psk_kill_match), .cb = nlattr_get_bool }, + { .type = PF_CS_NAT, .off = _OUT(psk_nat), .cb = nlattr_get_bool }, +}; +static const struct nlfield_parser nlf_p_clear_states[] = {}; +#undef _IN +#undef _OUT +NL_DECLARE_PARSER(clear_states_parser, struct genlmsghdr, nlf_p_clear_states, nla_p_clear_states); + +static int +pf_handle_killclear_states(struct nlmsghdr *hdr, struct nl_pstate *npt, int cmd) +{ + struct pf_kstate_kill kill = {}; + struct epoch_tracker et; + struct nl_writer *nw = npt->nw; + struct genlmsghdr *ghdr_new; + int error; + unsigned int killed = 0; + + error = nl_parse_nlmsg(hdr, &clear_states_parser, npt, &kill); + if (error != 0) + return (error); + + if (!nlmsg_reply(nw, hdr, sizeof(struct genlmsghdr))) + return (ENOMEM); + + ghdr_new = nlmsg_reserve_object(nw, struct genlmsghdr); + ghdr_new->cmd = cmd; + ghdr_new->version = 0; + ghdr_new->reserved = 0; + + NET_EPOCH_ENTER(et); + if (cmd == PFNL_CMD_KILLSTATES) + pf_killstates(&kill, &killed); + else + killed = pf_clear_states(&kill); + NET_EPOCH_EXIT(et); + + nlattr_add_u32(nw, PF_CS_KILLED, killed); + + if (! nlmsg_end(nw)) { + error = ENOMEM; + goto out; + } + + return (0); + +out: + nlmsg_abort(nw); + return (error); +} + +static int +pf_handle_clear_states(struct nlmsghdr *hdr, struct nl_pstate *npt) +{ + return (pf_handle_killclear_states(hdr, npt, PFNL_CMD_CLRSTATES)); +} + +static int +pf_handle_kill_states(struct nlmsghdr *hdr, struct nl_pstate *npt) +{ + return (pf_handle_killclear_states(hdr, npt, PFNL_CMD_KILLSTATES)); +} + static const struct nlhdr_parser *all_parsers[] = { &state_parser, &addrule_parser, - &getrules_parser + &getrules_parser, + &clear_states_parser, }; static int family_id; @@ -1058,6 +1138,20 @@ static const struct genl_cmd pf_cmds[] = { .cmd_flags = GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, .cmd_priv = PRIV_NETINET_PF, }, + { + .cmd_num = PFNL_CMD_CLRSTATES, + .cmd_name = "CLRSTATES", + .cmd_cb = pf_handle_clear_states, + .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, + .cmd_priv = PRIV_NETINET_PF, + }, + { + .cmd_num = PFNL_CMD_KILLSTATES, + .cmd_name = "KILLSTATES", + .cmd_cb = pf_handle_kill_states, + .cmd_flags = GENL_CMD_CAP_DO | GENL_CMD_CAP_DUMP | GENL_CMD_CAP_HASPOL, + .cmd_priv = PRIV_NETINET_PF, + }, }; void diff --git a/sys/netpfil/pf/pf_nl.h b/sys/netpfil/pf/pf_nl.h index 51df8b7aece9..0ae4a9283072 100644 --- a/sys/netpfil/pf/pf_nl.h +++ b/sys/netpfil/pf/pf_nl.h @@ -43,6 +43,8 @@ enum { PFNL_CMD_ADDRULE = 5, PFNL_CMD_GETRULES = 6, PFNL_CMD_GETRULE = 7, + PFNL_CMD_CLRSTATES = 8, + PFNL_CMD_KILLSTATES = 9, __PFNL_CMD_MAX, }; #define PFNL_CMD_MAX (__PFNL_CMD_MAX -1) @@ -262,6 +264,23 @@ enum pf_getrules_type_t { PF_GR_CLEAR = 5, /* u8 */ }; +enum pf_clear_states_type_t { + PF_CS_UNSPEC, + PF_CS_CMP_ID = 1, /* u64 */ + PF_CS_CMP_CREATORID = 2, /* u32 */ + PF_CS_CMP_DIR = 3, /* u8 */ + PF_CS_AF = 4, /* u8 */ + PF_CS_PROTO = 5, /* u8 */ + PF_CS_SRC = 6, /* nested, pf_addr_wrap */ + PF_CS_DST = 7, /* nested, pf_addr_wrap */ + PF_CS_RT_ADDR = 8, /* nested, pf_addr_wrap */ + PF_CS_IFNAME = 9, /* string */ + PF_CS_LABEL = 10, /* string */ + PF_CS_KILL_MATCH = 11, /* bool */ + PF_CS_NAT = 12, /* bool */ + PF_CS_KILLED = 13, /* u32 */ +}; + #ifdef _KERNEL void pf_nl_register(void); From nobody Wed Feb 28 22:33:07 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlTdb4FpBz5CXVS; Wed, 28 Feb 2024 22:33:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TlTdb3RtRz4pcY; Wed, 28 Feb 2024 22:33:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709159587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XqDAkahlxRNV8XmVNWJJ7bizh1zL7oZzR7hiUW3e2gI=; b=BGlXwE/vG7yDmbsgy3wb3n+Nytm9wx63nCVVfq8XXzUdjcIWMbGhtk4X4TBuauaJPiN245 BNJQ97L4OuCz5NiRxKcOeGeQ7Nqt1DU6r30idWXMWV0zoFjUqLEFtiwlKaZWlkr5sUbvfC ZZCrPTBdIQOzp+v24TlscXqQNp7+KBN00Qq8ea+J68qjk/rHGlKnD0WAyZzWExOnO57yKH eoo6uUFWcWLgm1nashhXJpK7JlXZdhmip18UzKEabcctz1aX8o57b6qgm8YsVRvdVfKAs6 onFxZ2UI4YZSnxi9rTquPHlHyCHmrRmT3g2usumeaygjjIu4Tj4BqMU+FDDcaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709159587; a=rsa-sha256; cv=none; b=jN5wk6uBzd6+KdH33sflaZW7Hp16VUnjNHqHohuS3EPIdbRV8VxBAHAi8UvIrNoYoBx3U1 y0pnPKsQRJSELDN35I5o5htstskEmUUodKjkN4uTiZgBZ1J8PGmxuitMIWR6RyeaHkn7Tv 2GeidmwVqhhfaMOghAu++cpEtBXM0/2aJ2jPlQPu4oNXUurKFIlhked/Jv+q3BThNekQo4 8DBidwAjwqVX+3ruuLnK6OKScG8cu60sFacT+AEKJ1Y48j3hCJDZCSgT8yNAH42eVu8ADG dGswMIIGVMNvWqm19zT8xVgMVX2FZtdI5FXPKr7CRjipGClnXF0JHMoLZeTqbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709159587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XqDAkahlxRNV8XmVNWJJ7bizh1zL7oZzR7hiUW3e2gI=; b=gx0uT/U7+/6pMiWVCYSUf7pVBYeZJjBbvrdOQr9myhRxfg9sESaCSI9ccBP+TUQjAaMOLC 2nG9RWA/VqWqevhL3+g2/+t/AvwE1n+WVQuXf8nbH/fmFQOe18w6u4EiBPG+tPHLIoP+SJ ubyBKyLqV6ihsKN3pL8M8VWQDYfvdEatZ9bR1eq0IO6iHroiy+ujcwF8GTjVILXoxoSSH/ tgx8Y2ve2bQ2Az/Th/TQGfbEnQrg8m0JF0qXFzD/TDxPOz8rkZUQebhhvbYZ7ICTgGKtBl QiMk2NhK97O3cLv5x/3e6xls+XrKLLV9IjDoR8E8B8FUk+HW8bDvmf2GJZA4bQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlTdb33D1zGDp; Wed, 28 Feb 2024 22:33: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 41SMX74t010846; Wed, 28 Feb 2024 22:33:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41SMX7jv010843; Wed, 28 Feb 2024 22:33:07 GMT (envelope-from git) Date: Wed, 28 Feb 2024 22:33:07 GMT Message-Id: <202402282233.41SMX7jv010843@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 152a6d410e47 - main - socket tests: remove MSG_TRUNC test for unix/seqpacket List-Id: Commit messages for the main 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 152a6d410e47a818fae905f6f4bd43f422146802 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=152a6d410e47a818fae905f6f4bd43f422146802 commit 152a6d410e47a818fae905f6f4bd43f422146802 Author: Gleb Smirnoff AuthorDate: 2024-02-28 22:32:46 +0000 Commit: Gleb Smirnoff CommitDate: 2024-02-28 22:32:46 +0000 socket tests: remove MSG_TRUNC test for unix/seqpacket The PF_UNIX/SOCK_SEQPACKET was marked as PR_ATOMIC and that made soreceive_generic() to treat it pretty much as a datagram socket. However, POSIX says: The SOCK_SEQPACKET socket type is similar to the SOCK_STREAM type, and is also connection-oriented. The only difference between these types is that record boundaries are maintained using the SOCK_SEQPACKET type. A record can be sent using one or more output operations and received using one or more input operations, but a single operation never transfers parts of more than one record. Record boundaries are visible to the receiver via the MSG_EOR flag in the received message flags returned by the recvmsg() function. It is protocol-specific whether a maximum record size is imposed. What the test was doing is checking if MSG_TRUNC would report the space required to return up the end of next mbuf record in the socket buffer. Apparently the test assumed that this boundary is defined by the write(2) size on the peer socket. This was true in test conditions, but I'm not sure it would always be true - sbcompress() may merge mbufs. Anyway, the mbuf boundaries are internal socket buffer implementation, they are not SOCK_SEQPACKET records. The records need to be explicitly marked with MSG_EOR by sender, and the test definitely wasn't doing that. Reviewed by: tuexen, markj Differential Revision: https://reviews.freebsd.org/D43707 --- tests/sys/kern/socket_msg_trunc.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/tests/sys/kern/socket_msg_trunc.c b/tests/sys/kern/socket_msg_trunc.c index b0ea724f0de0..bf1f0bf8ff42 100644 --- a/tests/sys/kern/socket_msg_trunc.c +++ b/tests/sys/kern/socket_msg_trunc.c @@ -153,39 +153,6 @@ ATF_TC_BODY(recv_trunc_afunix_dgram, tc) check_recvmsg(cs, ss, sa, sizes, nitems(sizes)); } -ATF_TC_WITHOUT_HEAD(recv_trunc_afunix_seqpacket); -ATF_TC_BODY(recv_trunc_afunix_seqpacket, tc) -{ - struct sockaddr_un sun; - struct sockaddr *sa; - int ss, nss, cs, rc; - - ss = socket(PF_UNIX, SOCK_SEQPACKET, 0); - ATF_REQUIRE(ss >= 0); - - bzero(&sun, sizeof(sun)); - sun.sun_family = AF_UNIX; - strlcpy(sun.sun_path, "test_check_recvmsg_socket", sizeof(sun.sun_path)); - sun.sun_len = sizeof(sun); - sa = (struct sockaddr *)&sun; - rc = bind(ss, sa, sa->sa_len); - ATF_REQUIRE_MSG(rc == 0, "bind failed: %s", strerror(errno)); - rc = listen(ss, 1); - ATF_REQUIRE_MSG(rc == 0, "listen failed: %s", strerror(errno)); - - cs = socket(PF_UNIX, SOCK_SEQPACKET, 0); - ATF_REQUIRE(cs >= 0); - rc = connect(cs, sa, sa->sa_len); - ATF_REQUIRE_MSG(rc == 0, "connect failed: %s", strerror(errno)); - nss = accept(ss, NULL, NULL); - ATF_REQUIRE(nss >= 0); - - size_t sizes[] = {80, 255, 256, 1024, 2000}; - check_recvmsg(cs, nss, sa, sizes, nitems(sizes)); - - ATF_REQUIRE(close(ss) == 0); -} - /* * Exercise the case where ktrace was used to dump a truncated buffer. */ @@ -245,7 +212,6 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, recv_trunc_afinet_udp); ATF_TP_ADD_TC(tp, recv_trunc_afinet6_udp); ATF_TP_ADD_TC(tp, recv_trunc_afunix_dgram); - ATF_TP_ADD_TC(tp, recv_trunc_afunix_seqpacket); ATF_TP_ADD_TC(tp, recvmsg_trunc_ktrace_uio); return (atf_no_error()); From nobody Wed Feb 28 22:33:08 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlTdc5VKgz5CXXq; Wed, 28 Feb 2024 22:33: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 4TlTdc4Pnjz4pjR; Wed, 28 Feb 2024 22:33:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709159588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VwvxG1qlRoc897vlRr5L+AOqUJIketSH+yyhyvJS6PI=; b=ltrJM43+iMW6QqHRaJwhzEwsmPyYDIE3Oth7Kf9Tmgip9/zir7KwymSOE92c3+XmidZ0qS GtCtTT5Ec9QFLzAYnWF9AwcuU9P+222dqm4p+u8/Pog6u617A6HKgp478G1wOl+QsTcf8l zCvId1RcnZv1313Fy2Wz5hkGdZZ6/kyR87gr/6b8Aj98ggpb0Q+lxOWqiggoUhhr8VNguf nAfwmXrGXeKeFqNy5oq7ZGZ2TySct6tsZEattd51c9xwOnchg0Z9bjasZJTsev1p4SxPlA 5dSJjaiox/llvch6GoYogpCTz1JU/WBMkqNRbsQoiRTJYGrQiKDAhgES3u8reg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709159588; a=rsa-sha256; cv=none; b=kIfTuOHgIN30FJJS/p8bdlsC8UGgxNJ4pcekymCaGbUYstxE38FWsd93N1FY7WA4FDfjUt IhRErz9rSfOP9JMAJjAARNOM9dxElL/hiV2d12p7a1M3+UW99P02bwGA+/fVGwwsG9rcuX ah6WHtHKdgS74+aKr67O94U4H2GSLhnvszp3U+OBUx/ksJGb2+Gj1dMI52MVs34SlhKXJ4 jvsEqe7qLBsePTYs9/9CyrL/im/8PSV1lXcalYM3NN4ezshHuzfA+Yn9UDqiFItozvKNdO G9p5vTEX/Dlq3fTjWHOWN2eRKpGwHRRNv2rhyfdCQfNzw7klvts583fKBQsKeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709159588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VwvxG1qlRoc897vlRr5L+AOqUJIketSH+yyhyvJS6PI=; b=k0OHNVBKqNu2GZZ8HjgF496RooLjwdZWA9kYqLFAs7ei3L9+P3vUJfyhzk6U/FEDzQ04ud cDvqDVN6PZDF1V4MD+SGhXB5vM42VyeVIkPiqfBrPNDO4g7bCt/r8i6gwWsU1+gZD/erWB qbLWs61wakvtuzOG9HW+YYvwZbQDhc0lnK4RdeFeSbPTCd7xfMdy1aJTqBK92XxDG0F9EF 8Xuou3KBy6KU9bHdVDERWjlP+Sxe6hiU4wWcJ65xi4MwXDqEV7zFmioTMu7NPW3dDcmE8z OiOEEtVnGhHvqB4Jc0gze+9Euo+O6HYe+vEYBgE6u/h39e4L+KYAb/mcL5v3bg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlTdc3zVfzG34; Wed, 28 Feb 2024 22:33: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 41SMX8ZR010894; Wed, 28 Feb 2024 22:33:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41SMX8Sc010891; Wed, 28 Feb 2024 22:33:08 GMT (envelope-from git) Date: Wed, 28 Feb 2024 22:33:08 GMT Message-Id: <202402282233.41SMX8Sc010891@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: d6ef9649dd92 - main - tests/unix_seqpacket: remove EMSGSIZE tests List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d6ef9649dd924f12974d66a0c29a4ede71407e7d Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=d6ef9649dd924f12974d66a0c29a4ede71407e7d commit d6ef9649dd924f12974d66a0c29a4ede71407e7d Author: Gleb Smirnoff AuthorDate: 2024-02-28 22:32:46 +0000 Commit: Gleb Smirnoff CommitDate: 2024-02-28 22:32:46 +0000 tests/unix_seqpacket: remove EMSGSIZE tests These tests were not testing conformance to the specification, rather than the limitation of our implementation. The specification doesn't say that a SOCK_SEQPACKET shall ever return EMSGSIZE. It says: The SOCK_SEQPACKET socket type is similar to the SOCK_STREAM type, and is also connection-oriented. The only difference between these types is that record boundaries are maintained using the SOCK_SEQPACKET type. A record can be sent using one or more output operations and received using one or more input operations, but a single operation never transfers parts of more than one record. Record boundaries are visible to the receiver via the MSG_EOR flag in the received message flags returned by the recvmsg() function. It is protocol-specific whether a maximum record size is imposed. The EMSGSIZE is specified as 'message is too large to be sent all at once, as the socket requires'. Indeed existing implementation that has unix/seqpacket marked as PR_ATOMIC has such a limitation. But future implementation won't have, thus remove the tests. Reviewed by: tuexen, asomers Differential Revision: https://reviews.freebsd.org/D43756 --- tests/sys/kern/unix_seqpacket_test.c | 61 ------------------------------------ 1 file changed, 61 deletions(-) diff --git a/tests/sys/kern/unix_seqpacket_test.c b/tests/sys/kern/unix_seqpacket_test.c index a2604d065024..be273fbe1246 100644 --- a/tests/sys/kern/unix_seqpacket_test.c +++ b/tests/sys/kern/unix_seqpacket_test.c @@ -868,65 +868,6 @@ ATF_TC_BODY(send_recv_nonblocking, tc) close(sv[1]); } -/* - * We should get EMSGSIZE if we try to send a message larger than the socket - * buffer, with blocking sockets - */ -ATF_TC_WITHOUT_HEAD(emsgsize); -ATF_TC_BODY(emsgsize, tc) -{ - int sv[2]; - const int sndbufsize = 8192; - const int rcvbufsize = 8192; - const size_t pktsize = (sndbufsize + rcvbufsize) * 2; - char sndbuf[pktsize]; - ssize_t ssize; - - /* setup the socket pair */ - do_socketpair(sv); - /* Setup the buffers */ - ATF_REQUIRE_EQ(0, setsockopt(sv[0], SOL_SOCKET, SO_SNDBUF, &sndbufsize, - sizeof(sndbufsize))); - ATF_REQUIRE_EQ(0, setsockopt(sv[1], SOL_SOCKET, SO_RCVBUF, &rcvbufsize, - sizeof(rcvbufsize))); - - ssize = send(sv[0], sndbuf, pktsize, MSG_EOR); - ATF_CHECK_EQ(EMSGSIZE, errno); - ATF_CHECK_EQ(-1, ssize); - close(sv[0]); - close(sv[1]); -} - -/* - * We should get EMSGSIZE if we try to send a message larger than the socket - * buffer, with nonblocking sockets - */ -ATF_TC_WITHOUT_HEAD(emsgsize_nonblocking); -ATF_TC_BODY(emsgsize_nonblocking, tc) -{ - int sv[2]; - const int sndbufsize = 8192; - const int rcvbufsize = 8192; - const size_t pktsize = (sndbufsize + rcvbufsize) * 2; - char sndbuf[pktsize]; - ssize_t ssize; - - /* setup the socket pair */ - do_socketpair_nonblocking(sv); - /* Setup the buffers */ - ATF_REQUIRE_EQ(0, setsockopt(sv[0], SOL_SOCKET, SO_SNDBUF, &sndbufsize, - sizeof(sndbufsize))); - ATF_REQUIRE_EQ(0, setsockopt(sv[1], SOL_SOCKET, SO_RCVBUF, &rcvbufsize, - sizeof(rcvbufsize))); - - ssize = send(sv[0], sndbuf, pktsize, MSG_EOR); - ATF_CHECK_EQ(EMSGSIZE, errno); - ATF_CHECK_EQ(-1, ssize); - close(sv[0]); - close(sv[1]); -} - - /* * We should get EAGAIN if we try to send a message larger than the socket * buffer, with nonblocking sockets. Test with several different sockbuf sizes @@ -1160,8 +1101,6 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, sendto_recvfrom); ATF_TP_ADD_TC(tp, shutdown_send); ATF_TP_ADD_TC(tp, shutdown_send_sigpipe); - ATF_TP_ADD_TC(tp, emsgsize); - ATF_TP_ADD_TC(tp, emsgsize_nonblocking); ATF_TP_ADD_TC(tp, eagain_8k_8k); ATF_TP_ADD_TC(tp, eagain_8k_128k); ATF_TP_ADD_TC(tp, eagain_128k_8k); From nobody Wed Feb 28 22:33:09 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlTdf0JF6z5CXxS; Wed, 28 Feb 2024 22:33:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TlTdd587Wz4pcw; Wed, 28 Feb 2024 22:33:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709159589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g1Bezhb2nZzRt//T/mVdRvm71n5oOTrM0jXVp97LVqQ=; b=g5ajyoUmFuS/7AdMrhKQX7xwykk7hXdqT4cZPwJtAq8y7KXt5hxOdDiSLy3vaaW2M+6RWe O2IVYQ+LgJEkQiRkfIjrQCvjjq7wqfyJ9tSWR+uh/LztoWPdEXOFuR5dd8sRtvrVPF3vb4 QfW/A3lxhLySFsleqy+RyHEhMgPVx8D9JTNN6ogfowlIqppOI8WAbwN4FJVof1TdgsE5iQ jYVoHhGCp4R9fOeqJBAMlQz+a+tNcC3dGE3OwaxI2twv4kPYLw1NDjPp2IM8TvGpbhPr/i 0LMQyoaFFJdnqEyEjsXNF4oMJm7TKFOUlrEQidvEjmxe9ucoWQrMPVbkQJjsQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709159589; a=rsa-sha256; cv=none; b=GUhlSsUQXiuvth2F6hEW/9SVcgn1BDJ5xcge8oM9ZBjevldPYOMzGPVr7M2cWReq71zLP3 WeunpytxbameM253Efwt6e8fpk0SIOTxa/Eis0Cj6d+4iMx4ULkIRzTYZmng0RmJCOcACQ ybBw39bL8EaiJ1vaH92IwbH0y/MM6xnZMHouRVqK37hevQ9erOoXOdSeB5oeBXDriNrJ1i KF4IIas9itFrR12k9mktv4dGhIIc4lWxihGN810XksdxcMRjNmuFnJH2PFEREN6uQslFh8 SWte5CMoi5+QiYDWewMDmxxxciYWEIh3nyP7DaldTHAczQstU4dpUVwUGx1ekw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709159589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g1Bezhb2nZzRt//T/mVdRvm71n5oOTrM0jXVp97LVqQ=; b=TW9qDDui1ua03YfgF6ysVTWIkHUwQ8XC656EDS+KMWJbg3jrCUkuwwUNIJjgPm1M/tmAgq tYXJ23B0HvEFYIyni0HNwXtFRlaMQ2ff6c488WbNpBd6ZMTFnJ/CyQHbZ8Q79oKliaERzx fVkC17MmdrxOUQwO2G0sJVXiEZqvP1zm4d93DBciJresGliSW0DgrfSbanSDY0DXhdOyOj LwYvsq4h+hW4OFA7lyrtNVTQwxWy8EYldekwQsmMu6hMlcnSXWBunD8VwodywqllLbE1ol ItN2EU4dSOdFx2iN+EMI4xPTFAnRRDEL3uvh3qUr7S1kCs+9wVtDsIoptlyo/Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlTdd4jcyzGDq; Wed, 28 Feb 2024 22:33: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 41SMX9xx010953; Wed, 28 Feb 2024 22:33:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41SMX9Mc010951; Wed, 28 Feb 2024 22:33:09 GMT (envelope-from git) Date: Wed, 28 Feb 2024 22:33:09 GMT Message-Id: <202402282233.41SMX9Mc010951@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 1f46c32c1f3d - main - tests/unix_seqpacket: provide function that returns bound & listening sock List-Id: Commit messages for the main 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1f46c32c1f3d0ea2a4c748a24aad06329cfb5f5a Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=1f46c32c1f3d0ea2a4c748a24aad06329cfb5f5a commit 1f46c32c1f3d0ea2a4c748a24aad06329cfb5f5a Author: Gleb Smirnoff AuthorDate: 2024-02-28 22:32:46 +0000 Commit: Gleb Smirnoff CommitDate: 2024-02-28 22:32:46 +0000 tests/unix_seqpacket: provide function that returns bound & listening sock Use the function in mk_pair_of_sockets(), and in four existing tests - 'listen_bound', 'connect', 'shutdown_send' and 'shutdown_send_sigpipe'. While here make mk_pair_of_sockets() return pointer to sockaddr_un instead of path. This also fixes bug of returning pointer to stack memory of returning function. However, the only caller that cares about this return is temporarily ifdefed out. No functional change intended. Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D43852 --- tests/sys/kern/unix_seqpacket_test.c | 131 ++++++++++++++--------------------- 1 file changed, 52 insertions(+), 79 deletions(-) diff --git a/tests/sys/kern/unix_seqpacket_test.c b/tests/sys/kern/unix_seqpacket_test.c index be273fbe1246..3ea7bb3ea165 100644 --- a/tests/sys/kern/unix_seqpacket_test.c +++ b/tests/sys/kern/unix_seqpacket_test.c @@ -68,32 +68,50 @@ do_socketpair_nonblocking(int *sv) } /* - * Returns a pair of sockets made the hard way: bind, listen, connect & accept + * Returns a bound and listening socket. * @return const char* The path to the socket */ -static const char* -mk_pair_of_sockets(int *sv) +static const struct sockaddr_un * +mk_listening_socket(int *sv) { - struct sockaddr_un sun; /* ATF's isolation mechanisms will guarantee uniqueness of this file */ - const char *path = "sock"; - int s, err, s2, s1; + static const struct sockaddr_un sun = { + .sun_family = AF_LOCAL, + .sun_len = sizeof(sun), + .sun_path = "sock", + }; + int s, r, l; s = socket(PF_LOCAL, SOCK_SEQPACKET, 0); ATF_REQUIRE(s >= 0); - bzero(&sun, sizeof(sun)); - sun.sun_family = AF_LOCAL; - sun.sun_len = sizeof(sun); - strlcpy(sun.sun_path, path, sizeof(sun.sun_path)); - err = bind(s, (struct sockaddr *)&sun, sizeof(sun)); - err = listen(s, -1); - ATF_CHECK_EQ(0, err); + r = bind(s, (struct sockaddr *)&sun, sizeof(sun)); + l = listen(s, -1); + ATF_CHECK_EQ(0, r); + ATF_CHECK_EQ(0, l); + + if (sv != NULL) + *sv = s; + + return (&sun); +} + +/* + * Returns a pair of sockets made the hard way: bind, listen, connect & accept + * @return const char* The path to the socket + */ +static const struct sockaddr_un * +mk_pair_of_sockets(int *sv) +{ + const struct sockaddr_un *sun; + int s, s2, err, s1; + + sun = mk_listening_socket(&s); /* Create the other socket */ s2 = socket(PF_LOCAL, SOCK_SEQPACKET, 0); ATF_REQUIRE(s2 >= 0); - err = connect(s2, (struct sockaddr*)&sun, sizeof(sun)); + err = connect(s2, (struct sockaddr *)sun, sizeof(*sun)); if (err != 0) { perror("connect"); atf_tc_fail("connect(2) failed"); @@ -106,12 +124,14 @@ mk_pair_of_sockets(int *sv) atf_tc_fail("accept(2) failed"); } - sv[0] = s1; - sv[1] = s2; + if (sv != NULL) { + sv[0] = s1; + sv[1] = s2; + } close(s); - return (path); + return (sun); } static volatile sig_atomic_t got_sigpipe = 0; @@ -454,22 +474,9 @@ ATF_TC_BODY(bind, tc) ATF_TC_WITHOUT_HEAD(listen_bound); ATF_TC_BODY(listen_bound, tc) { - struct sockaddr_un sun; - /* ATF's isolation mechanisms will guarantee uniqueness of this file */ - const char *path = "sock"; - int s, r, l; - - s = socket(PF_LOCAL, SOCK_SEQPACKET, 0); - ATF_REQUIRE(s >= 0); + int s; - bzero(&sun, sizeof(sun)); - sun.sun_family = AF_LOCAL; - sun.sun_len = sizeof(sun); - strlcpy(sun.sun_path, path, sizeof(sun.sun_path)); - r = bind(s, (struct sockaddr *)&sun, sizeof(sun)); - l = listen(s, -1); - ATF_CHECK_EQ(0, r); - ATF_CHECK_EQ(0, l); + (void)mk_listening_socket(&s); close(s); } @@ -477,27 +484,15 @@ ATF_TC_BODY(listen_bound, tc) ATF_TC_WITHOUT_HEAD(connect); ATF_TC_BODY(connect, tc) { - struct sockaddr_un sun; - /* ATF's isolation mechanisms will guarantee uniqueness of this file */ - const char *path = "sock"; - int s, r, err, l, s2; + const struct sockaddr_un *sun; + int s, err, s2; - s = socket(PF_LOCAL, SOCK_SEQPACKET, 0); - ATF_REQUIRE(s >= 0); - - bzero(&sun, sizeof(sun)); - sun.sun_family = AF_LOCAL; - sun.sun_len = sizeof(sun); - strlcpy(sun.sun_path, path, sizeof(sun.sun_path)); - r = bind(s, (struct sockaddr *)&sun, sizeof(sun)); - l = listen(s, -1); - ATF_CHECK_EQ(0, r); - ATF_CHECK_EQ(0, l); + sun = mk_listening_socket(&s); /* Create the other socket */ s2 = socket(PF_LOCAL, SOCK_SEQPACKET, 0); ATF_REQUIRE(s2 >= 0); - err = connect(s2, (struct sockaddr*)&sun, sizeof(sun)); + err = connect(s2, (struct sockaddr *)sun, sizeof(*sun)); if (err != 0) { perror("connect"); atf_tc_fail("connect(2) failed"); @@ -670,7 +665,7 @@ ATF_TC_WITHOUT_HEAD(sendto_recvfrom); ATF_TC_BODY(sendto_recvfrom, tc) { #ifdef TEST_SEQ_PACKET_SOURCE_ADDRESS - const char* path; + const sockaddr_un *sun; #endif struct sockaddr_storage from; int sv[2]; @@ -683,7 +678,7 @@ ATF_TC_BODY(sendto_recvfrom, tc) /* setup the socket pair */ #ifdef TEST_SEQ_PACKET_SOURCE_ADDRESS - path = + sun = #endif mk_pair_of_sockets(sv); @@ -714,7 +709,7 @@ ATF_TC_BODY(sendto_recvfrom, tc) * these checks may be reenabled */ ATF_CHECK_EQ(PF_LOCAL, from.ss_family); - ATF_CHECK_STREQ(path, ((struct sockaddr_un*)&from)->sun_path); + ATF_CHECK_STREQ(sun->sun_path, ((struct sockaddr_un*)&from)->sun_path); #endif close(sv[0]); close(sv[1]); @@ -756,28 +751,17 @@ ATF_TC_BODY(send_recv_with_connect, tc) ATF_TC_WITHOUT_HEAD(shutdown_send); ATF_TC_BODY(shutdown_send, tc) { - struct sockaddr_un sun; - /* ATF's isolation mechanisms will guarantee uniqueness of this file */ - const char *path = "sock"; + const struct sockaddr_un *sun; const char *data = "data"; ssize_t datalen, ssize; int s, err, s2; - s = socket(PF_LOCAL, SOCK_SEQPACKET, 0); - ATF_REQUIRE(s >= 0); - - bzero(&sun, sizeof(sun)); - sun.sun_family = AF_LOCAL; - sun.sun_len = sizeof(sun); - strlcpy(sun.sun_path, path, sizeof(sun.sun_path)); - err = bind(s, (struct sockaddr *)&sun, sizeof(sun)); - err = listen(s, -1); - ATF_CHECK_EQ(0, err); + sun = mk_listening_socket(&s); /* Create the other socket */ s2 = socket(PF_LOCAL, SOCK_SEQPACKET, 0); ATF_REQUIRE(s2 >= 0); - err = connect(s2, (struct sockaddr*)&sun, sizeof(sun)); + err = connect(s2, (struct sockaddr *)sun, sizeof(*sun)); if (err != 0) { perror("connect"); atf_tc_fail("connect(2) failed"); @@ -797,28 +781,17 @@ ATF_TC_BODY(shutdown_send, tc) ATF_TC_WITHOUT_HEAD(shutdown_send_sigpipe); ATF_TC_BODY(shutdown_send_sigpipe, tc) { - struct sockaddr_un sun; - /* ATF's isolation mechanisms will guarantee uniqueness of this file */ - const char *path = "sock"; + const struct sockaddr_un *sun; const char *data = "data"; ssize_t datalen; int s, err, s2; - s = socket(PF_LOCAL, SOCK_SEQPACKET, 0); - ATF_REQUIRE(s >= 0); - - bzero(&sun, sizeof(sun)); - sun.sun_family = AF_LOCAL; - sun.sun_len = sizeof(sun); - strlcpy(sun.sun_path, path, sizeof(sun.sun_path)); - err = bind(s, (struct sockaddr *)&sun, sizeof(sun)); - err = listen(s, -1); - ATF_CHECK_EQ(0, err); + sun = mk_listening_socket(&s); /* Create the other socket */ s2 = socket(PF_LOCAL, SOCK_SEQPACKET, 0); ATF_REQUIRE(s2 >= 0); - err = connect(s2, (struct sockaddr*)&sun, sizeof(sun)); + err = connect(s2, (struct sockaddr *)sun, sizeof(*sun)); if (err != 0) { perror("connect"); atf_tc_fail("connect(2) failed"); From nobody Wed Feb 28 22:33:10 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlTdg2nBCz5CXvt; Wed, 28 Feb 2024 22:33:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TlTdf6WqQz4q56; Wed, 28 Feb 2024 22:33:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709159590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kf3zqvnylMhB5Wqbij4Ei2K1VuQvR3TykvvGq4aFLYQ=; b=w9mvRkvAcpqwmjWriAjJjjrw5bI/uvv3j87IkmCidFnVmyky00cVkB17VC8e+bGYNG03Ha O2DfLszPSqzZRE4xTr6ptY3fOTn4TviVyGj4MSUxjeD32ypJtHJKTXmjjSJr7Yt9q3vFbw EZL+8Zo1/dQTs9ep0joxNxBHAZs0zx/f9I0ZXXuXzuJPtul6MBfccz3+bd12s/qd7MQE3b 2zwf5fvzDrX/y3Wo0p0a31d6WktvD6cIkSS6uPCK+GSY9NZoXDnFsxPL9uD/2i9WvTYXhw DTUDg1MdvFr6jYXo+TSO/vZAF8eD8+rNBUGJIK+TgxM6koGqVtWRmrqFbeqS0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709159590; a=rsa-sha256; cv=none; b=EvqQyZCf+IzgkkDbnXkJY4JCmErVKqMIz5c29gXx5DpCqn1vf3vXm9Msr69J/I8rUQCMvr kkoh6ErARz68KRcwa346leob7R9s5V2aYaGSZAxVeUTpEV5rvuSpgneNBzaKHLfaf+vdbf 8mY1o663B0FpzkvPxPdGBk/bu10P6iAQD7D1V8oB0/2zHyq2HUqY/YGe0PD7HHODgvCeWc eJHyQHio+zdbGGJi4fpmb6XWiBzD3TVxEQn6XhJRwndZQU1FBtaOFpAZVmJMU5PM//g7aV xrEUyAkr/AUZnr9cmUdhjBE6uK3t0UxVqg7BLSw7l61tAN/yVEw5ZmFCKYblKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709159590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kf3zqvnylMhB5Wqbij4Ei2K1VuQvR3TykvvGq4aFLYQ=; b=Acc7wtLYhd3NWzRJW+Xslw9biuZDu362JCUcQMHJXPNzX/WvK/pZaNCovXXkiIuvAmpg4X eL+5JH/KraPFmoGM7S/Abhuoq9wXaYpHwftOWaE8f/WLyGxTU9BkgauLgS3qVVGpZa33e8 LGGRjeOTa8xY48+MSa8xWGStpy/LTfaQ0lqweoU0ccIngRWqJwRTKEjiJx89CRe/dNUClz +HVnK2OirrkJ3+d+Bn1prQ2p2uI8+R8XW9H2XHoEnGRfNnB4yLvgQoWY/oE/lKaD3NUJ5d vA/2iIa4uhADmb0CALdqB62FmSxl9k513KZkSFrwhr6C6Vm8nk7t8WeVWhuLsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlTdf61ZgzGBn; Wed, 28 Feb 2024 22:33: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 41SMXAmx011010; Wed, 28 Feb 2024 22:33:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41SMXAYv011007; Wed, 28 Feb 2024 22:33:10 GMT (envelope-from git) Date: Wed, 28 Feb 2024 22:33:10 GMT Message-Id: <202402282233.41SMXAYv011007@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 3bc122d27064 - main - tests/unix_seqpacket: test that data can be sent before accept(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=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3bc122d27064957911570c1037e6b644b7303c17 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=3bc122d27064957911570c1037e6b644b7303c17 commit 3bc122d27064957911570c1037e6b644b7303c17 Author: Gleb Smirnoff AuthorDate: 2024-02-28 22:32:46 +0000 Commit: Gleb Smirnoff CommitDate: 2024-02-28 22:32:46 +0000 tests/unix_seqpacket: test that data can be sent before accept(2) This is undocumented feature of PF_UNIX/SOCK_STREAM and thus of PF_UNIX/SOCK_SEQPACKET, too. Put the test into this file, since this file is most advanced and has all primitives to write this test in minimum number of lines. Differential Revision: https://reviews.freebsd.org/D43853 --- tests/sys/kern/unix_seqpacket_test.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/sys/kern/unix_seqpacket_test.c b/tests/sys/kern/unix_seqpacket_test.c index 3ea7bb3ea165..cde427401970 100644 --- a/tests/sys/kern/unix_seqpacket_test.c +++ b/tests/sys/kern/unix_seqpacket_test.c @@ -501,6 +501,32 @@ ATF_TC_BODY(connect, tc) close(s2); } +/* + * An undocumented feature that we probably want to preserve: sending to + * a socket that isn't yet accepted lands data on the socket. It can be + * read after accept(2). + */ +ATF_TC_WITHOUT_HEAD(send_before_accept); +ATF_TC_BODY(send_before_accept, tc) +{ + const char buf[] = "hello"; + char repl[sizeof(buf)]; + const struct sockaddr_un *sun; + int l, s, a; + + sun = mk_listening_socket(&l); + + ATF_REQUIRE((s = socket(PF_LOCAL, SOCK_SEQPACKET, 0)) > 0); + ATF_REQUIRE(connect(s, (struct sockaddr *)sun, sizeof(*sun)) == 0); + ATF_REQUIRE(send(s, &buf, sizeof(buf), 0) == sizeof(buf)); + ATF_REQUIRE((a = accept(l, NULL, NULL)) != 1); + ATF_REQUIRE(recv(a, &repl, sizeof(repl), 0) == sizeof(buf)); + ATF_REQUIRE(strcmp(buf, repl) == 0); + close(l); + close(s); + close(a); +} + /* accept(2) can receive a connection */ ATF_TC_WITHOUT_HEAD(accept); ATF_TC_BODY(accept, tc) @@ -1072,6 +1098,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, send_recv_nonblocking); ATF_TP_ADD_TC(tp, send_recv_with_connect); ATF_TP_ADD_TC(tp, sendto_recvfrom); + ATF_TP_ADD_TC(tp, send_before_accept); ATF_TP_ADD_TC(tp, shutdown_send); ATF_TP_ADD_TC(tp, shutdown_send_sigpipe); ATF_TP_ADD_TC(tp, eagain_8k_8k); From nobody Wed Feb 28 22:33:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlTdh3Mz2z5CXk2; Wed, 28 Feb 2024 22:33:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TlTdh09hvz4q5G; Wed, 28 Feb 2024 22:33:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709159592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gE0sllV4oSPoPbMQmj8+2+pnAQcYMMOgzxa2Cdt0Qk4=; b=onVmYMKvhQHBkxdvYE9DKv6B3aktlebtPy0vWVZJysxkltXbSwtu5qSMNprLJTS0nc1ZwM m5pC+bTaNXazTCgkPJAFE97cXFlPcK+EEq361iGwUtiHnmCu7qDgyHm+USqrenXZ7Pzpm/ sAfIG+uM9JcYtZdtvvOhJf9XLj6SxplV64wk+8U6lioHf3vJTdYd6ayM9mT1+jO64uWeFD vg1JQgGzJvm20jseUctI31BsPeYi6IOcagINYBgJrymMGuafHFgST5XBvPdqox0gX0Zz3X UIl2BQHaluvQzsWanj0galfe0i5ydGU8VOA3N1WYO9emxmMSLa3DUKkBlCKsAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709159592; a=rsa-sha256; cv=none; b=hkAwaf9LNBlfRZMv2t08U5s3vzB5qN1KZ1OdrUZZZ9Ku41LTizC6uiAWRHvPjVcPCdq0B+ CzDVTBtNi2IBMJFJO0LtOwu01FHs9mS4IdgZdTcBxXGLkjbvFPZjjNaV+yaTcDmyV2Vj2W +YGB5RwVBl0mvxvFdHcyld7Vn5y16W3AO2tPeHe1CycpxOh2YxhYSL3kEzzxC3VnkTBo9k V32YYKGQlvmhO8GkBYieLKAlOCgGXNZPnf2NcFLr9+HqAEyEGFLHBc/XqAQEkULNQFNZzU zfhjW9jt7qHkJYihZmpSC94RjSugI7FZvayQfrtRHchtEwsG2uYK6XMk5RQr0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709159592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gE0sllV4oSPoPbMQmj8+2+pnAQcYMMOgzxa2Cdt0Qk4=; b=s9dKzbEiHqSOzQFxVRzAUHmcBorwx0KXhu4ERqNeDqItV72pPOkzLtQXLFg3GidwX2EK4r G+JITlwvmHDJ60YbXh4x+D5JuakoKW68k/pnTalkBuWz6vLBEP8sjfOwkNazTAjDkYzQCK sadiQO5c7COXabGCF7dfdLzlN8hWMmAFwSWkKndyYKRTW9v1JVy8FuRsA7cCw8LqAzI6RJ /cqkXeZK5g0PHru5e0AKeszhIZ4rZw0Zqwu1hpuQatj4wHfL5lCrkZF281jrYOsQjdcvRo AzvgmQnsfKpdeiYJd+Cnf1CPDFue8WiQqYQJWpm8AK0g//bAqtbmaAAoiPNmKA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlTdg6ht9zGDr; Wed, 28 Feb 2024 22:33:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41SMXBOQ011058; Wed, 28 Feb 2024 22:33:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41SMXB26011055; Wed, 28 Feb 2024 22:33:11 GMT (envelope-from git) Date: Wed, 28 Feb 2024 22:33:11 GMT Message-Id: <202402282233.41SMXB26011055@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 253d8a1f8a24 - main - tests/unix_seqpacket: test that implied connect doesn't work List-Id: Commit messages for the main 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 253d8a1f8a247fc363ab6bad6ed0fa9c7cc25060 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=253d8a1f8a247fc363ab6bad6ed0fa9c7cc25060 commit 253d8a1f8a247fc363ab6bad6ed0fa9c7cc25060 Author: Gleb Smirnoff AuthorDate: 2024-02-28 22:32:47 +0000 Commit: Gleb Smirnoff CommitDate: 2024-02-28 22:32:47 +0000 tests/unix_seqpacket: test that implied connect doesn't work Applies both to SOCK_STREAM and SOCK_SEQPACKET. Put the test in this file as it is most advanced one. Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D43854 --- tests/sys/kern/unix_seqpacket_test.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/sys/kern/unix_seqpacket_test.c b/tests/sys/kern/unix_seqpacket_test.c index cde427401970..e93bdfe7e0b1 100644 --- a/tests/sys/kern/unix_seqpacket_test.c +++ b/tests/sys/kern/unix_seqpacket_test.c @@ -527,6 +527,23 @@ ATF_TC_BODY(send_before_accept, tc) close(a); } +/* Implied connect is unix/dgram only feature. Fails on stream or seqpacket. */ +ATF_TC_WITHOUT_HEAD(implied_connect); +ATF_TC_BODY(implied_connect, tc) +{ + const struct sockaddr_un *sun; + int l, s; + + sun = mk_listening_socket(&l); + + ATF_REQUIRE((s = socket(PF_LOCAL, SOCK_SEQPACKET, 0)) > 0); + ATF_REQUIRE(sendto(s, &s, sizeof(s), 0, (struct sockaddr *)sun, + sizeof(*sun)) == -1); + ATF_REQUIRE(errno == ENOTCONN); + close(l); + close(s); +} + /* accept(2) can receive a connection */ ATF_TC_WITHOUT_HEAD(accept); ATF_TC_BODY(accept, tc) @@ -1099,6 +1116,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, send_recv_with_connect); ATF_TP_ADD_TC(tp, sendto_recvfrom); ATF_TP_ADD_TC(tp, send_before_accept); + ATF_TP_ADD_TC(tp, implied_connect); ATF_TP_ADD_TC(tp, shutdown_send); ATF_TP_ADD_TC(tp, shutdown_send_sigpipe); ATF_TP_ADD_TC(tp, eagain_8k_8k); From nobody Wed Feb 28 23:40:13 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlW715YF2z5Cddp; Wed, 28 Feb 2024 23:40:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TlW7154qQz4yVj; Wed, 28 Feb 2024 23:40:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709163613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OO6wZHcMpbL099/kv7mboIqVfqa7Qy7EQPXHkwy8V+Q=; b=a3Rjn/RkbrGG+F3l10tYPulBzykEVeNV/GigLXo6N/FVMXTrTh04EO7GaLDsjth2wEeg0A qQKFhT5qN/yQzHNNeb9MJb0K/AOsSJY+QNGbU/HvOISw7xUuZPWMWvgNW4yDn1Wb5oTL7g g0oJQiNQ2avhkf0NXhVnL/BonJ4PIy3EwNONxomU0ukjG6/PvMbHr+c0iNigMENNBi9lUZ qAv5MFU3wOdIplxIIQ8RGHlcPhJZN3fzqDa2EdefpOn3laJa2Q2Qgev7DR1Pf8CEBWu3T9 zZ7BEDQFmnTjtnRAE65rUu3q/H9mQ4Vzw6miejvfxylPjRyPSDCQurQYMbOpRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709163613; a=rsa-sha256; cv=none; b=hFnlwt5XclLOgIamSzVWKR5kh1RrO3ACg8Dv97IKgLMYsDVBU+wJRxAmKHWn+pxGOj5U+e T3CqqyX6yMaRLoUNcrTPJeXGGQhZ6zpbL2mBHJssOJOEm3vKmI08GREDEN01JWnXtLugKo /EW16XxR3kZnXGHO+VU4GUnymppY8e+rLVTKJMFItnfGvvPie4sjHKso0c/DqS6cHMt8HW SkXCKM9lDInzbaxcSatxgAPY1HXchmwh2ppFAJvWzSQD6MZNpITfzc89cTofN7gpiy0nzr 0rO8zB6bekUW7svdijpkpa8Zm7R9baiLR6m1Do5D4O1MWsS0+14vpfqDBKp4rQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709163613; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OO6wZHcMpbL099/kv7mboIqVfqa7Qy7EQPXHkwy8V+Q=; b=e+GFSKzg6p/UjKV+ZGx3nQgkFo/73/QQQJ71uu29KhAGpTG1DKU9q5LdZUqBOikGy8JP7z M3iXmfkTQs4p6jjypYJqdfZn90fZCZWZln17Q7o+bMvMjImJRHHAmNTYDhUrNMWgsqTXq+ PrIzovLU9OSZDGv/q0T3S+EGpa2gcB/QIfvlqZqe+P52eFazbLMhR6GQIU4wycGID4+Eul 0DF1GSa8GPYFs9s8VGwclOCAux6Ta6UnY0I/NhI+qLhQj8qeP0Px/SXdRhC1ivWRcL5drt qAcUOCbsDbATSEZD0JbbvjnNF0+KPqVxZslEvdy/mpmdWzJ+kN6obbCYE8h25A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlW714gt4zHNJ; Wed, 28 Feb 2024 23:40:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41SNeD6f018611; Wed, 28 Feb 2024 23:40:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41SNeDSJ018606; Wed, 28 Feb 2024 23:40:13 GMT (envelope-from git) Date: Wed, 28 Feb 2024 23:40:13 GMT Message-Id: <202402282340.41SNeDSJ018606@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 882d9f4507a8 - main - lib{c,sys}: expose cap_sandboxed from libc/gen List-Id: Commit messages for the main 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 882d9f4507a8fa518a967aeebd88585fb1e19a85 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=882d9f4507a8fa518a967aeebd88585fb1e19a85 commit 882d9f4507a8fa518a967aeebd88585fb1e19a85 Author: Brooks Davis AuthorDate: 2024-02-28 23:23:33 +0000 Commit: Brooks Davis CommitDate: 2024-02-28 23:39:55 +0000 lib{c,sys}: expose cap_sandboxed from libc/gen It's a thin wrapper on cap_getmode() implemented in libc, not a system call so the symbol should have been exposed by libc/gen/Symbol.map alongside the implementation. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44110 --- lib/libc/gen/Symbol.map | 1 + lib/libsys/Symbol.sys.map | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map index 7b002941ea4e..0c58411168af 100644 --- a/lib/libc/gen/Symbol.map +++ b/lib/libc/gen/Symbol.map @@ -358,6 +358,7 @@ FBSD_1.2 { }; FBSD_1.3 { + cap_sandboxed; clock_getcpuclockid; dirfd; dup3; diff --git a/lib/libsys/Symbol.sys.map b/lib/libsys/Symbol.sys.map index 4b9373ffa773..ff368ebfac44 100644 --- a/lib/libsys/Symbol.sys.map +++ b/lib/libsys/Symbol.sys.map @@ -356,7 +356,6 @@ FBSD_1.3 { cap_ioctls_limit; __cap_rights_get; cap_rights_limit; - cap_sandboxed; chflagsat; clock_getcpuclockid2; connectat; From nobody Wed Feb 28 23:57:37 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlWW56x6wz5Cfhv; Wed, 28 Feb 2024 23:57: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 4TlWW560TVz50vf; Wed, 28 Feb 2024 23:57:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709164657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gDnW52Vw3fF20F6vHbfyEQrAS5bKADuYpdpQjOIGsBI=; b=eMWL7BwgirdAQTXoK31UtYGTArCf2fHqDaqCEY0qpQwUuxY6B9xK5c/WwKfXnC8CRuDpBe UPjNBexQN+UQtBNsI0eZiJJB+eY6S9T98JuBd2nhor3AfdIEVN47CQHTlQwR3vqTM/fWDS i0goRSEXUzk1K9OQ0HjjGci0NvyYIbPR6Qalelj88FbCUXDSXolrcHa/qDu4WgUzo9LShW HeEa32peSETxflWvwq3BdeFCi+lFn+tVQwU112PpbIz9eLJEoUIJxrg1yUFhU0rs5bT4fX bYYk46qy7vSO/JIBoOuNrcrd1Nx0Z6yG/8KGx01ZdnX2DFrROGG7Xo94BpZ0Tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709164657; a=rsa-sha256; cv=none; b=wfbQOi/QIunL6D8TETTEtte5uHAVL86L3TB7KzKZZNiWeKvDV+pChfyogvxIU7fIc0ThBR ZGl0Fx/+06MylAaVIyyUiNt1STY8mzAkx2odzAfBFvozJlS5ntWGMwMmFPv6Qs05VV2VEa AtobpyWPmhfuAEUEv+CR8AcC6lluGSDgxClVwctkMfF67cIJePvZxpDk05obD64h6nM0wi +IDZnM87mzxgSAHIuptkyLIJ+aTmXqaAdlN7/mvXL0H2brTFXEFvccESqp7uDNiIOiidz4 /53QbgMVzSMU7MM5N0CYBUkWkiUP7NBf/GW/KS1l2dPgZ5HETvSyiVEA2v96gg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709164657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gDnW52Vw3fF20F6vHbfyEQrAS5bKADuYpdpQjOIGsBI=; b=K5jyCHFgof8AZaxArFwFi8HPSJPCafeV5WOHodzcygJs4kMqYAPo1L5AeSPHaznbQhsgJH zYOlTUGqSfDQrZOz39ePUIYvERhtkvIiSGScaIkv5bo5PhjOPxN42u60k+2LFtrV5YztR7 ITKUf2aYV3nPGkymd+ZuZP+Kf2M5rcK1J8cL6MpZPR3m4Uone9AfcrsQA+wfCBXBzT1Ul6 Kffxs4kmBPEjeNN0zHIgbIGlZqOgXtijaEnalpxuaaImr+eOUDMagmfPE63h4zx3SRcFtG /ZRx+KA+l8dw/BROTsTDZoESeXS/kb4dnpyHzRwbryifh47lWyAZBo09cjNMTg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlWW55bhJzJF1; Wed, 28 Feb 2024 23:57: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 41SNvb9w045364; Wed, 28 Feb 2024 23:57:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41SNvbNV045361; Wed, 28 Feb 2024 23:57:37 GMT (envelope-from git) Date: Wed, 28 Feb 2024 23:57:37 GMT Message-Id: <202402282357.41SNvbNV045361@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 7ee47c3bb7a6 - main - sockets: in solisten_proto() don't call sbdestroy() on a PR_SOCKBUF List-Id: Commit messages for the main 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7ee47c3bb7a6d85744e2747ec969161eed5bbaab Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=7ee47c3bb7a6d85744e2747ec969161eed5bbaab commit 7ee47c3bb7a6d85744e2747ec969161eed5bbaab Author: Gleb Smirnoff AuthorDate: 2024-02-28 23:57:04 +0000 Commit: Gleb Smirnoff CommitDate: 2024-02-28 23:57:25 +0000 sockets: in solisten_proto() don't call sbdestroy() on a PR_SOCKBUF A socket marked with PR_SOCKBUF has protocol specific socket buffers and will take care of the in its pr_listen method. Right now we don't have any sockets that can listen and are PR_SOCKBUF, but that will change soon. --- sys/kern/uipc_socket.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index b647766cf258..18ecf1409fd7 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1063,8 +1063,10 @@ solisten_proto(struct socket *so, int backlog) sbrcv_timeo = so->so_rcv.sb_timeo; sbsnd_timeo = so->so_snd.sb_timeo; - sbdestroy(so, SO_SND); - sbdestroy(so, SO_RCV); + if (!(so->so_proto->pr_flags & PR_SOCKBUF)) { + sbdestroy(so, SO_SND); + sbdestroy(so, SO_RCV); + } #ifdef INVARIANTS bzero(&so->so_rcv, From nobody Thu Feb 29 01:54:46 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlZ6H0rZvz5BZx5; Thu, 29 Feb 2024 01:54: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 4TlZ6H0LCKz46j8; Thu, 29 Feb 2024 01:54:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709171687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0eb1pJylzlE79pLZrQM+MFHpUIvvH68J1H6E6B2t4vw=; b=nIdHgStmrgsYY4a1Kp2tRNwehZECeKQA9Tx77w6UvbE34ZM8VMjxkzm93O7xBZPpI7HXjI fBEiNul5mxoXqw/gyc4yOsCvKJf/vPFNY6JNooT4ygGxKPTuXTI/OZeBGgRRbrt2BuUBNS /oZpWeSqCyZUNYt02mRwxXPnN+PLd/U2JmyUcYHZZncnHhpJJU0cCtSKML247n4U2W6/xk joP1r9UBEfR8bOYLTLgAQ3a3l+E5tWQNeZjk+Dtc0FhJ4Xhan+8G8xZFZZaUvWRK0YTar5 2E1X+9/T6Y9ANdXo+gReupIcHjNdGnTORJ4r0gTvOgzf27I3ZRJGkkgymM4RTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709171687; a=rsa-sha256; cv=none; b=ny/B1iCoSCUnpKHeaBmH6eCorPURZHhejWb2MEZJ760MPauoU5I4a9vmheYz8Hqn5JouXc 7Ma+knOyIa10UBKTRLYrHc6A0GjcLsz+mMJN0dmRdx/hqF2rdqrSd6wLAiPz0QmpNraN1q 6bzlxqjQPKQFtm+K82jp97clzv1sjciIUCPoDQ5H1tdPgMFON5dRpLA0epb0mkatmLRJw0 NWAlfePABchotOgyD3aqFRVtH2es8wwcX3p7aseQp7ZqgW4FMCXTLA5s+nTPvKMNs2PTQ9 OZ01I26PK7tA7rtT4Rr8tL9Y0qgi1WhYS1DLyktrMcguXJj3zIrdRpKvKjnW1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709171687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0eb1pJylzlE79pLZrQM+MFHpUIvvH68J1H6E6B2t4vw=; b=Zp4sy671GRBtmaPFcsWa3gPyQAnIWDXzjx0vOQemQIvl/ErbBqpftdyftS850zXqglinmI sNYZIXYXK3XNIlY/p/1lKWbI2kEWIIIBSa02r9g2rUm9Quz2+icoRyP2IczLcty1FmLC0C OeLRfPdfQqdDteZgzvhoEAn+eIPGSh8oUavNdHjz+nfQD7uOkkGtz9roCpQeu+/qDavK6h AawGPBJ5FdWngWZhUQ0nQtVbpIgs7XKXRv4jwnac/NSFtascZW92vPiVALGgwQ4qxmsbAp R81JrJIxrRn6m6VPsIfHIcjw6+5ryZHoRhlOC7Mnlcw0za2+alaZP3/U59MSQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlZ6G73whzM6B; Thu, 29 Feb 2024 01:54: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 41T1sk9r047951; Thu, 29 Feb 2024 01:54:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41T1skB5047948; Thu, 29 Feb 2024 01:54:46 GMT (envelope-from git) Date: Thu, 29 Feb 2024 01:54:46 GMT Message-Id: <202402290154.41T1skB5047948@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 799940154c70 - main - rtld: unconditionally generate map file during build List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 799940154c70597a46627deb4d0b98e174b27b98 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=799940154c70597a46627deb4d0b98e174b27b98 commit 799940154c70597a46627deb4d0b98e174b27b98 Author: Konstantin Belousov AuthorDate: 2024-02-28 00:04:37 +0000 Commit: Konstantin Belousov CommitDate: 2024-02-29 00:26:51 +0000 rtld: unconditionally generate map file during build It is needed at least to ensure that undesirable code is not linked into rtld from libsys/libc, and adding the map file option each time is not productive. Reviewed by: brooks, emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44136 --- libexec/rtld-elf/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index fe7e39a6b788..cc40b839024f 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -73,6 +73,12 @@ SYMBOL_MAPS+= ${RTLD_ELF_DIR}/${RTLD_ARCH}/Symbol.map .sinclude "${RTLD_ELF_DIR}/${RTLD_ARCH}/Makefile.inc" RTLD_ENTRY?= .rtld_start +# Always produce the map file so that may be inspected to confirm +# undesired code is not linked from libsys/libc. +MAPFILE= ld-elf.so.1.map +LDFLAGS+= -Wl,-Map=${MAPFILE} -Wl,--cref +CLEANFILES+= ${MAPFILE} + # Since moving rtld-elf to /libexec, we need to create a symlink. # Fixup the existing binary that's there so we can symlink over it. beforeinstall: From nobody Thu Feb 29 01:54:48 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlZ6J1m8wz5BbJZ; Thu, 29 Feb 2024 01:54: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 4TlZ6J0trjz46Cr; Thu, 29 Feb 2024 01:54:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709171688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cNYNnHmGDXp1NR+Rvj5+bvpoRpPvbQWpn3T/MM8FHzs=; b=M74IWuhU3wJDW1cGMuk3FciqTuVG96/cpDHo1bIK8aWmV7TtdLqA1wcjHuH/ooAQlgWMNv Ve0JgwrguYgFBx3f1YuTWjdsDiQLvOBATY4rl1Oa5sxmE6MMyKbulFeo/HaiEhfdpVBz7m tJOMpBhEwHRx4rX/6XJo92phRm0hus1F/QkvfT1/FvrNKikUcLuCESj94vZrX8X5Wb+Anw AXQLfzFDlLPnXU6MOfJwl6J7VNeyvkxKxA1ZArwd1yVax5Ha76ou2TWWU2N3/iI4ng5UFV SxuMxfqssxWEA4V/qBzlZV6KzKm8ZPWWGK5S/IAaVCHQQN6DbCfg9BaQnaRGUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709171688; a=rsa-sha256; cv=none; b=Gr40kDKEfXucOnPwcy4mZMV/25hSptDvWKjhb68WqncSiLJ0XfJdAIeCMiY0N45cqKGrXn IDS+qi7yJI+OJzmXFicYBmrRDX1Y4EoutwX9UOjZc38nrv9frkOvGwvUZIaqw5koMtXBYe 0T2GVwvotlD+xg32Xzknt80pIP2GbT0pcbVTnHjUCXVQYIfWJchwRj3N6dfO/8Csnn1u/+ U9i2xhH69iD3RCOJW1QmAWfyR05QSiLPu0hMSgnsFFGiL64lY9OSBQT0vwD8lsuotUk/DC 00yeMU+KdzhdTjoVbOmV6KSceYZ83MdhEVhTm09nkZENaeKkLmzI2Z6H47Xuxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709171688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cNYNnHmGDXp1NR+Rvj5+bvpoRpPvbQWpn3T/MM8FHzs=; b=gVWBguT30m9XI1T0bVnnPpffRXeI+3Qqk3IzS9FazK/zGNSO0Aaf8GEtfF1AQqPTYsYqK0 ZT0zTdxLajE/CYMBEg4Ca3nac7hU7lN30SxKfrhgtURabrVpXuybz1VEsD6DQmb4RvcYmI U35Q8oldVLzCRZSa+/DXueiuDabgIGE6UlLzbc486IBgKtJH69cbUQDl5S6IWar6O8XLBI TyChLMfTbzpIs+scwW9q+03ZcBZXkjXuSih5lTEEEBen2dEFgiPLg28QO6Si6RUJos2bTH X2h8mYs0XsaN6f0PkouSyaSiDDNRkON0P3Vu0JoN+s2loCFxA4M/xuCr/HNmcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlZ6J0TDgzM6C; Thu, 29 Feb 2024 01:54: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 41T1smsx048020; Thu, 29 Feb 2024 01:54:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41T1sml0048017; Thu, 29 Feb 2024 01:54:48 GMT (envelope-from git) Date: Thu, 29 Feb 2024 01:54:48 GMT Message-Id: <202402290154.41T1sml0048017@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 5db5c6c87a75 - main - rtld: use generated map file to check for some leaks from libc into rtld List-Id: Commit messages for the main 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5db5c6c87a75f8b1871f021726fc4697253ae5cf Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5db5c6c87a75f8b1871f021726fc4697253ae5cf commit 5db5c6c87a75f8b1871f021726fc4697253ae5cf Author: Konstantin Belousov AuthorDate: 2024-02-28 23:40:41 +0000 Commit: Konstantin Belousov CommitDate: 2024-02-29 01:49:02 +0000 rtld: use generated map file to check for some leaks from libc into rtld Reviewed by: brooks, emaste (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44136 --- libexec/rtld-elf/Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index cc40b839024f..37c3840538d5 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -79,6 +79,25 @@ MAPFILE= ld-elf.so.1.map LDFLAGS+= -Wl,-Map=${MAPFILE} -Wl,--cref CLEANFILES+= ${MAPFILE} +afterbuild: + @if grep __libsys_interposing ${MAPFILE} >/dev/null ; then \ + echo "libsys_interposing leaked" 1>&2 ; \ + exit 1 ; \ + fi + @if grep __libc_interposing ${MAPFILE} >/dev/null ; then \ + echo "libc_interposing leaked" 1>&2 ; \ + exit 1 ; \ + fi + @if grep xlocale ${MAPFILE} >/dev/null ; then \ + echo "xlocale leaked" 1>&2 ; \ + exit 1 ; \ + fi + @if grep fprintf ${MAPFILE} >/dev/null ; then \ + echo "stdio leaked" 1>&2 ; \ + exit 1 ; \ + fi + + # Since moving rtld-elf to /libexec, we need to create a symlink. # Fixup the existing binary that's there so we can symlink over it. beforeinstall: From nobody Thu Feb 29 03:04:34 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tlbfp5Ykjz5BjXJ; Thu, 29 Feb 2024 03:04: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 4Tlbfp455Zz4HLP; Thu, 29 Feb 2024 03:04:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709175874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B3mT5Q2ZB0n+rbbHJjLJaUoM4NkHdR310zAlXh47RwY=; b=E5flXfPEa2asRuTwIvxdBLF8k7NgbMWD36rd0V9ZlYzzDeDh4h3lmack132pz0dlUc+X73 Ujlhiqff5s6lVVywq7Cq6ONR5cB4dA5oVjzLQcoDY9vNZxsuZ3b13Zxqxf37RI7lHfU1Uj Sh4jZSqMoeKaFKwyyklA/NPmKk6kEFy3ph+mZoCWK5NOFRcaBZeKLy7JBty/WlXNjAjga7 gINVUOagYNRfUnd+S3C+GVj25zLTgqzsgUDIQJtq3T9+vRUXAy7rm276pLfSlQOtzIhHcC OMv8+eWT6oMMy4f1F1oJb3THnPI3oYAFprGmjtPHdzqo88TS8AH1mL0obUd0lw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709175874; a=rsa-sha256; cv=none; b=RUIVtcBuzHI/C6nxfHpiuqfrZCMFwyqU8QyIha9ttF6pKGKmnYb0JxZTTbcBgE937dFha9 QHnH2P3M6EDYS/jxZU/AB8wg91e7L2venY15WbdTTnwXqkyJfx9jTlpvaLY5QZjQ5Ca2SX iksFhUy2zMYiXOs1eieYk27SWH+Vj2KxzLzQWivGRLP4WHFf++dfi6geWrw4Y07v74AsGn dvU4vIb3PO+mBZFIqiCyFeVXhA69VqI4cMpuZoyb5k3sMk1RZBW2fjoqXe8jwmQodcWGcX j2Y95wYnlpj7cOgFZ/dR2+b7pTg8Y/MQF3LASppLMBkJU7GrUsJ31+eBWM0rKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709175874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B3mT5Q2ZB0n+rbbHJjLJaUoM4NkHdR310zAlXh47RwY=; b=PgOfCqI8YE8miegLWtqn3zgDiv4jpVUUxb766nNWqPJlzi4R1lMmO/Tz6OGlztFizz3kij Yx20GjFdmmNl1jciIxRjHYICLeuRU7HM8GN/ULrLdnQG3wHUyCUZrrah6rpheXTjOvm/of N2jRd5d4FNBf/gzB/aSQsLBL9c12yyjnEtRld9G3jeX7qIV2FMosnzNgI9MpM6WJ4KhLm/ LAlIPtldpj/3HH3PLbyhIDYZTutrLzogvygstyy8lVjeH1Se7EIB1tpYKcWlfjGPijwlsI 92FHx+hC60GnjV/xafBS82M8+tbnWSsh+nxeXtE4L46tmikdH98WySNLFdw3Vg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tlbfp3hcQzPJ0; Thu, 29 Feb 2024 03:04: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 41T34YrY067518; Thu, 29 Feb 2024 03:04:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41T34Yj6067515; Thu, 29 Feb 2024 03:04:34 GMT (envelope-from git) Date: Thu, 29 Feb 2024 03:04:34 GMT Message-Id: <202402290304.41T34Yj6067515@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: b52dceb83811 - main - powerpc: Bump maximum number of FDT reserved mem 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: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b52dceb838116391996909ff50b49f950ee01f48 Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=b52dceb838116391996909ff50b49f950ee01f48 commit b52dceb838116391996909ff50b49f950ee01f48 Author: Shawn Anastasio AuthorDate: 2024-02-27 19:40:50 +0000 Commit: Justin Hibbits CommitDate: 2024-02-29 03:01:15 +0000 powerpc: Bump maximum number of FDT reserved mem entries Newer firmware on POWER systems, including v2.10 of the Talos II and Blackbird firmware can end up reserving more than 32 memory regions in the device tree, which exceeded an assumption made by ofw_machdep.c's excise_fdt_reserved(). Bump the maximum number of FDT reservations to the next power of 2 in order to fix booting on newer firmware. PR: 277097 Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D44015 --- sys/powerpc/ofw/ofw_machdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/powerpc/ofw/ofw_machdep.c b/sys/powerpc/ofw/ofw_machdep.c index f850efa6c713..6d7b0b01fc84 100644 --- a/sys/powerpc/ofw/ofw_machdep.c +++ b/sys/powerpc/ofw/ofw_machdep.c @@ -426,7 +426,7 @@ excise_msi_region(struct mem_region *avail, int asz) static int excise_fdt_reserved(struct mem_region *avail, int asz) { - struct mem_region fdtmap[32]; + struct mem_region fdtmap[64]; ssize_t fdtmapsize; phandle_t chosen; int j, fdtentries; From nobody Thu Feb 29 11:42:39 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tlq8b4BDqz5Cl0G; Thu, 29 Feb 2024 11:42: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 4Tlq8b3z7lz46sS; Thu, 29 Feb 2024 11:42:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709206959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HH4cQF+BU6THjXHGkaq/5Re1CjQdBRRgvoqigoM+xpo=; b=xtmD/ZLRIzI/uP3fZ+nZB2Y/l9s1woin4eAPb8So3OcIyM+jBskO8XuodZyRXtPjO6NlqN N/UJnyr6xZiQvjcEglGrwKxlgNd3oy11nIcapOWElj2/Bb2cYdV8WXYtc/EFFkVhjEuKXG +koCG5U7rVvlxdXAUc4a26+HCpmrLD2Yn7YbgbrJCwDFJH5QyetVS+tSh0hoiHIdchYwNE 0dTrSo+YDNnZEy3HpGTclq43vkuJ4azHGn7Qw+S4ojtUBhD59RBj3NC6+6/hmUFtAzqfGe vmxThtB5ZonkxUWbLcpaoCk/ugQ548QHUWjoxVLn73bQMfttmSnmEG3NJmUYAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709206959; a=rsa-sha256; cv=none; b=c3crjvwcgpNQoTepJxn8gSkKhmpM1+2hXIIQ/LBygFa6yaG6UZ2J9+VU830hCcM7P+8xPj MHTzNIa5EEaBD1Mh+ClhSeRdg5lUvAVY96XVK/axYBSV6zZ5Do2P3GIXI74RAR/tN6evwy 0bvt+nzcZMX9S9W/POt7grq/NEKy+A56hgwmeZ3hybBj42FmqvXadecTsbojuMTYb1JBur 6liuZhUxlxRu0u+FjZQThbWIIl/NGwLnIp5MTtZCOuAsGGuh+yjAPG3YWMykCD8nPHybKg TZ4cscBAupDmqqpmMeimC5KgcapmMl85a8EHUv8AZmATn4denithCP4QXWbKhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709206959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HH4cQF+BU6THjXHGkaq/5Re1CjQdBRRgvoqigoM+xpo=; b=mbKLGksnJui4SH1eCLRoETIbTlizXrOf689LREDNZ27JAqSjyUHS2iyUpekEs9DSeqgXMc KUVZ4PC+FNRnksA74bWMcd0h1+QiVs7PJPtCu+fiVcGJziFZOFkPbcBhnsGrebKQn+ipI+ IbUpGtKSQIQYJDz8bixQcqu5xRA9qGGWSEqsl1j0vjyTU5ped9mus1QD/Kr/WSoy76CSzx lCqHwe+JL22AMS3oM9A1YJNZkdUPLXI3DlVuA1XFedRzM2eWgUfuKYJWug1Gz+mDfUmj3i TnMIpcDWLQvgwX/FB3dPJ629OJgdcTu+vMfTAwZ2cMecQFgJEEasd5vP9SX53w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tlq8b3ZKHzgYJ; Thu, 29 Feb 2024 11:42: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 41TBgdfn048625; Thu, 29 Feb 2024 11:42:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41TBgdv6048622; Thu, 29 Feb 2024 11:42:39 GMT (envelope-from git) Date: Thu, 29 Feb 2024 11:42:39 GMT Message-Id: <202402291142.41TBgdv6048622@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: 5a02ffc32e77 - main - Update the Arm Optimized Routine library to v24.01 List-Id: Commit messages for the main 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: 5a02ffc32e777041dd2dad4e651ed2a0865a0a5d Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=5a02ffc32e777041dd2dad4e651ed2a0865a0a5d commit 5a02ffc32e777041dd2dad4e651ed2a0865a0a5d Merge: b52dceb83811 edc5c0de794f Author: Andrew Turner AuthorDate: 2024-02-29 11:39:12 +0000 Commit: Andrew Turner CommitDate: 2024-02-29 11:39:12 +0000 Update the Arm Optimized Routine library to v24.01 Sponsored by: Arm Ltd contrib/arm-optimized-routines/README | 2 +- contrib/arm-optimized-routines/config.mk.dist | 13 +- contrib/arm-optimized-routines/math/Dir.mk | 6 +- .../arm-optimized-routines/math/aarch64/v_cos.c | 87 + .../arm-optimized-routines/math/aarch64/v_cosf.c | 82 + .../arm-optimized-routines/math/aarch64/v_exp.c | 125 + .../arm-optimized-routines/math/aarch64/v_exp2f.c | 113 + .../math/aarch64/v_exp2f_1u.c | 72 + .../math/aarch64/v_exp_data.c | 146 + .../arm-optimized-routines/math/aarch64/v_expf.c | 122 + .../math/aarch64/v_expf_1u.c | 77 + .../arm-optimized-routines/math/aarch64/v_log.c | 100 + .../math/aarch64/v_log_data.c | 156 + .../arm-optimized-routines/math/aarch64/v_logf.c | 74 + .../arm-optimized-routines/math/aarch64/v_math.h | 135 + .../arm-optimized-routines/math/aarch64/v_pow.c | 22 + .../arm-optimized-routines/math/aarch64/v_powf.c | 148 + .../arm-optimized-routines/math/aarch64/v_sin.c | 97 + .../arm-optimized-routines/math/aarch64/v_sinf.c | 82 + contrib/arm-optimized-routines/math/exp10.c | 129 + contrib/arm-optimized-routines/math/exp_data.c | 23 +- .../arm-optimized-routines/math/include/mathlib.h | 67 +- contrib/arm-optimized-routines/math/math_config.h | 61 +- contrib/arm-optimized-routines/math/s_cos.c | 6 - contrib/arm-optimized-routines/math/s_cosf.c | 6 - contrib/arm-optimized-routines/math/s_exp.c | 6 - contrib/arm-optimized-routines/math/s_exp2f.c | 6 - contrib/arm-optimized-routines/math/s_exp2f_1u.c | 6 - contrib/arm-optimized-routines/math/s_expf.c | 6 - contrib/arm-optimized-routines/math/s_expf_1u.c | 6 - contrib/arm-optimized-routines/math/s_log.c | 6 - contrib/arm-optimized-routines/math/s_logf.c | 6 - contrib/arm-optimized-routines/math/s_pow.c | 6 - contrib/arm-optimized-routines/math/s_powf.c | 6 - contrib/arm-optimized-routines/math/s_sin.c | 6 - contrib/arm-optimized-routines/math/s_sinf.c | 6 - .../arm-optimized-routines/math/test/mathbench.c | 152 +- .../math/test/mathbench_funcs.h | 50 +- .../math/test/mathbench_wrappers.h | 42 +- .../arm-optimized-routines/math/test/mathtest.c | 9 +- contrib/arm-optimized-routines/math/test/runulp.sh | 112 +- .../math/test/testcases/directed/exp10.tst | 15 + contrib/arm-optimized-routines/math/test/ulp.c | 81 +- contrib/arm-optimized-routines/math/test/ulp.h | 29 +- .../arm-optimized-routines/math/test/ulp_funcs.h | 50 +- .../math/test/ulp_wrappers.h | 36 +- contrib/arm-optimized-routines/math/tgamma128.c | 356 ++ contrib/arm-optimized-routines/math/tgamma128.h | 141 + .../math/tools/tgamma128_gen.jl | 212 ++ contrib/arm-optimized-routines/math/v_cos.c | 95 - contrib/arm-optimized-routines/math/v_cosf.c | 84 - contrib/arm-optimized-routines/math/v_exp.c | 128 - contrib/arm-optimized-routines/math/v_exp.h | 14 - contrib/arm-optimized-routines/math/v_exp2f.c | 117 - contrib/arm-optimized-routines/math/v_exp2f_1u.c | 75 - contrib/arm-optimized-routines/math/v_expf.c | 122 - contrib/arm-optimized-routines/math/v_expf_1u.c | 80 - contrib/arm-optimized-routines/math/v_log.c | 104 - contrib/arm-optimized-routines/math/v_log.h | 18 - contrib/arm-optimized-routines/math/v_log_data.c | 158 - contrib/arm-optimized-routines/math/v_logf.c | 73 - contrib/arm-optimized-routines/math/v_math.h | 661 ---- contrib/arm-optimized-routines/math/v_pow.c | 27 - contrib/arm-optimized-routines/math/v_powf.c | 235 -- contrib/arm-optimized-routines/math/v_sin.c | 103 - contrib/arm-optimized-routines/math/v_sinf.c | 88 - contrib/arm-optimized-routines/math/vn_cos.c | 12 - contrib/arm-optimized-routines/math/vn_cosf.c | 12 - contrib/arm-optimized-routines/math/vn_exp.c | 12 - contrib/arm-optimized-routines/math/vn_exp2f.c | 12 - contrib/arm-optimized-routines/math/vn_exp2f_1u.c | 11 - contrib/arm-optimized-routines/math/vn_expf.c | 12 - contrib/arm-optimized-routines/math/vn_expf_1u.c | 11 - contrib/arm-optimized-routines/math/vn_log.c | 12 - contrib/arm-optimized-routines/math/vn_logf.c | 12 - contrib/arm-optimized-routines/math/vn_pow.c | 12 - contrib/arm-optimized-routines/math/vn_powf.c | 12 - contrib/arm-optimized-routines/math/vn_sin.c | 12 - contrib/arm-optimized-routines/math/vn_sinf.c | 12 - contrib/arm-optimized-routines/pl/math/Dir.mk | 89 +- contrib/arm-optimized-routines/pl/math/acos_2u.c | 100 + contrib/arm-optimized-routines/pl/math/acosf_1u4.c | 99 + contrib/arm-optimized-routines/pl/math/asin_3u.c | 106 + contrib/arm-optimized-routines/pl/math/asin_data.c | 19 + contrib/arm-optimized-routines/pl/math/asinf_2u5.c | 100 + .../arm-optimized-routines/pl/math/asinf_data.c | 16 + contrib/arm-optimized-routines/pl/math/asinh_2u5.c | 5 +- .../arm-optimized-routines/pl/math/asinhf_3u5.c | 6 +- .../arm-optimized-routines/pl/math/atan_common.h | 40 +- contrib/arm-optimized-routines/pl/math/atanf_2u9.c | 12 +- .../arm-optimized-routines/pl/math/atanf_common.h | 33 +- contrib/arm-optimized-routines/pl/math/atanh_3u.c | 15 +- .../arm-optimized-routines/pl/math/atanhf_3u1.c | 12 +- contrib/arm-optimized-routines/pl/math/cbrt_2u.c | 5 +- contrib/arm-optimized-routines/pl/math/cbrtf_1u5.c | 9 +- contrib/arm-optimized-routines/pl/math/cosh_2u.c | 9 +- contrib/arm-optimized-routines/pl/math/coshf_1u9.c | 9 +- contrib/arm-optimized-routines/pl/math/cospi_3u1.c | 89 + .../arm-optimized-routines/pl/math/cospif_2u6.c | 84 + contrib/arm-optimized-routines/pl/math/erf_2u5.c | 102 + contrib/arm-optimized-routines/pl/math/erf_data.c | 788 +++++ contrib/arm-optimized-routines/pl/math/erfc_1u8.c | 153 + contrib/arm-optimized-routines/pl/math/erfc_4u5.c | 155 - contrib/arm-optimized-routines/pl/math/erfc_data.c | 3628 +++++++++++++++++++- contrib/arm-optimized-routines/pl/math/erfcf.h | 38 - contrib/arm-optimized-routines/pl/math/erfcf_1u7.c | 103 + contrib/arm-optimized-routines/pl/math/erfcf_2u.c | 133 - .../arm-optimized-routines/pl/math/erfcf_data.c | 703 +++- contrib/arm-optimized-routines/pl/math/erff_1u5.c | 108 - contrib/arm-optimized-routines/pl/math/erff_2u.c | 82 + contrib/arm-optimized-routines/pl/math/erff_data.c | 532 ++- .../arm-optimized-routines/pl/math/erfinv_24u5.c | 81 + .../arm-optimized-routines/pl/math/erfinvf_4u7.c | 74 + contrib/arm-optimized-routines/pl/math/erfinvl.c | 114 + contrib/arm-optimized-routines/pl/math/estrin.h | 16 - .../arm-optimized-routines/pl/math/estrin_wrap.h | 48 - contrib/arm-optimized-routines/pl/math/estrinf.h | 14 - contrib/arm-optimized-routines/pl/math/expf.c | 4 +- contrib/arm-optimized-routines/pl/math/expm1_2u5.c | 19 +- .../arm-optimized-routines/pl/math/expm1f_1u6.c | 11 +- .../arm-optimized-routines/pl/math/finite_pow.h | 365 ++ contrib/arm-optimized-routines/pl/math/horner.h | 14 - .../arm-optimized-routines/pl/math/horner_wrap.h | 34 - contrib/arm-optimized-routines/pl/math/hornerf.h | 14 - .../pl/math/include/mathlib.h | 238 +- .../pl/math/include/pl_test.h | 8 +- contrib/arm-optimized-routines/pl/math/log1p_2u.c | 17 +- .../arm-optimized-routines/pl/math/log1pf_2u1.c | 16 +- .../arm-optimized-routines/pl/math/math_config.h | 252 +- contrib/arm-optimized-routines/pl/math/math_err.c | 4 +- contrib/arm-optimized-routines/pl/math/math_errf.c | 4 +- .../pl/math/pairwise_horner.h | 14 - .../pl/math/pairwise_horner_wrap.h | 48 - .../pl/math/pairwise_hornerf.h | 14 - contrib/arm-optimized-routines/pl/math/pl_sig.h | 56 +- .../pl/math/poly_advsimd_f32.h | 24 + .../pl/math/poly_advsimd_f64.h | 24 + .../arm-optimized-routines/pl/math/poly_generic.h | 277 ++ .../pl/math/poly_scalar_f32.h | 24 + .../pl/math/poly_scalar_f64.h | 24 + .../arm-optimized-routines/pl/math/poly_sve_f32.h | 26 + .../arm-optimized-routines/pl/math/poly_sve_f64.h | 26 + .../pl/math/poly_sve_generic.h | 301 ++ .../arm-optimized-routines/pl/math/s_acosh_3u5.c | 6 - .../arm-optimized-routines/pl/math/s_acoshf_3u1.c | 6 - .../arm-optimized-routines/pl/math/s_asinh_3u5.c | 6 - .../arm-optimized-routines/pl/math/s_asinhf_2u7.c | 6 - .../arm-optimized-routines/pl/math/s_atan2_3u.c | 6 - .../arm-optimized-routines/pl/math/s_atan2f_3u.c | 6 - .../arm-optimized-routines/pl/math/s_atan_2u5.c | 6 - .../arm-optimized-routines/pl/math/s_atanf_3u.c | 6 - .../arm-optimized-routines/pl/math/s_atanh_3u5.c | 6 - .../arm-optimized-routines/pl/math/s_atanhf_3u1.c | 6 - contrib/arm-optimized-routines/pl/math/s_cbrt_2u.c | 6 - .../arm-optimized-routines/pl/math/s_cbrtf_1u5.c | 6 - contrib/arm-optimized-routines/pl/math/s_cosh_2u.c | 6 - .../arm-optimized-routines/pl/math/s_coshf_2u4.c | 6 - contrib/arm-optimized-routines/pl/math/s_erf_2u.c | 6 - contrib/arm-optimized-routines/pl/math/s_erfc_4u.c | 6 - .../arm-optimized-routines/pl/math/s_erfcf_1u.c | 6 - .../arm-optimized-routines/pl/math/s_erff_1u5.c | 6 - .../arm-optimized-routines/pl/math/s_exp_tail.c | 6 - contrib/arm-optimized-routines/pl/math/s_expf.c | 6 - .../arm-optimized-routines/pl/math/s_expm1_2u5.c | 6 - .../arm-optimized-routines/pl/math/s_expm1f_1u6.c | 6 - .../arm-optimized-routines/pl/math/s_log10_2u5.c | 6 - .../arm-optimized-routines/pl/math/s_log10f_3u5.c | 6 - .../arm-optimized-routines/pl/math/s_log1p_2u5.c | 6 - .../arm-optimized-routines/pl/math/s_log1pf_2u1.c | 6 - contrib/arm-optimized-routines/pl/math/s_log2_3u.c | 6 - .../arm-optimized-routines/pl/math/s_log2f_2u5.c | 6 - contrib/arm-optimized-routines/pl/math/s_sinh_3u.c | 6 - .../arm-optimized-routines/pl/math/s_sinhf_2u3.c | 6 - contrib/arm-optimized-routines/pl/math/s_tan_3u5.c | 6 - .../arm-optimized-routines/pl/math/s_tanf_3u5.c | 6 - contrib/arm-optimized-routines/pl/math/s_tanh_3u.c | 6 - .../arm-optimized-routines/pl/math/s_tanhf_2u6.c | 6 - contrib/arm-optimized-routines/pl/math/sinh_3u.c | 9 +- contrib/arm-optimized-routines/pl/math/sinhf_2u3.c | 9 +- contrib/arm-optimized-routines/pl/math/sinpi_3u.c | 90 + .../arm-optimized-routines/pl/math/sinpif_2u5.c | 83 + .../arm-optimized-routines/pl/math/sv_acos_2u.c | 91 + .../arm-optimized-routines/pl/math/sv_acosf_1u4.c | 84 + .../arm-optimized-routines/pl/math/sv_acosh_3u5.c | 50 + .../arm-optimized-routines/pl/math/sv_acoshf_2u8.c | 47 + .../arm-optimized-routines/pl/math/sv_asin_3u.c | 84 + .../arm-optimized-routines/pl/math/sv_asinf_2u5.c | 76 + .../arm-optimized-routines/pl/math/sv_asinh_3u0.c | 129 + .../arm-optimized-routines/pl/math/sv_asinhf_2u5.c | 55 + .../arm-optimized-routines/pl/math/sv_atan2_2u5.c | 111 +- .../arm-optimized-routines/pl/math/sv_atan2f_3u.c | 112 +- .../arm-optimized-routines/pl/math/sv_atan_2u5.c | 77 +- .../pl/math/sv_atan_common.h | 61 - .../arm-optimized-routines/pl/math/sv_atanf_2u9.c | 69 +- .../pl/math/sv_atanf_common.h | 47 - .../arm-optimized-routines/pl/math/sv_atanh_3u3.c | 60 + .../arm-optimized-routines/pl/math/sv_atanhf_2u8.c | 56 + .../arm-optimized-routines/pl/math/sv_cbrt_2u.c | 122 + .../arm-optimized-routines/pl/math/sv_cbrtf_1u7.c | 116 + .../arm-optimized-routines/pl/math/sv_cexpi_3u5.c | 45 + .../arm-optimized-routines/pl/math/sv_cexpif_1u8.c | 47 + .../arm-optimized-routines/pl/math/sv_cos_2u5.c | 104 +- .../arm-optimized-routines/pl/math/sv_cosf_2u1.c | 94 +- .../arm-optimized-routines/pl/math/sv_cosh_2u.c | 100 + .../arm-optimized-routines/pl/math/sv_coshf_2u.c | 56 + .../arm-optimized-routines/pl/math/sv_cospi_3u2.c | 63 + .../arm-optimized-routines/pl/math/sv_cospif_2u6.c | 59 + .../arm-optimized-routines/pl/math/sv_erf_2u5.c | 111 + contrib/arm-optimized-routines/pl/math/sv_erf_3u.c | 103 - .../arm-optimized-routines/pl/math/sv_erf_data.c | 1558 +++++++++ .../arm-optimized-routines/pl/math/sv_erfc_1u8.c | 164 + .../arm-optimized-routines/pl/math/sv_erfc_4u.c | 146 - .../arm-optimized-routines/pl/math/sv_erfcf_1u7.c | 111 + .../arm-optimized-routines/pl/math/sv_erff_1u3.c | 104 - .../arm-optimized-routines/pl/math/sv_erff_2u.c | 90 + .../arm-optimized-routines/pl/math/sv_erff_data.c | 1046 ++++++ .../arm-optimized-routines/pl/math/sv_exp10_1u5.c | 122 + .../arm-optimized-routines/pl/math/sv_exp10f_1u5.c | 87 + .../arm-optimized-routines/pl/math/sv_exp2_2u.c | 107 + .../arm-optimized-routines/pl/math/sv_exp2f_1u6.c | 80 + .../arm-optimized-routines/pl/math/sv_exp_1u5.c | 137 + .../arm-optimized-routines/pl/math/sv_exp_tail.h | 79 - .../arm-optimized-routines/pl/math/sv_expf_2u.c | 180 +- .../arm-optimized-routines/pl/math/sv_expf_data.c | 12 - .../pl/math/sv_expf_inline.h | 66 + .../arm-optimized-routines/pl/math/sv_expm1_2u5.c | 95 + .../arm-optimized-routines/pl/math/sv_expm1f_1u6.c | 93 + .../pl/math/sv_expm1f_inline.h | 73 + .../arm-optimized-routines/pl/math/sv_hypot_1u5.c | 51 + .../arm-optimized-routines/pl/math/sv_hypotf_1u5.c | 45 + .../arm-optimized-routines/pl/math/sv_log10_2u5.c | 94 +- .../arm-optimized-routines/pl/math/sv_log10f_3u5.c | 119 +- .../arm-optimized-routines/pl/math/sv_log1p_2u5.c | 116 + .../pl/math/sv_log1p_inline.h | 96 + .../arm-optimized-routines/pl/math/sv_log1pf_1u3.c | 97 + .../pl/math/sv_log1pf_inline.h | 65 + .../arm-optimized-routines/pl/math/sv_log2_3u.c | 94 +- .../arm-optimized-routines/pl/math/sv_log2f_2u5.c | 99 +- .../arm-optimized-routines/pl/math/sv_log_2u5.c | 101 +- .../arm-optimized-routines/pl/math/sv_log_data.c | 146 - .../arm-optimized-routines/pl/math/sv_logf_3u4.c | 99 +- .../arm-optimized-routines/pl/math/sv_logf_data.c | 12 - contrib/arm-optimized-routines/pl/math/sv_math.h | 220 +- .../arm-optimized-routines/pl/math/sv_pow_1u5.c | 444 +++ .../arm-optimized-routines/pl/math/sv_powf_2u6.c | 360 ++ contrib/arm-optimized-routines/pl/math/sv_powi.c | 25 +- contrib/arm-optimized-routines/pl/math/sv_powif.c | 26 +- contrib/arm-optimized-routines/pl/math/sv_sin_3u.c | 89 - .../arm-optimized-routines/pl/math/sv_sin_3u5.c | 96 + .../arm-optimized-routines/pl/math/sv_sincos_3u5.c | 61 + .../pl/math/sv_sincos_common.h | 85 + .../pl/math/sv_sincosf_1u8.c | 62 + .../pl/math/sv_sincosf_common.h | 81 + .../arm-optimized-routines/pl/math/sv_sinf_1u9.c | 103 +- .../pl/math/sv_sinf_poly_data.c | 19 - .../arm-optimized-routines/pl/math/sv_sinh_3u.c | 103 + .../arm-optimized-routines/pl/math/sv_sinhf_2u3.c | 64 + .../arm-optimized-routines/pl/math/sv_sinpi_3u1.c | 57 + .../arm-optimized-routines/pl/math/sv_sinpif_2u5.c | 53 + .../arm-optimized-routines/pl/math/sv_tan_3u5.c | 99 + .../arm-optimized-routines/pl/math/sv_tanf_3u5.c | 141 +- .../arm-optimized-routines/pl/math/sv_tanh_3u.c | 96 + .../arm-optimized-routines/pl/math/sv_tanhf_2u6.c | 59 + contrib/arm-optimized-routines/pl/math/tanf_3u3.c | 27 +- contrib/arm-optimized-routines/pl/math/tanh_3u.c | 22 +- contrib/arm-optimized-routines/pl/math/tanhf_2u6.c | 9 +- .../pl/math/test/mathbench_funcs.h | 55 +- .../pl/math/test/mathbench_wrappers.h | 159 +- .../arm-optimized-routines/pl/math/test/pl_test.h | 24 +- .../arm-optimized-routines/pl/math/test/runulp.sh | 56 +- .../pl/math/test/testcases/directed/acos.tst | 17 + .../pl/math/test/testcases/directed/acosf.tst | 21 + .../pl/math/test/testcases/directed/asin.tst | 24 + .../pl/math/test/testcases/directed/asinf.tst | 24 + .../pl/math/test/ulp_funcs.h | 54 +- .../pl/math/test/ulp_wrappers.h | 78 +- .../pl/math/tools/asin.sollya | 29 + .../pl/math/tools/asinf.sollya | 36 + .../pl/math/tools/erf.sollya | 25 + .../pl/math/tools/erfc.sollya | 60 +- .../pl/math/tools/erfcf.sollya | 41 +- .../pl/math/tools/erff.sollya | 20 + .../pl/math/tools/exp10.sollya | 55 + .../pl/math/tools/sincos.sollya | 33 + .../pl/math/tools/sincosf.sollya | 33 + .../pl/math/tools/sinpi.sollya | 33 + .../pl/math/trigpi_references.c | 57 + contrib/arm-optimized-routines/pl/math/v_acos_2u.c | 122 + .../arm-optimized-routines/pl/math/v_acosf_1u4.c | 113 + .../arm-optimized-routines/pl/math/v_acosh_3u5.c | 63 +- .../arm-optimized-routines/pl/math/v_acoshf_3u1.c | 70 +- contrib/arm-optimized-routines/pl/math/v_asin_3u.c | 113 + .../arm-optimized-routines/pl/math/v_asinf_2u5.c | 104 + .../arm-optimized-routines/pl/math/v_asinh_3u5.c | 176 +- .../arm-optimized-routines/pl/math/v_asinhf_2u7.c | 78 +- .../arm-optimized-routines/pl/math/v_atan2_3u.c | 117 +- .../arm-optimized-routines/pl/math/v_atan2f_3u.c | 112 +- .../arm-optimized-routines/pl/math/v_atan_2u5.c | 98 +- .../arm-optimized-routines/pl/math/v_atanf_3u.c | 96 +- .../arm-optimized-routines/pl/math/v_atanh_3u5.c | 69 +- .../arm-optimized-routines/pl/math/v_atanhf_3u1.c | 73 +- contrib/arm-optimized-routines/pl/math/v_cbrt_2u.c | 100 +- .../arm-optimized-routines/pl/math/v_cbrtf_1u5.c | 96 - .../arm-optimized-routines/pl/math/v_cbrtf_1u7.c | 116 + .../arm-optimized-routines/pl/math/v_cexpi_3u5.c | 45 + .../arm-optimized-routines/pl/math/v_cexpif_1u8.c | 47 + contrib/arm-optimized-routines/pl/math/v_cosh_2u.c | 130 +- .../arm-optimized-routines/pl/math/v_coshf_2u4.c | 76 +- .../arm-optimized-routines/pl/math/v_cospi_3u1.c | 86 + .../arm-optimized-routines/pl/math/v_cospif_3u2.c | 83 + contrib/arm-optimized-routines/pl/math/v_erf_2u.c | 116 - contrib/arm-optimized-routines/pl/math/v_erf_2u5.c | 158 + .../arm-optimized-routines/pl/math/v_erf_data.c | 119 - .../arm-optimized-routines/pl/math/v_erfc_1u8.c | 198 ++ contrib/arm-optimized-routines/pl/math/v_erfc_4u.c | 168 - .../arm-optimized-routines/pl/math/v_erfc_data.c | 96 - .../arm-optimized-routines/pl/math/v_erfcf_1u.c | 183 - .../arm-optimized-routines/pl/math/v_erfcf_1u7.c | 166 + .../arm-optimized-routines/pl/math/v_erff_1u5.c | 116 - contrib/arm-optimized-routines/pl/math/v_erff_2u.c | 118 + .../arm-optimized-routines/pl/math/v_erff_data.c | 18 - .../arm-optimized-routines/pl/math/v_erfinv_25u.c | 161 + .../arm-optimized-routines/pl/math/v_erfinvf_5u.c | 163 + .../arm-optimized-routines/pl/math/v_exp10_2u.c | 144 + .../arm-optimized-routines/pl/math/v_exp10f_2u4.c | 138 + contrib/arm-optimized-routines/pl/math/v_exp2_2u.c | 128 + .../arm-optimized-routines/pl/math/v_exp_data.c | 55 + .../arm-optimized-routines/pl/math/v_exp_tail.c | 75 - .../pl/math/v_exp_tail_data.c | 179 +- .../pl/math/v_exp_tail_inline.h | 102 + contrib/arm-optimized-routines/pl/math/v_expf.c | 83 - .../arm-optimized-routines/pl/math/v_expf_inline.h | 60 + .../arm-optimized-routines/pl/math/v_expm1_2u5.c | 139 +- .../arm-optimized-routines/pl/math/v_expm1f_1u6.c | 123 +- .../pl/math/v_expm1f_inline.h | 56 +- .../arm-optimized-routines/pl/math/v_hypot_1u5.c | 95 + .../arm-optimized-routines/pl/math/v_hypotf_1u5.c | 94 + .../arm-optimized-routines/pl/math/v_log10_2u5.c | 140 +- .../arm-optimized-routines/pl/math/v_log10_data.c | 298 +- .../arm-optimized-routines/pl/math/v_log10f_3u5.c | 114 +- .../arm-optimized-routines/pl/math/v_log10f_data.c | 13 - .../arm-optimized-routines/pl/math/v_log1p_2u5.c | 144 +- .../pl/math/v_log1p_inline.h | 82 +- .../arm-optimized-routines/pl/math/v_log1pf_2u1.c | 174 +- .../pl/math/v_log1pf_inline.h | 74 +- contrib/arm-optimized-routines/pl/math/v_log2_3u.c | 133 +- .../arm-optimized-routines/pl/math/v_log2_data.c | 278 +- .../arm-optimized-routines/pl/math/v_log2f_2u5.c | 93 +- .../arm-optimized-routines/pl/math/v_log2f_data.c | 15 - .../arm-optimized-routines/pl/math/v_log_data.c | 161 + .../arm-optimized-routines/pl/math/v_log_inline.h | 104 + .../arm-optimized-routines/pl/math/v_logf_inline.h | 59 + contrib/arm-optimized-routines/pl/math/v_math.h | 874 +---- contrib/arm-optimized-routines/pl/math/v_pow_1u5.c | 259 ++ .../v_exp_data.c => pl/math/v_pow_exp_data.c} | 164 +- .../pl/math/v_pow_log_data.c | 174 + .../arm-optimized-routines/pl/math/v_powf_data.c | 89 + .../arm-optimized-routines/pl/math/v_sincos_3u5.c | 57 + .../pl/math/v_sincos_common.h | 86 + .../arm-optimized-routines/pl/math/v_sincosf_1u8.c | 58 + .../pl/math/v_sincosf_common.h | 84 + contrib/arm-optimized-routines/pl/math/v_sinh_3u.c | 120 +- .../arm-optimized-routines/pl/math/v_sinhf_2u3.c | 91 +- .../arm-optimized-routines/pl/math/v_sinpi_3u1.c | 86 + .../arm-optimized-routines/pl/math/v_sinpif_3u.c | 81 + contrib/arm-optimized-routines/pl/math/v_tan_3u5.c | 124 +- .../arm-optimized-routines/pl/math/v_tan_data.c | 15 - .../arm-optimized-routines/pl/math/v_tanf_3u5.c | 134 +- contrib/arm-optimized-routines/pl/math/v_tanh_3u.c | 112 +- .../arm-optimized-routines/pl/math/v_tanhf_2u6.c | 80 +- .../arm-optimized-routines/pl/math/vn_acosh_3u5.c | 12 - .../arm-optimized-routines/pl/math/vn_acoshf_3u1.c | 12 - .../arm-optimized-routines/pl/math/vn_asinh_3u5.c | 12 - .../arm-optimized-routines/pl/math/vn_asinhf_2u7.c | 12 - .../arm-optimized-routines/pl/math/vn_atan2_3u.c | 12 - .../arm-optimized-routines/pl/math/vn_atan2f_3u.c | 12 - .../arm-optimized-routines/pl/math/vn_atan_2u5.c | 12 - .../arm-optimized-routines/pl/math/vn_atanf_3u.c | 12 - .../arm-optimized-routines/pl/math/vn_atanh_3u5.c | 12 - .../arm-optimized-routines/pl/math/vn_atanhf_3u1.c | 12 - .../arm-optimized-routines/pl/math/vn_cbrt_2u.c | 12 - .../arm-optimized-routines/pl/math/vn_cbrtf_1u5.c | 12 - .../arm-optimized-routines/pl/math/vn_cosh_2u.c | 12 - .../arm-optimized-routines/pl/math/vn_coshf_2u4.c | 12 - contrib/arm-optimized-routines/pl/math/vn_erf_2u.c | 12 - .../arm-optimized-routines/pl/math/vn_erfc_4u.c | 12 - .../arm-optimized-routines/pl/math/vn_erfcf_1u.c | 12 - .../arm-optimized-routines/pl/math/vn_erff_1u5.c | 12 - .../arm-optimized-routines/pl/math/vn_exp_tail.c | 11 - contrib/arm-optimized-routines/pl/math/vn_expf.c | 12 - .../arm-optimized-routines/pl/math/vn_expm1_2u5.c | 12 - .../arm-optimized-routines/pl/math/vn_expm1f_1u6.c | 12 - .../arm-optimized-routines/pl/math/vn_log10_2u5.c | 12 - .../arm-optimized-routines/pl/math/vn_log10f_3u5.c | 12 - .../arm-optimized-routines/pl/math/vn_log1p_2u5.c | 12 - .../arm-optimized-routines/pl/math/vn_log1pf_2u1.c | 12 - .../arm-optimized-routines/pl/math/vn_log2_3u.c | 12 - .../arm-optimized-routines/pl/math/vn_log2f_2u5.c | 12 - .../arm-optimized-routines/pl/math/vn_sinh_3u.c | 12 - .../arm-optimized-routines/pl/math/vn_sinhf_2u3.c | 12 - .../arm-optimized-routines/pl/math/vn_tan_3u5.c | 12 - .../arm-optimized-routines/pl/math/vn_tanf_3u5.c | 12 - .../arm-optimized-routines/pl/math/vn_tanh_3u.c | 12 - .../arm-optimized-routines/pl/math/vn_tanhf_2u6.c | 12 - .../string/aarch64/asmdefs.h | 14 + .../string/aarch64/memcpy-advsimd.S | 62 +- .../string/aarch64/memcpy-mops.S | 21 + .../string/aarch64/memmove-mops.S | 21 + .../string/aarch64/memset-mops.S | 20 + .../arm-optimized-routines/string/bench/memcpy.c | 5 +- .../string/include/stringlib.h | 7 +- .../arm-optimized-routines/string/test/memcpy.c | 5 +- .../arm-optimized-routines/string/test/memmove.c | 5 +- .../arm-optimized-routines/string/test/memset.c | 5 +- 414 files changed, 26613 insertions(+), 10731 deletions(-) diff --cc contrib/arm-optimized-routines/math/aarch64/v_cos.c index 000000000000,9a73575bce89..9a73575bce89 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/math/aarch64/v_cos.c +++ b/contrib/arm-optimized-routines/math/aarch64/v_cos.c diff --cc contrib/arm-optimized-routines/math/aarch64/v_cosf.c index 000000000000,b9890b2998ad..b9890b2998ad mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/math/aarch64/v_cosf.c +++ b/contrib/arm-optimized-routines/math/aarch64/v_cosf.c diff --cc contrib/arm-optimized-routines/math/aarch64/v_exp.c index 000000000000,bc5609faf4fc..bc5609faf4fc mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/math/aarch64/v_exp.c +++ b/contrib/arm-optimized-routines/math/aarch64/v_exp.c diff --cc contrib/arm-optimized-routines/math/aarch64/v_exp2f.c index 000000000000,e402205e98e6..e402205e98e6 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/math/aarch64/v_exp2f.c +++ b/contrib/arm-optimized-routines/math/aarch64/v_exp2f.c diff --cc contrib/arm-optimized-routines/math/aarch64/v_exp2f_1u.c index 000000000000,ba6b02fbb4bc..ba6b02fbb4bc mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/math/aarch64/v_exp2f_1u.c +++ b/contrib/arm-optimized-routines/math/aarch64/v_exp2f_1u.c diff --cc contrib/arm-optimized-routines/math/aarch64/v_exp_data.c index 000000000000,45f0848cac5b..45f0848cac5b mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/math/aarch64/v_exp_data.c +++ b/contrib/arm-optimized-routines/math/aarch64/v_exp_data.c diff --cc contrib/arm-optimized-routines/math/aarch64/v_expf.c index 000000000000,34e8b6081bcd..34e8b6081bcd mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/math/aarch64/v_expf.c +++ b/contrib/arm-optimized-routines/math/aarch64/v_expf.c diff --cc contrib/arm-optimized-routines/math/aarch64/v_expf_1u.c index 000000000000,43d03fa34efa..43d03fa34efa mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/math/aarch64/v_expf_1u.c +++ b/contrib/arm-optimized-routines/math/aarch64/v_expf_1u.c diff --cc contrib/arm-optimized-routines/math/aarch64/v_log.c index 000000000000,1d1c1fa62c04..1d1c1fa62c04 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/math/aarch64/v_log.c +++ b/contrib/arm-optimized-routines/math/aarch64/v_log.c diff --cc contrib/arm-optimized-routines/math/aarch64/v_log_data.c index 000000000000,82351bb14766..82351bb14766 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/math/aarch64/v_log_data.c +++ b/contrib/arm-optimized-routines/math/aarch64/v_log_data.c diff --cc contrib/arm-optimized-routines/math/aarch64/v_logf.c index 000000000000,66ebbbcd2b5a..66ebbbcd2b5a mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/math/aarch64/v_logf.c +++ b/contrib/arm-optimized-routines/math/aarch64/v_logf.c diff --cc contrib/arm-optimized-routines/math/aarch64/v_math.h index 000000000000,1dc9916c6fb0..1dc9916c6fb0 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/math/aarch64/v_math.h +++ b/contrib/arm-optimized-routines/math/aarch64/v_math.h diff --cc contrib/arm-optimized-routines/math/aarch64/v_pow.c index 000000000000,734f1663a283..734f1663a283 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/math/aarch64/v_pow.c +++ b/contrib/arm-optimized-routines/math/aarch64/v_pow.c diff --cc contrib/arm-optimized-routines/math/aarch64/v_powf.c index 000000000000,3a4163ab0558..3a4163ab0558 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/math/aarch64/v_powf.c +++ b/contrib/arm-optimized-routines/math/aarch64/v_powf.c diff --cc contrib/arm-optimized-routines/math/aarch64/v_sin.c index 000000000000,04129c31133d..04129c31133d mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/math/aarch64/v_sin.c +++ b/contrib/arm-optimized-routines/math/aarch64/v_sin.c diff --cc contrib/arm-optimized-routines/math/aarch64/v_sinf.c index 000000000000,336879844459..336879844459 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/math/aarch64/v_sinf.c +++ b/contrib/arm-optimized-routines/math/aarch64/v_sinf.c diff --cc contrib/arm-optimized-routines/math/exp10.c index 000000000000,0fbec4c694ca..0fbec4c694ca mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/math/exp10.c +++ b/contrib/arm-optimized-routines/math/exp10.c diff --cc contrib/arm-optimized-routines/math/test/testcases/directed/exp10.tst index 000000000000,2cf4273bd1d7..2cf4273bd1d7 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/math/test/testcases/directed/exp10.tst +++ b/contrib/arm-optimized-routines/math/test/testcases/directed/exp10.tst diff --cc contrib/arm-optimized-routines/math/tgamma128.c index 000000000000,65deacc49d99..65deacc49d99 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/math/tgamma128.c +++ b/contrib/arm-optimized-routines/math/tgamma128.c diff --cc contrib/arm-optimized-routines/math/tgamma128.h index 000000000000,90875a22dce4..90875a22dce4 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/math/tgamma128.h +++ b/contrib/arm-optimized-routines/math/tgamma128.h diff --cc contrib/arm-optimized-routines/math/tools/tgamma128_gen.jl index 000000000000,ecec174110ea..ecec174110ea mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/math/tools/tgamma128_gen.jl +++ b/contrib/arm-optimized-routines/math/tools/tgamma128_gen.jl diff --cc contrib/arm-optimized-routines/pl/math/acos_2u.c index 000000000000,9ec6894f1d81..9ec6894f1d81 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/acos_2u.c +++ b/contrib/arm-optimized-routines/pl/math/acos_2u.c diff --cc contrib/arm-optimized-routines/pl/math/acosf_1u4.c index 000000000000,6dde422ef85a..6dde422ef85a mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/acosf_1u4.c +++ b/contrib/arm-optimized-routines/pl/math/acosf_1u4.c diff --cc contrib/arm-optimized-routines/pl/math/asin_3u.c index 000000000000,0b50995449ce..0b50995449ce mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/asin_3u.c +++ b/contrib/arm-optimized-routines/pl/math/asin_3u.c diff --cc contrib/arm-optimized-routines/pl/math/asin_data.c index 000000000000,b5517731c7f4..b5517731c7f4 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/asin_data.c +++ b/contrib/arm-optimized-routines/pl/math/asin_data.c diff --cc contrib/arm-optimized-routines/pl/math/asinf_2u5.c index 000000000000,ec608146ff66..ec608146ff66 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/asinf_2u5.c +++ b/contrib/arm-optimized-routines/pl/math/asinf_2u5.c diff --cc contrib/arm-optimized-routines/pl/math/asinf_data.c index 000000000000,1652025e2920..1652025e2920 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/asinf_data.c +++ b/contrib/arm-optimized-routines/pl/math/asinf_data.c diff --cc contrib/arm-optimized-routines/pl/math/cospi_3u1.c index 000000000000,4a688a076829..4a688a076829 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/cospi_3u1.c +++ b/contrib/arm-optimized-routines/pl/math/cospi_3u1.c diff --cc contrib/arm-optimized-routines/pl/math/cospif_2u6.c index 000000000000,d78a98ed8b2d..d78a98ed8b2d mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/cospif_2u6.c +++ b/contrib/arm-optimized-routines/pl/math/cospif_2u6.c diff --cc contrib/arm-optimized-routines/pl/math/erf_2u5.c index 000000000000,3ca2a1332c1f..3ca2a1332c1f mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/erf_2u5.c +++ b/contrib/arm-optimized-routines/pl/math/erf_2u5.c diff --cc contrib/arm-optimized-routines/pl/math/erf_data.c index 000000000000,138e03578e77..138e03578e77 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/erf_data.c +++ b/contrib/arm-optimized-routines/pl/math/erf_data.c diff --cc contrib/arm-optimized-routines/pl/math/erfc_1u8.c index 000000000000,7f2004e9335d..7f2004e9335d mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/erfc_1u8.c +++ b/contrib/arm-optimized-routines/pl/math/erfc_1u8.c diff --cc contrib/arm-optimized-routines/pl/math/erfcf_1u7.c index 000000000000,c8ce95cca058..c8ce95cca058 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/erfcf_1u7.c +++ b/contrib/arm-optimized-routines/pl/math/erfcf_1u7.c diff --cc contrib/arm-optimized-routines/pl/math/erff_2u.c index 000000000000,f43e647072f8..f43e647072f8 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/erff_2u.c +++ b/contrib/arm-optimized-routines/pl/math/erff_2u.c diff --cc contrib/arm-optimized-routines/pl/math/erfinv_24u5.c index 000000000000,20e1e361befc..20e1e361befc mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/erfinv_24u5.c +++ b/contrib/arm-optimized-routines/pl/math/erfinv_24u5.c diff --cc contrib/arm-optimized-routines/pl/math/erfinvf_4u7.c index 000000000000,40736da08be8..40736da08be8 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/erfinvf_4u7.c +++ b/contrib/arm-optimized-routines/pl/math/erfinvf_4u7.c diff --cc contrib/arm-optimized-routines/pl/math/erfinvl.c index 000000000000,ea4aadfccd00..ea4aadfccd00 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/erfinvl.c +++ b/contrib/arm-optimized-routines/pl/math/erfinvl.c diff --cc contrib/arm-optimized-routines/pl/math/finite_pow.h index 000000000000,8944d4fae625..8944d4fae625 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/finite_pow.h +++ b/contrib/arm-optimized-routines/pl/math/finite_pow.h diff --cc contrib/arm-optimized-routines/pl/math/poly_advsimd_f32.h index 000000000000,438e153dff90..438e153dff90 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/poly_advsimd_f32.h +++ b/contrib/arm-optimized-routines/pl/math/poly_advsimd_f32.h diff --cc contrib/arm-optimized-routines/pl/math/poly_advsimd_f64.h index 000000000000,7ea249a91225..7ea249a91225 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/poly_advsimd_f64.h +++ b/contrib/arm-optimized-routines/pl/math/poly_advsimd_f64.h diff --cc contrib/arm-optimized-routines/pl/math/poly_generic.h index 000000000000,3fc25f8762f2..3fc25f8762f2 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/poly_generic.h +++ b/contrib/arm-optimized-routines/pl/math/poly_generic.h diff --cc contrib/arm-optimized-routines/pl/math/poly_scalar_f32.h index 000000000000,a9b1c5544494..a9b1c5544494 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/poly_scalar_f32.h +++ b/contrib/arm-optimized-routines/pl/math/poly_scalar_f32.h diff --cc contrib/arm-optimized-routines/pl/math/poly_scalar_f64.h index 000000000000,207dccee30ad..207dccee30ad mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/poly_scalar_f64.h +++ b/contrib/arm-optimized-routines/pl/math/poly_scalar_f64.h diff --cc contrib/arm-optimized-routines/pl/math/poly_sve_f32.h index 000000000000,a97e2ced027a..a97e2ced027a mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/poly_sve_f32.h +++ b/contrib/arm-optimized-routines/pl/math/poly_sve_f32.h diff --cc contrib/arm-optimized-routines/pl/math/poly_sve_f64.h index 000000000000,5fb14b3c1700..5fb14b3c1700 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/poly_sve_f64.h +++ b/contrib/arm-optimized-routines/pl/math/poly_sve_f64.h diff --cc contrib/arm-optimized-routines/pl/math/poly_sve_generic.h index 000000000000,b568e4cddff3..b568e4cddff3 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/poly_sve_generic.h +++ b/contrib/arm-optimized-routines/pl/math/poly_sve_generic.h diff --cc contrib/arm-optimized-routines/pl/math/sinpi_3u.c index 000000000000,a04a352a62e6..a04a352a62e6 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sinpi_3u.c +++ b/contrib/arm-optimized-routines/pl/math/sinpi_3u.c diff --cc contrib/arm-optimized-routines/pl/math/sinpif_2u5.c index 000000000000,af9ca0573b37..af9ca0573b37 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sinpif_2u5.c +++ b/contrib/arm-optimized-routines/pl/math/sinpif_2u5.c diff --cc contrib/arm-optimized-routines/pl/math/sv_acos_2u.c index 000000000000,e06db6cae6af..e06db6cae6af mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_acos_2u.c +++ b/contrib/arm-optimized-routines/pl/math/sv_acos_2u.c diff --cc contrib/arm-optimized-routines/pl/math/sv_acosf_1u4.c index 000000000000,7ac59ceedfbd..7ac59ceedfbd mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_acosf_1u4.c +++ b/contrib/arm-optimized-routines/pl/math/sv_acosf_1u4.c diff --cc contrib/arm-optimized-routines/pl/math/sv_acosh_3u5.c index 000000000000,faf351331464..faf351331464 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_acosh_3u5.c +++ b/contrib/arm-optimized-routines/pl/math/sv_acosh_3u5.c diff --cc contrib/arm-optimized-routines/pl/math/sv_acoshf_2u8.c index 000000000000,f527083af40a..f527083af40a mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_acoshf_2u8.c +++ b/contrib/arm-optimized-routines/pl/math/sv_acoshf_2u8.c diff --cc contrib/arm-optimized-routines/pl/math/sv_asin_3u.c index 000000000000,c3dd37b145ae..c3dd37b145ae mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_asin_3u.c +++ b/contrib/arm-optimized-routines/pl/math/sv_asin_3u.c diff --cc contrib/arm-optimized-routines/pl/math/sv_asinf_2u5.c index 000000000000,8e9edc2439f5..8e9edc2439f5 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_asinf_2u5.c +++ b/contrib/arm-optimized-routines/pl/math/sv_asinf_2u5.c diff --cc contrib/arm-optimized-routines/pl/math/sv_asinh_3u0.c index 000000000000,711f0dfdbedc..711f0dfdbedc mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_asinh_3u0.c +++ b/contrib/arm-optimized-routines/pl/math/sv_asinh_3u0.c diff --cc contrib/arm-optimized-routines/pl/math/sv_asinhf_2u5.c index 000000000000,1f1f6e5c846f..1f1f6e5c846f mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_asinhf_2u5.c +++ b/contrib/arm-optimized-routines/pl/math/sv_asinhf_2u5.c diff --cc contrib/arm-optimized-routines/pl/math/sv_atanh_3u3.c index 000000000000,dcc9350b4962..dcc9350b4962 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_atanh_3u3.c +++ b/contrib/arm-optimized-routines/pl/math/sv_atanh_3u3.c diff --cc contrib/arm-optimized-routines/pl/math/sv_atanhf_2u8.c index 000000000000,413c60ce05da..413c60ce05da mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_atanhf_2u8.c +++ b/contrib/arm-optimized-routines/pl/math/sv_atanhf_2u8.c diff --cc contrib/arm-optimized-routines/pl/math/sv_cbrt_2u.c index 000000000000,192f1cd80d59..192f1cd80d59 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_cbrt_2u.c +++ b/contrib/arm-optimized-routines/pl/math/sv_cbrt_2u.c diff --cc contrib/arm-optimized-routines/pl/math/sv_cbrtf_1u7.c index 000000000000,5b625f308827..5b625f308827 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_cbrtf_1u7.c +++ b/contrib/arm-optimized-routines/pl/math/sv_cbrtf_1u7.c diff --cc contrib/arm-optimized-routines/pl/math/sv_cexpi_3u5.c index 000000000000,920acfea5da0..920acfea5da0 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_cexpi_3u5.c +++ b/contrib/arm-optimized-routines/pl/math/sv_cexpi_3u5.c diff --cc contrib/arm-optimized-routines/pl/math/sv_cexpif_1u8.c index 000000000000,93f2f998cb38..93f2f998cb38 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_cexpif_1u8.c +++ b/contrib/arm-optimized-routines/pl/math/sv_cexpif_1u8.c diff --cc contrib/arm-optimized-routines/pl/math/sv_cosh_2u.c index 000000000000,a6d743fb9b96..a6d743fb9b96 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_cosh_2u.c +++ b/contrib/arm-optimized-routines/pl/math/sv_cosh_2u.c diff --cc contrib/arm-optimized-routines/pl/math/sv_coshf_2u.c index 000000000000,81680fef318e..81680fef318e mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_coshf_2u.c +++ b/contrib/arm-optimized-routines/pl/math/sv_coshf_2u.c diff --cc contrib/arm-optimized-routines/pl/math/sv_cospi_3u2.c index 000000000000,d80f899c41e4..d80f899c41e4 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_cospi_3u2.c +++ b/contrib/arm-optimized-routines/pl/math/sv_cospi_3u2.c diff --cc contrib/arm-optimized-routines/pl/math/sv_cospif_2u6.c index 000000000000,fb2922d0533a..fb2922d0533a mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_cospif_2u6.c +++ b/contrib/arm-optimized-routines/pl/math/sv_cospif_2u6.c diff --cc contrib/arm-optimized-routines/pl/math/sv_erf_2u5.c index 000000000000,cbf9718e5bb0..cbf9718e5bb0 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_erf_2u5.c +++ b/contrib/arm-optimized-routines/pl/math/sv_erf_2u5.c diff --cc contrib/arm-optimized-routines/pl/math/sv_erf_data.c index 000000000000,7244aceda5a5..7244aceda5a5 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_erf_data.c +++ b/contrib/arm-optimized-routines/pl/math/sv_erf_data.c diff --cc contrib/arm-optimized-routines/pl/math/sv_erfc_1u8.c index 000000000000,a91bef96f2e7..a91bef96f2e7 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_erfc_1u8.c +++ b/contrib/arm-optimized-routines/pl/math/sv_erfc_1u8.c diff --cc contrib/arm-optimized-routines/pl/math/sv_erfcf_1u7.c index 000000000000,cda8f0b3752e..cda8f0b3752e mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_erfcf_1u7.c +++ b/contrib/arm-optimized-routines/pl/math/sv_erfcf_1u7.c diff --cc contrib/arm-optimized-routines/pl/math/sv_erff_2u.c index 000000000000,adeee798ee2e..adeee798ee2e mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_erff_2u.c +++ b/contrib/arm-optimized-routines/pl/math/sv_erff_2u.c diff --cc contrib/arm-optimized-routines/pl/math/sv_erff_data.c index 000000000000,154d3c188874..154d3c188874 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_erff_data.c +++ b/contrib/arm-optimized-routines/pl/math/sv_erff_data.c diff --cc contrib/arm-optimized-routines/pl/math/sv_exp10_1u5.c index 000000000000,519693afcab0..519693afcab0 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_exp10_1u5.c +++ b/contrib/arm-optimized-routines/pl/math/sv_exp10_1u5.c diff --cc contrib/arm-optimized-routines/pl/math/sv_exp10f_1u5.c index 000000000000,9ecde8f1aa52..9ecde8f1aa52 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_exp10f_1u5.c +++ b/contrib/arm-optimized-routines/pl/math/sv_exp10f_1u5.c diff --cc contrib/arm-optimized-routines/pl/math/sv_exp2_2u.c index 000000000000,dcbca8adddd1..dcbca8adddd1 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_exp2_2u.c +++ b/contrib/arm-optimized-routines/pl/math/sv_exp2_2u.c diff --cc contrib/arm-optimized-routines/pl/math/sv_exp2f_1u6.c index 000000000000,9698ff6f0682..9698ff6f0682 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_exp2f_1u6.c +++ b/contrib/arm-optimized-routines/pl/math/sv_exp2f_1u6.c diff --cc contrib/arm-optimized-routines/pl/math/sv_exp_1u5.c index 000000000000,c187def9e625..c187def9e625 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_exp_1u5.c +++ b/contrib/arm-optimized-routines/pl/math/sv_exp_1u5.c diff --cc contrib/arm-optimized-routines/pl/math/sv_expf_inline.h index 000000000000,0ef4e0fda946..0ef4e0fda946 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_expf_inline.h +++ b/contrib/arm-optimized-routines/pl/math/sv_expf_inline.h diff --cc contrib/arm-optimized-routines/pl/math/sv_expm1_2u5.c index 000000000000,82a31f6d9c0e..82a31f6d9c0e mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_expm1_2u5.c +++ b/contrib/arm-optimized-routines/pl/math/sv_expm1_2u5.c diff --cc contrib/arm-optimized-routines/pl/math/sv_expm1f_1u6.c index 000000000000,0ec7c00f5300..0ec7c00f5300 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_expm1f_1u6.c +++ b/contrib/arm-optimized-routines/pl/math/sv_expm1f_1u6.c diff --cc contrib/arm-optimized-routines/pl/math/sv_expm1f_inline.h index 000000000000,a6e2050ff4a6..a6e2050ff4a6 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_expm1f_inline.h +++ b/contrib/arm-optimized-routines/pl/math/sv_expm1f_inline.h diff --cc contrib/arm-optimized-routines/pl/math/sv_hypot_1u5.c index 000000000000,cf1590e4b9ab..cf1590e4b9ab mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_hypot_1u5.c +++ b/contrib/arm-optimized-routines/pl/math/sv_hypot_1u5.c diff --cc contrib/arm-optimized-routines/pl/math/sv_hypotf_1u5.c index 000000000000,f428832b3dbc..f428832b3dbc mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_hypotf_1u5.c +++ b/contrib/arm-optimized-routines/pl/math/sv_hypotf_1u5.c diff --cc contrib/arm-optimized-routines/pl/math/sv_log1p_2u5.c index 000000000000,f178ab16238a..f178ab16238a mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_log1p_2u5.c +++ b/contrib/arm-optimized-routines/pl/math/sv_log1p_2u5.c diff --cc contrib/arm-optimized-routines/pl/math/sv_log1p_inline.h index 000000000000,983f8e1b0413..983f8e1b0413 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_log1p_inline.h +++ b/contrib/arm-optimized-routines/pl/math/sv_log1p_inline.h diff --cc contrib/arm-optimized-routines/pl/math/sv_log1pf_1u3.c index 000000000000,ea1a3dbf723a..ea1a3dbf723a mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_log1pf_1u3.c +++ b/contrib/arm-optimized-routines/pl/math/sv_log1pf_1u3.c diff --cc contrib/arm-optimized-routines/pl/math/sv_log1pf_inline.h index 000000000000,d13b094f6b5d..d13b094f6b5d mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_log1pf_inline.h +++ b/contrib/arm-optimized-routines/pl/math/sv_log1pf_inline.h diff --cc contrib/arm-optimized-routines/pl/math/sv_pow_1u5.c index 000000000000,0838810206a1..0838810206a1 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_pow_1u5.c +++ b/contrib/arm-optimized-routines/pl/math/sv_pow_1u5.c diff --cc contrib/arm-optimized-routines/pl/math/sv_powf_2u6.c index 000000000000,2db0636aea62..2db0636aea62 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_powf_2u6.c +++ b/contrib/arm-optimized-routines/pl/math/sv_powf_2u6.c diff --cc contrib/arm-optimized-routines/pl/math/sv_sin_3u5.c index 000000000000,a81f3fc80f3d..a81f3fc80f3d mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_sin_3u5.c +++ b/contrib/arm-optimized-routines/pl/math/sv_sin_3u5.c diff --cc contrib/arm-optimized-routines/pl/math/sv_sincos_3u5.c index 000000000000,f73550082d5b..f73550082d5b mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_sincos_3u5.c +++ b/contrib/arm-optimized-routines/pl/math/sv_sincos_3u5.c diff --cc contrib/arm-optimized-routines/pl/math/sv_sincos_common.h index 000000000000,f7b58deb90bd..f7b58deb90bd mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_sincos_common.h +++ b/contrib/arm-optimized-routines/pl/math/sv_sincos_common.h diff --cc contrib/arm-optimized-routines/pl/math/sv_sincosf_1u8.c index 000000000000,c335de8d3dbb..c335de8d3dbb mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_sincosf_1u8.c +++ b/contrib/arm-optimized-routines/pl/math/sv_sincosf_1u8.c diff --cc contrib/arm-optimized-routines/pl/math/sv_sincosf_common.h index 000000000000,714e996443b3..714e996443b3 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_sincosf_common.h +++ b/contrib/arm-optimized-routines/pl/math/sv_sincosf_common.h diff --cc contrib/arm-optimized-routines/pl/math/sv_sinh_3u.c index 000000000000,a01e19caecda..a01e19caecda mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_sinh_3u.c +++ b/contrib/arm-optimized-routines/pl/math/sv_sinh_3u.c diff --cc contrib/arm-optimized-routines/pl/math/sv_sinhf_2u3.c index 000000000000,e34ecf378ad3..e34ecf378ad3 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_sinhf_2u3.c +++ b/contrib/arm-optimized-routines/pl/math/sv_sinhf_2u3.c diff --cc contrib/arm-optimized-routines/pl/math/sv_sinpi_3u1.c index 000000000000,c9f23da1b19b..c9f23da1b19b mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_sinpi_3u1.c +++ b/contrib/arm-optimized-routines/pl/math/sv_sinpi_3u1.c diff --cc contrib/arm-optimized-routines/pl/math/sv_sinpif_2u5.c index 000000000000,ac3f924bed68..ac3f924bed68 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_sinpif_2u5.c +++ b/contrib/arm-optimized-routines/pl/math/sv_sinpif_2u5.c diff --cc contrib/arm-optimized-routines/pl/math/sv_tan_3u5.c index 000000000000,746396e98a10..746396e98a10 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_tan_3u5.c +++ b/contrib/arm-optimized-routines/pl/math/sv_tan_3u5.c diff --cc contrib/arm-optimized-routines/pl/math/sv_tanh_3u.c index 000000000000,f54139f1ddbc..f54139f1ddbc mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_tanh_3u.c +++ b/contrib/arm-optimized-routines/pl/math/sv_tanh_3u.c diff --cc contrib/arm-optimized-routines/pl/math/sv_tanhf_2u6.c index 000000000000,988a56de0b2e..988a56de0b2e mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/sv_tanhf_2u6.c +++ b/contrib/arm-optimized-routines/pl/math/sv_tanhf_2u6.c diff --cc contrib/arm-optimized-routines/pl/math/test/testcases/directed/acos.tst index 000000000000,a73dcd25965b..a73dcd25965b mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/test/testcases/directed/acos.tst +++ b/contrib/arm-optimized-routines/pl/math/test/testcases/directed/acos.tst diff --cc contrib/arm-optimized-routines/pl/math/test/testcases/directed/acosf.tst index 000000000000,9e453e3bff5e..9e453e3bff5e mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/test/testcases/directed/acosf.tst +++ b/contrib/arm-optimized-routines/pl/math/test/testcases/directed/acosf.tst diff --cc contrib/arm-optimized-routines/pl/math/test/testcases/directed/asin.tst index 000000000000,6180d7849d90..6180d7849d90 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/test/testcases/directed/asin.tst +++ b/contrib/arm-optimized-routines/pl/math/test/testcases/directed/asin.tst diff --cc contrib/arm-optimized-routines/pl/math/test/testcases/directed/asinf.tst index 000000000000,a85b2593768d..a85b2593768d mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/test/testcases/directed/asinf.tst +++ b/contrib/arm-optimized-routines/pl/math/test/testcases/directed/asinf.tst diff --cc contrib/arm-optimized-routines/pl/math/tools/asin.sollya index 000000000000,8ef861d0898b..8ef861d0898b mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/tools/asin.sollya +++ b/contrib/arm-optimized-routines/pl/math/tools/asin.sollya diff --cc contrib/arm-optimized-routines/pl/math/tools/asinf.sollya index 000000000000,5b627e546c73..5b627e546c73 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/tools/asinf.sollya +++ b/contrib/arm-optimized-routines/pl/math/tools/asinf.sollya diff --cc contrib/arm-optimized-routines/pl/math/tools/erf.sollya index 000000000000,b2fc559b511e..b2fc559b511e mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/tools/erf.sollya +++ b/contrib/arm-optimized-routines/pl/math/tools/erf.sollya diff --cc contrib/arm-optimized-routines/pl/math/tools/erff.sollya index 000000000000,59b23ef021f0..59b23ef021f0 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/tools/erff.sollya +++ b/contrib/arm-optimized-routines/pl/math/tools/erff.sollya diff --cc contrib/arm-optimized-routines/pl/math/tools/exp10.sollya index 000000000000,9f30b4018209..9f30b4018209 mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/tools/exp10.sollya +++ b/contrib/arm-optimized-routines/pl/math/tools/exp10.sollya diff --cc contrib/arm-optimized-routines/pl/math/tools/sincos.sollya index 000000000000,7d36266b446b..7d36266b446b mode 000000,100644..100644 --- a/contrib/arm-optimized-routines/pl/math/tools/sincos.sollya +++ b/contrib/arm-optimized-routines/pl/math/tools/sincos.sollya *** 205 LINES SKIPPED *** From nobody Thu Feb 29 12:04:09 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlqdP6zTWz5C3D7; Thu, 29 Feb 2024 12:04: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 4TlqdP6Qlqz4DC7; Thu, 29 Feb 2024 12:04:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709208249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sXaXplzDrW7cj3GiOB6ekuQNxoOgF67KWYcpfc4S69o=; b=MtRnOMxh292XMkXDvAjRLlCHSaByidFfi7EqATaeGgZOVg2go4XgRW2ky3gLUtdh4J8NcJ LjbSYNsj2g4wfAicyhk6OZAzjPvQ8MyKZKMA6keMot37DtItMqB7MdCyGzczR1zw0f7ZG1 tV8kTurx/rBNHScA0V1OZxZaWTtEqOvi/+l40QKfFB4XDY0C2X6S3gJAe+QKdF1a89ekOx dhSJkJcrkV+ZSzVboL2LxQiEahaiwJwx21ID9GZWv76jDhyXTKYMlB9JDPEHuMRT8NWQ85 PmreSitBcGe9SXLmvvVE/ADjYK+adB5d6OM/UN+TTVJ4EtYDCm1znA4Kk9o5FQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709208249; a=rsa-sha256; cv=none; b=Aq+lv4EQzG7FaaU8lIQ7bSredTlm5dTti/gkwWhwg4NnLNUkaXiwOrrZHIQETGgw+dEgNK Bu++wJTfkjTrd5pSPA0nRrRRo09cNBtCh9ZW/6HVX53VSq4tc9GHddmCeCMgWr2gm6lMeH 0FQM6xR0DFRagTlT92WpwPnR/nQGFSMuekrDhAP2vUxJEkgvJ5xNdWPM7nTyXk0/30ETHJ BjAAUtttbpj5/paxEnoQhOo0HUWABu2yHXNCt5ir9MEGSz3rOMUcyn3YSG+nqYt4OdR7yR kAa/7auudhxCF3BNEHzU57r9GWIk5BzaZ2pG8/sOJyZyWGl1J05iQ1N48DflRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709208249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sXaXplzDrW7cj3GiOB6ekuQNxoOgF67KWYcpfc4S69o=; b=lJzF4zgwduS1Yqpig09Ct2oh/PihhRv5zLU7FPR7l1cVtnlOXnQx/IyBuibG3ZSYRF2Mxy v+pBTkcnUpZeL6dEIw/lsHeaL0C3kk8YWXEyW3YYLF729a0htXVxWfgn1mxTEKTe8LWiQs IXUlVgSmuwPzDWMm03u+CNNoxcBXBx2T4RR2wf1+WSIkNNuXaCA+BBGnFUc7YJeO8rF8GF ynjEiri2qtqbvl9rggtWNmiZ+wgn461xtSdddD7+YMuGkstwMft6lGCzqdFPcJoNQ/b/oH uNqCMYXSvnj3I2ylsswwjqmL6j3KV04lsuBqywrNBdwcv73MunaANP6OdyIvfw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlqdP62MDzh0N; Thu, 29 Feb 2024 12:04: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 41TC49B4083227; Thu, 29 Feb 2024 12:04:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41TC492M083224; Thu, 29 Feb 2024 12:04:09 GMT (envelope-from git) Date: Thu, 29 Feb 2024 12:04:09 GMT Message-Id: <202402291204.41TC492M083224@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: 8fe86d923f83 - main - usbconfig: allow to get usb vendors and products from the usb.ids database List-Id: Commit messages for the main 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: 8fe86d923f83ffdfed44f3b67b55287bf7cf3ce1 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=8fe86d923f83ffdfed44f3b67b55287bf7cf3ce1 commit 8fe86d923f83ffdfed44f3b67b55287bf7cf3ce1 Author: Baptiste Daroussin AuthorDate: 2024-02-27 17:12:38 +0000 Commit: Baptiste Daroussin CommitDate: 2024-02-29 12:01:06 +0000 usbconfig: allow to get usb vendors and products from the usb.ids database Reviewed by: emaste, manu Differential Revision: https://reviews.freebsd.org/D3392 --- usr.sbin/usbconfig/dump.c | 150 ++++++++++++++++++++++++++++++++++++++++- usr.sbin/usbconfig/pathnames.h | 4 ++ 2 files changed, 153 insertions(+), 1 deletion(-) diff --git a/usr.sbin/usbconfig/dump.c b/usr.sbin/usbconfig/dump.c index d7ea8b93011a..36f026bfc2fb 100644 --- a/usr.sbin/usbconfig/dump.c +++ b/usr.sbin/usbconfig/dump.c @@ -2,6 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2024 Baptiste Daroussin * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -25,6 +26,8 @@ * SUCH DAMAGE. */ +#include + #include #include #include @@ -38,12 +41,28 @@ #include #include "dump.h" +#include "pathnames.h" #define DUMP0(n,type,field,...) dump_field(pdev, " ", #field, n->field); #define DUMP1(n,type,field,...) dump_field(pdev, " ", #field, n->field); #define DUMP2(n,type,field,...) dump_field(pdev, " ", #field, n->field); #define DUMP3(n,type,field,...) dump_field(pdev, " ", #field, n->field); +struct usb_product_info { + STAILQ_ENTRY(usb_product_info) link; + int id; + char *desc; +}; + +struct usb_vendor_info { + STAILQ_ENTRY(usb_vendor_info) link; + STAILQ_HEAD(,usb_product_info) devs; + int id; + char *desc; +}; + +STAILQ_HEAD(usb_vendors, usb_vendor_info); + const char * dump_mode(uint8_t value) { @@ -293,22 +312,151 @@ dump_iface(struct libusb20_device *pdev, } } +static struct usb_vendors * +load_vendors(void) +{ + const char *dbf; + FILE *db = NULL; + struct usb_vendor_info *cv; + struct usb_product_info *cd; + struct usb_vendors *usb_vendors; + char buf[1024], str[1024]; + char *ch; + int id; + + usb_vendors = malloc(sizeof(*usb_vendors)); + if (usb_vendors == NULL) + err(1, "out of memory"); + STAILQ_INIT(usb_vendors); + if ((dbf = getenv("USB_VENDOR_DATABASE")) != NULL) + db = fopen(dbf, "r"); + if (db == NULL) { + dbf = _PATH_LUSBVDB; + if ((db = fopen(dbf, "r")) == NULL) { + dbf = _PATH_USBVDB; + if ((db = fopen(dbf, "r")) == NULL) + return (usb_vendors); + } + } + cv = NULL; + cd = NULL; + + for (;;) { + if (fgets(buf, sizeof(buf), db) == NULL) + break; + + if ((ch = strchr(buf, '#')) != NULL) + *ch = '\0'; + if (ch == buf) + continue; + ch = strchr(buf, '\0') - 1; + while (ch > buf && isspace(*ch)) + *ch-- = '\0'; + if (ch <= buf) + continue; + + /* Can't handle subvendor / subdevice entries yet */ + if (buf[0] == '\t' && buf[1] == '\t') + continue; + + /* Check for vendor entry */ + if (buf[0] != '\t' && sscanf(buf, "%04x %[^\n]", &id, str) == 2) { + if ((id == 0) || (strlen(str) < 1)) + continue; + if ((cv = malloc(sizeof(struct usb_vendor_info))) == NULL) + err(1, "out of memory"); + if ((cv->desc = strdup(str)) == NULL) + err(1, "out of memory"); + cv->id = id; + STAILQ_INIT(&cv->devs); + STAILQ_INSERT_TAIL(usb_vendors, cv, link); + continue; + } + + /* Check for device entry */ + if (buf[0] == '\t' && sscanf(buf + 1, "%04x %[^\n]", &id, str) == 2) { + if ((id == 0) || (strlen(str) < 1)) + continue; + if (cv == NULL) + continue; + if ((cd = malloc(sizeof(struct usb_product_info))) == NULL) + err(1, "out of memory"); + if ((cd->desc = strdup(str)) == NULL) + err(1, "out of memory"); + cd->id = id; + STAILQ_INSERT_TAIL(&cv->devs, cd, link); + continue; + } + } + if (ferror(db)) + err(1, "error reading the usb id db"); + + fclose(db); + /* cleanup */ + return (usb_vendors); +} + +static char * +_device_desc(struct libusb20_device *pdev) +{ + static struct usb_vendors *usb_vendors = NULL; + char *desc = NULL; + const char *vendor = NULL, *product = NULL; + uint16_t vid = libusb20_dev_get_device_desc(pdev)->idVendor; + uint16_t pid = libusb20_dev_get_device_desc(pdev)->idProduct; + struct usb_vendor_info *vi; + struct usb_product_info *pi; + + if (usb_vendors == NULL) + usb_vendors = load_vendors(); + + STAILQ_FOREACH(vi, usb_vendors, link) { + if (vi->id == vid) { + vendor = vi->desc; + break; + } + } + if (vi != NULL) { + STAILQ_FOREACH(pi, &vi->devs, link) { + if (pi->id == pid) { + product = pi->desc; + break; + } + } + } + if (vendor == NULL || product == NULL) + return (NULL); + + asprintf(&desc, "ugen%u.%u: <%s %s> at usbus%u", + libusb20_dev_get_bus_number(pdev), + libusb20_dev_get_address(pdev), + product, vendor, + libusb20_dev_get_bus_number(pdev)); + + + return (desc); +} + void dump_device_info(struct libusb20_device *pdev, uint8_t show_ifdrv) { char buf[128]; uint8_t n; unsigned int usage; + char *desc; usage = libusb20_dev_get_power_usage(pdev); + desc = _device_desc(pdev); + printf("%s, cfg=%u md=%s spd=%s pwr=%s (%umA)\n", - libusb20_dev_get_desc(pdev), + desc ? desc : libusb20_dev_get_desc(pdev), libusb20_dev_get_config_index(pdev), dump_mode(libusb20_dev_get_mode(pdev)), dump_speed(libusb20_dev_get_speed(pdev)), dump_power_mode(libusb20_dev_get_power_mode(pdev)), usage); + free(desc); if (!show_ifdrv) return; diff --git a/usr.sbin/usbconfig/pathnames.h b/usr.sbin/usbconfig/pathnames.h new file mode 100644 index 000000000000..66053a9a87c5 --- /dev/null +++ b/usr.sbin/usbconfig/pathnames.h @@ -0,0 +1,4 @@ +#include + +#define _PATH_USBVDB "/usr/share/misc/usb_vendors" +#define _PATH_LUSBVDB _PATH_LOCALBASE "/share/usbids/usb.ids" From nobody Thu Feb 29 12:04:10 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlqdR2LKnz5C35t; Thu, 29 Feb 2024 12:04: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 4TlqdR1lNCz4DFR; Thu, 29 Feb 2024 12:04:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709208251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XINyPL9bU7eElpylNtxG14zpG+EJ5nJMGoHIfkK0l+c=; b=oliZMUmRnv5uFNRfGm3WFISLclDYXxtBrn3erVSYP56R/QfZskfa5uR8s/5UQ5rDhuHyho ELGFZpWuwnwfFdbuB0uExy9dXHG7FzXqaDGjHn3NGKwXeO0r3fRXBEj10N3mY5L/uVKaWI xX4KnQ188ycHOtHK5zXpAX6xzoV5XQSstU5DZcAhjw3jVywbIRxNNkZidKG4h02Om6Eot3 3jkAhifXRGL2sbg8jHa/sCvhoRszRC8ptf30nJWrON3i0Wi8gyau5OOpkxIYPVmAFMOD8d y+EiGhVwr5wH/ICKHp6XC1MefHyYXF7oDEAEdP7EukUeYyX2tq1MS40C3dcBfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709208251; a=rsa-sha256; cv=none; b=BmmaFLKKra6BzHT1L7lZ9tNnfSe1/+F4Ys/PWF2rxDb6SKon3CLG2TICEh0FLQoMiivurR Luhs7FTp2qoZzCjKRl6B6dEnmpQrK2lA+Bhr9yPu72Oexy3u/ZjpzUPDdbLszN0JnDbELp gaSWz4SVQ4qwKr7Q5VYo5GfFKGQQdkAze5SMAm2rznZiKX8Fgu9OQIy8Kxl64sbHoQo+b5 jDupJ5W6lW46pZ4M1QW+KME6TJSwErYGr1Eq9zX60gWf3HfsteoyqUT7HjZyuvsemuNKkf 74cy/rjXmswJZGNl7UQuR4/B0XKvfOF4hxnYhU3Y2+dBYP4gtW8qIVh2NSPpXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709208251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XINyPL9bU7eElpylNtxG14zpG+EJ5nJMGoHIfkK0l+c=; b=Q+giS6apC5oepuHeTGeKlQjAryUmvJxtdzz1UIaWvzTJ6LYuEO1IoE4cSoBqyq8KIxXkjF Hi/uFIM7g+9dKwtuDE3QjfWD+Q3J0Jo7+HLpQxyRa74/66B1fBuSP9UCJF490wxpE22HDJ A0wZ7mpBh0Vpua7nxR/pI2HV74H3DTl6L/ZiBIVgBQiY7Gs/rCho2JxAcVTcVXm1xtJlfE UkWlYQEdR3D7Rm8KJ+Cu3gncDcIMJR8wn2x9qHC66HrwwVjhfW2eI6hHSrzKDJqJc9gTcn 6SwvfqW4V7qIUobwREENOtBD47D2xa0219/Pa8ybNeNzWK/ki7p/HKnpuN/WLQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlqdR1Lf3zh7k; Thu, 29 Feb 2024 12:04: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 41TC4BjX083266; Thu, 29 Feb 2024 12:04:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41TC4AD8083263; Thu, 29 Feb 2024 12:04:10 GMT (envelope-from git) Date: Thu, 29 Feb 2024 12:04:10 GMT Message-Id: <202402291204.41TC4AD8083263@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: db1d086b7372 - main - usb_vendors: add new usb_vendors List-Id: Commit messages for the main 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: db1d086b7372d1d3f4e7a475d8e92642e698c25d Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=db1d086b7372d1d3f4e7a475d8e92642e698c25d commit db1d086b7372d1d3f4e7a475d8e92642e698c25d Author: Baptiste Daroussin AuthorDate: 2024-02-29 12:02:46 +0000 Commit: Baptiste Daroussin CommitDate: 2024-02-29 12:02:46 +0000 usb_vendors: add new usb_vendors usb_vendors is a local copy of usb.ids (similar to pci_vendors) It is now used by usbconfig(1) when listing the devices. --- share/misc/Makefile | 2 +- share/misc/usb_vendors | 25585 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 25586 insertions(+), 1 deletion(-) diff --git a/share/misc/Makefile b/share/misc/Makefile index 0e4cfd83abd4..bd560db25c7d 100644 --- a/share/misc/Makefile +++ b/share/misc/Makefile @@ -6,7 +6,7 @@ FILES= ascii birthtoken bsd-family-tree committers-doc.dot committers-ports.dot \ committers-src.dot flowers init.ee \ iso3166 iso639 latin1 mdoc.template operator pci_vendors \ - scsi_modes \ + scsi_modes usb_vendors \ organization.dot FILESDIR= ${BINDIR}/misc diff --git a/share/misc/usb_vendors b/share/misc/usb_vendors new file mode 100644 index 000000000000..74a0cef04aa3 --- /dev/null +++ b/share/misc/usb_vendors @@ -0,0 +1,25585 @@ +# +# List of USB ID's +# +# Maintained by Stephen J. Gowdy +# If you have any new entries, please submit them via +# http://www.linux-usb.org/usb-ids.html +# or send entries as patches (diff -u old new) in the +# body of your email (a bot will attempt to deal with it). +# The latest version can be obtained from +# http://www.linux-usb.org/usb.ids +# +# Version: 2024.01.30 +# Date: 2024-01-30 20:34:02 +# + +# Vendors, devices and interfaces. Please keep sorted. + +# Syntax: +# vendor vendor_name +# device device_name <-- single tab +# interface interface_name <-- two tabs + +0001 Fry's Electronics + 7778 Counterfeit flash drive [Kingston] +0002 Ingram + 0002 passport00 + 7007 HPRT XT300 +0003 Club Mac +0004 Nebraska Furniture Mart +0011 Unknown + 7788 counterfeit flash drive +001f Walmart + 0b21 AB13X Headset Adapter +0040 Anyware Corporation + 073d Mini Multimedia 2.4GHz Wireless Keyboard with Touch Pad +0042 DMT +0053 Planex + 5301 GW-US54ZGL 802.11bg +0078 Microntek + 0006 Joystick +0079 DragonRise Inc. + 0006 PC TWIN SHOCK Gamepad + 0011 Gamepad + 1800 Mayflash Wii U Pro Game Controller Adapter [DirectInput] + 181b Venom Arcade Joystick + 1843 Mayflash GameCube Controller Adapter + 1844 Mayflash GameCube Controller +0080 Unknown + a001 JMS578 based SATA bridge +0085 Boeye Technology Co., Ltd. + 0600 eBook Reader +0102 miniSTREAK +0105 Trust International B.V. + 145f NW-3100 802.11b/g 54Mbps Wireless Network Adapter [zd1211] +0127 IBP + 0002 HDM Interface + 0127 ibp +0145 Unknown + 0112 Card Reader +017c MLK + 145f Trust Deskset +0200 TP-Link + 0201 MA180 UMTS Modem +0204 Chipsbank Microelectronics Co., Ltd + 6025 CBM2080 / CBM2090 Flash drive controller + 6026 CBM1180 Flash drive controller +0218 Hangzhou Worlde + 0301 MIDI Port +0231 Sonuus Limited +02ad HUMAX Co., Ltd. + 138c PVR Mass Storage +0303 Mini Automation Controller +0324 OCZ Technology Inc + bc06 OCZ ATV USB 2.0 Flash Drive + bc08 OCZ Rally2/ATV USB 2.0 Flash Drive +0325 OCZ Technology Inc + ac02 ATV Turbo / Rally2 Dual Channel USB 2.0 Flash Drive +0386 LTS + 0001 PSX for USB Converter +03c3 ZWO + 120e ASI120MC-S Planetary Camera + 1f10 EFF + 294f ASI294MC Pro +03d9 Shenzhen Sinote Tech-Electron Co., Ltd + 0499 SE340D PC Remote Control +03da Bernd Walter Computer Technology + 0002 HD44780 LCD interface +03e7 Intel + 2150 Myriad VPU [Movidius Neural Compute Stick] + 2485 Movidius MyriadX + f63b Myriad VPU [Movidius Neural Compute Stick] +03e8 EndPoints, Inc. + 0004 SE401 Webcam + 0008 101 Ethernet [klsi] + 0015 ATAPI Enclosure + 2123 SiPix StyleCam Deluxe + 8004 Aox 99001 +03e9 Thesys Microelectronics +03ea Data Broadcasting Corp. +03eb Atmel Corp. + 0902 4-Port Hub + 2002 Mass Storage Device + 2015 at90usbkey sample firmware (HID keyboard) + 2018 at90usbkey sample firmware (CDC ACM) + 2019 stk525 sample firmware (microphone) + 201c at90usbkey sample firmware (HID mouse) + 201d at90usbkey sample firmware (HID generic) + 2022 at90usbkey sample firmware (composite device) + 2040 LUFA Test PID + 2041 LUFA Mouse Demo Application + 2042 LUFA Keyboard Demo Application + 2043 LUFA Joystick Demo Application + 2044 LUFA CDC Demo Application + 2045 LUFA Mass Storage Demo Application + 2046 LUFA Audio Output Demo Application + 2047 LUFA Audio Input Demo Application + 2048 LUFA MIDI Demo Application + 2049 Stripe Snoop Magnetic Stripe Reader + 204a LUFA CDC Class Bootloader + 204b LUFA USB to Serial Adapter Project + 204c LUFA RNDIS Demo Application + 204d LUFA Combined Mouse and Keyboard Demo Application + 204e LUFA Dual CDC Demo Application + 204f LUFA Generic HID Demo Application + 2060 Benito Programmer Project + 2061 LUFA Combined Mass Storage and Keyboard Demo Application + 2062 LUFA Combined CDC and Mouse Demo Application + 2063 LUFA Datalogger Device + 2064 Interfaceless Control-Only LUFA Devices + 2065 LUFA Test and Measurement Demo Application + 2066 LUFA Multiple Report HID Demo + 2067 LUFA HID Class Bootloader + 2068 LUFA Virtual Serial/Mass Storage Demo + 2069 LUFA Webserver Project + 2103 JTAG ICE mkII + 2104 AVR ISP mkII + 2105 AVRONE! + 2106 STK600 development board + 2107 AVR Dragon + 2109 STK541 ZigBee Development Board + 210a AT86RF230 [RZUSBSTICK] transceiver + 210d XPLAIN evaluation kit (CDC ACM) + 2110 AVR JTAGICE3 Debugger and Programmer + 2111 Xplained Pro board debugger and programmer + 2122 XMEGA-A1 Explained evaluation kit + 2140 AVR JTAGICE3 (v3.x) Debugger and Programmer + 2141 ICE debugger + 2145 ATMEGA328P-XMINI (CDC ACM) + 2310 EVK11xx evaluation board + 2404 The Micro + 2fe4 ATxmega32A4U DFU bootloader + 2fe6 Cactus V6 (DFU) + 2fea Cactus RF60 (DFU) + 2fee atmega8u2 DFU bootloader + 2fef atmega16u2 DFU bootloader + 2ff0 atmega32u2 DFU bootloader + 2ff1 at32uc3a3 DFU bootloader + 2ff3 atmega16u4 DFU bootloader + 2ff4 atmega32u4 DFU bootloader + 2ff6 at32uc3b0/1 DFU bootloader + 2ff7 at90usb82 DFU bootloader + 2ff8 at32uc3a0/1 DFU bootloader + 2ff9 at90usb646/647 DFU bootloader + 2ffa at90usb162 DFU bootloader + 2ffb at90usb AVR DFU bootloader + 2ffd at89c5130/c5131 DFU bootloader + 2fff at89c5132/c51snd1c DFU bootloader + 3301 at43301 4-Port Hub + 3312 4-Port Hub + 4102 AirVast W-Buddie WN210 + 5601 at76c510 Prism-II 802.11b Access Point + 5603 Cisco 7920 WiFi IP Phone + 6119 AT91SAM CDC Demo Application + 6124 at91sam SAMBA bootloader + 6127 AT91SAM HID Keyboard Demo Application + 6129 AT91SAM Mass Storage Demo Application + 6200 AT91SAM HID Mouse Demo Application + 7603 D-Link DWL-120 802.11b Wireless Adapter [Atmel at76c503a] + 7604 at76c503a 802.11b Adapter + 7605 at76c503a 802.11b Adapter + 7606 at76c505 802.11b Adapter + 7611 at76c510 rfmd2948 802.11b Access Point + 7613 WL-1130 USB + 7614 AT76c505a Wireless Adapter + 7615 AT76C505AMX Wireless Adapter + 7617 AT76C505AS Wireless Adapter + 7800 Mini Album + 800c Airspy HF+ + ff01 WootingOne + ff02 WootingTwo + ff07 Tux Droid fish dongle +03ec Iwatsu America, Inc. +03ed Mitel Corp. +03ee Mitsumi + 0000 CD-R/RW Drive + 2501 eHome Infrared Receiver + 2502 eHome Infrared Receiver + 5609 Japanese Keyboard + 641f WIF-0402C Bluetooth Adapter + 6438 Bluetooth Device + 6440 WML-C52APR Bluetooth Adapter + 6901 SmartDisk FDD + 6902 Floppy Disk Drive + 7500 CD-R/RW + ffff Dongle with BlueCore in DFU mode +03f0 HP, Inc + 0004 DeskJet 895c + 0011 OfficeJet G55 + 0012 DeskJet 1125C Printer Port + 0024 KU-0316 Keyboard + 002a LaserJet P1102 + 0053 DeskJet 2620 All-in-One Printer + 0101 ScanJet 4100c + 0102 PhotoSmart S20 + 0104 DeskJet 880c/970c + 0105 ScanJet 4200c + 0107 CD-Writer Plus + 010c Multimedia Keyboard Hub + 0111 G55xi Printer/Scanner/Copier + 0117 LaserJet 3200 + 011c hn210w 802.11b Adapter + 011d Bluetooth 1.2 Interface [Broadcom BCM2035] + 0121 HP 39g+ [F2224A], 39gs [F2223A], 40gs [F2225A], 48gII [F2226A], 49g+ [F2228A], 50g [F2229A, NW240AA] + 0122 HID Internet Keyboard + 0125 DAT72 Tape + 0139 Barcode Scanner 4430 + 0201 ScanJet 6200c + 0202 PhotoSmart S20 + 0204 DeskJet 815c + 0205 ScanJet 3300c + 0207 CD-Writer Plus 8200e + 020c Multimedia Keyboard + 0211 OfficeJet G85 + 0212 DeskJet 1220C + 0217 LaserJet 2200 + 0218 APOLLO P2500/2600 + 0221 StreamSmart 400 [F2235AA] + 0223 Digital Drive Flash Reader + 022a LaserJet CP1525nw/x + 0241 Link-5 micro dongle + 0304 DeskJet 810c/812c + 0305 ScanJet 4300c + 0307 CD-Writer+ CD-4e + 0311 OfficeJet G85xi + 0312 Color Inkjet CP1700 + 0314 designjet 30/130 series + 0317 LaserJet 1200 + 0324 SK-2885 keyboard + 034a Elite Keyboard + 0401 ScanJet 5200c + 0404 DeskJet 830c/832c + 0405 ScanJet 3400cse + 0411 OfficeJet G95 + 0412 Printing Support + 0417 LaserJet 1200 series + 0423 HS-COMBO Cardreader + 042a LaserJet M1132 MFP + 0441 Prime [NW280AA, G8X92AA] + 0504 DeskJet 885c + 0505 ScanJet 2100c + 0507 DVD+RW + 050c 5219 Wireless Keyboard + 0511 OfficeJet K60 + 0512 DeskJet 450 + 0517 LaserJet 1000 + 051d Bluetooth Interface + 052a LaserJet M1212nf MFP + 0601 ScanJet 6300c + 0604 DeskJet 840c + 0605 ScanJet 2200c + 0610 Z24i Monitor Hub + 0611 OfficeJet K60xi + 0612 business inkjet 3000 + 0624 Bluetooth Dongle + 0641 X1200 Optical Mouse + 0653 DeskJet 3700 series + 0701 ScanJet 5300c/5370c + 0704 DeskJet 825c + 0705 ScanJet 4400c + 070c Personal Media Drive + 0711 OfficeJet K80 + 0712 DeskJet 1180c + 0714 Printing Support + 0741 Prime Wireless Kit [FOK65AA] + 0801 ScanJet 7400c + 0804 DeskJet 816c + 0805 HP4470C + 0811 OfficeJet K80xi + 0817 LaserJet 3300 + 0853 ENVY 5000 series + 0901 ScanJet 2300c + 0904 DeskJet 845c + 0912 Printing Support + 0917 LaserJet 3330 + 0924 Modular Smartcard Keyboard + 0941 X500 Optical Mouse + 094a Optical Mouse [672662-001] + 0a01 ScanJet 2400c + 0a17 color LaserJet 3700 + 0b01 ScanJet 82x0C + 0b0c Wireless Keyboard and Optical Mouse receiver + 0b17 LaserJet 2300d + 0c17 LaserJet 1010 + 0c24 Bluetooth Dongle + 0d12 OfficeJet 9100 series + 0d17 LaserJet 1012 + 0d4a SK-2025 Keyboard + 0e17 LaserJet 1015 + 0f0c Wireless Keyboard and Optical Mouse receiver + 0f11 OfficeJet V40 + 0f12 Printing Support + 0f17 LaserJet 1150 + 0f2a LaserJet 400 color M451dn + 1001 Photo Scanner 1000 + 1002 PhotoSmart 140 series + 1004 DeskJet 970c/970cse + 1005 ScanJet 5400c + 1011 OfficeJet V40xi + 1016 Jornada 548 / iPAQ HW6515 Pocket PC + 1017 LaserJet 1300 + 1024 Smart Card Keyboard + 1027 Virtual keyboard and mouse + 102a LaserJet Professional P 1102w + 1102 PhotoSmart 240 series + 1104 DeskJet 959c + 1105 ScanJet 5470c/5490c + 1111 OfficeJet v60 + 1116 Jornada 568 Pocket PC + 1117 LaserJet 1300n + 1151 PSC-750xi Printer/Scanner/Copier + 1198 HID-compliant mouse + 1202 PhotoSmart 320 series + 1204 DeskJet 930c + 1205 ScanJet 4500C/5550C + 1211 OfficeJet v60xi + 1217 LaserJet 2300L + 1227 Virtual CD-ROM + 1302 PhotoSmart 370 series + 1305 ScanJet 4570c + 1311 OfficeJet V30 + 1312 DeskJet 460 + 1317 LaserJet 1005 + 1327 iLO Virtual Hub + 134a Optical Mouse + 1405 ScanJet 3670 + 1411 PSC 750 + 1424 f2105 Monitor Hub + 1502 PhotoSmart 420 series + 1504 DeskJet 920c + 150c Mood Lighting (Microchip Technology Inc.) + 1511 PSC 750xi + 1512 Printing Support + 1517 color LaserJet 3500 + 1524 Smart Card Keyboard - KR + 1539 Mini Magnetic Stripe Reader + 1541 Prime [G8X92AA] + 154a Laser Mouse + 1602 PhotoSmart 330 series + 1604 DeskJet 940c + 1605 ScanJet 5530C PhotoSmart + 1611 psc 780 + 1617 LaserJet 3015 + 161d Wireless Rechargeable Optical Mouse (HID) + 1624 Smart Card Keyboard - JP + 1647 Z27n G2 Monitor Hub + 1702 PhotoSmart 380 series + 1704 DeskJet 948C + 1705 ScanJet 5590 + 1711 psc 780xi + 1712 Printing Support + 1717 LaserJet 3020 + 171d Bluetooth 2.0 Interface [Broadcom BCM2045] + 1801 Inkjet P-2000U + 1802 PhotoSmart 470 series + 1804 DeskJet 916C + 1805 ScanJet 7650 + 1811 PSC 720 + 1812 OfficeJet Pro K550 + 1817 LaserJet 3030 + 181d Bluetooth 2.0 Interface + 1902 PhotoSmart A430 series + 1904 DeskJet 3820 + 1911 OfficeJet V45 + 1917 LaserJet 3380 + 1a02 PhotoSmart A510 series + 1a11 OfficeJet 5100 series + 1a17 color LaserJet 4650 + 1b02 PhotoSmart A610 series + 1b04 DeskJet 3810 + 1b05 ScanJet 4850C/4890C + 1b07 Premium Starter Webcam + 1c02 PhotoSmart A710 series + 1c17 Color LaserJet 2550l + 1d02 PhotoSmart A310 series + 1d17 LaserJet 1320 + 1d24 Barcode scanner + 1e02 PhotoSmart A320 Printer series + 1e11 PSC-950 + 1e17 LaserJet 1160 series + 1f02 PhotoSmart A440 Printer series + 1f11 PSC 920 + 1f12 OfficeJet Pro K5300 + 1f17 color LaserJet 5550 + 1f1d un2400 Gobi Wireless Modem + 2001 Floppy + 2002 Hub + 2004 DeskJet 640c + 2005 ScanJet 3570c + 2012 OfficeJet Pro K5400 + 201d un2400 Gobi Wireless Modem (QDL mode) + 2039 Cashdrawer + 2102 PhotoSmart 7345 + 2104 DeskJet 630c + 2112 OfficeJet Pro L7500 + 211d Sierra MC5725 [ev2210] + 2202 PhotoSmart 7600 series + 2205 ScanJet 3500c + 2212 OfficeJet Pro L7600 + 2217 color LaserJet 9500 MFP + 222a LaserJet Pro MFP M125nw + 2302 PhotoSmart 7600 series + 2304 DeskJet 656c + 2305 ScanJet 3970c + 2311 OfficeJet d series + 2312 OfficeJet Pro L7700 + 2317 LaserJet 4350 + 231d Broadcom 2070 Bluetooth Combo + 2402 PhotoSmart 7700 series + 2404 Deskjet F2280 series + 2405 ScanJet 4070 PhotoSmart + 2417 LaserJet 4250 + 241d Gobi 2000 Wireless Modem (QDL mode) + 2424 LP1965 19" Monitor Hub + 2441 Prime G2 [2AP18AA] + 2502 PhotoSmart 7700 series + 2504 DeskJet F4200 series + 2505 ScanJet 3770 + 2512 OfficeJet Pro L7300 / Compaq LA2405 series monitor + 2514 4-port hub + 2517 LaserJet 2410 + 251d Gobi 2000 Wireless Modem + 2524 LP3065 30" Monitor Hub + 2602 PhotoSmart A520 series + 2605 ScanJet 3800c + 2611 OfficeJet 7100 series + 2617 Color LaserJet 2820 series + 2624 Pole Display (HP522 2 x 20 Line Display) + 2702 PhotoSmart A620 series + 2704 DeskJet 915 + 2717 Color LaserJet 2830 + 2724 Magnetic Stripe Reader IDRA-334133-HP + 2805 Scanjet G2710 + 2811 PSC-2100 + 2817 Color LaserJet 2840 + 2841 OMEN MINDFRAME [3XT27AA] + 2902 PhotoSmart A820 series + 2911 PSC 2200 + 2917 LaserJet 2420 + 2a11 PSC 2150 series + 2a17 LaserJet 2430 + 2a1d Integrated Module with Bluetooth 2.1 Wireless technology + 2b11 PSC 2170 series + 2b17 LaserJet 1020 + 2b4a Business Slim Keyboard + 2c12 Officejet J4680 + 2c17 LaserJet 1022 + 2c24 Logitech M-UAL-96 Mouse + 2d05 Scanjet 7000 + 2d11 OfficeJet 6110 + 2d17 Printing Support + 2d2a LaserJet Pro MFP M225dw + 2e11 PSC 1000 + 2e17 LaserJet 2600n + 2e24 LP2275w Monitor Hub + 2f11 PSC 1200 + 2f17 Color LaserJet 2605dn + 2f24 LP2475w Monitor Hub + 3002 PhotoSmart P1000 + 3004 DeskJet 980c + 3005 ScanJet 4670v + 3011 PSC 1100 series + 3017 Printing Support + 304a Slim Keyboard + 3102 PhotoSmart P1100 Printer w/ Card Reader + 3104 DeskJet 960c + 3111 OfficeJet 4100 series + 3117 EWS 2605dtn + 311d Atheros AR9285 Malbec Bluetooth Adapter + 312a LaserJet Pro M701n + 3202 PhotoSmart 1215 + 3207 4 GB flash drive + 3211 OfficeJet 4105 series + 3217 LaserJet 3050 + 3302 PhotoSmart 1218 + 3304 DeskJet 990c + 3307 v125w Stick + 3312 OfficeJet J6410 + 3317 LaserJet 3052 + 3402 PhotoSmart 1115 + 3404 DeskJet 6122 + 3417 LaserJet 3055 + 3502 PhotoSmart 230 + 3504 DeskJet 6127c + 3511 PSC 2300 + 3517 LaserJet 3390 + 354a Slim Keyboard + 3602 PhotoSmart 1315 + 3611 PSC 2410 PhotoSmart + 3612 Officejet Pro 8000 A809 + 3617 Color LaserJet 2605 + 3711 PSC 2500 + 3717 EWS UPD + 3724 Webcam + 3802 PhotoSmart 100 + 3807 c485w Flash Drive + 3817 LaserJet P2015 series + 3902 PhotoSmart 130 + 3912 Officejet Pro 8500 + 3917 LaserJet P2014 + 3a02 PhotoSmart 7150 + 3a11 OfficeJet 5500 series + 3a17 Printing Support + 3a1d hs2340 HSPA+ mobile broadband + 3b02 PhotoSmart 7150~ + 3b05 Scanjet N8460 + 3b11 PSC 1300 series + 3b17 LaserJet M1005 MFP + 3b2a Color LaserJet MFP M277dw + 3c02 PhotoSmart 7350 + 3c05 Scanjet Professional 1000 Mobile Scanner + 3c11 PSC 1358 + 3c17 EWS UPD + 3d02 PhotoSmart 7350~ + 3d11 OfficeJet 4215 + 3d17 LaserJet P1005 + 3e02 PhotoSmart 7550 + 3e07 x755w Flash Drive + 3e17 LaserJet P1006 + 3f02 PhotoSmart 7550~ + 3f11 PSC-1315/PSC-1317 + 3f17 Laserjet P1505 + 4002 PhotoSmart 635/715/720/735/935/E337 (storage) + 4004 CP1160 + 4102 PhotoSmart 618 + 4105 ScanJet 4370 + 4111 OfficeJet 7200 series + 4117 LaserJet 1018 + 4202 PhotoSmart 812 + 4205 ScanJet G3010 + 4211 OfficeJet 7300 series + 4217 EWS CM1015 + 4302 PhotoSmart 850 (ptp) + 4305 ScanJet G3110 + 4311 OfficeJet 7400 series + 4317 Color LaserJet CM1017 + 4402 PhotoSmart 935 (ptp) + 4417 EWS UPD + 4502 PhotoSmart 945 (PTP mode) + 4505 ScanJet G4010 + 4507 External HDD + 4511 PhotoSmart 2600 + 4512 E709n [Officejet 6500 Wireless] + 4517 EWS UPD + 4605 ScanJet G4050 + 4611 PhotoSmart 2700 + 4717 Color LaserJet CP1215 + 4811 PSC 1600 + 484a Elite Dock G4 + 4911 PSC 2350 + 4b11 OfficeJet 6200 + 4c11 PSC 1500 series + 4c17 EWS UPD + 4d11 PSC 1400 + 4d17 EWS UPD + 4e11 PhotoSmart 2570 series + 4f11 OfficeJet 5600 (USBHUB) + 4f17 Color LaserJet CM1312 MFP + 5004 DeskJet 995c + 5011 PhotoSmart 3100 series + 5017 EWS UPD + 5111 PhotoSmart 3200 series + 5211 PhotoSmart 3300 series + 5307 v165w Stick + 5311 OfficeJet 6300 + 5312 Officejet Pro 8500A + 5317 Color LaserJet CP2025 series + 5411 OfficeJet 4300 + 5511 DeskJet F300 series + 5611 PhotoSmart C3180 + 5617 LaserJet M1120 MFP + 5711 PhotoSmart C4100 series + 5717 LaserJet M1120n MFP + 5811 PhotoSmart C5100 series + 5817 LaserJet M1319f MFP + 581d lt4112 Gobi 4G Module Network Device + 5911 PhotoSmart C6180 + 5912 Officejet Pro 8600 + 5a11 PhotoSmart C7100 series + 5b11 OfficeJet J2100 series + 5b12 Officejet Pro 8100 + 5c11 PhotoSmart C4200 Printer series + 5c12 OfficeJet 6700 + 5c17 LaserJet P2055 series + 5d11 PhotoSmart C5200 series + 5e11 PhotoSmart D7400 series + 6004 DeskJet 5550 + 6102 Hewlett Packard Digital Camera + 6104 DeskJet 5650c + 6117 color LaserJet 3550 + 6202 PhotoSmart 215 + 6204 DeskJet 5150c + 6217 Color LaserJet 4700 + 6302 PhotoSmart 318/612 + 6317 Color LaserJet 4730mfp + 632a LaserJet M203-M206 + 6402 PhotoSmart 715 (ptp) + 6411 PhotoSmart C8100 series + 6417 LaserJet 5200 + 6502 PhotoSmart 120 (ptp) + 6511 PhotoSmart C7200 series + 6602 PhotoSmart 320 + 6611 PhotoSmart C4380 series + 6617 LaserJet 5200L + 6702 PhotoSmart 720 (ptp) + 6717 Color LaserJet 3000 + 6802 PhotoSmart 620 (ptp) + 6811 PhotoSmart D5300 series + 6817 Color LaserJet 3800 + 6911 PhotoSmart D7200 series + 6917 Color LaserJet 3600 + 6a02 PhotoSmart 735 (ptp) + 6a11 PhotoSmart C6200 series + 6a17 LaserJet 4240 + 6b02 PhotoSmart R707 (PTP mode) + 6b11 Photosmart C4500 series + 6c11 Photosmart C4480 + 6c17 Color LaserJet 4610 + 6f17 Color LaserJet CP6015 series + 7004 DeskJet 3320c + 7102 PhotoSmart 635 (PTP mode) + 7104 DeskJet 3420c + 7117 CM8060 Color MFP with Edgeline Technology + 7202 PhotoSmart 43x (ptp) + 7204 DeskJet 36xx + 7217 LaserJet M5035 MFP + 7302 PhotoSmart M307 (PTP mode) + 7304 DeskJet 35xx + 7311 Photosmart Premium C309 + 7317 LaserJet P3005 + 7404 Printing Support + 7417 LaserJet M4345 MFP + 7504 Printing Support + 7517 LaserJet M3035 MFP + 7604 DeskJet 3940 + 7611 DeskJet F2492 All-in-One + 7617 LaserJet P3004 + 7702 PhotoSmart R817 (PTP mode) + 7704 DeskJet D4100 + 7717 CM8050 Color MFP with Edgeline Technology + 7804 DeskJet D1360 + 7817 Color LaserJet CP3505 + 7917 LaserJet M5025 MFP + 7a02 PhotoSmart M415 (PTP mode) + 7a04 DeskJet D2460 + 7a11 Photosmart B109 + 7a17 LaserJet M3027 MFP + 7b02 PhotoSmart M23 (PTP mode) + 7b17 Color LaserJet CP4005 + 7c17 Color LaserJet CM6040 series + 7d04 DeskJet F2100 Printer series + 7d17 Color LaserJet CM4730 MFP + 7e04 DeskJet F4100 Printer series + 8017 LaserJet P4515 + 8104 Printing Support + 8117 LaserJet P4015 + 811c Ethernet HN210E + 8204 Printing Support + 8207 FHA-3510 2.4GHz Wireless Optical Mobile Mouse + 8217 LaserJet P4014 + 8317 LaserJet M9050 MFP + 8404 DeskJet 6800 series + 8417 LaserJet M9040 MFP + 8504 DeskJet 6600 series + 8604 DeskJet 5440 + 8607 Optical Mobile Mouse + 8704 DeskJet 5940 + 8711 Deskjet 2050 J510 + 8804 DeskJet 6980 series + 8904 DeskJet 6940 series + 8911 Deskjet 1050 J410 + 8c07 Digital Stereo Headset + 8c11 Deskjet F4500 series + 9002 PhotoSmart M437 + 9102 PhotoSmart M537 + 9207 HD-4110 Webcam + 9302 PhotoSmart R930 series + 9402 PhotoSmart R837 + 942a LaserJet Pro M12a + 9502 PhotoSmart R840 series + 952a LaserJet Pro M12w + 9602 PhotoSmart M730 series + 9702 PhotoSmart R740 series + 9802 PhotoSmart Mz60 series + 9902 PhotoSmart M630 series + 9a02 PhotoSmart E330 series + 9b02 PhotoSmart M540 series + 9b07 Portable Drive + 9c02 PhotoSmart M440 series + a004 DeskJet 5850c + a011 Deskjet 3050A + a407 Wireless Optical Comfort Mouse + b002 PhotoSmart 7200 series + b102 PhotoSmart 7200 series + b107 v255w/c310w Flash Drive + b116 Webcam + b202 PhotoSmart 7600 series + b302 PhotoSmart 7600 series + b402 PhotoSmart 7700 series + b502 PhotoSmart 7700 series + b602 PhotoSmart 7900 series + b702 PhotoSmart 7900 series + b802 PhotoSmart 7400 series + b902 PhotoSmart 7800 series + ba02 PhotoSmart 8100 series + bb02 PhotoSmart 8400 series + bc02 PhotoSmart 8700 series + bc11 Photosmart 7520 series + bd02 PhotoSmart Pro B9100 series + bef4 NEC Picty760 + c002 PhotoSmart 7800 series + c102 PhotoSmart 8000 series + c111 Deskjet 1510 + c202 PhotoSmart 8200 series + c211 Deskjet 2540 series + c302 DeskJet D2300 + c402 PhotoSmart D5100 series + c502 PhotoSmart D6100 series + c602 PhotoSmart D7100 series + c702 PhotoSmart D7300 series + c802 PhotoSmart D5060 Printer + d104 Bluetooth Dongle + d507 39gII [NW249AA] + efbe NEC Picty900 + f0be NEC Picty920 + f1be NEC Picty800 +03f1 Genoa Technology +03f2 Oak Technology, Inc. +03f3 Adaptec, Inc. + 0020 AWN-8020 WLAN [Intersil PRISM 2.5] + 0080 AVC-1100 Audio Capture + 0083 AVC-2200 Device + 0087 AVC-2210 Loader + 0088 AVC-2210 Device + 008b AVC-2310 Loader + 008c AVC-2310 Device + 0094 eHome Infrared Receiver + 009b AVC-1410 GameBridge TV NTSC + 2000 USBXchange Firmware Loader + 2001 USBXchange Adapter + 2002 USB2-Xchange Firmware Loader + 2003 USB2-Xchange Adapter + 4000 4-port hub + adcc Composite Device Support +03f4 Diebold, Inc. +03f5 Siemens Electromechanical +03f8 Epson Imaging Technology Center +03f9 KeyTronic Corp. + 0100 KT-2001 Keyboard + 0101 Keyboard + 0102 Keyboard Mouse +03fb OPTi, Inc. +03fc Elitegroup Computer Systems +03fd Xilinx, Inc. + 0008 Platform Cable USB II + 0050 dfu downloader +03fe Farallon Comunications +0400 National Semiconductor Corp. + 05dc Rigol Technologies DS1000USB Oscilloscope + 0807 Bluetooth Dongle + 080a Bluetooth Device + 09c4 Rigol Technologies DG1022 Arbitrary Waveform Generator + 1000 Mustek BearPaw 1200 Scanner + 1001 Mustek BearPaw 2400 Scanner + 1237 Hub + a000 Smart Display Reference Device + c359 Logitech Harmony + c35b Printing Support + c55d Rigol Technologies DS5000USB Oscilloscope +0401 National Registry, Inc. +0402 ALi Corp. + 5462 M5462 IDE Controller + 5602 M5602 Video Camera Controller + 5603 M5603 Video Camera Controller + 5606 M5606 Video Camera Controller [UVC] + 5621 M5621 High-Speed IDE Controller + 5623 M5623 Scanner Controller + 5627 Welland ME-740PS USB2 3.5" Power Saving Enclosure + 5632 M5632 Host-to-Host Link + 5635 M5635 Flash Card Reader + 5636 USB 2.0 Storage Device + 5637 M5637 IDE Controller + 5642 Storage Device + 5661 M5661 MP3 player + 5667 M5667 MP3 player + 8841 Newmine Camera + 9665 Gateway Webcam +0403 Future Technology Devices International, Ltd + 0000 H4SMK 7 Port Hub / Bricked Counterfeit FT232 Serial (UART) IC + 0232 Serial Converter + 1060 JTAG adapter + 1234 IronLogic RFID Adapter [Z-2 USB] + 1235 Iron Logic Z-397 RS-485/422 converter + 6001 FT232 Serial (UART) IC + 6002 Lumel PD12 + 6007 Serial Converter + 6008 Serial Converter + 6009 Serial Converter + 6010 FT2232C/D/H Dual UART/FIFO IC + 6011 FT4232H Quad HS USB-UART/FIFO IC + 6014 FT232H Single HS USB-UART/FIFO IC + 6015 Bridge(I2C/SPI/UART/FIFO) + 601e FT600 16-bit FIFO IC + 601f FT601 32-bit FIFO IC + 6ee0 EZO Carrier Board + 6f70 HB-RF-USB + 7150 FT2232x wired for MPSSE+UART + 7151 FT2232x wired for MPSSE+UART + 7152 FreeCalypso dual UART with boot control + 7be8 FT232R + 8028 Dev board JTAG (FT232H based) + 8040 4 Port Hub + 8070 7 Port Hub + 8140 Vehicle Explorer Interface + 8210 MGTimer - MGCC (Vic) Timing System + 8348 FT232BM [SIENNA Serial Interface] + 8370 7 Port Hub + 8371 PS/2 Keyboard And Mouse + 8372 FT8U100AX Serial Port + 8508 Selectronic SP PRO + 87d0 Cressi Dive Computer Interface + 8a28 Rainforest Automation ZigBee Controller + 8a98 TIAO Multi-Protocol Adapter + 8b28 Alpermann+Velte TCI70 + 8b29 Alpermann+Velte TC60 CLS + 8b2a Alpermann+Velte Rubidium Q1 + 8b2b Alpermann+Velte TCD + 8b2c Alpermann+Velte TCC70 + 9090 SNAP Stick 200 + 9132 LCD and Temperature Interface + 9133 CallerID + 9134 Virtual keyboard + 9135 Rotary Pub alarm + 9136 Pulsecounter + 9137 Ledbutton interface + 9e90 Marvell OpenRD Base/Client + 9f08 CIB-1894 Conclusion SmartLink Box: + 9f80 Ewert Energy Systems CANdapter + a6d0 Texas Instruments XDS100v2 JTAG / BeagleBone A3 + a951 HCP HIT GSM/GPRS modem [Cinterion MC55i] + a9a0 FT2232D - Dual UART/FIFO IC - FTDI + abb8 Lego Mindstorms NXTCam + b0c0 microSensys RFID device + b0c1 microSensys RFID device + b0c2 iID contactless RFID device + b0c3 iID contactless RFID device + b0c4 RFID device + b0c5 RFID device + b810 US Interface Navigator (CAT and 2nd PTT lines) + b811 US Interface Navigator (WKEY and FSK lines) + b812 US Interface Navigator (RS232 and CONFIG lines) + b9b0 Fujitsu SK-16FX-100PMC V1.1 + baf8 Amontec JTAGkey + bcd8 Stellaris Development Board + bcd9 Stellaris Evaluation Board + bcda Stellaris ICDI Board + bd90 PICAXE Download Cable [AXE027] + bdc8 Egnite GmbH - JTAG/RS-232 adapter + bfd8 OpenDCC + bfd9 OpenDCC (Sniffer) + bfda OpenDCC (Throttle) + bfdb OpenDCC (Gateway) + bfdc OpenDCC (GBM) + c580 HID UNIKEY dongle [F-Response] + c630 lcd2usb interface + c631 i2c-tiny-usb interface + c632 xu1541 c64 floppy drive interface + c633 TinyCrypt dongle + c634 glcd2usb interface + c7d0 RR-CirKits LocoBuffer-USB + c8b8 Alpermann+Velte MTD TCU + c8b9 Alpermann+Velte MTD TCU 1HE + c8ba Alpermann+Velte Rubidium H1 + c8bb Alpermann+Velte Rubidium H3 + c8bc Alpermann+Velte Rubidium S1 + c8bd Alpermann+Velte Rubidium T1 + c8be Alpermann+Velte Rubidium D1 + c8bf Alpermann+Velte TC60 RLV + cc48 Tactrix OpenPort 1.3 Mitsubishi + cc49 Tactrix OpenPort 1.3 Subaru + cc4a Tactrix OpenPort 1.3 Universal + cff8 Amontec JTAGkey + d010 SCS PTC-IIusb + d011 SCS Position-Tracker/TNC + d012 SCS DRAGON 1 + d013 SCS DRAGON 1 + d388 Xsens converter + d389 Xsens Wireless Receiver + d38a Xsens serial converter + d38b Xsens serial converter + d38c Xsens Wireless Receiver + d38d Xsens Awinda Station + d38e Xsens serial converter + d38f Xsens serial converter + d491 Zolix Omni 1509 monochromator + d578 Accesio USB-COM-4SM + d678 GammaScout + d6f8 UNI Black BOX + d738 Propox JTAGcable II + d739 Propox ISPcable III + d9a9 Actisense USG-1 NMEA Serial Gateway + d9aa Actisense NGT-1 NMEA2000 PC Interface + d9ab Actisense NGT-1 NMEA2000 Gateway + daf4 Qundis Serial Infrared Head + e0d0 Total Phase Aardvark I2C/SPI Host Adapter + e518 IBR IMB-usb + e521 EVER Sinline XL Series UPS + e6c8 PYRAMID Computer GmbH LCD + e700 Elster Unicom III Optical Probe + e729 Segway Robotic Mobility Platforms 200 + e888 Expert ISDN Control USB + e889 USB-RS232 OptoBridge + e88a Expert mouseCLOCK USB II + e88b Precision Clock MSF USB + e88c Expert mouseCLOCK USB II HBG + e8d8 Aaronia AG Spectran Spectrum Analyzer + e8dc Aaronia AG UBBV Preamplifier + ea90 Eclo 1-Wire Adapter + ecd9 miControl miCan-Stick + ed71 HAMEG HO870 Serial Port + ed72 HAMEG HO720 Serial Port + ed73 HAMEG HO730 Serial Port + ed74 HAMEG HO820 Serial Port + eea2 PCStage Lite 32 channel DMX512 Interface + ef10 FT1245BL + f070 Serial Converter 422/485 [Vardaan VEUSB422R3] + f0c8 SPROG Decoder Programmer + f0c9 SPROG-DCC CAN-USB + f0e9 Tagsys L-P101 + f0ee Tagsys Medio P200x *** 24636 LINES SKIPPED *** From nobody Thu Feb 29 12:06:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tlqgl4BHnz5C3GM; Thu, 29 Feb 2024 12:06: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 4Tlqgl3Pq9z4DqH; Thu, 29 Feb 2024 12:06:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709208371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+VJW8VqDhd7PuGI6AceL9NhlWFw8boTX8ylQ8qSuND4=; b=EBfCXq4pg9cLPaPdiCcLkphO24dqG6sFeraElY2D7cmaOkqaJ+M7F79cPoZJuTNH0z91eR Bg6tgen4S7o7wWWA5c6qr419YjEHj8cQns+EJLJHeV9sQr/VADTom+4AUqrGy1um74yLgo 24rXONcqQLpPOP6sKBqfVIE1ffCtuPFSIMFfukNIZzIf9aRSHRz7RwFJP0u8PrRDoFO3oM F7KhAjsOu1EhQvGcou1gm6GOFN+OYh1e1qt8z1WQ2uX5yMJ57qzUCOTrslXApGcsK03Y/0 m9IYxL4/oU4b1YCG/oBX0M6b8dj+Mk7+HgJYvgaO6rGLPQ9KX7MCKhTrECzioQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709208371; a=rsa-sha256; cv=none; b=lUda9K95ipAR1Oz0bBC4d6lLgHoC8iOxKaeyOyrpLmn3+DY5D+tWEFyOI/UC9DRdvnSrCI Pj4wki8b1WuAodkmbUzC4EpEhhJlvW/2Jc4ZBx45mlR1ccNmlqZ3Bla83KmCF6iFu4kaD5 bkVPxRqmk9a9sJewEbe2f36OZEymfH/aDLAhHaoTslwJoEePtUSbdQTVsPRO3/moHTLn6h 3L/RmfnmrI2c4zRdMFF9L2V+jyiMoIQngoC0OIi560qg+sPn5bDuG2OP9eR81ijqTey28Q 6/Lvmv+DRxaREzAV7rEEg0tSyVhOdXaqhxG6YUngjV9EO/R4UjfTNMPjwXACCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709208371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+VJW8VqDhd7PuGI6AceL9NhlWFw8boTX8ylQ8qSuND4=; b=uN6QKnXOv9+lodJ6J+GEpgw49OrV6RVGDYM6IoL+WT2n/QOlYM/X0K+eYy6zt+zcCg9OeQ buHWDlZdD7wCAkP9JVyibVQO2llm9x5OjtWU87QQwcJ60sn7mwk5zAxtxfEILqQj0y3Mdj Ij7lYKwHDaBTkCWKhyo2BDovp2eKHqBHqvrIeceMWFK4VC0+EpaNiaZzSIBf6QtReQKIKG KK/vAF4MDILa9cL8wamzIB6B7Jr27gIqWwoxgnwubQgPkxMbAGl9mmrLgIFSF6jLx8NtID 1UsncOHXCQSC7dY8cSOMGECYE3i+5Qu5VME5YCHNsfGhDjNGyRPIJ1lasPnvHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tlqgl31NxzhVK; Thu, 29 Feb 2024 12:06: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 41TC6BPM083649; Thu, 29 Feb 2024 12:06:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41TC6BY8083646; Thu, 29 Feb 2024 12:06:11 GMT (envelope-from git) Date: Thu, 29 Feb 2024 12:06:11 GMT Message-Id: <202402291206.41TC6BY8083646@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: 5a98d9d02868 - main - RELNOTES: document usbconfig(8) changes List-Id: Commit messages for the main 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: 5a98d9d028685624316208eaa192768b23b39acb Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=5a98d9d028685624316208eaa192768b23b39acb commit 5a98d9d028685624316208eaa192768b23b39acb Author: Baptiste Daroussin AuthorDate: 2024-02-29 12:06:08 +0000 Commit: Baptiste Daroussin CommitDate: 2024-02-29 12:06:08 +0000 RELNOTES: document usbconfig(8) changes --- RELNOTES | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RELNOTES b/RELNOTES index 258ac8090928..25cffbd84eae 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,10 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +fe86d923f83f: + usbconfig(8) now reads the descriptions of the usb vendor and products + from usb.ids when available similarly to what pciconf(8) do. + 4347ef60501f: The powerd(8) utility is now enabled in /etc/rc.conf by default on images for the arm64 Raspberry Pi's (arm64-aarch64-RPI img files). From nobody Thu Feb 29 12:27:32 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tlr8P3zCCz5C4rd; Thu, 29 Feb 2024 12:27: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 4Tlr8P3RYlz4LQF; Thu, 29 Feb 2024 12:27:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709209653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GdLpLz0cbKofydEbr2SXLAFVzPXc7O49k/yuKlxD80s=; b=JptzGoZN0UdxDXEg7QuqHJE0anFH6LmVd58UBtB1PTNVgpJIVOAR1F7BEK8WOVVcA2IevT d1ZjDBkY/L33u1xqyEDAfQ4I3jVuwiNGPPYw+jN23/BfZaYtJOVgCcoICoiR0Dnik/dgDj 7eRxduIrL1NtKgS468jyFlyVz4oI75CaEHN19fcoSnhZf4oHB+iDImLkFaR1UTCB+rvMT7 tP3TpU2ttNV6FAdy5eZ3wghkGouLQ6UHGCf42NewdEOnwkOnv/OpjAEITc87J0PGiASba4 NUTEyaP4MniKvAChfAy3nbD4VONV3fVTMId9Tfh9uE+ww/1AerHN/C3rsI3loA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709209653; a=rsa-sha256; cv=none; b=rQtxiqZBjI3okUmLcjgvgsDvsmFbbwlN3wgdyQoIZsxGG1/I0MwgJLEKYpTK/awZh4wRtm Pa6zQ3/+yn3hxZT/94u9I9ynq93SFqk3czO+xsQ5gbjEMuGEV5TYZxhKk7DF6qF02a7J/a IS9WzXz5kKSneSZd+RdDrR63uWHFsYq2RTKEOoxez4vObrN9EKsrZZC7O2yqcwmosg3ZZ6 LIp6iN7cv7zRobAhGBmKUn8o308Gmer/8rHemOXo4YQu71Bfn/bHiOJlcOYSMYKf1KmKsG NLj3Gg0Oq4xHHphOEVAjzFHcYSorGwq6xzj1p1sk3csk/c+PstPB2ff1CASHjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709209653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GdLpLz0cbKofydEbr2SXLAFVzPXc7O49k/yuKlxD80s=; b=NSQTRw7Md27+QRnxo75b5b0Qv5FBu3Lhyn11FTwG3OYxkC0+g/uYuicmscNK3tq7joPhwa MI/s5xuZvZzVeQqjDH757Mk0Kb34h5XFTZagE+3CJiyGiHDbdmxx1N+alF6r4oc0BR6XP/ hgL9+hBAyXRgJHLjxRFV5p36I2D9P/yNMrI0gU9C0qzFB+ywDQQ8NjOkbSsobUcjXGHltC 0v3sg1UtE+rbM7oUMGrg+vYqnXoDabhpYIeHrW9L+W7M1Z02SINqqBU1cLo91CFjMdXpUl m8hKT7LJuJRbEzM5BKvywJaNVFuB9P6w671uQgWdITYJFP5SZqBH59hNd4nhhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tlr8P32NGzhrd; Thu, 29 Feb 2024 12:27: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 41TCRXvC018486; Thu, 29 Feb 2024 12:27:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41TCRWdT018483; Thu, 29 Feb 2024 12:27:32 GMT (envelope-from git) Date: Thu, 29 Feb 2024 12:27:32 GMT Message-Id: <202402291227.41TCRWdT018483@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: ddca081d382c - main - libucl: import snapshot 2024-02-06 List-Id: Commit messages for the main 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: ddca081d382c7275bb6328c730182a007334c939 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=ddca081d382c7275bb6328c730182a007334c939 commit ddca081d382c7275bb6328c730182a007334c939 Merge: 5a98d9d02868 76f58d443289 Author: Baptiste Daroussin AuthorDate: 2024-02-29 12:27:03 +0000 Commit: Baptiste Daroussin CommitDate: 2024-02-29 12:27:03 +0000 libucl: import snapshot 2024-02-06 contrib/libucl/libucl.pc | 11 ++++ contrib/libucl/python/ucl.pyi | 15 +++++ .../libucl/tests/schema/definitions.json.disabled | 32 +++++++++ .../libucl/tests/schema/refRemote.json.disabled | 76 ++++++++++++++++++++++ 4 files changed, 134 insertions(+) diff --cc contrib/libucl/libucl.pc index 000000000000,4878bebafcdd..4878bebafcdd mode 000000,100644..100644 --- a/contrib/libucl/libucl.pc +++ b/contrib/libucl/libucl.pc diff --cc contrib/libucl/python/ucl.pyi index 000000000000,79fa2901ba9f..79fa2901ba9f mode 000000,100644..100644 --- a/contrib/libucl/python/ucl.pyi +++ b/contrib/libucl/python/ucl.pyi diff --cc contrib/libucl/tests/schema/definitions.json.disabled index 000000000000,1ab9b2163c44..1ab9b2163c44 mode 000000,100644..100644 --- a/contrib/libucl/tests/schema/definitions.json.disabled +++ b/contrib/libucl/tests/schema/definitions.json.disabled diff --cc contrib/libucl/tests/schema/refRemote.json.disabled index 000000000000,067c666b0ec8..067c666b0ec8 mode 000000,100644..100644 --- a/contrib/libucl/tests/schema/refRemote.json.disabled +++ b/contrib/libucl/tests/schema/refRemote.json.disabled From nobody Thu Feb 29 14:19:21 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TltdP6Cfyz5CGQr; Thu, 29 Feb 2024 14:19: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 4TltdP5Jbvz4hWN; Thu, 29 Feb 2024 14:19:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709216361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ykqv335DyFEtVDhZx6OgXNjmkWoij+NSVMw5ap4bep4=; b=ibM6MHd/3nhSxnTJCyej2qsKY1hpNEFdVF2ETdJ6Wv8ema367pj7NQONIHVtRlUgKr+T8j nUIGF6Lc5SFedbdDhSsgkb8v77Sp/XlyITHvicPWYdIa9ikdC7Sm4rvt+1sU2jqBipGOqI g9uMFiMlz0hZjzw/SGUQKeOjkuppzLBHfYrTMDqkkbPpYmH1AIetkjP95+PKwAyDNn/vmK 4vwTk+AYO+WmiYAX8ubJPoMQ+t34gKlEXapRe12vcz9KGSFvpARNYv5EZPcYGuJXsfmO7T wt/F8+aJ/aG2Z5smDoExDXRa+9TGVxtsq157H8OqwGep60HTvM1Bnr6pzou+8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709216361; a=rsa-sha256; cv=none; b=a4Wi8Cski6E4Bn0A6gjHHlxXR610Ly03eB866Z3dUjndE49iqu3TXbTj0IfrX7oosB6odH C/qyTNXD6xBNtVybEW9CTw45wtSRmPxECWeFfdANUOIIB/OZmZlS0D7rrsN9fQ0NfRs6et ZS6SRepRJZY2IpGNn4bdYTauPtesOt1icFuRc6nADOCVcvjZ8dFh/BilCTvmJBUsWXbAt5 nvENRU5fbkpkvtWO1c01EUw90e/agBp1G8gXrNO45Ne3Ct2+kWBsiByfEdbi2EaC6Ab2mi 2QKeYQ7xyRC8NgQd50rBiD3muFR1OUryWwks7R1JQkzBqxdx1SPU/K3CES6O/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=1709216361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ykqv335DyFEtVDhZx6OgXNjmkWoij+NSVMw5ap4bep4=; b=JK0uxOkRNYAK4VdG+MPziOXJ9+FrzBoi47a9OU3JGTXtkxzTrqS9lmD4nfKWWY4P5Vd2M1 cASN9N00Lay9oMcmz3MlqBsRiqhO5OiEqZRkQhrM3O3uDRwP3omck7qJCbz/kGu9+T3roj S8kCB+olZYWD7PZZJgxop3qBDgDzN5O6TQVgDNR4DpM8NVJNmo5e+Wk2hvhYpr1oC7u6O7 xQJvPA3gDFITmREX7kAIUo0YE4BTaG24JcE1Rrc3mT/8/xxM2uxPvEsAM0giEZUN5hu0yj cqJnFZf741dPXpiF8/8g14pDcd8ICj6TLw1rlB8kbfaZcfQv+dkGOXoVAs3K4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TltdP4rq9zlj1; Thu, 29 Feb 2024 14:19: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 41TEJLPe005581; Thu, 29 Feb 2024 14:19:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41TEJLYX005578; Thu, 29 Feb 2024 14:19:21 GMT (envelope-from git) Date: Thu, 29 Feb 2024 14:19:21 GMT Message-Id: <202402291419.41TEJLYX005578@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: aedb37dc4931 - main - lorder: Don't rely on legacy syntax. List-Id: Commit messages for the main 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: aedb37dc49319a7cd1faf34f312a8a9fc01e611d Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=aedb37dc49319a7cd1faf34f312a8a9fc01e611d commit aedb37dc49319a7cd1faf34f312a8a9fc01e611d Author: Dag-Erling Smørgrav AuthorDate: 2024-02-29 13:59:21 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-02-29 13:59:21 +0000 lorder: Don't rely on legacy syntax. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D44155 --- usr.bin/lorder/lorder.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/lorder/lorder.sh b/usr.bin/lorder/lorder.sh index be28eec8b9bc..c6d69b2d1b0b 100644 --- a/usr.bin/lorder/lorder.sh +++ b/usr.bin/lorder/lorder.sh @@ -107,4 +107,4 @@ done # sort -k 2 -o $R $R sort -k 2 -o $S $S -join -j 2 -o 1.1 2.1 $R $S +join -j 2 -o 1.1 -o 2.1 $R $S From nobody Thu Feb 29 14:19:22 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TltdQ6YWyz5CGqC; Thu, 29 Feb 2024 14:19:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TltdQ68H8z4hWR; Thu, 29 Feb 2024 14:19:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709216362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T1k5/nsSZfj0erCVHLJpXSz7VfUFriWQJ1OjI/BFQY0=; b=qXXK8A+IbQ2+6IDmOLYxUKEf9lPc1myIQMsViB945SttRV9J2hi/df1h/1MJFu5f67WWi8 DqR/AQ3angtS5osK0UD+XnQEJXtPyR4FzxbkcqIigJDFP1cjcYDoj+PAhpNB6iJhmv2ktp RsImDszAEHojW2uSSEuOgq324Aj9waQ2bcvx8hxkGsE47daObKxJ9BXjTEhkPz+VH+5DU0 HDiCIaHKGFbzOby5Mb8xmViTERiw9E6+83E7gIQlTmUq9w///zJPjUTC4ad1L/Fn4IMXo+ ab9+gSOo//32WBacq/7sj0LqBhGzLGtr0zL/OE0uz4VkqZf/yeZ5HQJaUCoeRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709216362; a=rsa-sha256; cv=none; b=BNLgBMLUNgw2acUrKjQsa59NBHvlKBxoQmxfhtixffpaomQs3dS9zJ5gjihYT0YtHXEgXr 0lfKj5f82zEHgGksKRoR3gLrG/ZOvFvkYtey8cFKAPcxN9vZBAZ6HlvOF0jJf1EpVgwRTl ZSox3TVnlDQbE5oWWPruQWadPptjuWXe575cj7Cxcwb1p38rPv+9O3FRlHYTlDrfSwccFO +lvhZhPoKEydy6UAuy32fNLLXtB/NJTGhpuYi0HnQ1YraQmpL2i1Tfuxbgt6Hn3pBAVYiY asarEnFS5s3Xw0riOFZ6qtgKfIYmRerN7XcAc9loCGAc8pMf0EFEdapC3dTyoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709216362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T1k5/nsSZfj0erCVHLJpXSz7VfUFriWQJ1OjI/BFQY0=; b=EpIhAFZRJEyUWqqSKKKoA7nfnUIv+DRkcN5BjOLyjcnPzZQUW5769FjaTHembCl1EuQnj1 /TXpj7q2Vv8zCO8bw12fga+n2VFsnpzjvzyHUBppfvy7umCFEHKHKT2DbsmRS4f/l22NFM xAiUxvqrY5cf2E/TzDBdniyNv3ZIoLH7EF9OXA7wMVaT4nUVowP5b2MgRQ9W06Mg4kNd0T 3jxWsAHf8caVpjTzd62W666TML/dcTP9lciXaAUzU8wUDt5TKGek40LStpUlXQoNAVZQ7a 2Z2RLEvCDzgSxkvKnmExN+q3FSp5UsRf8bX1oRavcs/9zYEid7U/KHAUabm1uQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TltdQ5mdnzlj2; Thu, 29 Feb 2024 14:19: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 41TEJMJ7005630; Thu, 29 Feb 2024 14:19:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41TEJMOO005627; Thu, 29 Feb 2024 14:19:22 GMT (envelope-from git) Date: Thu, 29 Feb 2024 14:19:22 GMT Message-Id: <202402291419.41TEJMOO005627@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: aa80cfadff0b - main - lorder: Tweak invalid file test. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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: aa80cfadff0bb715ca090cbd1b3561a1619251d5 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=aa80cfadff0bb715ca090cbd1b3561a1619251d5 commit aa80cfadff0bb715ca090cbd1b3561a1619251d5 Author: Dag-Erling Smørgrav AuthorDate: 2024-02-29 13:59:25 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-02-29 13:59:25 +0000 lorder: Tweak invalid file test. Different implementations of `nm` have different ways of telling you that your file is not a valid object or library, but they all seem to have “not recognized” as a common substring. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D44154 --- usr.bin/lorder/tests/lorder_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/lorder/tests/lorder_test.sh b/usr.bin/lorder/tests/lorder_test.sh index 449cda29f825..a4276b2dcfe6 100644 --- a/usr.bin/lorder/tests/lorder_test.sh +++ b/usr.bin/lorder/tests/lorder_test.sh @@ -52,7 +52,7 @@ invalid_head() { } invalid_body() { echo "not an object file" >invalid.o - atf_check -s not-exit:0 -e match:"File format not" -o empty \ + atf_check -s not-exit:0 -e match:"not recognized" -o empty \ lorder invalid.o } From nobody Thu Feb 29 16:12:30 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tlx7y1k0cz5CS3q; Thu, 29 Feb 2024 16:12: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 4Tlx7y1GT6z4vw9; Thu, 29 Feb 2024 16:12:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709223150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UybSWKi3A+FhWkTjK6Z5AFRwrxZKhWXzc5zfaEOKQNo=; b=jnqzqFlqd7ZxLqmkryUIIxDmcpLn5LeIfl28FMH0JTO1wiRs5tBTQoNj+GuDrgTu45Ng7r RLs/uoNI0Jv7jxJNtYZfAtRG4hbAYLeIDOY7G/9ecmvMO2MAmFOXB4l1iQL7vqQ34OuMLH dAoWXaNUHAltfzf3x6jvaKAM/ITUlYOiOHtl7KJkttBXxgwyYb0GPElQDrmQ09Oe03X4Op O2GIPyM+5BxY0/DQC/np2PsP6J7TXqfaKKOmEYjypS205GQ767y0qtArYzN095X+fJQlXQ PSFZNQwGyqFVWnXb4qDl0Ikn6SQam7+0VkDOZcfLcO2RTfc/Dp2dg/FtnLRPrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709223150; a=rsa-sha256; cv=none; b=hp8m5WcQ5xG2RycyimwQJ3Xq+ADT+DcWrejRpVrAjD0YUdB7qP8joHbGkfZB1DYI2VP1PF Owd60YNxm9Fmi/dr4XRRqQmX/wWsRobnwo51oKylx1+WmFb9DI8hqZTjAFTXS+u07cXhw8 8ajEOVNpQ+0QLm18tjy6XigsJIwEmupoaJtiNtxnL4suc+KgONcUBZ8a1KIEqVtzT8x7px OAEeR84fqW+pjUlEQDXvA7TXsCtiiY2RtKkpZQIzUNEQJH/T6H1Q9qeMydXnbh6PT3lhwT zi9/CSdyFLdrhp4x1sFag592WC65nIBD3I+fIhVutQowPtGqeu92aaZ5yJbRQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709223150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UybSWKi3A+FhWkTjK6Z5AFRwrxZKhWXzc5zfaEOKQNo=; b=ddvcRaFMsFrjR6SXy05aTqzR3iDr66yVdyIdwL/ruaOi5h28VP1sVkRSrSr7DqP2PvWp9i TRQ/bhma4AZmqYzgR8EwKXUuPQqivM3rcu/6qe08ytg8rRmucZw6hG7ihCl5DmWaKPnXMp /KQ99bgJWp+zPC5V6mL+IGJb7lQuLVwEG1lnDN/bT7Uhd1DvLQKR4uBBYZLFjI0rZPsU5D +TU+PfGLanBsoqE4l4w6+C5nviq8zPQWi6IxB2rggDwN5KHNrYkbv8aasbpl26sP//itQA 1W0ZjrHHiSoL0+Bbs1eWShOgCCrKkG0iQwNPdRI5gWqCo2CuVGORpXR8I2vakg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tlx7y0tgczpZB; Thu, 29 Feb 2024 16:12: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 41TGCUxj007032; Thu, 29 Feb 2024 16:12:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41TGCUJe007029; Thu, 29 Feb 2024 16:12:30 GMT (envelope-from git) Date: Thu, 29 Feb 2024 16:12:30 GMT Message-Id: <202402291612.41TGCUJe007029@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: 525e6d6c890f - main - loader/zfs: Fix to actually return the last error List-Id: Commit messages for the main 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: 525e6d6c890f6aee898ac70347e5bb49da6638a1 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=525e6d6c890f6aee898ac70347e5bb49da6638a1 commit 525e6d6c890f6aee898ac70347e5bb49da6638a1 Author: Warner Losh AuthorDate: 2024-02-27 05:47:38 +0000 Commit: Warner Losh CommitDate: 2024-02-29 16:12:21 +0000 loader/zfs: Fix to actually return the last error The last fix, to try to return the last error, really returns the first return code after the last error, which could be zero. Instead, return the last error. Also, change rc to err to make it visually distinct from rv, which is the cause of my error in e54bb0ad8058. Reported by: Bill Sommerfeld Fixes: e54bb0ad8058 Sponsored by: Netflix --- stand/libsa/zfs/zfsimpl.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c index e37582006c7a..41ef5a46f30e 100644 --- a/stand/libsa/zfs/zfsimpl.c +++ b/stand/libsa/zfs/zfsimpl.c @@ -1681,14 +1681,14 @@ static int vdev_write_bootenv_impl(vdev_t *vdev, vdev_boot_envblock_t *be) { vdev_t *kid; - int rv = 0, rc; + int rv = 0, err; STAILQ_FOREACH(kid, &vdev->v_children, v_childlink) { if (kid->v_state != VDEV_STATE_HEALTHY) continue; - rc = vdev_write_bootenv_impl(kid, be); - if (rv != 0) - rv = rc; + err = vdev_write_bootenv_impl(kid, be); + if (err != 0) + rv = err; } /* @@ -1698,12 +1698,12 @@ vdev_write_bootenv_impl(vdev_t *vdev, vdev_boot_envblock_t *be) return (rv); for (int l = 0; l < VDEV_LABELS; l++) { - rc = vdev_label_write(vdev, l, be, + err = vdev_label_write(vdev, l, be, offsetof(vdev_label_t, vl_be)); - if (rc != 0) { + if (err != 0) { printf("failed to write bootenv to %s label %d: %d\n", - vdev->v_name ? vdev->v_name : "unknown", l, rc); - rv = rc; + vdev->v_name ? vdev->v_name : "unknown", l, err); + rv = err; } } return (rv); From nobody Thu Feb 29 16:14:59 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlxBq4yHsz5CS4D; Thu, 29 Feb 2024 16:14: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 4TlxBq48z2z3x20; Thu, 29 Feb 2024 16:14:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709223299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2rCimM2FRbFb8pNkMXiL6f+NJ9iUhQzsJlyL/ATQjyw=; b=DNQO9OFnVfW/Dto/6RzCHDBdJr1KhF7HInvj1lOy+Ze0kDaz4o3Ve1NZFO4BhflREWO2nk sO8pljprA2PbrKSTxKsBGYKY+s6BhQwrFpi+j5b33mu3aYcDcO3aw97T1N9Lv0W42YllxW 8C6AP+nr3AQkeTAyUje7kxEy+nMW3UVLLnJrakWqlG7v1dnpzzg+7/JxzqQvpZK/ECu1wF BfOcNNhs5aQlgCW9xKdRYu9G0PcBSFGaUCh4gzo2TDqYYlDV4UV50Tgxoz4qfpzTL/gcaB 62hverJ4VuAiEdbu7PnyXRHMiu7/emQGfABrvWuq0dRJB3lZkffemOZ8HueREg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709223299; a=rsa-sha256; cv=none; b=rkhDhZtQgx5uBRSRfZZTEeAayZhefaYc77zd8boE5ss/b0kyLfzjJqvSYmqqiE9+xa29ZR nBF/qCwmagnjWLipphBkfoEr6Yct9NzutRN/bVYFPEY4uvAvHTwyWtgxJfX4eviIcPYgJS r3g9cfyjtSAVSr4YyPvJHqupBeE+MqaP9Ehf6suU9VbVL1D+hizwyCzl2KDsXM3TyIrtdn Y83NOyJWVxijvgkHFR2MHpjqD3H4HuxQmxn7LKR6MRp9NrX3HJg1Q9VCAT2+WLwbkGTlgl VQNkfkMh0ruH2v6T8L77PPWjL5VY778nsiZAbVAW1iIFGOoxadpM1pviUQoLSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709223299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2rCimM2FRbFb8pNkMXiL6f+NJ9iUhQzsJlyL/ATQjyw=; b=nHITVvJ5YECwL67BDYMpP+v4jp9RG4pXkstQdulPcrn+DjBTJuWnt/5LABQjuuNXiUzmnG q0KfTxcEWZrjJz8y5myi2H4dKNOIjkvtXDMEK//gtelAr0r6olX9S7Ma0PMIgZOCd/OEEz GpLGxa6WLF9iaiDwhv5t/ZVV/pYH17OFkdbRqgRPZF7PV5wC4yP7XnbDaWcQmKRpss+XnX IgVAKdh8PibD3z/9HTbaZ0RcNLyk0/6MOgedLzFYT61AEncwe5iJyYafFKQnwl9bb4gwfP ZX1h/F0sLYIei7eOP9WEZF7Bd9ZpNQiN5kbekyX0Z1hnjO/nhDhub8M79fzPxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlxBq3mx2zpcY; Thu, 29 Feb 2024 16:14:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41TGExDF007459; Thu, 29 Feb 2024 16:14:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41TGExi2007456; Thu, 29 Feb 2024 16:14:59 GMT (envelope-from git) Date: Thu, 29 Feb 2024 16:14:59 GMT Message-Id: <202402291614.41TGExi2007456@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: 2425dbdff3d7 - main - loader/efi: Small diff reduction List-Id: Commit messages for the main 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: 2425dbdff3d7c23f464262517faf1f99a1b51165 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2425dbdff3d7c23f464262517faf1f99a1b51165 commit 2425dbdff3d7c23f464262517faf1f99a1b51165 Author: Warner Losh AuthorDate: 2024-02-29 16:14:41 +0000 Commit: Warner Losh CommitDate: 2024-02-29 16:14:47 +0000 loader/efi: Small diff reduction Make doing the boot once protocol more similar to copies of this code. Sponsored by: Netflix Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D44007 --- stand/efi/loader/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 12efe594e0e2..e4d62f2e940c 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -261,8 +261,9 @@ probe_zfs_currdev(uint64_t guid) currdev.dd.d_unit = 0; currdev.pool_guid = guid; currdev.root_guid = 0; - set_currdev_devdesc((struct devdesc *)&currdev); devname = devformat(&currdev.dd); + set_currdev(devname); + printf("Setting currdev to %s\n", devname); init_zfs_boot_options(devname); if (zfs_get_bootonce(&currdev, OS_BOOTONCE, buf, sizeof(buf)) == 0) { From nobody Thu Feb 29 16:31:01 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlxYK4tMnz5CTkh; Thu, 29 Feb 2024 16:31:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TlxYK3mHsz42j1; Thu, 29 Feb 2024 16:31:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709224261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CVoqk9O8Jg79K3BXuuIyI4rB6f3AUHxaa/fKne9+w8g=; b=ENzULZ3EULE4AfcpBSCvbcKg8lkAB7ph/vx/Z3TkTE+r09BAYZSRT4F4dhzFRdS2dIZp+i x6iC7BdeeXeo4ii7jVS8qgznfCqC10n2wE+ZRKOj+FuLZrGc1a8p4dFJLjymHj0UAkegX6 rNmiokJf/GxhsciLHNvpV/6YyFG2NeicL/pZzqjBICkIQzwYaj128GiVbjBKhmR010YpO/ u0ZqQsp3xeIOHX0uI1C79Od/P83GRdgKvwpnvseXPmkLhCR5GvnHk7tz38To9hWiVwCJPC L9HmjCuPmU65AhCa0NIbR738sUytDfQxSkX+6wUkXRMcjrda/RqmdjTg732EWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709224261; a=rsa-sha256; cv=none; b=aHDyb4P7IoW9FlquyWVVkBM1IEIzEAX6aqUqX3QI332OArDftIMygRvQsxKt930rjfMfFM ogqchvvkvMCzievE1FkGV6YPoVofmzkN2R8mCeFqhx6sWt7J52f6YlBxQzTTgF974/9f9P lcGPGHrEYdRXkjXOJOvxUBCltSK2gWMKhpUlkDp7g1b1iMWymE5CnwjX4uxpp+AO0Xr5Z9 51BKrFOMOuYe5ZHeGGswl61IWZv/iy4LZ9mZKt0v0lcj2W0PgNvEZON3t2WUxY0FxgHJit cYOCcVA2TkTShEjt385t+5q+/Io79X7xK27Ctv6x5YfQKI8uLiQjwRq2GMzllg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709224261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CVoqk9O8Jg79K3BXuuIyI4rB6f3AUHxaa/fKne9+w8g=; b=TEFByQUk1C8/PFUK9zbOf40XGnZY95AHB1mPxZNl2iyJVaYpMFYqimG5Zfl/Basjq3gw1Y ZBCHS3EyEaf8rCjh/irR2+m7P/ChPF3zGK7Up+Lj1HgRbBs/i5/ZNt3+e9c39cKW0PGIYX uyzT+vTSW1+/nkUPhmSRCfC9bog2FlHn0cn7IawsBCKNCnlSODd4QTdmpZRwROSvsNbxt9 ijiyCB0jYUnIn8JZ7y6fdrNwv8OyCfH+ZHsXUSLKPj9+AMn3AfSxTPbwKR5bK/uuAPRd6e MB5AemQgNO8Z9uSy9doeUZ8V6c17vRQzwZATR418DzvM8qd4uBa7dIq/S+FDjg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlxYK352kzpXg; Thu, 29 Feb 2024 16:31: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 41TGV1bn035903; Thu, 29 Feb 2024 16:31:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41TGV1Zj035900; Thu, 29 Feb 2024 16:31:01 GMT (envelope-from git) Date: Thu, 29 Feb 2024 16:31:01 GMT Message-Id: <202402291631.41TGV1Zj035900@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: 23dff4fdba98 - main - kernel: Sync ldscript files wrt gnu.attributes and .note.GNU-stack List-Id: Commit messages for the main 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: 23dff4fdba987a56f4118f065cdb534cb6faba37 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=23dff4fdba987a56f4118f065cdb534cb6faba37 commit 23dff4fdba987a56f4118f065cdb534cb6faba37 Author: Warner Losh AuthorDate: 2024-02-29 16:30:37 +0000 Commit: Warner Losh CommitDate: 2024-02-29 16:30:37 +0000 kernel: Sync ldscript files wrt gnu.attributes and .note.GNU-stack Bring the keeping of .gnu.attributes to all architectures. Also discard .note.GNU-stack on all archtiectures. Plus delete obsolete comment that was removed from i386 in 2010. Sponsored by: Netflix Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44069 --- sys/conf/ldscript.amd64 | 1 + sys/conf/ldscript.arm | 4 +++- sys/conf/ldscript.arm64 | 4 +++- sys/conf/ldscript.i386 | 1 + sys/conf/ldscript.powerpc | 6 +++--- sys/conf/ldscript.powerpc64 | 6 +++--- sys/conf/ldscript.powerpc64le | 6 +++--- sys/conf/ldscript.powerpcspe | 5 +++-- sys/conf/ldscript.riscv | 4 +++- 9 files changed, 23 insertions(+), 14 deletions(-) diff --git a/sys/conf/ldscript.amd64 b/sys/conf/ldscript.amd64 index 9c6e603a5753..302f5cd2c4f8 100644 --- a/sys/conf/ldscript.amd64 +++ b/sys/conf/ldscript.amd64 @@ -213,6 +213,7 @@ SECTIONS /* DWARF 3 */ .debug_pubtypes 0 : { *(.debug_pubtypes) } .debug_ranges 0 : { *(.debug_ranges) } + .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } /DISCARD/ : { *(.note.GNU-stack) } } diff --git a/sys/conf/ldscript.arm b/sys/conf/ldscript.arm index a9c39977a6fc..57ce8c068c44 100644 --- a/sys/conf/ldscript.arm +++ b/sys/conf/ldscript.arm @@ -153,5 +153,7 @@ SECTIONS .debug_funcnames 0 : { *(.debug_funcnames) } .debug_typenames 0 : { *(.debug_typenames) } .debug_varnames 0 : { *(.debug_varnames) } - /* These must appear regardless of . */ + + .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } + /DISCARD/ : { *(.note.GNU-stack) } } diff --git a/sys/conf/ldscript.arm64 b/sys/conf/ldscript.arm64 index afb2687f0368..e9edbd8b7402 100644 --- a/sys/conf/ldscript.arm64 +++ b/sys/conf/ldscript.arm64 @@ -170,5 +170,7 @@ SECTIONS .debug_funcnames 0 : { *(.debug_funcnames) } .debug_typenames 0 : { *(.debug_typenames) } .debug_varnames 0 : { *(.debug_varnames) } - /* These must appear regardless of . */ + + .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } + /DISCARD/ : { *(.note.GNU-stack) } } diff --git a/sys/conf/ldscript.i386 b/sys/conf/ldscript.i386 index 6563ed2cd623..c7fe91c9d4d5 100644 --- a/sys/conf/ldscript.i386 +++ b/sys/conf/ldscript.i386 @@ -198,6 +198,7 @@ SECTIONS /* DWARF 3 */ .debug_pubtypes 0 : { *(.debug_pubtypes) } .debug_ranges 0 : { *(.debug_ranges) } + .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } /DISCARD/ : { *(.note.GNU-stack) } } diff --git a/sys/conf/ldscript.powerpc b/sys/conf/ldscript.powerpc index c08123e4eaba..0fa3fc9b3fa7 100644 --- a/sys/conf/ldscript.powerpc +++ b/sys/conf/ldscript.powerpc @@ -1,4 +1,3 @@ - OUTPUT_FORMAT("elf32-powerpc-freebsd", "elf32-powerpc-freebsd", "elf32-powerpc-freebsd") OUTPUT_ARCH(powerpc) @@ -149,6 +148,7 @@ SECTIONS .debug_funcnames 0 : { *(.debug_funcnames) } .debug_typenames 0 : { *(.debug_typenames) } .debug_varnames 0 : { *(.debug_varnames) } - /* These must appear regardless of . */ -} + .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } + /DISCARD/ : { *(.note.GNU-stack) } +} diff --git a/sys/conf/ldscript.powerpc64 b/sys/conf/ldscript.powerpc64 index df279576193f..3e418c3c1189 100644 --- a/sys/conf/ldscript.powerpc64 +++ b/sys/conf/ldscript.powerpc64 @@ -1,4 +1,3 @@ - OUTPUT_FORMAT("elf64-powerpc-freebsd", "elf64-powerpc-freebsd", "elf64-powerpc-freebsd") OUTPUT_ARCH(powerpc:common64) @@ -174,6 +173,7 @@ SECTIONS .debug_funcnames 0 : { *(.debug_funcnames) } .debug_typenames 0 : { *(.debug_typenames) } .debug_varnames 0 : { *(.debug_varnames) } - /* These must appear regardless of . */ -} + .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } + /DISCARD/ : { *(.note.GNU-stack) } +} diff --git a/sys/conf/ldscript.powerpc64le b/sys/conf/ldscript.powerpc64le index 3fd80d3130fb..4fdfcb295ab7 100644 --- a/sys/conf/ldscript.powerpc64le +++ b/sys/conf/ldscript.powerpc64le @@ -1,4 +1,3 @@ - OUTPUT_FORMAT("elf64-powerpcle-freebsd", "elf64-powerpcle-freebsd", "elf64-powerpcle-freebsd") OUTPUT_ARCH(powerpc:common64) @@ -175,6 +174,7 @@ SECTIONS .debug_funcnames 0 : { *(.debug_funcnames) } .debug_typenames 0 : { *(.debug_typenames) } .debug_varnames 0 : { *(.debug_varnames) } - /* These must appear regardless of . */ -} + .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } + /DISCARD/ : { *(.note.GNU-stack) } +} diff --git a/sys/conf/ldscript.powerpcspe b/sys/conf/ldscript.powerpcspe index 7d5b54a655a6..f35a15816108 100644 --- a/sys/conf/ldscript.powerpcspe +++ b/sys/conf/ldscript.powerpcspe @@ -1,4 +1,3 @@ - OUTPUT_FORMAT("elf32-powerpc-freebsd", "elf32-powerpc-freebsd", "elf32-powerpc-freebsd") OUTPUT_ARCH(powerpc) @@ -150,6 +149,8 @@ SECTIONS .debug_funcnames 0 : { *(.debug_funcnames) } .debug_typenames 0 : { *(.debug_typenames) } .debug_varnames 0 : { *(.debug_varnames) } - /* These must appear regardless of . */ + + .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } + /DISCARD/ : { *(.note.GNU-stack) } } diff --git a/sys/conf/ldscript.riscv b/sys/conf/ldscript.riscv index 9a2764a23789..15f896112d04 100644 --- a/sys/conf/ldscript.riscv +++ b/sys/conf/ldscript.riscv @@ -144,5 +144,7 @@ SECTIONS .debug_funcnames 0 : { *(.debug_funcnames) } .debug_typenames 0 : { *(.debug_typenames) } .debug_varnames 0 : { *(.debug_varnames) } - /* These must appear regardless of . */ + + .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } + /DISCARD/ : { *(.note.GNU-stack) } } From nobody Thu Feb 29 16:37:04 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlxhJ4CvYz5CVH9; Thu, 29 Feb 2024 16:37: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 4TlxhJ3lKRz441M; Thu, 29 Feb 2024 16:37:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709224624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yiM9UbNoypBQsgN/pZmwJJiwsiK6PKeMsyafdNr2y20=; b=Qgc1aQGg73OGVH27RFQUvP9WiqtfZFwyQdhV84GO5LEs38i5idcAJEyPrjlF+m+5Fj37Sf xXfmYk5kIw5RLiQ/jGpzbLXB/wvEP/z+PY4zGsfm4o1HAh8V8hOxLZFseVj+2w7QovFJhH 2CeY4TdHv5dcL1YiR1NFx8Exk4zVFlAXJYDwANZJk4jTL56lzeAvYWVNb2U63cSvFrqXEQ Aogqaw1oeOQp9UITjgo8b0VNJMAlL4nFIcYsJShb5MoxrOkZj5ee3m4Y71EgnKfs3KK/l2 OOGwQyrUHghguL8Hrskxd9LJRx0xwUr1w4FujgOmZJrN/cCvWEOk44Iv1Yef1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709224624; a=rsa-sha256; cv=none; b=INPj9+S6ktHno8fs3oRWvLioeyj81KdemPuU2LAKSYY76QJ1yEQJTOKJjtaGTNaeDBiIVP eA6MCsBlA9Jvqulhgf8vsfC1lqS2hN4/9mjIjVAb7mGSpKjOyykl1gwYS8L3W67sKNcJ9o OkJobF1+2yseyXcnnZpXbOH1r63yz6nd9GwNAPt7XIfjRqLZAUde6beFYvsGy4PVIRqZSi TF8uIUn4rgx3HfPr5X7FX+V8yiya95fqkAt29FshcXgU/rwtyKOJl+HcEwidqMy0eDditm zf54cs2BBlMvMqL4o7Tu9eiC2d5OGaH6U7VUWIHwNi0d/4t+QiGWGh2Nlz6Jdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709224624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yiM9UbNoypBQsgN/pZmwJJiwsiK6PKeMsyafdNr2y20=; b=QMa2AQjFXRxrNjsouG4d/V5s6dJ9D9e+Pc/mfJgjTVFoAwpOMLAnLIPd+e5blyE1MlJ5GZ w1Ae0cGlGEYrFOSBeZcK6VFnL0OnzoMpcJqi7HPIBP2P4E8QMkIUd1ResX0F/YrBPnFKtB OXN1va5pd3e4yswC37iOU53nn4pbrUzFjQ98HBQCBqAte3ZvC/HhXJFFCL2bkbIM/mIRw+ 2/8ByZt2wYAlBlo4HwyfLEEwLp5hyhIflqM8//z1z4fHOlAGKbLsprgZzxUaU11hi/Ekne 2LZMMTMI6Gg9ZK5Y0E4s684rB+tc6ZJwB4tIPTSUAYONTg3EIIuyVqcyUwQ6nw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlxhJ3M3vzpqC; Thu, 29 Feb 2024 16:37: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 41TGb4hM041696; Thu, 29 Feb 2024 16:37:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41TGb4vc041693; Thu, 29 Feb 2024 16:37:04 GMT (envelope-from git) Date: Thu, 29 Feb 2024 16:37:04 GMT Message-Id: <202402291637.41TGb4vc041693@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: c7b1e980ae16 - main - firmware: load binary firmware 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c7b1e980ae16c094e64f318ad2feb98e17bd8f2f Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c7b1e980ae16c094e64f318ad2feb98e17bd8f2f commit c7b1e980ae16c094e64f318ad2feb98e17bd8f2f Author: Warner Losh AuthorDate: 2024-02-29 16:36:20 +0000 Commit: Warner Losh CommitDate: 2024-02-29 16:36:20 +0000 firmware: load binary firmware files When we can't find a .ko module to satisfy the firmware request, try harder by looking for a file to read in directly. We compose this file's name by appending the imagename parameter to the firmware path (currently hard-wired to be /boot/firmware, future plans are for a path). Allow this file to be unloaded when firmware_put() releases the last reference, but we don't need to do the indirection and dance we need to do when unloading the .ko that will unregister the firmware. Sponsored by: Netflix Reviewed by: manu, jhb Differential Revision: https://reviews.freebsd.org/D43555 --- sys/kern/subr_firmware.c | 122 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 114 insertions(+), 8 deletions(-) diff --git a/sys/kern/subr_firmware.c b/sys/kern/subr_firmware.c index 9c9c831d83a8..059bedeaac1c 100644 --- a/sys/kern/subr_firmware.c +++ b/sys/kern/subr_firmware.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -36,9 +37,12 @@ #include #include #include +#include #include #include #include +#include +#include #include #include @@ -85,8 +89,9 @@ struct priv_fw { */ struct priv_fw *parent; - int flags; /* record FIRMWARE_UNLOAD requests */ -#define FW_UNLOAD 0x100 + int flags; +#define FW_BINARY 0x080 /* Firmware directly loaded, file == NULL */ +#define FW_UNLOAD 0x100 /* record FIRMWARE_UNLOAD requests */ /* * 'file' is private info managed by the autoload/unload code. @@ -120,7 +125,8 @@ static LIST_HEAD(, priv_fw) firmware_table; /* * Firmware module operations are handled in a separate task as they - * might sleep and they require directory context to do i/o. + * might sleep and they require directory context to do i/o. We also + * use this when loading binaries directly. */ static struct taskqueue *firmware_tq; static struct task firmware_unload_task; @@ -133,6 +139,11 @@ MTX_SYSINIT(firmware, &firmware_mtx, "firmware table", MTX_DEF); static MALLOC_DEFINE(M_FIRMWARE, "firmware", "device firmware images"); +static uint64_t firmware_max_size = 8u << 20; /* Default to 8MB cap */ +SYSCTL_U64(_debug, OID_AUTO, firmware_max_size, + CTLFLAG_RWTUN, &firmware_max_size, 0, + "Max size permitted for a firmware file."); + /* * Helper function to lookup a name. * As a side effect, it sets the pointer to a free slot, if any. @@ -240,6 +251,85 @@ struct fw_loadimage { uint32_t flags; }; +static const char *fw_path = "/boot/firmware/"; + +static void +try_binary_file(const char *imagename, uint32_t flags) +{ + struct nameidata nd; + struct thread *td = curthread; + struct ucred *cred = td ? td->td_ucred : NULL; + struct sbuf *sb; + struct priv_fw *fp; + const char *fn; + struct vattr vattr; + void *data = NULL; + const struct firmware *fw; + int flags; + size_t resid; + int error; + bool warn = flags & FIRMWARE_GET_NOWARN; + + /* + * XXX TODO: Loop over some path instead of a single element path. + * and fetch this path from the 'firmware_path' kenv the loader sets. + */ + sb = sbuf_new_auto(); + sbuf_printf(sb, "%s%s", fw_path, imagename); + sbuf_finish(sb); + fn = sbuf_data(sb); + if (bootverbose) + printf("Trying to load binary firmware from %s\n", fn); + + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, fn); + flags = FREAD; + error = vn_open(&nd, &flags, 0, NULL); + if (error) + goto err; + NDFREE_PNBUF(&nd); + if (nd.ni_vp->v_type != VREG) + goto err2; + error = VOP_GETATTR(nd.ni_vp, &vattr, cred); + if (error) + goto err2; + + /* + * Limit this to something sane, 8MB by default. + */ + if (vattr.va_size > firmware_max_size) { + printf("Firmware %s is too big: %ld bytes, %ld bytes max.\n", + fn, vattr.va_size, firmware_max_size); + goto err2; + } + data = malloc(vattr.va_size, M_FIRMWARE, M_WAITOK); + error = vn_rdwr(UIO_READ, nd.ni_vp, (caddr_t)data, vattr.va_size, 0, + UIO_SYSSPACE, IO_NODELOCKED, cred, NOCRED, &resid, td); + /* XXX make data read only? */ + VOP_UNLOCK(nd.ni_vp); + vn_close(nd.ni_vp, FREAD, cred, td); + nd.ni_vp = NULL; + if (error != 0 || resid != 0) + goto err; + fw = firmware_register(fn, data, vattr.va_size, 0, NULL); + if (fw == NULL) + goto err; + fp = PRIV_FW(fw); + fp->flags |= FW_BINARY; + if (bootverbose) + printf("%s: Loaded binary firmware using %s\n", imagename, fn); + sbuf_delete(sb); + return; + +err2: /* cleanup in vn_open through vn_close */ + VOP_UNLOCK(nd.ni_vp); + vn_close(nd.ni_vp, FREAD, cred, td); +err: + free(data, M_FIRMWARE); + if (bootverbose || warn) + printf("%s: could not load binary firmware %s either\n", imagename, fn); + sbuf_delete(sb); +} + static void loadimage(void *arg, int npending __unused) { @@ -253,6 +343,7 @@ loadimage(void *arg, int npending __unused) if (bootverbose || (fwli->flags & FIRMWARE_GET_NOWARN) == 0) printf("%s: could not load firmware image, error %d\n", fwli->imagename, error); + try_binary_file(fwli->imagename, fwli->flags); mtx_lock(&firmware_mtx); goto done; } @@ -408,17 +499,32 @@ EVENTHANDLER_DEFINE(mountroot, firmware_mountroot, NULL, 0); static void unloadentry(void *unused1, int unused2) { - struct priv_fw *fp; + struct priv_fw *fp, *tmp; mtx_lock(&firmware_mtx); restart: - LIST_FOREACH(fp, &firmware_table, link) { - if (fp->file == NULL || fp->refcnt != 0 || - (fp->flags & FW_UNLOAD) == 0) + LIST_FOREACH_SAFE(fp, &firmware_table, link, tmp) { + if (((fp->flags & FW_BINARY) == 0 && fp->file == NULL) || + fp->refcnt != 0 || (fp->flags & FW_UNLOAD) == 0) + continue; + + /* + * If we directly loaded the firmware, then we just need to + * remove the entry from the list and free the entry and go to + * the next one. There's no need for the indirection of the kld + * module case, we free memory and go to the next one. + */ + if ((fp->flags & FW_BINARY) != 0) { + LIST_REMOVE(fp, link); + free(__DECONST(char *, fp->fw.data), M_FIRMWARE); + free(__DECONST(char *, fp->fw.name), M_FIRMWARE); + free(fp, M_FIRMWARE); continue; + } /* - * Found an entry. Now: + * Found an entry. This is the kld case, so we have a more + * complex dance. Now: * 1. make sure we scan the table again * 2. clear FW_UNLOAD so we don't try this entry again. * 3. release the lock while trying to unload the module. From nobody Thu Feb 29 16:37:05 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlxhK5Qg7z5CVHB; Thu, 29 Feb 2024 16:37:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TlxhK4cfQz43mq; Thu, 29 Feb 2024 16:37:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709224625; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SN5785BnWe3eQieuoFF9GfzYQ4FjJsMm9ItD5sv2lbE=; b=dfmxWzQxudmYRkCZRWxFvfkjaLqWzPrqdPn+ANvtQdy73IpyaE26oLRAcL3STT/roh4pIs n1KL7/g5+Zh/LT9hq8X8IB50e5pIrq3KSkODmxPZmPA1Hokupxm+EpX1IIMZ91Yc5plBTF J7B+yCO5/vQsZ10QhhGS9sLgWWQRZd2NzlJKkamxOBT493vOJHbLMyml++4cybcG7SaewZ jV/QUWn02paFKEoevW1zb0h493xIqzdfMAddUQR52jM+Vfp1YJ7CHHtFz4SdxHMeNN33Bq 3ogSVPCn6NpnopmE0nZncdjJ30GROA/keW6DzcK5sQpMemnoIVBoc/teV9leSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709224625; a=rsa-sha256; cv=none; b=GcCOfLBn4u8emiV1q272kReLvLNdcDcMdylbYOkUPor2H3qz/aVe8HwZ4o1N8Sa2Jsj1TK QgjJC6r4b+rCFZQTLkKC0kJ9XWhkfNkZhL7Q07HWOkgg1dhiwrNzNUoNmXz26yrUZJNq0r YkMUOIyYpXd+Uxc/7DHY2FsI7oHyCQnBYdXQbALVG8+TkADJ/6Rd9oUeVRJZphaR0l7Dpt t+eDHtyg39KGGdi4oyLEkcLevUixxA+e7x3qqn/JmQ2KPiMUVrECLstKeTsB3VQVaoiQ/q b6jXdDi+BUyZOhsn7IJiKGVqC90vme4ZgKh8mtlaa9f51HpiggoxZZJEGwWA0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709224625; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SN5785BnWe3eQieuoFF9GfzYQ4FjJsMm9ItD5sv2lbE=; b=O2NpS4w21RQouw1OT4zC26bPLZnSkkyk7modjArj31zUs4AUx5B5QUqa5D9Bc0kMO68J6H gAblPwnPHua5HL98sTuNbxQvFJSe7Vhic13Ne0wxdCB1APBBdfRKi3G7BxCsqWSQiO4S/+ K9ITmVqkc5Zr/PqE1iprr0oe8OABmMjBkEJYuBOdHAy1dZvKr4Mvbclvu+fBVNBqqIpzci yiQjzxnsiFbd7VNmGUUmDwLsExgxmb+9ksfhRepJsV+SwFOImSzhTqHEDQJKmcbz298G6m yOPmKh2zPb0mgLyz/3Xav8Zoc4GIeQA9pkJnTPISKhOsjK/oyqU3NirmkHQoLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlxhK4DTBzqNL; Thu, 29 Feb 2024 16:37:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41TGb5PI041757; Thu, 29 Feb 2024 16:37:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41TGb5Wm041754; Thu, 29 Feb 2024 16:37:05 GMT (envelope-from git) Date: Thu, 29 Feb 2024 16:37:05 GMT Message-Id: <202402291637.41TGb5Wm041754@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: 479905a1ed26 - main - firmware: Allow binary files to be loaded by /boot/loader List-Id: Commit messages for the main 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: 479905a1ed26c54ef29cdff65cf25f7feade654b Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=479905a1ed26c54ef29cdff65cf25f7feade654b commit 479905a1ed26c54ef29cdff65cf25f7feade654b Author: Warner Losh AuthorDate: 2024-02-29 16:36:31 +0000 Commit: Warner Losh CommitDate: 2024-02-29 16:36:31 +0000 firmware: Allow binary files to be loaded by /boot/loader Files loaded "-t firmware" (or module_type="firmware"). They are registered with the firmware system using the full path to the file. There's only one firmware per file, and it is the entire file. We do an extra firmware_get() on any firmware we find here to prevent them from ever being unloaded (we can't handle that case sanely). Sponsored by: Netflix Reviewed by: tsoome, jhb Differential Revision: https://reviews.freebsd.org/D43522 --- sys/kern/subr_firmware.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/sys/kern/subr_firmware.c b/sys/kern/subr_firmware.c index 059bedeaac1c..33ec2e0cc0e4 100644 --- a/sys/kern/subr_firmware.c +++ b/sys/kern/subr_firmware.c @@ -161,6 +161,19 @@ lookup(const char *name) LIST_FOREACH(fp, &firmware_table, link) { if (fp->fw.name != NULL && strcasecmp(name, fp->fw.name) == 0) break; + + /* + * If the name looks like an absolute path, also try to match + * the last part of the string to the requested firmware if it + * matches the trailing components. This allows us to load + * /boot/firmware/abc/bca2233_fw.bin and match it against + * requests for bca2233_fw.bin or abc/bca2233_fw.bin. + */ + if (*fp->fw.name == '/' && strlen(fp->fw.name) > strlen(name)) { + const char *p = fp->fw.name + strlen(fp->fw.name) - strlen(name); + if (p[-1] == '/' && strcasecmp(name, p) == 0) + break; + } } return (fp); } @@ -548,6 +561,42 @@ restart: mtx_unlock(&firmware_mtx); } +/* + * Find all the binary firmware that was loaded in the boot loader via load -t + * firmware foo. There is only one firmware per file, it's the whole file, and + * there's no meaningful version passed in, so pass 0 for that. If version is + * needed by the consumer (and not just arbitrarily defined), the .ko version + * must be used instead. + */ +static void +firmware_binary_files(void) +{ + caddr_t file; + char *name; + const char *type; + const void *addr; + size_t size; + unsigned int version = 0; + const struct firmware *fw; + struct priv_fw *fp; + + file = 0; + for (;;) { + file = preload_search_next_name(file); + if (file == 0) + break; + type = (const char *)preload_search_info(file, MODINFO_TYPE); + if (type == NULL || strcmp(type, "firmware") != 0) + continue; + name = preload_search_info(file, MODINFO_NAME); + addr = preload_fetch_addr(file); + size = preload_fetch_size(file); + fw = firmware_register(name, addr, size, version, NULL); + fp = PRIV_FW(fw); + fp->refcnt++; /* Hold an extra reference so we never unload */ + } +} + /* * Module glue. */ @@ -566,6 +615,7 @@ firmware_modevent(module_t mod, int type, void *unused) /* NB: use our own loop routine that sets up context */ (void) taskqueue_start_threads(&firmware_tq, 1, PWAIT, "firmware taskq"); + firmware_binary_files(); if (rootvnode != NULL) { /* * Root is already mounted so we won't get an event; From nobody Thu Feb 29 16:37:06 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlxhL6qjsz5CVBJ; Thu, 29 Feb 2024 16:37: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 4TlxhL5c4Pz43pv; Thu, 29 Feb 2024 16:37:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709224626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z6qN4Nt1CGnOed4P8oIOYhERfi7o/p3bQ5YL79jkFjY=; b=Tnw0Rm8vK9jeyiIHrwNilE8dt7vOTE9lu253U5Qkp/Zj2YbgNFW9+9EBROTU3o016WreRG UoIXX64ByPHZjzdkNxjhzv4q3UZdu+P4VAnYRCZ4yT1RQSRFrXRKuwI14pRmHgFYnz5DlL bCHwKxNVVRB2wNy/KhBvuu90TQQCtarMZrGT7UA0U7n8WEzEjx26qWkqKr7DNFYUs9/iwj BA8ElBkZaXxxHV/1sqmnL/hg9su1QjBDthdW78B7qiB48o0u2CDcbbJln+RMXNDn8msXDZ VC+DQF1zR/Xfqbi5LNXw43svcObTIU5OtFIG+MJmFBd12ay+VziRK+lL/hn84A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709224626; a=rsa-sha256; cv=none; b=K2kzgEoFk4TeGlTo7pcp9OFuOh+itCCeiNVDQMgnfzhm1LBPWmVaKa293F9e7cLoHlEGHI ufqyBNt264WVeRVygN0ikqIwA+AnF0ZCxdNtzDa5B8SqhVqH2lGwOmZJfkVmmiuYxh8bEr pYxW0OIhUQpyEE3GIgoUY8vgHCFfvJ53M+G7pbkS426dKuM0qMovPE9I1VOTZCgzacpcZJ Aat5S1nwuejHp0edVI4uGDfM8UMyafRldnCpVmpqdiD0AK4xzAoj+XnqKAdYcw1nN21uj6 c78zQktPuxB6d1+fMQnmp2rIZoc5CcsvjxeG6cm7U3twG5/6WBI9h+Txz08qvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709224626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z6qN4Nt1CGnOed4P8oIOYhERfi7o/p3bQ5YL79jkFjY=; b=NpgsPfyJOh3jaTiAEiRO6CWm45Wa4RNEa5cwqlrZ+GxwKhIWs4DIIHDgjdlP+2Pt2PDzJQ TfF6h8PfeZJ09ANx1yV3fifqF04AmTrDDEH+FnaBnMci5DOlfsd6AjuqP9shKt4kvGRN/f 47IhqFvggDDOPj1qXwCWJ1bt7H59541M8+YTpxOsX7wd9FSw1Lze7XOjuFsBOGdyrYpU6D nHu5ML4ygPG2F1lHCvC98+5G65ncoFUO4QbI4deouC32RiqZGOn8UQCGRkbmYF/n4ptlP8 hgDclfeHtTLkIhdDfXWrDibkESTgb1lH1ULaRzqW2WDVjWMcCmEVYx5bzAGtMw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlxhL5CZbzq8p; Thu, 29 Feb 2024 16:37: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 41TGb6AQ041802; Thu, 29 Feb 2024 16:37:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41TGb6QV041799; Thu, 29 Feb 2024 16:37:06 GMT (envelope-from git) Date: Thu, 29 Feb 2024 16:37:06 GMT Message-Id: <202402291637.41TGb6QV041799@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: 9478c7f5f80b - main - firmware: document new native file loading. List-Id: Commit messages for the main 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: 9478c7f5f80b9bba03632e9a13294defe354150e Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9478c7f5f80b9bba03632e9a13294defe354150e commit 9478c7f5f80b9bba03632e9a13294defe354150e Author: Warner Losh AuthorDate: 2024-02-29 16:36:40 +0000 Commit: Warner Losh CommitDate: 2024-02-29 16:36:40 +0000 firmware: document new native file loading. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D43611 --- share/man/man9/firmware.9 | 99 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 94 insertions(+), 5 deletions(-) diff --git a/share/man/man9/firmware.9 b/share/man/man9/firmware.9 index 1ee2cd655002..883f0a2634d4 100644 --- a/share/man/man9/firmware.9 +++ b/share/man/man9/firmware.9 @@ -21,7 +21,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 January 19, 2024 +.Dd January 25, 2024 .Dt FIRMWARE 9 .Os .Sh NAME @@ -89,9 +89,12 @@ and unregistered by calling These functions are usually (but not exclusively) called by specially crafted kernel modules that contain the firmware image. The modules can be statically compiled in the kernel, or loaded by -.Nm /boot/loader , +.Pa /boot/loader , manually at runtime, or on demand by the firmware subsystem. .Pp +Firmware binary files may also be loaded directly rather than embedded into +kernel modules. +.Pp .Nm Clients of the firmware subsystem can request access to a given image by calling the function @@ -186,7 +189,7 @@ By default a firmware image will be deferred to a .Xr taskqueue 9 thread so the call may be done while holding a lock. In certain cases, such as on driver detach, this cannot be allowed. -.Sh FIRMWARE LOADING MECHANISMS +.Sh FIRMWARE LOADING VIA MODULES As mentioned before, any component of the system can register firmware images at any time by simply calling .Fn firmware_register . @@ -194,7 +197,7 @@ firmware images at any time by simply calling This is typically done when a module containing a firmware image is given control, whether compiled in, or preloaded by -.Nm /boot/loader , +.Pa /boot/loader , or manually loaded with .Xr kldload 8 . However, a system can implement additional mechanisms to bring @@ -220,7 +223,7 @@ In particular, images are looked up in the directories specified by the sysctl variable .Nm kern.module_path which on most systems defaults to -.Nm /boot/kernel;/boot/modules . +.Pa /boot/kernel;/boot/modules . .Pp Note that in case a module contains multiple images, the caller should first request a @@ -281,16 +284,102 @@ the availability of the following tools: .Xr awk 1 , .Xr make 1 , the compiler and the linker. +.Sh LOADING BINARY FIRMWARE FILES +.Ss Binary Firmware Format +Binary firmware files can also be loaded, either from +.Pa /boot/loader , +or when +.Nm firmware_get +cannot find the registered firmware from a kernel module. +Binary firmware files are raw binary files that the creator of the firmware +made. +They offer an easier way to load firmware, but one that lacks the full +flexibility and generality of kernel modules with the following restrictions: +.Bl -bullet -compact +.It +Binary firmware files only hold one set of firmware. +.It +They do not offer kernel module dependencies to ensure they are loaded +automatically by the boot loader. +.It +They cannot be compiled into the kernel. +.It +The +.Nm imagename +is identical to the full path name used to load the module. +.It +The version number is assumed to be zero. +.El +.Ss Loading from Pa /boot/loader +Binary firmware files may be loaded either from the command line with +.Dq load -t firmware /boot/firmware/filename +or using the +.Xr loader.conf 5 +mechanism to load modules with a type of +.Dq firmware +For example +.Bd -literal +wififw_load="YES" +wififw_name="/boot/firmware/wifi2034_fw.bin" +wififw_type="firmware" +.Ed +.Ss On demand loading from Nm firmware_get +If no kernel module with an embedded firmware image named +.Nm imagename +is loaded, then +.Nm imagename +will be appended to the module path (by default +.Pa /boot/firmware/ ) +and if that file exists, it will be loaded and registered using +.Nm firmware_register +using the full path to the filename as +.Nm imagename . +.Ss Searching for imagename +.Nm firmware_get +uses the following algorithm to find firmware images: +.Bl -bullet -compact +.It +If an existing firmware image is registered for +.Fa imagename, +.that image is returned. +.It +If +.Fa imagename +matches the trailing subpath of a registered image with a full path, that image is returned. +.It +he kernel linker searches for a kernel module named +.Fa imagename . +If a kernel module is found, it is loaded, and +the list of registered firmware images is searched again. +If a match is found, the matching image is returned. +.It +The kernel searches for a file named +.Fa imagename +in the firmware image path +(by default +.Pa /boot/firmware/ ) . +If that file exists and can be read, +it contents are registered as a firmware image with the full path as the +.Nm imagename +and that firmware is returned. +Currently, there is an 8MB limit on the size of the firmware image. +This can be changed by by the sysctl variable +.Nm debug.max_firmware_size . +.El .Sh SEE ALSO .Xr kld 4 , .Xr module 9 .Pp +.Pa /boot/firmware +.Pp .Pa /usr/share/examples/kld/firmware .Sh HISTORY The .Nm firmware system was introduced in .Fx 6.1 . +Binary firmware loading was introduced in +.Fx 15.0 . .Sh AUTHORS This manual page was written by .An Max Laier Aq Mt mlaier@FreeBSD.org . From nobody Thu Feb 29 17:17:56 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlybV12nWz5CYfd; Thu, 29 Feb 2024 17:17:58 +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 4TlybV0bwfz47ZH; Thu, 29 Feb 2024 17:17:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709227078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/czxFDN/iKmF8SpMbiGaHo495Cr/hdvWoOHZM0d5xBs=; b=AVZRWiXDYygqotr7JNQeug/L8b/ZWfUd3dV5IFcQyj658V6L+VoSHbHjJYmxSi1Jny39Si zv+B3Y9JRk9rwsfJvAhmOAkQ+BtD/AaJzdNFW9Q3KroEmlAyqmKjd0k7OPxLpIDQ5mfv1/ XfLajdvOFl7at4YCErq2QZ4PK2DTaHVixH1osI8cDAhmika6gii6DH8atQE+s4E188KuFD cctKS/dksGFFQf6Ngn6dueP9yjZqYtttkY6kWftqncvUPCe/B9G1pkqREf1EpaalE6Z10h P+A4c4GwCFvmFsj2fZvpkjdmR3j8o2vmV02+xJTZlNAuex9K9OGY/tEFoVnIqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709227078; a=rsa-sha256; cv=none; b=A3FYLs6H5U37Xey79YCD2v7IK+DFbX99aGW2Acg3JW9/AaPBRFOj4VqExNbgNlEZ/YqPB5 8bRw3gxvNnxHuJEymfKunwWIAdYDgM+nVbaVQoaRGJnS3p4ptOM5a5DHKBPQ6iCk+8sw20 w2p2gk5KjEQEv0B4VO1I+31Sqlpv5zmxeIt5NpicGwB5KoMIAewkHMa+M2mSHOrqUERv0i gelXZDc6J/Qr28wi5+6rqHfvxIfJdNhdyrWCXzU67MXi+tFwQaXpWlY+1yDWOhw91NXHWv 4k4s7hIt/7PP7/UYRnSEdRAy+7TvHC8YpyEMFqbkaGDHWQ3mhOug/ZVGAVHhjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709227078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/czxFDN/iKmF8SpMbiGaHo495Cr/hdvWoOHZM0d5xBs=; b=PxTkbpPs7IS/Om776JXZGz8F2JOddtsQ0/OPW/Umm2Rklkogr/i/7lLmbBePQ/J+2NtWc0 lHGMdELAFckgx352tsz21sqcXy6KbpotNA4fN9zBEgzHxNjKTyk+XGKO4MVdn1+lDulsWn qmyD1nsDSW8PZfHlFEgh6uMSy869cBdNfDQV683T2xQm+u+Bq5tE1z6b9LayAMbo+ilLuP r66ID2eS16vpGGbMEy60Di5eJkBtKOe31BJOuUL+tBfBW+UYAhzloOtPoWYVjthMkMSzUA M7Q54Q8fgpzOR6olNC/2PjZvDHtY746xPrCKPKKzDPXJ2a8z2z0isNreS8xIjg== Received: from [IPV6:2601:644:937f:4c50:7491:6f2f:4ea1:e2fa] (unknown [IPv6:2601:644:937f:4c50:7491:6f2f:4ea1:e2fa]) (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 4TlybT46XHzSj8; Thu, 29 Feb 2024 17:17:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Thu, 29 Feb 2024 09:17:56 -0800 List-Id: Commit messages for the main 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 Thunderbird Subject: Re: git: b9c0003f0fa3 - main - arm64: Initialize x18 for APs earlier during boot Content-Language: en-US To: Mark Johnston , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202311131551.3ADFpHhg004260@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202311131551.3ADFpHhg004260@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/13/23 7:51 AM, Mark Johnston wrote: > The branch main has been updated by markj: > > URL: https://cgit.FreeBSD.org/src/commit/?id=b9c0003f0fa39ead4bb3953b9118ae6f08e560f8 > > commit b9c0003f0fa39ead4bb3953b9118ae6f08e560f8 > Author: Mark Johnston > AuthorDate: 2023-11-13 15:44:45 +0000 > Commit: Mark Johnston > CommitDate: 2023-11-13 15:44:45 +0000 > > arm64: Initialize x18 for APs earlier during boot > > When KMSAN is configured, the instrumentation inserts calls to > __msan_get_context_state() into all function prologues. The > implementation dereferences curthread and thus assumes that x18 points > to the PCPU area. This applies in particular to init_secondary(), which > currently is responsible for initializing x18 for APs. > > Move initialization into locore to avoid this problem. No functional > change intended. > > Reviewed by: kib, andrew > MFC after: 2 weeks > Sponsored by: Juniper Networks, Inc. > Sponsored by: Klara, Inc. > Differential Revision: https://reviews.freebsd.org/D42533 (Sorry for just now replying, I'm looking at this in more detail while merging to CheriBSD) I think we can remove a bunch of now-dead code from init_secondary after this, and probably don't even need to pass the cpu number to init_secondary either? That is: void init_secondary(uint64_t cpu) { struct pcpu *pcpup; pmap_t pmap0; uint64_t mpidr; ptrauth_mp_start(cpu); /* * Verify that the value passed in 'cpu' argument (aka context_id) is * valid. Some older U-Boot based PSCI implementations are buggy, * they can pass random value in it. */ mpidr = READ_SPECIALREG(mpidr_el1) & CPU_AFF_MASK; if (cpu >= MAXCPU || cpuid_to_pcpu[cpu] == NULL || PCPU_GET_MPIDR(cpuid_to_pcpu[cpu]) != mpidr) { for (cpu = 0; cpu < mp_maxid; cpu++) if (cpuid_to_pcpu[cpu] != NULL && PCPU_GET_MPIDR(cpuid_to_pcpu[cpu]) == mpidr) break; if ( cpu >= MAXCPU) panic("MPIDR for this CPU is not in pcpu table"); } /* * Identify current CPU. This is necessary to setup * affinity registers and to provide support for * runtime chip identification. * * We need this before signalling the CPU is ready to * let the boot CPU use the results. */ pcpup = cpuid_to_pcpu[cpu]; pcpup->pc_midr = get_midr(); identify_cpu(cpu); Can I think instead become something like: void init_secondary(void) { struct pcpu *pcpup; pmap_t pmap0; uint64_t cpu; cpu = PCPU_GET(cpuid); ptrauth_mp_start(cpu); /* * Identify current CPU. This is necessary to setup * affinity registers and to provide support for * runtime chip identification. * * We need this before signalling the CPU is ready to * let the boot CPU use the results. */ pcpup = get_pcpu(); pcpup->pc_midr = get_midr(); identify_cpu(cpu); Maybe we want to keep an explicit panic if PCPU_GET_MPIDR(pcpup) doesn't match the mpidr from the register? -- John Baldwin From nobody Thu Feb 29 17:35:46 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tlz022XQLz5Cb4P; Thu, 29 Feb 2024 17:35:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tlz0222pKz49xy; Thu, 29 Feb 2024 17:35:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709228146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QMhfRmjr2S4DVTlTrJSBZDFEOyhwvy0m8BALuKYC4Ho=; b=lX+qNhMWW8QtNZjC/na/iEa5Uo0BELZyC+4P6rnrsGIAtxa64IY2nCaPw4sgLS4eOVn6Dz Qqf3ina+4AH7MZ5H4JYdMfWgVG1Mb7tCgb04nn5ym/tCm4nrurB/TWFM4kYLdujMJj7d8F iUf/rP/pmWIr2khPLR9g83ARR3/wBtWd5qSCm4NrVqSAjTEjUAPMp6bRkVp9xVmJ8UXL8u wm5OdBLLKr/uOWpbNmPyyfGrBhT1VMFtmpQAvOn8xOhlc7uXGMvdCgeO9Ei1oS1PLGQHqF rRrqon82Z0eEm+a06dXWJ4f6kfKyMEvDYzSBlafhHDpQSGrZWCi1e+u2DuJFHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709228146; a=rsa-sha256; cv=none; b=aW5eOmjNJ+PQJaxvCfXvQBFh5uj7IZqSTBHlXo+ep+ac7Zf0+UEJZ7K8CQZ4/y7KgcKlAe fBfxpzFdZX4b9uEak+F/BMYgrOupN505jcT3xBsqk8zJ6kl/ulol3H1GQiS5rwBB6uoO0s uDP/LFWcz+6GMJTSUIHWO3dGz7bDGMMHrbArfGJ1viiAiF7HlK5ZL2vnen8yDBzVwP+Mfr jznxKPxgM2NDDymHcOmyjISLYg9KlZxy90yPVBKFl8r9urqcUBRXr3mDl/D8b3UCF8cwgk iEmrRMQGsrNBGq9wA8usR0wMB7Sc8Q23KrlSkAcR8HQlh5Z6MoZZA4V9l1luAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709228146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QMhfRmjr2S4DVTlTrJSBZDFEOyhwvy0m8BALuKYC4Ho=; b=dIjXDnv2DPVrBuv8FIYlMdvNCgI6Murd9NzjexK0Y/y8SQPULpesgY/ZPL/xFmqWQf1b1T uBk4KxV7Wh13IGVRBzbqo7vPskhOTWwrDcbB44q5YUqwbfS1E9ea3AVWxC4eF91k1Jxzu/ SGEdQ638ekBk1zEdYce03Jb4/tG4sWF5KNs2L/+/wtwZ6W8RbmjRy74L+SYzkLA2YKlP7q G/E25XpQrxqiKx9Muh8mrxBymB2/HdJEeE4t5OEqTZCGgqyKXnatOv7CdOojyiE/PkqT+F 4GJPCl3HxVbBfaPrtYqSAKDvfqePdLh45eQgrjvJpdLGqyDMMBxPIE1Fx7vC9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tlz021flDzrwg; Thu, 29 Feb 2024 17:35: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 41THZkMt042830; Thu, 29 Feb 2024 17:35:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41THZkGR042827; Thu, 29 Feb 2024 17:35:46 GMT (envelope-from git) Date: Thu, 29 Feb 2024 17:35:46 GMT Message-Id: <202402291735.41THZkGR042827@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: 73157ce4982e - main - RELNOTES: fix my poor english List-Id: Commit messages for the main 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: 73157ce4982e792f00ca42c45c04cdbb05d8a192 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=73157ce4982e792f00ca42c45c04cdbb05d8a192 commit 73157ce4982e792f00ca42c45c04cdbb05d8a192 Author: Baptiste Daroussin AuthorDate: 2024-02-29 17:35:07 +0000 Commit: Baptiste Daroussin CommitDate: 2024-02-29 17:35:41 +0000 RELNOTES: fix my poor english Reported by: Gary Jennejohn --- RELNOTES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELNOTES b/RELNOTES index 25cffbd84eae..9e9152f888db 100644 --- a/RELNOTES +++ b/RELNOTES @@ -12,7 +12,7 @@ Changes to this file should not be MFCed. fe86d923f83f: usbconfig(8) now reads the descriptions of the usb vendor and products - from usb.ids when available similarly to what pciconf(8) do. + from usb.ids when available, similarly to what pciconf(8) does. 4347ef60501f: The powerd(8) utility is now enabled in /etc/rc.conf by default on From nobody Thu Feb 29 17:46:20 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlzDG5sxlz5Cc6F; Thu, 29 Feb 2024 17:46:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TlzDG5Gj2z4F8c; Thu, 29 Feb 2024 17:46:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709228782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ivz+5TopyHly+xItBS3SkHl8B1XrAV2U5jjRqHn9/lA=; b=D+xA+bl0eyg0F/SkNZjX4beufa9w6wBHjoXo5QiZAwldK+Bh2Ch+IQyg1Qliasf8lFmEsi LXUnRcrjuWgx+HgGMKuxkJQEJ4AJeIBODnysJV30zzEavWltYX+sObwo4nqNLjLgTPJcnd l5eT2SReRAgQz8A9nqT0ub/8fogMFbT8LKPkYPXfhraRVKEoBm1adTczFR3ZVPbLASNK/B jBGe+UV2jiu2t1als8V8k2jBjmYDGIMj+RIY2UJeG16cANlqCRrcZ609HT50Ev//nRO8Fi AkZN+B4uhV/Ver43EaJioUhoAOSd52AF8mM7RyA4FOGlVWp8yPLTUl55QR/HmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709228782; a=rsa-sha256; cv=none; b=dkKG1Wv/Zni5JFjHD57cC69SI8nHaBKoDIJm/una2FZwnNklND+CNk+Cn8m47ZTCkVLyDz onq+op2EeT01oFNLoaeSTByiWUQSv7aW2L+XQ8EuUMUscfSREwFsMMYlHPL3Yg4FUx0vqi a6AVqYq+/NskkVxwSlaxe3PEtBkiHF3frJPQpAjfHXg0dcd18E0LGFQdFYpqsTFZqyMXEt eLCiZyeGLX0pO5cOmYlNStTqmp+v3auWazV1KwMrtLp7GVvcuByTWGlLU5cLlkZCGDaxSS kP8TQ3O0YOqzbLM7oTtJyKUfhwUq/kZKMk2LmaCEXmBRHxgU/Tz232PpBt4JAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709228782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ivz+5TopyHly+xItBS3SkHl8B1XrAV2U5jjRqHn9/lA=; b=OAT1v0eiWXpy+ToXZVNbiPeVzaP7bimVOotXsoqxEWSfomxMfq0teC0zx1fb3/gfX94GVz zqqPAhkpyDtNDsx5kE3Aw8n1FFKstBDtWzqGH02evF9nrwrX5Iz/JNzBGc3P34G2nyNP2D 82m1m2Kv7MKYkxM6FRNBL0cNmtGQuOYGmT9ugB7LO8SIo/BCGkb6lAB9SpTbUkYbXl3w4R qByZ1BeKBXHfNRoqRQbReu46L/jWrf7UapyQ2dsslmInfjlDgTLCxhP/rUiaz+HnIQ/c3E P+dMo5VkNV3PjgFuHoa98WBh1dsULiDdVrAx0BMosiyPgZQLO6Yt/3yUB30Jcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlzDG4sYyzrdy; Thu, 29 Feb 2024 17:46: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 41THkM6d060005; Thu, 29 Feb 2024 17:46:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41THkKYf060002; Thu, 29 Feb 2024 17:46:20 GMT (envelope-from git) Date: Thu, 29 Feb 2024 17:46:20 GMT Message-Id: <202402291746.41THkKYf060002@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: f32a6403d346 - main - Merge one true awk from 2024-01-22 for the Awk Second Edition support List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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: f32a6403d34654ac6e61182d09abb5e85850e1ee Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f32a6403d34654ac6e61182d09abb5e85850e1ee commit f32a6403d34654ac6e61182d09abb5e85850e1ee Merge: 73157ce4982e e8a605e129c6 Author: Warner Losh AuthorDate: 2024-02-28 15:16:16 +0000 Commit: Warner Losh CommitDate: 2024-02-29 17:42:06 +0000 Merge one true awk from 2024-01-22 for the Awk Second Edition support This brings in Unicode support, CSV support and a number of bug fixes. They are described in _The AWK Programming Language_, Second Edition, by Al Aho, Brian Kernighan, and Peter Weinberger (Addison-Wesley, 2024, ISBN-13 978-0138269722, ISBN-10 0138269726). Sponsored by: Netflix contrib/one-true-awk/FIXES | 1429 ++------------------ contrib/one-true-awk/FIXES.1e | 1429 ++++++++++++++++++++ contrib/one-true-awk/README.md | 80 +- contrib/one-true-awk/awk.1 | 34 +- contrib/one-true-awk/awk.h | 23 +- contrib/one-true-awk/awkgram.y | 49 +- contrib/one-true-awk/b.c | 409 ++++-- contrib/one-true-awk/bugs-fixed/REGRESS | 8 +- .../one-true-awk/bugs-fixed/getline-corruption.awk | 5 + .../one-true-awk/bugs-fixed/getline-corruption.in | 1 + .../one-true-awk/bugs-fixed/getline-corruption.ok | 1 + contrib/one-true-awk/bugs-fixed/matchop-deref.awk | 11 + contrib/one-true-awk/bugs-fixed/matchop-deref.bad | 2 + contrib/one-true-awk/bugs-fixed/matchop-deref.in | 1 + contrib/one-true-awk/bugs-fixed/matchop-deref.ok | 2 + .../one-true-awk/bugs-fixed/missing-precision.ok | 2 + contrib/one-true-awk/bugs-fixed/negative-nf.ok | 2 + contrib/one-true-awk/bugs-fixed/pfile-overflow.ok | 4 + contrib/one-true-awk/bugs-fixed/rstart-rlength.awk | 10 + contrib/one-true-awk/bugs-fixed/rstart-rlength.ok | 4 + contrib/one-true-awk/bugs-fixed/system-status.awk | 19 + contrib/one-true-awk/bugs-fixed/system-status.bad | 3 + contrib/one-true-awk/bugs-fixed/system-status.ok | 3 + contrib/one-true-awk/bugs-fixed/system-status.ok2 | 3 + .../one-true-awk/bugs-fixed/unicode-fs-rs-1.awk | 6 + contrib/one-true-awk/bugs-fixed/unicode-fs-rs-1.in | 2 + contrib/one-true-awk/bugs-fixed/unicode-fs-rs-1.ok | 5 + .../one-true-awk/bugs-fixed/unicode-fs-rs-2.awk | 7 + contrib/one-true-awk/bugs-fixed/unicode-fs-rs-2.in | 2 + contrib/one-true-awk/bugs-fixed/unicode-fs-rs-2.ok | 4 + .../one-true-awk/bugs-fixed/unicode-null-match.awk | 6 + .../one-true-awk/bugs-fixed/unicode-null-match.bad | 1 + .../one-true-awk/bugs-fixed/unicode-null-match.ok | 1 + contrib/one-true-awk/lex.c | 60 +- contrib/one-true-awk/lib.c | 158 ++- contrib/one-true-awk/main.c | 23 +- contrib/one-true-awk/makefile | 8 +- contrib/one-true-awk/maketab.c | 4 +- contrib/one-true-awk/parse.c | 2 +- contrib/one-true-awk/proto.h | 10 +- contrib/one-true-awk/run.c | 942 +++++++++---- contrib/one-true-awk/testdir/Compare.tt | 2 +- contrib/one-true-awk/testdir/REGRESS | 2 +- contrib/one-true-awk/testdir/T.argv | 6 + contrib/one-true-awk/testdir/T.csv | 80 ++ contrib/one-true-awk/testdir/T.flags | 5 +- contrib/one-true-awk/testdir/T.misc | 20 + contrib/one-true-awk/testdir/T.overflow | 2 + contrib/one-true-awk/testdir/T.split | 1 + contrib/one-true-awk/testdir/T.utf | 194 +++ contrib/one-true-awk/testdir/T.utfre | 234 ++++ contrib/one-true-awk/testdir/tt.15 | 2 +- contrib/one-true-awk/tran.c | 26 +- 53 files changed, 3525 insertions(+), 1824 deletions(-) diff --cc contrib/one-true-awk/FIXES.1e index 000000000000,8cbd6ac1a097..8cbd6ac1a097 mode 000000,100644..100644 --- a/contrib/one-true-awk/FIXES.1e +++ b/contrib/one-true-awk/FIXES.1e diff --cc contrib/one-true-awk/README.md index 76ae3d48c983,000000000000..a41fb3c3b128 mode 100644,000000..100644 --- a/contrib/one-true-awk/README.md +++ b/contrib/one-true-awk/README.md @@@ -1,123 -1,0 +1,149 @@@ +# The One True Awk + +This is the version of `awk` described in _The AWK Programming Language_, - by Al Aho, Brian Kernighan, and Peter Weinberger - (Addison-Wesley, 1988, ISBN 0-201-07981-X). ++Second Edition, by Al Aho, Brian Kernighan, and Peter Weinberger ++(Addison-Wesley, 2024, ISBN-13 978-0138269722, ISBN-10 0138269726). ++ ++## What's New? ## ++ ++This version of Awk handles UTF-8 and comma-separated values (CSV) input. ++ ++### Strings ### ++ ++Functions that process strings now count Unicode code points, not bytes; ++this affects `length`, `substr`, `index`, `match`, `split`, ++`sub`, `gsub`, and others. Note that code ++points are not necessarily characters. ++ ++UTF-8 sequences may appear in literal strings and regular expressions. ++Aribtrary characters may be included with `\u` followed by 1 to 8 hexadecimal digits. ++ ++### Regular expressions ### ++ ++Regular expressions may include UTF-8 code points, including `\u`. ++ ++### CSV ### ++ ++The option `--csv` turns on CSV processing of input: ++fields are separated by commas, fields may be quoted with ++double-quote (`"`) characters, quoted fields may contain embedded newlines. ++Double-quotes in fields have to be doubled and enclosed in quoted fields. ++In CSV mode, `FS` is ignored. ++ ++If no explicit separator argument is provided, ++field-splitting in `split` is determined by CSV mode. + +## Copyright + +Copyright (C) Lucent Technologies 1997
+All Rights Reserved + +Permission to use, copy, modify, and distribute this software and +its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the name Lucent Technologies or any of +its entities not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +## Distribution and Reporting Problems + +Changes, mostly bug fixes and occasional enhancements, are listed +in `FIXES`. If you distribute this code further, please please please +distribute `FIXES` with it. + +If you find errors, please report them - to bwk@cs.princeton.edu. ++to the current maintainer, ozan.yigit@gmail.com. +Please _also_ open an issue in the GitHub issue tracker, to make +it easy to track issues. +Thanks. + +## Submitting Pull Requests + +Pull requests are welcome. Some guidelines: + +* Please do not use functions or facilities that are not standard (e.g., +`strlcpy()`, `fpurge()`). + +* Please run the test suite and make sure that your changes pass before +posting the pull request. To do so: + + 1. Save the previous version of `awk` somewhere in your path. Call it `nawk` (for example). + 1. Run `oldawk=nawk make check > check.out 2>&1`. + 1. Search for `BAD` or `error` in the result. In general, look over it manually to make sure there are no errors. + +* Please create the pull request with a request +to merge into the `staging` branch instead of into the `master` branch. +This allows us to do testing, and to make any additional edits or changes +after the merge but before merging to `master`. + +## Building + +The program itself is created by + + make + +which should produce a sequence of messages roughly like this: + - yacc -d awkgram.y - conflicts: 43 shift/reduce, 85 reduce/reduce - mv y.tab.c ytab.c - mv y.tab.h ytab.h - cc -c ytab.c - cc -c b.c - cc -c main.c - cc -c parse.c - cc maketab.c -o maketab - ./maketab >proctab.c - cc -c proctab.c - cc -c tran.c - cc -c lib.c - cc -c run.c - cc -c lex.c - cc ytab.o b.o main.o parse.o proctab.o tran.o lib.o run.o lex.o -lm ++ bison -d awkgram.y ++ awkgram.y: warning: 44 shift/reduce conflicts [-Wconflicts-sr] ++ awkgram.y: warning: 85 reduce/reduce conflicts [-Wconflicts-rr] ++ awkgram.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples ++ gcc -g -Wall -pedantic -Wcast-qual -O2 -c -o awkgram.tab.o awkgram.tab.c ++ gcc -g -Wall -pedantic -Wcast-qual -O2 -c -o b.o b.c ++ gcc -g -Wall -pedantic -Wcast-qual -O2 -c -o main.o main.c ++ gcc -g -Wall -pedantic -Wcast-qual -O2 -c -o parse.o parse.c ++ gcc -g -Wall -pedantic -Wcast-qual -O2 maketab.c -o maketab ++ ./maketab awkgram.tab.h >proctab.c ++ gcc -g -Wall -pedantic -Wcast-qual -O2 -c -o proctab.o proctab.c ++ gcc -g -Wall -pedantic -Wcast-qual -O2 -c -o tran.o tran.c ++ gcc -g -Wall -pedantic -Wcast-qual -O2 -c -o lib.o lib.c ++ gcc -g -Wall -pedantic -Wcast-qual -O2 -c -o run.o run.c ++ gcc -g -Wall -pedantic -Wcast-qual -O2 -c -o lex.o lex.c ++ gcc -g -Wall -pedantic -Wcast-qual -O2 awkgram.tab.o b.o main.o parse.o proctab.o tran.o lib.o run.o lex.o -lm + +This produces an executable `a.out`; you will eventually want to +move this to some place like `/usr/bin/awk`. + +If your system does not have `yacc` or `bison` (the GNU +equivalent), you need to install one of them first. ++The default in the `makefile` is `bison`; you will have ++to edit the `makefile` to use `yacc`. + - NOTE: This version uses ANSI C (C 99), as you should also. We have ++NOTE: This version uses ISO/IEC C99, as you should also. We have +compiled this without any changes using `gcc -Wall` and/or local C +compilers on a variety of systems, but new systems or compilers +may raise some new complaint; reports of difficulties are +welcome. + +This compiles without change on Macintosh OS X using `gcc` and +the standard developer tools. + +You can also use `make CC=g++` to build with the GNU C++ compiler, +should you choose to do so. + - The version of `malloc` that comes with some systems is sometimes - astonishly slow. If `awk` seems slow, you might try fixing that. - More generally, turning on optimization can significantly improve - `awk`'s speed, perhaps by 1/3 for highest levels. - +## A Note About Releases + - We don't do releases. ++We don't usually do releases. + +## A Note About Maintenance + +NOTICE! Maintenance of this program is on a ''best effort'' +basis. We try to get to issues and pull requests as quickly +as we can. Unfortunately, however, keeping this program going +is not at the top of our priority list. + +#### Last Updated + - Sat Jul 25 14:00:07 EDT 2021 ++Mon 05 Feb 2024 08:46:55 IST diff --cc contrib/one-true-awk/bugs-fixed/getline-corruption.awk index 000000000000,461e551cfff5..461e551cfff5 mode 000000,100644..100644 --- a/contrib/one-true-awk/bugs-fixed/getline-corruption.awk +++ b/contrib/one-true-awk/bugs-fixed/getline-corruption.awk diff --cc contrib/one-true-awk/bugs-fixed/getline-corruption.in index 000000000000,78981922613b..78981922613b mode 000000,100644..100644 --- a/contrib/one-true-awk/bugs-fixed/getline-corruption.in +++ b/contrib/one-true-awk/bugs-fixed/getline-corruption.in diff --cc contrib/one-true-awk/bugs-fixed/getline-corruption.ok index 000000000000,3efb54597c6d..3efb54597c6d mode 000000,100644..100644 --- a/contrib/one-true-awk/bugs-fixed/getline-corruption.ok +++ b/contrib/one-true-awk/bugs-fixed/getline-corruption.ok diff --cc contrib/one-true-awk/bugs-fixed/matchop-deref.awk index 000000000000,000000000000..6c066aad911d new file mode 100644 --- /dev/null +++ b/contrib/one-true-awk/bugs-fixed/matchop-deref.awk @@@ -1,0 -1,0 +1,11 @@@ ++function foo() { ++ return "aaaaaab" ++} ++ ++BEGIN { ++ print match(foo(), "b") ++} ++ ++{ ++ print match(substr($0, 1), "b") ++} diff --cc contrib/one-true-awk/bugs-fixed/matchop-deref.bad index 000000000000,000000000000..343ee5c2f6cb new file mode 100644 --- /dev/null +++ b/contrib/one-true-awk/bugs-fixed/matchop-deref.bad @@@ -1,0 -1,0 +1,2 @@@ ++-1 ++-1 diff --cc contrib/one-true-awk/bugs-fixed/matchop-deref.in index 000000000000,000000000000..0d197e1b6a30 new file mode 100644 --- /dev/null +++ b/contrib/one-true-awk/bugs-fixed/matchop-deref.in @@@ -1,0 -1,0 +1,1 @@@ ++aaaaaab diff --cc contrib/one-true-awk/bugs-fixed/matchop-deref.ok index 000000000000,000000000000..49019db80789 new file mode 100644 --- /dev/null +++ b/contrib/one-true-awk/bugs-fixed/matchop-deref.ok @@@ -1,0 -1,0 +1,2 @@@ ++7 ++7 diff --cc contrib/one-true-awk/bugs-fixed/missing-precision.ok index 000000000000,75e1e3d00446..75e1e3d00446 mode 000000,100644..100644 --- a/contrib/one-true-awk/bugs-fixed/missing-precision.ok +++ b/contrib/one-true-awk/bugs-fixed/missing-precision.ok diff --cc contrib/one-true-awk/bugs-fixed/negative-nf.ok index 000000000000,de97f8b27def..de97f8b27def mode 000000,100644..100644 --- a/contrib/one-true-awk/bugs-fixed/negative-nf.ok +++ b/contrib/one-true-awk/bugs-fixed/negative-nf.ok diff --cc contrib/one-true-awk/bugs-fixed/pfile-overflow.ok index 000000000000,a0de50f9007f..a0de50f9007f mode 000000,100644..100644 --- a/contrib/one-true-awk/bugs-fixed/pfile-overflow.ok +++ b/contrib/one-true-awk/bugs-fixed/pfile-overflow.ok diff --cc contrib/one-true-awk/bugs-fixed/rstart-rlength.awk index 000000000000,f423f0168be3..f423f0168be3 mode 000000,100644..100644 --- a/contrib/one-true-awk/bugs-fixed/rstart-rlength.awk +++ b/contrib/one-true-awk/bugs-fixed/rstart-rlength.awk diff --cc contrib/one-true-awk/bugs-fixed/rstart-rlength.ok index 000000000000,961cb895b51b..961cb895b51b mode 000000,100644..100644 --- a/contrib/one-true-awk/bugs-fixed/rstart-rlength.ok +++ b/contrib/one-true-awk/bugs-fixed/rstart-rlength.ok diff --cc contrib/one-true-awk/bugs-fixed/system-status.awk index 000000000000,8daf563e6f4f..8daf563e6f4f mode 000000,100644..100644 --- a/contrib/one-true-awk/bugs-fixed/system-status.awk +++ b/contrib/one-true-awk/bugs-fixed/system-status.awk diff --cc contrib/one-true-awk/bugs-fixed/system-status.bad index 000000000000,a1317dba54a8..a1317dba54a8 mode 000000,100644..100644 --- a/contrib/one-true-awk/bugs-fixed/system-status.bad +++ b/contrib/one-true-awk/bugs-fixed/system-status.bad diff --cc contrib/one-true-awk/bugs-fixed/system-status.ok index 000000000000,737828f5ed7a..737828f5ed7a mode 000000,100644..100644 --- a/contrib/one-true-awk/bugs-fixed/system-status.ok +++ b/contrib/one-true-awk/bugs-fixed/system-status.ok diff --cc contrib/one-true-awk/bugs-fixed/system-status.ok2 index 000000000000,000000000000..f1f631e1cb33 new file mode 100644 --- /dev/null +++ b/contrib/one-true-awk/bugs-fixed/system-status.ok2 @@@ -1,0 -1,0 +1,3 @@@ ++normal status 42 ++death by signal status 257 ++death by signal with core dump status 262 diff --cc contrib/one-true-awk/bugs-fixed/unicode-fs-rs-1.awk index 000000000000,67366ec75070..67366ec75070 mode 000000,100644..100644 --- a/contrib/one-true-awk/bugs-fixed/unicode-fs-rs-1.awk +++ b/contrib/one-true-awk/bugs-fixed/unicode-fs-rs-1.awk diff --cc contrib/one-true-awk/bugs-fixed/unicode-fs-rs-1.in index 000000000000,2e882af62a2c..2e882af62a2c mode 000000,100644..100644 --- a/contrib/one-true-awk/bugs-fixed/unicode-fs-rs-1.in +++ b/contrib/one-true-awk/bugs-fixed/unicode-fs-rs-1.in diff --cc contrib/one-true-awk/bugs-fixed/unicode-fs-rs-1.ok index 000000000000,f337302be903..f337302be903 mode 000000,100644..100644 --- a/contrib/one-true-awk/bugs-fixed/unicode-fs-rs-1.ok +++ b/contrib/one-true-awk/bugs-fixed/unicode-fs-rs-1.ok diff --cc contrib/one-true-awk/bugs-fixed/unicode-fs-rs-2.awk index 000000000000,34d77bf2c95f..34d77bf2c95f mode 000000,100644..100644 --- a/contrib/one-true-awk/bugs-fixed/unicode-fs-rs-2.awk +++ b/contrib/one-true-awk/bugs-fixed/unicode-fs-rs-2.awk diff --cc contrib/one-true-awk/bugs-fixed/unicode-fs-rs-2.in index 000000000000,2de6e718fd3b..2de6e718fd3b mode 000000,100644..100644 --- a/contrib/one-true-awk/bugs-fixed/unicode-fs-rs-2.in +++ b/contrib/one-true-awk/bugs-fixed/unicode-fs-rs-2.in diff --cc contrib/one-true-awk/bugs-fixed/unicode-fs-rs-2.ok index 000000000000,2387001bc1b2..2387001bc1b2 mode 000000,100644..100644 --- a/contrib/one-true-awk/bugs-fixed/unicode-fs-rs-2.ok +++ b/contrib/one-true-awk/bugs-fixed/unicode-fs-rs-2.ok diff --cc contrib/one-true-awk/bugs-fixed/unicode-null-match.awk index 000000000000,0c056126922b..0c056126922b mode 000000,100644..100644 --- a/contrib/one-true-awk/bugs-fixed/unicode-null-match.awk +++ b/contrib/one-true-awk/bugs-fixed/unicode-null-match.awk diff --cc contrib/one-true-awk/bugs-fixed/unicode-null-match.bad index 000000000000,7cd35ff2d932..7cd35ff2d932 mode 000000,100644..100644 --- a/contrib/one-true-awk/bugs-fixed/unicode-null-match.bad +++ b/contrib/one-true-awk/bugs-fixed/unicode-null-match.bad diff --cc contrib/one-true-awk/bugs-fixed/unicode-null-match.ok index 000000000000,1ac142f8a895..1ac142f8a895 mode 000000,100644..100644 --- a/contrib/one-true-awk/bugs-fixed/unicode-null-match.ok +++ b/contrib/one-true-awk/bugs-fixed/unicode-null-match.ok diff --cc contrib/one-true-awk/testdir/T.csv index 000000000000,e0f3d708edaf..e0f3d708edaf mode 000000,100755..100755 --- a/contrib/one-true-awk/testdir/T.csv +++ b/contrib/one-true-awk/testdir/T.csv diff --cc contrib/one-true-awk/testdir/T.utf index 000000000000,18f2b9c355cf..18f2b9c355cf mode 000000,100755..100755 --- a/contrib/one-true-awk/testdir/T.utf +++ b/contrib/one-true-awk/testdir/T.utf diff --cc contrib/one-true-awk/testdir/T.utfre index 000000000000,20e66cbde9a5..20e66cbde9a5 mode 000000,100755..100755 --- a/contrib/one-true-awk/testdir/T.utfre +++ b/contrib/one-true-awk/testdir/T.utfre From nobody Thu Feb 29 17:54:24 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlzPY0F6tz5CcR9; Thu, 29 Feb 2024 17:54:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TlzPX6ZGnz4G1q; Thu, 29 Feb 2024 17:54:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709229264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l4z2WQ8yqxu57xgvRcZX0hoMBqi+TItfPNCRH8IliFY=; b=s+X6fHrQluOZjF4HZAyHQQjXObGnz/gmhK2nDDOz7egdc9eC8fHR8XwL7K7+7uSXXEDP+Y +fHHPkG27CKVg6aRUz4YH8+VGe5BafleW2ch8O+iXKRckcV/BA3f69xS9id3IePRE0XSTV NHwlMk3AXYIq5D+E2d2wcZm1MTX3v9E+iC56S7+VibWBFsvGGWhhsrIeAEjiNiXfkdc9aG XRGFNQxq7AIFbF298YeKohM2t6yf2Dmwc0cUiUB9uY1LdHxW/U5LWkJt4VEvw6fUxcs7Eq nqbXbFv508yZvseiSAkwhaIfdP29JMGrGfn4kaI8g1Rvq9EocbPDcpyoQtwqfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709229264; a=rsa-sha256; cv=none; b=bwGtJiaRFOrJJv7T63ogkmGEfzbudKAWW299tYG+KvyJEQcN/4R0K+s1d6l74239pZOuHD rbFCx6bZYFRjkPX6pV83qlPRQIWzj+jPV/7kfyAPNHYpoNgRHJy5q5qtnKm+TvXwrVwgl2 JB6hbHws+CG/te5+dsq7KBjwDkVbArYzvqbmevfrY6+kyvNVkfl0ZXityjUIau+VILO9H7 uBaNGUlFIrU7ZEiHj1whMq3BEl+0Ovt9z954HnIsXFO45QqHQ74RI2bJz3cHa3YrceaIcZ rHqSM0hxDKiBeGk4KTh1zWNcK7G/Zud9nf9KLmSpw498pIX3pE6Gt1bHRn1hmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709229264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l4z2WQ8yqxu57xgvRcZX0hoMBqi+TItfPNCRH8IliFY=; b=Vv+L7mcT/Ap3epVfIonmlhEH53qyr6Hk0R+HlcT05b45rBNByRcFMSQxmJ94FDOoW8r0EE WS3qB8epm0jYb9uR220AE2hdaiyVJUD+2gf1gXR2ze8eNZFrZcK113mI4vw5hF+pSsYHCh yxJofdNkeBrSkRD2MiFOjMbhhFah/jE7EUuK81KP8fkekFvcjtLGpnKmF5yqysBzVPSNv2 r+YUl9Ntj87prNoVv6/iAJO6pHdRFDNS+IPJ0oh/Fpix8SoP55i+saj2RojERSlz1DvAlF QSjQa0l9bUAmL3QaS2R4xGQVwuxDkEFlSTcx3Zqvs1N2idDJgErV6MK4ssK5Wg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlzPX69qqzsN2; Thu, 29 Feb 2024 17:54:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41THsO99076780; Thu, 29 Feb 2024 17:54:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41THsOD5076777; Thu, 29 Feb 2024 17:54:24 GMT (envelope-from git) Date: Thu, 29 Feb 2024 17:54:24 GMT Message-Id: <202402291754.41THsOD5076777@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: 3a3afbec3860 - main - firmware: unbreak armv7 List-Id: Commit messages for the main 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: 3a3afbec3860b0eb4178b63713ca12bd223b585a Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3a3afbec3860b0eb4178b63713ca12bd223b585a commit 3a3afbec3860b0eb4178b63713ca12bd223b585a Author: Warner Losh AuthorDate: 2024-02-29 17:53:05 +0000 Commit: Warner Losh CommitDate: 2024-02-29 17:53:05 +0000 firmware: unbreak armv7 Use proper format specifiers (with casts) and don't redefine flags. Fixes: c7b1e980ae16 Sponsored by: Netflix --- sys/kern/subr_firmware.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/kern/subr_firmware.c b/sys/kern/subr_firmware.c index 33ec2e0cc0e4..99f7ef6ff8b9 100644 --- a/sys/kern/subr_firmware.c +++ b/sys/kern/subr_firmware.c @@ -278,7 +278,7 @@ try_binary_file(const char *imagename, uint32_t flags) struct vattr vattr; void *data = NULL; const struct firmware *fw; - int flags; + int oflags; size_t resid; int error; bool warn = flags & FIRMWARE_GET_NOWARN; @@ -295,8 +295,8 @@ try_binary_file(const char *imagename, uint32_t flags) printf("Trying to load binary firmware from %s\n", fn); NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, fn); - flags = FREAD; - error = vn_open(&nd, &flags, 0, NULL); + oflags = FREAD; + error = vn_open(&nd, &oflags, 0, NULL); if (error) goto err; NDFREE_PNBUF(&nd); @@ -310,8 +310,8 @@ try_binary_file(const char *imagename, uint32_t flags) * Limit this to something sane, 8MB by default. */ if (vattr.va_size > firmware_max_size) { - printf("Firmware %s is too big: %ld bytes, %ld bytes max.\n", - fn, vattr.va_size, firmware_max_size); + printf("Firmware %s is too big: %lld bytes, %ld bytes max.\n", + fn, (long long)vattr.va_size, (long)firmware_max_size); goto err2; } data = malloc(vattr.va_size, M_FIRMWARE, M_WAITOK); From nobody Thu Feb 29 17:59:31 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlzWS00Yrz5Ccxs; Thu, 29 Feb 2024 17:59: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 4TlzWR6Zl1z4GqP; Thu, 29 Feb 2024 17:59:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709229571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7TNIj0lN6UWX8GDNWhWOHXpISZlH+V6PV5whZTwv2B0=; b=VrcrjReoBaL32lgez2oBd8sV9DHZ9NyRChAaVDAkstvH5w6AVEM3TX7G34eazBJv9TeMcw u4nisKF/A2HjYkmpNXxaNqHlUhAG1kHV9js/BSGnSmqm3SL6oqsECOasLjUOMQ4IdccFP5 swaA/wnLZME8pP8/FWrhYLNxXJ+EkW6LMOxB4g7NCNwS2pYEAFQAZwqPwHQrk+KFi2987Q qTtjv/8CIV57Ab138+0Ay/8JweGgy7d8NW3/Q5i5uDWteeZLnyK905dkunurpzf6L8Ey5Q TH6z6hfwe8lWKyiqCOjwlHL4wrYSrkSCVA90Y/E+sJt7Z2PQwcDjPNoU1hcgjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709229571; a=rsa-sha256; cv=none; b=UkPG402fngCExM5npqB3wc8oS3gFvPoirGi9PtWrKJ1g4VjqyXkUpsz8dpqT7uzLSqmgH6 pSgn2dEGoywopDYAXKrooteDZ6pQhJ3h2UVQ1uLtG46tZexd9ykr1m4mGIZYuCnzel7PZr 0tmjFKCQSvyZtCxnjAaMe+HuLYtFQdEBDx43Eg0y8xgNbJlfph0eqzI8GIOzSAB4bDc6cr 9D2PRkSgsOPMiGBn67mdiHJT/GaRyvLDvnUekicOnGvJ4Li+5WgGDwmp8y4ZM2it/iHUFl E10WuqjWm1Cdm71mZRaLpBPLvBsSn39Po1lwOOqkH7VgkR+4ZFvW0K1RoA0W+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=1709229571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7TNIj0lN6UWX8GDNWhWOHXpISZlH+V6PV5whZTwv2B0=; b=yQWneSPpDGKVCmLzfjJIMzvpQe0Hmf+D2pg1atp5YhabPrCMSzaWK+dhAg3RfvyJKmo5bP iIaaq9r703AJIF+pXLJjGkbEuK0bRIfHI8Ec6XWipJjPMnvDyGWOor28KmXsNQyIQ01h9g jynykkmc183FB0hEfqNlAqXGa25ZtKNGjzlLCDS5s3OCaQSgy94hQnB81DjvQZQbkmvt7s 6Ys83L8Ee8kCIF4RkN1yHBDwlBZYOsX+3xFqTXa3pqzMxwpqXsx7Bj+fS6F9dVX0mD8Do8 gykCs1TUFhaCF9aOTJP0lnNdhuebIUdekC5nJOQ8Rxjzq6MoYjCfj6/RQfNJcQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlzWR6BMzzsPt; Thu, 29 Feb 2024 17:59: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 41THxVbg077603; Thu, 29 Feb 2024 17:59:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41THxVse077600; Thu, 29 Feb 2024 17:59:31 GMT (envelope-from git) Date: Thu, 29 Feb 2024 17:59:31 GMT Message-Id: <202402291759.41THxVse077600@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: 8b9178cd0d35 - main - loader/lua: Remove pager shim List-Id: Commit messages for the main 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: 8b9178cd0d35ff2beafebdd51c8c44ba2b5aeb0f Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8b9178cd0d35ff2beafebdd51c8c44ba2b5aeb0f commit 8b9178cd0d35ff2beafebdd51c8c44ba2b5aeb0f Author: Warner Losh AuthorDate: 2024-02-29 17:58:43 +0000 Commit: Warner Losh CommitDate: 2024-02-29 17:58:43 +0000 loader/lua: Remove pager shim Just after 12.2 and before the stable/13 branch, kevans added lpager.c to provide a pager interface for commands written in lua. It was merged into 12.3. Now that 12.2 is long since EOL, we can remove the pager shim here. Nobody needs that old loader + new lua scripts. Plus only one command is affected. Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D44142 --- stand/lua/cli.lua | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/stand/lua/cli.lua b/stand/lua/cli.lua index 6832da0a31a5..596e55a8d1d8 100644 --- a/stand/lua/cli.lua +++ b/stand/lua/cli.lua @@ -30,18 +30,6 @@ local core = require("core") local cli = {} -if not pager then - -- shim for the pager module that just doesn't do it. - -- XXX Remove after 12.2 goes EoL. - pager = { - open = function() end, - close = function() end, - output = function(str) - printc(str) - end, - } -end - -- Internal function -- Parses arguments to boot and returns two values: kernel_name, argstr -- Defaults to nil and "" respectively. From nobody Thu Feb 29 17:59:32 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlzWT0sdfz5Cck4; Thu, 29 Feb 2024 17:59: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 4TlzWT0KNjz4GhD; Thu, 29 Feb 2024 17:59:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709229573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TC4wZivxaW1n2HarHvlwj/H0RbEalNIc5kjUgDxFMRU=; b=pARMk8akzw4uHTXnnW5ZjCUeeMqVvVll3IUJ/hXx57ZIlq3wNiQUTFlinlEnnmrQkjbl5i ttFfJPKsZS/Nu0wJsoJiY0M1iYdB8eo8WlgkE5pG7SDogDcZRgyA4V/kIoEdDLswDjIAFq 5f9SH+59UfAL0u0Ihz+UpyLsHTrQZBFRh8kZAfVScud/37SFDIe2N7HF7QNTpAInYJxBiC 1viNjZfQ6L9evD/TMj1EXNFwMCBXVXnLh8gQjowf13qZSIWyEOiJApZTcE1fXTwGEeOo1y +9QHN83EvPCfnQa1nOHgiLerXntKlHwoIQsEBJG3E2YAuvEAgfy5RRmlEijdkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709229573; a=rsa-sha256; cv=none; b=JCzo2WkkOvHkJUu/WMlQaJL6JDeJJeW7TxgVn4DydahvRt+IqO79hMu+k6rFAksex6NIwl SD10O3ztCr7TMFIQvkmv8TSYe2J6/no/duZ0wJM9seis11i7B1MFz/wpWeV0+OHFHREbLY BvpBJ1tb8Sk3MybT7dbU+D/Fl7qiKW0L2PLyHNuZ5JDr873J5e12m8czRGj87yXwqAPWqR rpR8WP6sI2tZDr8b1RuLXG8DKYRYq2Fv5RB2IH6XuBtafG/2eOMu4inODV2hgTkrTXm/Gg Hqqixigm9QNWWB6okEIHc0f/cJbwpZ2COdfWmkajTEi43LIQrXNoOH6b7C88LQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709229573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TC4wZivxaW1n2HarHvlwj/H0RbEalNIc5kjUgDxFMRU=; b=rJeRSsbn6I9Xmk8xt3u3LsqNCXJYZujLKOPcAbl6hIQpLSLMJck25E6rt3XDm+T+58QWY1 Z3CyoL0/02EDeOmDVOab6QbCCN2ns9zlK40JAbc/fk8LFbNGddMbxJHNawSIbBK7sPQUMz PxAPmrZ4mD+D4wneuc2TxX67RiDBHLQSkwi2XNQWTYhwfZOwDiO5Hlxi2VFm3hfibdS9q+ h49JcHNkyO7gowjLhXonOZFE+ffRkupap+IX8FrzCGP63EUepaH+8omp1NquG6/vY0WsN+ MsM7io+Zh8vgJATJQ0gr7OAtgDpEViAd4ObLpz3moDnR3Ac6lVL5EaWbFd0kRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlzWS71m6zs0C; Thu, 29 Feb 2024 17:59: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 41THxWqv077648; Thu, 29 Feb 2024 17:59:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41THxW00077645; Thu, 29 Feb 2024 17:59:32 GMT (envelope-from git) Date: Thu, 29 Feb 2024 17:59:32 GMT Message-Id: <202402291759.41THxW00077645@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: ab97d42addae - main - loader/lua: Remove compat shim for loader.lua_path List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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: ab97d42addae97a389c6f22d6bba62ed954bb8e7 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ab97d42addae97a389c6f22d6bba62ed954bb8e7 commit ab97d42addae97a389c6f22d6bba62ed954bb8e7 Author: Warner Losh AuthorDate: 2024-02-29 17:58:52 +0000 Commit: Warner Losh CommitDate: 2024-02-29 17:58:52 +0000 loader/lua: Remove compat shim for loader.lua_path loader.lua_path was committed before stable/13 was branched, and merged in to for 12.2. Remove workaround for it not being present. Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D44143 --- stand/lua/core.lua | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/stand/lua/core.lua b/stand/lua/core.lua index 9226de564348..eaabff6a7602 100644 --- a/stand/lua/core.lua +++ b/stand/lua/core.lua @@ -65,13 +65,7 @@ end -- message on failure. function try_include(module) if module:sub(1, 1) ~= "/" then - local lua_path = loader.lua_path - -- XXX Temporary compat shim; this should be removed once the - -- loader.lua_path export has sufficiently spread. - if lua_path == nil then - lua_path = "/boot/lua" - end - module = lua_path .. "/" .. module + module = loader.lua_path .. "/" .. module -- We only attempt to append an extension if an absolute path -- wasn't specified. This assumes that the caller either wants -- to treat this like it would require() and specify just the From nobody Thu Feb 29 17:59:33 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TlzWV23tmz5CcvG; Thu, 29 Feb 2024 17:59: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 4TlzWV175Lz4GTM; Thu, 29 Feb 2024 17:59:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709229574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ReEF+cU6fUAVvNXlFYSaDuw33OAeHOFSXrAeJYeB4pk=; b=eTMhTmOunRhwmi6wu84IHfd0qrHeBaV2eXm1QuwkFAvXkVRIl3kfSPT+9Wp95E2Nz+iSp2 YF6CQnHMzVT8ctb+YG2C9EUvZMzjzUWxLGpblXQsZQQbppFbMi7lizcqWmsvGU0b0KHHz9 pHGG+DvA5AlifpDDeU750XdzXz+jg/o0J6PztBcq2KBzzrEHpQ1N9hEFLc2MYVXOssuYV4 9rF0ygdIHbweE+eZJq+7ZRNfE9DhCcc1CxIZlfP0H7nwvP7/MQpHyJhekPyIVfxnEYpL8H RCwrCmOUTvCnrKzjKojjKkpY5k34p/RvbONvInHfGHW4buOi+e1YBs0Jrb74Ig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709229574; a=rsa-sha256; cv=none; b=r7x96Oi1MJCMookAgOBJp6vnxkMA4vVaN5mWlgFdAYy3/mcyiriVjuEvclWy0wkbraqtQn j6rbFQbVlBQGIafqarydQUzlvvsMyyO2QBcLYOi42XEZ5V8W9VtDY2yBSRQvaUuIumDKl4 gfbMhFTEoyW/XTUUBTN1hqgemsRDR0dp7HDHbvc1KlzSRrG6fea+P4DTYNw/TvJRmJeB3q tJRXWG4CvuX/eUl+QzRTzMyA404rWhxjdc5oIv4/ENRmIQQB8WykDwRmOhAMximVBHMGjS jKRE6xVgvOWOAhhGEdnuIjAL6CBdJ4MF/sWdxn3booXKQy482P43XRuacm+k6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709229574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ReEF+cU6fUAVvNXlFYSaDuw33OAeHOFSXrAeJYeB4pk=; b=CKk+mK8KrpthB+ds/+5Dz2H5qxC3UFlGRgHBBEbSDy0V2EUAaDh8kwshkUSmXS9SGIR/W1 OwsIEomCIXhyvTyJR8vD9cnHUc0bHlgHdNkYEYfy2lAJFSAHsg8p5Azb6ck9rj02HdBD3O cGZ1DNLzz+d6dWuu189EPmpbNHSg5hAmoLUvi7nlhWpU6+5gDYCtSe5M6EDXT16mX8fPkc 1uTPMkb2E0Of/JYT1jvNF8xkaFwXXYAN9HpIPSUSx0ReQEDkn1+pwvevVd8Xc2pk/lB9PI 5rs6opt/GVjuEPx2RI0mLOaHb3Sy7st1Y3zSlqkfogL9QhwkesSXYHMp4AX4UQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TlzWV0lY3zrxs; Thu, 29 Feb 2024 17:59: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 41THxY1U077690; Thu, 29 Feb 2024 17:59:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41THxXSl077687; Thu, 29 Feb 2024 17:59:33 GMT (envelope-from git) Date: Thu, 29 Feb 2024 17:59:33 GMT Message-Id: <202402291759.41THxXSl077687@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: 552f3072af54 - main - loader/lua: Remove workaround for command_error List-Id: Commit messages for the main 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: 552f3072af54820cf1805f712e2567bc1b7f046d Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=552f3072af54820cf1805f712e2567bc1b7f046d commit 552f3072af54820cf1805f712e2567bc1b7f046d Author: Warner Losh AuthorDate: 2024-02-29 17:58:59 +0000 Commit: Warner Losh CommitDate: 2024-02-29 17:58:59 +0000 loader/lua: Remove workaround for command_error loader.command_error was available prior to stable/12 branching. No need to check if it is available or not. Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D44144 --- stand/lua/config.lua | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/stand/lua/config.lua b/stand/lua/config.lua index 86f5ef6174a2..ba6144364247 100644 --- a/stand/lua/config.lua +++ b/stand/lua/config.lua @@ -407,12 +407,7 @@ local function loadModule(mod, silent) end if cli_execute_unparsed(str) ~= 0 then - -- XXX Temporary shim: don't break the boot if - -- loader hadn't been recompiled with this - -- function exposed. - if loader.command_error then - print(loader.command_error()) - end + print(loader.command_error()) if not silent then print("failed!") end From nobody Thu Feb 29 19:19:21 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tm1HY6wKqz5ClRY; Thu, 29 Feb 2024 19:19: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 4Tm1HY4H1pz4X1R; Thu, 29 Feb 2024 19:19:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709234361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0OTiBBID4h+nt2xwotVY5w5XBqccftP/7xzF0f4kIaY=; b=y1MD2GIuz2XQ6TJ684829IbmISddKJfR/zXn6YdxYfXVW67s3hTg1HhbX+7rxp/9LUowup hIxM1eTXXdD9ISNX1bO1lUJwnRyerKD07gkk+Vr1ZWcx9tQ75NlMCn0dLlvgI6WMNYnFW9 qkmxdH5IaVB2gdfXlCTPyTrxPqu+ewWQSC0Ix20MBk0c5SnYRxAhmY2Iy3pkj6klpAiBN7 4X4CllwXStRNxzFgzowfKQrHWRImmdk/wslr/CX4PE080UgGTKQY4n6YW1ZziV779SRLoV sEDHfjCiXP+iop/azQviMEAOgHeE4D75ecBLpOzWaSijnhq0bD7nRvXVtizvLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709234361; a=rsa-sha256; cv=none; b=mH82Tz+RKKrjl4PU7jw144CbXdgbhxDMkJdJp3wA0XImZjQ2M3ngwH3bc1uvTlhIXA3XRs 4vbG938O+QTSi7HdBZHNa3QFQaEabHncnDctFHnQs5jPYIDF0ZxFDK3QtNhyY3UbVrXAJg F4J0C5Fqh62DFsokDrYPoo/nTb7TnqahsQKhYP88pnLr2zNTY6G8Hz0xxWasvid7xDpbs/ cLpkebKu63zFDwCHMXiQfVyLYMuU70Q8iw7k2/O3bkyuL4naoCL24zTcqjPvr4jzcHWi5l HDR76Ub/8fTpw0Y27SiMVZGLKzlMd7CEGhcgrIUG8yJT2LVYYCz+wbinmDua9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709234361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0OTiBBID4h+nt2xwotVY5w5XBqccftP/7xzF0f4kIaY=; b=oEGgy1XVkqNkd3ku5/UaQmClLvOFzhMXoXOl6UyZglX60ZHEZa62jyYWZIHz2sSEE03AM4 p+F9k3rzgoVmgMvRiBnjKSL0fPYnKjUxWw6lp3HLpow0RMSigLqtnw4IJ84gqBW7kWwb7N PB6cmjl8Nlp/AOtyroEOC8qNzJ5daJy8Sabf1ns4LHVJ5iL6RgczCF6IcFZnS75q1t4dOg wxo2+Q4wpwQaxXlaq0xNhGaAbf1EjTXrkjrCcLQXwybz35I53NtQ6fNsdx1WYXe12klXnt uE/qaoZkTukwji+MPAyUmb9mGB3H1oYr+lXCnW0RcCdgNoaP5+VylkLEZkGRxw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tm1HY3tXtzv16; Thu, 29 Feb 2024 19:19: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 41TJJLGB013145; Thu, 29 Feb 2024 19:19:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41TJJLdN013142; Thu, 29 Feb 2024 19:19:21 GMT (envelope-from git) Date: Thu, 29 Feb 2024 19:19:21 GMT Message-Id: <202402291919.41TJJLdN013142@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 6d3f4dcda2fb - main - libsys: make PSEUDO take a bare syscall name List-Id: Commit messages for the main 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d3f4dcda2fb6d05dd5a25956b8c7cf012e0265f Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=6d3f4dcda2fb6d05dd5a25956b8c7cf012e0265f commit 6d3f4dcda2fb6d05dd5a25956b8c7cf012e0265f Author: Brooks Davis AuthorDate: 2024-02-29 19:19:01 +0000 Commit: Brooks Davis CommitDate: 2024-02-29 19:19:01 +0000 libsys: make PSEUDO take a bare syscall name Rather than having PSEUDO be a list of object files when all consumers want syscall names or source files, make it a list of bare syscall names like INTERPOSED (which is built on PSEUDO). Improve document of variables developers can set. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44108 --- lib/libsys/Makefile.sys | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys index 8af379be92e2..706adc974feb 100644 --- a/lib/libsys/Makefile.sys +++ b/lib/libsys/Makefile.sys @@ -1,5 +1,22 @@ - -# sys sources +# Implement symbols common to libc and libsys. +# +# When dynamically linked, the libc symbols are filtered by the actual +# implementations in libsys. When statically linked, both libc and +# libsys contain full implementations to preserve the API of libc.a. +# +# The following variable are programmer-defined: +# +# MDASM Override the default syscall implementation in MIASM +# (from syscall.mk below). Each entry is a source file +# name (e.g., vfork.S). +# Generally defined in /Makefile.sys. +# NOASM Don't generate system call stubs. Each entry is an +# object file name (e.g., yeild.o). Don't add more of these. +# PSEUDO Generate _ and __sys_ symbols, but not . +# Each entry is a bare syscall name (e.g., "clock_gettime"). +# INTERPOSED Like PSEUDO, but .c is added to SRCS. +# Used for syscalls intercepted by the threading library. +# .PATH: ${LIBSYS_SRCTOP}/${LIBC_ARCH} ${LIBSYS_SRCTOP} # Include the generated makefile containing the *complete* list @@ -7,11 +24,6 @@ .include "${SRCTOP}/sys/sys/syscall.mk" # Include machine dependent definitions. -# -# MDASM names override the default syscall names in MIASM. -# NOASM will prevent the default syscall code from being generated. -# PSEUDO generates _() and __sys_() symbols, but not (). -# .include "${LIBSYS_SRCTOP}/${LIBC_ARCH}/Makefile.sys" .if ${LIBC_ARCH} == "i386" || ${LIBC_ARCH} == "amd64" .include "${LIBSYS_SRCTOP}/x86/Makefile.sys" @@ -53,11 +65,11 @@ STATICOBJS+= auxv.o NOASM= yield.o PSEUDO= \ - _clock_gettime.o \ - _exit.o \ - _getlogin.o \ - _gettimeofday.o \ - _sched_getcpu.o + clock_gettime \ + exit \ + getlogin \ + gettimeofday \ + sched_getcpu INTERPOSED = \ accept \ @@ -101,7 +113,7 @@ INTERPOSED = \ writev SRCS+= ${INTERPOSED:S/$/.c/} -PSEUDO+= ${INTERPOSED:C/^.*$/_&.o/} +PSEUDO+= ${INTERPOSED} # Add machine dependent asm sources: SRCS+=${MDASM} @@ -111,14 +123,14 @@ SRCS+=${MDASM} # without a trival symbol (PSEUDO). Add each syscall that satisfies # these conditions to the ASM list. .for _asm in ${MIASM} -.if !${MDASM:R:M${_asm:R}} && !${NOASM:R:M${_asm:R}} && !${PSEUDO:R:M_${_asm:R}} +.if !${MDASM:R:M${_asm:R}} && !${NOASM:R:M${_asm:R}} && !${PSEUDO:M${_asm:R}} ASM+=$(_asm) .endif .endfor SASM= ${ASM:S/.o/.S/} -SPSEUDO= ${PSEUDO:S/.o/.S/} +SPSEUDO= ${PSEUDO:C/^.*$/_&.S/} SRCS+= ${SASM} ${SPSEUDO} From nobody Thu Feb 29 19:19:20 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tm1HX67YYz5Ckwl; Thu, 29 Feb 2024 19:19: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 4Tm1HX3DtHz4X6B; Thu, 29 Feb 2024 19:19:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709234360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FuRD//F1oUBMQgFAAJBeMQwhd6mIj4PB9yaxf7LE9IA=; b=LTYBZ4px0UI1vhe1dw8qBhuDnuoRRESzCMdJFvmn3HoBz5jLS1u2QxFzEfEMYS+d8GE3JE IVTLpkqHVSxRgdQnazrb+LZJQsWg/5hqC4UGFt6voXl/iUDJCHovnYZ4CHPlArzzdWssKj POe7iTrGT7Z+qiTQw2UbNWwtuzjH1WjfXJq+Ro9nbyuGeF3miNIQdqaXAwT79O5xGf3l7c rqgeSIL0il6GeyBa+mugWjLlYnpiTn+4MAE3Rpjv0XdyzGuoLbO0fgH9Sf+A+rHdKGKOtF cFJm8eRCl4lma1BB8hMWx9yWrnaVRWUbH6FJiRGelxpANV+IoVEQzpaibZczpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709234360; a=rsa-sha256; cv=none; b=Hw8+66blcnXr2aGCEaGDcBFVz1fbVzQ8wKQlEBSeMXnu42gQvtV8k6to1+C6S6t7RsrwdT bQ1pKMK+srnMCbZ86NS7CTKe8n4OcLWY9UxKB3HlsDhqqr4KZHJ3N7xMvfB1hh82OnT4JV mqRmbKCH8BPRsPuxV6yrQy9toYdAmv2kbPHZPianNcz9DeJt3mkbGjBeWd5AqP47fCn2d3 aitwkk6u0iS+yeflaHhrvoJ0rtNV/cItOQvvAbwj8Zpsib8kwpkSuZ+2EVDKS6xZ3FdhLX hZOPo0seq0EwdWXDi0BhIPha/tqz11cYtQSrx01VIxJ/DJ7h/p8rgSGZhPjqoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709234360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FuRD//F1oUBMQgFAAJBeMQwhd6mIj4PB9yaxf7LE9IA=; b=jNX9HO8wKINTguhHb1gtebBOP84nDaEdT5ZNn9pQXbDGeqvsuiLMdwhThiEcYJv8m6ta3S 8db68bvdJTPrYatPLocqzVrfPcViFehNRVUwDRIDa+cMGlDnvvznSXoQ0AquQxW0H212AS l7VMZQJ+9J9dBm/qnAlcRkQNujU4rZmh0pvyvwZzPsZpnfTd+NAEhgotG06hHbvqv3ZLYC 6H48z42/nZuwPVNRKnFOnBd+fJKRaO7IEJ7tgo9VVkNBZMwurrFoOjFMGrsqZ72F467eom Ef+oPyLCfSj4l+X6LXKx2j89xOu3rnL3NxWj8EIfu5N+JHtkas1iN9OMDCkOIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tm1HX2s2yzty7; Thu, 29 Feb 2024 19:19: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 41TJJKi1013094; Thu, 29 Feb 2024 19:19:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41TJJKqF013091; Thu, 29 Feb 2024 19:19:20 GMT (envelope-from git) Date: Thu, 29 Feb 2024 19:19:20 GMT Message-Id: <202402291919.41TJJKqF013091@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: f102db5028cd - main - libsys: consolidate PSEUDO definitions List-Id: Commit messages for the main 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f102db5028cd8502d46d50bd5bd1f1e30a847c39 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=f102db5028cd8502d46d50bd5bd1f1e30a847c39 commit f102db5028cd8502d46d50bd5bd1f1e30a847c39 Author: Brooks Davis AuthorDate: 2024-02-29 19:19:01 +0000 Commit: Brooks Davis CommitDate: 2024-02-29 19:19:01 +0000 libsys: consolidate PSEUDO definitions Consolidate in preparation for further cleanup. Also relocate the sole NOASM entry. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44107 --- lib/libsys/Makefile.sys | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys index cafe197ec15e..8af379be92e2 100644 --- a/lib/libsys/Makefile.sys +++ b/lib/libsys/Makefile.sys @@ -12,19 +12,12 @@ # NOASM will prevent the default syscall code from being generated. # PSEUDO generates _() and __sys_() symbols, but not (). # -# While historically machine dependent, all architectures have the following -# declarations in common: -# -NOASM= yield.o -PSEUDO= _exit.o \ - _getlogin.o .include "${LIBSYS_SRCTOP}/${LIBC_ARCH}/Makefile.sys" .if ${LIBC_ARCH} == "i386" || ${LIBC_ARCH} == "amd64" .include "${LIBSYS_SRCTOP}/x86/Makefile.sys" .endif SRCS+= clock_gettime.c gettimeofday.c __vdso_gettimeofday.c -PSEUDO+= _clock_gettime.o _gettimeofday.o # Sources common to both syscall interfaces: SRCS+= \ @@ -40,8 +33,6 @@ SRCS+= creat.c SRCS+= lockf.c wait.c wait3.c waitpid.c waitid.c SRCS+= recv.c recvmmsg.c send.c sendmmsg.c -PSEUDO+= _sched_getcpu.o - SRCS+= brk.c SRCS+= closefrom.c SRCS+= pipe.c @@ -59,6 +50,15 @@ SOBJS+= libc_stubs.pico STATICOBJS+= auxv.o .endif +NOASM= yield.o + +PSEUDO= \ + _clock_gettime.o \ + _exit.o \ + _getlogin.o \ + _gettimeofday.o \ + _sched_getcpu.o + INTERPOSED = \ accept \ accept4 \ From nobody Thu Feb 29 19:19:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tm1HW4kgQz5ClZb; Thu, 29 Feb 2024 19:19: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 4Tm1HW2dhyz4XKG; Thu, 29 Feb 2024 19:19:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709234359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YJM/kjIUFA7cLljZwWwlcmSmQPXs2XIYDA6ohVWS8eY=; b=EWzUDRqVa6Cxbn6FUa9kM9HeCe7RNpls/fjb3vxoxEyOIsa7+q7tgxgdrHSR/aIapac8pt DX47YtPAum6MhkXDJbaXDCz4aVmdqaYpu0MwfR6eEn1RY6+twohRQ0A8nNUtuUyxV1jG1j NKbeKH4z4vDpnoANWEFegN7VZon5P2Dxtb/+3GgbjwqdiuZLGC6f5Lk1O8cNeCYRZqElb3 O1yVzXy8SdkedxuiGyAGYbBVzJM2Tr9oK86n/FMk2aMH+RdUKNZCUH8DGoxOztKJF0DeE/ qJsActXZ+tR4mFncHTYMNesYOZvH251IhLgRdeVbN6cLjcHI7MpEOzUk3VqHHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709234359; a=rsa-sha256; cv=none; b=upe0aYC7ZuFhP3sM/6sANRhpAPr22yeAFcBX+DI8YssLM9mo+c3rGfyb/wSx+biLcuN0YZ pnK6ukiEY1QAtfLzM20+u+QSxHJDoSNLasi6EUBR8V1bovOiIW0S6TIpeMbPLbPIUYAoW/ bWfByvHAtjBYIgp/m8ZPIgQukkuPoJdhMWOKCu8kwRKl6hcuSPHp3BH7PjK0ihsQjuPHAq jeKhqV/qhlb/0Dwtn8zcA+o8i62xwIsfnmFWxkqrDmRfy2webOSbGi1sffpck4yUOz0Dlp 9vmWp7QjWNdYqV8EMm8HUgMAAlW90dmsu54dLCVKfg4PSqgaJhO8isMqbzKKJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709234359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YJM/kjIUFA7cLljZwWwlcmSmQPXs2XIYDA6ohVWS8eY=; b=TZVdsvrIL2/5ymC3J6HgqC0snRGpA+5N1EPBkXxLpA2UGnjt7+ZjLLHe2KXGEY3jjKSqKC gnzC9bGaIW3fShqbraQUPw1rcaK434tmsOXsRRzgCnWGKSCZFKv9N6dDaB6ITQMs4Cz9Ml 8rFlKHzcwJordhR84HNsZF3O2/azyCUkt0in73VbZc015AF53luOBDshp8r+eHgn5Rkznz WXM1ob6l7dTqLVaD8iarh/V1yzCSIm9f1M6aEuNsEJceHYezJcmlLJLzZ7grjD6DWYJuLF VNUuKeqnl4K3H9hGd1MzrCm+qH4CDOHzDIF8aapX6uqwBxAwWq6vDDoxDAgZdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tm1HW27QRzvT7; Thu, 29 Feb 2024 19:19:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41TJJJdq013053; Thu, 29 Feb 2024 19:19:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41TJJJN7013050; Thu, 29 Feb 2024 19:19:19 GMT (envelope-from git) Date: Thu, 29 Feb 2024 19:19:19 GMT Message-Id: <202402291919.41TJJJN7013050@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: e52a9177d9e4 - main - libsys: reduce makefile declaration duplication List-Id: Commit messages for the main 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e52a9177d9e43518e86d470be9cdbdcd7a699b8a Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=e52a9177d9e43518e86d470be9cdbdcd7a699b8a commit e52a9177d9e43518e86d470be9cdbdcd7a699b8a Author: Brooks Davis AuthorDate: 2024-02-29 19:19:01 +0000 Commit: Brooks Davis CommitDate: 2024-02-29 19:19:01 +0000 libsys: reduce makefile declaration duplication Every PSEUDO entry (_foo.o) has a corresponding NOASM entry (foo.o) to suppress its addition to ASM. Check PSEUDO instead when adding entries to ASM. No functional change. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44106 --- lib/libsys/Makefile.sys | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys index 6b83e5812f76..cafe197ec15e 100644 --- a/lib/libsys/Makefile.sys +++ b/lib/libsys/Makefile.sys @@ -15,9 +15,7 @@ # While historically machine dependent, all architectures have the following # declarations in common: # -NOASM= exit.o \ - getlogin.o \ - yield.o +NOASM= yield.o PSEUDO= _exit.o \ _getlogin.o .include "${LIBSYS_SRCTOP}/${LIBC_ARCH}/Makefile.sys" @@ -26,7 +24,6 @@ PSEUDO= _exit.o \ .endif SRCS+= clock_gettime.c gettimeofday.c __vdso_gettimeofday.c -NOASM+= clock_gettime.o gettimeofday.o PSEUDO+= _clock_gettime.o _gettimeofday.o # Sources common to both syscall interfaces: @@ -43,7 +40,6 @@ SRCS+= creat.c SRCS+= lockf.c wait.c wait3.c waitpid.c waitid.c SRCS+= recv.c recvmmsg.c send.c sendmmsg.c -NOASM+= sched_getcpu.o PSEUDO+= _sched_getcpu.o SRCS+= brk.c @@ -105,18 +101,17 @@ INTERPOSED = \ writev SRCS+= ${INTERPOSED:S/$/.c/} -NOASM+= ${INTERPOSED:S/$/.o/} PSEUDO+= ${INTERPOSED:C/^.*$/_&.o/} # Add machine dependent asm sources: SRCS+=${MDASM} # Look though the complete list of syscalls (MIASM) for names that are -# not defined with machine dependent implementations (MDASM) and are -# not declared for no generation of default code (NOASM). Add each -# syscall that satisfies these conditions to the ASM list. +# not defined with machine dependent implementations (MDASM), not declared +# without a trival symbol (PSEUDO). Add each syscall that satisfies +# these conditions to the ASM list. .for _asm in ${MIASM} -.if !${MDASM:R:M${_asm:R}} && !${NOASM:R:M${_asm:R}} +.if !${MDASM:R:M${_asm:R}} && !${NOASM:R:M${_asm:R}} && !${PSEUDO:R:M_${_asm:R}} ASM+=$(_asm) .endif .endfor From nobody Thu Feb 29 19:48:00 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tm1wc4FRdz5Cnnt; Thu, 29 Feb 2024 19:48: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 4Tm1wc28h8z4bp1; Thu, 29 Feb 2024 19:48:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709236080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lz1OVyYp8x8F2rAR0nbI7xqKsyOpbBBN43wls28yytc=; b=mvUHuPd/JqfcROSprcAesKyNuqWZhlBMKGQTlEU5rzcZUVFOhx9z5prf9WczOb2a9HTN5D kUzIRCaqQQ7H2wdLtK0FGg26ED1jqY1flMoJQWpksQ1SMpX94uiCwq11tGKUbTclSAt3Q+ Kooj/l/f9lTLT4C096xsfY6B3SsJW/fHwKtcrmUJP2zNrdTbvC7qjJTj/v47KljnSpK/XS IUlhe71q2KGYENajC/hbuO5OVBerjC3JwK4zfSsKMVNPQB4V03rPaxGMOfLQ8SPp4y5rq8 5jvb6nIhAXq/u3J8sq7ULTyPhNNkC3JuprcsgVaN3JZlji2JyppO72+joXFSXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709236080; a=rsa-sha256; cv=none; b=BHaBawYG6nVJspdkbAfo9OXEg3q1HUdPbrlQyEfM2Vg+KORCGqL5I9YovwIAnHETJ53NqK 0qwHBqQlRjnx7xntmhmfKdcbI8oU9gpgFqNCFUyaEOR8+CflcL+9FxbPLMX98BsHCUeI+s Lk9A4+U1oHD2IdcP167wV6zaX2S5E0lioD/e80k2i0pZNYbFCLNdRgdpFgxWHXPFgRL5Pd EUztKIB0/F8y2Gyonolh9lKJ5B5Qhesmaj7mdzhbCdgE4WtbSaMZWNQb6EgkJjJUclplkJ x0k68panGBibcqU4fgRdFSki8ixAJ4fXQBW4qRikrqN2hLQHKEm+s+fW3KsbRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709236080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lz1OVyYp8x8F2rAR0nbI7xqKsyOpbBBN43wls28yytc=; b=OzB07xgJOHs/NzNk1XHsQbl6vGgKzpvFw3K3MGGENYfodaxd0JnE9qqqjDTw+IpluJfddR 1BKeXJW5WSxmiLem7NrRRRpaMlkMI5D60USfMN/kkUEemTms0G0diHvnu1HIbJn+q59DZo PKnJ1lPMdo6bynJbIEdXa0lSfW5r93piCVF37xZwjXazA9U10UOojOPS2mIK8Cv5Y4Ac75 dN8cImtMZ3Z/NJ4GBGxjzr1rCeAmjXfajLmYoDu81YpbcLM1PeuZ653vJxOA1tQ2jLOBH0 Oe8osCRl4bzROSHVGjaxZaf6UlU33/VybZMRkZfNG7KsHKy+B0cbrSPVszhqnA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tm1wc1m0szwCf; Thu, 29 Feb 2024 19:48: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 41TJm0Da062909; Thu, 29 Feb 2024 19:48:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41TJm0LR062906; Thu, 29 Feb 2024 19:48:00 GMT (envelope-from git) Date: Thu, 29 Feb 2024 19:48:00 GMT Message-Id: <202402291948.41TJm0LR062906@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 304cdac7385a - main - lib{c,sys}: expose _getlogin consistently List-Id: Commit messages for the main 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 304cdac7385a40477484737fc0a4aa928c3be9d6 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=304cdac7385a40477484737fc0a4aa928c3be9d6 commit 304cdac7385a40477484737fc0a4aa928c3be9d6 Author: Brooks Davis AuthorDate: 2024-02-29 19:46:33 +0000 Commit: Brooks Davis CommitDate: 2024-02-29 19:46:33 +0000 lib{c,sys}: expose _getlogin consistently Historically we exposed _getlogin as a private symbol on a per-arch basis (except on aarch64 and riscv) for no obvious reason. We now need to expose it for libc's use so remove the special case from makesyscalls.lua and expose it in the generated syscalls.map. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44116 --- lib/libc/powerpc64/Symbol.map | 4 ---- lib/libsys/amd64/Symbol.sys.map | 2 -- lib/libsys/arm/Symbol.sys.map | 1 - lib/libsys/i386/Symbol.sys.map | 1 - lib/libsys/powerpc/Symbol.sys.map | 4 ---- lib/libsys/powerpc64/Symbol.sys.map | 4 ---- lib/libsys/syscalls.map | 1 + sys/tools/makesyscalls.lua | 2 +- 8 files changed, 2 insertions(+), 17 deletions(-) diff --git a/lib/libc/powerpc64/Symbol.map b/lib/libc/powerpc64/Symbol.map index 3a772922e2e3..edccb69e960b 100644 --- a/lib/libc/powerpc64/Symbol.map +++ b/lib/libc/powerpc64/Symbol.map @@ -12,7 +12,3 @@ FBSD_1.0 { fpsetmask; fpsetround; }; - -FBSDprivate_1.0 { - _getlogin; -}; diff --git a/lib/libsys/amd64/Symbol.sys.map b/lib/libsys/amd64/Symbol.sys.map index 6a531b659c46..5e0714aef35d 100644 --- a/lib/libsys/amd64/Symbol.sys.map +++ b/lib/libsys/amd64/Symbol.sys.map @@ -21,8 +21,6 @@ FBSD_1.6 { * */ FBSDprivate_1.0 { - _getlogin; - _brk; _vfork; }; diff --git a/lib/libsys/arm/Symbol.sys.map b/lib/libsys/arm/Symbol.sys.map index 89a57d68f81d..179889b60832 100644 --- a/lib/libsys/arm/Symbol.sys.map +++ b/lib/libsys/arm/Symbol.sys.map @@ -4,7 +4,6 @@ FBSD_1.0 { }; FBSDprivate_1.0 { - _getlogin; _vfork; _brk; _sbrk; diff --git a/lib/libsys/i386/Symbol.sys.map b/lib/libsys/i386/Symbol.sys.map index c1b52b49c7a4..7d8c4ef61c11 100644 --- a/lib/libsys/i386/Symbol.sys.map +++ b/lib/libsys/i386/Symbol.sys.map @@ -23,7 +23,6 @@ FBSD_1.6 { }; FBSDprivate_1.0 { - _getlogin; _vfork; _brk; }; diff --git a/lib/libsys/powerpc/Symbol.sys.map b/lib/libsys/powerpc/Symbol.sys.map index d79597c0b45e..f241c4ed0984 100644 --- a/lib/libsys/powerpc/Symbol.sys.map +++ b/lib/libsys/powerpc/Symbol.sys.map @@ -2,7 +2,3 @@ FBSD_1.0 { brk; sbrk; }; - -FBSDprivate_1.0 { - _getlogin; -}; diff --git a/lib/libsys/powerpc64/Symbol.sys.map b/lib/libsys/powerpc64/Symbol.sys.map index d79597c0b45e..f241c4ed0984 100644 --- a/lib/libsys/powerpc64/Symbol.sys.map +++ b/lib/libsys/powerpc64/Symbol.sys.map @@ -2,7 +2,3 @@ FBSD_1.0 { brk; sbrk; }; - -FBSDprivate_1.0 { - _getlogin; -}; diff --git a/lib/libsys/syscalls.map b/lib/libsys/syscalls.map index f96647652430..b79c512834e0 100644 --- a/lib/libsys/syscalls.map +++ b/lib/libsys/syscalls.map @@ -80,6 +80,7 @@ FBSDprivate_1.0 { __sys_ktrace; _getgid; __sys_getgid; + _getlogin; __sys_getlogin; _setlogin; __sys_setlogin; diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index 1c80aa44c1a7..8784ff603e81 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -924,7 +924,7 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, config.syscallprefix, funcalias, sysnum)) write_line("sysmk", string.format(" \\\n\t%s.o", funcalias)) - if funcalias ~= "exit" and funcalias ~= "getlogin" and funcalias ~= "vfork" then + if funcalias ~= "exit" and funcalias ~= "vfork" then write_line("libsysmap", string.format("\t_%s;\n", funcalias)) end From nobody Thu Feb 29 20:19:55 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tm2dW00Lzz5Cqn4; Thu, 29 Feb 2024 20:19:59 +0000 (UTC) (envelope-from bz@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 4Tm2dV4XTGz4g4j; Thu, 29 Feb 2024 20:19:58 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709237998; 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=Ccj9sGkkqGgt8sgrfrGhvFn6oDnfsMkJ9iYt/DmnGSs=; b=KSYVzhIvsCpnnKrcICJoVKJITzWAObS8Mj6el2AM7rY27LdrDKabh7lVsVwu5yR6vbEC36 faIK3A5K89dCnxlEjZb7bl1g8b7cREOicgZjRQ6ohQfZPSC/oJTIAfso+7xYQHbomVpy0F ReLAHNhznQYd7z4R/YBvS6EvYfXUzxJUkLJVe5DPTod0JxRwjAfq4Gj4cCbQA462tajXGB ba/xfg6umkIb/hcvqR2oCzcKth02QLC32hWjtTveqaHYT8jc1b09u9YvojIw3QOtKWbKdL lKGmekItCUAjsi4Dw4QuU49z8ivdHQmsAUFdHTzT1YLtOCfq6hFNytW/lyKrpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709237998; a=rsa-sha256; cv=none; b=pgLoqCXJ/uKHwV3bQQu5GuJNDaeHwuZuBCuAwF0aJOfW2FsyutUC8Kaf0DtDTNUCToD8sF JbI7wM96CuKf1wIb9VZR4EDPmmJFUd+8M8XG3gpsIjN2fHdHKZtSRG/RhOBxIBLJQNnG0e YFM2d0XJ6tpA3ff9FKZqav5syoBj8XRFNmpTBWFvflC+lzLi6VgzOVIX0pnbEpzvquG/OW Sn5zHwdBCEILtQ3cVmarbiWudGNXhMhDuZgy5o8l+I7E5v5ejf8anprr8LUPxP/PX+NRkv Vf8pvSfipfB0A5ags9ld9612Cc4DFCzqYUWsaMlJ09EvNhxxY0cPcydfh7CyrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709237998; 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=Ccj9sGkkqGgt8sgrfrGhvFn6oDnfsMkJ9iYt/DmnGSs=; b=TzNDy4cDiYOJsKKiY4EhoiVBVk5iNklVe9/1eWSAZ1lTJgFFAhE4gRRCJ1fksQGdJ5vC+L 9RMvHz2bSUbke+x7r/bid0n2P4O4HUfS69HOdb+lnIaYzI7Itw91DrAfu0X967mai8ZvrT TvG8H09nW3K29+02Fyl1NsibHkbfayDjVhDYC1RSsSgOXWNN04i5mUt427dcZjgLOI/Z3b wC0ziLBfmr7amsJrbPugrXNYvK/UbcNDjWOhk70FHpOPyDSDTm0Xvm1UPyDzHSyVdZUZ+o NHuiagtfarj6U/G9OayqlgUO/fkBx9dPu7AzA6USKZn/Xp5Z/j6Yqz8chnjJmg== Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:13b:39f::9f:25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE Root Certificate Authority" (not verified)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Tm2dV3G2NzX9F; Thu, 29 Feb 2024 20:19:58 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id D08E98D4A235; Thu, 29 Feb 2024 20:19:56 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 2F3552D029D9; Thu, 29 Feb 2024 20:19:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id IS7RipPq38mH; Thu, 29 Feb 2024 20:19:55 +0000 (UTC) Received: from strong-iwl0.sbone.de (strong-iwl0.sbone.de [IPv6:fde9:577b:c1a9:4902:b66b:fcff:fef3:e3d2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 5FB282D029D2; Thu, 29 Feb 2024 20:19:55 +0000 (UTC) Date: Thu, 29 Feb 2024 20:19:55 +0000 (UTC) From: "Bjoern A. Zeeb" To: Baptiste Daroussin cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: db1d086b7372 - main - usb_vendors: add new usb_vendors In-Reply-To: <202402291204.41TC4AD8083263@gitrepo.freebsd.org> Message-ID: <8o96s68s-nr8s-s0pp-9p85-74o4pq396sr2@SerrOFQ.bet> References: <202402291204.41TC4AD8083263@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for the main 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; format=flowed On Thu, 29 Feb 2024, Baptiste Daroussin wrote: > The branch main has been updated by bapt: > > URL: https://cgit.FreeBSD.org/src/commit/?id=db1d086b7372d1d3f4e7a475d8e92642e698c25d > > commit db1d086b7372d1d3f4e7a475d8e92642e698c25d > Author: Baptiste Daroussin > AuthorDate: 2024-02-29 12:02:46 +0000 > Commit: Baptiste Daroussin > CommitDate: 2024-02-29 12:02:46 +0000 > > usb_vendors: add new usb_vendors > > usb_vendors is a local copy of usb.ids (similar to pci_vendors) > It is now used by usbconfig(1) when listing the devices. Give the file has no license, can we add them (or ask them to add them or an SPDX tag) based on the statement of the website? http://www.linux-usb.org/usb-ids.html "The contents of the database and the generated files can be distributed under the terms of either the GNU General Public License (version 2 or later) or of the 3-clause BSD License." /bz -- Bjoern A. Zeeb r15:7 From nobody Fri Mar 1 01:12:14 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tm96l0mNPz5DF1s; Fri, 1 Mar 2024 01:12:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tm96k6DS3z4FyV; Fri, 1 Mar 2024 01:12:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709255534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/KMVF7pRqFhwpI5xvkvS8jXOdXZ+nPnIH+q0LLTOSPk=; b=MrWkmSSakoKIJbx2l8zl6FRtXjFNUxc9H5BitEMOdS3j5yYLh1QToGJwhlh3C1kKhQ+4Ui jTWpgYNEBvKlFfxr2kj3Cm3TEms8GVZxGUsusHovNahxIj21raLkyO0hTEFkTUXK0CzNSH oOyny/axfEqvnF6VwmZYaUHWPOCdGXLPaJsgYKqs0Eo8r5m2G7jc5JBIn+B4dekmUWBFNx qcj1Eoot9O5t9grnPZi4PZpp1+ajBs7g62UoSNgxOeNUcnDlzRVXrYt07LJStm6n787IGn dZ/kb5pO9+WuzDkqGJOtWEDcRfeke40PyS6R3Wy9vXw4jBLKPTYqyAFV5gsirA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709255534; a=rsa-sha256; cv=none; b=H0REczQV+vAItI6jcA6ezfuWn1Qj26SjBfQfr7Tp2KiZLQZlmFKLVHTxbSmggMwgoehEDS WICOK5n95DMJRL/8dQ1kHA0bMwVQ5mwu3DYO9Jdwh8cHsVU38JfW4MDDzQqT/Fm6Y2di3v iU0m35R/aq07aiCFmpw+SkmuAI/Qfy/GCM3TnPauPJ2sPUJcMlRaheSljKB4Hmaa5MRHub uyxmvdXnsTX52SP8YVl5N0qVVqyEt8SPEeMhKxi+4NL0e6dt6huOeLBUTXxwiY4azxkgM9 bqJ6NwOlJKHwDPOrIh2dhkFysloq8J1D09/+O2XhSYT8oT7jCf9BjhkmeO3XGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709255534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/KMVF7pRqFhwpI5xvkvS8jXOdXZ+nPnIH+q0LLTOSPk=; b=Sg1VgnhZTFTBvaM+s3EqScfshaQek0rN59weumnk6QGKk3mwpxEcD9Q2lREu5Q1O61h+ts zRT8j4cjAIJTz8TUgCaXhvcQ3Wdzt4j0wDjwi25iC+TJXzi9REfkG5x6pyZiq6ivjWDaxK nKYvAKYHwHGJfRGTuh6M+xXsmdbCaqo4h/A9f4MmKnmluGmeHf8UiJtJ+qFrdEMvCU8ios 3f7812noezFtqPJsOSPsOYvWS9TVxZB0GWvp4eO6a3D56pQ+FMfH6MrYYDuaQBboM1h12L xBLbhRpPBSnW9lMoYHVUd9Ig5u5CjRVXtraoBvbk10/WDnVInao7ZDjQKWp4YA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tm96k5qywz14y7; Fri, 1 Mar 2024 01:12:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4211CED2018894; Fri, 1 Mar 2024 01:12:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4211CEe9018891; Fri, 1 Mar 2024 01:12:14 GMT (envelope-from git) Date: Fri, 1 Mar 2024 01:12:14 GMT Message-Id: <202403010112.4211CEe9018891@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: 51c6bf0478bd - main - Cirrus-CI: bump Clang versions to 16 and 17 List-Id: Commit messages for the main 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: 51c6bf0478bd331225121eb4a0a60510cc3920b1 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=51c6bf0478bd331225121eb4a0a60510cc3920b1 commit 51c6bf0478bd331225121eb4a0a60510cc3920b1 Author: Ed Maste AuthorDate: 2024-02-29 22:00:39 +0000 Commit: Ed Maste CommitDate: 2024-03-01 01:11:24 +0000 Cirrus-CI: bump Clang versions to 16 and 17 Clang/LLVM 17 is currently the in-tree default compiler, so use it as the default Cirrus-CI toolchain. Clang/LLVM 18 is coming soon and needs to be added here, but I ran into trouble with llvm18-lite package availability so will look at that later. Reviewed by: dim (earlier), Jose Luis Duran Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D44162 --- .cirrus.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 96fbb873136c..d84614321145 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -14,36 +14,36 @@ env: task: matrix: - - name: amd64-llvm15 World and kernel build and boot smoke test + - name: amd64-llvm16 World and kernel build and boot smoke test only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src' trigger_type: manual env: TARGET: amd64 TARGET_ARCH: amd64 - TOOLCHAIN: llvm15 + TOOLCHAIN: llvm16 TOOLCHAIN_PKG: ${TOOLCHAIN}-lite - - name: amd64-llvm16 World and kernel build and boot smoke test + - name: amd64-llvm17 World and kernel build and boot smoke test only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src' || $CIRRUS_BRANCH =~ 'pull/.*' env: TARGET: amd64 TARGET_ARCH: amd64 - TOOLCHAIN: llvm16 + TOOLCHAIN: llvm17 TOOLCHAIN_PKG: ${TOOLCHAIN}-lite - - name: arm64-llvm15 World and kernel build and boot smoke test + - name: arm64-llvm16 World and kernel build and boot smoke test only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src' trigger_type: manual env: TARGET: arm64 TARGET_ARCH: aarch64 - TOOLCHAIN: llvm15 + TOOLCHAIN: llvm16 TOOLCHAIN_PKG: ${TOOLCHAIN} - - name: arm64-llvm16 World and kernel build and boot smoke test + - name: arm64-llvm17 World and kernel build and boot smoke test only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src' trigger_type: manual env: TARGET: arm64 TARGET_ARCH: aarch64 - TOOLCHAIN: llvm16 + TOOLCHAIN: llvm17 TOOLCHAIN_PKG: ${TOOLCHAIN} - name: amd64-gcc12 World and kernel build and boot smoke test (manual) only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src' From nobody Fri Mar 1 12:19:50 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TmRx23NJcz5CHMm; Fri, 1 Mar 2024 12:19:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TmRx22nrRz58QN; Fri, 1 Mar 2024 12:19:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709295590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=br5RSMkgumcsOsJLLGNO40Ip6GzI1U02gai3z5DquEI=; b=Kh3vgs7R9wYGAUu51w+atH0sMTdJ61/0p8qfT5nHuLKxjpLn5Jes/ohe6vmhEV9fXTEUoI eIJ5Ms3+kumlTnZH2VmxIfam67RTwhafw2+0uD2x12D92cmC8NKOLeMvRPd91u5z7Y2Y6I gqITxaaOCAQceKXtuJPbyLQK/LJIkD+caXqbLdyTXUhjAQ6tvof9CrnDDxuXurAMStbMcS 8hY47IN9pYaQ711aURM/joqQHPuHQwpcV9ImRjxrgTDjFUBUeL8CY8BghIq0tYlfdiwMRi uWZB74TwcQrVNkK9ZqaKmKgBV9UCAl0PiDTTZcy5bY84TyBIMRmLsdaIjC0L8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709295590; a=rsa-sha256; cv=none; b=WByBZqeN02JeUqUXIzGpWYs11Aw7nBwhe061outvQd+Ixg8sdC3bCs/SehJqFxzKSaD9Vt T00rguq2j3nB8+wL61iO4y/MzfA2KiLgvZ7h6TklxFh3ivwskji0SLoPtHJ7ybkBkZLyeQ YPthtE4PHwyCN4/E023JtcYYKN9FjsnKD9978/EmFpc97dcYxT7orRtEH6zwqepXk3uJn+ oqM3ox+EoTWL4k/0v3PSig1xnrWnexzypi1NIihfRuvKneubJCgrBPRIeHz3fB5qKn5Hj8 5rkStulY9oY+Fe+I7JMsLXbJDFk7J3kBI9PefYu0/n+yPqJN6h9DEAMXKigCtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709295590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=br5RSMkgumcsOsJLLGNO40Ip6GzI1U02gai3z5DquEI=; b=uFhd9diOASa5JseCjMRtfc96QfnYGwgvDRd8m24XF1jLOTjh0H61pRLYqsCmYLcAza+ftj dN3YCsqfshD9IpkAIS2gUu1MsAYO6J6R+svcODONZRsh25bRBUZg2O/6rqSkW1tj07tT9T BBAwKqK/UXXrT2bDuXu+b43o9nUQ+MNL4SIgxxPnF2JDDyg1Y+WpTjqSDv4lra8PGOq/g0 RIK/jq+e17/B74Dq87S9mg0NszDv8DBHc+En9GuF05e5ngbD5N1R4Kp0VomCYU9jOzM1DF S0XN/qh4+usrqwqNjMX+Mo9HD+G0ccV/Lrn1Aqm+B60Gk7jHUIcX1yFOR6O8Tw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TmRx22GnszQL1; Fri, 1 Mar 2024 12:19: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 421CJoNB038943; Fri, 1 Mar 2024 12:19:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 421CJoHP038940; Fri, 1 Mar 2024 12:19:50 GMT (envelope-from git) Date: Fri, 1 Mar 2024 12:19:50 GMT Message-Id: <202403011219.421CJoHP038940@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: 6460322a0a51 - main - pf: support if-bound with 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: 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: 6460322a0a512f4e2c263bee54fc8bf46091f4cd Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=6460322a0a512f4e2c263bee54fc8bf46091f4cd commit 6460322a0a512f4e2c263bee54fc8bf46091f4cd Author: Kristof Provost AuthorDate: 2024-02-02 20:56:55 +0000 Commit: Kristof Provost CommitDate: 2024-03-01 08:39:43 +0000 pf: support if-bound with reply-to On reply-to we don't know what interface to bind to when we create the state. Create any reply-to state as floating, but bind to the appropriate interface once we're handling the reply. See also: https://redmine.pfsense.org/issues/15220 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 33 ++++++++++++++++++++++- tests/sys/netpfil/pf/route_to.sh | 56 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 46f01f986d05..b1f93f605b4f 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -423,6 +423,13 @@ BOUND_IFACE(struct pf_kstate *st, struct pfi_kkif *k) if (! (st->rule.ptr->rule_flag & PFRULE_IFBOUND)) return (V_pfi_all); + /* + * Initially set to all, because we don't know what interface we'll be + * sending this out when we create the state. + */ + if (st->rule.ptr->rt == PF_REPLYTO) + return (V_pfi_all); + /* Don't overrule the interface for states created on incoming packets. */ if (st->direction == PF_IN) return (k); @@ -7317,15 +7324,27 @@ pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, dst.sin_addr.s_addr = naddr.v4.s_addr; ifp = nkif ? nkif->pfik_ifp : NULL; } else { + struct pfi_kkif *kif; + if (!PF_AZERO(&s->rt_addr, AF_INET)) dst.sin_addr.s_addr = s->rt_addr.v4.s_addr; ifp = s->rt_kif ? s->rt_kif->pfik_ifp : NULL; + kif = s->rt_kif; /* If pfsync'd */ if (ifp == NULL && r->rpool.cur != NULL) { ifp = r->rpool.cur->kif ? r->rpool.cur->kif->pfik_ifp : NULL; + kif = r->rpool.cur->kif; + } + if (ifp != NULL && kif != NULL && + r->rule_flag & PFRULE_IFBOUND && + r->rt == PF_REPLYTO && + s->kif == V_pfi_all) { + s->kif = kif; + s->orig_kif = oifp->if_pf_kif; } + PF_STATE_UNLOCK(s); } @@ -7538,14 +7557,26 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, &naddr, AF_INET6); ifp = nkif ? nkif->pfik_ifp : NULL; } else { + struct pfi_kkif *kif; + if (!PF_AZERO(&s->rt_addr, AF_INET6)) PF_ACPY((struct pf_addr *)&dst.sin6_addr, &s->rt_addr, AF_INET6); ifp = s->rt_kif ? s->rt_kif->pfik_ifp : NULL; + kif = s->rt_kif; /* If pfsync'd */ - if (ifp == NULL && r->rpool.cur != NULL) + if (ifp == NULL && r->rpool.cur != NULL) { ifp = r->rpool.cur->kif ? r->rpool.cur->kif->pfik_ifp : NULL; + kif = r->rpool.cur->kif; + } + if (ifp != NULL && kif != NULL && + r->rule_flag & PFRULE_IFBOUND && + r->rt == PF_REPLYTO && + s->kif == V_pfi_all) { + s->kif = kif; + s->orig_kif = oifp->if_pf_kif; + } } if (s) diff --git a/tests/sys/netpfil/pf/route_to.sh b/tests/sys/netpfil/pf/route_to.sh index 31a47e75c82e..5223381d9c24 100644 --- a/tests/sys/netpfil/pf/route_to.sh +++ b/tests/sys/netpfil/pf/route_to.sh @@ -407,6 +407,61 @@ ifbound_cleanup() pft_cleanup } +atf_test_case "ifbound_reply_to" "cleanup" +ifbound_reply_to_head() +{ + atf_set descr 'Test that reply-to states bind to the expected interface' + atf_set require.user root +} + +ifbound_reply_to_body() +{ + pft_init + + j="route_to:ifbound_reply_to" + + epair_one=$(vnet_mkepair) + epair_two=$(vnet_mkepair) + ifconfig ${epair_one}b inet 192.0.2.2/24 up + ifconfig ${epair_two}b up + + vnet_mkjail $j ${epair_one}a ${epair_two}a + jexec $j ifconfig ${epair_one}a 192.0.2.1/24 up + jexec $j ifconfig ${epair_two}a 198.51.100.1/24 up + jexec $j route add default 198.51.100.254 + + jexec $j pfctl -e + pft_set_rules $j \ + "set state-policy if-bound" \ + "block" \ + "pass in on ${epair_one}a reply-to (${epair_one}a 192.0.2.2) inet from any to 192.0.2.0/24 keep state" + + atf_check -s exit:0 -o ignore \ + ping -c 3 192.0.2.1 + + atf_check -s exit:0 \ + ${common_dir}/pft_ping.py \ + --to 192.0.2.1 \ + --from 203.0.113.2 \ + --sendif ${epair_one}b \ + --replyif ${epair_one}b + + # pft_ping uses the same ID every time, so this will look like more traffic in the same state + atf_check -s exit:0 \ + ${common_dir}/pft_ping.py \ + --to 192.0.2.1 \ + --from 203.0.113.2 \ + --sendif ${epair_one}b \ + --replyif ${epair_one}b + + jexec $j pfctl -ss -vv +} + +ifbound_reply_to_cleanup() +{ + pft_cleanup +} + atf_test_case "dummynet_frag" "cleanup" dummynet_frag_head() { @@ -465,5 +520,6 @@ atf_init_test_cases() atf_add_test_case "icmp_nat" atf_add_test_case "dummynet" atf_add_test_case "ifbound" + atf_add_test_case "ifbound_reply_to" atf_add_test_case "dummynet_frag" } From nobody Fri Mar 1 12:19:51 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TmRx35YlYz5CGvg; Fri, 1 Mar 2024 12:19: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 4TmRx33PClz58Kx; Fri, 1 Mar 2024 12:19:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709295591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YUgbVjBsZdluG+Rcxy70df2O07AcFrj8fu+Ecob9xXs=; b=ORLmsy1fF8QEEWhy6/XdfSYUBZ4mMf9ggkrX91BePcWuBhk3SIvUy+t/jB45ej8khI4qAo jX1YNG1KtnUE3uuPSpOOHtwrvMxpxt5RR48RZkcLZx8Pw+D6Ph+9J+UJORtgpSaBeM8xLE Wv500MM2yO3GTW1qCZHOKyA1+pCCtHDlGdJcBsBEjlTe15wPeVyw9XwnYrXy8tn524/p4P fXDuhjVtrTOxFpJ8hSf0N+IzPI9LqQ97omRIWHFH9v3b3uKk9XQDgLRpEdXfloWkMFXXuQ Lei5eV4mUnJB+Lzdy1F3AFaFL62NCW2+5knIVbOVIDKCwKbTgMafAS9Sx4t8jA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709295591; a=rsa-sha256; cv=none; b=SfJPkLUPQGRHX2I+y8ZmwhBGl0A/FZj2OAgs5h2FPSyFn82nqQMP0i9k+QS215KSseZ7O+ Ui/9Xo0ZmWNaXC/UomTE9hfnhUO9GZE08ZbOirsHmyTaZWkwHj6rO4coN/yhFpnqw+n3NE CgKol7uLxDJXLZy0BQsX4BNbv4OMwVEnIPccN6yAdhWBo7phpHHfvnQYUl9yQroJULldwp 1uddk9+kebxG3TjfSkEnEiCijA/nvjOBQ85AajnZHHW7gnVFnM0Yl3nCbmx7RgCAu7o0Ly 8tjxOH1/gqF/+uXsNztgbXz1/RcsqXbLt3c0fZDktrt0XtomitB0rByQy/ZgCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709295591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YUgbVjBsZdluG+Rcxy70df2O07AcFrj8fu+Ecob9xXs=; b=Mp32+SLMM49Phuvn7mIyrxYJbzOxOO1t4ha8pGdQQ8bledr2pCGEw/w6u86RELUAAi/5p4 9Adit6JGagT2gtk6+qQ/TevBUv8Ml5IiizBHqN8Is/OXBLndcDr3H9EMtpNQ2GAvaffywj vhUs39D7JePc2+uThmrN23gdg7iSAP3HiDxTUx20cl+nS9cINUyezSy1j+dJXUN/xPcQnF h4YgpXnpq1fyPz3DFNTyawbZKgWETHRoOx02WcMMpZWhy//EL7fzv6HQKyX6W6nD8pSkQB IAuyovjYBsM1QL+XVt9GY6FwKb5iETNv+LPCfWevLe5Q3XyZRRDZ6UFj4YtLYQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TmRx330nNzQ99; Fri, 1 Mar 2024 12:19: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 421CJpK9039003; Fri, 1 Mar 2024 12:19:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 421CJpQN039000; Fri, 1 Mar 2024 12:19:51 GMT (envelope-from git) Date: Fri, 1 Mar 2024 12:19:51 GMT Message-Id: <202403011219.421CJpQN039000@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: fb995824b9df - main - pf tests: IPv6 versions of the route-to/reply-to if-bound tests List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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: fb995824b9df6739ed976166ce5c008c13e31701 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=fb995824b9df6739ed976166ce5c008c13e31701 commit fb995824b9df6739ed976166ce5c008c13e31701 Author: Kristof Provost AuthorDate: 2024-02-29 14:10:56 +0000 Commit: Kristof Provost CommitDate: 2024-03-01 08:39:44 +0000 pf tests: IPv6 versions of the route-to/reply-to if-bound tests Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/route_to.sh | 106 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) diff --git a/tests/sys/netpfil/pf/route_to.sh b/tests/sys/netpfil/pf/route_to.sh index 5223381d9c24..d5d29709fe06 100644 --- a/tests/sys/netpfil/pf/route_to.sh +++ b/tests/sys/netpfil/pf/route_to.sh @@ -407,6 +407,51 @@ ifbound_cleanup() pft_cleanup } +atf_test_case "ifbound_v6" "cleanup" +ifbound_v6_head() +{ + atf_set descr 'Test that route-to states for IPv6 bind the expected interface' + atf_set require.user root +} + +ifbound_v6_body() +{ + pft_init + + j="route_to:ifbound_v6" + + epair_one=$(vnet_mkepair) + epair_two=$(vnet_mkepair) + ifconfig ${epair_one}b up + + vnet_mkjail ${j}2 ${epair_two}b + jexec ${j}2 ifconfig ${epair_two}b inet6 2001:db8:1::2/64 up no_dad + jexec ${j}2 ifconfig ${epair_two}b inet6 alias 2001:db8:2::1/64 no_dad + jexec ${j}2 route -6 add default 2001:db8:1::1 + + vnet_mkjail $j ${epair_one}a ${epair_two}a + jexec $j ifconfig ${epair_one}a inet6 2001:db8::1/64 up no_dad + jexec $j ifconfig ${epair_two}a inet6 2001:db8:1::1/64 up no_dad + jexec $j route -6 add default 2001:db8::2 + + jexec $j ping6 -c 3 2001:db8:1::2 + + jexec $j pfctl -e + pft_set_rules $j \ + "set state-policy if-bound" \ + "block" \ + "pass inet6 proto icmp6 icmp6-type { neighbrsol, neighbradv }" \ + "pass out route-to (${epair_two}a 2001:db8:1::2)" + + atf_check -s exit:0 -o ignore \ + jexec $j ping6 -c 3 2001:db8:2::1 +} + +ifbound_v6_cleanup() +{ + pft_cleanup +} + atf_test_case "ifbound_reply_to" "cleanup" ifbound_reply_to_head() { @@ -462,6 +507,65 @@ ifbound_reply_to_cleanup() pft_cleanup } +atf_test_case "ifbound_reply_to_v6" "cleanup" +ifbound_reply_to_v6_head() +{ + atf_set descr 'Test that reply-to states bind to the expected interface for IPv6' + atf_set require.user root +} + +ifbound_reply_to_v6_body() +{ + pft_init + + j="route_to:ifbound_reply_to_v6" + + epair_one=$(vnet_mkepair) + epair_two=$(vnet_mkepair) + + vnet_mkjail ${j}s ${epair_one}b ${epair_two}b + jexec ${j}s ifconfig ${epair_one}b inet6 2001:db8::2/64 up no_dad + jexec ${j}s ifconfig ${epair_two}b up + #jexec ${j}s route -6 add default 2001:db8::1 + + vnet_mkjail $j ${epair_one}a ${epair_two}a + jexec $j ifconfig ${epair_one}a inet6 2001:db8::1/64 up no_dad + jexec $j ifconfig ${epair_two}a inet6 2001:db8:1::1/64 up no_dad + jexec $j route -6 add default 2001:db8:1::254 + + jexec $j pfctl -e + pft_set_rules $j \ + "set state-policy if-bound" \ + "block" \ + "pass quick inet6 proto icmp6 icmp6-type { neighbrsol, neighbradv }" \ + "pass in on ${epair_one}a reply-to (${epair_one}a 2001:db8::2) inet6 from any to 2001:db8::/64 keep state" + + atf_check -s exit:0 -o ignore \ + jexec ${j}s ping6 -c 3 2001:db8::1 + + atf_check -s exit:0 \ + jexec ${j}s ${common_dir}/pft_ping.py \ + --to 2001:db8::1 \ + --from 2001:db8:2::2 \ + --sendif ${epair_one}b \ + --replyif ${epair_one}b + + # pft_ping uses the same ID every time, so this will look like more traffic in the same state + atf_check -s exit:0 \ + jexec ${j}s ${common_dir}/pft_ping.py \ + --to 2001:db8::1 \ + --from 2001:db8:2::2 \ + --sendif ${epair_one}b \ + --replyif ${epair_one}b + + jexec $j pfctl -ss -vv +} + +ifbound_reply_to_v6_cleanup() +{ + pft_cleanup +} + atf_test_case "dummynet_frag" "cleanup" dummynet_frag_head() { @@ -520,6 +624,8 @@ atf_init_test_cases() atf_add_test_case "icmp_nat" atf_add_test_case "dummynet" atf_add_test_case "ifbound" + atf_add_test_case "ifbound_v6" atf_add_test_case "ifbound_reply_to" + atf_add_test_case "ifbound_reply_to_v6" atf_add_test_case "dummynet_frag" } From nobody Fri Mar 1 13:57:30 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TmV5l0hMWz5CRS9; Fri, 1 Mar 2024 13:57: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 4TmV5k6JL0z43LK; Fri, 1 Mar 2024 13:57:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709301450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DvMC8JMAW8ar3IVG2PE6XiUWrr6LgchXw0MPfkPtQDk=; b=Wr67YijwI/wrxgIm//cuutFYHcc5kD2FrTrSVIGrQ57MJimZLVOe690QBA12Y4nTgTWpxc 1015mtTDgqvDNAh32L0P2EnemWiH90TQxhK9NhylXngVxES0JKeZ5TpJdlRNvrakfUlXst 20tWXZIh+uwVh8hH5iksMrUaCel7VOfpQS9eDXZipyP10lLu0SUAGNdBPXz0KUCA8AykyL w5schmIy4vQirPa/JXTpwQfIS+XMsLaDhN1301QAQJVd0n/BBvL7GPd2UbxVgAqje4IyIE 6pNX/5mD017VNRzlp5HnMO0ahhFWwd36MdJtZ5dZycwTpq/nVuAExRZSVF9loQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709301450; a=rsa-sha256; cv=none; b=NTEhnBCAv+JsKdAgSx9y3//u+kEkIFbic0dS2cev8Onpd3coH+wnQtQuNS4Dv3hrUZxcxL 9xSJstc9TKTplxyTlpwgo59MHflFHg8MUbbQ+/HJhobGyTvWg3u5EDU9x8uFHMP8rmwVAB e/MmG/kL24vovFBN1AQ8vOVDXWktb26QT8IZ9VYEAQ1Pxfl5DHXilv6hymCmFobGwXNSB4 JiyUvox+nBxqOshY+WDRlLCOK5GFwLtoLwdDopx6l+scIP0ptw5gA1dANFl54Yq7Dcte8k 3OwNLuXcwk7Av0qIqXiqEMWE08TljcjTNskxtGU/ly+laS4tsOVyyPTdBpGxOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709301450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DvMC8JMAW8ar3IVG2PE6XiUWrr6LgchXw0MPfkPtQDk=; b=RcEiWxA0ljdiixjWcLL6lHKD4+3qPBuPspPuONh1pFsbjVeuWnoCSruykZ7StrrxxK4KUB P8x0LUNdazh1YjtzUPXIhMkP78e6HXQJWDSIeVTZDvhQ0C/ph64ixFNIGzEuXNSTrmcXY+ 1anZlIdP4wPoERio/fqzgHqU4GUE+wb0+sZY0i9yzdu6stebj2FWV/nvwXquDtf8aBjXnB atH7SdvJjNMbznqHyr50/+cNV2KRx4QR1gKJvNdY2jKH6uooX4s4EPsVwBgpJyfiGWO7X3 30VwGpNyUiyg2aS3U64F0Lnk9fTQ6yAZ5xyurxsF0OO1Yrez5Zia+6/8p4J3pw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TmV5k5vygzT4l; Fri, 1 Mar 2024 13:57: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 421DvUBm005859; Fri, 1 Mar 2024 13:57:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 421DvUiD005856; Fri, 1 Mar 2024 13:57:30 GMT (envelope-from git) Date: Fri, 1 Mar 2024 13:57:30 GMT Message-Id: <202403011357.421DvUiD005856@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 56ec98a04d19 - main - pam_xdg: Close the dir after removal List-Id: Commit messages for the main 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 56ec98a04d19fec3750e47d12eb581c139c8b405 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=56ec98a04d19fec3750e47d12eb581c139c8b405 commit 56ec98a04d19fec3750e47d12eb581c139c8b405 Author: Emmanuel Vadot AuthorDate: 2024-03-01 13:49:16 +0000 Commit: Emmanuel Vadot CommitDate: 2024-03-01 13:56:12 +0000 pam_xdg: Close the dir after removal CID: 1534878 Sponsored by: Beckhoff Automation GmbH & Co. KG --- lib/libpam/modules/pam_xdg/pam_xdg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libpam/modules/pam_xdg/pam_xdg.c b/lib/libpam/modules/pam_xdg/pam_xdg.c index f1a9b13d581c..4d586a21566a 100644 --- a/lib/libpam/modules/pam_xdg/pam_xdg.c +++ b/lib/libpam/modules/pam_xdg/pam_xdg.c @@ -199,6 +199,7 @@ remove_dir(int fd) } unlinkat(fd, dp->d_name, 0); } + closedir(dirp); return (0); } From nobody Fri Mar 1 15:43:42 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TmXSH075Cz5CbFm; Fri, 1 Mar 2024 15:43: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 4TmXSG4v1mz4Gg9; Fri, 1 Mar 2024 15:43:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709307822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lQ+4D6p0MXAxfkWhCZWsEtCItxK8dE20krefiQR1XmQ=; b=oSjXvvcwtYjerN/YEriNVZRdX+bYB1sBR8T+TLuCb6UQFS8eiVY6bOk5GROQ1lxYb+IvUL Bb/Z2ieHTORQMo6AKDakIgqVBaYs3+5sHTUQEbBZW58jfefNFetj4PTAFqXUHfYcnKhE7g J44j2R6DiEmSN1KMjDOnksSoZDQG3+8+4JreG/lcjuT2Nh4vYK+FCM/bHqwjs9k6YeLHTP iZS4IVLWgwl75ncy9MkxOpSGMBrAEOwxBux54GBSlgT4aa6ONQtTJ/9xrM71BzlKy6FZ/S JfbPsj84Vt2NnHWU9/xKZvpex5i2b0t6jneXOn2mLv+4UNZmWkrnhrulZklgWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709307822; a=rsa-sha256; cv=none; b=luGNDzLeUqm+MASn9XkYty+hvQSmg2I2MBMkTmJBy/hRAlccFn+oFa321kWYDqf2CesAYH HAczAIUWrygjowqkoaeaftP1jm/ew5L1RkpmpxN048dqNb4tw39KiOpCQlu/rpdm6KEIAS TqPX0prH9KrW1TUseWMy1k+dZyYtNR1pfRmgKS+jLl7nlOjH84fgJjRRfJ4p590+kWOlDz uYe6FpIOn9EsqBAOyyaZp4fU3bOFUWleFVH0E/NccLffktz88p9rSghPyVt6Id8P3VcPYm QB9kjPE6XoDYN5GHIsOUNLVz+JWu+pS/L5Su9zFMOEd04BmHguuluY4dRQI2tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709307822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lQ+4D6p0MXAxfkWhCZWsEtCItxK8dE20krefiQR1XmQ=; b=jFrkv7PuJlwhiB+vw99IijwU8Lu4e9X5pIwv6YMf0NBmX+oVsGX0h3fbxWz3t/zyAJ+erW SUD1vNQCBZcEUol5VsPEk0/VBpT84FykW0zrtzm+OgP9fhf/pWdVj/fBjBZ+4VOLmHmdpm WYK3LxDkHQVcw72zPJmo0kZyBbR7tG6SRGbIcy8LVCw09dDNn8XTy6PikakWCsDqTKp07Y OT2czsFw7KW1DZ4+gC8ITBVZb2FR2S9tjoN1uNqXEOg4P4ec6NsLlo3jUP9nCEGSHW96/K YHMBijwsiUb24W7KrmEUh6Po/uD7w18PXHi/2u/30KJaTjKB/rSSBbYi7dMRag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TmXSG4Vx4zXVB; Fri, 1 Mar 2024 15:43: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 421Fhgjs091914; Fri, 1 Mar 2024 15:43:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 421Fhgx7091911; Fri, 1 Mar 2024 15:43:42 GMT (envelope-from git) Date: Fri, 1 Mar 2024 15:43:42 GMT Message-Id: <202403011543.421Fhgx7091911@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Stefan =?utf-8?Q?E=C3=9Fer?= Subject: git: 484de86fbe4c - main - ldconfig: remove ignored -v (verbose) 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: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 484de86fbe4cf0b77e9cc15e8a6a656603b9174a Auto-Submitted: auto-generated The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=484de86fbe4cf0b77e9cc15e8a6a656603b9174a commit 484de86fbe4cf0b77e9cc15e8a6a656603b9174a Author: Stefan Eßer AuthorDate: 2024-03-01 15:29:31 +0000 Commit: Stefan Eßer CommitDate: 2024-03-01 15:40:55 +0000 ldconfig: remove ignored -v (verbose) option The -v option used to print useful information when operating on a.out format libraries. After the removal of a.out support, it was accepted but did not have any effect. Remove the option and update the man-page. While here mention the set of historic options that are accepted but ignored: "-elf", "-s", and "-v". The FILES section contained outdated information and did not mention the way library directories of optional ports and packages are included in the library search path recorded in the hints file. The description of the "-B" option was incorrect (described a planned change) for big-endian platforms (powerpc64). These do still default to big-endian hints files, since the current version of the "pkg" program expects the hints file to be in native byte-order. Reviewed by: kib MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D44139 --- sbin/ldconfig/ldconfig.8 | 31 +++++++++++++++++++------------ sbin/ldconfig/ldconfig.c | 8 ++++---- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/sbin/ldconfig/ldconfig.8 b/sbin/ldconfig/ldconfig.8 index 88d99567912e..f3ced2220e9a 100644 --- a/sbin/ldconfig/ldconfig.8 +++ b/sbin/ldconfig/ldconfig.8 @@ -41,7 +41,7 @@ .Sh SYNOPSIS .Nm .Op Fl 32 -.Op Fl BRimrv +.Op Fl BRimr .Op Fl f Ar hints_file .Op Ar directory | Ar .Sh DESCRIPTION @@ -106,8 +106,8 @@ on 64-bit systems that support running 32-bit binaries. .It Fl elf Ignored for backwards compatibility. .It Fl B -Force writing big-endian binary data´to the hints file. -The default is to create little-endian hints files on all architectures. +Force writing big-endian binary data to the hints file. +The default is to create hints files in the native byte-order of the host. Reading of and merging into hints files preserves the endianness of the existing hints file. .It Fl R @@ -131,9 +131,14 @@ on the standard output. The hints file is not modified. .Pp Scan and print all libraries found on the directories list. -.It Fl v -Switch on verbose mode. .El +.Pp +The historic options +.Fl elf , +.Fl s , +and +.Fl v +are accepted but ignored. .Sh SECURITY Special care must be taken when loading shared libraries into the address space of @@ -150,17 +155,19 @@ Thus, serves to specify the trusted collection of directories from which shared objects can be safely loaded. .Sh FILES -.Bl -tag -width /var/run/ld-elf.so.hintsxxx -compact +.Bl -tag -width /usr/local/libdata/ldconfig/* -compact .It Pa /var/run/ld-elf.so.hints Standard hints file for the ELF dynamic linker. -.It Pa /etc/ld-elf.so.conf -Conventional configuration file containing directory names for -invocations with -.Fl elf . .It Pa /var/run/ld-elf32.so.hints -Conventional configuration files containing directory names for -invocations with +Hints file for 32 bit libraries on 64 bit architectures, processed by +ldconfig when invoked with .Fl 32 . +.It Pa /etc/ld-elf.so.conf +Optional file with names of directories to be included in the standard +hints file when booting to multi-user mode. +.It Pa /usr/local/libdata/ldconfig/* +Additional files with names of directories provided by optional ports +or packages. .El .Sh SEE ALSO .Xr ld 1 , diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c index 0eb9cb801ac2..7700fd1f4574 100644 --- a/sbin/ldconfig/ldconfig.c +++ b/sbin/ldconfig/ldconfig.c @@ -57,9 +57,9 @@ main(int argc, char **argv) { const char *hints_file; int c; - bool is_32, justread, merge, rescan, force_be, verbose; + bool is_32, justread, merge, rescan, force_be; - force_be = is_32 = justread = merge = rescan = verbose = false; + force_be = is_32 = justread = merge = rescan = false; while (argc > 1) { if (strcmp(argv[1], "-aout") == 0) { @@ -104,7 +104,7 @@ main(int argc, char **argv) /* was nostd */ break; case 'v': - verbose = true; + /* was verbose */ break; default: usage(); @@ -127,7 +127,7 @@ static void usage(void) { fprintf(stderr, - "usage: ldconfig [-32] [-elf] [-BRimrv] [-f hints_file]" + "usage: ldconfig [-32] [-BRimr] [-f hints_file]" "[directory | file ...]\n"); exit(1); } From nobody Fri Mar 1 16:18:14 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TmYD63zQSz5Cf2H; Fri, 1 Mar 2024 16:18: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 4TmYD62dPdz4Kms; Fri, 1 Mar 2024 16:18:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709309894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hPXBZeUR4mGO/WZoAUHd1Mg9sbDDtrmhRhP34b/MnbM=; b=mQwhoBwnJNDWO2uw3eEnWfasXK5TeLIpdy8g+57wRU7skKzi1CI5OkJSdp2QTMWk3LNwPn f8VDJiUxkvhXDWrP84GZIL+cZoCz4O0Mab4duG98svawzJL7ilqzjtaM+4V6xedrjC6cU/ FnQ/2rMj62nF7nNzdLbff4xTvWv7f0ngBBZs8LF3wmUx1M1Yfbc0bp0PW2PG/I8f97DPtT eVie+TqulIGhQ3U62ZviuxPlueGWcurAkM0KlDU4oCk+Jqy5lzf9e/8uKJ7zud4WdMyPN8 8T4UTDDOPOe65kYT+uE5StvbRkIeX+2uW8kUhOMceRcBGQkLXXBL64to7UhIAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709309894; a=rsa-sha256; cv=none; b=FeXaIMovj81P1GexQOw/ojpyI43kPiV9eFWNjw1kmlfsb8sUNqIU87765n77W82Yxz6Cbj 9w9FvX7Slj6KBydGhfuPZ+TMnLgnPqa+aUSz9TE2Sf7ODHWJiPhFlSChhRCz7U+OFs/+IS 1gbTLntn3qBNo97DbfqATgwnG+/ZU0CNxWrW/XPlQUvKKfOgDyY0PhMGQtIKv22C9oPbNJ vNg4ezMr9Fmr71k8U6PiX0XLbTAP1AUUvpyW+MgwhpolkxYQgDf7ZdkwS1qzVZCunGIaQJ ya/RsY32+TKunFGciE/twOAoyL7BVdz2Xlp10nFScz/bsStHpdm8pBp9MiRVag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709309894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hPXBZeUR4mGO/WZoAUHd1Mg9sbDDtrmhRhP34b/MnbM=; b=ri3hsiMAnqWmBEPwtNQmuPGVjNo+TbVsZXSqPzcc3JI6B6owpAlLjgNsdsWULqihQ1ALUv 9Ex2Uiy8iYkfa8pzE216zOdcnkRky0x59j77aNby+7dQEWX7nIqxO4Mdkq/utUFuLcEamO 1jUrpr7Mtyfe3RFvzR6RKbqEM62FJfrhhFZx8rcdtrv78jhBVswIpX9TBiQqYsBD8bcLoP acAKpgiITtROHgIrqjQ0QILDxhvbU3TIq6AFqdWm54plYPw1W5ERqgfOyGLI1Ij/Cd/I5f PtjHEHqbU5RrU9i1Q+USbjIV+mrRlTaKvQLoqBJ5q04xEG1gvjK8SagW+Y1rew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TmYD626TPzYSv; Fri, 1 Mar 2024 16:18: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 421GIEtg043842; Fri, 1 Mar 2024 16:18:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 421GIEWL043839; Fri, 1 Mar 2024 16:18:14 GMT (envelope-from git) Date: Fri, 1 Mar 2024 16:18:14 GMT Message-Id: <202403011618.421GIEWL043839@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: 0854004bba7b - main - CODEOWNERS: Add Stephane Rochoy List-Id: Commit messages for the main 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: 0854004bba7b7753e1fc509cc094f56330931a8d Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0854004bba7b7753e1fc509cc094f56330931a8d commit 0854004bba7b7753e1fc509cc094f56330931a8d Author: Warner Losh AuthorDate: 2024-03-01 16:15:46 +0000 Commit: Warner Losh CommitDate: 2024-03-01 16:18:08 +0000 CODEOWNERS: Add Stephane Rochoy Stephane Rochoy isn't quite the maintainer of these items, but has an interest in them. As an experiment, see if this is a viable thing to do. --- .github/CODEOWNERS | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 3abef8d6b88e..a66910608d92 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -35,7 +35,6 @@ /contrib/atf @ngie-eign /contrib/capsicum-test @ngie-eign /contrib/googletest @ngie-eign -/sbin/ipf @cschuber /contrib/libcxxrt @DimitryAndric @emaste /contrib/llvm-project @DimitryAndric /contrib/llvm-project/libunwind @DimitryAndric @emaste @bsdjhb @@ -44,6 +43,7 @@ /contrib/netbsd-tests @ngie-eign /contrib/netbsd-tests/crypto/opencrypto/ @jmgurney /contrib/netbsd-tests/kernel/kqueue/ @jmgurney +/contrib/one-true-awk/ @bsdimp /contrib/openpam/lib/libpam/ @dag-erling /contrib/pjdfstest @ngie-eign @asomers /crypto/openssh @dag-erling @@ -55,14 +55,19 @@ /lib/libfetch @dag-erling /lib/libfigpar @dag-erling /lib/libpam/ @dag-erling +/lib/libsecureboot/ @stephane-rochoy-stormshield +/lib/libveriexec/ @stephane-rochoy-stormshield /lib/libvmmapi @bsdjhb @grehan-freebsd /libexec/rc/rc.d/rctl/ @trasz -/sbin/nvmecontrol @bsdimp +/sbin/ipf @cschuber /sbin/mount_fusefs @asomers +/sbin/nvmecontrol @bsdimp +/sbin/veriexec/ @stephane-rochoy-stormshield /secure/usr.bin/openssl/ @juikim /share/mk @bsdimp @bapt @bdrewery @emaste /stand @bsdimp /stand/lua @kevans91 +/stand/veriexec.mk @stephane-rochoy-stormshield /sys/amd64/pci @bsdimp @bsdjhb /sys/amd64/vmm/ @bsdjhb @grehan-freebsd /sys/arm/allwinner @evadot @@ -70,21 +75,29 @@ /sys/arm64/include @zxombie /sys/arm64/rockchip @evadot /sys/compat/linprocfs/ @dag-erling -/sys/netpfil/ipfilter @cschuber /sys/crypto/openssl/ @juikim /sys/dev/drm2 @bsdimp +/sys/dev/ftgpio/ @stephane-rochoy-stormshield +/sys/dev/ftwd/ @stephane-rochoy-stormshield /sys/dev/iscsi/ @trasz +/sys/dev/nctgpio/ @stephane-rochoy-stormshield +/sys/dev/ncthwm/ @stephane-rochoy-stormshield /sys/dev/nvd @bsdimp /sys/dev/nvme @bsdimp /sys/dev/pci @bsdimp @bsdjhb +/sys/dev/superio/ @stephane-rochoy-stormshield +/sys/dev/veriexec/ @stephane-rochoy-stormshield /sys/fs/autofs/ @trasz /sys/fs/fuse/ @asomers /sys/fs/procfs/ @dag-erling /sys/fs/pseudofs/ @dag-erling /sys/kern/vfs_aio.c @asomers /sys/netinet/ip_carp.c @glebius +/sys/netpfil/ipfilter @cschuber /sys/netpfil/pf @glebius /sys/opencrypto/ @jmgurney +/sys/security/mac_veriexec/ @stephane-rochoy-stormshield +/sys/security/mac_veriexec_parser/ @stephane-rochoy-stormshield /sys/x86/pci @bsdimp @bsdjhb /tests @ngie-eign /tests/sys/aio/ @asomers From nobody Fri Mar 1 16:48:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TmYvD2LYTz5ChLN; Fri, 1 Mar 2024 16:48: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 4TmYvD1gfyz4P82; Fri, 1 Mar 2024 16:48:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709311720; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wSqbJbJRnEl9VnvLiq3VFua6Uk0V6EwiiiDXM4wCaBg=; b=aEBopkWTVXHlk7AKI6sWZaO1wkEY9jvUQQk34hHun7MH5DhFBeEG8/4XGOtjNhseIuQ7lX 4yNRgV8nmzeznB9DhTK7BOLHfp9xbk6AohSPVf/7lYUCvlSm8iUZeVo+aUxJI6SOZ9duMb dyZ/chAa+9EM7UOUty4AdvrAcL5vVJ89S6YlIs2M8jBO0qjB0jc153DS54/yqKk0mjDvHi g/j/LKK7bdOJgBG3dywRyNVnyLgyT9GqlHDbYrgSrAjBjky7NgqcoVzlVqVs3hLSRx+H2k lHZEt0tsLACpyo5ML1TSjqxRcG/dMCmPbl/3WnA1JtzDyYnLv5Dx6RoEyhl8Lg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709311720; a=rsa-sha256; cv=none; b=C3aVv/E7IXksTX0v5Ahrsd9G8M+cNaonIAo9JuiRsimWLhb6Er/dMbrR7vHN2Qg3oyuZIm 4TeLeuUDcBOCIufnlUhZvT4qzW1gLMG93R8+L3cqDohj2d/o6olItRsF7JTS7vgiksAQqD 1Wy9xJ5I3DlFuNrGESP1zMYH9wJoLYnj4xk5GFLfBKrmLNfpPN72yoHtm0lEsciNYl7Z6k sDSbx1IdEc5KfQ7GQoJOhVpehQctlWYnuZahB8PgrpFtHN3pnLf6bOQTqHNM+9W9Pz6r1X N9RKVtWa7cvipn1ltzcO/ZJj/uEoyVOpPpmMA/W4dhflUIdj1YDDqC4mbz0eNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709311720; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wSqbJbJRnEl9VnvLiq3VFua6Uk0V6EwiiiDXM4wCaBg=; b=eFuhzUPgOUPlvS+QevAJTLUJP5MGt1nu3vpaPT19CtUVMJujiekBX7QJ4yLRPjMVnow2vQ eLi8W77kr9VLY9fduO6R/cqYkp7Pyj09S9EINUAhGZ6BkDhdKV0g/C62/ZrK7uTkt7h/Td PIMl8K1e77MuZdMZw5eHB2oLO513mNYBJi3bFdh+fFWH+SGfsXm+ZtfYLzrN5tnqpJRF8V 53i8Ew9MDXFC369K087ig/vmKS8bURNoyjt9ct68MFEADTT3pvZqOg1K76xSojVFYtsWOQ 6nT+2K4G/SILFTXWGoOoGp6VOw+KHa4ssFYjeQStVKdGYThYpkiQo6jpaW56jQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TmYvD1GySzZMn; Fri, 1 Mar 2024 16:48: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 421Gmera094587; Fri, 1 Mar 2024 16:48:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 421GmeNV094584; Fri, 1 Mar 2024 16:48:40 GMT (envelope-from git) Date: Fri, 1 Mar 2024 16:48:40 GMT Message-Id: <202403011648.421GmeNV094584@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: 24235654f104 - main - Cirrus-CI: Add manual Clang 18 jobs List-Id: Commit messages for the main 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: 24235654f104d8613bbae1c44cd8f7c39b5fe8fe Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=24235654f104d8613bbae1c44cd8f7c39b5fe8fe commit 24235654f104d8613bbae1c44cd8f7c39b5fe8fe Author: Ed Maste AuthorDate: 2024-03-01 13:21:54 +0000 Commit: Ed Maste CommitDate: 2024-03-01 16:44:09 +0000 Cirrus-CI: Add manual Clang 18 jobs Work is in progress to import Clang/LLVM 18 as the base system compiler. llvm18-lite is not yet in the quarterly package set but but will be available in the not too distant future, and is available for src forks that switch to latest packages. Add manual llvm18 jobs now so that they can be used for testing. Sponsored by: The FreeBSD Foundation --- .cirrus.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index d84614321145..90d031a919f2 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -29,6 +29,14 @@ task: TARGET_ARCH: amd64 TOOLCHAIN: llvm17 TOOLCHAIN_PKG: ${TOOLCHAIN}-lite + - name: amd64-llvm18 World and kernel build and boot smoke test + only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src' + trigger_type: manual + env: + TARGET: amd64 + TARGET_ARCH: amd64 + TOOLCHAIN: llvm18 + TOOLCHAIN_PKG: ${TOOLCHAIN}-lite - name: arm64-llvm16 World and kernel build and boot smoke test only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src' trigger_type: manual @@ -45,6 +53,14 @@ task: TARGET_ARCH: aarch64 TOOLCHAIN: llvm17 TOOLCHAIN_PKG: ${TOOLCHAIN} + - name: arm64-llvm18 World and kernel build and boot smoke test + only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src' + trigger_type: manual + env: + TARGET: arm64 + TARGET_ARCH: aarch64 + TOOLCHAIN: llvm18 + TOOLCHAIN_PKG: ${TOOLCHAIN} - name: amd64-gcc12 World and kernel build and boot smoke test (manual) only_if: $CIRRUS_REPO_FULL_NAME != 'freebsd/freebsd-src' trigger_type: manual From nobody Fri Mar 1 17:38:50 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tmb161qPfz5Cm0C; Fri, 1 Mar 2024 17:38: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 4Tmb161JCkz4Y45; Fri, 1 Mar 2024 17:38:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709314730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0iV4XhewpAluXIcOyyCvnED1jA3pH5iVvL96QRJRItQ=; b=fN7exxm8RlLbd64hnpDHo770+ydUIvtjdyxDOwPztXt/ZgfDYtZKa1n7eAQ180SfvBcOKU Ku/tUbBYAmXZnEHtmUOMK3lfEjtgePiFUIu0PlHdE9cHViFe7xMDjFWTJn2wBrYS1d0IxE dDT/5CyudabZa2R0g1loa771CkZDir4YFhVf7fOyIg6+NwM/xUuSPu/6Q3461nAVd7Rsnh qaZAlshiguurvZZLX0kZEIuSMtWU9aOXjBIVx/EJ3z8SgVYLKSn0Ez/k8SKM6xUQj0/YlU bLwFQ6K7CNpY/HhuCHWFNiuVvG0jprI+OSeJynHixJfc7dlFtCCD/xFfYpXgmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709314730; a=rsa-sha256; cv=none; b=ZPgEskbCS3IO+M4Nq/IGzOOKgySa9hAStdZPTT36jQeOtUaSzTPv9YVVGzrPBEnBn8Lj8P MoYjz7VmPVy9yi8PkssyzaDsuk6oT1RJ6CkICUC6b19I1r6Oa4X1UznXqS1h/LCqgZk38x 7HCd3yAssOHANP199QNIhPm+i0djoGrEe1XSg2JFKiC3YsL8JHyRDZgImAFWHTWpK3MD2t ckOG+cmpbOTN3gOWlTBtLtstY9Dy71i9Ahv2QgsBnMyfb0MysKrJCFAjXpPg09wogdyTZ+ J8WL8xh2REG9Fo5ztfAEmbWGtioRoGWT9+ZU48kK1Ddk2bt+x1m7pkdfPK53YA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709314730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0iV4XhewpAluXIcOyyCvnED1jA3pH5iVvL96QRJRItQ=; b=q5Dl5XBV9fkff5+kDoALxAkqZ+phc7LMCQMt4E/ufGQXFWAgMJ7hw8aFyhjr6dA/Nxsh+k u7d4wmjEo4rP5eirUfF9dobUg1Pzb/XzZGYHlj4h6E9jHvcWWgcL723sXBa4DuTv84U1u2 jevasBw6GdjBzlCkgBCW0DrdJ7cEtG8p495Uv/QHw9ZkoF7t2ewFn75SmONZNAkWghB0om c3qEutnSTXmVt81FAh93kzUHbMjsy5InRGu54cLlONpaqIiCTtKZt+HpPN0sgEZo/mqyhq wEiYyUTIlJCpJ2Uch0imbCubge0ebRaY3l2z7jvQagWT/PWe8phZUbk1wokvJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tmb160vJzzbgd; Fri, 1 Mar 2024 17:38: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 421HcoE0079766; Fri, 1 Mar 2024 17:38:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 421Hco4N079763; Fri, 1 Mar 2024 17:38:50 GMT (envelope-from git) Date: Fri, 1 Mar 2024 17:38:50 GMT Message-Id: <202403011738.421Hco4N079763@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Stefan =?utf-8?Q?E=C3=9Fer?= Subject: git: b307cfe419ff - main - mqueuefs: fix statfs report to not signal file system full List-Id: Commit messages for the main 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: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b307cfe419ff886ad1bbe15419c5f5604657df7b Auto-Submitted: auto-generated The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=b307cfe419ff886ad1bbe15419c5f5604657df7b commit b307cfe419ff886ad1bbe15419c5f5604657df7b Author: Stefan Eßer AuthorDate: 2024-03-01 17:31:15 +0000 Commit: Stefan Eßer CommitDate: 2024-03-01 17:31:15 +0000 mqueuefs: fix statfs report to not signal file system full Synthetic file systems that do not actually allocate file system blocks or inodes should report that they have space available and that they provide 0 inodes, in order to prevent capacity monitoring tools from warning about resource exhaustion. This has been fixed in all other synthetic file systems in base in commit 88a795e80c0, but this file was overlooked since its name does not indicate that it also provides a file system. MFC after: 1 month --- sys/kern/uipc_mqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index f7695945fcc4..6400f0bce9f9 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -604,9 +604,9 @@ mqfs_mount(struct mount *mp) sbp->f_bsize = PAGE_SIZE; sbp->f_iosize = PAGE_SIZE; sbp->f_blocks = 1; - sbp->f_bfree = 0; + sbp->f_bfree = 1; sbp->f_bavail = 0; - sbp->f_files = 1; + sbp->f_files = 0; sbp->f_ffree = 0; return (0); } From nobody Fri Mar 1 18:37:53 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TmcKF3tJFz5CrL0; Fri, 1 Mar 2024 18:37: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 4TmcKF3Gsrz4dtg; Fri, 1 Mar 2024 18:37:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709318273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TGlP1tHHi+w5N4PZ+vE2MBIerW7/m9PhMDI27vgDtAc=; b=miOVeQZ9zpgCplkwQNiCCv2D0+WMdVL5q9HWaOusCQoh0dUgo1ub3hQhX5jHFzP7wx5gR/ wGpxVgJqGuSMulYf2IDlV/LmZO8qSEVAtar7yOS/foix9u9DbdcCHdwSRTwitRRiLyR6bG 1ze0GFyVsu3LtUyStIyA14ARaaDkTV3hm/8sHbtzYFWuORbkjn0lfmBvpGgT1XEwc9g+g8 2v6FQfxhGlFPkv0vGPAa4++ESpwoydFl+sSgxenMYl0KJ7M+9lO8GoB5BK0tiUCeVhXajQ elfgGSFIljJvToDk1cPE9dil+zJJrb9evDBAptp2CsjH7GaKCQZQV3P9mJ4tow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709318273; a=rsa-sha256; cv=none; b=RFoh6jeF6Bz1CiQiRFAiBrC0RHUmLKS/zi47jELGgC8lp2dfo/VY9mX4PCUvEXT+ns0nHa N9UjRu7kV3qJe8uCca0YxSaU1QbsZeM10v3xptkBDMnMfKJv9646+h3eHgF2nbmsGRkORv gx0Ew4VhKrnZdOHmoStSH7yO+opIzaWgmUbrRkH2GjnNxlIp+Jj/gbOM6G8S669FM8dAWY Fv6EpwnkqAmG7O6RbqiKzE/LIb/H8qlBlrOWRntlC+GxeQ18cW8t/Wzx7GRjy6qzMIXcdp r5tDfn0h+oG2mT0DF9pdPbnqsdU842tzbRRToOVlTDnd599IEZ2CTc54/UcTdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709318273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TGlP1tHHi+w5N4PZ+vE2MBIerW7/m9PhMDI27vgDtAc=; b=g1wvuKDS6rOhyBEypkYYl/iKQT4UKh8ZKSAugox0Fwajc3XBe4oG+B1gsfu87g9Im1cF08 6w1Z1vt0xKHgzQH+PIsUY0/Nnd5aE0v1LHZ4DPLEwfDJwh5t6ImQHoqR9mVmE6OOifYtR4 DY7DoDb7Bf5q7/niiI+Rr/rtNOVmenj/7RR5SYfmGUKJHJppLYbVxcLuaNkIZ2A4UM6TVl ycp0//GdAG/QsZTTRKciq8QcnkRqS10dDtOuFObCVvZvmMtMTu03aIVPvurBnjhwsIb3TU 50HMB2qtR6acFTHE+OgLVxold5r4jehJPG0I//7u+GVXowQrD23NXWN8yrxKdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TmcKF2ptqzdHf; Fri, 1 Mar 2024 18:37: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 421IbrpG080958; Fri, 1 Mar 2024 18:37:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 421IbrT0080955; Fri, 1 Mar 2024 18:37:53 GMT (envelope-from git) Date: Fri, 1 Mar 2024 18:37:53 GMT Message-Id: <202403011837.421IbrT0080955@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: c6a6ec85a703 - main - arm64: Fix typo in pagetable_l0_ttbr0_bootstrap symbol name List-Id: Commit messages for the main 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: c6a6ec85a70314b8270e25a06e77e2e7c95c7055 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c6a6ec85a70314b8270e25a06e77e2e7c95c7055 commit c6a6ec85a70314b8270e25a06e77e2e7c95c7055 Author: Alfredo Mazzinghi AuthorDate: 2024-03-01 18:32:43 +0000 Commit: John Baldwin CommitDate: 2024-03-01 18:37:18 +0000 arm64: Fix typo in pagetable_l0_ttbr0_bootstrap symbol name Obtained from: CheriBSD --- sys/arm64/arm64/locore.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index 638c4a542891..6589d3e35a3a 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -211,8 +211,8 @@ ENTRY(mpentry) adrp x24, pagetable_l0_ttbr1 add x24, x24, :lo12:pagetable_l0_ttbr1 /* Load the identity page table */ - adrp x27, pagetable_l0_ttbr0_boostrap - add x27, x27, :lo12:pagetable_l0_ttbr0_boostrap + adrp x27, pagetable_l0_ttbr0_bootstrap + add x27, x27, :lo12:pagetable_l0_ttbr0_bootstrap /* Enable the mmu */ bl start_mmu @@ -916,7 +916,7 @@ pagetable_l2_ttbr0_bootstrap: .space PAGE_SIZE pagetable_l1_ttbr0_bootstrap: .space PAGE_SIZE -pagetable_l0_ttbr0_boostrap: +pagetable_l0_ttbr0_bootstrap: .space PAGE_SIZE pagetable_l0_ttbr0: .space PAGE_SIZE From nobody Fri Mar 1 20:23:21 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tmffx3TrGz5D0TV; Fri, 1 Mar 2024 20:23:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tmffx2cmdz4s2d; Fri, 1 Mar 2024 20:23:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709324601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ggrk7ZX9gu7AB6wAg3eTITeyg8gETAFsSnlGRvXSro4=; b=DPpx06NAShW5bQq5g9QBCp+QwvVvKy1jv4c8HUxw5yt0gMJQNruZKHPLstQwcXQxDa+Wgx Kl0ekBlN4zqi+98a8mgliYMVu8AktvwtTj5HxdewM/gM3xN04f8ptgD42PY896BmUinsjc yxlmS0W7PjNZvMrhSYmF2FsxSgw4+oo8Xr2KL2Wg3CKeruyNEXgp6P2R+atwT7M/yQPnxL VnMqMNeAdo6Sw4yH5Sx0X2jiSl/WC0MSWvA0mkvLxdWUOl8rbJH4X2d8woK07Xp53v6fLA doNEftNCiCBFqMh1jgHtcT4xtLxZZ18qw3tdjfpycjBl6+yLUrxnByhjXHgovg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709324601; a=rsa-sha256; cv=none; b=UVMgyo1I9vIQNS8osHG6ITbEJRA5z+e0IBtNqt2MlPz5olknJ2SEyE4DnfkvqAcIathLfv Ih7U3R+Mc6G/5Wa1a/oPhTC9oTuwcsMm8Q4kSd830XRqjwiucKMlugOWfyKlJm8gl2oq2q Hfy7Ozkt/tgGr2xKfhGuv59TkV6EF5X4BuVGgvbNR6B9BNVWQEosmWhmZQORdt1efaNHiJ nV0OWRZ2xk9+qk4mrY5yH8iS7yMnWegjTizSmJZu8sUg4L6OePdJW+A5yxoug1MhuTnlHM LaETIiNxnjv8FTqq3ZG27IdbjT69MeojYBUsjBImxXJ3ckTu/T/CS9vC75uTgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709324601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ggrk7ZX9gu7AB6wAg3eTITeyg8gETAFsSnlGRvXSro4=; b=V3pZtZGuZLuOmDzFGqD4Z5LlOTsmOgtwT+p3Lyqg6L+SZ/6YYM5TZe9ed8u7cKDngb+mGr 84eynLeDuKNzamuJK/OmdLbf0Pt7pVOJRIbyqvcJRRa03b4pjkW6UlmAlbNzrKlRGRFQiN JywNj8AMAB/Um50b0OkbDAnJ90MLtBE4fXO7r+iYPihSDL4pzCd4gRUmRB9abIUsyLBBlM EE3K19bISFxI+xyK/3wp4W3USC1Vw3+wA8OlD+sKd1Z3V/+U94r50QBb+4UMnFdSwlLATw QC+1C1uDmDAx1+E0JPbDX2qZ2s3RkODMH+OL23f5POX600enMiqUd9KQQCAgrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tmffx2D8mzgsC; Fri, 1 Mar 2024 20:23:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 421KNLbk066167; Fri, 1 Mar 2024 20:23:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 421KNLia066164; Fri, 1 Mar 2024 20:23:21 GMT (envelope-from git) Date: Fri, 1 Mar 2024 20:23:21 GMT Message-Id: <202403012023.421KNLia066164@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Randall Stewart Subject: git: 638b5ae1c785 - main - HTPS has actually three states not two so the macro needs to account for that. List-Id: Commit messages for the main 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: rrs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 638b5ae1c7858373344bc7b9dcb5a1e7fab80bd9 Auto-Submitted: auto-generated The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=638b5ae1c7858373344bc7b9dcb5a1e7fab80bd9 commit 638b5ae1c7858373344bc7b9dcb5a1e7fab80bd9 Author: Randall Stewart AuthorDate: 2024-03-01 20:21:15 +0000 Commit: Randall Stewart CommitDate: 2024-03-01 20:21:15 +0000 HTPS has actually three states not two so the macro needs to account for that. Ok lets fix up the tcp_in_hpts() so that it also says yes if you are in the race state moving and you are scheduled to be put in. This also requires changing the MPASS to be the old version non inline function of tcp_in_hpts(). This change also adds a new inline macro so that a uint64_t timestamp can be obtained by a transport (aka Rack will use this). Reviewed by: glebius, tuexen Sponsored by: Netflix Inc. Differential Revision: https://reviews.freebsd.org/D44157 --- sys/netinet/tcp_hpts.c | 2 +- sys/netinet/tcp_hpts.h | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index 9d192b17c41a..8c4d2d41a3eb 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -820,7 +820,7 @@ tcp_hpts_insert_diag(struct tcpcb *tp, uint32_t slot, int32_t line, struct hpts_ INP_WLOCK_ASSERT(tptoinpcb(tp)); MPASS(!(tptoinpcb(tp)->inp_flags & INP_DROPPED)); - MPASS(!tcp_in_hpts(tp)); + MPASS(!(tp->t_in_hpts == IHPTS_ONQUEUE)); /* * We now return the next-slot the hpts will be on, beyond its diff --git a/sys/netinet/tcp_hpts.h b/sys/netinet/tcp_hpts.h index 0c5cfac28a6c..b097a2b98db9 100644 --- a/sys/netinet/tcp_hpts.h +++ b/sys/netinet/tcp_hpts.h @@ -115,7 +115,9 @@ void tcp_hpts_remove(struct tcpcb *); static inline bool tcp_in_hpts(struct tcpcb *tp) { - return (tp->t_in_hpts == IHPTS_ONQUEUE); + return ((tp->t_in_hpts == IHPTS_ONQUEUE) || + ((tp->t_in_hpts == IHPTS_MOVING) && + (tp->t_hpts_slot != -1))); } /* @@ -208,6 +210,17 @@ tcp_gethptstick(struct timeval *sv) return (tcp_tv_to_hptstick(sv)); } +static __inline uint64_t +tcp_get_u64_usecs(struct timeval *tv) +{ + struct timeval tvd; + + if (tv == NULL) + tv = &tvd; + microuptime(tv); + return (tcp_tv_to_lusectick(tv)); +} + static __inline uint32_t tcp_get_usecs(struct timeval *tv) { From nobody Fri Mar 1 21:36:09 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TmhH2620tz5D5qT; Fri, 1 Mar 2024 21:36:14 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4TmhH14kTvz43XZ; Fri, 1 Mar 2024 21:36:13 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of steffen@sdaoden.eu designates 217.144.132.164 as permitted sender) smtp.mailfrom=steffen@sdaoden.eu Date: Fri, 01 Mar 2024 22:36:09 +0100 Author: Steffen Nurpmeso From: Steffen Nurpmeso To: Shawn Webb Cc: Emmanuel Vadot , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 6e69612d5df1 - main - pam: Add pam_xdg module Message-ID: <20240301213609.rX8VcT8Z@steffen%sdaoden.eu> In-Reply-To: References: Mail-Followup-To: Shawn Webb , Emmanuel Vadot , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org User-Agent: s-nail v14.9.24-601-g936bf2d4d8 OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.28 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.975]; R_SPF_ALLOW(-0.20)[+a]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; ASN(0.00)[asn:15987, ipnet:217.144.128.0/20, country:DE]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; DMARC_NA(0.00)[sdaoden.eu]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4TmhH14kTvz43XZ List-Id: Commit messages for the main 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 Shawn Webb wrote in : ... |A defensive programming technique commonly implemented in functions |that recurse is to place a limit on how many times we recurse. | |HardenedBSD now places an arbitrarily picked limit of 1000 recursions: |https://git.hardenedbsd.org/hardenedbsd/HardenedBSD/-/commit/148478d5743\ |a8dd4362fd31dca4371618716d0a8 | |The limit can be changed at compile-time by defining |REMOVEDIR_MAX_RECUR to a different integer value. For context, the thing is around the time when i developed pam_xdg (ie: the real one!) systemd had a CVE in exactly its rm_rf code. I then downloaded the file and found that on Linux a graceful rm(1) -rf is too heavy for this simple module, and in particular subject to bitrot, and so i used system(3) (possibly for the first time ever in C -- not perl -- code; i have a SMP::Child myself). (Like that it can possibly last unchanged, now that i tweaked one string concatenation that was impossible initially.) /* SPDX-License-Identifier: LGPL-2.1-or-later */ #include #include #include #include #include #include "alloc-util.h" #include "btrfs-util.h" #include "cgroup-util.h" #include "dirent-util.h" #include "fd-util.h" #include "log.h" #include "macro.h" #include "mountpoint-util.h" #include "path-util.h" #include "rm-rf.h" #include "stat-util.h" #include "string-util.h" /* We treat tmpfs/ramfs + cgroupfs as non-physical file systems. cgroupfs is similar to tmpfs in a way * after all: we can create arbitrary directory hierarchies in it, and hence can also use rm_rf() on it * to remove those again. */ static bool is_physical_fs(const struct statfs *sfs) { return !is_temporary_fs(sfs) && !is_cgroup_fs(sfs); } static int patch_dirfd_mode( int dfd, mode_t *ret_old_mode) { struct stat st; assert(dfd >= 0); assert(ret_old_mode); if (fstat(dfd, &st) < 0) return -errno; if (!S_ISDIR(st.st_mode)) return -ENOTDIR; if (FLAGS_SET(st.st_mode, 0700)) /* Already set? */ return -EACCES; /* original error */ if (st.st_uid != geteuid()) /* this only works if the UID matches ours */ return -EACCES; if (fchmod(dfd, (st.st_mode | 0700) & 07777) < 0) return -errno; *ret_old_mode = st.st_mode; return 0; } int unlinkat_harder(int dfd, const char *filename, int unlink_flags, RemoveFlags remove_flags) { mode_t old_mode; int r; /* Like unlinkat(), but tries harder: if we get EACCESS we'll try to set the r/w/x bits on the * directory. This is useful if we run unprivileged and have some files where the w bit is * missing. */ if (unlinkat(dfd, filename, unlink_flags) >= 0) return 0; if (errno != EACCES || !FLAGS_SET(remove_flags, REMOVE_CHMOD)) return -errno; r = patch_dirfd_mode(dfd, &old_mode); if (r < 0) return r; if (unlinkat(dfd, filename, unlink_flags) < 0) { r = -errno; /* Try to restore the original access mode if this didn't work */ (void) fchmod(dfd, old_mode); return r; } if (FLAGS_SET(remove_flags, REMOVE_CHMOD_RESTORE) && fchmod(dfd, old_mode) < 0) return -errno; /* If this worked, we won't reset the old mode by default, since we'll need it for other entries too, * and we should destroy the whole thing */ return 0; } int fstatat_harder(int dfd, const char *filename, struct stat *ret, int fstatat_flags, RemoveFlags remove_flags) { mode_t old_mode; int r; /* Like unlink_harder() but does the same for fstatat() */ if (fstatat(dfd, filename, ret, fstatat_flags) >= 0) return 0; if (errno != EACCES || !FLAGS_SET(remove_flags, REMOVE_CHMOD)) return -errno; r = patch_dirfd_mode(dfd, &old_mode); if (r < 0) return r; if (fstatat(dfd, filename, ret, fstatat_flags) < 0) { r = -errno; (void) fchmod(dfd, old_mode); return r; } if (FLAGS_SET(remove_flags, REMOVE_CHMOD_RESTORE) && fchmod(dfd, old_mode) < 0) return -errno; return 0; } static int rm_rf_inner_child( int fd, const char *fname, int is_dir, RemoveFlags flags, const struct stat *root_dev, bool allow_recursion) { struct stat st; int r, q = 0; assert(fd >= 0); assert(fname); if (is_dir < 0 || root_dev || (is_dir > 0 && (root_dev || (flags & REMOVE_SUBVOLUME)))) { r = fstatat_harder(fd, fname, &st, AT_SYMLINK_NOFOLLOW, flags); if (r < 0) return r; is_dir = S_ISDIR(st.st_mode); } if (is_dir) { /* If root_dev is set, remove subdirectories only if device is same */ if (root_dev && st.st_dev != root_dev->st_dev) return 0; /* Stop at mount points */ r = fd_is_mount_point(fd, fname, 0); if (r < 0) return r; if (r > 0) return 0; if ((flags & REMOVE_SUBVOLUME) && btrfs_might_be_subvol(&st)) { /* This could be a subvolume, try to remove it */ r = btrfs_subvol_remove_fd(fd, fname, BTRFS_REMOVE_RECURSIVE|BTRFS_REMOVE_QUOTA); if (r < 0) { if (!IN_SET(r, -ENOTTY, -EINVAL)) return r; /* ENOTTY, then it wasn't a btrfs subvolume, continue below. */ } else /* It was a subvolume, done. */ return 1; } if (!allow_recursion) return -EISDIR; int subdir_fd = openat(fd, fname, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC|O_NOFOLLOW|O_NOATIME); if (subdir_fd < 0) return -errno; /* We pass REMOVE_PHYSICAL here, to avoid doing the fstatfs() to check the file system type * again for each directory */ q = rm_rf_children(subdir_fd, flags | REMOVE_PHYSICAL, root_dev); } else if (flags & REMOVE_ONLY_DIRECTORIES) return 0; r = unlinkat_harder(fd, fname, is_dir ? AT_REMOVEDIR : 0, flags); if (r < 0) return r; if (q < 0) return q; return 1; } typedef struct TodoEntry { DIR *dir; /* A directory that we were operating on. */ char *dirname; /* The filename of that directory itself. */ } TodoEntry; static void free_todo_entries(TodoEntry **todos) { for (TodoEntry *x = *todos; x && x->dir; x++) { closedir(x->dir); free(x->dirname); } freep(todos); } int rm_rf_children( int fd, RemoveFlags flags, const struct stat *root_dev) { _cleanup_(free_todo_entries) TodoEntry *todos = NULL; size_t n_todo = 0; _cleanup_free_ char *dirname = NULL; /* Set when we are recursing and want to delete ourselves */ int ret = 0, r; /* Return the first error we run into, but nevertheless try to go on. * The passed fd is closed in all cases, including on failure. */ for (;;) { /* This loop corresponds to the directory nesting level. */ _cleanup_closedir_ DIR *d = NULL; if (n_todo > 0) { /* We know that we are in recursion here, because n_todo is set. * We need to remove the inner directory we were operating on. */ assert(dirname); r = unlinkat_harder(dirfd(todos[n_todo-1].dir), dirname, AT_REMOVEDIR, flags); if (r < 0 && r != -ENOENT && ret == 0) ret = r; dirname = mfree(dirname); /* And now let's back out one level up */ n_todo --; d = TAKE_PTR(todos[n_todo].dir); dirname = TAKE_PTR(todos[n_todo].dirname); assert(d); fd = dirfd(d); /* Retrieve the file descriptor from the DIR object */ assert(fd >= 0); } else { next_fd: assert(fd >= 0); d = fdopendir(fd); if (!d) { safe_close(fd); return -errno; } fd = dirfd(d); /* We donated the fd to fdopendir(). Let's make sure we sure we have * the right descriptor even if it were to internally invalidate the * one we passed. */ if (!(flags & REMOVE_PHYSICAL)) { struct statfs sfs; if (fstatfs(fd, &sfs) < 0) return -errno; if (is_physical_fs(&sfs)) { /* We refuse to clean physical file systems with this call, unless * explicitly requested. This is extra paranoia just to be sure we * never ever remove non-state data. */ _cleanup_free_ char *path = NULL; (void) fd_get_path(fd, &path); return log_error_errno(SYNTHETIC_ERRNO(EPERM), "Attempted to remove disk file system under \"%s\", and we can't allow that.", strna(path)); } } } FOREACH_DIRENT_ALL(de, d, return -errno) { int is_dir; if (dot_or_dot_dot(de->d_name)) continue; is_dir = de->d_type == DT_UNKNOWN ? -1 : de->d_type == DT_DIR; r = rm_rf_inner_child(fd, de->d_name, is_dir, flags, root_dev, false); if (r == -EISDIR) { /* Push the current working state onto the todo list */ if (!GREEDY_REALLOC0(todos, n_todo + 2)) return log_oom(); _cleanup_free_ char *newdirname = strdup(de->d_name); if (!newdirname) return log_oom(); int newfd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC|O_NOFOLLOW|O_NOATIME); if (newfd >= 0) { todos[n_todo++] = (TodoEntry) { TAKE_PTR(d), TAKE_PTR(dirname) }; fd = newfd; dirname = TAKE_PTR(newdirname); goto next_fd; } else if (errno != -ENOENT && ret == 0) ret = -errno; } else if (r < 0 && r != -ENOENT && ret == 0) ret = r; } if (FLAGS_SET(flags, REMOVE_SYNCFS) && syncfs(fd) < 0 && ret >= 0) ret = -errno; if (n_todo == 0) break; } return ret; } int rm_rf(const char *path, RemoveFlags flags) { int fd, r, q = 0; assert(path); /* For now, don't support dropping subvols when also only dropping directories, since we can't do * this race-freely. */ if (FLAGS_SET(flags, REMOVE_ONLY_DIRECTORIES|REMOVE_SUBVOLUME)) return -EINVAL; /* We refuse to clean the root file system with this call. This is extra paranoia to never cause a * really seriously broken system. */ if (path_equal_or_files_same(path, "/", AT_SYMLINK_NOFOLLOW)) return log_error_errno(SYNTHETIC_ERRNO(EPERM), "Attempted to remove entire root file system (\"%s\"), and we can't allow that.", path); if (FLAGS_SET(flags, REMOVE_SUBVOLUME | REMOVE_ROOT | REMOVE_PHYSICAL)) { /* Try to remove as subvolume first */ r = btrfs_subvol_remove(path, BTRFS_REMOVE_RECURSIVE|BTRFS_REMOVE_QUOTA); if (r >= 0) return r; if (FLAGS_SET(flags, REMOVE_MISSING_OK) && r == -ENOENT) return 0; if (!IN_SET(r, -ENOTTY, -EINVAL, -ENOTDIR)) return r; /* Not btrfs or not a subvolume */ } fd = open(path, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC|O_NOFOLLOW|O_NOATIME); if (fd >= 0) { /* We have a dir */ r = rm_rf_children(fd, flags, NULL); if (FLAGS_SET(flags, REMOVE_ROOT)) q = RET_NERRNO(rmdir(path)); } else { if (FLAGS_SET(flags, REMOVE_MISSING_OK) && errno == ENOENT) return 0; if (!IN_SET(errno, ENOTDIR, ELOOP)) return -errno; if (FLAGS_SET(flags, REMOVE_ONLY_DIRECTORIES) || !FLAGS_SET(flags, REMOVE_ROOT)) return 0; if (!FLAGS_SET(flags, REMOVE_PHYSICAL)) { struct statfs s; if (statfs(path, &s) < 0) return -errno; if (is_physical_fs(&s)) return log_error_errno(SYNTHETIC_ERRNO(EPERM), "Attempted to remove files from a disk file system under \"%s\", refusing.", path); } r = 0; q = RET_NERRNO(unlink(path)); } if (r < 0) return r; if (q < 0 && (q != -ENOENT || !FLAGS_SET(flags, REMOVE_MISSING_OK))) return q; return 0; } int rm_rf_child(int fd, const char *name, RemoveFlags flags) { /* Removes one specific child of the specified directory */ if (fd < 0) return -EBADF; if (!filename_is_valid(name)) return -EINVAL; if ((flags & (REMOVE_ROOT|REMOVE_MISSING_OK)) != 0) /* Doesn't really make sense here, we are not supposed to remove 'fd' anyway */ return -EINVAL; if (FLAGS_SET(flags, REMOVE_ONLY_DIRECTORIES|REMOVE_SUBVOLUME)) return -EINVAL; return rm_rf_inner_child(fd, name, -1, flags, NULL, true); } --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) From nobody Fri Mar 1 22:03:27 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TmhtV2n15z5D80X; Fri, 1 Mar 2024 22:03:30 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4TmhtT5JDJz46q5; Fri, 1 Mar 2024 22:03:29 +0000 (UTC) (envelope-from steffen@sdaoden.eu) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of steffen@sdaoden.eu designates 217.144.132.164 as permitted sender) smtp.mailfrom=steffen@sdaoden.eu Date: Fri, 01 Mar 2024 23:03:27 +0100 Author: Steffen Nurpmeso From: Steffen Nurpmeso To: Shawn Webb Cc: Emmanuel Vadot , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 6e69612d5df1 - main - pam: Add pam_xdg module Message-ID: <20240301220327.oPCy3LrZ@steffen%sdaoden.eu> In-Reply-To: <20240301213609.rX8VcT8Z@steffen%sdaoden.eu> References: <20240301213609.rX8VcT8Z@steffen%sdaoden.eu> Mail-Followup-To: Shawn Webb , Emmanuel Vadot , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org User-Agent: s-nail v14.9.24-601-g936bf2d4d8 OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.19 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_SHORT(-0.89)[-0.891]; R_SPF_ALLOW(-0.20)[+a:c]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; ASN(0.00)[asn:15987, ipnet:217.144.128.0/20, country:DE]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; DMARC_NA(0.00)[sdaoden.eu]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4TmhtT5JDJz46q5 List-Id: Commit messages for the main 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 Steffen Nurpmeso wrote in <20240301213609.rX8VcT8Z@steffen%sdaoden.eu>: |Shawn Webb wrote in | : | ... ||A defensive programming technique commonly implemented in functions ... | |For context, the thing is around the time when i developed pam_xdg |(ie: the real one!) systemd had a CVE in exactly its rm_rf code. I want to remark possibly suboptimal E[MN]FILE handling in the systemd code. *That* was the context of a possibly known comment of mine /* Ie, E[MN]FILE failures, or whatever else */ Thank you. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) From nobody Fri Mar 1 22:19:44 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TmjFD5Tpkz5D94J; Fri, 1 Mar 2024 22:19:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TmjFD4xB7z49sB; Fri, 1 Mar 2024 22:19:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709331584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F6MkYxwNH0AycSs4XrL+jZRER0u8x84gC6S+vqDSnXQ=; b=vFdq87ygxgR6tS/SmbcPV3e/pqmFl45pomRl1u3h3mdNIvksIZ7r79OpHyEb9kSIhQBMcE fNX8ElsC91FKIj+JfiZouBGui03iQ+JMr1qGroqZmet+eiFceh4WpS+BLmBxnXRdz5BnTE 2vNNHF3g2hFuQ1FPICuSAtPx2/jfO7BsrFrZNRWpgMLzrcLZMqONT4JgHoVjOG9zDuMz1Q 5F7LiKfwUR42aErdWvgTPIQ+uUxPajonuP99qODP6CkdIf3/BcOtrdoRqma237i3FuVPUB EE2sQn/xrMP9w30GCp/cY1K7bKDvgeiYIueIIm9D0f726gOO7i+U9zzlx9LJAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709331584; a=rsa-sha256; cv=none; b=o4WUgy02LvnJmVE9Eu8erKgMjPjxAWSZR3lukousTsTeLz+qXW5c84L/hvqcPDHWyz4vZb x5u7xd4lFwwttXcnVZJ9tcq4CR4r1Igav5I27/RxpvZvIcvxaTDx2rpE88YpfjnrNt5i6W dJ4+rHOfQnWHqhdNyV5oRIJ8y6Z21bSaGIvBLdaJvX93rW9uCMzbLiK3Ar+7FiuG0p20TZ fvpd0rDWGdQG7rH7cPG2oqJnh20dW3vRP5KApTWHsKNVEl0J+TX95R69Heri4R6AiMNF3z J8da4oAzTRr+OI5Xj3hXdS7diunOosadLJLWVUjBcBT1AIv3+K3Tw7mGSk5bUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709331584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F6MkYxwNH0AycSs4XrL+jZRER0u8x84gC6S+vqDSnXQ=; b=BskAnCSo44LU3mNc4BFmE2w4rflXeSWnHBEFM39W2B0m1mwpl1KByFTBUNLtqWGMDVolK+ DgCS4L6Uf3zHazLAyer4SLT4sme0iEQlIR1Cq+6mwbx97vNR3U4hbh+fs0bNTX07oSqs/5 igQaD3MR5/ft5PURVyHJ8531iA113hr1mBhx7hzUX1BBXQwgUvTpzwoWiiiKM6B80mPodb 92O9iV6BQdjyZU/k48UDXp8fwM/ve170Z5BNvi5hi7vLYBqvH7WZjUXDfGrCAl3b9d5W8u r3kva7+WHRn8ZAXq0QZIzY1IjJRtlWKXlw4z1MDE9ace02yQbRZeC8U+5QkLYA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TmjFD4QSfzkd1; Fri, 1 Mar 2024 22:19: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 421MJiFh054718; Fri, 1 Mar 2024 22:19:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 421MJiS5054715; Fri, 1 Mar 2024 22:19:44 GMT (envelope-from git) Date: Fri, 1 Mar 2024 22:19:44 GMT Message-Id: <202403012219.421MJiS5054715@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: 7485926e09a0 - main - nvme: Firmware revisions in the firmware slot info logpage are ASCII 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: 7485926e09a08fbfe83a9bc908e7d43aaca4c172 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7485926e09a08fbfe83a9bc908e7d43aaca4c172 commit 7485926e09a08fbfe83a9bc908e7d43aaca4c172 Author: John Baldwin AuthorDate: 2024-03-01 22:18:43 +0000 Commit: John Baldwin CommitDate: 2024-03-01 22:18:43 +0000 nvme: Firmware revisions in the firmware slot info logpage are ASCII strings In particular, don't try to byteswap the values as 64-bit integers and always print a non-empty version as a string. Reviewed by: chuck, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D44121 --- sbin/nvmecontrol/logpage.c | 13 ++----------- sys/dev/nvme/nvme.h | 14 ++------------ sys/dev/nvme/nvme_ctrlr.c | 4 ---- 3 files changed, 4 insertions(+), 27 deletions(-) diff --git a/sbin/nvmecontrol/logpage.c b/sbin/nvmecontrol/logpage.c index 52be71d7ef69..a4004d3fe2ea 100644 --- a/sbin/nvmecontrol/logpage.c +++ b/sbin/nvmecontrol/logpage.c @@ -229,10 +229,6 @@ read_logpage(int fd, uint8_t log_page, uint32_t nsid, uint8_t lsp, nvme_health_information_page_swapbytes( (struct nvme_health_information_page *)payload); break; - case NVME_LOG_FIRMWARE_SLOT: - nvme_firmware_page_swapbytes( - (struct nvme_firmware_page *)payload); - break; case NVME_LOG_CHANGED_NAMESPACE: nvme_ns_list_swapbytes((struct nvme_ns_list *)payload); break; @@ -425,15 +421,10 @@ print_log_firmware(const struct nvme_controller_data *cdata, void *buf, uint32_t else status = "Inactive"; - if (fw->revision[i] == 0LLU) + if (fw->revision[i][0] == '\0') printf("Empty\n"); else - if (isprint(*(char *)&fw->revision[i])) - printf("[%s] %.8s\n", status, - (char *)&fw->revision[i]); - else - printf("[%s] %016jx\n", status, - fw->revision[i]); + printf("[%s] %.8s\n", status, fw->revision[i]); } } diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index 004fa1e9d1ca..137aff792868 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -1465,7 +1465,8 @@ _Static_assert(sizeof(struct nvme_health_information_page) == 512, "bad size for struct nvme_firmware_page { uint8_t afi; uint8_t reserved[7]; - uint64_t revision[7]; /* revisions for 7 slots */ + /* revisions for 7 slots */ + uint8_t revision[7][NVME_FIRMWARE_REVISION_LENGTH]; uint8_t reserved2[448]; } __packed __aligned(4); @@ -2006,17 +2007,6 @@ void nvme_health_information_page_swapbytes( #endif } -static inline -void nvme_firmware_page_swapbytes(struct nvme_firmware_page *s __unused) -{ -#if _BYTE_ORDER != _LITTLE_ENDIAN - int i; - - for (i = 0; i < 7; i++) - s->revision[i] = le64toh(s->revision[i]); -#endif -} - static inline void nvme_ns_list_swapbytes(struct nvme_ns_list *s __unused) { diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 3b3b9bbe6998..b29512455fda 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -682,10 +682,6 @@ nvme_ctrlr_async_event_log_page_cb(void *arg, const struct nvme_completion *cpl) nvme_health_information_page_swapbytes( (struct nvme_health_information_page *)aer->log_page_buffer); break; - case NVME_LOG_FIRMWARE_SLOT: - nvme_firmware_page_swapbytes( - (struct nvme_firmware_page *)aer->log_page_buffer); - break; case NVME_LOG_CHANGED_NAMESPACE: nvme_ns_list_swapbytes( (struct nvme_ns_list *)aer->log_page_buffer); From nobody Fri Mar 1 22:20:30 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TmjG64XYfz5D8qd; Fri, 1 Mar 2024 22:20:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TmjG643CVz4CBJ; Fri, 1 Mar 2024 22:20:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709331630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bmWr6JpvWluQNWwLGe7OAQ02YVmluOEb3EQP0GCTCSk=; b=f/z9FgaRK7rWkWNDayCP2WucxMfLdNeRtxkb4Ervv2Le+tlBKH+VEgQSgY1EwhWqdlExCh 8dzNShnyYtOKqkjC0N8t2kE5mHAytlSb5FBQLvfYztTCZYOAnbxZQTK47gxdgHDBQ9m3/b YRWxnn4vdOB1K3yOSlXy+J3GoW9aeGLME2B7Peg5HBYkLrLDaouZweip46G1iCyic/L3pX OeBFgYFljEfAoIjAR4PIdi0UvyNcArThf9CeUyAPnkrheL8TWPedvFSanqssu8u4vu4ZcF E26Cp8vbc1IqRDFN646mqO3fY7RV6g3QzYTeRoT2aFsLsmB17s+VRZZbBqTltg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709331630; a=rsa-sha256; cv=none; b=DmLF26ffrZ9sWJ+T77ViU18dALYKFArYYSE7z5HQQbk4dB4DQjAaXZAXgcw8BVkJKiLAOE A5l2ojFmiWZCUxBZpRY2WOwvMlLOtRdQt9AqPDNOvZL7nkVkKYjYSrvC0t6Wct4zJuUWwv +FRz02IKfMiOCYagdWzS4PdxRPZF10pTE2mOqJA9Pj61S3XkxDohQ5kQh3wGrhQ7/ZGDns t0OURKWMUb3qcKPgLO7v9vmp8c2pDBhWJAD/WRGYoMSUHuNrMKlYPNHh6sbiqGuTUl1Biz jK2/9RhaJvN2rz8+1BOKNq0JRJsoW48auirsgbgFEpV/708UlCA/quOJDwnQzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709331630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bmWr6JpvWluQNWwLGe7OAQ02YVmluOEb3EQP0GCTCSk=; b=md39ObQ7yOhxMNkQbigF99HuKf1g63kNLs6SgL0okuB+jbxBaUSx4wP5yRmOpSahSlUCHE RSUo+uzfBNxy56O7d422KkHen7QIjyas1aOjgrRri6wdeM9fxLIiZUYujqKdmT6ASZ715X 7G7FXia+qfDllc4t4OFRA1JQ9WDruqxoW7+zs5fTqaz1a9igYQoB51gITEpfhSYauFrBhL J0agW/MvD3I1SiE/AhmcJ1Yne9HFn516kMvD2Nydm2dEw/jaJpvoS6UPJnxZR9fP7GTqjb VhNZe1UjTlD0Ys2sJp+Z6E0Yeq/b5P/g5zXUPyJd5Y+bTNxSnmEco73ayK2xAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TmjG63fNMzkbD; Fri, 1 Mar 2024 22:20:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 421MKUtq063457; Fri, 1 Mar 2024 22:20:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 421MKUUZ063454; Fri, 1 Mar 2024 22:20:30 GMT (envelope-from git) Date: Fri, 1 Mar 2024 22:20:30 GMT Message-Id: <202403012220.421MKUUZ063454@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: b28670018dbc - main - pci_host_generic: Enumerate resource ranges under bootverbose List-Id: Commit messages for the main 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: b28670018dbcc7d6ebc0d05584189d6d04aa079f Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b28670018dbcc7d6ebc0d05584189d6d04aa079f commit b28670018dbcc7d6ebc0d05584189d6d04aa079f Author: John Baldwin AuthorDate: 2024-03-01 22:20:10 +0000 Commit: John Baldwin CommitDate: 2024-03-01 22:20:10 +0000 pci_host_generic: Enumerate resource ranges under bootverbose Previously ranges were only enumerated for the FDT attachment but not ACPI. This commit moves the enumeration to the shared attach routine so it is done for both. While here, don't list empty ranges but do include the resource type for each range. Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D44132 --- sys/dev/pci/pci_host_generic.c | 8 ++++++++ sys/dev/pci/pci_host_generic_fdt.c | 11 ----------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/sys/dev/pci/pci_host_generic.c b/sys/dev/pci/pci_host_generic.c index 520462972a66..67b329b58685 100644 --- a/sys/dev/pci/pci_host_generic.c +++ b/sys/dev/pci/pci_host_generic.c @@ -83,6 +83,7 @@ pci_host_generic_core_attach(device_t dev) uint64_t phys_base; uint64_t pci_base; uint64_t size; + const char *range_descr; char buf[64]; int domain, error; int flags, rid, tuple, type; @@ -179,18 +180,21 @@ pci_host_generic_core_attach(device_t dev) switch (FLAG_TYPE(sc->ranges[tuple].flags)) { case FLAG_TYPE_PMEM: sc->has_pmem = true; + range_descr = "prefetch"; flags = RF_PREFETCHABLE; type = SYS_RES_MEMORY; error = rman_manage_region(&sc->pmem_rman, pci_base, pci_base + size - 1); break; case FLAG_TYPE_MEM: + range_descr = "memory"; flags = 0; type = SYS_RES_MEMORY; error = rman_manage_region(&sc->mem_rman, pci_base, pci_base + size - 1); break; case FLAG_TYPE_IO: + range_descr = "I/O port"; flags = 0; type = SYS_RES_IOPORT; error = rman_manage_region(&sc->io_rman, @@ -219,6 +223,10 @@ pci_host_generic_core_attach(device_t dev) error = ENXIO; goto err_rman_manage; } + if (bootverbose) + device_printf(dev, + "PCI addr: 0x%jx, CPU addr: 0x%jx, Size: 0x%jx, Type: %s\n", + pci_base, phys_base, size, range_descr); } return (0); diff --git a/sys/dev/pci/pci_host_generic_fdt.c b/sys/dev/pci/pci_host_generic_fdt.c index bcee6057ff3c..854ec0be8dfa 100644 --- a/sys/dev/pci/pci_host_generic_fdt.c +++ b/sys/dev/pci/pci_host_generic_fdt.c @@ -183,7 +183,6 @@ parse_pci_mem_ranges(device_t dev, struct generic_pcie_core_softc *sc) int nbase_ranges; phandle_t node; int i, j, k; - int tuple; node = ofw_bus_get_node(dev); @@ -239,16 +238,6 @@ parse_pci_mem_ranges(device_t dev, struct generic_pcie_core_softc *sc) sc->ranges[i].size = 0; } - if (bootverbose) { - for (tuple = 0; tuple < MAX_RANGES_TUPLES; tuple++) { - device_printf(dev, - "\tPCI addr: 0x%jx, CPU addr: 0x%jx, Size: 0x%jx\n", - sc->ranges[tuple].pci_base, - sc->ranges[tuple].phys_base, - sc->ranges[tuple].size); - } - } - free(base_ranges, M_DEVBUF); return (0); } From nobody Fri Mar 1 22:22:49 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TmjJn48hfz5D9Pm; Fri, 1 Mar 2024 22:22: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 4TmjJn3Kskz4D2L; Fri, 1 Mar 2024 22:22:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709331769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+X+NTTokaBe7ivwd5TrWN9glCz0zCI/k7MuqgyleHws=; b=FUA1QGM5zW2C/H3bcvM9z01hU01gHgbx3qz+hSa4IQeBRRwm7387DnveGJJ6YeaNuF6CwY ET16Gmzo/2e6+TxXTm18Y7ud065zjT6TFePQpjYjMnEglSiTBw2YlZiLO4NnYpA+spfAJM U/cPvC0it+pLtyIPNd3/oxr9Nm6BskO4kkMr0sRKJVkK1DGBSjsQOgYhnLDB8u+2CjYKZq 2021HiBaE0ZMaZr4mJTAbwx7qvvbIUmJusLvbXcvJ+OJvvk+tTik3c8xRTW/hSGU6saUow HxgKasRnQAnaGRVpynrX4hVwEXCHOH6qWyDHepsBtpTFPHm4/zHaocHqAM4UNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709331769; a=rsa-sha256; cv=none; b=AG62dnu6DvsE3jhEcAurAYhUAq00+BdzSen2BU1g724DcjTIy1n3lNlR0XIIa5VIZhFM/h Xt5AW5BV9NhTbg2GeDTrXzIu7MalRhGsrywE4VrvyPHzCumrp4s9SL8KfzfX3aCHNkmQkU p42cO3K3Ah8UtCfED0u/COkHbM5dODl3ul74B65WCgl7dGywQt5VqAj6ygeVGFRIDK040L QqnRsCgLcvPI4p9qZg0AlF7nuoVm9rbc2sC3N7tyOr3pKYPwOpocxWbBf2U9FSnAgjfVbT gg53UvbRAAwwhaxhAFIrg5C4esPXsiG61J2XOTJbrOQrbNNFp9qlgqYDkMX1UQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709331769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+X+NTTokaBe7ivwd5TrWN9glCz0zCI/k7MuqgyleHws=; b=s5/YnZApMdrhBSroBrl/F5DbbDh8nVKvfC4rChlts/WE8E7OxwP6KlCFPHE81eXPbO5h8/ gkvD1xygh3qqSNzO7VC3GxGSv8kA4Kse5JnU/s4D59xSb686SWdTbYAMpc4OIU1xHCu7Nz g3Ljp2DaZTh3tcnXp66Yq2k6+COllLYNOnz+ZVnr0KfxIolaGeXqGNs+v4mk6h0d5C/RaN MjeOCZDbmtGeJglWa1dJSOJY747sBe/dGKkcSCDbe4U5aKElOOaIqbcYNhPjo8lh1KX6/2 Ht7hs5SN/2bNCpEHiejU8zCsDSLMd3vJydVsPXaIoGATi69MBfl4PROQg7yc0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TmjJn2rmZzkqn; Fri, 1 Mar 2024 22:22: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 421MMn1Y071185; Fri, 1 Mar 2024 22:22:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 421MMneo071182; Fri, 1 Mar 2024 22:22:49 GMT (envelope-from git) Date: Fri, 1 Mar 2024 22:22:49 GMT Message-Id: <202403012222.421MMneo071182@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: 03ee09148950 - main - hier.7: various 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 03ee09148950c9ea99987bfee8a769473079745b Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=03ee09148950c9ea99987bfee8a769473079745b commit 03ee09148950c9ea99987bfee8a769473079745b Author: Alexander Ziaee AuthorDate: 2024-02-28 05:16:35 +0000 Commit: Warner Losh CommitDate: 2024-03-01 22:22:36 +0000 hier.7: various improvements First batch of word smithing: /boot, /dev and /etc. Improved wording and a few missing files added, though /dev is by no means complete. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/831 --- share/man/man7/hier.7 | 213 ++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 188 insertions(+), 25 deletions(-) diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 index 0eeaa7beb6d1..dc5a8fba7d7a 100644 --- a/share/man/man7/hier.7 +++ b/share/man/man7/hier.7 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. .\" @@ -25,27 +28,35 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 6, 2024 +.Dd February 27, 2024 .Dt HIER 7 .Os .Sh NAME .Nm hier -.Nd layout of file systems -.Sh SYNOPSIS -An overview of the file system hierarchy. +.Nd layout of +.Fx +file system hierarchy .Sh DESCRIPTION .Bl -tag -width "/libexec/" .It Pa / -root directory +root directory of the file system +.It Pa /COPYRIGHT +.Fx +copyright information .It Pa /bin/ -user utilities that are fundamental to single-user and multi-user modes +user utilities fundamental to both single and multi-user modes .It Pa /boot/ -programs and configuration files used during bootstrap of the operating system +programs and configurations used during +.Fx +bootstrap .Pp -.Bl -tag -width "nvmecontrol/" -compact +.Bl -tag -width "loader.conf.d/" -compact .It Pa defaults/ default bootstrap configuration files; see .Xr loader.conf 5 +.It Pa device.hints +kernel variables for controlling drivers; see +.Xr device.hints 5 .It Pa dtb/ compiled flattened device tree (FDT) files; see .Xr fdt 4 @@ -61,71 +72,212 @@ setting in .El .Pp .It Pa efi/ -mount point for the EFI System Partition (ESP) on UEFI systems +mount point for EFI System Partition (ESP) on UEFI systems .It Pa firmware/ -loadable kernel modules containing binary firmware, for hardware to which -firmware must be downloaded +loadable binary firmware kernel modules +.It Pa fonts/ +binary bitmap console fonts; see +.Xr loader.conf 5 +and +.Xr vtfontcvt 8 +.It Pa images/ +beastie boot menu images; see +.Xr loader_lua 8 .It Pa kernel/ -pure kernel executable (the operating system loaded into memory at boot time) -and kernel modules +pure kernel executable +.Pq the operating system loaded into memory at boot time +and kernel modules; see +.Xr kldstat 8 +.It Pa kernel.old/ +alternative kernel and modules +.It Pa loader.conf +boot loader configuration; see +.Xr loader.conf 5 +.It Pa loader.conf.d/ +.Xr loader.conf 5 +configuration files +.It Pa lua/ +scripts for kernel bootstrapping final stage; see +.Xr loader_lua 8 .It Pa modules/ -third-party loadable kernel modules, such as those associated with +third-party loadable kernel modules, such as those installed with +.Xr pkg 8 +or from .Xr ports 7 .It Pa zfs/ -.Xr zfs 8 -pool cache files +ZFS +.Xr zpool 8 +cache files .El .It Pa /compat/ files supporting binary compatibility with other operating systems .Pp -.Bl -tag -width "nvmecontrol/" -compact +.Bl -tag -width "loader.conf.d" -compact .It Pa linux/ default location for .Xr linux 4 compatibility run-time .El -.Pp .It Pa /dev/ -the normal mount point for +device special files managed by .Xr devfs 5 .Pp -.Bl -tag -width "nvmecontrol/" -compact +.Bl -tag -width "loader.conf.d" -compact +.It Pa ada0 +first ATA storage device +.It Pa ada0p1 +first partition on ada0 +.It Pa cd0 +first optical drive +.It Pa da0 +first SCSI storage device +.It Pa da0s1 +first partition on da0 +.It Pa dri/ +GPU character device node; see +.Xr drm 7 +.It Pa drm/ +GPU +.Xr drm 7 +special files .It Pa fd/ file descriptor files; see .Xr fd 4 +.It Pa fd0 +first floppy drive +.It Pa mmcsd0 +first SD storage device +.It Pa mmcsd0s1 +first partition on mmcsd0 +.It Pa nda0 +first NVMe storage device attached via +.Xr cam 3 +.It Pa null +infinite loop that accepts anything and contains nothing +.It Pa nvd0 +first NVMe storage device using NVMe namespaces +.It Pa pts/ +pseduo-terminals +.It Pa random +source of weak randomness; see +.Xr random 4 +.It Pa sa0 +first tape drive +.It Pa usb/ +USB busses .El +.It Pa /entropy +provides initial state to RNG; see +.Xr save-entropy 8 .It Pa /etc/ -system configuration files and scripts +system wide configuration files and scripts .Pp -.Bl -tag -width "nvmecontrol/" -compact +.Bl -tag -width "freebsd-update.conf" -compact +.It Pa auto_master +autofs +.Xr automount 8 +configuration .It Pa bluetooth/ bluetooth configuration files +.It Pa cron.d/ +tables for driving scheduled tasks; see +.Xr crontab 5 +.It Pa crontab +root's cron table .It Pa defaults/ default system configuration files; see .Xr rc 8 +.It Pa devd/ +configuration for +.Xr devd 8 , +the device state change daemon +.It Pa devfs.conf +boot time device configuration +.It Pa dma/ +configuration for +.Xr dma 8 +.It Pa freebsd-update.conf +configuration for the base system updater +.Xr freebsd-update 8 +.It Pa fstab +static filesystem configuration; see +.Xr fstab 5 +.It Pa hosts +database of local hosts if no network name server is running +.It Pa inetd.conf +configuration for +.Bx +heritage internet servers; see +.Xr inetd 8 .It Pa localtime local timezone information; see .Xr ctime 3 +.It Pa jail.conf.d/ +.Xr jail 8 +startup scripts. +.It Pa login.conf +login class capability database; see +.Xr login.conf 5 +.It Pa machine-id +defines the UUID for the local system, required for dbus .It Pa mail/ .Xr sendmail 8 control files +.Pp +.Bl -tag -width "mailer.conf" -compact +.It Pa aliases +addresses to deliver system mail +.It Pa mailer.conf +.Xr mailwrapper 8 +configuration +.El +.Pp +.It Pa motd.template +message displayed upon tty login; see +.Xr motd 5 .It Pa mtree/ +system mapper specification; see .Xr mtree 8 -configuration files +.It Pa newsyslog.conf.d/ +log rotation configuration files. +.It Pa ntp/ +stored time for the Network Time Protocol +.It Pa ntp.conf +configuration for the NTP client, +.Xr ntpd 8 .It Pa pam.d/ -configuration files for the Pluggable Authentication Modules (PAM) library; see +configuration files for the Pluggable Authentication Modules (PAM) library; +see .Xr pam 3 .It Pa periodic/ scripts that are run daily, weekly, or monthly by .Xr cron 8 ; see .Xr periodic 8 +.It Pa pf.conf +configuration for the Packet Filter firewall; see +.Xr pf 4 +.It Pa pkg/ +default configuration for the package manager, +.Xr pkg 8 .It Pa ppp/ PPP configuration files; see .Xr ppp 8 +.It Pa rc.conf +system and daemon configuration; see +.Xr rc.conf 5 .It Pa rc.d/ system and daemon startup/control scripts; see .Xr rc 8 +.It Pa resolv.conf +DNS configuration; see +.Xr resolv.conf 5 +.It Pa resolvconf.conf +DNS configuration manager configuration, often generated by +local-unbound; see +.Xr local_unbound 8 +or +.Xr resolvconf 8 .It Pa security/ OpenBSM audit configuration files; see .Xr audit 8 @@ -134,9 +286,20 @@ OpenSSH configuration files; see .Xr ssh 1 .It Pa ssl/ OpenSSL configuration files +.It Pa sysctl.conf +kernel state defaults; see +.Xr sysctl.conf 5 +.It Pa syslog.conf +system log configuration +.It Pa ttys +tty creation configuration; see +.Xr getty 8 +.It Pa wpa_supplicant.conf +client wifi configuration; see +.Xr wpa_supplicant.conf 5 .El .It Pa /home/ -users' home directories; whilst the layout is not standardized, the typical home for an interactive user +home directories for users; the typical home for an interactive user .Dv beastie would be .Pa /home/beastie/ From nobody Fri Mar 1 22:22:50 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TmjJp4wwVz5D9BD; Fri, 1 Mar 2024 22:22: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 4TmjJp4JHfz4CZ9; Fri, 1 Mar 2024 22:22:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709331770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QT3gw0ejpoDZ0ouRVVoKzq55xg2chFkg3aiewcV6UDs=; b=EJFxnWKt1p/KG+XjAJVvJIbo/jtlWSK/vhV/XhGgdCHxOjKpz0FG/+tXQBFXP/i0e9lMmi Wz+/DmbHo+mQ1qo4vhCrWnyvu2U/74fcZDTGV2Dg4Kzz1L5bPfbiu+dUp7+6hEDFprEqgG YY+DLGvCmqksWULfol6TBC7fq2Qm9suC+O5TPTjqwNFCXsvgt9hx+OkXdnBYsVfR/UlW+w yAn4ga3Oy+xJs6oKKx8lYZWOAZREckdoLreA/jvbClEnhJcRXRCY1MzLeRfgWvxqKbKQCf W5ctulZfN2YH4V+lOzISNfFNNcWRNKKAVeC7cdz3IIu4RBVoZENMTscfMZy8Zg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709331770; a=rsa-sha256; cv=none; b=FmzqLBAAZAC1Zt3IEia6B3dTq1oudLnAUyLgiyEfbKIOIBo8VNUTEyXwWoEqxQtT2Aa6pY YMTc6vdr1EfG2uh3c4gdTi49JxgmtlXDEFt/Ka0yUSG7enN+0PBm6FT69IJbd8IN9uLd3U AzRsABZlDXXbHEBbpGM3osy7vyzsmI8MZ5ZtwnNPpI31O+ko+qzKAhnpz6KoCRQIeqgLq5 LDJsAdag90wrItR1cf+SB88gZ3k9EQjP1HNcOhrjDlsdxvToGX0jCviIwvnayviz7GoUQ1 KCyjVjmnY/LC0OIitY+uG8hzKyQzdrwkT95M36B5EWhJxpreV7uE2eFse6NWuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709331770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QT3gw0ejpoDZ0ouRVVoKzq55xg2chFkg3aiewcV6UDs=; b=Prfdbeu4vHsRo+5BapcT24FiuJMoBJcKwNxf1FcKE82y6WTETkdtQbLGnr9klDaCpg3Qn1 E5AasIWhN9mCKC9qDcNBf+kkjL0NgSCBL7CKcko4QfFeLMljB/4MpJceUzJ7eZBJ7NEI4q HFiIqR/m7bevLqvvkBYzyh+SA8RhXRgu9oHFwsul4RJrVPIpgfNdsG2NaK+3rCv9MpRzHV EP5vuZAKZ8JpOYaQykz0OzTpAdN9/Xbwl26lFTFekTXHZTSutKYawUuhP3OGerHmfFKL6P jPO3U8A3ypH3fBqYp8otyOAwPTpCYBDBPN8UhsjMSUClIjeawmL6rH4ceimibw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TmjJp3p1Dzl1j; Fri, 1 Mar 2024 22:22: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 421MMolc071224; Fri, 1 Mar 2024 22:22:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 421MMohv071221; Fri, 1 Mar 2024 22:22:50 GMT (envelope-from git) Date: Fri, 1 Mar 2024 22:22:50 GMT Message-Id: <202403012222.421MMohv071221@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: 94dedfdfa96b - main - hier.7: various improvements m-s List-Id: Commit messages for the main 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: 94dedfdfa96baef02e4ad661512a267ae5647d7b Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=94dedfdfa96baef02e4ad661512a267ae5647d7b commit 94dedfdfa96baef02e4ad661512a267ae5647d7b Author: Alexander Ziaee AuthorDate: 2024-02-28 05:16:35 +0000 Commit: Warner Losh CommitDate: 2024-03-01 22:22:37 +0000 hier.7: various improvements m-s Second batch of word smithing: /media, /mnt, /nonexistant, /rescue, /sbin: Improved wording and a few missing files added Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/831 --- share/man/man7/hier.7 | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 index dc5a8fba7d7a..ab0bc25cbdf9 100644 --- a/share/man/man7/hier.7 +++ b/share/man/man7/hier.7 @@ -325,29 +325,34 @@ system utilities that are critical to binaries in and .Pa /sbin .It Pa /media/ -empty directory commonly containing mount points for removable media such as -USB drives, CDs, and DVDs +mount points for removable storage media such as CDs, DVDs, +and USB drives; see +.Xr automount 8 +or +.Xr bsdisks 8 .It Pa /mnt/ -empty directory commonly used by system administrators as a temporary mount -point +empty directory commonly used by +system administrators as a temporary mount point .It Pa /net/ automounted NFS shares; see .Xr auto_master 5 .It Pa /nonexistent/ -a non-existent directory; conventionally, a home directory for special user -accounts that do not require a home directory. See also +a non-existent directory; +by convention, it serves as a home directory +for special user accounts +that need no home directory; see also .Pa /var/empty/ .It Pa /proc/ process file system; see .Xr procfs 5 .It Pa /rescue/ -statically-linked programs for emergency recovery; see +statically linked programs for emergency recovery; see .Xr rescue 8 .It Pa /root/ home directory of the root user .It Pa /sbin/ -system programs and administration utilities that are fundamental to -single-user and multi-user modes +system programs and administration utilities +fundamental to both single and multi-user modes .It Pa /tmp/ temporary files that may be removed by .Xr rc 8 ; From nobody Fri Mar 1 22:22:51 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TmjJr0Ybyz5D9SB; Fri, 1 Mar 2024 22:22: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 4TmjJq5THnz4D4g; Fri, 1 Mar 2024 22:22:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709331771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LC2xBSBjHk+uDhu8atgTfxC8vjm1/Um4aIML1COPfXw=; b=TG+cWsabAKVCnK4FLY4uRiGk/uwGgqC6su0dzsEVmwtR9k1lUn2d6SO4Ne3SXjy4DZvJZg 0xhW/sq4DZP/wUrx24fFN2IWNYaMcQp5Ktvg7y+3q2yHXMykStXNqtgVjOSlXp4bhyzhBq FvOhH+xTYaUz+Dz8UsALjaBQZBlZquSKTq3fIXhtMSVisitXg/YGEe7FxB8hpA/eKE6oSW VyoRR39Xml9DHBWlOmrz6v9KYHaNRNCKOLKwM9VAtamig8vA/h+JFuBsu1YACsozvxhEHD 5acDeKirRrrSh4WI0imscxRiqI2EcQeVl2Umzy8+LPb8O9+upWubbxb1vq9Xwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709331771; a=rsa-sha256; cv=none; b=VjsKWhNL5wWPkp+W+woyYSvJy8j4jD2HA0x7+OHj2ezbnWc2JvUI/p1/uUUcsVFfjtc6K5 EKmehnj/yO+W7xF7DeylCJ2sn49FaUv3cioqvpyOscHPgB9LFDrvtaaM1HRqMxpIUn6Q0d XaSA6J9WEutKpMxT6mrriEaT0Sc9QkRTr6gR93NBb8SfV5PtzHuGiPBJgYjPbkFelcbgoK 8X/K8l2f4r8WwXZ3MkPUYQ55nxzoAOHjVrwE0CGsjsj2MtjswbOW8ncp8jKjlFjXDvF8ll MTdEt85ZyTJbhu7PzST5hP+0xoDyz8SVKSbrMH3IQNzVil7bPlzeqyCiu0DaHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709331771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LC2xBSBjHk+uDhu8atgTfxC8vjm1/Um4aIML1COPfXw=; b=YKoJDt18kRvdlOICRfy3F4t39ODaxjUqP4ITBC/CyvIgHgmDklEed1NptDdu5SEe5Nd+ec CtNthTMD69atws+ZMw6jLYVCIVWtft5uNrieEUTzf7tDuWMrXnIjX0NWnWPiysVsygl8Vf d2lpHYkzF0j67X5jG+2XoM0gSpRbTuZfw3hupby0+kmu+ve8atRrdD3j6jAlMQlf2rkAwE sSkTxqYHNJw1Cyc161U0BwZ9kPV5A4LksgbTy+kaJ8Mms3Ry3bdxLnWMRPhAHaZwrePe4E 5hi9KVbZYyFVht9vNczw7J/H4wzKIVG70BAMemUQdfR2IXdGCLFNLJaXXawWmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TmjJq4lKkzkyY; Fri, 1 Mar 2024 22:22: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 421MMpYK071276; Fri, 1 Mar 2024 22:22:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 421MMpOx071273; Fri, 1 Mar 2024 22:22:51 GMT (envelope-from git) Date: Fri, 1 Mar 2024 22:22:51 GMT Message-Id: <202403012222.421MMpOx071273@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: a5b07274fcaf - main - hier.7: various improvements usr (no src) List-Id: Commit messages for the main 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: a5b07274fcaf71fc9c14947a75fbe0a13d381a79 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a5b07274fcaf71fc9c14947a75fbe0a13d381a79 commit a5b07274fcaf71fc9c14947a75fbe0a13d381a79 Author: Alexander Ziaee AuthorDate: 2024-02-28 05:16:35 +0000 Commit: Warner Losh CommitDate: 2024-03-01 22:22:37 +0000 hier.7: various improvements usr (no src) Third batch of word smithing: /usr but not /usr/src: Improved wording and a few missing files added. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/831 --- share/man/man7/hier.7 | 126 ++++++++++++++++++++++++++++++++++---------------- 1 file changed, 87 insertions(+), 39 deletions(-) diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 index ab0bc25cbdf9..f126f3e43996 100644 --- a/share/man/man7/hier.7 +++ b/share/man/man7/hier.7 @@ -373,13 +373,16 @@ distribution files and .Xr bsdinstall 8 .It Pa include/ -standard C include files +standard C include header files .It Pa lib/ shared and archive .Xr ar 1 Ns -type libraries .Pp .Bl -tag -width Fl -compact +.It Pa clang/ +shared libraries for the system compiler, +.Xr clang 1 .It Pa compat/ shared libraries for compatibility .It Pa debug/ @@ -387,9 +390,18 @@ standalone debug data for the kernel and base system libraries and binaries .It Pa dtrace/ DTrace library scripts .It Pa engines/ -OpenSSL (Cryptography/SSL toolkit) dynamically loadable engines +OpenSSL +.Pq Cryptography/SSL toolkit +dynamically loadable engines +.It Pa flua/ +.Fx +Lua shared libraries +.It Pa i18n/ +shared libraries for internationalization .El .Pp +.It Pa lib32/ +32-bit comparability libraries .It Pa libdata/ miscellaneous utility data files .Pp @@ -400,21 +412,31 @@ GCC configuration data linker scripts; see .Xr ld 1 .It Pa pkgconfig/ -.Xr pc 5 Pq Pa ports/devel/pkgconf -files; collections of compiler flags, linker flags, and other information -relevant to library use +collections of compiler and linker flags for the +.Xr pkgconf 1 +development tool .El -.Pp .It Pa libexec/ -system daemons and system utilities that are executed by other programs +system daemons and utilities that are executed by other programs .Pp -.Bl -tag -width Fl -compact -.It Pa aout/ -utilities to manipulate a.out executables -.It Pa elf/ -utilities to manipulate ELF executables +.Bl -tag -width "bsdinstall/" -compact +.It Pa bsdconfig/ +utilities called by the ncurses +.Fx +configuration wizard +.It Pa bsdinstall/ +utilities for +.Xr bsdinstall 8 +.It Pa dwatch/ +profiles for +.Xr dwatch 1 +.It Pa fwget/ +utilities called by +.Xr fwget 8 +.It Pa hyperv/ +??? .It Pa lpr/ -utilities and filters for LP print system; see +utilities and filters for the line printer system; see .Xr lpr 1 .It Pa sendmail/ the @@ -426,27 +448,37 @@ restricted shell for .Xr sendmail 8 ; see .Xr smrsh 8 +.It Pa zfs/ +Z file system utilities .El .Pp .It Pa local/ -local executables, libraries, etc. -Also used as the default destination for the +default destination for local executables, libraries, etc, installed by +.Xr pkg 7 +or .Xr ports 7 -framework. -Within +.Pp +within .Pa local/ , the general layout sketched out by .Nm for .Pa /usr -should be used. -Exceptions are the ports documentation +should be used ; exceptions are the ports documentation .Po in .Pa share/doc// Ns Pc , and .Pa /usr/local/etc .Po mimics -.Pa /etc Ns Pc . +.Pa /etc Ns Pc +.Pp +.Bl -tag -width Fl -compact +.It Pa share/doc/freebsd/ +articles, books, FAQ, and handbooks available from the +.Fx +project +.El +.Pp .It Pa obj/ architecture-specific target tree produced by building .Fx @@ -457,14 +489,17 @@ from source; see ports collection; see .Xr ports 7 .It Pa sbin/ -system daemons and system utilities that are executed by users +system daemons and utilities meant for user execution .It Pa share/ architecture-independent files .Pp .Bl -tag -width Fl -compact .It Pa calendar/ -system-wide calendar files; see +a variety of pre-fab calendar files; see .Xr calendar 1 +.It Pa certs/ +TLS certificates for +.Xr openssl 1 .It Pa dict/ word lists; see .Xr look 1 @@ -479,12 +514,17 @@ words from Webster's Second International .Pp .It Pa doc/ miscellaneous documentation +.It Pa dtrace/ +scripts for the Dynamic Tracing Compiler; see +.Xr dtrace 1 .It Pa examples/ various examples for users and programmers .It Pa firmware/ firmware images loaded by userland programs .It Pa games/ -used by various games +ASCII text files used by +.Bx +heritage games .It Pa keys/ known trusted and revoked keys .Pp @@ -500,11 +540,18 @@ and localization files; see .Xr setlocale 3 .It Pa man/ -manual pages +system manual pages .It Pa misc/ -miscellaneous system-wide files +miscellaneous system-wide ASCII text files .Pp .Bl -tag -width Fl -compact +.It Pa ascii +chart of the ASCII codepoints +.It Pa flowers +the meanings of flowers +.It Pa magic +magic numbers used by +.Xr file 1 .It Pa termcap terminal characteristics database; see .Xr termcap 5 @@ -533,7 +580,9 @@ MIBs, example files and tree definitions for the SNMP daemon tree definition files for use with .Xr gensnmptree 1 .It Pa mibs/ -MIB files +management Information Base +.Pq MIB +files .El .Pp .It Pa syscons/ @@ -563,51 +612,50 @@ binaries .It Pa VERSION/ files for .Fx -release VERSION. -By convention, +release VERSION; +by convention, .Dq VERSION matches .Xr uname 1 -.Fl r . +.Fl r .Pp .Bl -tag -width Fl -compact .It Pa MACHINE.MACHINE_ARCH/ -represent the binary ABI for these files. +represent the binary ABI for these files; .Dq MACHINE matches .Xr uname 1 -.Fl m . +.Fl m ; .Dq MACHINE_ARCH matches .Xr uname 1 -.Fl p . +.Fl p .El .El .Pp .It Pa tabset/ -tab description files for a variety of terminals; used in the termcap file; -see +tab description files for a variety of terminals; used in +the termcap file; see .Xr termcap 5 .It Pa vi/ localization support and utilities for .Xr vi 1 .It Pa vt/ +files used by the system console; see .Xr vt 4 -files .Pp .Bl -tag -width Fl -compact .It Pa fonts/ console fonts; see -.Xr vidcontrol 1 +.Xr vidcontrol 1 , +.Xr vidfont 1 , and -.Xr vidfont 1 +.Xr vtfontcvt 8 .It Pa keymaps/ console keyboard maps; see .Xr kbdcontrol 1 and .Xr kbdmap 1 -.\" .It Pa scrnmaps/ -.\" console screen maps .El .Pp .It Pa zoneinfo/ From nobody Fri Mar 1 22:22:52 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TmjJs1pLHz5D9Xj; Fri, 1 Mar 2024 22:22: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 4TmjJr6QPSz4D7P; Fri, 1 Mar 2024 22:22:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709331772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MAZ3NsAIL+2mb2YD/mHblv6loAGOg9DehA/N306fpsE=; b=WCAXNuNy+CNW/7UhyCMfapTk6xNcrx9WL05J6mQkG+cw6xb/DqRiY7+qrIAtPNwD227YZH BrGjocK4KtI/lV5kG/QCDn5/rgNRekUlUlr3Tbzj5K5/JRMNM1fanrS684G/Cs8cyXWjJ9 GuF41IKPz2v1mYw51jj+HcKuN7juyWKoob6qZpPDu6UdIqlHuNO2xrmICL3+hYX3Du2TqS PdV5tEI6BNt9YmNE9ikO9TZXn/qMxnSsx3iUaRuDWnwhRcaOwpKZt9WgsEg9o9UzaaANR3 tcBtR9mBv+vU+lfS2Qbu1T6SCuopmndw2uhYiUFoleDJctC0UUHLxwsFZRQdLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709331772; a=rsa-sha256; cv=none; b=q9NOCBkGmIasDtjJqjsUbGI3bWdAsp4xywn2/pn5OlscyFNYXwMDZPB+sx4JaWaiJ8kkHl CvconqD8lfDec7vvh0McAN6qyPYiEV2W+c8qQvYCpGg+6cMNKuFeq5dCfhBK8sLXz7Pi4J v23pGrTxUvcP2c9fnc8EaaG7Kb/fgPaIZ9jp4VyjVAIgBRkioMjAvT/oK7EBAZEGC1Rm4V HIrzQViXfdwxIzls3diqS/CZjTRVU8h0s35Igf01cUXGwsq6cTL1QLz1NO5cCXfPsXv3Pp bhF1lVqkgyBR2D4pWwd1yG7Is4ukJ8fp3r4XzfUtv0czfb4eIXGGCGhHAdWBIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709331772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MAZ3NsAIL+2mb2YD/mHblv6loAGOg9DehA/N306fpsE=; b=qcjyN+ql3VJodLti7iRoEf15QJ+U2Xxs/yrYSanNxjZhKqBRDmwb2XEUUTbYIzQj8iqqaI qGz9d3RtYIGq/RlPpdIvjBTuuv3egkhjSttE6KRXZ83PvBeYGZd7ywMxQ/eRuNbpxwfROU /eV2EgpBtzKY+pid4s8wvJUpJ3c7phUPhjS8hcFqPN77VtAmRkX4q/gOmAN0UUO0AaB+Qu Ojemv8z4EMwH7HymqiDmt9l642tC2BeAiZ8glPSWUjRXhffN0MvY4Wfn2gE3Dh6guKJ57U 5wz9kNnEEjrI/xbSGI0ypcknIeAnNhmOl0YqM3acX8cANY04eNlssY7AZGsmKw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TmjJr5m92zkyZ; Fri, 1 Mar 2024 22:22: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 421MMqsi071321; Fri, 1 Mar 2024 22:22:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 421MMqdK071318; Fri, 1 Mar 2024 22:22:52 GMT (envelope-from git) Date: Fri, 1 Mar 2024 22:22:52 GMT Message-Id: <202403012222.421MMqdK071318@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: f19875b66bf4 - main - hier.7: various improvements usr/src and /var List-Id: Commit messages for the main 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: f19875b66bf403ed5c57f82bbe2a3f42475d0a06 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f19875b66bf403ed5c57f82bbe2a3f42475d0a06 commit f19875b66bf403ed5c57f82bbe2a3f42475d0a06 Author: Alexander Ziaee AuthorDate: 2024-02-28 05:16:35 +0000 Commit: Warner Losh CommitDate: 2024-03-01 22:22:37 +0000 hier.7: various improvements usr/src and /var Forth batch of word smithing: /usr/src and /var: Improved wording and a few missing files added. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/831 --- share/man/man7/hier.7 | 154 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 129 insertions(+), 25 deletions(-) diff --git a/share/man/man7/hier.7 b/share/man/man7/hier.7 index f126f3e43996..10847993c0f5 100644 --- a/share/man/man7/hier.7 +++ b/share/man/man7/hier.7 @@ -666,10 +666,10 @@ timezone configuration information; see .It Pa src/ .Fx source code; see -.Xr development 7 . -The layout of the source tree is described by the top-level +.Xr development 7 ; +the layout of the source tree is described by the top-level .Pa README.md -file. +file .Pp .It Pa tests/ the @@ -684,7 +684,7 @@ log, temporary, transient, and spool files .It Pa account/ system accounting files .Pp -.Bl -tag -width Fl -compact +.Bl -tag -width Ds -compact .It Pa acct execution accounting file; see .Xr acct 5 @@ -694,67 +694,155 @@ execution accounting file; see timed command scheduling files; see .Xr at 1 .Pp -.Bl -tag -width Fl -compact +.Bl -tag -width Ds -compact .It Pa jobs/ job files .It Pa spool/ output spool files .El .Pp +.It Pa audit/ +security event audit trail files; see +.Xr audit 8 +.It Pa authpf/ +user shell sessions for authenticating gateways; see +.Xr authpf 8 .It Pa backups/ -miscellaneous backup files +critical system configuration backups .It Pa cache/ miscellaneous cache files .Pp -.Bl -tag -width Fl -compact +.Bl -tag -width Ds -compact .It Pa pkg/ cached packages for .Xr pkg 8 +.It Pa cups/ +cached printers for the Common Unix Prinitng system; see +.Xr cups 1 .El .Pp .It Pa crash/ -default directory for kernel crash dumps; see +default directory to store kernel crash dumps; see .Xr crash 8 and .Xr savecore 8 .It Pa cron/ +files used by cron; see .Xr cron 8 -files .Pp -.Bl -tag -width Fl -compact +.Bl -tag -width Ds -compact .It Pa tabs/ +crontab files; see .Xr crontab 5 -files .El .Pp .It Pa db/ miscellaneous automatically-generated system-specific database files .Pp .Bl -tag -width "freebsd-update/" -compact +.It Pa etcupdate/ +temporary files and log for +.Xr etcupdate 8 .It Pa freebsd-update/ -temporary files and downloads for +downloads and temporary files for .Xr freebsd-update 8 +.It Pa pkg/ +package database .El .Pp .It Pa empty/ -for use by programs that require an empty directory. -Uses include privilege separation by +for use by programs that require an empty directory, +used for instance by .Xr sshd 8 +for privilege separation .It Pa games/ -miscellaneous game status and score files +miscellaneous game status and score files for +.Bx +heritage games .It Pa heimdal/ Kerberos server databases; see .Xr kdc 8 +.It Pa lib/ +holds state information for applications ported from linux .It Pa log/ -miscellaneous system log files -.Pp -.Bl -tag -width "utx.lastlogin" -compact +system log files +.Pp +.Bl -tag -width "bsdinstall_log" -compact +.It Pa Xorg.0.log +.Xr Xserver 1 +log, if +.Xr X 7 +is installed +rotates to +.Pa Xorg.0.log.old +.It Pa aculog +serial line access log; see +.Xr cu 1 +.It Pa auth.log +system authentication log +.It Pa bsdinstall_log +system installation log +.It Pa bsdisks.log +FreeDesktop.org automounter log, if a desktop environment is using +.Xr bsdisks 8 , +from +.Xr ports 7 +.It Pa cron +scheduled task log; see +.Xr cron 8 +.It Pa cups/ +logs for +.Xr cups 1 +.It Pa daemon.log +default log for system daemons +.It Pa devd.log +default log for device state change daemon +.It Pa dmesg.today +system message buffer log +Rotates to +.Pa dmesg.yesterday +.It Pa debug.log +??? +.It Pa lpd-errs +logs for the line printer daemon; see +.Xr lpd 8 +.It Pa maillog +.Xr sendmail 8 +log, rotates and compresses to maillog.0.bz2 +.It Pa messages +general system log; see +.Xr syslog 3 +.It Pa mount.today +currently loaded +.Xr fstab 5 , +rotates to +.Pa mount.yesterday +.It Pa pf.today +packet filter firewall log; see +.Xr pf 4 +.It Pa pflog +saved packets caught by +.Xr pflogd 8 +.It Pa ppp.log +see +.Xr ppp 8 +.It Pa security +transcript of events marked with the security flag +.It Pa setuid.today +listing of executable files which run with elevated permissions, rotates +to +.Pa setuid.yesterday +.It Pa userlog +logs changes in users or groups .It Pa utx.lastlogin last login log; see .Xr getutxent 3 .It Pa utx.log login/logout log; see .Xr getutxent 3 +.It Pa xferlog +default log for +.Xr ftpd 8 .El .Pp .It Pa mail/ @@ -765,11 +853,11 @@ system messages database; see .It Pa preserve/ unused, present for historical reasons .It Pa quotas/ -file system quota information files +UFS quota information files .It Pa run/ files containing information about the operating system since it was booted .Pp -.Bl -tag -width Fl -compact +.Bl -tag -width "wpa_supplicant/" -compact .It Pa bhyve/ .Xr bhyve 8 virtual machine @@ -782,10 +870,12 @@ group for command connection sockets; see .It Pa utx.active database of current users; see .Xr getutxent 3 +.It Pa wpa_supplicant/ +IEEE Std. 802.11 wifi run time files .El .Pp .It Pa rwho/ -rwho data files; see +information about other systems on the local network; see .Xr rwhod 8 , .Xr rwho 1 , and @@ -797,26 +887,40 @@ miscellaneous printer and mail system spooling directories .It Pa clientmqueue/ undelivered submission mail queue; see .Xr sendmail 8 +.It Pa cups/ +print jobs and temporary files for +.Xr cups 1 +.It Pa dma/ +undelivered mail queue for +.Dx +Mail Agent; see +.Xr dma 8 +.It Pa lock/ +??? .It Pa ftp/ ftp root directory; see .Xr ftpd 8 .It Pa mqueue/ -undelivered mail queue; see +undelivered mail queue for .Xr sendmail 8 .It Pa output/ line printer spooling directories .El .Pp .It Pa tmp/ -temporary files that are not removed by +temporary files that are not removed between system reboots by .Xr rc 8 .Pp .Bl -tag -width "vi.recover/" -compact .It Pa vi.recover/ +recovery files for the .Xr vi 1 -recovery files +editor .El .Pp +.It Pa unbound/ +files and configuration for +.Xr unbound 8 .It Pa yp/ the NIS maps; see .Xr yp 8 @@ -840,5 +944,5 @@ this document. .Sh HISTORY A .Nm -manual page appeared in +manual page first appeared in 1979 with .At v7 . From nobody Fri Mar 1 23:04:39 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TmkF42pBBz5DCtH; Fri, 1 Mar 2024 23:04: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 4TmkF402hYz4J2J; Fri, 1 Mar 2024 23:04:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709334280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gggo3id9Ot/46wjWoucTCqzBvYHtaLJrfIhbBMZbxpw=; b=NRTwfuuDqsCgfF/A4LaMsuA9GTpK48imyYd5MatfIOGbVmtZzx05XqCqnquw3yJOpNbHad tySIkS0tkuSXsLlYl4i9iC8DL57rLD8vBoPfatcNHeXSyGas0fl1YHcmkOmIyy+80vO/9j /z/cHqRActshV4oTl6K6x46eQrGp7vU/sQPyhXXFvZKjMc2kCfyjHFvur6LydGvFbBwi+L euIRQgXYqx8dQ6FaodRuyE90iS0tLcK6xw9iJvWP9Sqh711uN4YUjGq3i3snnCGWeKjrC2 XOKuFiMwr5R1wEvLHCAzRtWwN3c5lI9OldTGkM5KWyL49jcjllclOKA69ADYvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709334280; a=rsa-sha256; cv=none; b=huCfO08riR9t631lTX3SRWh52zUvX7xwjxU52swI6csz7JAZ7rdigDZCt6M78PuHlwC9Ky zEWpFvy2UmjHQ+yVtEya5kVJtQBwO+88uQRJpYsa1WoHCUrP8ONNrWNRW6Y+b81F47t3ev 9pKsr2uhX/sizmJvUj7cOJA16gvV5Im1EkxLrwsiOGhP8OXh4DOXJJy38EaLRBZ9/ksAGr txtYhkK/E2cLAWCpr6wEMe69RCTeTADYNeDDZe2TKY1dSg5iRjXCY/Rt2/3K/lpaVbvKEK 7eFrEdc7Z5huMRuloFaTKGeAVF4N82dPxPuTr9Tpr0HH6/yLOJHg8cv/U4dgYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709334280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gggo3id9Ot/46wjWoucTCqzBvYHtaLJrfIhbBMZbxpw=; b=am/tToTWQ9zUHthEXLQ1ZBfUQL4yHsJKjUcnLFuPP4929IfhpCrr/P3ixzaIQdJ19I42L5 ipwTPYIwwqsnuzmyh6zeTrFUFQiWMwXiZQwWxsaqQVD0reOfw8EWl8TD724joqWziiyBSV 4bxuScx7aIOpzU9xQPX3jHhrcVrMGPSjnk7JZNFD0LL6KsvkN5MvA/d5Kh9hDizjXjvC8L zPqFNne6q92UJVXCXxlN5IVLgiFoA9m4oZMXWcI+n/YEpr97OUPhA2814YcbHi4pKhcIRM WEL1RyFFXELjW1htm8rFVOrinsHQgfWHU9GPPknNdhRLAnHZ07OO3B/Am8OxrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TmkF36mXkzlmW; Fri, 1 Mar 2024 23:04: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 421N4dKZ039515; Fri, 1 Mar 2024 23:04:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 421N4duD039512; Fri, 1 Mar 2024 23:04:39 GMT (envelope-from git) Date: Fri, 1 Mar 2024 23:04:39 GMT Message-Id: <202403012304.421N4duD039512@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: c5246cb7b015 - main - nvme: Report only the unknown 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c5246cb7b0153730101163381576e9b0e91c73a5 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c5246cb7b0153730101163381576e9b0e91c73a5 commit c5246cb7b0153730101163381576e9b0e91c73a5 Author: Warner Losh AuthorDate: 2024-03-01 23:03:19 +0000 Commit: Warner Losh CommitDate: 2024-03-01 23:04:27 +0000 nvme: Report only the unknown bits When we get a smart error that's unknown, report only the unknown (reserved) bits of the Critical Warning Bitfield. Sponsored by: Netflix --- sys/dev/nvme/nvme_ctrlr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index b29512455fda..0d33454125bd 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -650,7 +650,8 @@ nvme_ctrlr_log_critical_warnings(struct nvme_controller *ctrlr, if (state & NVME_CRIT_WARN_ST_RESERVED_MASK) nvme_ctrlr_devctl_log(ctrlr, "critical", - "unknown critical warning(s): state = 0x%02x", state); + "unknown critical warning(s): state = 0x%02x", + state & NVME_CRIT_WARN_ST_RESERVED_MASK); } static void From nobody Fri Mar 1 23:22:28 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tmkdc3bfBz5DFPC; Fri, 1 Mar 2024 23:22: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 4Tmkdc3B5cz4K70; Fri, 1 Mar 2024 23:22:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709335348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F5vGXQHDcOO14pP1CPXKCAxtb5pUZR8eqqIlLiBRo6s=; b=wSVvh1ttvthEQE6r8/CaPzMq7LIa9ylap1fZjcoDdbedOPVQh7b7bCdTC5Ox4YS0j36OG2 hixf39M3ZyqgLSgfcYkrXGCU4W1NNePG7VFM2op8ejQQGWoUsv9i6mMsMjOoxV7tbbx58o oK3jlJ+YwiUe2CXVims5o1lyYcd1gTb/2c+uXaqwarThgFQIY+quhWG/JE5HukfDtrsrjE 42H03oY/jDtpH8XcAKAK1FOVqFMpf34KEVNeWOPIG3YBdCpIIXAShmFDIofiARVOL15hhl QeWm040p2LbFj1v/PtH8adRFD7KOCds0z02XPuupx4yFQyo76ZRe6Sz3bNyu7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709335348; a=rsa-sha256; cv=none; b=K8DYuP17QEaIgDONxzV9jJSsowk9lL/tA0F2YzfAz+J5VHm/Qj9SBEhdiXxo/cgFziIQF4 PyDwjzWi2n5aTSrKna4MOFP7TYmi0fVtnL8gmq83nqLWTaoWROLXV5vI/LFVZLwBYkST5D h3C1IROYAA14N7VUVaGbQ8iwWlIzppzpNf18Xu17zQVnzLXb1wFI9lPB9wLf8PlA8yl/Fo 976Ua93Sn/mJWjJP8zs3YkY2XcJfJ8JMNaPn0WMAB2e3UpsFPyLiNufZwN/+bt2h2XHUuJ voK/ahGsIuN5hvMKx0EF1FC7kqvpXz5CGtahdaH32Z/5EuyBLIA5EvUj58tQcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709335348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F5vGXQHDcOO14pP1CPXKCAxtb5pUZR8eqqIlLiBRo6s=; b=HYAGi7rR3v65ZGHgqLPCF2uP2T4FmS3eSxJ5hbAicvoUPFvZ2+F+axKbCOuE6p48oP85sg PDkH3q4nc28YYiSN7Ym0AzkA3PRAn71P/07D7LR+O5+Qn0TApCO83s3JqVKWp/7IWyZnOv 9T/ZiUzFoDf0UMWppUh1T5VCMSlP7HaTv2zCC+6TMzRceaISBWaQb8OnsVGzXgmLGxljm+ xf8IeoxPVZQwGlAYeJ7dUge3UTzr3LhMqGY+Rr4T7ACFeD1y4cz1GkgssPHUZZbcgpfvz8 hQadcglFh9ilhkrHNZF8vxbewqZJhqNcxlDuQnF7X65undlaA+A5DQr2OX0+5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tmkdc2nttzmX9; Fri, 1 Mar 2024 23:22: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 421NMSpA072474; Fri, 1 Mar 2024 23:22:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 421NMS4W072471; Fri, 1 Mar 2024 23:22:28 GMT (envelope-from git) Date: Fri, 1 Mar 2024 23:22:28 GMT Message-Id: <202403012322.421NMS4W072471@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 2956f5885cf4 - main - Add an UNDEFINED_VERSION 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2956f5885cf4f001bd5c220ee9753d49aa1ad656 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=2956f5885cf4f001bd5c220ee9753d49aa1ad656 commit 2956f5885cf4f001bd5c220ee9753d49aa1ad656 Author: Brooks Davis AuthorDate: 2024-03-01 23:21:46 +0000 Commit: Brooks Davis CommitDate: 2024-03-01 23:22:11 +0000 Add an UNDEFINED_VERSION option When enabled (current default) link with --undefined-version to allow symbol maps to contain symbols not defined by libraries. When disabled, link with --no-undefined-version to disallow these bugs. WITHOUT_UNDEFINED_VERSION is currently broken. Once it is fixed it should be made the default and this option should likely be removed. Reviewed by: dim, emaste Differential Revision: https://reviews.freebsd.org/D44169 --- share/man/man5/src.conf.5 | 5 ++++- share/mk/bsd.lib.mk | 10 ++++++---- share/mk/bsd.opts.mk | 1 + tools/build/options/WITHOUT_UNDEFINED_VERSION | 2 ++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 2713e7416a52..255d5a567ec0 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd February 17, 2024 +.Dd March 1, 2024 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1726,6 +1726,9 @@ and that the runtime support library is available Do not build .Xr unbound 8 and related programs. +.It Va WITHOUT_UNDEFINED_VERSION +Link libraries with --no-undefined-version to ensure all symbols are +provided. .It Va WITHOUT_UNIFIED_OBJDIR Use the historical object directory format for .Xr build 7 diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 3cb2f9305e45..981d0b49df39 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -260,10 +260,12 @@ SHLIB_NAME_FULL=${SHLIB_NAME} ${SHLIB_NAME_FULL}: ${VERSION_MAP} LDFLAGS+= -Wl,--version-script=${VERSION_MAP} -# lld >= 16 turned on --no-undefined-version by default, but we have several -# symbols in our version maps that may or may not exist, depending on -# compile-time defines. -.if ${LINKER_TYPE} == "lld" && ${LINKER_VERSION} >= 160000 +# Ideally we'd always enable --no-undefined-version (default for lld >= 16), +# but we have several symbols in our version maps that may or may not exist, +# depending on compile-time defines and that needs to be handled first. +.if ${MK_UNDEFINED_VERSION} == "no" +LDFLAGS+= -Wl,--no-undefined-version +.else LDFLAGS+= -Wl,--undefined-version .endif .endif diff --git a/share/mk/bsd.opts.mk b/share/mk/bsd.opts.mk index 51260533e265..dcfe64ac1350 100644 --- a/share/mk/bsd.opts.mk +++ b/share/mk/bsd.opts.mk @@ -68,6 +68,7 @@ __DEFAULT_YES_OPTIONS = \ SSP \ TESTS \ TOOLCHAIN \ + UNDEFINED_VERSION \ WARNS \ WERROR diff --git a/tools/build/options/WITHOUT_UNDEFINED_VERSION b/tools/build/options/WITHOUT_UNDEFINED_VERSION new file mode 100644 index 000000000000..0e58eb00f3c1 --- /dev/null +++ b/tools/build/options/WITHOUT_UNDEFINED_VERSION @@ -0,0 +1,2 @@ +Link libraries with --no-undefined-version to ensure all symbols are +provided. From nobody Fri Mar 1 23:25:18 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tmkj13DTsz5DFJg; Fri, 1 Mar 2024 23:25:25 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tmkj11B0Dz4Kdk; Fri, 1 Mar 2024 23:25:25 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Authentication-Results: mx1.freebsd.org; none Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 168F83C019A; Fri, 1 Mar 2024 23:25:18 +0000 (UTC) Date: Fri, 1 Mar 2024 23:25:18 +0000 From: Brooks Davis To: Brooks Davis Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 2956f5885cf4 - main - Add an UNDEFINED_VERSION option Message-ID: References: <202403012322.421NMS4W072471@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: <202403012322.421NMS4W072471@gitrepo.freebsd.org> X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36236, ipnet:199.48.128.0/22, country:US] X-Rspamd-Queue-Id: 4Tmkj11B0Dz4Kdk This knob is intended to be temporary to make it easier to fix incorrect symbol maps. I've got a set of patches for libc, libgcc_s, and libcxxrt that I'll submit after further testing. -- Brooks On Fri, Mar 01, 2024 at 11:22:28PM +0000, Brooks Davis wrote: > The branch main has been updated by brooks: > > URL: https://cgit.FreeBSD.org/src/commit/?id=2956f5885cf4f001bd5c220ee9753d49aa1ad656 > > commit 2956f5885cf4f001bd5c220ee9753d49aa1ad656 > Author: Brooks Davis > AuthorDate: 2024-03-01 23:21:46 +0000 > Commit: Brooks Davis > CommitDate: 2024-03-01 23:22:11 +0000 > > Add an UNDEFINED_VERSION option > > When enabled (current default) link with --undefined-version to allow > symbol maps to contain symbols not defined by libraries. When disabled, > link with --no-undefined-version to disallow these bugs. > > WITHOUT_UNDEFINED_VERSION is currently broken. Once it is fixed it > should be made the default and this option should likely be removed. > > Reviewed by: dim, emaste > Differential Revision: https://reviews.freebsd.org/D44169 > --- > share/man/man5/src.conf.5 | 5 ++++- > share/mk/bsd.lib.mk | 10 ++++++---- > share/mk/bsd.opts.mk | 1 + > tools/build/options/WITHOUT_UNDEFINED_VERSION | 2 ++ > 4 files changed, 13 insertions(+), 5 deletions(-) > > diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 > index 2713e7416a52..255d5a567ec0 100644 > --- a/share/man/man5/src.conf.5 > +++ b/share/man/man5/src.conf.5 > @@ -1,5 +1,5 @@ > .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. > -.Dd February 17, 2024 > +.Dd March 1, 2024 > .Dt SRC.CONF 5 > .Os > .Sh NAME > @@ -1726,6 +1726,9 @@ and that the runtime support library is available > Do not build > .Xr unbound 8 > and related programs. > +.It Va WITHOUT_UNDEFINED_VERSION > +Link libraries with --no-undefined-version to ensure all symbols are > +provided. > .It Va WITHOUT_UNIFIED_OBJDIR > Use the historical object directory format for > .Xr build 7 > diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk > index 3cb2f9305e45..981d0b49df39 100644 > --- a/share/mk/bsd.lib.mk > +++ b/share/mk/bsd.lib.mk > @@ -260,10 +260,12 @@ SHLIB_NAME_FULL=${SHLIB_NAME} > ${SHLIB_NAME_FULL}: ${VERSION_MAP} > LDFLAGS+= -Wl,--version-script=${VERSION_MAP} > > -# lld >= 16 turned on --no-undefined-version by default, but we have several > -# symbols in our version maps that may or may not exist, depending on > -# compile-time defines. > -.if ${LINKER_TYPE} == "lld" && ${LINKER_VERSION} >= 160000 > +# Ideally we'd always enable --no-undefined-version (default for lld >= 16), > +# but we have several symbols in our version maps that may or may not exist, > +# depending on compile-time defines and that needs to be handled first. > +.if ${MK_UNDEFINED_VERSION} == "no" > +LDFLAGS+= -Wl,--no-undefined-version > +.else > LDFLAGS+= -Wl,--undefined-version > .endif > .endif > diff --git a/share/mk/bsd.opts.mk b/share/mk/bsd.opts.mk > index 51260533e265..dcfe64ac1350 100644 > --- a/share/mk/bsd.opts.mk > +++ b/share/mk/bsd.opts.mk > @@ -68,6 +68,7 @@ __DEFAULT_YES_OPTIONS = \ > SSP \ > TESTS \ > TOOLCHAIN \ > + UNDEFINED_VERSION \ > WARNS \ > WERROR > > diff --git a/tools/build/options/WITHOUT_UNDEFINED_VERSION b/tools/build/options/WITHOUT_UNDEFINED_VERSION > new file mode 100644 > index 000000000000..0e58eb00f3c1 > --- /dev/null > +++ b/tools/build/options/WITHOUT_UNDEFINED_VERSION > @@ -0,0 +1,2 @@ > +Link libraries with --no-undefined-version to ensure all symbols are > +provided. > From nobody Sat Mar 2 03:38:03 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TmrJW4zsNz5Brbq; Sat, 2 Mar 2024 03:38:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TmrJW4L4Lz4kGq; Sat, 2 Mar 2024 03:38:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709350683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NTOwl0kos5g65HTHZZuyTO9vNiouONCQjIYlwA07A14=; b=H7/4htJpITftcPSPgnDPLGQ3+dqqUQjgAQPhpzEfaJQ5EZFMNrWSrD0RpwvAYW+DapGtLi wVp17pINi7HCbjeugVia33MPCjEAGHIVrv78UIIXV4b5VMc38EqFbQ8qs17lEJsFTRvEI9 PVAcDrKnH8kzlYK7OrjfA2liVY7czCTHq3GWKYcmFm8Z0DpU24uLtog8kC4rKOs2HoWEn4 o7nrO9YxO3/C/8UU9+2zslATMFIbe3vaqmB/GANTybHEUmmmdjs+5Mul9UIiaMjYM6iydS daRJ3W6iZ93lM3E1eQEbhX4gR0fgIaGcOeW9LHaeM4Av9MdGuJDuU5UA9n3rLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709350683; a=rsa-sha256; cv=none; b=cR2pmqI8VsgLTsFes9RjEa6L8KAh/I7YY1euIMbdAElXgZwmeq1WD2o6P6mp9wDsEYKEDN tADOpVEBYGh74gnCtot2ln3P5IhEZI/TLXebEMOLB9s4XjWKvouoDSdqvzCkNmL9wWD0WG hFytAYtSJPBW/8Trs8V3rlVLhdqfexOiEiwSV18AJ9CiGtIJJ4tICbfPmlwlXoLpmjay2U zwdwNMWfjDtFlxrXSvFPePPsI/ZGIpl/WbElGx10K3OaybOBUldnmZR/r97p07cLy8jbt5 MK8fDy0nShL/gduXTiPduDHDii0eWxxU6dd2xVh5BVBnsr2xIqIamW7w7P2nkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709350683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NTOwl0kos5g65HTHZZuyTO9vNiouONCQjIYlwA07A14=; b=F38Fzkjrjc8Ce69FkNLUoEVoFUWmAPOn8lKIXOwgA89Qi6O1TpMjBYlIg6M2Wq2SdzmC34 n4//l9ZIV9OO1JrEhwRIIPNieG/2yx+VrGxRS1qFuaXOvCQCehT3+kX9+WhWH8AW10mynX z2RdAyrv34Wuoh/DtSawofLhwk+sb0EqgTKkq/6anThW90ucbPQiKWNPE/LwacwIunbWcH WeR8WxN0jnNX7f2m3o6Ys310JUqaNOo9jl52wsV8DmO10kV8QILFIDLK/dshse7rSLGQ0U 9epA2112nxlOaN2AR9PJn7a0w5vkoUu4VR0n5N+sM28jQbOCxpdY9P8SshFnwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TmrJW3xCCztqc; Sat, 2 Mar 2024 03:38:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 4223c3ch098537; Sat, 2 Mar 2024 03:38:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4223c3TP098534; Sat, 2 Mar 2024 03:38:03 GMT (envelope-from git) Date: Sat, 2 Mar 2024 03:38:03 GMT Message-Id: <202403020338.4223c3TP098534@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: 0d161f7b60db - main - read.2: Use .Fn markup instead of .Xr for read/write calls List-Id: Commit messages for the main 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: 0d161f7b60dbc0b0d0bdb8e0d289e196c22e831b Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0d161f7b60dbc0b0d0bdb8e0d289e196c22e831b commit 0d161f7b60dbc0b0d0bdb8e0d289e196c22e831b Author: Christopher Davidson AuthorDate: 2024-03-02 03:32:37 +0000 Commit: Warner Losh CommitDate: 2024-03-02 03:34:10 +0000 read.2: Use .Fn markup instead of .Xr for read/write calls Udpate both write / read references from .Xr to .Fn to eliminate self-reference cross reference. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1128 --- lib/libsys/read.2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libsys/read.2 b/lib/libsys/read.2 index 94644045afc1..123851128291 100644 --- a/lib/libsys/read.2 +++ b/lib/libsys/read.2 @@ -129,15 +129,15 @@ before the end-of-file, but in no other case. In accordance with .St -p1003.1-2004 , both -.Xr read 2 +.Fn read and -.Xr write 2 +.Fn write syscalls are atomic with respect to each other in the effects on file content, when they operate on regular files. If two threads each call one of the -.Xr read 2 +.Fn read or -.Xr write 2 , +.Fn write , syscalls, each call will see either all of the changes of the other call, or none of them. The From nobody Sat Mar 2 03:38:04 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TmrJX6F2Dz5BrQ8; Sat, 2 Mar 2024 03:38: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 4TmrJX4xlnz4kPM; Sat, 2 Mar 2024 03:38:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709350684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z9YDOrYSG43m7fj/ByCbdYQvVpxga+RLGIvZ5L7X+ks=; b=hhw9ksyggZUyoxyP0kyr/0IKcBM4oWQsIW/Uy8QrXepXeT5qYd5epOCUkmXgFeeEPhrVVO g4d0MEf4aDvnIqAXUU979gouBDm1ZgmlfZSlBxIzj3wQbfjoX6F74XpKH/n0SMgO4uwk5J rwMHNdH77DR18pZT4JAyuSoGCA4fohw9fRx11ndqW8QvzGkjF3v9aGvbK3BGw5UFCezCQq qdmeFiDn93CkwMelr07UqC6Dn8s06dglZyKz/kZTmin/zTJ7BfdQ6iKdDWopV2Txx6NrrE vXakY4py01LoWznt64/3IcB5/SCeWHO0x56VCLLO+SPWnbZ//W4B/I0YWpej0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709350684; a=rsa-sha256; cv=none; b=P+g3Oe2S2lLEK6Ac3XN3mW/L2w/LEBY5dRvl1Za9ZV2UWIHVmYvcgjsRRyVp7AgFFgp564 glCvogravAuzsA981627q2qzPGk9U2YJRlYAuGlLpVWeO1lMjWclw0n9wa1/TavdtuIp8J mvyNsfwgplXuPyl6x/eV+AAhIuCojSqV3GpQpsCpyr9Tb7szrEZK33QwmOog16o4mDIyjl Q1IlW2dYFf0cpyL/4WrwkC3EpQD/PrUJGPP3b+QxSmLb3qmrkg7Q1BeVWvjk2nn3PYgpxh 3Dbx7lxIZzEzN1Vy3KhedXhT63YPX6O1YoEO4zrOZ9Yecryrow9BVWvDWV9nkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709350684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z9YDOrYSG43m7fj/ByCbdYQvVpxga+RLGIvZ5L7X+ks=; b=WdGQBrU9/OdS1Se2Blvl4hfZzNv2D3bLkwAhmjdfqQ7lZSUvWsGex1nBWyZDRgSe2Ulh+Y gVhck62iHhc2uSclnfa97GWS7IZfABQ2vtMcFrcn5/Q6pF53+CpVf9sJsyuRUOA8IU7qDg 9VPbgiWwihBO4UKu3UY0XYr7Ir2MsKCQ2dHD9Pe5i+7OWxvWYRKjmIN125LVgsLgkaX35Q RonApuK0QBnnh/1Jcrl2krvAc9IATZ3ZXAZJy7G+tp7fBH4uXejrUoFEe2FvnpC6Lrm7AM IalN3I3pO27sZcGTjwBAa3eJiSyAOLUeSfTPVBJ9r5GLY1LzCdSxK2faRVxrMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TmrJX4YY0ztpW; Sat, 2 Mar 2024 03:38: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 4223c4xE098579; Sat, 2 Mar 2024 03:38:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4223c48o098576; Sat, 2 Mar 2024 03:38:04 GMT (envelope-from git) Date: Sat, 2 Mar 2024 03:38:04 GMT Message-Id: <202403020338.4223c48o098576@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: beadbca67bd8 - main - read(2): Add write cross reference List-Id: Commit messages for the main 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: beadbca67bd811ae6e6f4f4aff683026af90fd3c Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=beadbca67bd811ae6e6f4f4aff683026af90fd3c commit beadbca67bd811ae6e6f4f4aff683026af90fd3c Author: Warner Losh AuthorDate: 2024-03-02 03:36:39 +0000 Commit: Warner Losh CommitDate: 2024-03-02 03:36:39 +0000 read(2): Add write cross reference Add a write cross reference in the SEE ALSO section. Sponsored by: Netflix --- lib/libsys/read.2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libsys/read.2 b/lib/libsys/read.2 index 123851128291..4c0f3f5b3f1c 100644 --- a/lib/libsys/read.2 +++ b/lib/libsys/read.2 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 10, 2024 +.Dd March 1, 2024 .Dt READ 2 .Os .Sh NAME @@ -286,6 +286,7 @@ The file descriptor is associated with a pipe, socket, or FIFO. .Xr select 2 , .Xr socket 2 , .Xr socketpair 2 , +.Xr write 2 , .Xr fread 3 , .Xr readdir 3 .Sh STANDARDS From nobody Sat Mar 2 05:03:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TmtBl5CdFz5C0Q0; Sat, 2 Mar 2024 05:03: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 4TmtBl3PGpz4tFj; Sat, 2 Mar 2024 05:03:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709355791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LU33pCy9Pq9Tg95VDFeCDrIkh5ir0J5VXuUG3NzcK9c=; b=vwOwAeRnH3C/R3vZ57g/XywU0MzTAY8aDuEx6s4r805n4NkiIY7PISgoLVezQakA8sj15d 9Sxyg9IcIdsikO8JYxmTf88VdD7hL5N2DLAdjcvc2NbJAowpYxtg1/rXyQQMwvjXqcpn9E u2/unhfH8F4sZjyasXXtPZpgHbf9H0kuEs6JCDu2yDyL+GKdqKIQenztjr4RD3zVc8WrA7 +FZvbsARcYYD92V4LW0cTBAsF8i89rMBhinkves8mwgOgHl72Y9uLY+f7kzCHQMKjhAV5t OJGVCr1xgTEKWMsMrSbDR5KUBhPGojcpauNLKW7EV1vZJ7t+KEf7LXQ5NzzjNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709355791; a=rsa-sha256; cv=none; b=U4KBZx24/5n+Aus8joMJe6dsj6gRplCRtHkqP1LczQhOsXs3UXNk+Fsmg7RYwfQo8x1FJL bQ6y3K3wQfjYYYFF7DyfeFfCOrZvX+oBgUfNncNKzO/nX7qnBbAAEbdr3mdH6enLN6Jk4c jfheNAzAJT5hkxt0Amwz4ngciBYA3SR3cDnvUSIlcR7IBlA5ckpH42ZsrCfK89/E/zjuCu BkwtgjbmUDmdiWg82LGD0IVOoOXWQfa8RKng87DFAshEKlALBxMAZNWI/7OhRb236gmqfM grZmvhN0PcJhvZvgk1Amk1siu6u0oLiMWcIfQOZVKwdCidSp5Ja1imjsKLmMHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709355791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LU33pCy9Pq9Tg95VDFeCDrIkh5ir0J5VXuUG3NzcK9c=; b=B9NnLEQgM379ieBNqPZGJfTVtwbCQEwYTb9fpQFovwobAaREJbjlt4N3WT0CFIf91oVOVw HGOIjwz3Ju9aM7s5+KJ9WTYof90KZFT8NWYAvQ6ubMwRJ/fMpHFxejaPFZ1nDuU5HOywSL /vk9IkF24/+TURCPGFYpR5ahWEdOjkBOPzAP8Zbz1sdGyBF9FAdPUTCqDjRZxMGKETlHjV MmSqqZk82CvBq8VenUG5qI612XWJ71HScS2Xle32BOftou914OxTtWwulR+8JpKy3eN+Yt zZTM8fHDbZsA78/yo0Wjk9gI01QrjUe9rkJ4bcnK9MzdNTNeF+7pkq4oOQ1ndA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TmtBl30Ppzx8X; Sat, 2 Mar 2024 05:03: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 42253BNc051593; Sat, 2 Mar 2024 05:03:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42253Bun051590; Sat, 2 Mar 2024 05:03:11 GMT (envelope-from git) Date: Sat, 2 Mar 2024 05:03:11 GMT Message-Id: <202403020503.42253Bun051590@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 7e4ac11b6076 - main - getblkx(9): be more tolerant but also strict with the buffer size checks List-Id: Commit messages for the main 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7e4ac11b6076e6a9bf7341ddeae22784284ed733 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7e4ac11b6076e6a9bf7341ddeae22784284ed733 commit 7e4ac11b6076e6a9bf7341ddeae22784284ed733 Author: Konstantin Belousov AuthorDate: 2024-03-02 04:58:57 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-02 05:02:55 +0000 getblkx(9): be more tolerant but also strict with the buffer size checks It is possible that on-disk filesystem format causes allocation of buffers of size larger than maxbcachebuf. Currently, getblkx() and indirectly bufkva_alloc() panic in that situation. It is more useful to return an error instead, allowing the system to continue running. PR: 277414 Reported by: Robert Morris MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/kern/vfs_bio.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 4e0832475c3e..b5466fb2cd53 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -3985,9 +3985,11 @@ getblkx(struct vnode *vp, daddr_t blkno, daddr_t dblkno, int size, int slpflag, ("GB_KVAALLOC only makes sense with GB_UNMAPPED")); if (vp->v_type != VCHR) ASSERT_VOP_LOCKED(vp, "getblk"); - if (size > maxbcachebuf) - panic("getblk: size(%d) > maxbcachebuf(%d)\n", size, + if (size > maxbcachebuf) { + printf("getblkx: size(%d) > maxbcachebuf(%d)\n", size, maxbcachebuf); + return (EIO); + } if (!unmapped_buf_allowed) flags &= ~(GB_UNMAPPED | GB_KVAALLOC); @@ -4161,6 +4163,12 @@ newbuf_unlocked: vmio = vp->v_object != NULL; if (vmio) { maxsize = size + (offset & PAGE_MASK); + if (maxsize > maxbcachebuf) { + printf( + "getblkx: maxsize(%d) > maxbcachebuf(%d)\n", + maxsize, maxbcachebuf); + return (EIO); + } } else { maxsize = size; /* Do not allow non-VMIO notmapped buffers. */ From nobody Sat Mar 2 15:39:12 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tn8Jc5mZ2z5CRx1; Sat, 2 Mar 2024 15:39:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tn8Jc4jKSz43T0; Sat, 2 Mar 2024 15:39:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709393952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VgZFvdIZkqK76hA6vx73QRUCvI+K/gARW+U54haxNtI=; b=BQD/wBdabN5p2KP0ejg8HSQuEWHpZknEHcGd//ZVtUFavg3oe1TvzJeGtJUdTGjEqKSJE1 mM5EAHkigoPpLqtiY1WvNi/Qc8Z6nccRsfpdcaB4M5Ar/GuJVyj53eMWS6jf3Z1Ui9Jvcw PgTPuO+y3DQ3XlrG6lvr+Y5NauVPkvp7qi/UCk8oopSxub9MgZvjsBcI+uHOozWyYLxWNx NZmoVh08rQmzq1a4LtMoOtEdf+HetJ93/CkzKP3beIMfItigqPCFzTqqSNRRQPUgFG2a2N HtVek7e9SYhyAaLAhN4aBHPoU9fQGfGoMieYU5x1JetugErFdjL6cLCpp1jlQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709393952; a=rsa-sha256; cv=none; b=FwyBBUUVihi7kZUEiJxyJ9ix7K51iegmr4yMsd48PXbfPJ5TB6btpU0cC/K8v3RJLl8zym L727ihz8WKUAn7jXRc7OeQhsXnrFV+S/AFgK+70N4igB0IkTFvD4757arX12RGDDGnvKHB o529OH+MTkW+WBa27bs7NdmidIuD+cf5cIXSBSuOcmy5Foxp68ljKn3d6NTaBQHWhmqhMH B0t7VJ6l2w7xWCk/X+0bCH+PvHEdEl0DLet9LS/9MqMYnmNMsaWBwnAHQPrORyIxZjKhwb dx+JC7lZNs/lKvGtB9MYRda6vsUjnXBXdUbAMRnBTlvURCd5YoyHAUoD7xwSow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709393952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VgZFvdIZkqK76hA6vx73QRUCvI+K/gARW+U54haxNtI=; b=xadLuUzQQGYBXWKWv6SYh1M21qpbJvaqrt4VSSfp/1XmPdtVP/GjY/rnKpWkIA9J/cup0K FUHK4rH6BZLUJadFLa0cI6R2WdPJNz2BWZi3KQi+WjB4YZvAqfnJ4tY3UUFfiGY60fxQi8 LLgomH8ZVyXuhE9ox2LK4/7SMP/FSVNmBnFuv8M6O5hAablwTNl6fCcoVhHdS/r4UZqfO8 GJMq5Onwzb34Bgc18q1gquBZsytW/1/QVkFEdwtUJv4EHYuoT5NBdWPgoWpU6o51JywKWk tn2O11e47WRT80BOvdflTl6tMX8DZetDWJiJEB6/tXSO3t7wr/eNfGvTtuDXKA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tn8Jc4JSkz1Fff; Sat, 2 Mar 2024 15:39: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 422FdCSj017093; Sat, 2 Mar 2024 15:39:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 422FdCXl017090; Sat, 2 Mar 2024 15:39:12 GMT (envelope-from git) Date: Sat, 2 Mar 2024 15:39:12 GMT Message-Id: <202403021539.422FdCXl017090@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: 42b117a4bd10 - main - gpioevents: Fix build with newer Clang List-Id: Commit messages for the main 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: 42b117a4bd104246589149fa9f7b9b7ddc144f23 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=42b117a4bd104246589149fa9f7b9b7ddc144f23 commit 42b117a4bd104246589149fa9f7b9b7ddc144f23 Author: John F. Carr AuthorDate: 2024-03-02 15:38:04 +0000 Commit: Ed Maste CommitDate: 2024-03-02 15:38:04 +0000 gpioevents: Fix build with newer Clang PR: 277422 --- tools/test/gpioevents/Makefile | 2 ++ tools/test/gpioevents/gpioevents.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/test/gpioevents/Makefile b/tools/test/gpioevents/Makefile index 7976bd03174a..4bc4422ae333 100644 --- a/tools/test/gpioevents/Makefile +++ b/tools/test/gpioevents/Makefile @@ -8,4 +8,6 @@ MK_MAN= no BINDIR= /usr/bin +CWARNFLAGS += -Wno-gnu-folding-constant + .include diff --git a/tools/test/gpioevents/gpioevents.c b/tools/test/gpioevents/gpioevents.c index f1bc8e8ee224..43bad610cb68 100644 --- a/tools/test/gpioevents/gpioevents.c +++ b/tools/test/gpioevents/gpioevents.c @@ -61,7 +61,7 @@ sigio_handler(int sig __unused){ } static void -usage() +usage(void) { fprintf(stderr, "usage: %s [-f ctldev] [-m method] [-s] [-n] [-S] [-u]" "[-t timeout] [-d delay-usec] pin intr-config pin-mode [pin intr-config pin-mode ...]\n\n", @@ -152,7 +152,7 @@ print_poll_events(short event) } static void -calc_utc_offset() +calc_utc_offset(void) { struct timespec monotime, utctime; From nobody Sun Mar 3 05:15:33 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TnVQY3M4kz5ByZK; Sun, 3 Mar 2024 05:15: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 4TnVQY2Yv0z47dy; Sun, 3 Mar 2024 05:15:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709442933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qcUWDgM+SgbYR7s+gLhqMOQ6Y3mRmoZ2TZrHubqFNFM=; b=psZFvg6cZnjBA+cXvpITBSwoqYwa3L6tsexbtfsoyY+Qiko44AmJFk7fNUFqPxQ0x5HSP0 6LcAkHiwqx+ocQt56xdVkL224TJrYzSZJKyNawHl1TpAiJlfvoqGVghv5iN+ZalzZSTQUC lidIHp2b9t71bZlAkynwAj25mKmrrXf5uNdJ2N0zGc/CJX/0XKo6aAH8O9WS1EBszSI1nU yQSsjwfrg8VlV9uNEzzT3uGfLHXhOcaApBDRXT6fORC7sO7w+fWeGnCiIKkCYXVJpAnxLg j6LEc7D1fccOp9WejAdfTOQOfzSahko/UrAfrOjx9WbH9yMgxoCOqoAaJiZrUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709442933; a=rsa-sha256; cv=none; b=PRiRCmV6V3spOV6phxIuScW6Fi4nrjTtqFVg5whbfBjvuCQSmZuMoe6ZhPARgA9xO5Sr0U HPXLVrZDqeUKpCkAvVSi8X60mQN/VBnxjX360GgyEfI7ux6YAOiRHU/KX5M+dAwB6VOAUm wRc9LTMM/SFjGUBiRG8mJbGEEj6rQMf0tvHeDkoIUQgNjKnkXUs01mmqxJ/L9fNOgMRgkB PpRDUF+8IJSFjZXDfYpBOm3vtxi6HNy4zbrybiVwxra8pAn5li/Gvd7+NX1nr30hQb91ra LiJnoANBXh1YHBzoh1Kd2hRJtXOPLCSA/OkkIQJEVYb5Xjtxr1848zEZyw/SfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709442933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qcUWDgM+SgbYR7s+gLhqMOQ6Y3mRmoZ2TZrHubqFNFM=; b=aoFde6iUwn1C3NHThMjhGOq7lG1CpUGldEre9typaa5dPYPXqPnqE/mfuoLLQgAbW5ZUk9 HT8H41CLzyLeuxFjRH2xr05iJfobNDCEQOETR+9SjHEZ/5+rShJqCTNcxF3kq6lTgnToVr x+nsjJGEHu1W6bTyM3STe4vw3xjdtNTjYJJwm89z5sUr0YAGYdA1Hv1GGv2qdeP9mmstQi 7fIhZvmoaH0fAb7/1/hlFjYboeg73z9ErpOlDAeNbbEoWeFGQsvY4oDiaxtZTC001Al7BC StMMRvY1w7JrTKXR5WKdk6KTquNnu0IVfSLl0tD6ZNrguePCtyTeub5gfdG7NQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TnVQY29JkzQ1S; Sun, 3 Mar 2024 05:15: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 4235FXvG002643; Sun, 3 Mar 2024 05:15:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 4235FXrV002640; Sun, 3 Mar 2024 05:15:33 GMT (envelope-from git) Date: Sun, 3 Mar 2024 05:15:33 GMT Message-Id: <202403030515.4235FXrV002640@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 2496fb72cf37 - main - sys/mount.h: align values of MNTK_XXX flags List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2496fb72cf37bb9aa0cbd108ded06324ea52bd11 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2496fb72cf37bb9aa0cbd108ded06324ea52bd11 commit 2496fb72cf37bb9aa0cbd108ded06324ea52bd11 Author: Konstantin Belousov AuthorDate: 2024-03-03 05:14:11 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-03 05:15:12 +0000 sys/mount.h: align values of MNTK_XXX flags Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/sys/mount.h | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 529263204bd6..ac84c99ac74b 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -479,37 +479,39 @@ struct mntoptnames { * the filesystem to cancel operations that might otherwise deadlock * with the unmount attempt (used by NFS). */ -#define MNTK_UNMOUNTF 0x00000001 /* forced unmount in progress */ -#define MNTK_ASYNC 0x00000002 /* filtered async flag */ -#define MNTK_SOFTDEP 0x00000004 /* async disabled by softdep */ -#define MNTK_NOMSYNC 0x00000008 /* don't do msync */ -#define MNTK_DRAINING 0x00000010 /* lock draining is happening */ -#define MNTK_REFEXPIRE 0x00000020 /* refcount expiring is happening */ +#define MNTK_UNMOUNTF 0x00000001 /* forced unmount in progress */ +#define MNTK_ASYNC 0x00000002 /* filtered async flag */ +#define MNTK_SOFTDEP 0x00000004 /* async disabled by softdep */ +#define MNTK_NOMSYNC 0x00000008 /* don't do msync */ +#define MNTK_DRAINING 0x00000010 /* lock draining is happening */ +#define MNTK_REFEXPIRE 0x00000020 /* refcount expiring is happening */ #define MNTK_EXTENDED_SHARED 0x00000040 /* Allow shared locking for more ops */ #define MNTK_SHARED_WRITES 0x00000080 /* Allow shared locking for writes */ -#define MNTK_NO_IOPF 0x00000100 /* Disallow page faults during reads - and writes. Filesystem shall properly - handle i/o state on EFAULT. */ +#define MNTK_NO_IOPF 0x00000100 /* Disallow page faults during reads + and writes. Filesystem shall + properly handle i/o state on + EFAULT. */ #define MNTK_RECURSE 0x00000200 /* pending recursive unmount */ #define MNTK_UPPER_WAITER 0x00000400 /* waiting to drain MNTK_UPPER_PENDING */ /* UNUSED 0x00000800 */ -#define MNTK_UNLOCKED_INSMNTQUE 0x00001000 /* fs does not lock the vnode for insmntque */ +#define MNTK_UNLOCKED_INSMNTQUE 0x00001000 /* fs does not lock the vnode for + insmntque */ #define MNTK_UNMAPPED_BUFS 0x00002000 #define MNTK_USES_BCACHE 0x00004000 /* FS uses the buffer cache. */ /* UNUSED 0x00008000 */ #define MNTK_VMSETSIZE_BUG 0x00010000 -#define MNTK_UNIONFS 0x00020000 /* A hack for F_ISUNIONSTACK */ -#define MNTK_FPLOOKUP 0x00040000 /* fast path lookup is supported */ +#define MNTK_UNIONFS 0x00020000 /* A hack for F_ISUNIONSTACK */ +#define MNTK_FPLOOKUP 0x00040000 /* fast path lookup is supported */ #define MNTK_SUSPEND_ALL 0x00080000 /* Suspended by all-fs suspension */ #define MNTK_TASKQUEUE_WAITER 0x00100000 /* Waiting on unmount taskqueue */ /* UNUSED 0x00200000 */ /* UNUSED 0x00400000 */ -#define MNTK_NOASYNC 0x00800000 /* disable async */ -#define MNTK_UNMOUNT 0x01000000 /* unmount in progress */ -#define MNTK_MWAIT 0x02000000 /* waiting for unmount to finish */ -#define MNTK_SUSPEND 0x08000000 /* request write suspension */ -#define MNTK_SUSPEND2 0x04000000 /* block secondary writes */ -#define MNTK_SUSPENDED 0x10000000 /* write operations are suspended */ +#define MNTK_NOASYNC 0x00800000 /* disable async */ +#define MNTK_UNMOUNT 0x01000000 /* unmount in progress */ +#define MNTK_MWAIT 0x02000000 /* waiting for unmount to finish */ +#define MNTK_SUSPEND 0x08000000 /* request write suspension */ +#define MNTK_SUSPEND2 0x04000000 /* block secondary writes */ +#define MNTK_SUSPENDED 0x10000000 /* write operations are suspended */ #define MNTK_NULL_NOCACHE 0x20000000 /* auto disable cache for nullfs mounts over this fs */ #define MNTK_LOOKUP_SHARED 0x40000000 /* FS supports shared lock lookups */ From nobody Sun Mar 3 20:57:10 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TnvK23VrZz5CJGw; Sun, 3 Mar 2024 20:57: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 4TnvK230DJz434T; Sun, 3 Mar 2024 20:57:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709499430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bpmIyFEOL6kBVQLN5AMTXn9QHBvZkdbDwJX0JvINOIk=; b=o0YKNJPOsWNtRi/KnEehqxLXfePblZqqylZQ3fx8AtVHfdZ1dH8rmEe9Bgt1E+G81Yyfoc UeF39zRw7FK6yexxRkOHahcQfgqsLIWg+wrOiWoPNBEkWBMLP1/CD+2B6X5B4hv2nA3lqv lrvx+tZdsooisJSptkkAxEeMkc5CGnDuMGPe0lnJKaH2o7rQXYVFkFIITyHYXcFNHeOYL7 p7jKIEgna4XB7tkXcOpG4b0oY+RG0WOjWSbAMqrdmpJBEGzhlwpL0nhdsGgXe2VG9qwbBt 1zorlrZXivVopQS3+JzDBfUi98qZl3WBRfZ9nIlY5D5osvM/DUmaHTZD/HsQSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709499430; a=rsa-sha256; cv=none; b=h0R3SVRZ22u38+E8oWGojoI26JBL8IoyRUq2/PLjdq0Y9FunSbB27KS7+v58Veu3T8EeEk 4uTpo/0d4w026emc5zvD08u7VXIcVRBI6mEBwRq9rwxOgrIYIbBl/cNf8ygdjesdys78Sd L7oWrHlunT4SNhGDYdLR1lAsbfFunNYl2VfNXYHKLm227jOmEHyP6NZk6KRICH4US1Gs1v 9LRt4Eo4rCgC5fqvQx8jl+FH9TKadYOXipOSjih92CR5Eqj6iMs63d90eKB0mVu1gG8UBq m/kRDn3b61lh+Zbk9M9aWugDRJ7Y18MTAuUSUuSqK9G8EytXXONpdeiVQC+Jag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709499430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bpmIyFEOL6kBVQLN5AMTXn9QHBvZkdbDwJX0JvINOIk=; b=o4JVPSW4ngBzBI1saT4Yd0uJ3JbW+SCf3T8NjstzqNjW1sKQa7JJuIElwPnQ/DlHsbdxPO h83v6B9Rieg0snmNhkgCSXWXqrIwih0En7xvOR+ossfTpqS21xMUXyJu00FyYiTedlHyJq i5gkkD91p6Ogc+E+AgbHu9vX1KU3uRKAvGWrfvKO1ujhtzpRHMLTLHDb6lG23DQF58LHNC KDrm2m7emqO3BYP8Xhym4hfLSLqgjXN73ZOV64TaRzOXwYTrVPXMXtKMxC6Do3ZFBHiXnX uPWoEPcwTaxIARGpp2WCm4YQM681RCSOt/FeoeWNpeUHlOL9adroPADVuz7MBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TnvK22X15zshZ; Sun, 3 Mar 2024 20:57: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 423KvAUS089012; Sun, 3 Mar 2024 20:57:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 423KvAAr089009; Sun, 3 Mar 2024 20:57:10 GMT (envelope-from git) Date: Sun, 3 Mar 2024 20:57:10 GMT Message-Id: <202403032057.423KvAAr089009@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 2f5a315b3074 - main - linux: require vnet(9) context in ifname_bsd_to_linux_name() List-Id: Commit messages for the main 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2f5a315b307447f91891c96fb23c7333fa406f2f Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=2f5a315b307447f91891c96fb23c7333fa406f2f commit 2f5a315b307447f91891c96fb23c7333fa406f2f Author: Gleb Smirnoff AuthorDate: 2024-03-03 20:56:58 +0000 Commit: Gleb Smirnoff CommitDate: 2024-03-03 20:56:58 +0000 linux: require vnet(9) context in ifname_bsd_to_linux_name() This function is used by netlink(9) only. The netlink(9) taskqueue thread runs in the vnet of the socket whose request the thread is processing right now. This is a correct vnet and resetting it to vnet0 is incorrect. If the function is to be used by any other caller in addition to netlink(9), it would be caller's responsiblity to provide correct vnet(9). Reviewed by: melifaro, dchagin Differential Revision: https://reviews.freebsd.org/D44191 PR: 277286 --- sys/compat/linux/linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linux/linux.c b/sys/compat/linux/linux.c index 569f9ffe1617..69849b1d98ad 100644 --- a/sys/compat/linux/linux.c +++ b/sys/compat/linux/linux.c @@ -253,14 +253,14 @@ ifname_bsd_to_linux_name(const char *bsdname, char *lxname, size_t len) struct ifnet *ifp; int ret; + CURVNET_ASSERT_SET(); + ret = 0; - CURVNET_SET(TD_TO_VNET(curthread)); NET_EPOCH_ENTER(et); ifp = ifunit(bsdname); if (ifp != NULL) ret = ifname_bsd_to_linux_ifp(ifp, lxname, len); NET_EPOCH_EXIT(et); - CURVNET_RESTORE(); return (ret); }