From nobody Sat Apr 29 19:27:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q7zyd1WQTz489JD; Sat, 29 Apr 2023 19:27:53 +0000 (UTC) (envelope-from jah@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 4Q7zyd14LMz3QZD; Sat, 29 Apr 2023 19:27:53 +0000 (UTC) (envelope-from jah@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682796473; 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=X2zKEPELg+0AqjoxalmfTECiiw5mxhXdyi1Z0BsYgwE=; b=pu5GTH4ZdHwqk2wgbH65vBvAj86JSnUR+kPg/g63aQflqbTLH4syMQ5fFJAMv2EJIif+e5 KrycnoL6cdBaWg5hf2khBDAyCxtOfifY2O2gJ4PK+pRVf87NNwOFpKmTV9Trgy81rvE+nS ql6HVsjx8nUna1S5YCSNocvShykMS48GL890+YIMXPBaIACvwX9zBZV4TGMCDNDKLZ4DCK rFmh3G+0/zZs7xlSjtumcF7ZjGRGOniiDH9lW5+Qghl2rJWjcLUXS3MMd3HaoCdTJSYSWF lzA6sSxHc0Fj/um9CDdEBvQcZCSv38o4j/VrAQ5OUujjxd2GaVd6D7uLjOH9kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682796473; 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=X2zKEPELg+0AqjoxalmfTECiiw5mxhXdyi1Z0BsYgwE=; b=W+WN389Secwl8Pfcvi5tfPm0AgrxHPpM3GRbWaDqdDbT4j0cbjVxvf4fPQZVCFvenB7QDO QYsg1hIaY6B+U8LuRV2v9bQLjTTOfhNOOxuKE/sLJB7xxhztmNMvm48Juw/MZ1P+WqGyHA 48hRgZKkiflz77Zq/njC1Ye/VjZvI3KTuOTWVAAX7EXp3ymskOBbugPnCML843/nMehbOX nWWi715KZMMT5fE/IDvmN2zawGee115ypREtgikdnxX/FF+UgbHFYA7Cytzt/YCAsKfMqt M22Pq6NY9tTdc5g6NFL2Pu1EHh0FJOY0YeH58GYgQPfqpkCc329Q8VptDJkb6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682796473; a=rsa-sha256; cv=none; b=gscXbGJlLBYOLSYuWARCj7gObNkrPono0MoTSfA1cvFbfId0pTEVaP8eLrito+M9fl8TD2 AobfXvCL612c6rjxri8nbfzle5GyNTuoEQSNFWmFyfX0u4oqYUYQnMk9X8mOXWIzPub869 mi8JfiuvfR3HGoeakAGwl1nM3+BAJhvkpwOrHh2b/YeBQUY/n7yOcPH5/c1bEz1W//pzcI g98Boxjg+p0w8fsQI20/tH0uF7en4nGerHFBJXKIi9tIyt0CkpWHDRWuaNKVg2nlVu9P9y ikDmFvU1W06Hp4r40pUt36QpcWdUpvYH57Rl4mWdE5W+lMB/wumGBAbfPlK3vQ== Received: from corona (047-232-115-243.res.spectrum.com [47.232.115.243]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jah) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q7zyc4vPjzvW1; Sat, 29 Apr 2023 19:27:52 +0000 (UTC) (envelope-from jah@freebsd.org) Date: Sat, 29 Apr 2023 14:27:50 -0500 From: "Jason A. Harmening" To: Dimitry Andric Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Subject: Re: git: 060699e91369 - stable/13 - Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6 Message-ID: References: <202304092135.339LZMeJ081640@gitrepo.freebsd.org> <76DD2CB9-986B-4349-8F46-3B7BF63EB315@FreeBSD.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <76DD2CB9-986B-4349-8F46-3B7BF63EB315@FreeBSD.org> X-ThisMailContainsUnwantedMimeParts: N On Sat, Apr 29, 2023 at 08:49:28PM +0200, Dimitry Andric wrote: > On 29 Apr 2023, at 20:33, Jason A. Harmening wrote: > > > > On Sun, Apr 09, 2023 at 09:35:22PM +0000, Dimitry Andric wrote: > >> The branch stable/13 has been updated by dim: > >> > >> URL: https://cgit.FreeBSD.org/src/commit/?id=060699e9136975d51d3f726b9785bdbac9a62ba6 > >> > >> commit 060699e9136975d51d3f726b9785bdbac9a62ba6 > >> Author: Dimitry Andric > >> AuthorDate: 2023-01-14 16:33:24 +0000 > >> Commit: Dimitry Andric > >> CommitDate: 2023-04-09 14:54:52 +0000 > >> > >> Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6 > >> > >> This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and > >> openmp to llvmorg-15.0.7-0-g8dfdcc7b7bf6. > >> > >> PR: 265425 > >> MFC after: 2 weeks > > > > This MFC of llvm15 appears to have completely broken the Intel IOMMU > > driver on my stable/13 machine. After this series of commits, any > > downstream DMA seems to produce an IOMMU translation fault, which > > renders the machine completely unusable: no nvme boot disk, no usb > > keyboard, etc. > > > > The faults I see look something like this: > > > > DMAR4: ahci0: pci0:17:5 sid 8d fault acc 0 adt 0x0 reason 0x3 addr 26000 > > > > It's a bit surprising to see a toolchain upgrade produce breakage like > > this, but that's what git bisect clearly tells me. I wonder if some of > > the IOMMU control structures might be defined as C bitfields and the new > > compiler is emitting them differently? Also, was any breakage like this > > observed when -current was upgraded to llvm15 several months ago? > > I haven't heard anything about such breakage, no. > > > > More generally, this is the second time in as many months I've had to > > deal with IOMMU breakage on -stable. I can't imagine I'm the only > > person who sees value in running with DMA remapping enabled; do we need > > a dedicated DMAR-enabled machine in the cluster to smoke-test changes > > like this? More generally, should we avoid MFCing high-risk changes > > like this? > > Since there were very few bug reports, it was not deemed high risk. > > In any case, it would be good to get the bottom of what is causing the > problem, so is there any way you can isolate which code seems to be > going "bad"? > > For example, if this problem affects code in sys/dev/iommu, is there > some way you can compile that part with -O1, or with an older version > of clang (from ports), to see if the problem goes away? I did try removing all custom make.conf settings (previously I just had CPUTYPE?=icelake-server), but that didn't change the behavior. Before I try further build tweaks, I'd like to ask if the IOMMU fault report can provide guidance here? AFAICT all the faults I'm getting show "reason 0x3". If I'm reading the VT-d spec correctly, FR=0x3 indicates an invalid context entry, in other words there's something the hardware doesn't like in the way the address width or pagetable base is configured for the PCIe requestor. > > -Dimitry > From nobody Sun Apr 30 00:01:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q862X0gQBz48RLX; Sun, 30 Apr 2023 00:01: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 4Q862X0CXBz41kS; Sun, 30 Apr 2023 00:01:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682812900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dL+0iZ3GKlpofE31jDZ10FcFu2aYqxxNJMB63MkKXCY=; b=AK6b23LGmunnDbsnMn3Z+HRQm4GYfG69jiasBn8gbee8tUsEw4MbpBigBEJXOpnZjRMi5V zlXps5m/yD4IlONyb2G2xAtRJ5bLcFgAqEoKXKT91HtVyRE/gIgVM2XbdxmdHj8/uk4wpt A0+6zUili5qzsJUorhOXJctm+/pSSm7QjAPd8kkpVGxMtDOvqfcQIUvBNfEkRj/A5gLJ4S BQRtsBOCTky5GUvoETSohalUK6Db5cW2D54MKnHY/IeKSTCJYS0nr0s/GnH7JXlM9BxIyz WdGsAjxBFIXKj27bjMoSfu4+h7/OP+58RFzCanzAMaKLN/lTPyLue9zkDKsJSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682812900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dL+0iZ3GKlpofE31jDZ10FcFu2aYqxxNJMB63MkKXCY=; b=u1zWKVbDV9QAdxpciutBdGRhbexESAJkfo5W+sgtOsLhwsP9rzxZWEaTTxNIthCeLqoYUv PLW9+AiA3CRwHD/Oc6tpoXzZ+Mo8wb70a5A6xsIUUSaIrByECEJoCzL0aN1avkIyInIUa/ P/7K/KAwC5JBSgtGgza1EvEJnn4Y0FdkSJkvMNmefbjse2utYYcblTwiFISEtgi7U80mzE KJ5CbTM3KrR/IZSlv0LoHT+yOfzkz0+tFS/WIXIw7KLE7Ffi6cfogAVzupk32q0JBzwXm2 oc2moQbvzUaYyKQvDX0D/hT8R6fbg85yZ6Wza7j3ikSKsqhj2pryfN0nTRD0SQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682812900; a=rsa-sha256; cv=none; b=WwNpn3YEEJSBOcogIVNCgXXVQFTQRdK734KDm1HQBjWzmg4iBtW0xNLjB9jRk+AytSjTw8 xKjfvpHSyv/YZor03/2BpWL/4fKLSUORMcyqRk+VwSQVNdYW5ApQH9p+X7TVn17jmsBzib ld8Ihgj0841bXaj7UNZQ7JwUnErK34HTyJc+R7TLk6QHXmHbtuiqCBA0wXGUNi7AGqYeA1 UTBFI9/yVa/2GXtqTZry2XPYuy9NS2XfdErbkpXJgTEvz5H88Fb+b1tLAzlWBo51mpJNZ+ QGQjPpUcpgjVjrHiYBgXlTXN5xDs9r7pNRYz/pcC3WFHfRv/jMDX7H81GQPZhA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q862W6NR1z11xw; Sun, 30 Apr 2023 00:01:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U01dbP090362; Sun, 30 Apr 2023 00:01:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U01d2m090361; Sun, 30 Apr 2023 00:01:39 GMT (envelope-from git) Date: Sun, 30 Apr 2023 00:01:39 GMT Message-Id: <202304300001.33U01d2m090361@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: 04997e19e27b - main - Additional output from dumpfs(8). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 04997e19e27b240f9fd253f3eb1053708ca99c51 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=04997e19e27b240f9fd253f3eb1053708ca99c51 commit 04997e19e27b240f9fd253f3eb1053708ca99c51 Author: Kirk McKusick AuthorDate: 2023-04-29 18:41:23 +0000 Commit: Kirk McKusick CommitDate: 2023-04-30 00:01:18 +0000 Additional output from dumpfs(8). Provide an additional line of output for the superblock giving the computed size of the cylinder group (CGSIZE macro) along with the details needed to calculate it. MFC after: 1 week --- sbin/dumpfs/dumpfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c index 4983645156ff..01b475a03fea 100644 --- a/sbin/dumpfs/dumpfs.c +++ b/sbin/dumpfs/dumpfs.c @@ -245,6 +245,8 @@ dumpfs(const char *name, int dosb) default: goto err; } + printf("old_cpg\t%d\tsize_cg\t%jd\tCGSIZE\t%jd\n", + afs.fs_old_cpg, sizeof(struct cg), CGSIZE(&afs)); printf("sblkno\t%d\tcblkno\t%d\tiblkno\t%d\tdblkno\t%d\n", afs.fs_sblkno, afs.fs_cblkno, afs.fs_iblkno, afs.fs_dblkno); printf("cgrotor\t%d\tfmod\t%d\tronly\t%d\tclean\t%d\n", From nobody Sun Apr 30 00:01:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q862Y51lyz48RPv; Sun, 30 Apr 2023 00:01: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 4Q862Y1QG8z42HL; Sun, 30 Apr 2023 00:01:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682812901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bPU1g2n7m3TnRqB6GtuoS0kywG2Qaj0CWF9lWUeh+C0=; b=kjKaInDHLXAdimH8aPBwjGbjXF9mmizWyhQYLBqOowOkBnnFAi1yTN7cIEqfWcE2jgbIeH iJ06Jl8gN3sZvbufUme+Bzhgo8AX36Tsi0mgQjQCbEYMkNoe0FJVizuI9Emjd4f+WT6vX5 euXp/VdmKrIalN/BnXxf4JGjrtyIQ0rymT/Q2OidVhh3wvMUZyt1MOb+E1sua36GsaWw3m PswLb6K8do6tR8I1XvkK9PZKiV5FS/EoaRC3rGLqSQPPqXfW3ZvMETX7ye1px7XHev9nY3 Kcglex6XPCoFq2Ianbp+R298aTHr4zUcHGb77hnFfs4tLejN8/0lNiEFdLBIEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682812901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bPU1g2n7m3TnRqB6GtuoS0kywG2Qaj0CWF9lWUeh+C0=; b=eUekc/hkfdtxcCuzO0zlpkyHQQFbtrjS5w6PW1zMtBqBbBAi/EmcTX6iRdGsDPDg178Odc eZ6QGwjyDe8KHgj8R1nf1AMWIG2RuYCb7wZOKqRzt6jATZaV3j9HeTpaZ2ssvyHKFRK65C KS8obzA3BXkU6sPW0EtikxLT0nhHNcVMU+XL/if9ZMFN8zjW5ltjp8tUZ48FLUfr++TTnb Q+S6h/kkir9lAkImy+kddiLlLquKv9yH078v9a1+SkWI9flPzLZEQlDkRiB758UU7Fn/B1 +JGSWIRmaDgeN63ZwIGltTi9wACf5zC4JFixMiK34xPG3CGtufTPahOdsAoKEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682812901; a=rsa-sha256; cv=none; b=xhkb0EB7IyRjyZbHA5F5Y1MAUrgsa0AQQtavbhbotR6OAGY+N1viUZNfofr12kr8ny+b8T TOTaM0lb7I3dHmO+92RbfPkbTbGJMmc5AW7f1DAFqQlohWi0M57lfmR5v1dMxBByLIbbn6 gqQO78zn3VReObq/m5kChfRd+08OPoYbmj12QXnr95GiZfR2Zl8+3aL9gcf7MHGnOdGkbv 6JpBbSGnt76TOxuolskcbP+MGYuZMwG0lte3mXQWnOyaX219ZLrtjZWFl0pcD8T9K0bsZf YKSweuEtHB+a+J9ZSAzRfpXDCC+ECB0B//HeNCmHDMv1WEIyfBKmROvtdFQHwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q862Y08j2z129s; Sun, 30 Apr 2023 00:01:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U01eQP090382; Sun, 30 Apr 2023 00:01:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U01e8L090381; Sun, 30 Apr 2023 00:01:40 GMT (envelope-from git) Date: Sun, 30 Apr 2023 00:01:40 GMT Message-Id: <202304300001.33U01e8L090381@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: a2d1957bbcc8 - main - Updates to UFS/FFS superblock integrity checks when reading a superblock. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a2d1957bbcc87b499526df8d99ec7e1ddd2193c0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=a2d1957bbcc87b499526df8d99ec7e1ddd2193c0 commit a2d1957bbcc87b499526df8d99ec7e1ddd2193c0 Author: Kirk McKusick AuthorDate: 2023-04-29 18:52:27 +0000 Commit: Kirk McKusick CommitDate: 2023-04-30 00:01:18 +0000 Updates to UFS/FFS superblock integrity checks when reading a superblock. Check for an uninitialed (zero valued) fs_maxbsize and set it to its minimum valid size (fs_bsize). Uninitialed fs_maxbsize were left by older versions of makefs(8) and the superblock integrity checks fail when they are found. No legitimate superblocks should fail as a result of these changes. MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/ufs/ffs/ffs_subr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/ufs/ffs/ffs_subr.c b/sys/ufs/ffs/ffs_subr.c index ba1d8c5c13c9..5b4ad96f4638 100644 --- a/sys/ufs/ffs/ffs_subr.c +++ b/sys/ufs/ffs/ffs_subr.c @@ -514,6 +514,9 @@ validate_sblock(struct fs *fs, int flags) %jd); FCHK(fs->fs_sbsize, >, SBLOCKSIZE, %jd); FCHK(fs->fs_sbsize, <, (signed)sizeof(struct fs), %jd); + /* fix for misconfigured filesystems */ + if (fs->fs_maxbsize == 0) + fs->fs_maxbsize = fs->fs_bsize; FCHK(fs->fs_maxbsize, <, fs->fs_bsize, %jd); FCHK(powerof2(fs->fs_maxbsize), ==, 0, %jd); FCHK(fs->fs_maxbsize, >, FS_MAXCONTIG * fs->fs_bsize, %jd); From nobody Sun Apr 30 00:01:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q862Z2b4sz48RbR; Sun, 30 Apr 2023 00:01: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 4Q862Z1n7Mz42C8; Sun, 30 Apr 2023 00:01:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682812902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r0IHQCtGgcnNPfpll6FuQqIMY136Q5G1xsI3IVaooGQ=; b=egWeEjMWM1v73IBo9zmaJ0bbaWQPGy94ZRuH6I7qnAe0Z71mbshLuiBO0yEOpZwOzS1Acm B9pvJrnPWGkIoUzLRbt60tupGRdHaZkQtSdeVFOAdJsGg2ANsRuVM9LO5s4W7+y7fFOjFD 4daWEE0TPLNgECvV2NMJbgBjrMLPShAyPsc2luouhToTecHCRZ+Yj0k7V9z79NtDpDoElg cxFrL2D9MzTZc3S6EUAs+wSaEBNDvhS8PHl/oaT7bG08tKQEJEPHAiDrRBBW6UT1jXiFy5 e0JmLiFFFKfAvREdEtRySE1+E6R79BDghfGRRH4Qg/gsMX6yunLivS/K0FlPxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682812902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r0IHQCtGgcnNPfpll6FuQqIMY136Q5G1xsI3IVaooGQ=; b=WF3Jn2ItwLlKBiWsIA7cGX/NSO3gAXBOyg3IV4TItRMTY1RwL0PHbBxH+RunHNZBT3W1dl 7FSqGAmgu8yXs0cH/STtILWT7XYpc0PndN1mIJ9zO4ZJRpo2rbk6H4yDAh7LYkyMHgFj6M mmyJEFhxhcxIKlMnHizr7qxIqf86FH1ipkrsouoSvCOCR42UYEhaIXfkrg7DVQA8kOuFTG Z4X/+PHrtfF1oDIec2blBt7QS+tbS+e0fu5v2aBPEzw95Jy7wqwqjSIxVCH1hxY500ifn7 UoR3Ndb7JAKIpTFiOZnXHlmiK0a5eQlVEd8/I6gv0qAUwlJvr7EMYA33p9QxpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682812902; a=rsa-sha256; cv=none; b=HyPkEPhJZhGT9jeTrb7OM09Gl7UP0dO7CnQlBftssTfjEw+bLg0xJCbkGjUM8StRHPhYKr LOonyXidOX7rMjPR+sFLSubV6F9jPtHXuE27boA//3H/lHK6dRZ/d2WN6FPlIBz1yvN1ey +kkA8qX/WV1Px/NElaWUgLEKIhREGs51ryxCN7HyM2qDC9IwlGX/T+9dZDI5rofGbvAqFl 74yVkA5wYT+dlGX+c6gbhakcxQJLtEVIM4e4jGIi+IpGMqCfz3nQmFO6BAj0wG0Ksp/OnW 9NpHPj6f9CJqEJN79JftQ8YHbOWEmxnQRaZqCGcocNRI/KSCymc9fWX46UqTmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q862Z0t2Lz12C0; Sun, 30 Apr 2023 00:01:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U01gx0090405; Sun, 30 Apr 2023 00:01:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U01gZS090404; Sun, 30 Apr 2023 00:01:42 GMT (envelope-from git) Date: Sun, 30 Apr 2023 00:01:42 GMT Message-Id: <202304300001.33U01gZS090404@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: 62dc21b10731 - main - Additional validity checking in newfs(8). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 62dc21b10731bdba26dafeb51640c2048a3344a0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=62dc21b10731bdba26dafeb51640c2048a3344a0 commit 62dc21b10731bdba26dafeb51640c2048a3344a0 Author: Kirk McKusick AuthorDate: 2023-04-29 19:49:50 +0000 Commit: Kirk McKusick CommitDate: 2023-04-30 00:01:18 +0000 Additional validity checking in newfs(8). A check in the superblock validity code verifies that the computed size of the filesystem cylinder groups (CGSIZE macro) does not exceed the filesystem block size (fs_bsize). A report was received that a filesystem had been flagged as failing this check. We were unable to determine how the reported filesystem could have been created. This commit adds a check at the end of the newfs(8) command to verify that the the cylinder group size is valid. If an oversize cylinder group is found newfs(8) prints a diagnostic output and rebuilds the filesystem to make it compiliant. MFC after: 1 week --- sbin/newfs/mkfs.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c index 16508305aa57..5af121104821 100644 --- a/sbin/newfs/mkfs.c +++ b/sbin/newfs/mkfs.c @@ -332,6 +332,7 @@ restart: * can put into each cylinder group. If this is too big, we reduce * the density until it fits. */ +retry: maxinum = (((int64_t)(1)) << 32) - INOPB(&sblock); minfragsperinode = 1 + fssize / maxinum; if (density == 0) { @@ -666,6 +667,21 @@ restart: pp->p_frag = sblock.fs_frag; pp->p_cpg = sblock.fs_fpg; } + /* + * This should NOT happen. If it does complain loudly and + * take evasive action. + */ + if ((int32_t)CGSIZE(&sblock) > sblock.fs_bsize) { + printf("INTERNAL ERROR: ipg %d, fpg %d, contigsumsize %d, ", + sblock.fs_ipg, sblock.fs_fpg, sblock.fs_contigsumsize); + printf("old_cpg %d, size_cg %jd, CGSIZE %jd\n", + sblock.fs_old_cpg, sizeof(struct cg), CGSIZE(&sblock)); + printf("Please file a FreeBSD bug report and include this " + "output\n"); + maxblkspercg = fragstoblks(&sblock, sblock.fs_fpg) - 1; + density = 0; + goto retry; + } } /* From nobody Sun Apr 30 00:55:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q87FD2gphz48VPm; Sun, 30 Apr 2023 00:56: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 4Q87FD1m5gz46FN; Sun, 30 Apr 2023 00:56:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682816160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hZY6Q4LyLNELuIyh4PCgEi6vBOpRsRnjuZZADpKMzqo=; b=Q3VpFmAa2qS+KZK2F02JPcOzkqL3iqwIsbu/DruY81qebL5OI3EpkrjrOCfW3hDfoeiZY9 yWbRgojru2XqykLkxePpc1Wli1XinqCBKrhZKZD9QagFtA6NWIKawJ+yfYgBw7KQrlVxvq //em6BmV+Cs34U5SeH80fl8IBAUkI4lLT/H5F9Gh4z9maAIUZr4HEkVo/Jucmj2GuXHfr9 D0dJNf6zU7ivDibH+ZSg8NVTDccyhlcMUCHq35sM8Nkg87WCiWBSWQrTvUwizJbbGXucRM Kv1W9lvJQtgF4bNyikKTAvTVjjHsZpxpD+cHUAbxXRGCV9+tYemJqeH9WkPK9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682816160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hZY6Q4LyLNELuIyh4PCgEi6vBOpRsRnjuZZADpKMzqo=; b=TecT1JHEfrq7yD037HETC+r0t1+KYJZ3SZzi/dHmkbmgVB6dNKx7rVG7yEmFORpS8LuyXt lDeUr+gmxiHUa+Ch9F91jF+y1J8jnj3hD+vCznmeWMjGz190xGjLx6QEEzTR97roX/Obd9 A7mkUS0tscMsV5lWlF30R8jegg0cGsgJo6cjQw35txMENxvNfCBZvyVuxONv5swq9ldxEQ I+C6TWtkYRDFlSxmwIyF9bt9Aqo4MfKlkyr4FcyllLhz7SLUHv/mtFmoBBcfgeZM2XbUIV v3/8haWp1IT62DnKKWuqXJ/juyobnMA4OMvPALqCKBSWGiv9lSAFV3IUh8SQNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682816160; a=rsa-sha256; cv=none; b=c+EE5O5tG/IQMnpyuR2dAKi/f+9DAbzs6Dh1ppJ0nqTHUZfDydvkmOZ1z5xrc778ZIKdsk EZcev+ioXlOsh4uhU4IYY9INa4QeZ8Fm54/JO3N6ZaPUr+/8xn8acd2MarZ6Zwn02VLeZo DeQ8sck33K+2/LWvEaFDZDXrUdPWF8Y0ywXn6BpvhrtaFDIhTO3L0FbtYqY4QJrbxVPw7L YJToVYnN25WMFKUMLnoLlpjTofuRL7LV7mnIKoeg770kWhNvuH442cYMVikoR6Hbdrt4uY Q2ZvpUpVN8/A6NaMvSRAf4bdmDbUMQRT+V9f8G62wDBjWCeYfqPvY6oan3eH/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 4Q87FD0mMMz12rF; Sun, 30 Apr 2023 00:56:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U0txwk076744; Sun, 30 Apr 2023 00:55:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U0txC4076743; Sun, 30 Apr 2023 00:55:59 GMT (envelope-from git) Date: Sun, 30 Apr 2023 00:55:59 GMT Message-Id: <202304300055.33U0txC4076743@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: 6995e6b3237e - main - Fix printf format conflict List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6995e6b3237e9be9ae6f68af13edd3db4b668ab8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=6995e6b3237e9be9ae6f68af13edd3db4b668ab8 commit 6995e6b3237e9be9ae6f68af13edd3db4b668ab8 Author: Kirk McKusick AuthorDate: 2023-04-30 00:55:15 +0000 Commit: Kirk McKusick CommitDate: 2023-04-30 00:55:15 +0000 Fix printf format conflict MFC after: 1 week --- sbin/dumpfs/dumpfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c index 01b475a03fea..743734660e57 100644 --- a/sbin/dumpfs/dumpfs.c +++ b/sbin/dumpfs/dumpfs.c @@ -245,7 +245,7 @@ dumpfs(const char *name, int dosb) default: goto err; } - printf("old_cpg\t%d\tsize_cg\t%jd\tCGSIZE\t%jd\n", + printf("old_cpg\t%d\tsize_cg\t%d\tCGSIZE\t%d\n", afs.fs_old_cpg, sizeof(struct cg), CGSIZE(&afs)); printf("sblkno\t%d\tcblkno\t%d\tiblkno\t%d\tdblkno\t%d\n", afs.fs_sblkno, afs.fs_cblkno, afs.fs_iblkno, afs.fs_dblkno); From nobody Sun Apr 30 02:16:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q892g2CjMz48Zqv for ; Sun, 30 Apr 2023 02:16:59 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q892g0dT3z4D5D for ; Sun, 30 Apr 2023 02:16:59 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-2f9b9aa9d75so697839f8f.0 for ; Sat, 29 Apr 2023 19:16:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682821016; x=1685413016; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oof+qWpibW/AjNWjoINt2ecWFd6efRdQ/bArsWA8EgA=; b=YDqro5+0dlsZ604PCyni3LhArpO5OC6LbS74q3Eyw9EtA61/dZmHHoUyitqE8VnBcF gk8aGuyPun2JsDCxABoin9ZZzpJMdXSUhN4+pq3w4OTXp1Lvbgp7wyJI1iEcD9OaO2eL 0jqSZztOvRt6cp6wHFdtxEhK7dWW9rGXEIKH5++7PJUTyCNGjPUxFmQ0H4sT9be6r0Wh 6DNOoQFjEcU/zf9ZvVg+ME7FV/8luUJZIrk8tugW8+td883Qsyes2DDVhG3BjtdqSqu5 +OkZVg5rSgJ85csZetOSTbltBSEAchF30hSuQ40DMoagTXbTK294ZGQUk4+0tHJQDYmP AH/w== X-Gm-Message-State: AC+VfDxwCXwCDY650sZATQI7lN+ib4KjF4J4z5ekw+sjnWVTnqWZU+34 NcClbaHhgjKIm7z2+h5XrXAfQA== X-Google-Smtp-Source: ACHHUZ7c4a2H+mgIXDeelVwOaiFbh0FsV+YX4DufLa1u3OLxjkYdZOoeHrHvQeLTopy1H5z7kuHz5g== X-Received: by 2002:adf:ef52:0:b0:306:b48:3fc4 with SMTP id c18-20020adfef52000000b003060b483fc4mr2103421wrp.31.1682821015709; Sat, 29 Apr 2023 19:16:55 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id r4-20020adfdc84000000b002f598008d50sm24754434wrj.34.2023.04.29.19.16.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Apr 2023 19:16:55 -0700 (PDT) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: 6995e6b3237e - main - Fix printf format conflict From: Jessica Clarke In-Reply-To: <202304300055.33U0txC4076743@gitrepo.freebsd.org> Date: Sun, 30 Apr 2023 03:16:54 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202304300055.33U0txC4076743@gitrepo.freebsd.org> To: Kirk McKusick X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4Q892g0dT3z4D5D X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 30 Apr 2023, at 01:55, Kirk McKusick wrote: >=20 > The branch main has been updated by mckusick: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D6995e6b3237e9be9ae6f68af13edd3db= 4b668ab8 >=20 > commit 6995e6b3237e9be9ae6f68af13edd3db4b668ab8 > Author: Kirk McKusick > AuthorDate: 2023-04-30 00:55:15 +0000 > Commit: Kirk McKusick > CommitDate: 2023-04-30 00:55:15 +0000 >=20 > Fix printf format conflict >=20 > MFC after: 1 week > --- > sbin/dumpfs/dumpfs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c > index 01b475a03fea..743734660e57 100644 > --- a/sbin/dumpfs/dumpfs.c > +++ b/sbin/dumpfs/dumpfs.c > @@ -245,7 +245,7 @@ dumpfs(const char *name, int dosb) > default: > goto err; > } > - printf("old_cpg\t%d\tsize_cg\t%jd\tCGSIZE\t%jd\n", > + printf("old_cpg\t%d\tsize_cg\t%d\tCGSIZE\t%d\n", > afs.fs_old_cpg, sizeof(struct cg), CGSIZE(&afs)); size_t is not an int on 64-bit architectures; you want %zu. Jess > printf("sblkno\t%d\tcblkno\t%d\tiblkno\t%d\tdblkno\t%d\n", > afs.fs_sblkno, afs.fs_cblkno, afs.fs_iblkno, afs.fs_dblkno); From nobody Sun Apr 30 02:54:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q89tQ0GtRz48cPN; Sun, 30 Apr 2023 02:54:54 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) (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 4Q89tP2mz8z4Gq1; Sun, 30 Apr 2023 02:54:53 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pg1-x52e.google.com with SMTP id 41be03b00d2f7-5286311be47so849002a12.1; Sat, 29 Apr 2023 19:54:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682823291; x=1685415291; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=UpERznqrowvJ4z1hQBXe2PiA73AkM9nWSBZgldG9a+Q=; b=QyYSixHNi3GuvUyiYtGSMAjEdfdkoPfuWvMLqfiIJIaZkYqTYkLegf8iZZMgTmdSxS A6d4kg/BKTo0zAIWluQhFivJkfgb6nxgBg/ZNSy5mseEDF7xSCHrHD9GYu/2HMrljq80 msGUUylYfypOfbF6RmzKcZ8jyQIDREnvXfcqybjDGp6pd/8xz2/s71kWRjkpCoSop5sR 34Q9B8ehrt/98+PLYKxFz52+069tYbZi4Za2w0KDJLWtFEcz+G9sJWQ/fJMr07jpXvqU ZNOyAUbE7B8tfHyAVQ3nYiP5cXLr0aShTqjRPR/rwqYdOCUJHQXrErR1AF+IpOwhiXzY ggTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682823291; x=1685415291; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UpERznqrowvJ4z1hQBXe2PiA73AkM9nWSBZgldG9a+Q=; b=FQKmxHTAkWB9vy4blN9WCaC1mZEROTIqaRYl37tp6oXHRUnqW07Wgf3ioMmeagJY4R OM3hnD2bRJEDErFGCEi3nxkcVL5L6pOa+A8nLmSxmd/L7hWqW+pzwVmwY9XLYrnM6Nzb nxiYuvW7zFBOoVASIT7kC+ZfRectuMUHbK18WfrpuwDyD1aX23MAXIqIXotdG3FqHHmU 8vAQj1K8XHxd2UA7EtUqpa7J++gWjHjmF73exXNmdIUkVA37oPcUFhS3uHHN34l4mOw5 Yu9p14XIE+pJBuL4QvyHg8u8nr5FE0CHSIX7nndRnUUzi0Q71SQV2jGQohasxqHQ0Qh1 MLCg== X-Gm-Message-State: AC+VfDxcaxWtxCw1YtgkTxNqyiXpthPsl2R+/g06vDgZOZsNqKFOMGZO XAE+XRtsGi2jzgJGfqf5DNsUc0HJgLsKKxcnxPOX2LP4dQ== X-Google-Smtp-Source: ACHHUZ7dUbtoRRllptFUu0fFS+yHqFPkHyYK4DUEn9D+swu7erhbPObb1AHdlJ12ZqWXY6wAGMUQIVin6TmKfIs2cy0= X-Received: by 2002:a17:902:d482:b0:19f:8ad5:4331 with SMTP id c2-20020a170902d48200b0019f8ad54331mr12280553plg.38.1682823290612; Sat, 29 Apr 2023 19:54:50 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202304300055.33U0txC4076743@gitrepo.freebsd.org> In-Reply-To: From: Rick Macklem Date: Sat, 29 Apr 2023 19:54:41 -0700 Message-ID: Subject: Re: git: 6995e6b3237e - main - Fix printf format conflict To: Jessica Clarke Cc: Kirk McKusick , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4Q89tP2mz8z4Gq1 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Sat, Apr 29, 2023 at 7:17=E2=80=AFPM Jessica Clarke = wrote: > > CAUTION: This email originated from outside of the University of Guelph. = Do not click links or open attachments unless you recognize the sender and = know the content is safe. If in doubt, forward suspicious emails to IThelp@= uoguelph.ca. > > > On 30 Apr 2023, at 01:55, Kirk McKusick wrote: > > > > The branch main has been updated by mckusick: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D6995e6b3237e9be9ae6f68af= 13edd3db4b668ab8 > > > > commit 6995e6b3237e9be9ae6f68af13edd3db4b668ab8 > > Author: Kirk McKusick > > AuthorDate: 2023-04-30 00:55:15 +0000 > > Commit: Kirk McKusick > > CommitDate: 2023-04-30 00:55:15 +0000 > > > > Fix printf format conflict > > > > MFC after: 1 week > > --- > > sbin/dumpfs/dumpfs.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c > > index 01b475a03fea..743734660e57 100644 > > --- a/sbin/dumpfs/dumpfs.c > > +++ b/sbin/dumpfs/dumpfs.c > > @@ -245,7 +245,7 @@ dumpfs(const char *name, int dosb) > > default: > > goto err; > > } > > - printf("old_cpg\t%d\tsize_cg\t%jd\tCGSIZE\t%jd\n", > > + printf("old_cpg\t%d\tsize_cg\t%d\tCGSIZE\t%d\n", > > afs.fs_old_cpg, sizeof(struct cg), CGSIZE(&afs)); > > size_t is not an int on 64-bit architectures; you want %zu. Since size_t is 32 bits on some arches, don't you need to use %ju and (uintmax_t)sizeof(struct cg)? rick > > Jess > > > printf("sblkno\t%d\tcblkno\t%d\tiblkno\t%d\tdblkno\t%d\n", > > afs.fs_sblkno, afs.fs_cblkno, afs.fs_iblkno, afs.fs_dblkno); > > From nobody Sun Apr 30 02:55:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q89vG3rSjz48ckJ for ; Sun, 30 Apr 2023 02:55:38 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q89vF4G8Gz4HG5 for ; Sun, 30 Apr 2023 02:55:37 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.128.44 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com; dmarc=none Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-3f19a7f9424so11890895e9.2 for ; Sat, 29 Apr 2023 19:55:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682823336; x=1685415336; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=n4ZyMHXKp+0udcpaoV0CioTcSVB62bd3xZLxtR76/xg=; b=HGGAaxKasTAtONNu88DH0ujcPxu2Ugo4lVO1bPyT6ImHBjKOglXV5gL5qI5BJShA3V nNFlTXZX56opymnDPcvqEidEm45Dh1c6S/I9xZ9l/qgMRIZLNfLoC+FQjMvYS/zEDuav IalhHnK0TrrDQFkkJyy+IWt+sQTDcoTg73tA5Ghm2W2Guw/aLEvYD6qHJF4FKqQaarNw cNju231K9YYsomWmM0aqKIG95d5jpu9n9c5Pr3dgOhgd11ArwTQGeGOWGVVgddUnUuZt xWHX9I1VO+JtC7PGkZS1aYojj59p0dZU/9IOWpXnB/bYFN4nOpQ1J0j+py2J3pPvKX3O kI2w== X-Gm-Message-State: AC+VfDyxWADHPWRylAWULA4H5t7OKjChdKxFtNi7ocu3dSK6vl+cjcTE WvTtuNJhIJqXnHGYFOmuM4S5Yg== X-Google-Smtp-Source: ACHHUZ6hs4HwIPL6iNx7fKT4fkBocyOhEEe+VJYf/N4gctrUTP+kydPsnXIk6+lqryiyZxoeFVIKDg== X-Received: by 2002:a1c:7312:0:b0:3f3:2e4e:c738 with SMTP id d18-20020a1c7312000000b003f32e4ec738mr2785833wmb.3.1682823335989; Sat, 29 Apr 2023 19:55:35 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id k25-20020a05600c081900b003f17122587bsm31956419wmp.36.2023.04.29.19.55.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Apr 2023 19:55:35 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: 6995e6b3237e - main - Fix printf format conflict From: Jessica Clarke In-Reply-To: Date: Sun, 30 Apr 2023 03:55:34 +0100 Cc: Kirk McKusick , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <164F1299-0F3D-424C-8A76-C0FD8239B31C@freebsd.org> References: <202304300055.33U0txC4076743@gitrepo.freebsd.org> To: Rick Macklem X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spamd-Result: default: False [-1.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_LONG(-1.00)[-0.995]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_SHORT(-0.01)[-0.008]; FREEFALL_USER(0.00)[jrtc27]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TAGGED_RCPT(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.128.44:from]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_DN_EQ_ADDR_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.128.44:from]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; RCVD_TLS_LAST(0.00)[] X-Rspamd-Queue-Id: 4Q89vF4G8Gz4HG5 X-Spamd-Bar: - X-ThisMailContainsUnwantedMimeParts: N On 30 Apr 2023, at 03:54, Rick Macklem wrote: >=20 > On Sat, Apr 29, 2023 at 7:17=E2=80=AFPM Jessica Clarke = wrote: >>=20 >> CAUTION: This email originated from outside of the University of = Guelph. Do not click links or open attachments unless you recognize the = sender and know the content is safe. If in doubt, forward suspicious = emails to IThelp@uoguelph.ca. >>=20 >>=20 >> On 30 Apr 2023, at 01:55, Kirk McKusick wrote: >>>=20 >>> The branch main has been updated by mckusick: >>>=20 >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D6995e6b3237e9be9ae6f68af13edd3db= 4b668ab8 >>>=20 >>> commit 6995e6b3237e9be9ae6f68af13edd3db4b668ab8 >>> Author: Kirk McKusick >>> AuthorDate: 2023-04-30 00:55:15 +0000 >>> Commit: Kirk McKusick >>> CommitDate: 2023-04-30 00:55:15 +0000 >>>=20 >>> Fix printf format conflict >>>=20 >>> MFC after: 1 week >>> --- >>> sbin/dumpfs/dumpfs.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>=20 >>> diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c >>> index 01b475a03fea..743734660e57 100644 >>> --- a/sbin/dumpfs/dumpfs.c >>> +++ b/sbin/dumpfs/dumpfs.c >>> @@ -245,7 +245,7 @@ dumpfs(const char *name, int dosb) >>> default: >>> goto err; >>> } >>> - printf("old_cpg\t%d\tsize_cg\t%jd\tCGSIZE\t%jd\n", >>> + printf("old_cpg\t%d\tsize_cg\t%d\tCGSIZE\t%d\n", >>> afs.fs_old_cpg, sizeof(struct cg), CGSIZE(&afs)); >>=20 >> size_t is not an int on 64-bit architectures; you want %zu. > Since size_t is 32 bits on some arches, don't you need to use %ju > and (uintmax_t)sizeof(struct cg)? No. %zu is size_t by definition. That=E2=80=99s the point of its = existence. Jess > rick >=20 >>=20 >> Jess >>=20 >>> printf("sblkno\t%d\tcblkno\t%d\tiblkno\t%d\tdblkno\t%d\n", >>> afs.fs_sblkno, afs.fs_cblkno, afs.fs_iblkno, = afs.fs_dblkno); From nobody Sun Apr 30 03:08:35 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8BBS2TS5z48d2g; Sun, 30 Apr 2023 03:08:48 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8BBR1m0Fz4JW7; Sun, 30 Apr 2023 03:08:47 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1a6817adde4so14566135ad.0; Sat, 29 Apr 2023 20:08:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682824125; x=1685416125; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=6fKDJ8nqdNbk865qkoXKits4Sz7VuX5ulhT9wmZ0qHg=; b=rW9kS/u+9QUETb9PW2sJ/Nr9F85e1jnvdT+/Mfxsj8VKdU0VzOUNu8nKTc6duxkFbY lm/E7/fiuduD20wXBUNPCokjn7pRdmhD/+sTgxaEgemBo9o45NtQD+xS5cR08GVecrND i8bWlFq/fOkxOX6HbItJgBzASIOdfFbUcsshr+tz1uayvnmespbdIaikF3AY/cJgiZzO 1xLTBWutMOy4k3QAFDYsHVE0jIH4s7TAA3UElCk0fc/yTktzoSkw1YfNAaTFomTzJluG oh4yqDSImLWZGSoG4Dw+oYROW5SEfdxCBNWL5B2HSHbUwdlRYX8cZLIsZ0bySttIXw7r g28A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682824125; x=1685416125; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6fKDJ8nqdNbk865qkoXKits4Sz7VuX5ulhT9wmZ0qHg=; b=l4hHTI8tbV6usJbNVGmOEutcfg4wiKcXCjmEMGGx5jXKlrgPFAz4wDgHyQWkEv1H3T 9eM0leIkpydS8Of0kUQOnNDUyMj/FBGj4ECZ8lplJo/FwNtaPWig+cfF2ilrx7i4hmnx gF8ULZGLhi6hbLyu/ieF7XdEfm+pCfa4+KutFd4SvBwrsmiCRnEbCKK4TuZZsl1esNrP hFL8Pa5kmQvSXkcTL5tKrZJ02voajAvKLvLavoBCoxVOCgn8nCn+703QrwXRVwpI28BZ OVHMtl8yRoJvdUq5suv+rVyGxSaWz97SmqNjehILSB+eMtlETtOWFOhkp59uGEjwTkEV EEKw== X-Gm-Message-State: AC+VfDzbSV8OpaObOc3o2M/pqReAMZIFFsiAQiAzH5cOVRksUqJJby7a e4EZmj7lHFAJYvQgfJ7ziPZj8YhpTuz2xerR50Evh/kbxQ== X-Google-Smtp-Source: ACHHUZ528jEZzcYEE9HZloKSYyS0tYLjkkoph50EWJbkwR/6+XdMJR/9cYprczAQvqAPt6eWJdsFh/4VZtIImIBxsFA= X-Received: by 2002:a17:902:d50c:b0:1a6:955c:6329 with SMTP id b12-20020a170902d50c00b001a6955c6329mr11662059plg.22.1682824125198; Sat, 29 Apr 2023 20:08:45 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202304300055.33U0txC4076743@gitrepo.freebsd.org> <164F1299-0F3D-424C-8A76-C0FD8239B31C@freebsd.org> In-Reply-To: <164F1299-0F3D-424C-8A76-C0FD8239B31C@freebsd.org> From: Rick Macklem Date: Sat, 29 Apr 2023 20:08:35 -0700 Message-ID: Subject: Re: git: 6995e6b3237e - main - Fix printf format conflict To: Jessica Clarke Cc: Kirk McKusick , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4Q8BBR1m0Fz4JW7 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Sat, Apr 29, 2023 at 7:55=E2=80=AFPM Jessica Clarke = wrote: > > On 30 Apr 2023, at 03:54, Rick Macklem wrote: > > > > On Sat, Apr 29, 2023 at 7:17=E2=80=AFPM Jessica Clarke wrote: > >> > >> CAUTION: This email originated from outside of the University of Guelp= h. Do not click links or open attachments unless you recognize the sender a= nd know the content is safe. If in doubt, forward suspicious emails to IThe= lp@uoguelph.ca. > >> > >> > >> On 30 Apr 2023, at 01:55, Kirk McKusick wrote: > >>> > >>> The branch main has been updated by mckusick: > >>> > >>> URL: https://cgit.FreeBSD.org/src/commit/?id=3D6995e6b3237e9be9ae6f68= af13edd3db4b668ab8 > >>> > >>> commit 6995e6b3237e9be9ae6f68af13edd3db4b668ab8 > >>> Author: Kirk McKusick > >>> AuthorDate: 2023-04-30 00:55:15 +0000 > >>> Commit: Kirk McKusick > >>> CommitDate: 2023-04-30 00:55:15 +0000 > >>> > >>> Fix printf format conflict > >>> > >>> MFC after: 1 week > >>> --- > >>> sbin/dumpfs/dumpfs.c | 2 +- > >>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>> > >>> diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c > >>> index 01b475a03fea..743734660e57 100644 > >>> --- a/sbin/dumpfs/dumpfs.c > >>> +++ b/sbin/dumpfs/dumpfs.c > >>> @@ -245,7 +245,7 @@ dumpfs(const char *name, int dosb) > >>> default: > >>> goto err; > >>> } > >>> - printf("old_cpg\t%d\tsize_cg\t%jd\tCGSIZE\t%jd\n", > >>> + printf("old_cpg\t%d\tsize_cg\t%d\tCGSIZE\t%d\n", > >>> afs.fs_old_cpg, sizeof(struct cg), CGSIZE(&afs)); > >> > >> size_t is not an int on 64-bit architectures; you want %zu. > > Since size_t is 32 bits on some arches, don't you need to use %ju > > and (uintmax_t)sizeof(struct cg)? > > No. %zu is size_t by definition. That=E2=80=99s the point of its existenc= e. Yep, I see that in "man 3 printf". As they say, you learn something every d= ay. rick > > Jess > > > rick > > > >> > >> Jess > >> > >>> printf("sblkno\t%d\tcblkno\t%d\tiblkno\t%d\tdblkno\t%d\n", > >>> afs.fs_sblkno, afs.fs_cblkno, afs.fs_iblkno, afs.fs_dblkno); > From nobody Sun Apr 30 05:07:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8DqH1g9cz48lxq; Sun, 30 Apr 2023 05:07:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8DqH12XJz3DqJ; Sun, 30 Apr 2023 05:07:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682831243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d72hv7jN7iJUEnHXplMOjBSGwK5RwtKTlq7ECqdNSw8=; b=L/K/Vn2GRIdqaYY5fEemoiUj0y2jTUUA+t3CitPo/LB8YYSIt982y0xqLqgBPvVIsCpM25 hWJIF7PjbTqk9WlAa5sHLIDRvv3GT+Fsixm3gWhngJ0tIGTTn++lPIvfacsU6Sn7w9rMEf Z9UGQ21R+hNmKkmhGCYaKVUk36HJTMuSxsrcuPhR1bcIhVyt6KHzTAHpLkdy6UGqwkroqU avVoKzVAjMcybmNIoPkrjRs+dSq+75a/sch5Vl1JfBszCzlgaVh6yY8wS2TEFYs31OkKtN HTvnVvZjHQUpRtynBUM3UgUcAfATrJnTIvzBe+sL9/qUdXuQEKA+2bZEXcKUDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682831243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d72hv7jN7iJUEnHXplMOjBSGwK5RwtKTlq7ECqdNSw8=; b=LQk1qFm+qMNltx9kt422nI+HPP/zvr6bkSi8zA5wYk6lfv/fkh9EYiCcXXTy3aKbojm/tm TwL4ZcF1qHAxrOHI5BvXuDobD1aqjWiyax3S8nkUcsFe5gG6gDjaVwpy/jMmcw5lpdzZVH noDPkK4rETa5Pf/HKGhh/FXwn8o3kibsgrb9PnAYc0bHu9xGdQOgTUllt6qBav/PhsQN3Q 9Cd/H1njA3t9sgaLZ+M3VsdpXpkTtXiWEE3JNmEtr5oOCGhV9K+wvvpp3rFQwYjbjk8K5u qLNo8/S53RQWqKzq8qOzynGQj3XNhCXiPuN8YBP+87WQr8TCscz1BNeIx+QBrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682831243; a=rsa-sha256; cv=none; b=o6s0B8zDkVywzCbu2k3jYcRQmoxaGwpQtGiuTsCdJNmLK59oW1iRncrwf+EVy+a7p/zrLy n/B1lHaXju6BZm0+4LGtEU4lcAPRVDk8dsws9ewjw/OSPJRjkZgwUf0Ha6lPWCK4WGxzUR E3U2XxsUyYR6pBmcnDWEhhpbY3kKelhJSyMYXa+s4p+bUqBdyLVhV7mr4Qvw9VXZNM6+Jc R8ucITS2kzXVdb8zr/NmAFR8DIyO86AOsUbHsRYYJhjkEuBS14SHxhNFqufIUcTrTwQJkf eZs1yd9iFeCtaR0QGyU1S9DMfJV5LUIR1RbBAyzy+z4ggOHyLLVKxoD1AOJWQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8DqH06SWz19GF; Sun, 30 Apr 2023 05:07:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U57MRC090663; Sun, 30 Apr 2023 05:07:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U57MZh090662; Sun, 30 Apr 2023 05:07:22 GMT (envelope-from git) Date: Sun, 30 Apr 2023 05:07:22 GMT Message-Id: <202304300507.33U57MZh090662@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Poul-Henning Kamp Subject: git: e0e5bf4d6283 - main - freebsd-update: Mention 13.2-RELEASE in usage. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: phk X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e0e5bf4d62831090a23dd0e0ac374baa0a00ef98 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by phk: URL: https://cgit.FreeBSD.org/src/commit/?id=e0e5bf4d62831090a23dd0e0ac374baa0a00ef98 commit e0e5bf4d62831090a23dd0e0ac374baa0a00ef98 Author: Poul-Henning Kamp AuthorDate: 2023-04-30 05:06:56 +0000 Commit: Poul-Henning Kamp CommitDate: 2023-04-30 05:06:56 +0000 freebsd-update: Mention 13.2-RELEASE in usage. --- usr.sbin/freebsd-update/freebsd-update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 4ef44d1ad000..03eefee75bbd 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -49,7 +49,7 @@ Options: case of an unfinished upgrade -j jail -- Operate on the given jail specified by jid or name -k KEY -- Trust an RSA key with SHA256 hash of KEY - -r release -- Target for upgrade (e.g., 11.1-RELEASE) + -r release -- Target for upgrade (e.g., 13.2-RELEASE) -s server -- Server from which to fetch updates (default: update.FreeBSD.org) -t address -- Mail output of cron command, if any, to address From nobody Sun Apr 30 05:09:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8Dsk51TVz48lyG; Sun, 30 Apr 2023 05:09:30 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8Dsj6Mjqz3F82; Sun, 30 Apr 2023 05:09:29 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.17.1/8.17.1) with ESMTPS id 33U59Gs0053410 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 30 Apr 2023 08:09:19 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 33U59Gs0053410 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 33U59GSK053409; Sun, 30 Apr 2023 08:09:16 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 30 Apr 2023 08:09:16 +0300 From: Konstantin Belousov To: "Jason A. Harmening" Cc: Dimitry Andric , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Subject: Re: git: 060699e91369 - stable/13 - Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6 Message-ID: References: <202304092135.339LZMeJ081640@gitrepo.freebsd.org> <76DD2CB9-986B-4349-8F46-3B7BF63EB315@FreeBSD.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home X-Rspamd-Queue-Id: 4Q8Dsj6Mjqz3F82 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Sat, Apr 29, 2023 at 02:27:50PM -0500, Jason A. Harmening wrote: > On Sat, Apr 29, 2023 at 08:49:28PM +0200, Dimitry Andric wrote: > > On 29 Apr 2023, at 20:33, Jason A. Harmening wrote: > > > > > > On Sun, Apr 09, 2023 at 09:35:22PM +0000, Dimitry Andric wrote: > > >> The branch stable/13 has been updated by dim: > > >> > > >> URL: https://cgit.FreeBSD.org/src/commit/?id=060699e9136975d51d3f726b9785bdbac9a62ba6 > > >> > > >> commit 060699e9136975d51d3f726b9785bdbac9a62ba6 > > >> Author: Dimitry Andric > > >> AuthorDate: 2023-01-14 16:33:24 +0000 > > >> Commit: Dimitry Andric > > >> CommitDate: 2023-04-09 14:54:52 +0000 > > >> > > >> Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6 > > >> > > >> This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and > > >> openmp to llvmorg-15.0.7-0-g8dfdcc7b7bf6. > > >> > > >> PR: 265425 > > >> MFC after: 2 weeks > > > > > > This MFC of llvm15 appears to have completely broken the Intel IOMMU > > > driver on my stable/13 machine. After this series of commits, any > > > downstream DMA seems to produce an IOMMU translation fault, which > > > renders the machine completely unusable: no nvme boot disk, no usb > > > keyboard, etc. > > > > > > The faults I see look something like this: > > > > > > DMAR4: ahci0: pci0:17:5 sid 8d fault acc 0 adt 0x0 reason 0x3 addr 26000 > > > > > > It's a bit surprising to see a toolchain upgrade produce breakage like > > > this, but that's what git bisect clearly tells me. I wonder if some of > > > the IOMMU control structures might be defined as C bitfields and the new > > > compiler is emitting them differently? Also, was any breakage like this > > > observed when -current was upgraded to llvm15 several months ago? > > > > I haven't heard anything about such breakage, no. > > > > > > > More generally, this is the second time in as many months I've had to > > > deal with IOMMU breakage on -stable. I can't imagine I'm the only > > > person who sees value in running with DMA remapping enabled; do we need > > > a dedicated DMAR-enabled machine in the cluster to smoke-test changes > > > like this? More generally, should we avoid MFCing high-risk changes > > > like this? > > > > Since there were very few bug reports, it was not deemed high risk. > > > > In any case, it would be good to get the bottom of what is causing the > > problem, so is there any way you can isolate which code seems to be > > going "bad"? > > > > For example, if this problem affects code in sys/dev/iommu, is there > > some way you can compile that part with -O1, or with an older version > > of clang (from ports), to see if the problem goes away? > > I did try removing all custom make.conf settings (previously I just had > CPUTYPE?=icelake-server), but that didn't change the behavior. > > Before I try further build tweaks, I'd like to ask if the IOMMU fault > report can provide guidance here? AFAICT all the faults I'm getting > show "reason 0x3". If I'm reading the VT-d spec correctly, FR=0x3 > indicates an invalid context entry, in other words there's something the > hardware doesn't like in the way the address width or pagetable base is > configured for the PCIe requestor. I would start looking at the other direction: might be, there are still some left shifts for int32 values with the shift count > 30, or uint32 with the count > 31. Also might be useful to dump each context entry on creation, it is kept constant after. From nobody Sun Apr 30 06:57:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HGY38Zfz48s8w; Sun, 30 Apr 2023 06:57: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 4Q8HGY1B4Zz3MBj; Sun, 30 Apr 2023 06:57:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s/R7bSmBG47ymeyhlJCcEmhSFyXsBH3cXPcbX4U/XEg=; b=siuf2S9VS9TEJwEogkDHJiLi6iV0m7tuVUJvmX/ExiDYh7ehm1Bdv8TwnPUVUGPZ5Wwjs0 vtdz2h1PR2LnC4hw8XZEyFA6sYo4U9yAGvFpHDkTeqG9fAQ3bu5PjJAkvrFZUWKHNekaOm oattUe1EQH6KwVwb7gcv/Ku3MPrK7UrRTivb/kpB+wS917hyxrMoDc8u2ozpI8fj9ADXM6 o2yDhvOwrIz6b0FqmoOlQrODEnK4Yma43U6bt2cZ2pX7kl4CLZ3ZTwto3hnheO/H0p61VU Og4pRK8U0ITGwIiySiNwQkgjci7pPsbuvH6R7A07SXIYgzikAQ7puLvhLGjqmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s/R7bSmBG47ymeyhlJCcEmhSFyXsBH3cXPcbX4U/XEg=; b=CKm0OKmB2kHYChHoNEvEQN785hl4M1K+VImUF+rkOgd2BoW1hXiwMLtL6VUXbrWg5MrmP+ YCCuRIFEs/hyEQyYUXNUb+AnQ4p3ENazMWi4SCpuDhASLfyI/BeS2K4bxHB40eMiCjR0wb nW+EwOVV6DCTsgJHZ6YVKomAugjg6VyVzDgkc+LxXNDhKG8bdt8iWvT6+18fX5RfSLlJR3 6Khvpu5wPtGfVR8lSz5J2kEz3LXqNl1GrZMD8EHN2k3IsIwL2tJ12k8rhZL0kpl5Fe2ZOZ j/ADJSO+csBqn7nM4W9uViP6AOmhx83E0Re1agBtaybMAIs/yUyojcTeuAmxMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837861; a=rsa-sha256; cv=none; b=hvWqQaHp97s9hNg1ej3V10be7+saL/RQ7K312rbOrCk/EN+f8WOcyhyF+QMRmYYqDie6JM J6LyqLEULkuNNzOCVg6tCO0QGmjcUyMq+f7FaMC10LunG5G/3LZZHfgiyVHPXayOK1Jilh BtwSOtIEe/sJG4qRfJ+SW01N96He8Mg68HJRSd8SS8RfGn5rrwKL4TONKchycOJ4FDIRvz mxDKRkdAoxyOFnl5JJCFk34wRNVgPlr/5+5gvik0T12pksPIqNyRCvQPQOOJoBNNHPllIv yjgykDEW+ZxTTgmyhXsANjUq11cOf0J/1IqNLDY4pgsS2bFqRZkK5kqKXc7DDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HGY0FrPz1Cg9; Sun, 30 Apr 2023 06:57:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6ve7c071289; Sun, 30 Apr 2023 06:57:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6veuo071288; Sun, 30 Apr 2023 06:57:40 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:57:40 GMT Message-Id: <202304300657.33U6veuo071288@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 8ff5099a7932 - stable/13 - libusb(3): Implement libusb_init_context() and the needed structures and definitions. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8ff5099a793207af0d6080b01df40392c3c5b51f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=8ff5099a793207af0d6080b01df40392c3c5b51f commit 8ff5099a793207af0d6080b01df40392c3c5b51f Author: Hans Petter Selasky AuthorDate: 2023-01-26 12:56:51 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:15 +0000 libusb(3): Implement libusb_init_context() and the needed structures and definitions. Differential Revision: https://reviews.freebsd.org/D38212 Sponsored by: NVIDIA Networking (cherry picked from commit 4c6bcffd04f9d0b6cb57af0ffcc9be3098fe950c) --- lib/libusb/Makefile | 1 + lib/libusb/libusb.3 | 27 +++++++++++++++++++++------ lib/libusb/libusb.h | 16 ++++++++++++++++ lib/libusb/libusb10.c | 34 +++++++++++++++++++++++++++++++--- 4 files changed, 69 insertions(+), 9 deletions(-) diff --git a/lib/libusb/Makefile b/lib/libusb/Makefile index 3982fda478fb..1648664b8815 100644 --- a/lib/libusb/Makefile +++ b/lib/libusb/Makefile @@ -66,6 +66,7 @@ CFLAGS+= -I ../../sys # LibUSB v1.0 MLINKS += libusb.3 libusb_get_version.3 MLINKS += libusb.3 libusb_init.3 +MLINKS += libusb.3 libusb_init_context.3 MLINKS += libusb.3 libusb_exit.3 MLINKS += libusb.3 libusb_has_capability.3 MLINKS += libusb.3 libusb_strerror.3 diff --git a/lib/libusb/libusb.3 b/lib/libusb/libusb.3 index d4c638d986e4..fe56639fa59f 100644 --- a/lib/libusb/libusb.3 +++ b/lib/libusb/libusb.3 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October, 2, 2022 +.Dd January, 26, 2023 .Dt LIBUSB 3 .Os .Sh NAME @@ -47,11 +47,26 @@ This function returns version information about LibUSB. .Pp .Ft int .Fn libusb_init "libusb_context **ctx" -This function initialises libusb. -It must be called at the beginning -of the program, before other libusb routines are used. -This function returns 0 on success or LIBUSB_ERROR on -failure. +Call this function before any other libusb v1.0 API function, to +initialise a valid libusb v1.0 context. +If the +.Fa ctx +argument is non-NULL, a pointer to the libusb context is stored at +the given location. +This function returns 0 upon success or LIBUSB_ERROR on failure. +.Pp +.Ft int +.Fn libusb_init_context "libusb_context **ctx" "const struct libusb_init_option []" "int num_options" +Call this function before any other libusb v1.0 API function, to +initialise a valid libusb v1.0 context. +If the +.Fa ctx +argument is non-NULL, a pointer to the libusb context is stored at +the given location. +Additional options, like the USB debug level, may be given using the +second and third argument. +If no options are needed, simply use libusb_init(). +This function returns 0 upon success or a LIBUSB_ERROR value on failure. .Pp .Ft void .Fn libusb_exit "libusb_context *ctx" diff --git a/lib/libusb/libusb.h b/lib/libusb/libusb.h index 9eaee671b8b3..28fbece4955a 100644 --- a/lib/libusb/libusb.h +++ b/lib/libusb/libusb.h @@ -266,6 +266,14 @@ typedef enum { LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT = 2, } libusb_hotplug_event; +enum libusb_option { + LIBUSB_OPTION_LOG_LEVEL = 0, + LIBUSB_OPTION_USE_USBDK = 1, + LIBUSB_OPTION_NO_DEVICE_DISCOVERY = 2, + LIBUSB_OPTION_WEAK_AUTHORITY = 2, + LIBUSB_OPTION_MAX = 3, +}; + /* libusb structures */ struct libusb_context; @@ -288,6 +296,13 @@ struct libusb_version { const char *describe; }; +struct libusb_init_option { + enum libusb_option option; + union { + int64_t ival; + } value; +}; + typedef struct libusb_context libusb_context; typedef struct libusb_device libusb_device; typedef struct libusb_device_handle libusb_device_handle; @@ -465,6 +480,7 @@ const struct libusb_version *libusb_get_version(void); const char *libusb_strerror(int code); const char *libusb_error_name(int code); int libusb_init(libusb_context ** context); +int libusb_init_context(libusb_context **, const struct libusb_init_option [], int num_options); void libusb_exit(struct libusb_context *ctx); int libusb_has_capability(uint32_t capability); diff --git a/lib/libusb/libusb10.c b/lib/libusb/libusb10.c index 1fc89fc409f0..793152a30910 100644 --- a/lib/libusb/libusb10.c +++ b/lib/libusb/libusb10.c @@ -3,7 +3,7 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2009 Sylvestre Gallon. All rights reserved. - * Copyright (c) 2009 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2009-2023 Hans Petter Selasky * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -135,12 +135,22 @@ libusb_interrupt_event_handler(libusb_context *ctx) int libusb_init(libusb_context **context) +{ + return (libusb_init_context(context, NULL, 0)); +} + +int +libusb_init_context(libusb_context **context, + const struct libusb_init_option option[], int num_options) { struct libusb_context *ctx; pthread_condattr_t attr; char *debug, *ep; int ret; + if (num_options < 0) + return (LIBUSB_ERROR_INVALID_PARAM); + ctx = malloc(sizeof(*ctx)); if (!ctx) return (LIBUSB_ERROR_INVALID_PARAM); @@ -150,8 +160,9 @@ libusb_init(libusb_context **context) debug = getenv("LIBUSB_DEBUG"); if (debug != NULL) { /* - * If LIBUSB_DEBUG is set, we'll honor that and use it to - * override libusb_set_debug calls. + * If LIBUSB_DEBUG is set, we'll honor that first and + * use it to override any future libusb_set_debug() + * calls or init options. */ errno = 0; ctx->debug = strtol(debug, &ep, 10); @@ -166,7 +177,24 @@ libusb_init(libusb_context **context) */ ctx->debug = 0; } + } else { + /* + * If the LIBUSB_OPTION_LOG_LEVEL is set, honor that. + */ + for (int i = 0; i != num_options; i++) { + if (option[i].option != LIBUSB_OPTION_LOG_LEVEL) + continue; + + ctx->debug = (int)option[i].value.ival; + if ((int64_t)ctx->debug == option[i].value.ival) { + ctx->debug_fixed = 1; + } else { + free(ctx); + return (LIBUSB_ERROR_INVALID_PARAM); + } + } } + TAILQ_INIT(&ctx->pollfds); TAILQ_INIT(&ctx->tr_done); TAILQ_INIT(&ctx->hotplug_cbh); From nobody Sun Apr 30 06:57:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HGZ3B5Jz48rw4; Sun, 30 Apr 2023 06:57:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8HGZ25mTz3MQP; Sun, 30 Apr 2023 06:57:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VbqDZijzkBcHDyKLQkBpKuQstytuxuBSFngl/YDohKs=; b=WVgpn0nVhZoen0OtBnuU+KqmvL688VmMIsV4/qCaHn45aj0PVBoSWFJMK7b8Iq/eKbNrsS c/+4m5RjQuSd752d5wZUhTA/N4Ow4sBrrFwM0F9sK+pLdQ70shm7106whel5um85u9vYcT UT2GRIiivR8XzLQjwgioS825wdZ8snDncOHNd7Mw/ZEj9zadx8umy0W33Bne+uQ6OCaDGy UcncBqQoqQ6ckyP5b/q1JLwZr3MDaToEBpeVBzewG8TvJwlVpYSSbZnuiKTh5KQCWN4KlE Tm2FzvlPPqekq3jYy9Ad15zwBOB5BJ5dndO5s1eNGXO/sJgwtarnIes5Fg7QYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VbqDZijzkBcHDyKLQkBpKuQstytuxuBSFngl/YDohKs=; b=oLDTeXXDFYu7nn/aXDNSRP4tth788CXeZbN/gms+GYBbVeEBW1nGH8Hgm0BOw19OXRethm ntmwk3DoMQhIpsWsYdUylm6ojLOiOG4zSZlhLLiuJYTu+3ckXB1++w+YOYOmHUR88ZogRR vme9JS846wLqyoWhy8bFjPhO8obJVD9CVQE+/bO6H0Akv+r013a3FvcKdgzXVsL9fSH33s Jw8kq/fmHVf5pEXYM98Ys+TyGtVzNzjG/+Lxmr18yXNUjow4/kkmetc9wgBe2dbhpvxTWx JP2BrX9vloRFCIgXOf1+E+NQB1TKo81Xhf/jehMezoVNz1kFp7KKQ3Yd9vWRXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837862; a=rsa-sha256; cv=none; b=SYrYmeHDT0gyg0FKIsQw4mo36tUpcAW58zoK9gpfogh8X/aPkMwv6eZVw9Gx7fv79Bv7PX w9BOMMt2IKxCXuhCTp/SihPk4Fe/pfxdurIChJ5WyCkgMJrGLp+xTAh+ZjuR1QThd92bfK wueZrsS4+EKL8ILXA6O5Wer7x+UEThuhHkwACyBE1LRmtagOzzQWHFqJnRew9nMQ2DoyP4 wDMrEvrN7gZog71pv6ciC69xVWxZAE09opV1XyArfjLgnLQuHnc/LK3WF3f29Yz4VBojqI F8WUuKAg++6a3Yp5TRUKqa5Y9cNkazFHDurp+JPVYmcss9gCE0zFSmMc0Nr+OQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HGZ19BPz1Crc; Sun, 30 Apr 2023 06:57:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6vgwv071317; Sun, 30 Apr 2023 06:57:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6vgRH071316; Sun, 30 Apr 2023 06:57:42 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:57:42 GMT Message-Id: <202304300657.33U6vgRH071316@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 82acd06d9ce5 - stable/13 - usb: add 32-bit compat for FIFOs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 82acd06d9ce5e4133927b178d3b00d7f2c47f102 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=82acd06d9ce5e4133927b178d3b00d7f2c47f102 commit 82acd06d9ce5e4133927b178d3b00d7f2c47f102 Author: Brooks Davis AuthorDate: 2021-12-17 21:28:14 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:15 +0000 usb: add 32-bit compat for FIFOs Unlike most 32-bit compatability code, this isn't just a simple thunk in the ioctl code. An ioctl (USB_FS_INIT) is used to install a pointer to an array of usb_fs_endpoint structs which are then used by the ugen fifo code. These struct contains an array of pointers which requires translation. We change the interfaces around struct usb_fs_endpoint as follows: - We store the size of struct usb_fs_endpoint in struct usb_fifo in the USB_FS_INIT handler so we know the ABI of the userspace array. - APIs to manipulate userspace struct usb_fs_endpoint objects now take a struct usb_fifo and an index rather than a pointer to the object. This allows most code to remain oblivious to the different struct usb_fs_endpoint sizes. - Add ugen_fs_copyin() which copies the struct usb_fs_endpoint from userspace, thunking it to the native size if required. - Uses of struct usb_fs_endpoint's ppBuffer member are now via ugen_fs_getbuffer() which produces a native pointer. - Updates to userspace are now handled by ugen_fs_update(). For clarity, single, fixed-sized members now are accessed with fueword/suword rather than copyin/copyout. Reviewed by: hselasky, jrtc27 (prior version) (cherry picked from commit 0ec590d24e415dd36e38648630a0b963412ad87e) (cherry picked from commit 8b60419b798ae9049988c529e6af3f313a5cce55) --- sys/dev/usb/usb_dev.h | 1 + sys/dev/usb/usb_generic.c | 235 +++++++++++++++++++++++++++++++++------------- sys/dev/usb/usb_ioctl.h | 18 ++++ 3 files changed, 188 insertions(+), 66 deletions(-) diff --git a/sys/dev/usb/usb_dev.h b/sys/dev/usb/usb_dev.h index ae851153efb1..1bdfa46d064f 100644 --- a/sys/dev/usb/usb_dev.h +++ b/sys/dev/usb/usb_dev.h @@ -123,6 +123,7 @@ struct usb_fifo { void *priv_sc0; /* client data */ void *priv_sc1; /* client data */ void *queue_data; + usb_size_t fs_ep_sz; usb_timeout_t timeout; /* timeout in milliseconds */ usb_frlength_t bufsize; /* BULK and INTERRUPT buffer size */ usb_frcount_t nframes; /* for isochronous mode */ diff --git a/sys/dev/usb/usb_generic.c b/sys/dev/usb/usb_generic.c index b11168b6c81c..fdbc35d47169 100644 --- a/sys/dev/usb/usb_generic.c +++ b/sys/dev/usb/usb_generic.c @@ -119,6 +119,7 @@ static int ugen_re_enumerate(struct usb_fifo *); static int ugen_iface_ioctl(struct usb_fifo *, u_long, void *, int); static uint8_t ugen_fs_get_complete(struct usb_fifo *, uint8_t *); static int ugen_fs_uninit(struct usb_fifo *f); +static int ugen_fs_copyin(struct usb_fifo *, uint8_t, struct usb_fs_endpoint*); /* structures */ @@ -1018,6 +1019,38 @@ ugen_fs_set_complete(struct usb_fifo *f, uint8_t index) usb_fifo_wakeup(f); } +static int +ugen_fs_getbuffer(void **uptrp, struct usb_fifo *f, void *buffer, + usb_frcount_t n) +{ + union { + void **ppBuffer; +#ifdef COMPAT_FREEBSD32 + uint32_t *ppBuffer32; +#endif + } u; +#ifdef COMPAT_FREEBSD32 + uint32_t uptr32; +#endif + + u.ppBuffer = buffer; + switch (f->fs_ep_sz) { + case sizeof(struct usb_fs_endpoint): + if (fueword(u.ppBuffer + n, (long *)uptrp) != 0) + return (EFAULT); + return (0); +#ifdef COMPAT_FREEBSD32 + case sizeof(struct usb_fs_endpoint32): + if (fueword32(u.ppBuffer32 + n, &uptr32) != 0) + return (EFAULT); + *uptrp = PTRIN(uptr32); + return (0); +#endif + default: + panic("%s: unhandled fs_ep_sz %#x", __func__, f->fs_ep_sz); + } +} + static int ugen_fs_copy_in(struct usb_fifo *f, uint8_t ep_index) { @@ -1047,8 +1080,7 @@ ugen_fs_copy_in(struct usb_fifo *f, uint8_t ep_index) } mtx_unlock(f->priv_mtx); - error = copyin(f->fs_ep_ptr + - ep_index, &fs_ep, sizeof(fs_ep)); + error = ugen_fs_copyin(f, ep_index, &fs_ep); if (error) { return (error); } @@ -1062,8 +1094,7 @@ ugen_fs_copy_in(struct usb_fifo *f, uint8_t ep_index) xfer->error = USB_ERR_INVAL; goto complete; } - error = copyin(fs_ep.ppBuffer, - &uaddr, sizeof(uaddr)); + error = ugen_fs_getbuffer(&uaddr, f, fs_ep.ppBuffer, 0); if (error) { return (error); } @@ -1073,10 +1104,8 @@ ugen_fs_copy_in(struct usb_fifo *f, uint8_t ep_index) if (xfer->flags_int.control_xfr) { req = xfer->frbuffers[0].buffer; - error = copyin(fs_ep.pLength, - &length, sizeof(length)); - if (error) { - return (error); + if (fueword32(fs_ep.pLength, &length) != 0) { + return (EFAULT); } if (length != sizeof(*req)) { xfer->error = USB_ERR_INVAL; @@ -1142,9 +1171,7 @@ ugen_fs_copy_in(struct usb_fifo *f, uint8_t ep_index) xfer->flags.stall_pipe = 0; for (; n != xfer->nframes; n++) { - error = copyin(fs_ep.pLength + n, - &length, sizeof(length)); - if (error) { + if (fueword32(fs_ep.pLength + n, &length) != 0) { break; } usbd_xfer_set_frame_len(xfer, n, length); @@ -1157,8 +1184,7 @@ ugen_fs_copy_in(struct usb_fifo *f, uint8_t ep_index) if (!isread) { /* we need to know the source buffer */ - error = copyin(fs_ep.ppBuffer + n, - &uaddr, sizeof(uaddr)); + error = ugen_fs_getbuffer(&uaddr, f, fs_ep.ppBuffer, n); if (error) { break; } @@ -1191,13 +1217,109 @@ complete: return (0); } +static struct usb_fs_endpoint * +ugen_fs_ep_uptr(struct usb_fifo *f, uint8_t ep_index) +{ + return ((struct usb_fs_endpoint *) + ((char *)f->fs_ep_ptr + (ep_index * f->fs_ep_sz))); +} + +static int +ugen_fs_copyin(struct usb_fifo *f, uint8_t ep_index, + struct usb_fs_endpoint* fs_ep) +{ +#ifdef COMPAT_FREEBSD32 + struct usb_fs_endpoint32 fs_ep32; +#endif + int error; + + switch (f->fs_ep_sz) { + case sizeof(struct usb_fs_endpoint): + error = copyin(ugen_fs_ep_uptr(f, ep_index), fs_ep, + f->fs_ep_sz); + if (error != 0) + return (error); + break; + +#ifdef COMPAT_FREEBSD32 + case sizeof(struct usb_fs_endpoint32): + error = copyin(ugen_fs_ep_uptr(f, ep_index), &fs_ep32, + f->fs_ep_sz); + if (error != 0) + return (error); + PTRIN_CP(fs_ep32, *fs_ep, ppBuffer); + PTRIN_CP(fs_ep32, *fs_ep, pLength); + CP(fs_ep32, *fs_ep, nFrames); + CP(fs_ep32, *fs_ep, aFrames); + CP(fs_ep32, *fs_ep, flags); + CP(fs_ep32, *fs_ep, timeout); + CP(fs_ep32, *fs_ep, isoc_time_complete); + CP(fs_ep32, *fs_ep, status); + break; +#endif + default: + panic("%s: unhandled fs_ep_sz %#x", __func__, f->fs_ep_sz); + } + + return (0); +} + static int -ugen_fs_copy_out_cancelled(struct usb_fs_endpoint *fs_ep_uptr) +ugen_fs_update(const struct usb_fs_endpoint *fs_ep, + struct usb_fifo *f, uint8_t ep_index) +{ + union { + struct usb_fs_endpoint *fs_ep_uptr; +#ifdef COMPAT_FREEBSD32 + struct usb_fs_endpoint32 *fs_ep_uptr32; +#endif + } u; + uint32_t *aFrames_uptr; + uint16_t *isoc_time_complete_uptr; + int *status_uptr; + + switch (f->fs_ep_sz) { + case sizeof(struct usb_fs_endpoint): + u.fs_ep_uptr = ugen_fs_ep_uptr(f, ep_index); + aFrames_uptr = &u.fs_ep_uptr->aFrames; + isoc_time_complete_uptr = &u.fs_ep_uptr->isoc_time_complete; + status_uptr = &u.fs_ep_uptr->status; + break; +#ifdef COMPAT_FREEBSD32 + case sizeof(struct usb_fs_endpoint32): + u.fs_ep_uptr32 = (struct usb_fs_endpoint32 *) + ugen_fs_ep_uptr(f, ep_index); + aFrames_uptr = &u.fs_ep_uptr32->aFrames; + isoc_time_complete_uptr = &u.fs_ep_uptr32->isoc_time_complete; + status_uptr = &u.fs_ep_uptr32->status; + break; +#endif + default: + panic("%s: unhandled fs_ep_sz %#x", __func__, f->fs_ep_sz); + } + + /* update "aFrames" */ + if (suword32(aFrames_uptr, fs_ep->aFrames) != 0) + return (EFAULT); + + /* update "isoc_time_complete" */ + if (suword16(isoc_time_complete_uptr, fs_ep->isoc_time_complete) != 0) + return (EFAULT); + + /* update "status" */ + if (suword32(status_uptr, fs_ep->status) != 0) + return (EFAULT); + + return (0); +} + +static int +ugen_fs_copy_out_cancelled(struct usb_fifo *f, uint8_t ep_index) { struct usb_fs_endpoint fs_ep; int error; - error = copyin(fs_ep_uptr, &fs_ep, sizeof(fs_ep)); + error = ugen_fs_copyin(f, ep_index, &fs_ep); if (error) return (error); @@ -1205,24 +1327,7 @@ ugen_fs_copy_out_cancelled(struct usb_fs_endpoint *fs_ep_uptr) fs_ep.aFrames = 0; fs_ep.isoc_time_complete = 0; - /* update "aFrames" */ - error = copyout(&fs_ep.aFrames, &fs_ep_uptr->aFrames, - sizeof(fs_ep.aFrames)); - if (error) - goto done; - - /* update "isoc_time_complete" */ - error = copyout(&fs_ep.isoc_time_complete, - &fs_ep_uptr->isoc_time_complete, - sizeof(fs_ep.isoc_time_complete)); - if (error) - goto done; - - /* update "status" */ - error = copyout(&fs_ep.status, &fs_ep_uptr->status, - sizeof(fs_ep.status)); -done: - return (error); + return (ugen_fs_update(&fs_ep, f, ep_index)); } static int @@ -1231,7 +1336,6 @@ ugen_fs_copy_out(struct usb_fifo *f, uint8_t ep_index) struct usb_device_request *req; struct usb_xfer *xfer; struct usb_fs_endpoint fs_ep; - struct usb_fs_endpoint *fs_ep_uptr; /* userland ptr */ void *uaddr; /* userland ptr */ void *kaddr; usb_frlength_t offset; @@ -1254,18 +1358,18 @@ ugen_fs_copy_out(struct usb_fifo *f, uint8_t ep_index) !xfer->flags_int.started) { mtx_unlock(f->priv_mtx); DPRINTF("Returning fake cancel event\n"); - return (ugen_fs_copy_out_cancelled(f->fs_ep_ptr + ep_index)); + return (ugen_fs_copy_out_cancelled(f, ep_index)); } else if (usbd_transfer_pending(xfer)) { mtx_unlock(f->priv_mtx); return (EBUSY); /* should not happen */ } mtx_unlock(f->priv_mtx); - fs_ep_uptr = f->fs_ep_ptr + ep_index; - error = copyin(fs_ep_uptr, &fs_ep, sizeof(fs_ep)); + error = ugen_fs_copyin(f, ep_index, &fs_ep); if (error) { return (error); } + fs_ep.status = xfer->error; fs_ep.aFrames = xfer->aframes; fs_ep.isoc_time_complete = xfer->isoc_time_complete; @@ -1302,10 +1406,8 @@ ugen_fs_copy_out(struct usb_fifo *f, uint8_t ep_index) for (; n != xfer->nframes; n++) { /* get initial length into "temp" */ - error = copyin(fs_ep.pLength + n, - &temp, sizeof(temp)); - if (error) { - return (error); + if (fueword32(fs_ep.pLength + n, &temp) != 0) { + return (EFAULT); } if (temp > rem) { /* the userland length has been corrupted */ @@ -1327,8 +1429,7 @@ ugen_fs_copy_out(struct usb_fifo *f, uint8_t ep_index) } if (isread) { /* we need to know the destination buffer */ - error = copyin(fs_ep.ppBuffer + n, - &uaddr, sizeof(uaddr)); + error = ugen_fs_getbuffer(&uaddr, f, fs_ep.ppBuffer, n); if (error) { return (error); } @@ -1344,7 +1445,7 @@ ugen_fs_copy_out(struct usb_fifo *f, uint8_t ep_index) /* move data */ error = copyout(kaddr, uaddr, length); if (error) { - return (error); + goto complete; } } /* @@ -1354,31 +1455,13 @@ ugen_fs_copy_out(struct usb_fifo *f, uint8_t ep_index) offset += temp; /* update length */ - error = copyout(&length, - fs_ep.pLength + n, sizeof(length)); - if (error) { - return (error); - } + if (suword32(fs_ep.pLength + n, length) != 0) + goto complete; } complete: - /* update "aFrames" */ - error = copyout(&fs_ep.aFrames, &fs_ep_uptr->aFrames, - sizeof(fs_ep.aFrames)); - if (error) - goto done; - - /* update "isoc_time_complete" */ - error = copyout(&fs_ep.isoc_time_complete, - &fs_ep_uptr->isoc_time_complete, - sizeof(fs_ep.isoc_time_complete)); - if (error) - goto done; - - /* update "status" */ - error = copyout(&fs_ep.status, &fs_ep_uptr->status, - sizeof(fs_ep.status)); -done: + if (error == 0) + error = ugen_fs_update(&fs_ep, f, ep_index); return (error); } @@ -2078,6 +2161,9 @@ ugen_iface_ioctl(struct usb_fifo *f, u_long cmd, void *addr, int fflags) static int ugen_ioctl_post(struct usb_fifo *f, u_long cmd, void *addr, int fflags) { +#ifdef COMPAT_FREEBSD32 + struct usb_fs_init local_pinit; +#endif union { struct usb_interface_descriptor *idesc; struct usb_alt_interface *ai; @@ -2085,6 +2171,9 @@ ugen_ioctl_post(struct usb_fifo *f, u_long cmd, void *addr, int fflags) struct usb_config_descriptor *cdesc; struct usb_device_stats *stat; struct usb_fs_init *pinit; +#ifdef COMPAT_FREEBSD32 + struct usb_fs_init32 *pinit32; +#endif struct usb_fs_uninit *puninit; struct usb_device_port_path *dpp; uint32_t *ptime; @@ -2094,6 +2183,7 @@ ugen_ioctl_post(struct usb_fifo *f, u_long cmd, void *addr, int fflags) struct usb_device_descriptor *dtemp; struct usb_config_descriptor *ctemp; struct usb_interface *iface; + size_t usb_fs_endpoint_sz = sizeof(struct usb_fs_endpoint); int error = 0; uint8_t n; @@ -2101,6 +2191,18 @@ ugen_ioctl_post(struct usb_fifo *f, u_long cmd, void *addr, int fflags) DPRINTFN(6, "cmd=0x%08lx\n", cmd); +#ifdef COMPAT_FREEBSD32 + switch (cmd) { + case USB_FS_INIT32: + PTRIN_CP(*u.pinit32, local_pinit, pEndpoints); + CP(*u.pinit32, local_pinit, ep_index_max); + u.addr = &local_pinit; + cmd = _IOC_NEWTYPE(USB_FS_INIT, struct usb_fs_init); + usb_fs_endpoint_sz = sizeof(struct usb_fs_endpoint32); + break; + } +#endif + switch (cmd) { case USB_DISCOVER: usb_needs_explore_all(); @@ -2328,6 +2430,7 @@ ugen_ioctl_post(struct usb_fifo *f, u_long cmd, void *addr, int fflags) u.pinit->ep_index_max, M_USB, M_WAITOK | M_ZERO); f->fs_ep_max = u.pinit->ep_index_max; f->fs_ep_ptr = u.pinit->pEndpoints; + f->fs_ep_sz = usb_fs_endpoint_sz; break; case USB_FS_UNINIT: diff --git a/sys/dev/usb/usb_ioctl.h b/sys/dev/usb/usb_ioctl.h index 9d35588f1138..5a139d0653c5 100644 --- a/sys/dev/usb/usb_ioctl.h +++ b/sys/dev/usb/usb_ioctl.h @@ -400,6 +400,24 @@ void usb_gen_descriptor_from32(struct usb_gen_descriptor *ugd, void update_usb_gen_descriptor32(struct usb_gen_descriptor32 *ugd32, struct usb_gen_descriptor *ugd); +struct usb_fs_endpoint32 { + uint32_t ppBuffer; /* void ** */ + uint32_t pLength; /* uint32_t * */ + uint32_t nFrames; + uint32_t aFrames; + uint16_t flags; + uint16_t timeout; + uint16_t isoc_time_complete; + int status; +}; + +struct usb_fs_init32 { + uint32_t pEndpoints; /* struct usb_fs_endpoint32 * */ + uint8_t ep_index_max; +}; + +#define USB_FS_INIT32 _IOC_NEWTYPE(USB_FS_INIT, struct usb_fs_init32) + #endif /* COMPAT_FREEBSD32 */ #endif /* _KERNEL */ From nobody Sun Apr 30 06:57:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HGb3ZSXz48rhc; Sun, 30 Apr 2023 06:57:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8HGb33Rsz3MQt; Sun, 30 Apr 2023 06:57:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YPI1bD7Tx5v8ZPVqt7D13ffCb9mOaWAP3pJNWSFv9j4=; b=kICmOwLi1a/gIvCHt9w9OKoVx13j4oxocZEJiE3AJKcovLJv9xMW/SQ0jkvsQIe0oZN3G/ nNSyYP4RpE2GB1Z+fLwpRZsD+dzmRE+weKOsiCYyz8KfwUQxGqr83du478wxHBjHQfdLLv OIBH3R//EuPtz0wEk73qzc54AONx3r0GSBeYkrDfbWSt3u3gDdCk0GobQQKq+wRdc0s/mr EDVtHiicptADLNeL3SZUs9p3858wbIxXHYH01d0LbrbXbE6oQK8VlZhlfoK/cxqZ1qKFDO fIgYy0XIGte8JCuehAOJLSKvNtBRQ0RZtgWpJEdYoPsvSqOHRBayvLg/dReehA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YPI1bD7Tx5v8ZPVqt7D13ffCb9mOaWAP3pJNWSFv9j4=; b=in1dilip+eTxJfIBH2Go2vYZHBQPO7L3n6SvBWYwpgDVdq2FxPAOwVlsHcP2zNlfm5sQom csNgnqOh5LHwFV9lDB2fDLNH603YsFFfK57TE9idQY0HMWsYs9UBQnLu+Ux6RMtO6thGHd siVtj6DovD1gVkxO5m3O+BGim8lUuq+bYYO5WHNX+qghCm/eiVDphtoabi9fzBw5w+kFW8 RwcJ/C4uJwP1zBcr+iCoAla17ZtCncd+/fVsICHiBR7ZCfFb/tKOReIwWQrvLZuANUUk1o 6Yu25r1SE8klVI7iSpGx+y+wx27hFvZWVTzkvF4PXyy+voeh/KB+awis9R6kmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837863; a=rsa-sha256; cv=none; b=nLUc9qg4Bgz22Q0MxqEjmJPBEaaAg1KEl7BgcF5VwFeXsDwLuu6r0fC81B2hiUzovMfsSr C9UXG2rDWXw3e4abxwFcCK6LcLpKFaB97bxqKTcgcrVzs8oy6z+8hX65oiNH/80NLwDgoL 4wJTlUhkNood48flWN0c3GdB9WRTxcwtVJ5yxxz42fJxaOXEn3PHUggnwMc1UNBYFVb4UD nH9LZDQx4iY8jTc6AeEho9rLf823LZJuVZLrrYABXlqB2v/npIUwWz6PcBWQSsLaaHK5S6 5wfhV5WqhTx4qpAQQ80hbAMLQX/uiRtxNQpQhbRSz8QtVuKx3lPucib+x/jTsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HGb1sGKz1Ccb; Sun, 30 Apr 2023 06:57:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6vh6O071343; Sun, 30 Apr 2023 06:57:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6vh2k071342; Sun, 30 Apr 2023 06:57:43 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:57:43 GMT Message-Id: <202304300657.33U6vh2k071342@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 60603f6a5302 - stable/13 - usb: remove COMPAT_32BIT ifdefs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 60603f6a530250b4e71ac658cfddf5d9e0a418b0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=60603f6a530250b4e71ac658cfddf5d9e0a418b0 commit 60603f6a530250b4e71ac658cfddf5d9e0a418b0 Author: Brooks Davis AuthorDate: 2021-12-17 21:28:14 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:15 +0000 usb: remove COMPAT_32BIT ifdefs Now that we have proper 32-bit compat support, remove COMPAT_32BIT ifdefs to allow 32-bit code to use the 64-bit layout of USB ioctl structs and struct usb_fs_endpoint. This includes the removal of redundant alignment directives that had no effect in practice. Reviewed by: hselasky, jrtc27 (prior version) (cherry picked from commit ea972feea2d2589ee1317a19eeada0598332defa) --- sys/dev/hid/hidraw.h | 20 +++------------ sys/dev/usb/usb_ioctl.h | 67 +++++++++++++------------------------------------ 2 files changed, 21 insertions(+), 66 deletions(-) diff --git a/sys/dev/hid/hidraw.h b/sys/dev/hid/hidraw.h index 4eaf8650a332..b1b037ab8c1b 100644 --- a/sys/dev/hid/hidraw.h +++ b/sys/dev/hid/hidraw.h @@ -35,23 +35,9 @@ #define HIDRAW_BUFFER_SIZE 64 /* number of input reports buffered */ #define HID_MAX_DESCRIPTOR_SIZE 4096 /* artificial limit taken from Linux */ -/* - * Align IOCTL structures to hide differences when running 32-bit - * programs under 64-bit kernels: - */ -#ifdef COMPAT_32BIT -#define HIDRAW_IOCTL_STRUCT_ALIGN(n) __aligned(n) -#else -#define HIDRAW_IOCTL_STRUCT_ALIGN(n) -#endif - /* Compatible with usb_gen_descriptor structure */ struct hidraw_gen_descriptor { -#ifdef COMPAT_32BIT - uint64_t hgd_data; -#else void *hgd_data; -#endif uint16_t hgd_lang_id; uint16_t hgd_maxlen; uint16_t hgd_actlen; @@ -63,18 +49,18 @@ struct hidraw_gen_descriptor { uint8_t hgd_endpt_index; uint8_t hgd_report_type; uint8_t reserved[8]; -} HIDRAW_IOCTL_STRUCT_ALIGN(8); +}; struct hidraw_report_descriptor { uint32_t size; uint8_t value[HID_MAX_DESCRIPTOR_SIZE]; -} HIDRAW_IOCTL_STRUCT_ALIGN(4); +}; struct hidraw_devinfo { uint32_t bustype; int16_t vendor; int16_t product; -} HIDRAW_IOCTL_STRUCT_ALIGN(4); +}; /* FreeBSD uhid(4)-compatible ioctl interface */ #define HIDRAW_GET_REPORT_DESC _IOWR('U', 21, struct hidraw_gen_descriptor) diff --git a/sys/dev/usb/usb_ioctl.h b/sys/dev/usb/usb_ioctl.h index 5a139d0653c5..a57228a5fac2 100644 --- a/sys/dev/usb/usb_ioctl.h +++ b/sys/dev/usb/usb_ioctl.h @@ -46,16 +46,6 @@ #define USB_GENERIC_NAME "ugen" #define USB_TEMPLATE_SYSCTL "hw.usb.template" /* integer type */ -/* - * Align IOCTL structures to hide differences when running 32-bit - * programs under 64-bit kernels: - */ -#ifdef COMPAT_32BIT -#define USB_IOCTL_STRUCT_ALIGN(n) __aligned(n) -#else -#define USB_IOCTL_STRUCT_ALIGN(n) -#endif - /* Definition of valid template sysctl values */ enum { @@ -75,38 +65,26 @@ enum { }; struct usb_read_dir { -#ifdef COMPAT_32BIT - uint64_t urd_data; -#else void *urd_data; -#endif uint32_t urd_startentry; uint32_t urd_maxlen; -} USB_IOCTL_STRUCT_ALIGN(8); +}; struct usb_ctl_request { -#ifdef COMPAT_32BIT - uint64_t ucr_data; -#else void *ucr_data; -#endif uint16_t ucr_flags; uint16_t ucr_actlen; /* actual length transferred */ uint8_t ucr_addr; /* zero - currently not used */ struct usb_device_request ucr_request; -} USB_IOCTL_STRUCT_ALIGN(8); +}; struct usb_alt_interface { uint8_t uai_interface_index; uint8_t uai_alt_index; -} USB_IOCTL_STRUCT_ALIGN(1); +}; struct usb_gen_descriptor { -#ifdef COMPAT_32BIT - uint64_t ugd_data; -#else void *ugd_data; -#endif uint16_t ugd_lang_id; uint16_t ugd_maxlen; uint16_t ugd_actlen; @@ -118,7 +96,7 @@ struct usb_gen_descriptor { uint8_t ugd_endpt_index; uint8_t ugd_report_type; uint8_t reserved[8]; -} USB_IOCTL_STRUCT_ALIGN(8); +}; struct usb_device_info { uint16_t udi_productNo; @@ -147,7 +125,7 @@ struct usb_device_info { char udi_vendor[128]; char udi_serial[64]; char udi_release[8]; -} USB_IOCTL_STRUCT_ALIGN(2); +}; #define USB_DEVICE_PORT_PATH_MAX 32 @@ -156,24 +134,24 @@ struct usb_device_port_path { uint8_t udp_index; /* which device index */ uint8_t udp_port_level; /* how many levels: 0, 1, 2 ... */ uint8_t udp_port_no[USB_DEVICE_PORT_PATH_MAX]; -} USB_IOCTL_STRUCT_ALIGN(1); +}; struct usb_device_stats { uint32_t uds_requests_ok[4]; /* Indexed by transfer type UE_XXX */ uint32_t uds_requests_fail[4]; /* Indexed by transfer type UE_XXX */ -} USB_IOCTL_STRUCT_ALIGN(4); +}; struct usb_fs_start { uint8_t ep_index; -} USB_IOCTL_STRUCT_ALIGN(1); +}; struct usb_fs_stop { uint8_t ep_index; -} USB_IOCTL_STRUCT_ALIGN(1); +}; struct usb_fs_complete { uint8_t ep_index; -} USB_IOCTL_STRUCT_ALIGN(1); +}; /* This structure is used for all endpoint types */ struct usb_fs_endpoint { @@ -181,14 +159,9 @@ struct usb_fs_endpoint { * NOTE: isochronous USB transfer only use one buffer, but can have * multiple frame lengths ! */ -#ifdef COMPAT_32BIT - uint64_t ppBuffer; - uint64_t pLength; -#else void **ppBuffer; /* pointer to userland buffers */ uint32_t *pLength; /* pointer to frame lengths, updated * to actual length */ -#endif uint32_t nFrames; /* number of frames */ uint32_t aFrames; /* actual number of frames */ uint16_t flags; @@ -206,22 +179,18 @@ struct usb_fs_endpoint { /* timeout value for no timeout */ #define USB_FS_TIMEOUT_NONE 0 int status; /* see USB_ERR_XXX */ -} USB_IOCTL_STRUCT_ALIGN(8); +}; struct usb_fs_init { /* userland pointer to endpoints structure */ -#ifdef COMPAT_32BIT - uint64_t pEndpoints; -#else struct usb_fs_endpoint *pEndpoints; -#endif /* maximum number of endpoints */ uint8_t ep_index_max; -} USB_IOCTL_STRUCT_ALIGN(8); +}; struct usb_fs_uninit { uint8_t dummy; /* zero */ -} USB_IOCTL_STRUCT_ALIGN(1); +}; struct usb_fs_open { #define USB_FS_MAX_BUFSIZE (1 << 25) /* 32 MBytes */ @@ -233,20 +202,20 @@ struct usb_fs_open { uint8_t dev_index; /* currently unused */ uint8_t ep_index; uint8_t ep_no; /* bEndpointNumber */ -} USB_IOCTL_STRUCT_ALIGN(4); +}; struct usb_fs_open_stream { struct usb_fs_open fs_open; uint16_t stream_id; /* stream ID */ -} USB_IOCTL_STRUCT_ALIGN(4); +}; struct usb_fs_close { uint8_t ep_index; -} USB_IOCTL_STRUCT_ALIGN(1); +}; struct usb_fs_clear_stall_sync { uint8_t ep_index; -} USB_IOCTL_STRUCT_ALIGN(1); +}; struct usb_gen_quirk { uint16_t index; /* Quirk Index */ @@ -260,7 +229,7 @@ struct usb_gen_quirk { * UQ_XXX in "usb_quirk.h". */ char quirkname[64 - 14]; -} USB_IOCTL_STRUCT_ALIGN(2); +}; /* USB controller */ #define USB_REQUEST _IOWR('U', 1, struct usb_ctl_request) From nobody Sun Apr 30 06:57:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HGc4Kljz48s6n; Sun, 30 Apr 2023 06:57: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 4Q8HGc3rQHz3Ly6; Sun, 30 Apr 2023 06:57:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0YVX7+6H7b/4wYfmqnHaDcdW+M795emZ5ryvFP7j8FQ=; b=srFNR+it07BwrBe7cnB/VOW3UldgkCvFfStD/EJr3inP8N38JpxVlMCri8h9KqBrhn5VvA 3bxng04kQKT7aHYRc5YL8DlkhRKWNobwIzeM8FKsBhwx8lXwWwSUOn4YGQyu81saNuPtZ5 nEQqCZJrpugv4O+V7Glbo+rBjUAtojMnOdcMwACxZ6UWtTOEtQCWW0w234pv1S2a/GNTFn BnHYNDdecq2bqXfbveHlvP2VKHCmptT40a1a5q24EAsYvrwTmIctc2O2lsMRWcpEtzmyv0 A6yyYvRTUI85ppttCiNKaQtlmMhX15HYOmRYlOCLIjkBShjfU147d8/fk7LZ4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0YVX7+6H7b/4wYfmqnHaDcdW+M795emZ5ryvFP7j8FQ=; b=sKZd2/bVHcf9YYJkMpstJxsagrRUZLQ3UeXaZgSfGxd/r4rBGqFb13tOn6t78zKwktATL9 qmtde8CgCiN4B+CJefNw8f3vak5w9B9nceNDEzSfoHuTLMLWhy70R148nn2XgPrrFEQ0hn 2wJEUSIXbT1itDB9HFBY4Im/IcQ7EMBPTBxzx8l1JPkzMIjDk0Ir7YcWLTHyekK/mgH9S0 Ebxi5W/Zm2cqe+r6sdmQXouJXP0Gk/g3eCcAjKLbd2oVr6U4i+St76BUtEJ79qfdQhCC5x y4Bkggpd++Uo6iP2f4nEQXuxwnNl5JH1BsGwXoRbWSjia0jNvPWxnKSwPmFcuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837864; a=rsa-sha256; cv=none; b=NoSn7txdCWdxsFgC5hZYX4koe+FcI7jVlaronnNO/At7qGZj5aVEa71XyNwgyipgY0alJO SxJT+NJkdX2VhnoCs5mIon6kJT593fVfsB5yOmRFS9Og4i/7fYn8Uifhnu7PFeCyUVf0Qp A3b1Uas104xnwD9+yA1YD+w197NU/gaxo4yq3G06ifBgn0sbRn6zzwnNOM9BgF9Tc/1BlW UZbtvgvFB0HjPNz+HQW9fcOY3quOA2vPRFaQM3EHvdP/HkyRJTjx2JHzEpopSN1U8TRwF7 ILU3ai/7UWeTddwM/rW/qdrw+pCuRpJWBD+GgpRIus6hGLCiy3Xf+9cNK4iNrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HGc2mrDz1Ccc; Sun, 30 Apr 2023 06:57:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6viPT071362; Sun, 30 Apr 2023 06:57:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6viOe071361; Sun, 30 Apr 2023 06:57:44 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:57:44 GMT Message-Id: <202304300657.33U6viOe071361@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: a03d9f263466 - stable/13 - libusb: remove use of COMPAT_32BIT List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a03d9f2634664361fd7554a7e32f36e0a2131da3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=a03d9f2634664361fd7554a7e32f36e0a2131da3 commit a03d9f2634664361fd7554a7e32f36e0a2131da3 Author: Brooks Davis AuthorDate: 2021-12-17 21:28:14 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:15 +0000 libusb: remove use of COMPAT_32BIT This codepath used uint64_t's in place of pointers in structs and arrays to allow 32-bit code to use 64-bit version of ioctls. Now that we support 32-bit compat natively this is no longer needed. Reviewed by: hselasky, jrtc27 (prior version) (cherry picked from commit 8010f4ad21b6120e929bda4eed27696e63514677) --- lib/libusb/Makefile | 8 ++------ lib/libusb/libusb20.c | 12 ++++++------ lib/libusb/libusb20_int.h | 10 ---------- lib/libusb/libusb20_ugen20.c | 16 ++++++++-------- lib/libusbhid/Makefile | 4 ---- lib/libusbhid/data.c | 4 ++-- lib/libusbhid/descr.c | 4 ++-- lib/libusbhid/usbvar.h | 6 ------ 8 files changed, 20 insertions(+), 44 deletions(-) diff --git a/lib/libusb/Makefile b/lib/libusb/Makefile index 1648664b8815..e33ca30ef22d 100644 --- a/lib/libusb/Makefile +++ b/lib/libusb/Makefile @@ -34,10 +34,6 @@ SRCS+= libusb10_desc.c SRCS+= libusb10_hotplug.c SRCS+= libusb10_io.c -.if defined(COMPAT_32BIT) -CFLAGS+= -DCOMPAT_32BIT -.endif - PCFILES= libusb-0.1.pc libusb-1.0.pc libusb-2.0.pc # @@ -45,14 +41,14 @@ PCFILES= libusb-0.1.pc libusb-1.0.pc libusb-2.0.pc # # Examples: # make LIBUSB_GLOBAL_INCLUDE_FILE=libusb_global_linux.h -# make COMPAT_32BIT=YES \ +# make \ # LIBUSB_GLOBAL_INCLUDE_FILE=libusb_global_linux.h \ # DEBUG_FLAGS="-g" # # From Ubuntu 10.04: # freebsd-make LIBUSB_GLOBAL_INCLUDE_FILE=libusb_global_linux.h \ # PTHREAD_LIBS="-lpthread -lrt" -# freebsd-make COMPAT32_BIT=YES \ +# freebsd-make \ # LIBUSB_GLOBAL_INCLUDE_FILE=libusb_global_linux.h \ # PTHREAD_LIBS="-lpthread -lrt" # diff --git a/lib/libusb/libusb20.c b/lib/libusb/libusb20.c index 4323552b83ad..60a5f8448888 100644 --- a/lib/libusb/libusb20.c +++ b/lib/libusb/libusb20.c @@ -352,7 +352,7 @@ libusb20_tr_clear_stall_sync(struct libusb20_transfer *xfer) void libusb20_tr_set_buffer(struct libusb20_transfer *xfer, void *buffer, uint16_t frIndex) { - xfer->ppBuffer[frIndex] = libusb20_pass_ptr(buffer); + xfer->ppBuffer[frIndex] = buffer; return; } @@ -418,7 +418,7 @@ libusb20_tr_set_total_frames(struct libusb20_transfer *xfer, uint32_t nFrames) void libusb20_tr_setup_bulk(struct libusb20_transfer *xfer, void *pBuf, uint32_t length, uint32_t timeout) { - xfer->ppBuffer[0] = libusb20_pass_ptr(pBuf); + xfer->ppBuffer[0] = pBuf; xfer->pLength[0] = length; xfer->timeout = timeout; xfer->nFrames = 1; @@ -430,7 +430,7 @@ libusb20_tr_setup_control(struct libusb20_transfer *xfer, void *psetup, void *pB { uint16_t len; - xfer->ppBuffer[0] = libusb20_pass_ptr(psetup); + xfer->ppBuffer[0] = psetup; xfer->pLength[0] = 8; /* fixed */ xfer->timeout = timeout; @@ -438,7 +438,7 @@ libusb20_tr_setup_control(struct libusb20_transfer *xfer, void *psetup, void *pB if (len != 0) { xfer->nFrames = 2; - xfer->ppBuffer[1] = libusb20_pass_ptr(pBuf); + xfer->ppBuffer[1] = pBuf; xfer->pLength[1] = len; } else { xfer->nFrames = 1; @@ -449,7 +449,7 @@ libusb20_tr_setup_control(struct libusb20_transfer *xfer, void *psetup, void *pB void libusb20_tr_setup_intr(struct libusb20_transfer *xfer, void *pBuf, uint32_t length, uint32_t timeout) { - xfer->ppBuffer[0] = libusb20_pass_ptr(pBuf); + xfer->ppBuffer[0] = pBuf; xfer->pLength[0] = length; xfer->timeout = timeout; xfer->nFrames = 1; @@ -463,7 +463,7 @@ libusb20_tr_setup_isoc(struct libusb20_transfer *xfer, void *pBuf, uint32_t leng /* should not happen */ return; } - xfer->ppBuffer[frIndex] = libusb20_pass_ptr(pBuf); + xfer->ppBuffer[frIndex] = pBuf; xfer->pLength[frIndex] = length; return; } diff --git a/lib/libusb/libusb20_int.h b/lib/libusb/libusb20_int.h index 5f54ee3717fc..16796dc1233d 100644 --- a/lib/libusb/libusb20_int.h +++ b/lib/libusb/libusb20_int.h @@ -33,12 +33,6 @@ #ifndef _LIBUSB20_INT_H_ #define _LIBUSB20_INT_H_ -#ifdef COMPAT_32BIT -#define libusb20_pass_ptr(ptr) ((uint64_t)(uintptr_t)(ptr)) -#else -#define libusb20_pass_ptr(ptr) (ptr) -#endif - struct libusb20_device; struct libusb20_backend; struct libusb20_transfer; @@ -159,11 +153,7 @@ struct libusb20_transfer { /* * Pointer to a list of buffer pointers: */ -#ifdef COMPAT_32BIT - uint64_t *ppBuffer; -#else void **ppBuffer; -#endif /* * Pointer to frame lengths, which are updated to actual length * after the USB transfer completes: diff --git a/lib/libusb/libusb20_ugen20.c b/lib/libusb/libusb20_ugen20.c index 5687caf97e4f..efffff2b5ef0 100644 --- a/lib/libusb/libusb20_ugen20.c +++ b/lib/libusb/libusb20_ugen20.c @@ -251,7 +251,7 @@ ugen20_readdir(struct ugen20_urd_state *st) repeat: if (st->ptr == NULL) { st->urd.urd_startentry += st->nparsed; - st->urd.urd_data = libusb20_pass_ptr(st->buf); + st->urd.urd_data = st->buf; st->urd.urd_maxlen = sizeof(st->buf); st->nparsed = 0; @@ -364,7 +364,7 @@ ugen20_tr_renew(struct libusb20_device *pdev) memset(&fs_init, 0, sizeof(fs_init)); - fs_init.pEndpoints = libusb20_pass_ptr(pdev->privBeData); + fs_init.pEndpoints = pdev->privBeData; fs_init.ep_index_max = nMaxTransfer; if (ioctl(pdev->file, IOUSB(USB_FS_INIT), &fs_init)) { @@ -478,7 +478,7 @@ ugen20_get_config_desc_full(struct libusb20_device *pdev, memset(&cdesc, 0, sizeof(cdesc)); memset(&gen_desc, 0, sizeof(gen_desc)); - gen_desc.ugd_data = libusb20_pass_ptr(&cdesc); + gen_desc.ugd_data = &cdesc; gen_desc.ugd_maxlen = sizeof(cdesc); gen_desc.ugd_config_index = cfg_index; @@ -499,7 +499,7 @@ ugen20_get_config_desc_full(struct libusb20_device *pdev, /* make sure memory is initialised */ memset(ptr, 0, len); - gen_desc.ugd_data = libusb20_pass_ptr(ptr); + gen_desc.ugd_data = ptr; gen_desc.ugd_maxlen = len; error = ioctl(pdev->file_ctrl, IOUSB(USB_GET_FULL_DESC), &gen_desc); @@ -726,7 +726,7 @@ ugen20_do_request_sync(struct libusb20_device *pdev, memset(&req, 0, sizeof(req)); - req.ucr_data = libusb20_pass_ptr(data); + req.ucr_data = data; if (!(flags & LIBUSB20_TRANSFER_SINGLE_SHORT_NOT_OK)) { req.ucr_flags |= USB_SHORT_XFER_OK; } @@ -835,8 +835,8 @@ ugen20_tr_open(struct libusb20_transfer *xfer, uint32_t MaxBufSize, xfer->maxPacketLen = temp.fs_open.max_packet_length; /* setup buffer and length lists using zero copy */ - fsep->ppBuffer = libusb20_pass_ptr(xfer->ppBuffer); - fsep->pLength = libusb20_pass_ptr(xfer->pLength); + fsep->ppBuffer = xfer->ppBuffer; + fsep->pLength = xfer->pLength; return (0); /* success */ } @@ -956,7 +956,7 @@ ugen20_dev_get_iface_desc(struct libusb20_device *pdev, memset(&ugd, 0, sizeof(ugd)); - ugd.ugd_data = libusb20_pass_ptr(buf); + ugd.ugd_data = buf; ugd.ugd_maxlen = len; ugd.ugd_iface_index = iface_index; diff --git a/lib/libusbhid/Makefile b/lib/libusbhid/Makefile index 7dba7ffc9113..2a58a4b1eb48 100644 --- a/lib/libusbhid/Makefile +++ b/lib/libusbhid/Makefile @@ -19,8 +19,4 @@ SRCS= descr.c descr_compat.c parse.c usage.c data.c INCS= usbhid.h -.if defined(COMPAT_32BIT) -CFLAGS+= -DCOMPAT_32BIT -.endif - .include diff --git a/lib/libusbhid/data.c b/lib/libusbhid/data.c index ae81bb321095..cad320562eee 100644 --- a/lib/libusbhid/data.c +++ b/lib/libusbhid/data.c @@ -126,7 +126,7 @@ hid_get_report(int fd, enum hid_kind k, unsigned char *data, unsigned int size) struct usb_gen_descriptor ugd; memset(&ugd, 0, sizeof(ugd)); - ugd.ugd_data = hid_pass_ptr(data); + ugd.ugd_data = data; ugd.ugd_maxlen = size; ugd.ugd_report_type = k + 1; return (ioctl(fd, USB_GET_REPORT, &ugd)); @@ -138,7 +138,7 @@ hid_set_report(int fd, enum hid_kind k, unsigned char *data, unsigned int size) struct usb_gen_descriptor ugd; memset(&ugd, 0, sizeof(ugd)); - ugd.ugd_data = hid_pass_ptr(data); + ugd.ugd_data = data; ugd.ugd_maxlen = size; ugd.ugd_report_type = k + 1; return (ioctl(fd, USB_SET_REPORT, &ugd)); diff --git a/lib/libusbhid/descr.c b/lib/libusbhid/descr.c index 329bbe9261b7..7cd6750ad322 100644 --- a/lib/libusbhid/descr.c +++ b/lib/libusbhid/descr.c @@ -105,7 +105,7 @@ hid_get_report_desc(int fd) memset(&ugd, 0, sizeof(ugd)); /* get actual length first */ - ugd.ugd_data = hid_pass_ptr(NULL); + ugd.ugd_data = NULL; ugd.ugd_maxlen = 65535; if (ioctl(fd, USB_GET_REPORT_DESC, &ugd) < 0) { #ifdef HID_COMPAT7 @@ -126,7 +126,7 @@ hid_get_report_desc(int fd) return (NULL); /* fetch actual descriptor */ - ugd.ugd_data = hid_pass_ptr(data); + ugd.ugd_data = data; ugd.ugd_maxlen = ugd.ugd_actlen; if (ioctl(fd, USB_GET_REPORT_DESC, &ugd) < 0) { /* could not read descriptor */ diff --git a/lib/libusbhid/usbvar.h b/lib/libusbhid/usbvar.h index 5072f4787e42..0dfd596e8bb0 100644 --- a/lib/libusbhid/usbvar.h +++ b/lib/libusbhid/usbvar.h @@ -47,10 +47,4 @@ int hid_get_report_id_compat7(int fd); report_desc_t hid_get_report_desc_compat7(int fd); #endif -#ifdef COMPAT_32BIT -#define hid_pass_ptr(ptr) ((uint64_t)(uintptr_t)(ptr)) -#else -#define hid_pass_ptr(ptr) (ptr) -#endif - #endif /* _USBVAR_H_ */ From nobody Sun Apr 30 06:57:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HGd5QP9z48rhh; Sun, 30 Apr 2023 06:57: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 4Q8HGd4wHSz3MX5; Sun, 30 Apr 2023 06:57:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TpTKiggGktfavv8QJE/rWZed+kw6kOlJIxWzLi68wMo=; b=yxYebNbfpw6Ze+ibAM9/ETbdD21OnCSnGWATZbsTjiQeZ+qCE1SjB1PRgVE581Sz0aq+T4 j2NcijS7Tn+mPnO9A5+b3ucVaUCFFJC0/ydr5P01Bgh+P87i13n/XRKD/s5IIe4UyTRtm7 MzAA8tklnlkNzrnTq1+1FTaxfvkTLv0d/Z5Lfyto8QuWF37lz+bHm3h8cezlQgOToId7xw sUy8Ck7GvnwKw0YbPQj4YUxaRTZGXr6iK0vwPhco/12hbTnWaJvbl/uPVKhEB703qCtcTV JdLj9WS9zGL0LXliiUIEMASbsHCNoMlQyiiI1/IGioohzTLxUvu0EMAeQc2RNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TpTKiggGktfavv8QJE/rWZed+kw6kOlJIxWzLi68wMo=; b=GjYkflzr90woHf5buGudgV/+/1zr6nbZBeP4Ocv6vb+rgr0RXQfmrMd82vc0mXsWQH35KH yTtgbLfQLpq/PQ5cIvga0WuVQGGreqI1SrSch09SVKoJ5vBpQoAGFX9AD1D4XdSoHKHl+R XArZvmKEhQWPiceSgq86Gt0OKWzpoHhxrSO3JHXftLUlvNjiilXThPce7xwzwb6tBHVIq0 OPycENNrx2soK9/6qZgBCVIh5W8sfRqgXGcpUN1RDqjm4j4OFyeAqeApzNprcYQ8/RU6c0 ZNez5jFcYewI2Ud9QTpz+gKI3ToQXX/obfTt/N91WPjgSFNP3lbDpd/banUP4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837865; a=rsa-sha256; cv=none; b=QzcsfYlxo5/Gi+Ct9Xr7oXDBjWYCrpswVlAzBN5U11mQ+Ho6PMkDJm1TRMpVjx1U80u0Uh iJk+lOTltuqdsiVZMDFTP2mDE8yShYJk3lL7gCK7WnVLTenEHeFdvKGLATe3RABjU34rQA hyQQjHOP7JgC+zbNwjU2Yat95YfZyCdSVO6D4josJtq6BxUhY9LW1oxT40RXkbkBF/7Hiq EnYi2dwLonOxxr1G77zr69tAZ5tPDyRkknAaehAWie6J6/sqe+aURYqG+LhtuqeXRWDlYD JdaTSjW9HrFR1X+csWZboXr3tWDAxRF+zx4UKq/h3/k59QHbJMYh8KDmIUpmgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HGd3kM3z1Crd; Sun, 30 Apr 2023 06:57:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6vjE5071381; Sun, 30 Apr 2023 06:57:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6vjqk071380; Sun, 30 Apr 2023 06:57:45 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:57:45 GMT Message-Id: <202304300657.33U6vjqk071380@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: d9a8025f4849 - stable/13 - uhid_snes: Remove USB_ST_TRANSFERRED handling for the status request. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d9a8025f484984a2165767762648f668b869f49f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=d9a8025f484984a2165767762648f668b869f49f commit d9a8025f484984a2165767762648f668b869f49f Author: John Baldwin AuthorDate: 2022-04-18 19:27:48 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:15 +0000 uhid_snes: Remove USB_ST_TRANSFERRED handling for the status request. The result of the request computed in new_status was never returned to the caller leaving new_status as a set-but-unused variable. Removing new_status leaves sc->previous_status as a write-only variable. Removing sc->previous_status leaves current_status as a write-only variable, so it collapses down to removing the entire USB_ST_TRANSFERRED case. Arguably, all of the support for UHID_SNES_STATUS_DT_RD should be removed as it doesn't return anything to the caller. If the request should be fixed instead then this commit should be reverted and new_status should be returned to whoever submitted the request. Differential Revision: https://reviews.freebsd.org/D34840 (cherry picked from commit 540ac338d5575131d134d2c033f31b5d6d576c68) --- sys/dev/usb/input/uhid_snes.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/sys/dev/usb/input/uhid_snes.c b/sys/dev/usb/input/uhid_snes.c index 9bce3d10941f..d786b0e1f257 100644 --- a/sys/dev/usb/input/uhid_snes.c +++ b/sys/dev/usb/input/uhid_snes.c @@ -94,7 +94,6 @@ struct uhid_snes_softc { int sc_fflags; struct usb_fifo *sc_fifo_open[2]; uint8_t sc_zero_length_packets; - uint8_t sc_previous_status; uint8_t sc_iid; uint8_t sc_oid; uint8_t sc_fid; @@ -498,7 +497,6 @@ uhid_snes_status_callback(struct usb_xfer *transfer, usb_error_t error) struct uhid_snes_softc *sc = usbd_xfer_softc(transfer); struct usb_device_request req; struct usb_page_cache *pc; - uint8_t current_status, new_status; switch (USB_GET_STATE(transfer)) { case USB_ST_SETUP: @@ -517,13 +515,6 @@ uhid_snes_status_callback(struct usb_xfer *transfer, usb_error_t error) usbd_transfer_submit(transfer); break; - case USB_ST_TRANSFERRED: - pc = usbd_xfer_get_frame(transfer, 1); - usbd_copy_out(pc, 0, ¤t_status, 1); - new_status = current_status & ~sc->sc_previous_status; - sc->sc_previous_status = current_status; - break; - default: break; } From nobody Sun Apr 30 06:57:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HGg19Nnz48rsh; Sun, 30 Apr 2023 06:57: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 4Q8HGf5hZcz3MRl; Sun, 30 Apr 2023 06:57:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8VhrkGqIyE7teG8jbJibes47XxHacqsaWgxd0uC4pSY=; b=aPEuYDnHGag7aMr8nrlTJIFY1zKMaItEPjizbdnmA8KEAU5rxdXRgoaV0B+eKNQoNekPUw XD/ZO2czjVrHrRSAi0u5Nd3Hgt9ryE5lNQMQJ1qZrPcYQ8DNyOqcXRxgUViDwWIDxc1fOJ d4ODAKWpHZXm6AscwxJUTMy3Vcn9MmP4rDz5sOz0EHTY136SMsLbptDKp1JSOcSOecmWPY Z0zRThYaUoyZBELx2BzCbTEkcIRwEA148mJMGJu1j9ZSDEL/XweW8me3U7auOAKe1C14mN 7Bnwh2Ua3Smxhr17uiYc27fTARXOSw4TO4qUEtdNSt5CXAIvun9jxrfeqZL3dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8VhrkGqIyE7teG8jbJibes47XxHacqsaWgxd0uC4pSY=; b=cKqZpKY4domzJrvW2aAIfbEsgdbaBBZDwBOaOVuyqCMeLGz6VH/D/Xk+pnFjpdgHt2Mmgc UcESax6bSGGL8sLBMHys8PIhEw1wc6Kae56LiOzI3u6HSnpctIWGcLN+8IqQnJoA87U/f7 QW50W372WyiZAxc9W/W9q9b9tJQMsx2f+P6KiyMuAue+Nr+lkmy0CZAQ38SGhvvCNSv7je MjcmrLhHsVr6VEjlrEqM+a1i7aMVdVvV8Qn0yjl9/3h3Ww1eyDNZ84xk0u/Gf4bcWsnpUd BYFYpz1N++teOaRerq14zAh78rrXsSmvEa/MNHdXFwquGiFXCau1H1A1E3PK7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837866; a=rsa-sha256; cv=none; b=BdxFeAxBtPboNyIs0mQtsAcAzCiFbTt5FB/0KWGcVBn5e4Q0f9VAzy5t1GR8dQ4eJoSYk9 c4kPntgUrOzGBND3bOmTmiGgX976woRpOdELhhzotm6qsdIOqFRueBF4ol9A1NL82jPvJr kb0dIcMOW3Zzm1ZGw8tdCVpNBkydQcsmaLMjzYi3eL35R3cd3F4w9wQ4vzmrbOgurUJGDb yUX51sUPrwvHi8x3hDo4QGv0EqDu3Svj2Vn/B+T3RxfIlzJYkpyoLFpe3INM4xtkYHA/V8 KeQXScuFya36SosLOniHo2pEqsMdxKxcE7c+5FuhUQdnVvO82Li0ObtY+8JaZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HGf4fpxzDr7; Sun, 30 Apr 2023 06:57:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6vkAS071404; Sun, 30 Apr 2023 06:57:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6vkrL071403; Sun, 30 Apr 2023 06:57:46 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:57:46 GMT Message-Id: <202304300657.33U6vkrL071403@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: cb68867ec7bb - stable/13 - usb: Respect NO_INQUIRY quirk during device enumeration List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cb68867ec7bba4d296cedb73c09f4256086cff32 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=cb68867ec7bba4d296cedb73c09f4256086cff32 commit cb68867ec7bba4d296cedb73c09f4256086cff32 Author: Kornel Duleba AuthorDate: 2022-04-26 12:07:21 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:16 +0000 usb: Respect NO_INQUIRY quirk during device enumeration Both usb_iface_is_cdrom and usb_msc_auto_quirk functions use SCSI INQUIRY command to probe various properties of usb mass storage devices. The problem here is that some very broken devices don't like this command. Check if UQ_MSC_NO_INQUIRY quirk is set and skip cdrom and quirk autodetection in that case. Sponsored by: Stormshield Obtained from: Semihalf Reviewed by: hps, wma Differential Revision: https://reviews.freebsd.org/D35075 (cherry picked from commit 3ee943868c74ce917820fe9ddbcfeab338704d90) --- sys/dev/usb/usb_device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/usb/usb_device.c b/sys/dev/usb/usb_device.c index 6564182a97b0..b5e51cbdc7a7 100644 --- a/sys/dev/usb/usb_device.c +++ b/sys/dev/usb/usb_device.c @@ -2031,7 +2031,8 @@ repeat_set_config: goto repeat_set_config; } #if USB_HAVE_MSCTEST - if (config_index == 0) { + if (config_index == 0 && + usb_test_quirk(&uaa, UQ_MSC_NO_INQUIRY) == 0) { /* * Try to figure out if we have an * auto-install disk there: @@ -2051,7 +2052,8 @@ repeat_set_config: usb_test_quirk(&uaa, UQ_MSC_NO_PREVENT_ALLOW) == 0 && usb_test_quirk(&uaa, UQ_MSC_NO_SYNC_CACHE) == 0 && usb_test_quirk(&uaa, UQ_MSC_NO_TEST_UNIT_READY) == 0 && - usb_test_quirk(&uaa, UQ_MSC_NO_GETMAXLUN) == 0) { + usb_test_quirk(&uaa, UQ_MSC_NO_GETMAXLUN) == 0 && + usb_test_quirk(&uaa, UQ_MSC_NO_INQUIRY) == 0) { /* * Try to figure out if there are any MSC quirks we * should apply automatically: From nobody Sun Apr 30 06:57:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HGh0wYqz48rlB; Sun, 30 Apr 2023 06:57: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 4Q8HGg6dP0z3MZX; Sun, 30 Apr 2023 06:57:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=33rvQvzQHjE9BVKlTHQ4Qeubpw0DtvIvvWYfgQx8MKY=; b=UqAffrQc3mipCZt0SCbRtxobWvsrxiEbF61OUVlXWwv+cVVe4omRyulu+VyM0jgbm0Nhf8 3B65LAj+mCQZD28BEQ8ICC5Cg5pMdZ3G/IMMQgQIt1mEzvB1NFxVlypq7LVQU8o+q02awj eMcYc/jQP33flEtnOXhZqDHMBqRIRYbhIpoEjt38c0iTgSC4lqV4uMU+Cvh/y4kxVHCrK3 lDByhw2SRf7pJqLk913dyeMaSDvIBTRy1N3dTB1DZmEGZmZBJ3El6G0hVbKQJYRMnNFmZp pXez25DgZeYYMC7Ej2+07Qdvjj0v7ovXa8ays8utULgb67LicnMp4q7Ip1g4rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=33rvQvzQHjE9BVKlTHQ4Qeubpw0DtvIvvWYfgQx8MKY=; b=fjBQHLFsK9YDvcN1QxmJy0zblCqtQBn7GPPAvMRh/hLcp5KDDnUIVUBw6ItayBHEO8Hea1 SFm4sZDj3KhqwG5/ZyibEV/zi4uWT63vUW2eNt/D2F1/eACb/Sob2wCxrwnnBrVi3Z36YB 7bP0aa/quf2u1Jq5jygxEQtjlKXd6J5MO8n/B91MDSmF3LetBvZq/9tTR4JpF6vz8bFRtw +rdrs//si6bn/yP3nFTkWS4xRRbOCnLReX/nT75KcGEXbby1nLAzVLmnyGFPSzHl59Fwe1 hwY4gpcbNkmFx7sMe2drqUBQ0DBMZq0s6Z9cXzNIO/df7TQRljKnt6ieE1veww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837868; a=rsa-sha256; cv=none; b=Br6G9yczAdDZ/wCV2yguCpkSD/hX+BLK0DWq5cYTZJTX7BSxlUqevd+uTPAXt1lg332hMj eFSveW8VMG5Y4MkmmT8Rk/MiFmlhOhgAHU7A4ergjMZ467oazasIJetP1SXWIANYATtaHG ZAIwTBVwZo3WxU+x9Q+MFGwtzTiDmFZnmeQX/xtPsQn9ZJh+/a5tbIQbt/1kj6UdFzYprJ +eoGaoBfY7CM1dmAvfe9ZnBOziVErUPaSY+SNIEP5WOa7hMPQlVorC8s3+pHR35oEuUEjr lsmJOdOqF0br2GYNCjAGfUqb/Lkoqwv/x57ZkAhNum09OFJWqs+STyBKZ7TRdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HGg5dTvzDhS; Sun, 30 Apr 2023 06:57:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6vl7E071425; Sun, 30 Apr 2023 06:57:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6vlFS071424; Sun, 30 Apr 2023 06:57:47 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:57:47 GMT Message-Id: <202304300657.33U6vlFS071424@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: e7f8a67e1f88 - stable/13 - uath(4): Fix incorrect byte-swapping and a buffer length check. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e7f8a67e1f88442d8d66a0a1c3de03ba8fc13078 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=e7f8a67e1f88442d8d66a0a1c3de03ba8fc13078 commit e7f8a67e1f88442d8d66a0a1c3de03ba8fc13078 Author: Hans Petter Selasky AuthorDate: 2022-04-30 09:21:54 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:16 +0000 uath(4): Fix incorrect byte-swapping and a buffer length check. PR: 263638 Reported by: Jeff Gibbons Sponsored by: NVIDIA Networking (cherry picked from commit 6eb6aeef7e670bddc9cd52aaf32765a9ea85eee3) --- sys/dev/usb/wlan/if_uath.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/dev/usb/wlan/if_uath.c b/sys/dev/usb/wlan/if_uath.c index df7e1d7c396f..4ffdc9a72fad 100644 --- a/sys/dev/usb/wlan/if_uath.c +++ b/sys/dev/usb/wlan/if_uath.c @@ -2244,7 +2244,7 @@ uath_cmdeof(struct uath_softc *sc, struct uath_cmd *cmd) u_int olen; if (sizeof(*hdr) > hdr->len || - hdr->len >= UATH_MAX_CMDSZ) { + hdr->len > UATH_MAX_CMDSZ) { device_printf(sc->sc_dev, "%s: invalid WDC msg length %u; " "msg ignored\n", __func__, hdr->len); @@ -2360,11 +2360,10 @@ uath_intr_rx_callback(struct usb_xfer *xfer, usb_error_t error) usbd_copy_out(pc, 0, cmd->buf, actlen); hdr = (struct uath_cmd_hdr *)cmd->buf; - hdr->len = be32toh(hdr->len); - if (hdr->len > (uint32_t)actlen) { + if (be32toh(hdr->len) > (uint32_t)actlen) { device_printf(sc->sc_dev, "%s: truncated xfer (len %u, actlen %d)\n", - __func__, hdr->len, actlen); + __func__, be32toh(hdr->len), actlen); goto setup; } From nobody Sun Apr 30 06:57:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HGj17X7z48sC2; Sun, 30 Apr 2023 06:57: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 4Q8HGj0RhFz3M1m; Sun, 30 Apr 2023 06:57:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yd2pTLxJqsluGiAVn8mceX9v++9dVMw/BA+kC7NKK9k=; b=WBJs1Q2Ot5jiWTSeENp4R79IHZtGoJ4KrQU5KyS4ZF72uIp+qdODA0d2UtCueVo/Tl4C40 3/b94lHVOrlCfb1+uuqhgH4dOnDtkXhdTc2VpuA7VrAufjPgyPoD9HWcV5hXOpSJDvU3pm LoYSWZAXs0MltV5+HpmYqFm4+PtIt9sJE7oTRDIrlM56yO6klZzjYogH5DfQ86ayXDFYgr dT1eOYwliHRzETjeYn8bi6ubjD90jnwdzixqfStmgZ/AoC3kfgGBCqTQAleOqPx6rjbah5 EDW+gsc5n/TEb9FVQcC6xABA0/jB5IN4jo0wc+B9rprUz0NfJv9iy20XiJpDkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yd2pTLxJqsluGiAVn8mceX9v++9dVMw/BA+kC7NKK9k=; b=WASZ2ScNmtY5cuotKXIg1+8KKfvMxPXTFJyguL/BwIjgJGM4k9KuXh99/yotq78x6o3jzY bv4cqTmyC0jyTd9v6NkIcKR9DYaRc9ABMW+eSStqEJnsWr+wdvrHM9s7uWp9vXaGuCGKlj C78MqEcSthr3j/+KusEwAfm9s9/BtwYFbkqSEV53mvqryvD+7zCUv+DQ2uF+0lL1E2g593 FtMeYCdfto70u4WbwciXQFLaho01RnU62qJFrJ2w0Q7V55C8X5S0PETtar5dObrp98V2ye /RxjIze0BzNEQYWlZeVxBWMMZ01RuNy1vepX4hKJY0tHHo7zQm8btMCln4bWPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837869; a=rsa-sha256; cv=none; b=YvBK9QkIGPLA1JqrNGLc5wnj0S9Kxm9c0COz5kHaTvclq4nTkEgyBY9WWHKYQf1Qk9DHq7 h+FPQviXeDCJEi5H9kzW2MoSbAY/Dsfaobl7ChBwmgrSmxI8ie+uOMBnpCHF4r0hPbsTNc TVl1dovh1Mub6av56JJ5EXd1mBBnWzk+ZSrIhNkopZ/Cte3ROHw230iukfikq6ci3lOoik 39YfPe1cTu5ubuXluQgThr4acQTtQUGDrGKKPnBRgipQ3jW6EFe6sWUDKuYHHPtyPAxL8n XIBrXwuRh9Z06u71R7ttCeax9WgNEMcwkUhfn8vV43umZeeAhJQ5CZpNnsNuLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HGh6g20zDsq; Sun, 30 Apr 2023 06:57:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6vmV2071450; Sun, 30 Apr 2023 06:57:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6vmBR071449; Sun, 30 Apr 2023 06:57:48 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:57:48 GMT Message-Id: <202304300657.33U6vmBR071449@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: d5d2838785ff - stable/13 - USB id of yet another Lenovo USB-C ethernet dongle. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d5d2838785ffaf453abf316243ee9ffcceb9d83c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=d5d2838785ffaf453abf316243ee9ffcceb9d83c commit d5d2838785ffaf453abf316243ee9ffcceb9d83c Author: Poul-Henning Kamp AuthorDate: 2022-08-28 17:21:38 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:16 +0000 USB id of yet another Lenovo USB-C ethernet dongle. (cherry picked from commit 31937f7e843da8be685557d513fc1af58079eda3) --- sys/dev/usb/net/if_ure.c | 1 + sys/dev/usb/usbdevs | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/dev/usb/net/if_ure.c b/sys/dev/usb/net/if_ure.c index 5cfb763c113a..9a421f02732e 100644 --- a/sys/dev/usb/net/if_ure.c +++ b/sys/dev/usb/net/if_ure.c @@ -103,6 +103,7 @@ static const STRUCT_USB_HOST_ID ure_devs[] = { URE_DEV(LENOVO, TBT3LAN, 0), URE_DEV(LENOVO, TBT3LANGEN2, 0), URE_DEV(LENOVO, ONELINK, 0), + URE_DEV(LENOVO, RTL8153_04, URE_FLAG_8153), URE_DEV(LENOVO, USBCLAN, 0), URE_DEV(LENOVO, USBCLANGEN2, 0), URE_DEV(MICROSOFT, WINDEVETH, 0), diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 15cca3f8c6db..0368ec25e6e1 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -2824,6 +2824,7 @@ product LENOVO GIGALAN 0x304b USB 3.0 Ethernet product LENOVO ETHERNET 0x7203 USB 2.0 Ethernet product LENOVO RTL8153 0x7205 USB 3.0 Ethernet product LENOVO ONELINK 0x720a USB 3.0 Ethernet +product LENOVO RTL8153_04 0x720c USB 3.0 Ethernet product LENOVO TBT3LAN 0x3069 LAN port in Thinkpad TB3 dock product LENOVO USBCLAN 0x3062 LAN port in Thinkpad USB-C dock product LENOVO TBT3LANGEN2 0x3082 LAN port in Thinkpad TB3 dock gen2 From nobody Sun Apr 30 06:57:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HGk2X74z48sC5; Sun, 30 Apr 2023 06:57: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 4Q8HGk1tmDz3Mm5; Sun, 30 Apr 2023 06:57:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ovUHHAw0QziET2kttiil1yotqpe4ekBTbmEeacikbSg=; b=i8CnpPodDOEXZQa8vlDtxm6+ZBzGgPakRJ8XSOsgYyGIg3shIb4ITRHw89GsdyhmH2qFrc OgAUdDcPCwdj+0WiOiAtjDd2OUz6cCAO0qBFr9JW5VVRm8//B8pjvc1A4APNbomezRqcu7 m99uhA+s/nELL8BMubzK1diPX3JNcGXbBH1x9rVtaAVHB7en9ug+VZXT//TWcH+ybF8rjO hRtFT8Rp2wwJmFg0ZiYI086W0FKHbVSfYiBJYCnvRRZcQd5L2Q5jkPOoall4EXqLLWv+Nw X1jU09DtHT8SfC3WBr+xLyoOalH53BVRbkqvRn1g0yHbn6PTYF1CFU+zTkdy8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ovUHHAw0QziET2kttiil1yotqpe4ekBTbmEeacikbSg=; b=S6M9C4+MC8/0RLpwmW1TJ9pu5gtcvHql38LHrexeBah/iOfJrPoZjjm5WAYO0PDqsO5Ptn CCHwjB7Q/ybar6Xac0IhW+LDIwOHuAwk/+Z/N2rxv4Vkan7cunRQYOWDxrfXhwQcqOGzgp mTL0oK1YqR11IbN/g4noEXF8/tToUk98vxrAC7LzBhtWIRNxGuSmEv7jevdaHI0qi4oLRT 9XRZCozEweVwLF1yircVsxdvMDVJLn339bkXmdiH/KlhQRcooXgmVKHsCwHB3/u9Rt8Ro/ WT0b7EhBEylzsfY62FlbC/XiqhzCaiOAgkGZgCEdMbBdFgusE0mlOZnt42csfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837870; a=rsa-sha256; cv=none; b=k8A/2EhdFYJKtncpUrI8yEFgkKmT+IiU0sfb8dNfj3LRSybA0VNxFKy1u4x+GECm1yMTdS OtKhjswqSKTNGp/ijFzckX/lwdbEzpz9XWDiGFmpZ4PsjKr7l3J1YZ9aNcm9ucMp1xn8+Z 3kiS4CJ0UV8D+t7+WVvd9Nnh9Ds//R1bLUc++wqclw5RhJ+232ZvYsds0PzoII8dN/rPk+ 32F7uaQOq7IaLBoZGq5KHiCV6RlIXyy4GMI0NGyovYfI3M3bm1GhF7LarFkZ7MRTqfPfaD 9UKxcM9QwKP80pshjGPmBoLv82fkPUFwvVWOxfBMZrYC3BpxR5bP53nrIOM1jg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HGk0ZKDz1CgB; Sun, 30 Apr 2023 06:57:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6vnIr071470; Sun, 30 Apr 2023 06:57:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6vnPk071469; Sun, 30 Apr 2023 06:57:49 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:57:49 GMT Message-Id: <202304300657.33U6vnPk071469@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: c6203b6c00ca - stable/13 - usb(4): Call optional endpoint_uninit() when changing configuration or alternate setting. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c6203b6c00ca87a182a8a81d372ade0dc3e1f5f5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=c6203b6c00ca87a182a8a81d372ade0dc3e1f5f5 commit c6203b6c00ca87a182a8a81d372ade0dc3e1f5f5 Author: Hans Petter Selasky AuthorDate: 2022-12-15 22:32:47 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:16 +0000 usb(4): Call optional endpoint_uninit() when changing configuration or alternate setting. Sponsored by: NVIDIA Networking (cherry picked from commit e4611d26265fb9e3bd2a345cf4776863f49a2587) --- sys/dev/usb/usb_device.c | 55 ++++++++++++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 20 deletions(-) diff --git a/sys/dev/usb/usb_device.c b/sys/dev/usb/usb_device.c index b5e51cbdc7a7..392d969587c0 100644 --- a/sys/dev/usb/usb_device.c +++ b/sys/dev/usb/usb_device.c @@ -841,38 +841,53 @@ usb_config_parse(struct usb_device *udev, uint8_t iface_index, uint8_t cmd) DPRINTFN(5, "iface_index=%d cmd=%d\n", iface_index, cmd); - if (cmd == USB_CFG_FREE) - goto cleanup; - - if (cmd == USB_CFG_INIT) { + if (cmd == USB_CFG_INIT || cmd == USB_CFG_FREE) { sx_assert(&udev->enum_sx, SA_LOCKED); /* check for in-use endpoints */ + if (cmd == USB_CFG_INIT) { + ep = udev->endpoints; + ep_max = udev->endpoints_max; + while (ep_max--) { + /* look for matching endpoints */ + if (iface_index == USB_IFACE_INDEX_ANY || + iface_index == ep->iface_index) { + if (ep->refcount_alloc != 0) + return (USB_ERR_IN_USE); + } + } + } + ep = udev->endpoints; ep_max = udev->endpoints_max; while (ep_max--) { /* look for matching endpoints */ - if ((iface_index == USB_IFACE_INDEX_ANY) || - (iface_index == ep->iface_index)) { - if (ep->refcount_alloc != 0) { - /* - * This typically indicates a - * more serious error. - */ - err = USB_ERR_IN_USE; - } else { - /* reset endpoint */ - memset(ep, 0, sizeof(*ep)); - /* make sure we don't zero the endpoint again */ - ep->iface_index = USB_IFACE_INDEX_ANY; - } + if (iface_index == USB_IFACE_INDEX_ANY || + iface_index == ep->iface_index) { + /* + * Check if hardware needs a callback + * to unconfigure the endpoint. This + * may happen multiple times, + * because the requested alternate + * setting may fail. The callback + * implementation should be aware of + * and handle that. + */ + if (ep->edesc != NULL && + udev->bus->methods->endpoint_uninit != NULL) + udev->bus->methods->endpoint_uninit(udev, ep); + + /* reset endpoint */ + memset(ep, 0, sizeof(*ep)); + /* make sure we don't zero the endpoint again */ + ep->iface_index = USB_IFACE_INDEX_ANY; } ep++; } - if (err) - return (err); + if (cmd == USB_CFG_FREE) + goto cleanup; } memset(&ips, 0, sizeof(ips)); From nobody Sun Apr 30 06:57:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HGl5S2Yz48s72; Sun, 30 Apr 2023 06:57: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 4Q8HGl2S5nz3MfN; Sun, 30 Apr 2023 06:57:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UJCrCsVyy0Zr4wovKx5GH++Rhwabb+M3ounq2m0FqgM=; b=qNEhoW0fLw3V41oWyASDIC8ywModj5fQwamNNDET8/BbaeR7ozwb4N8+KtLEVUFXWX3nGd P3UdXHv939F5LjsCoTF2Z2tliDiukoXnDiTbeLMv/6ffa4I37yXFZwEqkqgnl6mwEEl9eY 5kAFuA1mleQQDDIKhGFgKB5zXOyPOnv87W8BqIkFuWsjN/8gXnwi6nvpagxAMCVVQDhWNM OcOx7ZkE32CYVEHYQQ86QyIvkMkAelIuae5nFXpsDTAMv/Km5hzUzOzK1UjzSzx78chskx b/KDyYhOKnPopOga9kb8sd4VCVaQFjpQOeLmEh/CaLXlX+R0FbGvrpn3aP4klQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UJCrCsVyy0Zr4wovKx5GH++Rhwabb+M3ounq2m0FqgM=; b=TC30t//BK4R2AGxcqZi0isyURp6/klSDRzNEHDcqf87Rdsdl86lGJQB5El5BH618nnh9Bw IcqDpi8SOY1AFqSjxJKkJlGF47mMD4yv0MBIRRILeTDnUDaM33bZo3NBtV7kgASrm9zXMV ukq9XeMy9KgjeV6e3MDps1+Mt+lzIjjicYQljuhKxVx0Zpn86lJZPo2s3gUq2Au1vjQLt0 r2RUZV28/j/NC/buTBu2/bqEs8Y+k/PibD73O29ybVr3833SS3U/mor052E9y0udAzPuuR msNAIvUn1GwO5DgAF23LsWndicWdYXZ2LcaqAiox+JHXl+5pGL/HTYTGl8XQSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837871; a=rsa-sha256; cv=none; b=oGZlxmrEFQ4qP9ziv02+K+aaaHiKN93xIcTwufqxaOmhH28t0sO6edLJfa200daqBLP3nb tjxY3aUjl4Z0BvFAA4+1EYT4/IAcykN806LcleXVTtPq50AgpFe05sOn5yL/oys2rveVdV WOVrIG4nko5Zsz2sbAZLh5o1VaJcsZx85RkkADxQLQD4qocF05wfpBD80zkXMQloyThMaW dom29iAX2shQF3jgC0d2OhIqyk39PX3j8MwOaJBxPe9YyQK8oSjWEsm/OWSdb9JiNN5i3B wRld53txDCKYoC5xwfYomvrF3VC56JppZol0Shw+6VdfO1mwqQYm35XYrC/o+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 4Q8HGl1KdKz1Crf; Sun, 30 Apr 2023 06:57:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6vpW6071493; Sun, 30 Apr 2023 06:57:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6vpiO071491; Sun, 30 Apr 2023 06:57:51 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:57:51 GMT Message-Id: <202304300657.33U6vpiO071491@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 3b7149c7c32a - stable/13 - xhci(4): Make sure allocated bandwidth is freed in hardware by unconfiguring endpoint. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3b7149c7c32aa5f7c2a6c6b539fe40c2b4d95cf0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=3b7149c7c32aa5f7c2a6c6b539fe40c2b4d95cf0 commit 3b7149c7c32aa5f7c2a6c6b539fe40c2b4d95cf0 Author: Cheng, Huiming AuthorDate: 2022-12-15 22:30:11 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:16 +0000 xhci(4): Make sure allocated bandwidth is freed in hardware by unconfiguring endpoint. Sponsored by: NVIDIA Networking (cherry picked from commit 8685d7b5cb759b4f688dea93dbe1c38f9e833e4e) --- sys/dev/usb/controller/xhci.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/sys/dev/usb/controller/xhci.c b/sys/dev/usb/controller/xhci.c index 17458e7d47dc..02a9a37fbd2d 100644 --- a/sys/dev/usb/controller/xhci.c +++ b/sys/dev/usb/controller/xhci.c @@ -4080,7 +4080,47 @@ xhci_ep_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc, static void xhci_ep_uninit(struct usb_device *udev, struct usb_endpoint *ep) { + struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); + const struct usb_endpoint_descriptor *edesc = ep->edesc; + struct usb_page_search buf_inp; + struct usb_page_cache *pcinp; + uint32_t mask; + uint8_t index; + uint8_t epno; + usb_error_t err; + + if (udev->parent_hub == NULL) { + /* root HUB has special endpoint handling */ + return; + } + + if ((edesc->bEndpointAddress & UE_ADDR) == 0) { + /* control endpoint is never unconfigured */ + return; + } + XHCI_CMD_LOCK(sc); + index = udev->controller_slot_id; + epno = XHCI_EPNO2EPID(edesc->bEndpointAddress); + mask = 1U << epno; + + if (sc->sc_hw.devs[index].ep_configured & mask) { + USB_BUS_LOCK(udev->bus); + xhci_configure_mask(udev, mask, 1); + USB_BUS_UNLOCK(udev->bus); + + pcinp = &sc->sc_hw.devs[index].input_pc; + usbd_get_page(pcinp, 0, &buf_inp); + err = xhci_cmd_configure_ep(sc, buf_inp.physaddr, 0, index); + if (err) { + DPRINTF("Unconfiguring endpoint failed: %d\n", err); + } else { + USB_BUS_LOCK(udev->bus); + sc->sc_hw.devs[index].ep_configured &= ~mask; + USB_BUS_UNLOCK(udev->bus); + } + } + XHCI_CMD_UNLOCK(sc); } static void From nobody Sun Apr 30 06:57:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HGm4sfdz48s73; Sun, 30 Apr 2023 06:57: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 4Q8HGm2yYgz3Mml; Sun, 30 Apr 2023 06:57:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4FdCwYxypsW3WmSJkTe5eLLSJhdQFmYzHU7K0ajnHQA=; b=PUUaxVhuUzvuTVQPIio2sRLBH8IWrFl7fGlrAMhWDd+bV6A/PYgC/1CjAB/kp1xA4sl7Cw e1fVSMe7nyaXhJuL9SJDT+AAwV7p/KbQ83F2r5WUimu+ObdbMMzYH2zA8/I7nV0PX1MfUY wEPctK+3Xw5X5YVouzjWMUGUmqB4reQ6Ud5NMA4usSNQclnSuPUdTy+T+8IFGHaOy8+TD8 9aySeA/bBwGpxZFSxSfQrwAOM56uEvJFdB1g3h/Ah5uQnpO6ZSqDxJkLLVxXP51ODE4NWZ OHu9wjR3eJ52sW1xVHqY9KFroeaLbjy+2tNv5g20FlZdslCybnNZYs6r12dGIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4FdCwYxypsW3WmSJkTe5eLLSJhdQFmYzHU7K0ajnHQA=; b=YRMAFQgzEIwHlWlaC3wCLeJwklCfSGVMSC7sMg0IpV0lJwd40jwM7yodEyykRKae9kEh/n wahhLTTH4JY/jsW3+O41ZAmL5difuGhjZvVqZX5JPonRqqa6D+cGYJu86h4L2wg9RUVGVM 8xUYyOmERSWS1+SKMJzTq8IfGhx3dixGz+quUAuxShSkcePwrxzqROsxVU7GU947y60fzG oO30dIsp88U5gpQZZnpf/3Qg/hgzlEsEyueD01zRgp13+uuL15rIFZ2zr1FUjKPO5MPjnV XZFThvGO+J34KTME9YSZRuUedkjAR6Th2NR9Z7K2xcQ4953sedm1KYDo8xtaVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837872; a=rsa-sha256; cv=none; b=SEs+2Bf4gpQ/TKYkFIe9JZntSsctmpNCPQYTnsnuRBWXjijEe0cef4MpeLnZ7qkJcONn7a 2V01fADEbRx+qChY+HrA15iX2ZXxH/67+75KI2XyFI3pAlQCVWu1vjogeib04DlL8AGJIV 0O+Ff+6VGf1oPNPQBwAqTB4ZSlpT4FatbxLhCPkmwTiw5k025fFYr3dUvnZ+bG9u8ysyrW 3ode48SMDV0SnEdKFEVKFEf0VjbwUlKwh5TC9sYChIgmGfYpkc2hPD2DLfXnT9XQHSfJLe ioiKjm8mGN082Jv2xNC9hfZW+D82+H+qQmvjTqxloeDLfhAd05i9oxRSACixmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HGm24dRzDsr; Sun, 30 Apr 2023 06:57:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6vqiP071518; Sun, 30 Apr 2023 06:57:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6vqd3071517; Sun, 30 Apr 2023 06:57:52 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:57:52 GMT Message-Id: <202304300657.33U6vqd3071517@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: d4a8b3f7cf10 - stable/13 - usb: purge EOL release compatibility List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d4a8b3f7cf101fa54385e0d3613a2fcd1be47090 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=d4a8b3f7cf101fa54385e0d3613a2fcd1be47090 commit d4a8b3f7cf101fa54385e0d3613a2fcd1be47090 Author: Elliott Mitchell AuthorDate: 2022-06-23 00:53:47 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:16 +0000 usb: purge EOL release compatibility Remove conditionsals for FreeBSD 6, 7, 8 and 9 compatibility. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/603 Differential Revision: https://reviews.freebsd.org/D35560 (cherry picked from commit 336fbb23def7a6b3dc44ce5c76bbc07a701c0a69) --- sys/dev/usb/controller/ehci_pci.c | 5 ----- sys/dev/usb/controller/ohci_pci.c | 5 ----- sys/dev/usb/controller/uhci_pci.c | 5 ----- sys/dev/usb/usb_busdma.h | 4 ---- sys/dev/usb/usb_dev.c | 5 ----- sys/dev/usb/usb_process.c | 21 --------------------- sys/dev/usb/usb_process.h | 4 ---- 7 files changed, 49 deletions(-) diff --git a/sys/dev/usb/controller/ehci_pci.c b/sys/dev/usb/controller/ehci_pci.c index 9018b2e4db40..98e2172e5e95 100644 --- a/sys/dev/usb/controller/ehci_pci.c +++ b/sys/dev/usb/controller/ehci_pci.c @@ -424,13 +424,8 @@ ehci_pci_attach(device_t self) sprintf(sc->sc_vendor, "(0x%04x)", pci_get_vendor(self)); } -#if (__FreeBSD_version >= 700031) err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, NULL, (driver_intr_t *)ehci_interrupt, sc, &sc->sc_intr_hdl); -#else - err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, - (driver_intr_t *)ehci_interrupt, sc, &sc->sc_intr_hdl); -#endif if (err) { device_printf(self, "Could not setup irq, %d\n", err); sc->sc_intr_hdl = NULL; diff --git a/sys/dev/usb/controller/ohci_pci.c b/sys/dev/usb/controller/ohci_pci.c index 8c3ee521b5b1..5a84f9bb529c 100644 --- a/sys/dev/usb/controller/ohci_pci.c +++ b/sys/dev/usb/controller/ohci_pci.c @@ -296,13 +296,8 @@ ohci_pci_attach(device_t self) /* sc->sc_bus.usbrev; set by ohci_init() */ -#if (__FreeBSD_version >= 700031) err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, NULL, (driver_intr_t *)ohci_interrupt, sc, &sc->sc_intr_hdl); -#else - err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, - (driver_intr_t *)ohci_interrupt, sc, &sc->sc_intr_hdl); -#endif if (err) { device_printf(self, "Could not setup irq, %d\n", err); sc->sc_intr_hdl = NULL; diff --git a/sys/dev/usb/controller/uhci_pci.c b/sys/dev/usb/controller/uhci_pci.c index 07bc25b644e3..7cfd2c18d0d6 100644 --- a/sys/dev/usb/controller/uhci_pci.c +++ b/sys/dev/usb/controller/uhci_pci.c @@ -363,13 +363,8 @@ uhci_pci_attach(device_t self) break; } -#if (__FreeBSD_version >= 700031) err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, NULL, (driver_intr_t *)uhci_interrupt, sc, &sc->sc_intr_hdl); -#else - err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, - (driver_intr_t *)uhci_interrupt, sc, &sc->sc_intr_hdl); -#endif if (err) { device_printf(self, "Could not setup irq, %d\n", err); diff --git a/sys/dev/usb/usb_busdma.h b/sys/dev/usb/usb_busdma.h index 2f60b30963d2..254694e1b21f 100644 --- a/sys/dev/usb/usb_busdma.h +++ b/sys/dev/usb/usb_busdma.h @@ -40,11 +40,7 @@ #define USB_PAGE_SIZE PAGE_SIZE /* use system PAGE_SIZE */ -#if (__FreeBSD_version >= 700020) #define USB_GET_DMA_TAG(dev) bus_get_dma_tag(dev) -#else -#define USB_GET_DMA_TAG(dev) NULL /* XXX */ -#endif /* structure prototypes */ diff --git a/sys/dev/usb/usb_dev.c b/sys/dev/usb/usb_dev.c index 4811d280562c..84446edc3ecd 100644 --- a/sys/dev/usb/usb_dev.c +++ b/sys/dev/usb/usb_dev.c @@ -96,12 +96,7 @@ SYSCTL_INT(_hw_usb_dev, OID_AUTO, debug, CTLFLAG_RWTUN, &usb_fifo_debug, 0, "Debug Level"); #endif -#if ((__FreeBSD_version >= 700001) || (__FreeBSD_version == 0) || \ - ((__FreeBSD_version >= 600034) && (__FreeBSD_version < 700000))) #define USB_UCRED struct ucred *ucred, -#else -#define USB_UCRED -#endif /* prototypes */ diff --git a/sys/dev/usb/usb_process.c b/sys/dev/usb/usb_process.c index 37495608a30d..33dbad1bf998 100644 --- a/sys/dev/usb/usb_process.c +++ b/sys/dev/usb/usb_process.c @@ -62,31 +62,14 @@ #include #endif /* USB_GLOBAL_INCLUDE_FILE */ -#if (__FreeBSD_version < 700000) -#define thread_lock(td) mtx_lock_spin(&sched_lock) -#define thread_unlock(td) mtx_unlock_spin(&sched_lock) -#endif - -#if (__FreeBSD_version >= 800000) static struct proc *usbproc; static int usb_pcount; #define USB_THREAD_CREATE(f, s, p, ...) \ kproc_kthread_add((f), (s), &usbproc, (p), RFHIGHPID, \ 0, "usb", __VA_ARGS__) -#if (__FreeBSD_version >= 900000) #define USB_THREAD_SUSPEND_CHECK() kthread_suspend_check() -#else -#define USB_THREAD_SUSPEND_CHECK() kthread_suspend_check(curthread) -#endif #define USB_THREAD_SUSPEND(p) kthread_suspend(p,0) #define USB_THREAD_EXIT(err) kthread_exit() -#else -#define USB_THREAD_CREATE(f, s, p, ...) \ - kthread_create((f), (s), (p), RFHIGHPID, 0, __VA_ARGS__) -#define USB_THREAD_SUSPEND_CHECK() kthread_suspend_check(curproc) -#define USB_THREAD_SUSPEND(p) kthread_suspend(p,0) -#define USB_THREAD_EXIT(err) kthread_exit(err) -#endif #ifdef USB_DEBUG static int usb_proc_debug; @@ -198,11 +181,9 @@ usb_process(void *arg) up->up_ptr = NULL; cv_signal(&up->up_cv); USB_MTX_UNLOCK(up->up_mtx); -#if (__FreeBSD_version >= 800000) /* Clear the proc pointer if this is the last thread. */ if (--usb_pcount == 0) usbproc = NULL; -#endif USB_THREAD_EXIT(0); } @@ -238,9 +219,7 @@ usb_proc_create(struct usb_process *up, struct mtx *p_mtx, up->up_ptr = NULL; goto error; } -#if (__FreeBSD_version >= 800000) usb_pcount++; -#endif return (0); error: diff --git a/sys/dev/usb/usb_process.h b/sys/dev/usb/usb_process.h index 7be78917b8f0..8a416a308856 100644 --- a/sys/dev/usb/usb_process.h +++ b/sys/dev/usb/usb_process.h @@ -57,11 +57,7 @@ struct usb_process { struct cv up_cv; struct cv up_drain; -#if (__FreeBSD_version >= 800000) struct thread *up_ptr; -#else - struct proc *up_ptr; -#endif struct thread *up_curtd; struct mtx *up_mtx; From nobody Sun Apr 30 06:57:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HGn4Kk8z48s7M; Sun, 30 Apr 2023 06:57: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 4Q8HGn3kBpz3McC; Sun, 30 Apr 2023 06:57:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tw4LJ1upylB6skDTNI84XPrWiL4++lKmnWpYCIl8d3s=; b=K50MMBl8IULIw6FTWL7gIAFfAo3rbx5DBfhv7uSzB5ktYXheZ++Wu1egvFfAQRR2qSF3qG 3LeYCSfDh6Ym+R3q1nVZhQH6lh6OCW4L5qMrU6veRPgmP7izxspJcdbHyQtalmjDF2REf8 wae7EFjY+XaRsmpIAtY0Cfx2d04ti9YY1QENSA6AI+Zo75ujTnGSUPei8ur47ZUiekqgn2 PID4nc0DXtD++/hXKMXcG7eK4MujkJLsfvWGx652XY3i7QMHh2ySzZvxhCyw6fj0WAXBuf NBwsGAJISsiymMuPxtk97Pl2T0c8Sy5LE5FIQNiKJugYt1HFFWrAOpHueVATLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tw4LJ1upylB6skDTNI84XPrWiL4++lKmnWpYCIl8d3s=; b=Ig3YkWcKHUFpUe936qWwcK3zmskngPbH0r2NxuK6RKbuQRT+sHBFKi4MbsaFbhlkiZYMg2 LhRl4Vnf9mQ7J5G4SRcTWu592IUpgGcBao7v+aV0sIg9TaMnGsBvll/dRDv6DolesUrvKy gHlQwDQ0ynyc1VUj6gexn9asKlY+Ip7ePm1jfPZU3l5dPsiGnjbR4g8B/6U21TUvQp/fdQ 1CDBu/AX55RlZIBcxLa9JomixWacRG2pt1NdwGEU0vOz6Wonbzfb62grpGVyip6Z86638H Kh0I8F28E4qpOaEKzhYPkltK6suxME4mFfj+EcSVnkTETtZOBpQaO3E4zXqSkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837873; a=rsa-sha256; cv=none; b=r7uBCIpISx1b+dngXVGwdamc0oaSXvsXbyuHM3UIFZePNwwvQ7QXuBy/7+X3noQqIlH3AT 82P+sOC9hKJgZ2ryiHvB71K9NP6Nfnn08lOpk2/EKmfBIldc/3C/kVmKvF7NIFiP73ksDT x3LkCvNrzP1CHLXB11pq/+KQsx0om90Z751/QIowfVsV9I5+a6vaQkQJ6UYW0sWnY4RjAP 5nSQFis05D4yo6lwRK7bwOoifuqZ6LaFfyLCXWWag5eXJkyVxlX3TAoCUGNd2PNfyk84uW Uj9KxUaJzFW2lmij22IS3eo9/kDuxUGYFIOZPsYe7eiqCVlMNrk23/8ZDNf9eQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HGn2qrtzDg0; Sun, 30 Apr 2023 06:57:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6vrol071537; Sun, 30 Apr 2023 06:57:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6vr7r071536; Sun, 30 Apr 2023 06:57:53 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:57:53 GMT Message-Id: <202304300657.33U6vr7r071536@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 417b350048f5 - stable/13 - wmt: purge EOL release compatibility List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 417b350048f5934870e5b7405873887bf9af7741 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=417b350048f5934870e5b7405873887bf9af7741 commit 417b350048f5934870e5b7405873887bf9af7741 Author: Elliott Mitchell AuthorDate: 2022-06-23 00:53:47 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:16 +0000 wmt: purge EOL release compatibility Remove FreeBSD 11 support Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/603 Differential Revision: https://reviews.freebsd.org/D35560 (cherry picked from commit 5fa183351459996cfb86f8621de1a0e1bf985d67) --- sys/dev/usb/input/wmt.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/sys/dev/usb/input/wmt.c b/sys/dev/usb/input/wmt.c index 661fa622433f..c7ca2e46599e 100644 --- a/sys/dev/usb/input/wmt.c +++ b/sys/dev/usb/input/wmt.c @@ -261,22 +261,12 @@ static device_probe_t wmt_probe; static device_attach_t wmt_attach; static device_detach_t wmt_detach; -#if __FreeBSD_version >= 1200077 static evdev_open_t wmt_ev_open; static evdev_close_t wmt_ev_close; -#else -static evdev_open_t wmt_ev_open_11; -static evdev_close_t wmt_ev_close_11; -#endif static const struct evdev_methods wmt_evdev_methods = { -#if __FreeBSD_version >= 1200077 .ev_open = &wmt_ev_open, .ev_close = &wmt_ev_close, -#else - .ev_open = &wmt_ev_open_11, - .ev_close = &wmt_ev_close_11, -#endif }; static const struct usb_config wmt_config[WMT_N_TRANSFER] = { @@ -719,7 +709,6 @@ wmt_ev_open_11(struct evdev_dev *evdev, void *ev_softc) return (0); } -#if __FreeBSD_version >= 1200077 static int wmt_ev_close(struct evdev_dev *evdev) { @@ -738,7 +727,6 @@ wmt_ev_open(struct evdev_dev *evdev) return (wmt_ev_open_11(evdev, sc)); } -#endif static enum wmt_type wmt_hid_parse(struct wmt_softc *sc, const void *d_ptr, uint16_t d_len) From nobody Sun Apr 30 06:57:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HGp5FKgz48sLl; Sun, 30 Apr 2023 06:57: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 4Q8HGp4SWkz3MqM; Sun, 30 Apr 2023 06:57:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6QoMzT1rQuAR6PrLFqMqMiizP9XnbfxPXfKhDvaHqGA=; b=htkvv+86AUKjwkmLeqeFv8QWgrSuMhYXGmJgzjdYX931mys4SDU6PBFNkb4PzOJ0fXKNO1 wzMA9neyFlFEtS/38kGMXy4KMbpfbnvje+Lf59n/TZFR3H+/Rok6CiE65YwyLoGeAtFSDd Ddbwi1u5O8EtMZ4Jl1i4w98dgAhdJ8HRUe+MD4+gvW2WCBdhFmlnIRT9LtrXGqzJ77gVEK VS15wbV36u7G2ruYsiy/8oXRqN9jevmYXAdQSJN4A4wB1U6taZAmaFRSljlINrTQai8K+S vqx6qMzmFWq7ov8biGVCfM8yTXrnYPA2XgCJNKjITJKtvwooVT55v5eLGJ1xvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6QoMzT1rQuAR6PrLFqMqMiizP9XnbfxPXfKhDvaHqGA=; b=tl5ryp195kpJaGVDS/KhNR0HAImpY+84zo7kL6UagUMQyqvDCEKzwPGIyTGb8PAxNdR9yb iJstNdmMImGuLuS4AkEddjs3rZIeA0oizfiPM9H3ctg3PeEA+BpJQX3MGXTOYPOlBLMKx5 hAob8Z2eQbxplgegqbjPVhmh+rzAs8MpHLEA+h/QayFKMJ4KYjsmHLPS2bS3qb9Xb9y6c1 o89SrH5AqtPAZgRYPBPEDdoqbsNzZfN4DvPOe/9CpQJbdfdvlUSOjNZAJrrLfoPt4W+9ys 7CAygWJUqG3gGRltVKiVqLWxWrnPCxircoYI/OgXZ6iFRJJBwWl2Nw5wJs4RIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837874; a=rsa-sha256; cv=none; b=OH0ms/+DxQv9FmAQdubl2z2WE1bagvf2wGaU5kz63vZ2qhbcBuNvXSPBo9OMNBkyIoT/48 r9hCNdzrpLjpInkGwYfXudVDyYS0XaJmo329pxbN6PXo7gylP+a+sprKMSJ7/7i/0GU2m4 4CayVA4cTV/kJS9HTgqNuILNgYVy3ahiL3OTH24a6gB/doUdBFcIZ+Ug1gut2kCsrI9i9I h46Cy+rz41B+AkeB+Zgjs4cXN6RTzchIqyvXzmPMb/3y0/Kyf4BmsXlMKx3KlRSJkfD8sQ lyJjUu7JaJW0uijrf7+RL42EQ/isafwkkkEJWqGNtsSXPwo/M2qUcc3haNvxtw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HGp3P4pzDg1; Sun, 30 Apr 2023 06:57:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6vspC071561; Sun, 30 Apr 2023 06:57:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6vsKU071560; Sun, 30 Apr 2023 06:57:54 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:57:54 GMT Message-Id: <202304300657.33U6vsKU071560@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 4c57e83e7b6b - stable/13 - usb: dwc3: implement hw.usb.xhci.use_polling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4c57e83e7b6b4027546844daa3d81484f2b603a6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=4c57e83e7b6b4027546844daa3d81484f2b603a6 commit 4c57e83e7b6b4027546844daa3d81484f2b603a6 Author: Kyle Evans AuthorDate: 2023-02-28 01:59:43 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:17 +0000 usb: dwc3: implement hw.usb.xhci.use_polling Polling is currently only implemented in the xhci pci attachment. Adding it to dwc3 doesn't make it much uglier, and supporting it can be useful for confirming that hardware's otherwise functional when interrupts are apparently not firing. Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D38816 (cherry picked from commit 5e54bb1ea9e904075225dc96641c2ede3fc3273c) --- sys/dev/usb/controller/dwc3.c | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/sys/dev/usb/controller/dwc3.c b/sys/dev/usb/controller/dwc3.c index d5e3b3f50a9d..b99d74625022 100644 --- a/sys/dev/usb/controller/dwc3.c +++ b/sys/dev/usb/controller/dwc3.c @@ -103,6 +103,17 @@ struct snps_dwc3_softc { #define IS_DMA_32B 1 +static void +xhci_interrupt_poll(void *_sc) +{ + struct xhci_softc *sc = _sc; + + USB_BUS_UNLOCK(&sc->sc_bus); + xhci_interrupt(sc); + USB_BUS_LOCK(&sc->sc_bus); + usb_callout_reset(&sc->sc_callout, 1, (void *)&xhci_interrupt_poll, sc); +} + static int snps_dwc3_attach_xhci(device_t dev) { @@ -133,12 +144,14 @@ snps_dwc3_attach_xhci(device_t dev) sprintf(sc->sc_vendor, "Synopsys"); device_set_desc(sc->sc_bus.bdev, "Synopsys"); - err = bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, - NULL, (driver_intr_t *)xhci_interrupt, sc, &sc->sc_intr_hdl); - if (err != 0) { - device_printf(dev, "Failed to setup IRQ, %d\n", err); - sc->sc_intr_hdl = NULL; - return (err); + if (xhci_use_polling() == 0) { + err = bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, + NULL, (driver_intr_t *)xhci_interrupt, sc, &sc->sc_intr_hdl); + if (err != 0) { + device_printf(dev, "Failed to setup IRQ, %d\n", err); + sc->sc_intr_hdl = NULL; + return (err); + } } err = xhci_init(sc, dev, IS_DMA_32B); @@ -147,6 +160,15 @@ snps_dwc3_attach_xhci(device_t dev) return (ENXIO); } + usb_callout_init_mtx(&sc->sc_callout, &sc->sc_bus.bus_mtx, 0); + + if (xhci_use_polling() != 0) { + device_printf(dev, "Interrupt polling at %dHz\n", hz); + USB_BUS_LOCK(&sc->sc_bus); + xhci_interrupt_poll(sc); + USB_BUS_UNLOCK(&sc->sc_bus); + } + err = xhci_start_controller(sc); if (err != 0) { device_printf(dev, "Failed to start XHCI controller, with error %d\n", err); From nobody Sun Apr 30 06:57:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HGr0p8Vz48sCh; Sun, 30 Apr 2023 06:57:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8HGq4zhjz3Mls; Sun, 30 Apr 2023 06:57:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QKnPgZzvD/USMmkUj5JNo4yVcADaMK6C18A5UcePllc=; b=XBi3YJgUgwKzgqTdwg5kkrDaQVRjZ2WmNCAD6OdI/yJsdoQYi5v03HqxLpZdKZeBeixj6r /9jdf40Y4mOYA6kScO6YrOVl5nMlGKR9H+khkUBrDrsS7+0R0T1gvOg8LqPhRuQSYdtzNq ScKqsGzpjwMWqNheHXqVz2kXhBLHfIUj9QgEfYJBV+HcwOmUB6HMqaTp3By+9SyXULyI23 h5zNzfHMuGM8lRmr8fjEvQXJK9BAwMtORLC8yKi/HKShKHkULi0Zpgf8oiHF6bOBx3ZaGO wXC9uDHpR+3IlrUb0hWNnEvVqh0TpwMBujVeYsaWX/dVvhH5TyXmya+eGYJ7vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QKnPgZzvD/USMmkUj5JNo4yVcADaMK6C18A5UcePllc=; b=kov8gT5xGpQ+kKCViapovsAU7zJT8jaFy34fxObQ/RmnJSVUMLpCE/P7PB95jRymEqQV+8 rW1rp8sezYvjp8Gu/huwMjUwMK5LOvoKaMzN/+zAKvCTm3UkqTHnRw9RGT6aNVQCWgnAH2 rimmK+7XzWKzXaJmIx4ZMMX99nsKLzcET3M/7lGrsF9YhT/xVkrwIqY5zLKAjH+TxQ/0zX MrDxY/Bu9pSWh/yAlJOKBOcVGeq5QmN7ywIQ3b6N+z5Ib0kCmBmlyO/aE0Kof7CdGeFS25 JqnPTqVtEvbWz3+3AyzDeb/Ert87OZt8W0TlOkqwNVgdLNftAYQs3DC2ghxANQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837875; a=rsa-sha256; cv=none; b=Q6l7TKjxBo2cbrcqxP94+187buuDkUbqWnia/BhxSphPCIKeYRus8S7D8p3J0iSN6pIk5r y8hbALL0sMKP8/rbzBKVXSmDhVTnf0jUs9tzks8AByLUicJWYU0Ou6cnMGxYyADw4fOAVx jIdEHLlCiVdxNkYwqFDo1dU32NsN/qQr6q6zjoZnRFru5LcvXz7XDjCsxhmSn7Vgb7AjNl lmzM3xNUu5azmko1Q4HyrUEI9mTMbHeM5JXEytpxAJJ10pbQjQYBKIp9im4hM1S1nHs9kx WP+CDvhOo2EgcrYs5ItT7nj6iXXjTlXTVpTmxGuD/6cb0ENRb5bYFyWF1ZY9mg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HGq44Wnz1CgC; Sun, 30 Apr 2023 06:57:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6vtuY071581; Sun, 30 Apr 2023 06:57:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6vt6M071580; Sun, 30 Apr 2023 06:57:55 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:57:55 GMT Message-Id: <202304300657.33U6vt6M071580@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 633040b8e4df - stable/13 - usb: dwc3: add List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 633040b8e4df0ac8608620242c78134bbda8cf29 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=633040b8e4df0ac8608620242c78134bbda8cf29 commit 633040b8e4df0ac8608620242c78134bbda8cf29 Author: Joerg Wunsch AuthorDate: 2023-03-08 19:59:29 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:17 +0000 usb: dwc3: add Commit 5e54bb1ea9e90 added USB_BUS_LOCK/USB_BUS_UNLOCK. They, in consequence, require mutexes so is needed. (cherry picked from commit 175a584e501e19c90fd2241c505d1797de603a5c) --- sys/dev/usb/controller/dwc3.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/usb/controller/dwc3.c b/sys/dev/usb/controller/dwc3.c index b99d74625022..d9f576a3dbb7 100644 --- a/sys/dev/usb/controller/dwc3.c +++ b/sys/dev/usb/controller/dwc3.c @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef FDT #include #endif From nobody Sun Apr 30 06:57:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HGs1ZLwz48sGH; Sun, 30 Apr 2023 06:57:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8HGr673wz3Mhl; Sun, 30 Apr 2023 06:57:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qIfUeTJMpePat6BEJQ5ds6lMgR+fUVgs+03ntUnouNE=; b=gO0z/6pySYh2e3ZFOT227FWShG650M1BFBU7PzHAzr/B+7V0fBoU29Ls65oHTJVj3Numen v/Ji4iA2ho8ChTO1xJI1Y2J4jgmvOqMpYQm2P5xwP2ONRyNERmNUOuUL/SrEXXfA4ecUvP bSBumvvTyBnP1TCK1W6qFF3N9k1pTaJDlc1UgOhfL8UwflnEptPw6cwhY9lSGIlsHi2KtF whJCzZgapFJctLTqhkAnD3NbH2vK4e5TtpAMNgaSto5+/YqiX/ZLcGRklelw/nPRjRSGFN IWYbh9/Q620SLfOyRfop6K2XKRKcdApGjgrCO3M7SK8EAxm8ktBTCgIJXDMsMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qIfUeTJMpePat6BEJQ5ds6lMgR+fUVgs+03ntUnouNE=; b=NZmdRCiNlhywVb2ns5X9otQxhQk5fGdGQybSYa0VqYpvGBx970A2kAkSFMk0tg8EHkn4V5 9IGb0wR/SHLXXgkfVk1QTWO1MAN8IdBrbINyApDkJ3BuIFHrRFTPSCM4ApjdhecWr+coxb Av8lBnVePMVkAaj91ULTXxiGaenHg45rDWzXmBy6lt20jGHhiTsmsoqvNmx3VXA5p8EcWL +un7mJ5CC4A6t5Lua3ZOb1DOLIKQIjl8xiRlr87U0AWqCt87nVBcOj4zdxNngm0lioCZh5 4lRYztO3CDHdcVOLvOJrHWWTCtvkffSgePvYB1ku/z/H3UXctK/A4rJXCyqsWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837876; a=rsa-sha256; cv=none; b=RbD9miis/3bvSog2VRsDH+67h5L7HuwrRSJmzf1Qua1gnUP8/d3SkDSGSPRck+foJBp5Xk 1G2vGE6Mb2Ws3vtc5aYYYnc3VoIqsPyHr9YSWXWxkLMCeO5L/zedyIgMWCJcwillg2p7CF MB2KY7YPP0GgCPDI6hPSiAq7fdcDouJxuD3W2y20cq/SecfoEj7O1FCfjqKS5xaFJuX2J5 L3RmhuaLK0npXlaKNcbc6CdfYjeKJ8SUtD+HJjU6TtnUlsDBgkN5+0hn/Cwpn1jTJ7q7rk vfxZCTuvQ9SFCpyE2EL/2w1mZvhSCNWrDfXwyFzTKITMbypCKMhpHgvkqbaIUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HGr4jnwzDss; Sun, 30 Apr 2023 06:57:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6vuKT071600; Sun, 30 Apr 2023 06:57:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6vuMS071599; Sun, 30 Apr 2023 06:57:56 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:57:56 GMT Message-Id: <202304300657.33U6vuMS071599@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: fd7c07771f82 - stable/13 - usb(4): Code refactoring as a pre-step for adding missing synchronization mechanism. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fd7c07771f8292bf5151e53cce1c8d76298b6d56 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=fd7c07771f8292bf5151e53cce1c8d76298b6d56 commit fd7c07771f8292bf5151e53cce1c8d76298b6d56 Author: Hans Petter Selasky AuthorDate: 2023-04-04 15:15:38 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:17 +0000 usb(4): Code refactoring as a pre-step for adding missing synchronization mechanism. Move code in switch cases into own functions to make later changes easier to track. No functional change, except for removing a superfluous break statement when range checking USB_FS_MAX_FRAMES, in the USB_FS_OPEN case. It should not have been there at all. Suggested by: emaste@ Sponsored by: NVIDIA Networking (cherry picked from commit 03a2e432d5cc2eedb9304faea2b19051c84caecf) --- sys/dev/usb/usb_generic.c | 453 +++++++++++++++++++++++----------------------- 1 file changed, 226 insertions(+), 227 deletions(-) diff --git a/sys/dev/usb/usb_generic.c b/sys/dev/usb/usb_generic.c index fdbc35d47169..ad2f23eb9bfc 100644 --- a/sys/dev/usb/usb_generic.c +++ b/sys/dev/usb/usb_generic.c @@ -120,6 +120,7 @@ static int ugen_iface_ioctl(struct usb_fifo *, u_long, void *, int); static uint8_t ugen_fs_get_complete(struct usb_fifo *, uint8_t *); static int ugen_fs_uninit(struct usb_fifo *f); static int ugen_fs_copyin(struct usb_fifo *, uint8_t, struct usb_fs_endpoint*); +static uint8_t ugen_fifo_in_use(struct usb_fifo *, int fflags); /* structures */ @@ -959,6 +960,37 @@ ugen_re_enumerate(struct usb_fifo *f) return (0); } +static int +ugen_fs_init(struct usb_fifo *f, + struct usb_fs_endpoint *fs_ep_ptr, usb_size_t fs_ep_sz, + int fflags, uint8_t ep_index_max) +{ + int error; + + /* verify input parameters */ + if (fs_ep_ptr == NULL || ep_index_max > 127) + return (EINVAL); + + if (f->fs_xfer != NULL) + return (EBUSY); + + if (f->dev_ep_index != 0 || ep_index_max == 0) + return (EINVAL); + + if (ugen_fifo_in_use(f, fflags)) + return (EBUSY); + + error = usb_fifo_alloc_buffer(f, 1, ep_index_max); + if (error == 0) { + f->fs_xfer = malloc(sizeof(f->fs_xfer[0]) * + ep_index_max, M_USB, M_WAITOK | M_ZERO); + f->fs_ep_max = ep_index_max; + f->fs_ep_ptr = fs_ep_ptr; + f->fs_ep_sz = fs_ep_sz; + } + return (error); +} + int ugen_fs_uninit(struct usb_fifo *f) { @@ -975,6 +1007,157 @@ ugen_fs_uninit(struct usb_fifo *f) return (0); } +static int +usb_fs_open(struct usb_fifo *f, struct usb_fs_open *popen, + int fflags, usb_stream_t stream_id) +{ + struct usb_config usb_config[1] = {}; + struct usb_endpoint *ep; + struct usb_endpoint_descriptor *ed; + uint8_t iface_index; + uint8_t pre_scale; + uint8_t isread; + int error; + + if (popen->ep_index >= f->fs_ep_max) + return (EINVAL); + + if (f->fs_xfer[popen->ep_index] != NULL) + return (EBUSY); + + if (popen->max_bufsize > USB_FS_MAX_BUFSIZE) + popen->max_bufsize = USB_FS_MAX_BUFSIZE; + + if (popen->max_frames & USB_FS_MAX_FRAMES_PRE_SCALE) { + pre_scale = 1; + popen->max_frames &= ~USB_FS_MAX_FRAMES_PRE_SCALE; + } else { + pre_scale = 0; + } + + if (popen->max_frames > USB_FS_MAX_FRAMES) + popen->max_frames = USB_FS_MAX_FRAMES; + + if (popen->max_frames == 0) + return (EINVAL); + + ep = usbd_get_ep_by_addr(f->udev, popen->ep_no); + if (ep == NULL) + return (EINVAL); + + ed = ep->edesc; + if (ed == NULL) + return (ENXIO); + + iface_index = ep->iface_index; + + usb_config[0].type = ed->bmAttributes & UE_XFERTYPE; + usb_config[0].endpoint = ed->bEndpointAddress & UE_ADDR; + usb_config[0].direction = ed->bEndpointAddress & (UE_DIR_OUT | UE_DIR_IN); + usb_config[0].interval = USB_DEFAULT_INTERVAL; + usb_config[0].flags.proxy_buffer = 1; + if (pre_scale != 0) + usb_config[0].flags.pre_scale_frames = 1; + + usb_config[0].callback = &ugen_ctrl_fs_callback; + usb_config[0].timeout = 0; /* no timeout */ + usb_config[0].frames = popen->max_frames; + usb_config[0].bufsize = popen->max_bufsize; + usb_config[0].usb_mode = USB_MODE_DUAL; /* both modes */ + usb_config[0].stream_id = stream_id; + + if (usb_config[0].type == UE_CONTROL) { + if (f->udev->flags.usb_mode != USB_MODE_HOST) + return (EINVAL); + } else { + isread = ((usb_config[0].endpoint & + (UE_DIR_IN | UE_DIR_OUT)) == UE_DIR_IN); + + if (f->udev->flags.usb_mode != USB_MODE_HOST) + isread = !isread; + + /* check permissions */ + if (isread) { + if (!(fflags & FREAD)) + return (EPERM); + } else { + if (!(fflags & FWRITE)) + return (EPERM); + } + } + error = usbd_transfer_setup(f->udev, &iface_index, + f->fs_xfer + popen->ep_index, usb_config, 1, + f, f->priv_mtx); + if (error == 0) { + /* update maximums */ + popen->max_packet_length = + f->fs_xfer[popen->ep_index]->max_frame_size; + popen->max_bufsize = + f->fs_xfer[popen->ep_index]->max_data_length; + /* update number of frames */ + popen->max_frames = + f->fs_xfer[popen->ep_index]->nframes; + /* store index of endpoint */ + f->fs_xfer[popen->ep_index]->priv_fifo = + ((uint8_t *)0) + popen->ep_index; + } else { + error = ENOMEM; + } + return (error); +} + +static int +usb_fs_close(struct usb_fifo *f, struct usb_fs_close *pclose) +{ + if (pclose->ep_index >= f->fs_ep_max) + return (EINVAL); + + usbd_transfer_unsetup(f->fs_xfer + pclose->ep_index, 1); + return (0); +} + +static int +usb_fs_clear_stall_sync(struct usb_fifo *f, struct usb_fs_clear_stall_sync *pstall) +{ + struct usb_device_request req; + struct usb_endpoint *ep; + int error; + + if (pstall->ep_index >= f->fs_ep_max) + return (EINVAL); + + if (f->fs_xfer[pstall->ep_index] == NULL) + return (EINVAL); + + if (f->udev->flags.usb_mode != USB_MODE_HOST) + return (EINVAL); + + mtx_lock(f->priv_mtx); + error = usbd_transfer_pending(f->fs_xfer[pstall->ep_index]); + mtx_unlock(f->priv_mtx); + + if (error) + return (EBUSY); + + ep = f->fs_xfer[pstall->ep_index]->endpoint; + + /* setup a clear-stall packet */ + req.bmRequestType = UT_WRITE_ENDPOINT; + req.bRequest = UR_CLEAR_FEATURE; + USETW(req.wValue, UF_ENDPOINT_HALT); + req.wIndex[0] = ep->edesc->bEndpointAddress; + req.wIndex[1] = 0; + USETW(req.wLength, 0); + + error = usbd_do_request(f->udev, NULL, &req, NULL); + if (error == 0) { + usbd_clear_data_toggle(f->udev, ep); + } else { + error = ENXIO; + } + return (error); +} + static uint8_t ugen_fs_get_complete(struct usb_fifo *f, uint8_t *pindex) { @@ -1488,8 +1671,6 @@ ugen_fifo_in_use(struct usb_fifo *f, int fflags) static int ugen_ioctl(struct usb_fifo *f, u_long cmd, void *addr, int fflags) { - struct usb_config usb_config[1]; - struct usb_device_request req; union { struct usb_fs_complete *pcomp; struct usb_fs_start *pstart; @@ -1500,14 +1681,9 @@ ugen_ioctl(struct usb_fifo *f, u_long cmd, void *addr, int fflags) struct usb_fs_clear_stall_sync *pstall; void *addr; } u; - struct usb_endpoint *ep; - struct usb_endpoint_descriptor *ed; struct usb_xfer *xfer; - int error = 0; - uint8_t iface_index; - uint8_t isread; + int error; uint8_t ep_index; - uint8_t pre_scale; u.addr = addr; @@ -1519,44 +1695,45 @@ ugen_ioctl(struct usb_fifo *f, u_long cmd, void *addr, int fflags) error = ugen_fs_get_complete(f, &ep_index); mtx_unlock(f->priv_mtx); - if (error) { + if (error != 0) { error = EBUSY; - break; + } else { + u.pcomp->ep_index = ep_index; + error = ugen_fs_copy_out(f, u.pcomp->ep_index); } - u.pcomp->ep_index = ep_index; - error = ugen_fs_copy_out(f, u.pcomp->ep_index); break; case USB_FS_START: error = ugen_fs_copy_in(f, u.pstart->ep_index); - if (error) - break; - mtx_lock(f->priv_mtx); - xfer = f->fs_xfer[u.pstart->ep_index]; - usbd_transfer_start(xfer); - mtx_unlock(f->priv_mtx); + if (error == 0) { + mtx_lock(f->priv_mtx); + xfer = f->fs_xfer[u.pstart->ep_index]; + usbd_transfer_start(xfer); + mtx_unlock(f->priv_mtx); + } break; case USB_FS_STOP: + mtx_lock(f->priv_mtx); if (u.pstop->ep_index >= f->fs_ep_max) { error = EINVAL; - break; - } - mtx_lock(f->priv_mtx); - xfer = f->fs_xfer[u.pstart->ep_index]; - if (usbd_transfer_pending(xfer)) { - usbd_transfer_stop(xfer); - - /* - * Check if the USB transfer was stopped - * before it was even started and fake a - * cancel event. - */ - if (!xfer->flags_int.transferring && - !xfer->flags_int.started) { - DPRINTF("Issuing fake completion event\n"); - ugen_fs_set_complete(xfer->priv_sc, - USB_P2U(xfer->priv_fifo)); + } else { + error = 0; + xfer = f->fs_xfer[u.pstart->ep_index]; + if (usbd_transfer_pending(xfer)) { + usbd_transfer_stop(xfer); + + /* + * Check if the USB transfer was + * stopped before it was even started + * and fake a cancel event. + */ + if (!xfer->flags_int.transferring && + !xfer->flags_int.started) { + DPRINTF("Issuing fake completion event\n"); + ugen_fs_set_complete(xfer->priv_sc, + USB_P2U(xfer->priv_fifo)); + } } } mtx_unlock(f->priv_mtx); @@ -1564,153 +1741,16 @@ ugen_ioctl(struct usb_fifo *f, u_long cmd, void *addr, int fflags) case USB_FS_OPEN: case USB_FS_OPEN_STREAM: - if (u.popen->ep_index >= f->fs_ep_max) { - error = EINVAL; - break; - } - if (f->fs_xfer[u.popen->ep_index] != NULL) { - error = EBUSY; - break; - } - if (u.popen->max_bufsize > USB_FS_MAX_BUFSIZE) { - u.popen->max_bufsize = USB_FS_MAX_BUFSIZE; - } - if (u.popen->max_frames & USB_FS_MAX_FRAMES_PRE_SCALE) { - pre_scale = 1; - u.popen->max_frames &= ~USB_FS_MAX_FRAMES_PRE_SCALE; - } else { - pre_scale = 0; - } - if (u.popen->max_frames > USB_FS_MAX_FRAMES) { - u.popen->max_frames = USB_FS_MAX_FRAMES; - break; - } - if (u.popen->max_frames == 0) { - error = EINVAL; - break; - } - ep = usbd_get_ep_by_addr(f->udev, u.popen->ep_no); - if (ep == NULL) { - error = EINVAL; - break; - } - ed = ep->edesc; - if (ed == NULL) { - error = ENXIO; - break; - } - iface_index = ep->iface_index; - - memset(usb_config, 0, sizeof(usb_config)); - - usb_config[0].type = ed->bmAttributes & UE_XFERTYPE; - usb_config[0].endpoint = ed->bEndpointAddress & UE_ADDR; - usb_config[0].direction = ed->bEndpointAddress & (UE_DIR_OUT | UE_DIR_IN); - usb_config[0].interval = USB_DEFAULT_INTERVAL; - usb_config[0].flags.proxy_buffer = 1; - if (pre_scale != 0) - usb_config[0].flags.pre_scale_frames = 1; - usb_config[0].callback = &ugen_ctrl_fs_callback; - usb_config[0].timeout = 0; /* no timeout */ - usb_config[0].frames = u.popen->max_frames; - usb_config[0].bufsize = u.popen->max_bufsize; - usb_config[0].usb_mode = USB_MODE_DUAL; /* both modes */ - if (cmd == USB_FS_OPEN_STREAM) - usb_config[0].stream_id = u.popen_stream->stream_id; - - if (usb_config[0].type == UE_CONTROL) { - if (f->udev->flags.usb_mode != USB_MODE_HOST) { - error = EINVAL; - break; - } - } else { - isread = ((usb_config[0].endpoint & - (UE_DIR_IN | UE_DIR_OUT)) == UE_DIR_IN); - - if (f->udev->flags.usb_mode != USB_MODE_HOST) { - isread = !isread; - } - /* check permissions */ - if (isread) { - if (!(fflags & FREAD)) { - error = EPERM; - break; - } - } else { - if (!(fflags & FWRITE)) { - error = EPERM; - break; - } - } - } - error = usbd_transfer_setup(f->udev, &iface_index, - f->fs_xfer + u.popen->ep_index, usb_config, 1, - f, f->priv_mtx); - if (error == 0) { - /* update maximums */ - u.popen->max_packet_length = - f->fs_xfer[u.popen->ep_index]->max_frame_size; - u.popen->max_bufsize = - f->fs_xfer[u.popen->ep_index]->max_data_length; - /* update number of frames */ - u.popen->max_frames = - f->fs_xfer[u.popen->ep_index]->nframes; - /* store index of endpoint */ - f->fs_xfer[u.popen->ep_index]->priv_fifo = - ((uint8_t *)0) + u.popen->ep_index; - } else { - error = ENOMEM; - } + error = usb_fs_open(f, u.popen, fflags, + (cmd == USB_FS_OPEN_STREAM) ? u.popen_stream->stream_id : 0); break; case USB_FS_CLOSE: - if (u.pclose->ep_index >= f->fs_ep_max) { - error = EINVAL; - break; - } - if (f->fs_xfer[u.pclose->ep_index] == NULL) { - error = EINVAL; - break; - } - usbd_transfer_unsetup(f->fs_xfer + u.pclose->ep_index, 1); + error = usb_fs_close(f, u.pclose); break; case USB_FS_CLEAR_STALL_SYNC: - if (u.pstall->ep_index >= f->fs_ep_max) { - error = EINVAL; - break; - } - if (f->fs_xfer[u.pstall->ep_index] == NULL) { - error = EINVAL; - break; - } - if (f->udev->flags.usb_mode != USB_MODE_HOST) { - error = EINVAL; - break; - } - mtx_lock(f->priv_mtx); - error = usbd_transfer_pending(f->fs_xfer[u.pstall->ep_index]); - mtx_unlock(f->priv_mtx); - - if (error) { - return (EBUSY); - } - ep = f->fs_xfer[u.pstall->ep_index]->endpoint; - - /* setup a clear-stall packet */ - req.bmRequestType = UT_WRITE_ENDPOINT; - req.bRequest = UR_CLEAR_FEATURE; - USETW(req.wValue, UF_ENDPOINT_HALT); - req.wIndex[0] = ep->edesc->bEndpointAddress; - req.wIndex[1] = 0; - USETW(req.wLength, 0); - - error = usbd_do_request(f->udev, NULL, &req, NULL); - if (error == 0) { - usbd_clear_data_toggle(f->udev, ep); - } else { - error = ENXIO; - } + error = usb_fs_clear_stall_sync(f, u.pstall); break; default: @@ -2161,9 +2201,6 @@ ugen_iface_ioctl(struct usb_fifo *f, u_long cmd, void *addr, int fflags) static int ugen_ioctl_post(struct usb_fifo *f, u_long cmd, void *addr, int fflags) { -#ifdef COMPAT_FREEBSD32 - struct usb_fs_init local_pinit; -#endif union { struct usb_interface_descriptor *idesc; struct usb_alt_interface *ai; @@ -2183,7 +2220,6 @@ ugen_ioctl_post(struct usb_fifo *f, u_long cmd, void *addr, int fflags) struct usb_device_descriptor *dtemp; struct usb_config_descriptor *ctemp; struct usb_interface *iface; - size_t usb_fs_endpoint_sz = sizeof(struct usb_fs_endpoint); int error = 0; uint8_t n; @@ -2191,18 +2227,6 @@ ugen_ioctl_post(struct usb_fifo *f, u_long cmd, void *addr, int fflags) DPRINTFN(6, "cmd=0x%08lx\n", cmd); -#ifdef COMPAT_FREEBSD32 - switch (cmd) { - case USB_FS_INIT32: - PTRIN_CP(*u.pinit32, local_pinit, pEndpoints); - CP(*u.pinit32, local_pinit, ep_index_max); - u.addr = &local_pinit; - cmd = _IOC_NEWTYPE(USB_FS_INIT, struct usb_fs_init); - usb_fs_endpoint_sz = sizeof(struct usb_fs_endpoint32); - break; - } -#endif - switch (cmd) { case USB_DISCOVER: usb_needs_explore_all(); @@ -2397,42 +2421,17 @@ ugen_ioctl_post(struct usb_fifo *f, u_long cmd, void *addr, int fflags) break; case USB_FS_INIT: - /* verify input parameters */ - if (u.pinit->pEndpoints == NULL) { - error = EINVAL; - break; - } - if (u.pinit->ep_index_max > 127) { - error = EINVAL; - break; - } - if (u.pinit->ep_index_max == 0) { - error = EINVAL; - break; - } - if (f->fs_xfer != NULL) { - error = EBUSY; - break; - } - if (f->dev_ep_index != 0) { - error = EINVAL; - break; - } - if (ugen_fifo_in_use(f, fflags)) { - error = EBUSY; - break; - } - error = usb_fifo_alloc_buffer(f, 1, u.pinit->ep_index_max); - if (error) { - break; - } - f->fs_xfer = malloc(sizeof(f->fs_xfer[0]) * - u.pinit->ep_index_max, M_USB, M_WAITOK | M_ZERO); - f->fs_ep_max = u.pinit->ep_index_max; - f->fs_ep_ptr = u.pinit->pEndpoints; - f->fs_ep_sz = usb_fs_endpoint_sz; + error = ugen_fs_init(f, u.pinit->pEndpoints, + sizeof(struct usb_fs_endpoint), fflags, + u.pinit->ep_index_max); break; - +#ifdef COMPAT_FREEBSD32 + case USB_FS_INIT32: + error = ugen_fs_init(f, PTRIN(u.pinit32->pEndpoints), + sizeof(struct usb_fs_endpoint32), fflags, + u.pinit32->ep_index_max); + break; +#endif case USB_FS_UNINIT: if (u.puninit->dummy != 0) { error = EINVAL; From nobody Sun Apr 30 06:57:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HGt33Rmz48sPH; Sun, 30 Apr 2023 06:57: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 4Q8HGt2BXKz3N0F; Sun, 30 Apr 2023 06:57:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dgMx89R7KsbczKy1oXDScLUmJWDT0JoVEDBgBpQNZPg=; b=N5dfzPlaBRi4tRacuwH2ilBlLb7ZfujhoQWtUPy8eE/lf9HipwdPHyqybq7ojA9URbigEH 2qu7CjU83O9OPv1aEDU7HXMwwLI7I6eZLcXCoChNvhq8NcGQwFqgUBVcFZ+nMov38w5KAD rh4X8M0Ycpc+LKdAh01kEI4w8ib3niVkLJzWhVqVAO1+yHu8MFn0XFfot7iFGNsCqVT+GR 4s0u65m6ItvDGh077Md0/2vfR48U04sUw42zSceRkthyjZr27jeI3h5QaoY6hofPwaTHSi cT5hodtvE6cUqPBJSUVvggxDPo3fSRAqLjqcU8AfN4vbMnRPIVmdk6uOxxKI/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dgMx89R7KsbczKy1oXDScLUmJWDT0JoVEDBgBpQNZPg=; b=LN1gYJKm1187TyxJ5fiVXxi4coEdyqu47EYEw+IP0RryEVIch3lsvzGUWHmA1bArjrlfeg Xxh1ywRyWmqZ83e/1vFZkw7kg+ibfpj1t3uoHTDYzvOHwnkn0UbBTwE5bvjoYGVAEvUV6t 3VwQ0mjYLVSrSTffdcb+NuDwntPnvZzu1sJ1D5aNyzhoofD5BZYpnRax9P/yi/4XcA3LZM HmeQi0v6IxBmZm0fw7mhEPgX7q/J09Oj1V+c370js+JSwE3ExIUmgJg2lg3vyE3F6cJjjM u1/5TRS2/vafJ7fyG01aA4SEa3m7nvhh+hEjVZSgIunHYsKu97T9t875VygBXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837878; a=rsa-sha256; cv=none; b=iFjSvTR3c6tWNyH7eI1iOCQMI2GzHP3ZisRhb1u50MZZwx7IKlKF36ajbAHmDCP9XWecup 7m643p2FQsebZqC+/kN0sh/A6sl/Xt/4Ihe4UKqm7aXLdRwBusoDYyZp8yGwc2+tFgX2RP +GHvY60I/PgsVk++o8E14ZOrn2rmzNG+dw1gsJ/2VVYzYSFNSM0LgOxiCVa+12nNKBMFSg NGIyO64oXfESuGAmUnWPg7xOJlh39HYbuhpZwspk21TGhD6rg1rNWW3VQwxClCHw7egBij AWhmPAu+vbvKD+WStavHlDXlsJ8UYYMNESKPmDDDqRiT4q/pPobk/4c2torWwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HGs5g2Hz1Crg; Sun, 30 Apr 2023 06:57:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6vvL2071619; Sun, 30 Apr 2023 06:57:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6vval071618; Sun, 30 Apr 2023 06:57:57 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:57:57 GMT Message-Id: <202304300657.33U6vval071618@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 53e253c7e57f - stable/13 - usb(4): Separate the fast path and the slow path to avoid races and use-after-free for the USB FS interface. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 53e253c7e57f4a0a0632fca933277e509e04543c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=53e253c7e57f4a0a0632fca933277e509e04543c commit 53e253c7e57f4a0a0632fca933277e509e04543c Author: Hans Petter Selasky AuthorDate: 2023-03-31 17:14:18 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:17 +0000 usb(4): Separate the fast path and the slow path to avoid races and use-after-free for the USB FS interface. Bad behaving user-space USB applicatoins may crash the kernel by issuing USB FS related ioctl(2)'s out of their expected order. By default the USB FS ioctl(2) interface is only available to the administrator, root, and driver applications like webcamd(8) needs to be hijacked in order for this to happen. The issue is the fast-path code does not always see updates made by the slow-path code, and may then work on freed memory. This is easily fixed by using an EPOCH(9) type of synchronization mechanism. A SX(9) lock will be used as a substitute for EPOCH(9), due to the need for sleepability. In addition most calls going into the fast-path originate from a single user-space process and the need for multi-thread performance is not present. Differential Revision: https://reviews.freebsd.org/D39373 Reviewed by: markj@ Reported by: C Turt admbugs: 994 Sponsored by: NVIDIA Networking (cherry picked from commit 9b077d72bcc313baea2b9283afc7f568739eaadc) --- sys/dev/usb/usb_dev.c | 4 +- sys/dev/usb/usb_dev.h | 6 ++- sys/dev/usb/usb_device.c | 6 +-- sys/dev/usb/usb_generic.c | 105 ++++++++++++++++++++++++++++++---------------- 4 files changed, 80 insertions(+), 41 deletions(-) diff --git a/sys/dev/usb/usb_dev.c b/sys/dev/usb/usb_dev.c index 84446edc3ecd..5f06b1b9690e 100644 --- a/sys/dev/usb/usb_dev.c +++ b/sys/dev/usb/usb_dev.c @@ -2,7 +2,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2006-2008 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2006-2023 Hans Petter Selasky * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -386,6 +386,7 @@ usb_fifo_alloc(struct mtx *mtx) f = malloc(sizeof(*f), M_USBDEV, M_WAITOK | M_ZERO); cv_init(&f->cv_io, "FIFO-IO"); cv_init(&f->cv_drain, "FIFO-DRAIN"); + sx_init(&f->fs_fastpath_lock, "FIFO-FP"); f->priv_mtx = mtx; f->refcount = 1; knlist_init_mtx(&f->selinfo.si_note, mtx); @@ -626,6 +627,7 @@ usb_fifo_free(struct usb_fifo *f) cv_destroy(&f->cv_io); cv_destroy(&f->cv_drain); + sx_destroy(&f->fs_fastpath_lock); knlist_clear(&f->selinfo.si_note, 0); seldrain(&f->selinfo); diff --git a/sys/dev/usb/usb_dev.h b/sys/dev/usb/usb_dev.h index 1bdfa46d064f..8df3af9990cf 100644 --- a/sys/dev/usb/usb_dev.h +++ b/sys/dev/usb/usb_dev.h @@ -2,7 +2,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2008-2023 Hans Petter Selasky * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -110,13 +110,15 @@ struct usb_fifo { struct selinfo selinfo; struct cv cv_io; struct cv cv_drain; + struct sx fs_fastpath_lock; struct usb_fifo_methods *methods; struct usb_symlink *symlink[2];/* our symlinks */ struct proc *async_p; /* process that wants SIGIO */ struct usb_fs_endpoint *fs_ep_ptr; struct usb_device *udev; +#define USB_FS_XFER_MAX 126 struct usb_xfer *xfer[2]; - struct usb_xfer **fs_xfer; + struct usb_xfer *fs_xfer[USB_FS_XFER_MAX]; struct mtx *priv_mtx; /* client data */ /* set if FIFO is opened by a FILE: */ struct usb_cdev_privdata *curr_cpd; diff --git a/sys/dev/usb/usb_device.c b/sys/dev/usb/usb_device.c index 392d969587c0..820cb21c704d 100644 --- a/sys/dev/usb/usb_device.c +++ b/sys/dev/usb/usb_device.c @@ -2,7 +2,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2008-2020 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2008-2023 Hans Petter Selasky * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -2829,7 +2829,7 @@ usb_fifo_free_wrap(struct usb_device *udev, continue; } if ((f->dev_ep_index == 0) && - (f->fs_xfer == NULL)) { + (f->fs_ep_max == 0)) { /* no need to free this FIFO */ continue; } @@ -2837,7 +2837,7 @@ usb_fifo_free_wrap(struct usb_device *udev, if ((f->methods == &usb_ugen_methods) && (f->dev_ep_index == 0) && (!(flag & USB_UNCFG_FLAG_FREE_EP0)) && - (f->fs_xfer == NULL)) { + (f->fs_ep_max == 0)) { /* no need to free this FIFO */ continue; } diff --git a/sys/dev/usb/usb_generic.c b/sys/dev/usb/usb_generic.c index ad2f23eb9bfc..640f9fdb7ad6 100644 --- a/sys/dev/usb/usb_generic.c +++ b/sys/dev/usb/usb_generic.c @@ -2,7 +2,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2008-2022 Hans Petter Selasky + * Copyright (c) 2008-2023 Hans Petter Selasky * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -968,10 +968,10 @@ ugen_fs_init(struct usb_fifo *f, int error; /* verify input parameters */ - if (fs_ep_ptr == NULL || ep_index_max > 127) + if (fs_ep_ptr == NULL || ep_index_max > USB_FS_XFER_MAX) return (EINVAL); - if (f->fs_xfer != NULL) + if (f->fs_ep_max != 0) return (EBUSY); if (f->dev_ep_index != 0 || ep_index_max == 0) @@ -982,11 +982,11 @@ ugen_fs_init(struct usb_fifo *f, error = usb_fifo_alloc_buffer(f, 1, ep_index_max); if (error == 0) { - f->fs_xfer = malloc(sizeof(f->fs_xfer[0]) * - ep_index_max, M_USB, M_WAITOK | M_ZERO); + mtx_lock(f->priv_mtx); f->fs_ep_max = ep_index_max; f->fs_ep_ptr = fs_ep_ptr; f->fs_ep_sz = fs_ep_sz; + mtx_unlock(f->priv_mtx); } return (error); } @@ -994,15 +994,26 @@ ugen_fs_init(struct usb_fifo *f, int ugen_fs_uninit(struct usb_fifo *f) { - if (f->fs_xfer == NULL) { + if (f->fs_ep_max == 0) return (EINVAL); - } - usbd_transfer_unsetup(f->fs_xfer, f->fs_ep_max); - free(f->fs_xfer, M_USB); - f->fs_xfer = NULL; + + /* + * Prevent calls into the fast-path code, by setting fs_ep_max + * to zero: + */ + sx_xlock(&f->fs_fastpath_lock); + mtx_lock(f->priv_mtx); f->fs_ep_max = 0; + mtx_unlock(f->priv_mtx); + sx_xunlock(&f->fs_fastpath_lock); + + usbd_transfer_unsetup(f->fs_xfer, USB_FS_XFER_MAX); + + mtx_lock(f->priv_mtx); f->fs_ep_ptr = NULL; f->flag_iscomplete = 0; + mtx_unlock(f->priv_mtx); + usb_fifo_free_buffer(f); return (0); } @@ -1109,10 +1120,26 @@ usb_fs_open(struct usb_fifo *f, struct usb_fs_open *popen, static int usb_fs_close(struct usb_fifo *f, struct usb_fs_close *pclose) { + struct usb_xfer *xfer; + if (pclose->ep_index >= f->fs_ep_max) return (EINVAL); - usbd_transfer_unsetup(f->fs_xfer + pclose->ep_index, 1); + /* + * Prevent calls into the fast-path code, by setting the + * fs_xfer[] in question to NULL: + */ + sx_xlock(&f->fs_fastpath_lock); + mtx_lock(f->priv_mtx); + xfer = f->fs_xfer[pclose->ep_index]; + f->fs_xfer[pclose->ep_index] = NULL; + mtx_unlock(f->priv_mtx); + sx_xunlock(&f->fs_fastpath_lock); + + if (xfer == NULL) + return (EINVAL); + + usbd_transfer_unsetup(&xfer, 1); return (0); } @@ -1249,14 +1276,16 @@ ugen_fs_copy_in(struct usb_fifo *f, uint8_t ep_index) int error; uint8_t isread; + mtx_lock(f->priv_mtx); if (ep_index >= f->fs_ep_max) { + mtx_unlock(f->priv_mtx); return (EINVAL); } xfer = f->fs_xfer[ep_index]; if (xfer == NULL) { + mtx_unlock(f->priv_mtx); return (EINVAL); } - mtx_lock(f->priv_mtx); if (usbd_transfer_pending(xfer)) { mtx_unlock(f->priv_mtx); return (EBUSY); /* should not happen */ @@ -1529,14 +1558,16 @@ ugen_fs_copy_out(struct usb_fifo *f, uint8_t ep_index) int error; uint8_t isread; - if (ep_index >= f->fs_ep_max) + mtx_lock(f->priv_mtx); + if (ep_index >= f->fs_ep_max) { + mtx_unlock(f->priv_mtx); return (EINVAL); - + } xfer = f->fs_xfer[ep_index]; - if (xfer == NULL) + if (xfer == NULL) { + mtx_unlock(f->priv_mtx); return (EINVAL); - - mtx_lock(f->priv_mtx); + } if (!xfer->flags_int.transferring && !xfer->flags_int.started) { mtx_unlock(f->priv_mtx); @@ -1675,10 +1706,6 @@ ugen_ioctl(struct usb_fifo *f, u_long cmd, void *addr, int fflags) struct usb_fs_complete *pcomp; struct usb_fs_start *pstart; struct usb_fs_stop *pstop; - struct usb_fs_open *popen; - struct usb_fs_open_stream *popen_stream; - struct usb_fs_close *pclose; - struct usb_fs_clear_stall_sync *pstall; void *addr; } u; struct usb_xfer *xfer; @@ -1691,6 +1718,7 @@ ugen_ioctl(struct usb_fifo *f, u_long cmd, void *addr, int fflags) switch (cmd) { case USB_FS_COMPLETE: + sx_slock(&f->fs_fastpath_lock); mtx_lock(f->priv_mtx); error = ugen_fs_get_complete(f, &ep_index); mtx_unlock(f->priv_mtx); @@ -1701,9 +1729,11 @@ ugen_ioctl(struct usb_fifo *f, u_long cmd, void *addr, int fflags) u.pcomp->ep_index = ep_index; error = ugen_fs_copy_out(f, u.pcomp->ep_index); } + sx_sunlock(&f->fs_fastpath_lock); break; case USB_FS_START: + sx_slock(&f->fs_fastpath_lock); error = ugen_fs_copy_in(f, u.pstart->ep_index); if (error == 0) { mtx_lock(f->priv_mtx); @@ -1711,6 +1741,7 @@ ugen_ioctl(struct usb_fifo *f, u_long cmd, void *addr, int fflags) usbd_transfer_start(xfer); mtx_unlock(f->priv_mtx); } + sx_sunlock(&f->fs_fastpath_lock); break; case USB_FS_STOP: @@ -1739,20 +1770,6 @@ ugen_ioctl(struct usb_fifo *f, u_long cmd, void *addr, int fflags) mtx_unlock(f->priv_mtx); break; - case USB_FS_OPEN: - case USB_FS_OPEN_STREAM: - error = usb_fs_open(f, u.popen, fflags, - (cmd == USB_FS_OPEN_STREAM) ? u.popen_stream->stream_id : 0); - break; - - case USB_FS_CLOSE: - error = usb_fs_close(f, u.pclose); - break; - - case USB_FS_CLEAR_STALL_SYNC: - error = usb_fs_clear_stall_sync(f, u.pstall); - break; - default: error = ENOIOCTL; break; @@ -2212,6 +2229,10 @@ ugen_ioctl_post(struct usb_fifo *f, u_long cmd, void *addr, int fflags) struct usb_fs_init32 *pinit32; #endif struct usb_fs_uninit *puninit; + struct usb_fs_open *popen; + struct usb_fs_open_stream *popen_stream; + struct usb_fs_close *pclose; + struct usb_fs_clear_stall_sync *pstall; struct usb_device_port_path *dpp; uint32_t *ptime; void *addr; @@ -2440,6 +2461,20 @@ ugen_ioctl_post(struct usb_fifo *f, u_long cmd, void *addr, int fflags) error = ugen_fs_uninit(f); break; + case USB_FS_OPEN: + case USB_FS_OPEN_STREAM: + error = usb_fs_open(f, u.popen, fflags, + (cmd == USB_FS_OPEN_STREAM) ? u.popen_stream->stream_id : 0); + break; + + case USB_FS_CLOSE: + error = usb_fs_close(f, u.pclose); + break; + + case USB_FS_CLEAR_STALL_SYNC: + error = usb_fs_clear_stall_sync(f, u.pstall); + break; + default: mtx_lock(f->priv_mtx); error = ugen_iface_ioctl(f, cmd, addr, fflags); From nobody Sun Apr 30 06:57:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HGv2147z48s80; Sun, 30 Apr 2023 06:57:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8HGv0krfz3N0h; Sun, 30 Apr 2023 06:57:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kCdrNrLOBpTGMXIDEsxhBq1MZ1edAcflDoQ9cz3c1Qc=; b=OdsrrbO4gX8WPRRFsBfUqmOs+9umChd0aHtWFL1hYsPHNJyfF0l7DI3r5PXwWK2wPsVuR/ U4+9GdxFW7NaP2gEM3PAJR+aQkIHf0WLXf0l35F/MUW66FJv6X/EiiENoI9tA0k6n44rB8 dMoe7Y0I7v+jVgj8NxqOxUveksafb2rYs1HPhJU2qsPMLtGeGa5c/NjGYculoXNr5Xmmzp DNoPTqQRpnLgTUilcPLNafoQFeHFsrJpGsqpFu93sr4TcSmF/zvn8g1+2FXZl6GPjyZ/XH AQlbh7Y70a0nf3E9Lf1JnnJPRA8Qjqnjjqmg6x34N2bTik/TEwk//LOuf5KH4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kCdrNrLOBpTGMXIDEsxhBq1MZ1edAcflDoQ9cz3c1Qc=; b=oSdmP+hn4NQ4bq9vsXKBQywMtYtPjlmHj6u+ctxVkCQT28OaHqD0ItnI3lz07+2SrhOhR5 i8qX0d0HjzGc0AIO3Kwkcu7tXSg5fv3hL0RA0KFEyGIYONdgC3+z6QDVngMC02l7ma+kIr zKwVtIP2CUJA6OPxlr0Hl4q9hlTMeARw5iFX9YEoEZJZS4v/mpXWbAGynTx2MDopag6pIp 6KIQnLRReI0zWG18d8z7G5ZcUuIjJd/B1+0YDg0+FKro0P0EpRji0/L6jRbcVrOEA2Tx1C CFdqUJSf695L8Gt+RpxeDVUgKroqfoPByd5Qecpn2wocSreIZDkDLECBVTYsEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837879; a=rsa-sha256; cv=none; b=xj75LnIrQy3AiT39IcrFwuJMgys+tqpDZJIoqT3mdrlAsxkrh6E0/ix4/b2Y1EXEpnS1Yp Wd5UHmbTAjJyFkZmOe/weLZWh0i9JO/vgFdQQ3821QXJyx995QvRDoQ36BwEFBibbm3Rg/ M1LhJqBApF+wZkPRCZYHmjNB6M8Ocrj5lVtCRfAV2qcE8wViFOKglSfanCtRoSuU8eEuP8 fHtqxKTwoJZP6hkxJVjaQfavP6bjaIJtGEbUQx0D3QQ8VpCRlCwTrIvioY1iShhCHUZc19 Cft11lywtDvZOyx1zoi8fyq67obq6xUz5pcrKnjxAGTJQ8vbjd8I3y56543XnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HGt6f77z1Crh; Sun, 30 Apr 2023 06:57:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6vw9d071638; Sun, 30 Apr 2023 06:57:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6vwEK071637; Sun, 30 Apr 2023 06:57:58 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:57:58 GMT Message-Id: <202304300657.33U6vwEK071637@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 631723ed9788 - stable/13 - if_mos: Remove set but unused variable. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 631723ed978867814e20715914f46e76040bd0e6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=631723ed978867814e20715914f46e76040bd0e6 commit 631723ed978867814e20715914f46e76040bd0e6 Author: John Baldwin AuthorDate: 2023-04-10 17:35:48 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:17 +0000 if_mos: Remove set but unused variable. Reviewed by: hselasky Reported by: GCC Differential Revision: https://reviews.freebsd.org/D39356 (cherry picked from commit 5328efb3d0a54df20779d82319c3eebd49aa2993) --- sys/dev/usb/net/if_mos.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/dev/usb/net/if_mos.c b/sys/dev/usb/net/if_mos.c index d8f9cefedee9..3448e13bc254 100644 --- a/sys/dev/usb/net/if_mos.c +++ b/sys/dev/usb/net/if_mos.c @@ -426,11 +426,8 @@ static int mos_miibus_readreg(device_t dev, int phy, int reg) { struct mos_softc *sc = device_get_softc(dev); - uWord val; int i, res, locked; - USETW(val, 0); - locked = mtx_owned(&sc->sc_mtx); if (!locked) MOS_LOCK(sc); From nobody Sun Apr 30 06:57:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HGw1wgFz48sM4; Sun, 30 Apr 2023 06:58: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 4Q8HGw1Pzjz3MxL; Sun, 30 Apr 2023 06:58:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZBbCeGu0fiPmLBBpE38X8NDtH4FIUAv9iPJfIXQCpyw=; b=N5jz+/cFKlnq09+K07oYomtEcdaOqji/vd1ZgEwwcK2b3LEwDUIiuhJhKT/7QPuI/ji1H2 tTeuYoJwdh10VMzcWYz3JHBvMGDEKvllPWLL6awZZh7c5pF3w7ls9mKtE3G5fEo9f1xGvP jdVNLkFhX5Wx6iR9lQVsCVlSGqw4vkfOAEcAZJXYFwmo1xN8VBgHf+qw+tUKL2/+PSaGjJ hg9XL+y7fO1ykRq17UYCiBXrKLMQvp+Pck46Prj91XSxXgKXRIAjjACv50QtoAljja6LmM Tj15WfsCHCdBvRFefBTRPyRlwlLF3b63hkY3t+68q68bcQQP6G+uPDDPnfI55Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZBbCeGu0fiPmLBBpE38X8NDtH4FIUAv9iPJfIXQCpyw=; b=TWbnVoV/sEN0gpaKQHIOInW2ckhJa3TA/T+P0tJfHjR8ONhwIb+vbexgcChAZUO8yG+WTZ o8jETWvfhk2PuyOUMFb991qDJvjdCstjvftwmDiE2vBgxWkpRsswAcoXRW7AuYdwASLquq a5tbD8wJWId/BFPQ8xO+fhAyi34c8JYPcD5DE7H4IWf5wJYsaVu1ZI/LgoHxqzf0DWKXUu 9BwT/VdWPfTOASUUqnvpHcLdXlSTT2xB1jN6zw+uFpjvZucy9UFAj6mKiyS/L65r3KZokc z7mdPcrT6Zn2xqnXj1AlfuySevjNBbJclNS9QLSXdoXZA2Gl/oeE0Dn2ejBXvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837880; a=rsa-sha256; cv=none; b=Tr+enZZmoPyIg4uF851fKUWufclJcSAxuEjSWqsO9PHA+Vo8se2lFGVYs9r81F2wVVadlx OpBTrL+vHZlbxKKK8qe/p6Ry7e/oWZ05waWokdp+GrWJt5eIO+xMyLiZI2ZSVT3Y6LSRNK z2/aB5AQ0crYgMpMTUiiwg8hr/fpCdlY9M0bCSlvcbyKfcvAYLGiZg8q/Ya3wsn9qr21c4 XnWb6DFXjD9Ba1YOzxb856YWZMu265qmpoMHpSYdb8PniSdcNLp5fojHvQVXaoundiDAv1 kMjHdO+Rlmkd6aZXHcd7dkHIBY3o9Awy4jPTytJePgWOf5C9mPRVIapo7ZIXsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HGw0LQgzDst; Sun, 30 Apr 2023 06:58:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6vxeE071660; Sun, 30 Apr 2023 06:57:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6vxi4071659; Sun, 30 Apr 2023 06:57:59 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:57:59 GMT Message-Id: <202304300657.33U6vxi4071659@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: f560d0ead126 - stable/13 - bcm5974(4): add Magic Trackpad 2 (USB only) support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f560d0ead1266dd33bdfa4ce803e70b87c285cfe Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=f560d0ead1266dd33bdfa4ce803e70b87c285cfe commit f560d0ead1266dd33bdfa4ce803e70b87c285cfe Author: Val Packett AuthorDate: 2023-04-25 09:20:53 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:17 +0000 bcm5974(4): add Magic Trackpad 2 (USB only) support The MT2 uses a compact report format, but otherwise is similar in many ways to the internal trackpads, it even uses the same mode switching commands. Reviewed by: wulf Differential revision: https://reviews.freebsd.org/D34437 (cherry picked from commit ef8397c28e981e0115d435aabcf57cee7ea5f5ee) --- sys/dev/hid/bcm5974.c | 86 +++++++++++++++++++++++++++++++++++++++++++++++++-- sys/dev/usb/usbdevs | 1 + 2 files changed, 84 insertions(+), 3 deletions(-) diff --git a/sys/dev/hid/bcm5974.c b/sys/dev/hid/bcm5974.c index d92c1c5c43b5..223ed01e8312 100644 --- a/sys/dev/hid/bcm5974.c +++ b/sys/dev/hid/bcm5974.c @@ -114,11 +114,13 @@ enum tp_type { TYPE2, /* button integrated in trackpad */ TYPE3, /* additional header fields since June 2013 */ TYPE4, /* additional header field for pressure data */ + TYPE_MT2U, /* Magic Trackpad 2 USB */ TYPE_CNT }; /* list of device capability bits */ #define HAS_INTEGRATED_BUTTON 1 +#define USES_COMPACT_REPORT 2 struct tp_type_params { uint8_t caps; /* device capability bitmask */ @@ -150,6 +152,36 @@ struct tp_type_params { .offset = 23 * 2, .delta = 2, }, + [TYPE_MT2U] = { + .caps = HAS_INTEGRATED_BUTTON | USES_COMPACT_REPORT, + .button = 1, + .offset = 12, + .delta = 0, + }, +}; + +/* trackpad finger structure - compact version for external "Magic" devices */ +struct tp_finger_compact { + uint32_t coords; /* not struct directly due to endian conversion */ + uint8_t touch_major; + uint8_t touch_minor; + uint8_t size; + uint8_t pressure; + unsigned int orientation: 3; + unsigned int _unknown1: 1; + unsigned int id: 4; +} __packed; + +_Static_assert((sizeof(struct tp_finger_compact) == 9), "tp_finger struct size must be 9"); + +union tp_finger_compact_coords { + uint32_t num; + struct { + signed int x: 13; + signed int y: 13; + signed int _unknown: 4; + signed int state: 2; + } __packed; }; /* trackpad finger structure - little endian */ @@ -189,6 +221,7 @@ enum { BCM5974_FLAG_WELLSPRING7A, BCM5974_FLAG_WELLSPRING8, BCM5974_FLAG_WELLSPRING9, + BCM5974_FLAG_MAGIC_TRACKPAD2_USB, BCM5974_FLAG_MAX, }; @@ -334,6 +367,15 @@ static const struct bcm5974_dev_params bcm5974_dev_params[BCM5974_FLAG_MAX] = { .o = { SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION, 0 }, }, + [BCM5974_FLAG_MAGIC_TRACKPAD2_USB] = { + .tp = tp + TYPE_MT2U, + .p = { SN_PRESSURE, 0, 256, 256 }, + .w = { SN_WIDTH, 0, 2048, 0 }, + .x = { SN_COORD, -3678, 3934, 48 }, + .y = { SN_COORD, -2478, 2587, 44 }, + .o = { SN_ORIENT, + -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION, 0 }, + }, }; #define BCM5974_DEV(v,p,i) { \ @@ -407,6 +449,9 @@ static const struct hid_device_id bcm5974_devs[] = { BCM5974_DEV(APPLE, WELLSPRING9_ANSI, BCM5974_FLAG_WELLSPRING9), BCM5974_DEV(APPLE, WELLSPRING9_ISO, BCM5974_FLAG_WELLSPRING9), BCM5974_DEV(APPLE, WELLSPRING9_JIS, BCM5974_FLAG_WELLSPRING9), + + /* External "Magic" devices */ + BCM5974_DEV(APPLE, MAGIC_TRACKPAD2, BCM5974_FLAG_MAGIC_TRACKPAD2_USB), }; struct bcm5974_softc { @@ -541,6 +586,7 @@ bcm5974_set_device_mode(struct bcm5974_softc *sc, bool on) case TYPE3: /* Type 3 does not require a mode switch */ break; case TYPE4: + case TYPE_MT2U: err = bcm5974_set_device_mode_hid(sc, on); break; default: @@ -624,8 +670,10 @@ bcm5974_attach(device_t dev) BCM5974_ABS(sc->sc_evdev, ABS_MT_TOUCH_MAJOR, sc->sc_params->w); BCM5974_ABS(sc->sc_evdev, ABS_MT_TOUCH_MINOR, sc->sc_params->w); /* finger approach area */ - BCM5974_ABS(sc->sc_evdev, ABS_MT_WIDTH_MAJOR, sc->sc_params->w); - BCM5974_ABS(sc->sc_evdev, ABS_MT_WIDTH_MINOR, sc->sc_params->w); + if ((sc->sc_params->tp->caps & USES_COMPACT_REPORT) == 0) { + BCM5974_ABS(sc->sc_evdev, ABS_MT_WIDTH_MAJOR, sc->sc_params->w); + BCM5974_ABS(sc->sc_evdev, ABS_MT_WIDTH_MINOR, sc->sc_params->w); + } /* finger orientation */ BCM5974_ABS(sc->sc_evdev, ABS_MT_ORIENTATION, sc->sc_params->o); /* button properties */ @@ -637,7 +685,8 @@ bcm5974_attach(device_t dev) 0, MAX_FINGERS - 1, 0, 0, 0); evdev_support_abs(sc->sc_evdev, ABS_MT_TRACKING_ID, -1, MAX_FINGERS - 1, 0, 0, 0); - evdev_set_flag(sc->sc_evdev, EVDEV_FLAG_MT_TRACK); + if ((sc->sc_params->tp->caps & USES_COMPACT_REPORT) == 0) + evdev_set_flag(sc->sc_evdev, EVDEV_FLAG_MT_TRACK); evdev_set_flag(sc->sc_evdev, EVDEV_FLAG_MT_AUTOREL); /* Synaptics compatibility events */ evdev_set_flag(sc->sc_evdev, EVDEV_FLAG_MT_STCOMPAT); @@ -672,12 +721,17 @@ bcm5974_intr(void *context, void *data, hid_size_t len) const struct bcm5974_dev_params *params = sc->sc_params; union evdev_mt_slot slot_data; struct tp_finger *f; + struct tp_finger_compact *fc; + union tp_finger_compact_coords coords; int ntouch; /* the finger number in touch */ int ibt; /* button status */ int i; int slot; uint8_t fsize = sizeof(struct tp_finger) + params->tp->delta; + if ((params->tp->caps & USES_COMPACT_REPORT) != 0) + fsize = sizeof(struct tp_finger_compact) + params->tp->delta; + if ((len < params->tp->offset + fsize) || ((len - params->tp->offset) % fsize) != 0) { DPRINTFN(BCM5974_LLEVEL_INFO, "Invalid length: %d, %x, %x\n", @@ -689,6 +743,32 @@ bcm5974_intr(void *context, void *data, hid_size_t len) ntouch = (len - params->tp->offset) / fsize; for (i = 0, slot = 0; i != ntouch; i++) { + if ((params->tp->caps & USES_COMPACT_REPORT) != 0) { + fc = (struct tp_finger_compact *)(((uint8_t *)data) + + params->tp->offset + params->tp->delta + i * fsize); + coords.num = le32toh(fc->coords); + DPRINTFN(BCM5974_LLEVEL_INFO, + "[%d]ibt=%d, taps=%d, x=%5d, y=%5d, state=%4d, " + "tchmaj=%4d, tchmin=%4d, size=%4d, pressure=%4d, " + "ot=%4x, id=%4x\n", + i, ibt, ntouch, coords.x, coords.y, + fc->state, fc->touch_major, fc->touch_minor, fc->size, + fc->pressure, fc->orientation, fc->id); + if (fc->touch_major == 0) + continue; + slot_data = (union evdev_mt_slot) { + .id = fc->id, + .x = coords.x, + .y = params->y.min + params->y.max - coords.y, + .p = fc->pressure, + .maj = fc->touch_major << 2, + .min = fc->touch_minor << 2, + .ori = -fc->orientation, + }; + evdev_mt_push_slot(sc->sc_evdev, slot, &slot_data); + slot++; + continue; + } f = (struct tp_finger *)(((uint8_t *)data) + params->tp->offset + params->tp->delta + i * fsize); DPRINTFN(BCM5974_LLEVEL_INFO, diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 0368ec25e6e1..fb282568935f 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1193,6 +1193,7 @@ product APPLE WELLSPRING8_JIS 0x0292 Apple Internal Keyboard/Trackpad product APPLE WELLSPRING9_ANSI 0x0272 Apple Internal Keyboard/Trackpad product APPLE WELLSPRING9_ISO 0x0273 Apple Internal Keyboard/Trackpad product APPLE WELLSPRING9_JIS 0x0274 Apple Internal Keyboard/Trackpad +product APPLE MAGIC_TRACKPAD2 0x0265 Apple Magic Trackpad 2 product APPLE MOUSE 0x0301 Mouse M4848 product APPLE OPTMOUSE 0x0302 Optical mouse product APPLE MIGHTYMOUSE 0x0304 Mighty Mouse From nobody Sun Apr 30 06:58:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HGx3mMWz48sDB; Sun, 30 Apr 2023 06:58: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 4Q8HGx24lvz3NCY; Sun, 30 Apr 2023 06:58:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wsRj2+2Ve8Hiw1ZvpCBOSxnoL8g9rMZBTO2v/JGtycE=; b=LKvS8KSsLunJSmvEjZXG/YSX0KPZ5hTmjtjRSOOCIKrtWqrbCyLJA4TNuldP0d8tFZkC8O HMr8rrQIqdTVmcPXeuGza/Uf6Te14/8WoFItOvvppYj1Exp06hFy8S9ylxBn4F+JJICB91 4P73GVTBUFHwyZH/E9zh1hVkg4EXtyAqsW3/vS4PDB6BegVIZWU/tN3rNaPbAdd8ojuPpd xUKoc5z60/8GvPnSTcCycwlvX+sqoQc9pf5x++itY4PRgsbpoh/CPq2yGV4Ui00/x43wIY wp5cXAuHo4DEsYL1FhfsvRUte4BV7yX767mPzqWknqmAIN5q/0t4y5E+uKqrAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wsRj2+2Ve8Hiw1ZvpCBOSxnoL8g9rMZBTO2v/JGtycE=; b=rRO6OeMkM7TXBmMgOhWW4uTEvwhVUoZ1g22ubhIu/OU/121edOxn7mJUJMom+Px9wsVbB7 FkYh1Yf92OXCG7nCQ/T18+XGSFqlNWc36c+1OC9LcapNIGHMlFTFTod533l99Av1k9i9D4 100/ObLbXK+OITaIUT63tZuzx7K9aSRGoZlmnS0UPUwjztm2GBif15uvfgTBJGd5dlQ4z3 tNB0CVqK7hPEuWgUE2JG1pVccOm1YCaJb46Q0Nx+Xq+/joEZTr/n1xFN59MeAJuiK85xsx vVaxSZJ9/TrtZtU3Ur4bzpt3KaxFPxaK0VYUbDzSd9nPzhoWVX10QE7wrE8gPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837881; a=rsa-sha256; cv=none; b=aGrvtQwyPFiskwReR7BE79sdnnGBYtYDehmVTTs+35ilrXtRd43r680dYFvdRohXoaT8l0 +1q5kHJleJiYBb8q2OBcKOJCapW+vNmgfYmZ9QZB027c5Px+fOwakWuvQWySicwA/j+ogp aJW7ec0hn+1oJ9pcLKEIm74eIxkdxwgdrzF1lnh0RnzNGD5PuXv4bhtjZQhd1/LBN2g242 wyp7KeUN0fp8XJ0PWBtzyf+4icjzxGUtFLGrtKDFCGwRzd4welfoojfQMW5dD3OIJZjukn 4SbDj9EFqKOqyAhkBlHHur1ftpDdlc9ATsyGJDAh9RHlW1PQ69of6i5Ym51Rxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HGx1B1pz1Ccd; Sun, 30 Apr 2023 06:58:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6w1Ua071682; Sun, 30 Apr 2023 06:58:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6w1vm071681; Sun, 30 Apr 2023 06:58:01 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:58:01 GMT Message-Id: <202304300658.33U6w1vm071681@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 6e21ac722620 - stable/13 - Get clocks for Rockchip RK3568. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6e21ac7226209fc44b880440d090e3918e830c71 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=6e21ac7226209fc44b880440d090e3918e830c71 commit 6e21ac7226209fc44b880440d090e3918e830c71 Author: Søren Schmidt AuthorDate: 2022-12-20 08:53:58 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:17 +0000 Get clocks for Rockchip RK3568. (cherry picked from commit 1d8c07b7ab7bc123ec62e97176beffef4052eba8) --- sys/dev/usb/controller/dwc3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/controller/dwc3.c b/sys/dev/usb/controller/dwc3.c index d9f576a3dbb7..2f607e19248d 100644 --- a/sys/dev/usb/controller/dwc3.c +++ b/sys/dev/usb/controller/dwc3.c @@ -451,7 +451,8 @@ snps_dwc3_common_attach(device_t dev, bool is_fdt) node = ofw_bus_get_node(dev); /* Get the clocks if any */ - if (ofw_bus_is_compatible(dev, "rockchip,rk3328-dwc3") == 1) { + if (ofw_bus_is_compatible(dev, "rockchip,rk3328-dwc3") == 1 || + ofw_bus_is_compatible(dev, "rockchip,rk3568-dwc3") == 1) { if (clk_get_by_ofw_name(dev, node, "ref_clk", &sc->clk_ref) != 0) device_printf(dev, "Cannot get ref_clk\n"); if (clk_get_by_ofw_name(dev, node, "suspend_clk", &sc->clk_suspend) != 0) From nobody Sun Apr 30 06:58:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HGy47VWz48sDL; Sun, 30 Apr 2023 06:58:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8HGy2sVZz3N3m; Sun, 30 Apr 2023 06:58:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HVprLkdEcw7w1zyvMJLrzqbEErn7SGSY3b7+du38nbc=; b=tTCdiSJ0Q8gRt3kIqVwwSSXUUgSijvpRdYEJL+Hi+ug2GYo62Sn2aCCse6miP2SZUTV36C 048lISieiI80f3310JEQ5p9I2d7dkp7lsGvDxQ1vqyoTtzBLzE/IJqu5G3v0SHSvfHmkyp l+pkNlsfN1V1yAlFFHPpe+pIv847q7W7jVwpY6OqZCruKRRdmi51K6uC0CwvCrxLD5uyPN nYSMiZbhmqUGffod7V8RaCfznCM/ThxZe8EAl/qwIjscGvFOI8MrQV9tTL7BPb/IsU/gpl dj8EbFegQk0B2+qKVKFS4wyQHVFsMAfdaiKZ+EEObAL9t/AHcjO4pY3G4c5aHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HVprLkdEcw7w1zyvMJLrzqbEErn7SGSY3b7+du38nbc=; b=AZcFZ0+86/9eKKRzVSl5aeT5Q2qYwXel1tHuwwwO/klp94c87I7z7yfo4zp1NqM3J7dyGN jJCO7bav4PvFWoB2jV1R1nqCIJTaeNzuQD8qN8BJXqUX8CIsFTx1IkVPK11reCdUAwbgHo xvGc/W/nJKdxba6WWOHvSNXx/OUdtB5AJFMc9SNOC3/k+NNFMoraQV08lS0hJ1MtlCEuxK YydumIKloZnVgskWShkdxX6OAj/nl7WVqRoi6NF46UT8vDrZaZx9k5CE9Z4NvHjm+Id1Q5 nEZFo2+Sjbtj/smsMUxSDui0TDPByrYxDOVB+4ts7I/GzKh0ZXQadl2nyI0WSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837882; a=rsa-sha256; cv=none; b=DSneL06pnTbEmaeqVmMvFenf7sZQRvegzwbd4WasGGvNnW4b0NjQd0AJqM2s6KHKnNAM7A 28HQEzkxM67dQ9b3BLMTfCLLOoZhXDCYUyPrCw3hH5TKHPgGvOFToYI8eACGUIjEUJQs4/ daaxOMJ37jDEPbX+xo3S/0ReOYtt/QNPeugnozjdjzruB22LFXuFtJ8kRad4ELGiVcn9e+ Lu/4+eORhVe2vfdMwug+s+7bbiPoQJoilkSXBVpQkiNkWTZJVoUlwP8HbYOIC6mU8WuDx1 JHHfdysJ+fRLXiU2Xor4huEeG8hV2fhJzpv5KGwr96L/Wa9P+1l8P0ZlnTYMcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HGy1ySlzDg2; Sun, 30 Apr 2023 06:58:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6w2MG071701; Sun, 30 Apr 2023 06:58:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6w2G1071700; Sun, 30 Apr 2023 06:58:02 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:58:02 GMT Message-Id: <202304300658.33U6w2G1071700@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 0e81f07f3653 - stable/13 - USB: adjust the Generic XHCI ACPI probe return value List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0e81f07f36533b47da917a98e3c4d7c2308adf08 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=0e81f07f36533b47da917a98e3c4d7c2308adf08 commit 0e81f07f36533b47da917a98e3c4d7c2308adf08 Author: Bjoern A. Zeeb AuthorDate: 2021-10-01 13:37:01 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:17 +0000 USB: adjust the Generic XHCI ACPI probe return value Change the probe return value from BUS_PROBE_DEFAULT to BUS_PROBE_GENERIC given this is the "generic" attach method. This allows individual drivers using XHCI generic but needing their own intialisation to gain priority for attaching over the generic implementation. Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D32257 (cherry picked from commit 76f3b8cb640536de2c370cc2bd60382bbc35cf5d) --- sys/dev/usb/controller/generic_xhci_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/usb/controller/generic_xhci_acpi.c b/sys/dev/usb/controller/generic_xhci_acpi.c index aa96c3f40fee..09add23de5af 100644 --- a/sys/dev/usb/controller/generic_xhci_acpi.c +++ b/sys/dev/usb/controller/generic_xhci_acpi.c @@ -67,7 +67,7 @@ generic_xhci_acpi_probe(device_t dev) device_set_desc(dev, XHCI_HC_DEVSTR); - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_GENERIC); } static device_method_t xhci_acpi_methods[] = { From nobody Sun Apr 30 06:58:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HGz4bmJz48sJl; Sun, 30 Apr 2023 06:58: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 4Q8HGz44Hdz3NGZ; Sun, 30 Apr 2023 06:58:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QgtLJzkCoWfews1PoNW6+xMAgU9Y/bS+8+yiTARrrnU=; b=iwiFlWc+OtVjHDyQ5E5wTGPuXbjVlnm1RI5k2RDpVPthQWRdnoKA5Ak3tVoGwsrg+Wb0JZ 1GZLrJIsZu61r4OY1WEXyYxT0Y5yKysaIdWqOgRW+PByvTj5GVTL3k8iPBetC2gMNV8WpU jwXnlO+8++x4eC1yNUjo0wUvtgWg2SpKPH3mWdfDFUcR6IBrEzu2tdN5g9eDC3OVpzO59+ 8SuWO4mb62ND2cT320wy4YwcEKh/albldPp3UN6EbtKTLVL2t+FJ/p/zdXBRlqx1fkJKIs zp4xCh1SxC7XgfHrSIrkOOPJ1qAOs830uSXDttO+cuv2B6SpVS8smMZ8wH2f6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QgtLJzkCoWfews1PoNW6+xMAgU9Y/bS+8+yiTARrrnU=; b=pePJfTGCZIRl4Ycd9FsTDNjkb7N0TAWV5mXHxtNt2nZffRKQtpSoHmUobWWF0cAkkiHWd8 mLRhmZvdUhiuvm3Utl8OQmXB6gl70BLHjpo49Xj9fu7udTg8xJnRJkS5fwkoxLFXLcm7O/ aRwDfhz0VNJ+72G2e/Z3fMKNIBhdEvkkAYLKcjP5GWIU4h+jOKffarNMSJIRlPnWc5mWTN UF+m3/43PfC22f8/3XeJQ9cjh2SWaugJqadQibp2/d836WgCxYK/meeM1AMs09hmoNsNOM eNL+Y2cf8ObHbAh3guczjCW8gzJ1IvfBwXdW0qyx6M99uWZoloxuKE8RewpFDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837883; a=rsa-sha256; cv=none; b=bNFiKORvR3O27pC9VZsOrB4rHI3kEYqVaRbjAbwlp8JdFI3ZuOIcdjinRD+UQyoO6zj6ng 0YNH0SSAC7a6NU/rkxuzcPNBhBq2HaleyqG3QDOrjgyZGVofvcPX331eA/ctCHYNNiwZpZ 3alL+/0Vehb/BKtn3pHn0PcBEkBW7CxH725MO4lgJF4N8q/DwX43qtPZhzanonxExXBZUN mw8lTzyK9rildMTAict8pTqIp3G0NWQKjp4m2ReVjgZyML33zO/i4B2DJEB7QUBF5O/FDg wgcWcAyvldvoveCYUYKhSNr80qL2SiAA5PRzuyFQkkaE9HQUkkK5Oq9S43Bm9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HGz2lwHzDsv; Sun, 30 Apr 2023 06:58:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6w3sr071720; Sun, 30 Apr 2023 06:58:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6w3Jx071719; Sun, 30 Apr 2023 06:58:03 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:58:03 GMT Message-Id: <202304300658.33U6w3Jx071719@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: decbf52b0b52 - stable/13 - xhci: Rework 64-byte context support to avoid pointer abuse List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: decbf52b0b52bf84415a5960561db834c87740bf Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=decbf52b0b52bf84415a5960561db834c87740bf commit decbf52b0b52bf84415a5960561db834c87740bf Author: Jessica Clarke AuthorDate: 2021-10-24 18:48:46 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:18 +0000 xhci: Rework 64-byte context support to avoid pointer abuse Currently, to support 64-byte contexts, xhci_ctx_[gs]et_le(32|64) take a pointer to the field within a 32-byte context and, if 64-byte contexts are in use, compute where the 64-byte context field is and use that instead by deriving a pointer from the 32-byte field pointer. This is done by exploiting a combination of 64-byte contexts being the same layout as their 32-byte counterparts, just with 32 bytes of padding at the end, and that all individual contexts are either in a device context or an input context which itself is page-aligned. By masking out the low 4 bits (which is the offset of the field within the 32-byte contxt) of the offset within the page, the offset of the invididual context within the containing device/input context can be determined, which is itself 32 times the number of preceding contexts. Thus, adding this value to the pointer again gets 64 times the number of preceding contexts plus the field offset, which gives the offset of the 64-byte context plus the field offset, which is the address of the field in the 64-byte context. However, this involves a fair amount of lying to the compiler when constructing these intermediate pointers, and is rather difficult to reason about. In particular, this is problematic for CHERI, where we compile the kernel with subobject bounds enabled; that is, unless annotated to opt out (e.g. for C struct inheritance reasons where you need to be able to downcast, or containerof idioms), a pointer to a member of a struct is a capability whose bounds only cover that field, and any attempt to dereference outside those bounds will fault, protecting against intra-object buffer overflows. Thus the pointer given to xhci_ctx_[gs]et_le(32|64) is a capability whose bounds only cover the field in the 32-byte context, and computing the pointer to the 64-byte context field takes the address out of bounds, resulting in a fault when later dereferenced. This can be cleaned up by using a different abstraction. Instead of doing the 32-byte to 64-byte conversion on access to the field, we can do the conversion when getting a pointer to the context itself, and define proper 64-byte versions of contexts in order to let the compiler do all the necessary arithmetic rather than do it manually ourselves. This provides a cleaner implementation, works for CHERI and may even be slightly more performant as it avoids the need to mess with masking pointers (which cannot in the general case be optimised by compilers to be reused across accesses to different fields within the same context, since it does not know that the contexts are over-aligned compared with the C ABI requirements). Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D32554 (cherry picked from commit 29863d1effe20da3cc75ae10bd52d96edafe9e59) --- sys/dev/usb/controller/xhci.c | 160 +++++++++++++++--------------------------- sys/dev/usb/controller/xhci.h | 26 +++++++ 2 files changed, 81 insertions(+), 105 deletions(-) diff --git a/sys/dev/usb/controller/xhci.c b/sys/dev/usb/controller/xhci.c index 02a9a37fbd2d..e28529ca003d 100644 --- a/sys/dev/usb/controller/xhci.c +++ b/sys/dev/usb/controller/xhci.c @@ -88,6 +88,11 @@ #define XHCI_BUS2SC(bus) \ __containerof(bus, struct xhci_softc, sc_bus) +#define XHCI_GET_CTX(sc, which, field, ptr) \ + ((sc)->sc_ctx_is_64_byte ? \ + &((struct which##64 *)(ptr))->field.ctx : \ + &((struct which *)(ptr))->field) + static SYSCTL_NODE(_hw_usb, OID_AUTO, xhci, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "USB XHCI"); @@ -167,12 +172,6 @@ static usb_error_t xhci_configure_mask(struct usb_device *, static usb_error_t xhci_cmd_evaluate_ctx(struct xhci_softc *, uint64_t, uint8_t); static void xhci_endpoint_doorbell(struct usb_xfer *); -static void xhci_ctx_set_le32(struct xhci_softc *sc, volatile uint32_t *ptr, uint32_t val); -static uint32_t xhci_ctx_get_le32(struct xhci_softc *sc, volatile uint32_t *ptr); -static void xhci_ctx_set_le64(struct xhci_softc *sc, volatile uint64_t *ptr, uint64_t val); -#ifdef USB_DEBUG -static uint64_t xhci_ctx_get_le64(struct xhci_softc *sc, volatile uint64_t *ptr); -#endif static const struct usb_bus_methods xhci_bus_methods; @@ -187,26 +186,26 @@ xhci_dump_trb(struct xhci_trb *trb) } static void -xhci_dump_endpoint(struct xhci_softc *sc, struct xhci_endp_ctx *pep) +xhci_dump_endpoint(struct xhci_endp_ctx *pep) { DPRINTFN(5, "pep = %p\n", pep); - DPRINTFN(5, "dwEpCtx0=0x%08x\n", xhci_ctx_get_le32(sc, &pep->dwEpCtx0)); - DPRINTFN(5, "dwEpCtx1=0x%08x\n", xhci_ctx_get_le32(sc, &pep->dwEpCtx1)); - DPRINTFN(5, "qwEpCtx2=0x%016llx\n", (long long)xhci_ctx_get_le64(sc, &pep->qwEpCtx2)); - DPRINTFN(5, "dwEpCtx4=0x%08x\n", xhci_ctx_get_le32(sc, &pep->dwEpCtx4)); - DPRINTFN(5, "dwEpCtx5=0x%08x\n", xhci_ctx_get_le32(sc, &pep->dwEpCtx5)); - DPRINTFN(5, "dwEpCtx6=0x%08x\n", xhci_ctx_get_le32(sc, &pep->dwEpCtx6)); - DPRINTFN(5, "dwEpCtx7=0x%08x\n", xhci_ctx_get_le32(sc, &pep->dwEpCtx7)); + DPRINTFN(5, "dwEpCtx0=0x%08x\n", le32toh(pep->dwEpCtx0)); + DPRINTFN(5, "dwEpCtx1=0x%08x\n", le32toh(pep->dwEpCtx1)); + DPRINTFN(5, "qwEpCtx2=0x%016llx\n", (long long)le64toh(pep->qwEpCtx2)); + DPRINTFN(5, "dwEpCtx4=0x%08x\n", le32toh(pep->dwEpCtx4)); + DPRINTFN(5, "dwEpCtx5=0x%08x\n", le32toh(pep->dwEpCtx5)); + DPRINTFN(5, "dwEpCtx6=0x%08x\n", le32toh(pep->dwEpCtx6)); + DPRINTFN(5, "dwEpCtx7=0x%08x\n", le32toh(pep->dwEpCtx7)); } static void -xhci_dump_device(struct xhci_softc *sc, struct xhci_slot_ctx *psl) +xhci_dump_device(struct xhci_slot_ctx *psl) { DPRINTFN(5, "psl = %p\n", psl); - DPRINTFN(5, "dwSctx0=0x%08x\n", xhci_ctx_get_le32(sc, &psl->dwSctx0)); - DPRINTFN(5, "dwSctx1=0x%08x\n", xhci_ctx_get_le32(sc, &psl->dwSctx1)); - DPRINTFN(5, "dwSctx2=0x%08x\n", xhci_ctx_get_le32(sc, &psl->dwSctx2)); - DPRINTFN(5, "dwSctx3=0x%08x\n", xhci_ctx_get_le32(sc, &psl->dwSctx3)); + DPRINTFN(5, "dwSctx0=0x%08x\n", le32toh(psl->dwSctx0)); + DPRINTFN(5, "dwSctx1=0x%08x\n", le32toh(psl->dwSctx1)); + DPRINTFN(5, "dwSctx2=0x%08x\n", le32toh(psl->dwSctx2)); + DPRINTFN(5, "dwSctx3=0x%08x\n", le32toh(psl->dwSctx3)); } #endif @@ -238,60 +237,6 @@ xhci_iterate_hw_softc(struct usb_bus *bus, usb_bus_mem_sub_cb_t *cb) } } -static void -xhci_ctx_set_le32(struct xhci_softc *sc, volatile uint32_t *ptr, uint32_t val) -{ - if (sc->sc_ctx_is_64_byte) { - uint32_t offset; - /* exploit the fact that our structures are XHCI_PAGE_SIZE aligned */ - /* all contexts are initially 32-bytes */ - offset = ((uintptr_t)ptr) & ((XHCI_PAGE_SIZE - 1) & ~(31U)); - ptr = (volatile uint32_t *)(((volatile uint8_t *)ptr) + offset); - } - *ptr = htole32(val); -} - -static uint32_t -xhci_ctx_get_le32(struct xhci_softc *sc, volatile uint32_t *ptr) -{ - if (sc->sc_ctx_is_64_byte) { - uint32_t offset; - /* exploit the fact that our structures are XHCI_PAGE_SIZE aligned */ - /* all contexts are initially 32-bytes */ - offset = ((uintptr_t)ptr) & ((XHCI_PAGE_SIZE - 1) & ~(31U)); - ptr = (volatile uint32_t *)(((volatile uint8_t *)ptr) + offset); - } - return (le32toh(*ptr)); -} - -static void -xhci_ctx_set_le64(struct xhci_softc *sc, volatile uint64_t *ptr, uint64_t val) -{ - if (sc->sc_ctx_is_64_byte) { - uint32_t offset; - /* exploit the fact that our structures are XHCI_PAGE_SIZE aligned */ - /* all contexts are initially 32-bytes */ - offset = ((uintptr_t)ptr) & ((XHCI_PAGE_SIZE - 1) & ~(31U)); - ptr = (volatile uint64_t *)(((volatile uint8_t *)ptr) + offset); - } - *ptr = htole64(val); -} - -#ifdef USB_DEBUG -static uint64_t -xhci_ctx_get_le64(struct xhci_softc *sc, volatile uint64_t *ptr) -{ - if (sc->sc_ctx_is_64_byte) { - uint32_t offset; - /* exploit the fact that our structures are XHCI_PAGE_SIZE aligned */ - /* all contexts are initially 32-bytes */ - offset = ((uintptr_t)ptr) & ((XHCI_PAGE_SIZE - 1) & ~(31U)); - ptr = (volatile uint64_t *)(((volatile uint8_t *)ptr) + offset); - } - return (le64toh(*ptr)); -} -#endif - static int xhci_reset_command_queue_locked(struct xhci_softc *sc) { @@ -1400,7 +1345,7 @@ xhci_set_address(struct usb_device *udev, struct mtx *mtx, uint16_t address) struct usb_page_search buf_dev; struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); struct xhci_hw_dev *hdev; - struct xhci_dev_ctx *pdev; + struct xhci_slot_ctx *slot; struct xhci_endpoint_ext *pepext; uint32_t temp; uint16_t mps; @@ -1493,10 +1438,11 @@ xhci_set_address(struct usb_device *udev, struct mtx *mtx, uint16_t address) /* update device address to new value */ usbd_get_page(&hdev->device_pc, 0, &buf_dev); - pdev = buf_dev.buffer; + slot = XHCI_GET_CTX(sc, xhci_dev_ctx, ctx_slot, + buf_dev.buffer); usb_pc_cpu_invalidate(&hdev->device_pc); - temp = xhci_ctx_get_le32(sc, &pdev->ctx_slot.dwSctx3); + temp = le32toh(slot->dwSctx3); udev->address = XHCI_SCTX_3_DEV_ADDR_GET(temp); /* update device state to new value */ @@ -2304,7 +2250,8 @@ xhci_configure_mask(struct usb_device *udev, uint32_t mask, uint8_t drop) { struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); struct usb_page_search buf_inp; - struct xhci_input_dev_ctx *pinp; + struct xhci_input_ctx *input; + struct xhci_slot_ctx *slot; uint32_t temp; uint8_t index; uint8_t x; @@ -2313,22 +2260,23 @@ xhci_configure_mask(struct usb_device *udev, uint32_t mask, uint8_t drop) usbd_get_page(&sc->sc_hw.devs[index].input_pc, 0, &buf_inp); - pinp = buf_inp.buffer; + input = XHCI_GET_CTX(sc, xhci_input_dev_ctx, ctx_input, + buf_inp.buffer); + slot = XHCI_GET_CTX(sc, xhci_input_dev_ctx, ctx_slot, buf_inp.buffer); if (drop) { mask &= XHCI_INCTX_NON_CTRL_MASK; - xhci_ctx_set_le32(sc, &pinp->ctx_input.dwInCtx0, mask); - xhci_ctx_set_le32(sc, &pinp->ctx_input.dwInCtx1, 0); + input->dwInCtx0 = htole32(mask); + input->dwInCtx1 = htole32(0); } else { /* * Some hardware requires that we drop the endpoint * context before adding it again: */ - xhci_ctx_set_le32(sc, &pinp->ctx_input.dwInCtx0, - mask & XHCI_INCTX_NON_CTRL_MASK); + input->dwInCtx0 = htole32(mask & XHCI_INCTX_NON_CTRL_MASK); /* Add new endpoint context */ - xhci_ctx_set_le32(sc, &pinp->ctx_input.dwInCtx1, mask); + input->dwInCtx1 = htole32(mask); /* find most significant set bit */ for (x = 31; x != 1; x--) { @@ -2346,10 +2294,10 @@ xhci_configure_mask(struct usb_device *udev, uint32_t mask, uint8_t drop) x = sc->sc_hw.devs[index].context_num; /* update number of contexts */ - temp = xhci_ctx_get_le32(sc, &pinp->ctx_slot.dwSctx0); + temp = le32toh(slot->dwSctx0); temp &= ~XHCI_SCTX_0_CTX_NUM_SET(31); temp |= XHCI_SCTX_0_CTX_NUM_SET(x + 1); - xhci_ctx_set_le32(sc, &pinp->ctx_slot.dwSctx0, temp); + slot->dwSctx0 = htole32(temp); } usb_pc_cpu_flush(&sc->sc_hw.devs[index].input_pc); return (0); @@ -2364,7 +2312,7 @@ xhci_configure_endpoint(struct usb_device *udev, { struct usb_page_search buf_inp; struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); - struct xhci_input_dev_ctx *pinp; + struct xhci_endp_ctx *endp; uint64_t ring_addr = pepext->physaddr; uint32_t temp; uint8_t index; @@ -2375,8 +2323,6 @@ xhci_configure_endpoint(struct usb_device *udev, usbd_get_page(&sc->sc_hw.devs[index].input_pc, 0, &buf_inp); - pinp = buf_inp.buffer; - epno = edesc->bEndpointAddress; type = edesc->bmAttributes & UE_XFERTYPE; @@ -2396,6 +2342,9 @@ xhci_configure_endpoint(struct usb_device *udev, if (mult == 0) return (USB_ERR_BAD_BUFSIZE); + endp = XHCI_GET_CTX(sc, xhci_input_dev_ctx, ctx_ep[epno - 1], + buf_inp.buffer); + /* store endpoint mode */ pepext->trb_ep_mode = ep_mode; /* store bMaxPacketSize for control endpoints */ @@ -2451,7 +2400,7 @@ xhci_configure_endpoint(struct usb_device *udev, break; } - xhci_ctx_set_le32(sc, &pinp->ctx_ep[epno - 1].dwEpCtx0, temp); + endp->dwEpCtx0 = htole32(temp); temp = XHCI_EPCTX_1_HID_SET(0) | @@ -2486,8 +2435,8 @@ xhci_configure_endpoint(struct usb_device *udev, if (epno & 1) temp |= XHCI_EPCTX_1_EPTYPE_SET(4); - xhci_ctx_set_le32(sc, &pinp->ctx_ep[epno - 1].dwEpCtx1, temp); - xhci_ctx_set_le64(sc, &pinp->ctx_ep[epno - 1].qwEpCtx2, ring_addr); + endp->dwEpCtx1 = htole32(temp); + endp->qwEpCtx2 = htole64(ring_addr); switch (edesc->bmAttributes & UE_XFERTYPE) { case UE_INTERRUPT: @@ -2504,10 +2453,10 @@ xhci_configure_endpoint(struct usb_device *udev, break; } - xhci_ctx_set_le32(sc, &pinp->ctx_ep[epno - 1].dwEpCtx4, temp); + endp->dwEpCtx4 = htole32(temp); #ifdef USB_DEBUG - xhci_dump_endpoint(sc, &pinp->ctx_ep[epno - 1]); + xhci_dump_endpoint(endp); #endif usb_pc_cpu_flush(&sc->sc_hw.devs[index].input_pc); @@ -2563,7 +2512,7 @@ xhci_configure_device(struct usb_device *udev) struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); struct usb_page_search buf_inp; struct usb_page_cache *pcinp; - struct xhci_input_dev_ctx *pinp; + struct xhci_slot_ctx *slot; struct usb_device *hubdev; uint32_t temp; uint32_t route; @@ -2580,7 +2529,7 @@ xhci_configure_device(struct usb_device *udev) usbd_get_page(pcinp, 0, &buf_inp); - pinp = buf_inp.buffer; + slot = XHCI_GET_CTX(sc, xhci_input_dev_ctx, ctx_slot, buf_inp.buffer); rh_port = 0; route = 0; @@ -2655,7 +2604,7 @@ xhci_configure_device(struct usb_device *udev) if (is_hub) temp |= XHCI_SCTX_0_HUB_SET(1); - xhci_ctx_set_le32(sc, &pinp->ctx_slot.dwSctx0, temp); + slot->dwSctx0 = htole32(temp); temp = XHCI_SCTX_1_RH_PORT_SET(rh_port); @@ -2664,7 +2613,7 @@ xhci_configure_device(struct usb_device *udev) sc->sc_hw.devs[index].nports); } - xhci_ctx_set_le32(sc, &pinp->ctx_slot.dwSctx1, temp); + slot->dwSctx1 = htole32(temp); temp = XHCI_SCTX_2_IRQ_TARGET_SET(0); @@ -2690,7 +2639,7 @@ xhci_configure_device(struct usb_device *udev) break; } - xhci_ctx_set_le32(sc, &pinp->ctx_slot.dwSctx2, temp); + slot->dwSctx2 = htole32(temp); /* * These fields should be initialized to zero, according to @@ -2699,10 +2648,10 @@ xhci_configure_device(struct usb_device *udev) temp = XHCI_SCTX_3_DEV_ADDR_SET(0) | XHCI_SCTX_3_SLOT_STATE_SET(0); - xhci_ctx_set_le32(sc, &pinp->ctx_slot.dwSctx3, temp); + slot->dwSctx3 = htole32(temp); #ifdef USB_DEBUG - xhci_dump_device(sc, &pinp->ctx_slot); + xhci_dump_device(slot); #endif usb_pc_cpu_flush(pcinp); @@ -2731,7 +2680,7 @@ xhci_alloc_device_ext(struct usb_device *udev) pc->tag_parent = sc->sc_bus.dma_parent_tag; if (usb_pc_alloc_mem(pc, pg, sc->sc_ctx_is_64_byte ? - (2 * sizeof(struct xhci_dev_ctx)) : + sizeof(struct xhci_dev_ctx64) : sizeof(struct xhci_dev_ctx), XHCI_PAGE_SIZE)) goto error; @@ -2744,7 +2693,7 @@ xhci_alloc_device_ext(struct usb_device *udev) pc->tag_parent = sc->sc_bus.dma_parent_tag; if (usb_pc_alloc_mem(pc, pg, sc->sc_ctx_is_64_byte ? - (2 * sizeof(struct xhci_input_dev_ctx)) : + sizeof(struct xhci_input_dev_ctx64) : sizeof(struct xhci_input_dev_ctx), XHCI_PAGE_SIZE)) { goto error; } @@ -3792,7 +3741,7 @@ xhci_get_endpoint_state(struct usb_device *udev, uint8_t epno) struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); struct usb_page_search buf_dev; struct xhci_hw_dev *hdev; - struct xhci_dev_ctx *pdev; + struct xhci_endp_ctx *endp; uint32_t temp; MPASS(epno != 0); @@ -3800,10 +3749,11 @@ xhci_get_endpoint_state(struct usb_device *udev, uint8_t epno) hdev = &sc->sc_hw.devs[udev->controller_slot_id]; usbd_get_page(&hdev->device_pc, 0, &buf_dev); - pdev = buf_dev.buffer; + endp = XHCI_GET_CTX(sc, xhci_dev_ctx, ctx_ep[epno - 1], + buf_dev.buffer); usb_pc_cpu_invalidate(&hdev->device_pc); - temp = xhci_ctx_get_le32(sc, &pdev->ctx_ep[epno - 1].dwEpCtx0); + temp = le32toh(endp->dwEpCtx0); return (XHCI_EPCTX_0_EPSTATE_GET(temp)); } diff --git a/sys/dev/usb/controller/xhci.h b/sys/dev/usb/controller/xhci.h index d98df2bdf512..4701e62ba3e5 100644 --- a/sys/dev/usb/controller/xhci.h +++ b/sys/dev/usb/controller/xhci.h @@ -111,6 +111,11 @@ struct xhci_slot_ctx { volatile uint32_t dwSctx7; }; +struct xhci_slot_ctx64 { + struct xhci_slot_ctx ctx; + volatile uint8_t padding[32]; +}; + struct xhci_endp_ctx { volatile uint32_t dwEpCtx0; #define XHCI_EPCTX_0_EPSTATE_SET(x) ((x) & 0x7) @@ -156,6 +161,11 @@ struct xhci_endp_ctx { volatile uint32_t dwEpCtx7; }; +struct xhci_endp_ctx64 { + struct xhci_endp_ctx ctx; + volatile uint8_t padding[32]; +}; + struct xhci_input_ctx { #define XHCI_INCTX_NON_CTRL_MASK 0xFFFFFFFCU volatile uint32_t dwInCtx0; @@ -170,17 +180,33 @@ struct xhci_input_ctx { volatile uint32_t dwInCtx7; }; +struct xhci_input_ctx64 { + struct xhci_input_ctx ctx; + volatile uint8_t padding[32]; +}; + struct xhci_input_dev_ctx { struct xhci_input_ctx ctx_input; struct xhci_slot_ctx ctx_slot; struct xhci_endp_ctx ctx_ep[XHCI_MAX_ENDPOINTS - 1]; }; +struct xhci_input_dev_ctx64 { + struct xhci_input_ctx64 ctx_input; + struct xhci_slot_ctx64 ctx_slot; + struct xhci_endp_ctx64 ctx_ep[XHCI_MAX_ENDPOINTS - 1]; +}; + struct xhci_dev_ctx { struct xhci_slot_ctx ctx_slot; struct xhci_endp_ctx ctx_ep[XHCI_MAX_ENDPOINTS - 1]; } __aligned(XHCI_DEV_CTX_ALIGN); +struct xhci_dev_ctx64 { + struct xhci_slot_ctx64 ctx_slot; + struct xhci_endp_ctx64 ctx_ep[XHCI_MAX_ENDPOINTS - 1]; +} __aligned(XHCI_DEV_CTX_ALIGN); + struct xhci_stream_ctx { volatile uint64_t qwSctx0; #define XHCI_SCTX_0_DCS_GET(x) ((x) & 0x1) From nobody Sun Apr 30 06:58:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HH118jyz48sJp; Sun, 30 Apr 2023 06:58: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 4Q8HH0511Hz3NDq; Sun, 30 Apr 2023 06:58:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q9PqZPblq84cRhuydX+/EMMzyrpJEzr81Sf+yb6CH84=; b=OJesznYqEK7uSl5bWgXkRynmxJC9GDUOkva5nWQd1YCACDL5fkYDqDmpLsr59c+vn4ny2p 6rbRSA405DM/8Zh9HdKNeM7a3f3RrlEDcbkzV31VSEI9JhJ8as4h6WnKjSgFRbcSYmw+Pd PiUPdw/hlz4Fihy/8C8UMaFPT2SqhFKpgcS/Y2x5tWxKOGg270D5DEztivhPPH18+7lvrv I61meZHLNVc7RsssMTQa7FyQOY/K9Jj7DN1wM+AZeOTNcWaASepajZ2NAGcKegpHK8IEb4 34PLrwBYJX1sOZ+PdGvkiZfl3+WKL3WwOKypg+B9rprIbHfJrGSMJ5yKkCqXbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q9PqZPblq84cRhuydX+/EMMzyrpJEzr81Sf+yb6CH84=; b=eHriEpWejZMTtac/mVphUMU3DJ4xY5/xIrwD/mszG4o20l1qejK9luKjke9CyHg3nWusu9 Ii3PTBYd+LLqD8L+w2KYMWgggtXfiirhK2mFzitmB42/Pj5VcGmkxsDBmVC449TJujPxYc y8us04NhEhGVtNhygvY61Y3s5QIJknrfgUEQTvyLoN1jNV2lUe0WhP6bgZcoQy72liUDLj StV2kpQBTpzvtnEwIzNNX58ARpJTfUu/aqMxgiExp+1x69K6dlR5uEgCKwVRU7NV5GZj0x 5Q1m9N+R2Fp1IsE2CTzo/g5rJMMbv46AeYfiAxVlt2lgcntS5wVlY2lVo11g0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837884; a=rsa-sha256; cv=none; b=cOiAZ+5N+OWO+QcHf3H5cclgYVMmvSGrj8yvJCm/hOszURT9dZ1tvIwTK9UEHPQkP/pQFu tGylyMNntcVBkMYGE9IgzKP0dKKp4L7bmhxrk87LW7l8sp3PpdOPg4l7wZ9IdFKC4zHBMT 9ra/7XcbuENpLdJ/5bKWv2u5/o9WplpCOuoqnq1f2By1ppxbr0PVGalt9IjcwqrA34RR3d kIdMQZVFhg42hyvJXfNJcPDsv0lK1jgeWxzSbtX9hY8p965G5xAtZwylWphOiPC0vzLYSP ZxxY515Xih7JietM1FwBtKFuLsC86CHSHqf77tbfBkuzb/0sRHCl1GyJHmuRvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HH03l3HzDsw; Sun, 30 Apr 2023 06:58:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6w49O071744; Sun, 30 Apr 2023 06:58:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6w4gG071743; Sun, 30 Apr 2023 06:58:04 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:58:04 GMT Message-Id: <202304300658.33U6w4gG071743@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 00e2c99eb73a - stable/13 - wsp: Add sysctl tunable for Z-Axis inversion List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 00e2c99eb73aca5e46940c7993631314d485713a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=00e2c99eb73aca5e46940c7993631314d485713a commit 00e2c99eb73aca5e46940c7993631314d485713a Author: Vladimir Kondratyev AuthorDate: 2021-02-08 21:26:42 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:18 +0000 wsp: Add sysctl tunable for Z-Axis inversion This adds a new sysctl to Wellspring Touchpad driver for controlling Z-Axis (2-finger vertical scroll) direction "hw.usb.wsp.z_invert". Submitted by: James Wright Reviewed by: wulf PR: 253321 Differential revision: https://reviews.freebsd.org/D28521 (cherry picked from commit d8c6d4c7321d4c969216bda8f792b45ed00afd64) --- share/man/man4/wsp.4 | 7 ++++++- sys/dev/usb/input/wsp.c | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/share/man/man4/wsp.4 b/share/man/man4/wsp.4 index 70a1219533dc..847c79c71f29 100644 --- a/share/man/man4/wsp.4 +++ b/share/man/man4/wsp.4 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 15, 2018 +.Dd February 9, 2021 .Dt WSP 4 .Os .Sh NAME @@ -67,6 +67,11 @@ Pointer sensitivity can be controlled using the sysctl tunable Tap to left-click can be controlled using the sysctl tunable .Nm hw.usb.wsp.enable_single_tap_clicks , set to 0 to disable single tap clicks or 1 to enable them (default). +Z-Axis sensitivity can be controlled using the sysctl tunable +.Nm hw.usb.wsp.z_factor . +Z-Axis inversion can be controlled using the sysctl tunable +.Nm hw.usb.wsp.z_invert , +set to 0 to disable (default) or 1 to enable inversion. .Sh FILES .Nm creates a blocking pseudo-device file, diff --git a/sys/dev/usb/input/wsp.c b/sys/dev/usb/input/wsp.c index b1492f1f4c0c..c2da3df598c5 100644 --- a/sys/dev/usb/input/wsp.c +++ b/sys/dev/usb/input/wsp.c @@ -95,6 +95,7 @@ SYSCTL_INT(_hw_usb_wsp, OID_AUTO, debug, CTLFLAG_RWTUN, static struct wsp_tuning { int scale_factor; int z_factor; + int z_invert; int pressure_touch_threshold; int pressure_untouch_threshold; int pressure_tap_threshold; @@ -105,6 +106,7 @@ static struct wsp_tuning { { .scale_factor = 12, .z_factor = 5, + .z_invert = 0, .pressure_touch_threshold = 50, .pressure_untouch_threshold = 10, .pressure_tap_threshold = 120, @@ -117,6 +119,7 @@ wsp_runing_rangecheck(struct wsp_tuning *ptun) { WSP_CLAMP(ptun->scale_factor, 1, 63); WSP_CLAMP(ptun->z_factor, 1, 63); + WSP_CLAMP(ptun->z_invert, 0, 1); WSP_CLAMP(ptun->pressure_touch_threshold, 1, 255); WSP_CLAMP(ptun->pressure_untouch_threshold, 1, 255); WSP_CLAMP(ptun->pressure_tap_threshold, 1, 255); @@ -128,6 +131,8 @@ SYSCTL_INT(_hw_usb_wsp, OID_AUTO, scale_factor, CTLFLAG_RWTUN, &wsp_tuning.scale_factor, 0, "movement scale factor"); SYSCTL_INT(_hw_usb_wsp, OID_AUTO, z_factor, CTLFLAG_RWTUN, &wsp_tuning.z_factor, 0, "Z-axis scale factor"); +SYSCTL_INT(_hw_usb_wsp, OID_AUTO, z_invert, CTLFLAG_RWTUN, + &wsp_tuning.z_invert, 0, "enable Z-axis inversion"); SYSCTL_INT(_hw_usb_wsp, OID_AUTO, pressure_touch_threshold, CTLFLAG_RWTUN, &wsp_tuning.pressure_touch_threshold, 0, "touch pressure threshold"); SYSCTL_INT(_hw_usb_wsp, OID_AUTO, pressure_untouch_threshold, CTLFLAG_RWTUN, @@ -1226,7 +1231,7 @@ wsp_intr_callback(struct usb_xfer *xfer, usb_error_t error) dx = dy = 0; if (sc->dz_count == 0) - dz = sc->dz_sum / tun.z_factor; + dz = (sc->dz_sum / tun.z_factor) * (tun.z_invert ? -1 : 1); if (sc->scr_mode == WSP_SCR_HOR || abs(sc->pos_x[0] - sc->pos_x[1]) > MAX_DISTANCE || abs(sc->pos_y[0] - sc->pos_y[1]) > MAX_DISTANCE) From nobody Sun Apr 30 06:58:05 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HH21vyrz48sJq; Sun, 30 Apr 2023 06:58: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 4Q8HH15m7Jz3NN5; Sun, 30 Apr 2023 06:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4E6vmzzkE7k7nxpouVdBhmTC2VmaUUrBD40NNilZD/g=; b=OPPobscAXwQmEXcpXZqRvWYzVs/xIIIKP5/+UpOnqQVDoKS05TzLeROALtZI/kQU5Tj+9I AbZpEg0GnxBAmKMjnk7dbW9eKZS36tn5V1+pgqMRRdM/nkO+Nwlq7Y5LowlJXcs6jsDT0j WxSrQlAyIU+V16VqKGR7RH2c9JQk8KSCcPOYVa+ukW4QstBsZr++rFoVLdoFlvX1+pQJZs +pKDDFQH8EsalVW4hV68xHde9OUSOzWpeF5lj6LISYRmfiNjdKe2Ons5G1dAWIscunV3Fy XDR4opz3d5k7sCGsbmcPZ8aszSjMEMGFfG/RW+K1rS3xvl77xhfh6Gm2pP4F6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4E6vmzzkE7k7nxpouVdBhmTC2VmaUUrBD40NNilZD/g=; b=Y7m1zDZtjlKyV5nfWyHq7WOOicFtpeFt2GAAloGS05jAPMfFbwjwERIlFYV5/WmUAhSRnp Rf4ocI/Xmv7/3gcobQ96xpZEX3OB1vLoyc37frtc1EgD9tG1RMlYEReOqR6z5i+7RzAAp+ qwBAbL6VeLKXi9LAb4wuPX7QWH0e9KLIaZANGFyByzngbAP2DUiM+5HFpYeeTDv/zcZWAI 0vrbAfK19tav7SiHM3SVhjHgylU4c5EnGEIGlgEUNRkcy5fb4f3XkCjwWItZ954tfW9YzM rrbJgi7LH8hfbYal5OzVwb1ddafqsmRctdndYRmfiz3xKArV8XZP9paktX2OYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837885; a=rsa-sha256; cv=none; b=GhhCSSSKMDmCkSMOpj4PBrbBAbfk4bYNXMaH+1fs0ARS475JWDLhMXHC/ze0rMlRpLTxDU 59cVM0/Z4TX0g8kapJqbNOto841vvBSMRBP7y+33OgghNfij/fUaBlhoWyvGHBzJd6/ZuW ZWRnaGFAdhuDeeHvyuNroR3oTZwJ6GOOTqzQ5mJQznOLOs65CxbvBzk4iDqg3dPKjdPVZF JsK32D1Xn9MyNrRHpTh2dYIWiSDr3URf1yeaWrbQZ5HjQpvdRZAlVbaWdilDVErBiHWthP zsh+elAIwYiJCTkmdXpNgBcXNKN/poVN8FhMskc+qxSAyyHhcY35vf9+SlMzZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HH14qF6z1Crj; Sun, 30 Apr 2023 06:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6w5Or071766; Sun, 30 Apr 2023 06:58:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6w5Fh071764; Sun, 30 Apr 2023 06:58:05 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:58:05 GMT Message-Id: <202304300658.33U6w5Fh071764@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: fa65f958847d - stable/13 - Make sure the uftdi(4) driver doesn't start a USB transfer when being cancelled. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fa65f958847ddb89639b6502286607c774015dea Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=fa65f958847ddb89639b6502286607c774015dea commit fa65f958847ddb89639b6502286607c774015dea Author: Hans Petter Selasky AuthorDate: 2021-08-18 09:41:49 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:18 +0000 Make sure the uftdi(4) driver doesn't start a USB transfer when being cancelled. Sponsored by: NVIDIA Networking (cherry picked from commit 8a46f021c2408c82375a1f5127efb7ac6b78596e) --- sys/dev/usb/serial/uftdi.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sys/dev/usb/serial/uftdi.c b/sys/dev/usb/serial/uftdi.c index d57a2c5dbc45..5118a3affb84 100644 --- a/sys/dev/usb/serial/uftdi.c +++ b/sys/dev/usb/serial/uftdi.c @@ -1213,14 +1213,9 @@ uftdi_write_callback(struct usb_xfer *xfer, usb_error_t error) DPRINTFN(3, "\n"); switch (USB_GET_STATE(xfer)) { - default: /* Error */ - if (error != USB_ERR_CANCELLED) { - /* try to clear stall first */ - usbd_xfer_set_stall(xfer); - } - /* FALLTHROUGH */ case USB_ST_SETUP: case USB_ST_TRANSFERRED: +tr_setup: /* * If output packets don't require headers (the common case) we * can just load the buffer up with payload bytes all at once. @@ -1255,6 +1250,13 @@ uftdi_write_callback(struct usb_xfer *xfer, usb_error_t error) usbd_transfer_submit(xfer); } break; + default: /* Error */ + if (error != USB_ERR_CANCELLED) { + /* try to clear stall first */ + usbd_xfer_set_stall(xfer); + goto tr_setup; + } + break; } } From nobody Sun Apr 30 06:58:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HH30bGYz48s8J; Sun, 30 Apr 2023 06:58: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 4Q8HH26qWCz3NQc; Sun, 30 Apr 2023 06:58:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CxdF1aLH3lsilAHT+7ZqOd6/7fTN5XIEzBTK9WIFXok=; b=D+YAusG7rjCaqHYQbyja5gGP3D+pHje8nW9dF2Fp+NmrU02FC0Io1wCtFkTcGgp+Z2W2u6 rtUfHScd7a0XpZpuhpvQKMJ9OwTZjZHz9BUS0LZUCoMkYTJFXVB581WDx6eha5lt4fVWFt IYXjyOu9kV5mWxLG6B9lic0Mib5eV9znJXhk4FTtfrs90SgdyE/hYFbFniWWtGnlDoJeff EBNj+ms19xSjQ1LKjkdHmR4edYr7Uz0k9/jjuDIGe+IXqYUMPd3GIZ+CC3JEydv+x3/2YY 4tv9R+ITkluSqrk5nrLTnIYKerSDwQBHedljMxRTCNQEZl/wiDtAjgr0M9Ke4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CxdF1aLH3lsilAHT+7ZqOd6/7fTN5XIEzBTK9WIFXok=; b=lIXmGu1T4PGaMWgeNIfrQvH7JeiqrEyKyBdnA/gc7DcasV9444wj7h5+v7QJZKRGe5WT+C MFMghcFIuIbVYlI+D9Ro/hZZm817hgXI0P+flyFTkOx0G8oIL4NBTl/TSFLzjfNzZsu92v i1n0G22V/K3O18VPwKvYlEbmgZnzjGIUajb5a5O1JZoPFqSCjiuFO3GbqHAmi5gnkx+QP1 rGPFgZhCmNO7rdUbQyp/3rGpohEy7etgprcEKSiPnpIdDAWu/qbCTY7wBpTU50hniaIGkv w/F/47z/mNs3zMhnKbbXefJWl+xU6PuqPW2k5ylzr4dB9aTsOC67MQCA7XN9hw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837887; a=rsa-sha256; cv=none; b=W6ItyinETBMJu6OrzSecYc6vcrvBDQNhnVm3gxoFQ3v1oTviHTaz9wbKEFi19xaiBEiVWU 6iOnb/2nHzC03xUPtcO1sQonurSTAQeHxVcFxkCFoSur82g63Hu8D4wse6tU5SKMNoNVZ5 2/lVeLAD2GyYiNkvVBL1i0QDbPOrXKlD0/7+gfH7dxKW6aGXU9hsvYuyJnzptIOYeBNrBe 9CEsVxJEnixtICFVKi0ndwrJajBKVkVh/+7y243y/IFnatT4r33rtD2sfhJNEc5Eu/uV0q myrhq3AA648cERFo3xB9TjXGMzqc2CbrHcgM1j4X4FS8aVZxRrHBHKrxLbs4LA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HH25wQnz1CvH; Sun, 30 Apr 2023 06:58:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6w6Yw071788; Sun, 30 Apr 2023 06:58:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6w6Vk071787; Sun, 30 Apr 2023 06:58:06 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:58:06 GMT Message-Id: <202304300658.33U6w6Vk071787@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 3890a6eb01c1 - stable/13 - ulpt(4): Add support for Epson TM-U220B. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3890a6eb01c159b8199cee296078863a468a3f22 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=3890a6eb01c159b8199cee296078863a468a3f22 commit 3890a6eb01c159b8199cee296078863a468a3f22 Author: Hans Petter Selasky AuthorDate: 2022-04-02 00:27:48 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:18 +0000 ulpt(4): Add support for Epson TM-U220B. Submitted by: Archimedes Gaviola Sponsored by: NVIDIA Networking (cherry picked from commit 88162f7abd61206c98432f2c0de869a59be13854) --- sys/dev/usb/serial/ulpt.c | 13 +++++++++++-- sys/dev/usb/usbdevs | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sys/dev/usb/serial/ulpt.c b/sys/dev/usb/serial/ulpt.c index c566da924374..935dc992c6c2 100644 --- a/sys/dev/usb/serial/ulpt.c +++ b/sys/dev/usb/serial/ulpt.c @@ -499,6 +499,13 @@ static const STRUCT_USB_HOST_ID ulpt_devs[] = { {USB_IFACE_CLASS(UICLASS_PRINTER), USB_IFACE_SUBCLASS(UISUBCLASS_PRINTER), USB_IFACE_PROTOCOL(UIPROTO_PRINTER_1284)}, + + /* Epson printer */ + {USB_VENDOR(USB_VENDOR_EPSON), + USB_PRODUCT(USB_PRODUCT_EPSON_TMU220B), + USB_IFACE_CLASS(UICLASS_VENDOR), + USB_IFACE_SUBCLASS(UISUBCLASS_VENDOR), + USB_IFACE_PROTOCOL(UIPROTO_PRINTER_BI)}, }; static int @@ -555,8 +562,10 @@ ulpt_attach(device_t dev) break; } else { alt_index++; - if ((id->bInterfaceClass == UICLASS_PRINTER) && - (id->bInterfaceSubClass == UISUBCLASS_PRINTER) && + if ((id->bInterfaceClass == UICLASS_PRINTER || + id->bInterfaceClass == UICLASS_VENDOR) && + (id->bInterfaceSubClass == UISUBCLASS_PRINTER || + id->bInterfaceSubClass == UISUBCLASS_VENDOR) && (id->bInterfaceProtocol == UIPROTO_PRINTER_BI)) { goto found; } diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index fb282568935f..bab6d835d417 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1949,6 +1949,7 @@ product EPSON 1270 0x0120 Perfection 1270 scanner product EPSON 2480 0x0121 Perfection 2480 scanner product EPSON 3590 0x0122 Perfection 3590 scanner product EPSON 4990 0x012a Perfection 4990 Photo scanner +product EPSON TMU220B 0x0202 TM-U220B product EPSON CRESSI_EDY 0x0521 Cressi Edy diving computer product EPSON N2ITION3 0x0522 Zeagle N2iTion3 diving computer product EPSON STYLUS_875DC 0x0601 Stylus Photo 875DC Card Reader From nobody Sun Apr 30 06:58:07 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HH41CRmz48sRh; Sun, 30 Apr 2023 06:58:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8HH40njqz3NG0; Sun, 30 Apr 2023 06:58:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mmEqbQ6IcXtzazV75d7klQtqmLgyBra9Gs4qOnAwapA=; b=eVmxk3VJpdKXhOiyn12efPfqEmdA8u/ULDYZa9lbQIrqp2Uex015k7FZHWU3GaNC37emuB zTPv8OE2rRMvaYeK5xZRdumzoJxj3vTBqfvNSHm9orKGLJM4Kj546yEEw69R1RLPSY84A0 xjnV7FBlVGqqYiASlcdbZkvOVUwI19k3woNiILRie1FY3DXV4YF84UG7nbGqAy9eyegnVV 0aqcfU/EDcXoTT8yfMFgCWtdaGTGaJIDyETnE/5KejYrA4H88+9sM5JKMHz8o+VezCKvBB 6M+249RYj1YfSc+ttiGD6+O3WdLsW68zBP+eb7YQnIewTr9SWV6vixkugRqhxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mmEqbQ6IcXtzazV75d7klQtqmLgyBra9Gs4qOnAwapA=; b=CVLAGVKlqqJ38J+LHGxLTaYGN5ZMP34YiwewK8WyCiDWBGALBy2dBmZ2WEeesXDTNzkGl3 uj21TCJa91P/bnhxHseHbm9EsZBFLvOKe0vYglgGQxUylQB3NQZ9smmZwIV1pmEj3mfkB7 lC4rBh31iJnxQPxt2fykbaJidOF07TbHcNP+Wl+cRZ6okZySOjteSKxPo1+LLHbgrG7srG QP+LbrVbH0ZrgyZdQ6eZUG59WMrqEoa+kx/XH9TGk+n/9Hv+tSYkWD+uAi7/MM02EeB9xz SlZoKSbVB09lp1Z3ACYa5tKzypa78Aj6WPqXjXC8q4JYo+Ogd6CWf1Nm1qZQIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837888; a=rsa-sha256; cv=none; b=qa4WItYFFgOX9NO8Gee4BHR20nK2WIY6BBbevcbYRT1Jm2I8RZdOYKE99N9fPMdS6G7dRs uD8Yu7xaFIlaoB1iIciuJqmr36vAeljw2/+uYQOOiiVSYLhHxSxaBmOEH/0iUuhr4vnJSX MAIvI8WbsVDmUVTQmlM5LD6826xEjqbl0hdvH5HbFVmKtc8YLLJAGtLyGKysRD+5QyzO1o dgu/TGmFAGwQ8UrY8swOrMPacP1NpWACJNVPSE/8qexTeWf97AqtWsIVDbJR/huzLygDU0 0njXa9WL8568STFpNCDVKLurCRc/sBR9nsCtOU5KGj3paX+9Cs8HH5vDtwnupg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HH36wHQzDr8; Sun, 30 Apr 2023 06:58:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6w7JF071807; Sun, 30 Apr 2023 06:58:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6w7dK071806; Sun, 30 Apr 2023 06:58:07 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:58:07 GMT Message-Id: <202304300658.33U6w7dK071806@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 9529b980ed39 - stable/13 - usb: tiny formatting nit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9529b980ed39a7d3a86e8b4af96fb8c8c57288ec Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=9529b980ed39a7d3a86e8b4af96fb8c8c57288ec commit 9529b980ed39a7d3a86e8b4af96fb8c8c57288ec Author: Warner Losh AuthorDate: 2021-03-11 15:23:32 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:18 +0000 usb: tiny formatting nit Format 300 baud like all the others here. No functional change. (cherry picked from commit 1645a4ae645fa9b9e3571b7512caa92e73b20635) --- sys/dev/usb/serial/umct.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/serial/umct.c b/sys/dev/usb/serial/umct.c index 43f28c307f6d..dd452d38a67b 100644 --- a/sys/dev/usb/serial/umct.c +++ b/sys/dev/usb/serial/umct.c @@ -478,7 +478,8 @@ static uint8_t umct_calc_baud(uint32_t baud) { switch (baud) { - case B300:return (0x1); + case B300: + return (0x1); case B600: return (0x2); case B1200: From nobody Sun Apr 30 06:58:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HH54fk7z48sMQ; Sun, 30 Apr 2023 06:58: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 4Q8HH51h1Lz3NTR; Sun, 30 Apr 2023 06:58:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rOz8NHIOk6xK5jo5zF9WOUNZ7pucYq0ay2z6hXO5bAE=; b=lW4ZOui1MTT7wa7TLQlUGswkhJPS3C4sTJoJ3GCvDVUK6ubA6bD86OaGWRPZvsykwuYnP8 zLxY30aqTzUG/jLAyiuroz+KWe7HF68BW5tPM/Hd+r7RLD6gylER95G9TxSnNzRuqwChZz ysQdwKzIxTgvM+i3pHnsDBxRQTXAUtK6iqSmmXmWLpMMmHDfTOG6LT+sYLZJ4Jbmo9MEhP l2dRc80D8hrUYjs0NRYBQHyaKFTnTk5XNDrFMyTSVakndHwkGynOt8YTVN8n97ICk9UOFP NXFhvy42Q13STySW0kAnz7BPuDzT1d9U3oaM7civsY4ZrrSUBjo2CiOkluyMSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rOz8NHIOk6xK5jo5zF9WOUNZ7pucYq0ay2z6hXO5bAE=; b=pzbZHudiGy1AdwJXuxBjO7FgQ65OzVa4gu8wqBsu85uJ4vzm4qOcheCmQzxvTG3GRYTj0b 6yv4ivRog2tvpEgDxe5f2MD+fbqAuponAkeJ0hCOQnoOvaeYbEl2t61c5iYJklUDknv37+ rLdPkEzb5yadLJcWVxUeNhamjZZDiS8TF3JzMpsCwOKnG/54uil8JFczJq+3ziak6W0gVV FfWO3Rj0ZYYMcFcXOWaOzQytgmqqvsbf5VPAyKgBCOba6r33iV1O0ibU/pKDE/edD6qPXS DbnLorq9tRZImVjCiJksP6IlHXMeoequUSUj3Mn1dOaPGg2iU8ugy9TrLob0wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837889; a=rsa-sha256; cv=none; b=mBvI1QLXg1EopD1K/KcgqmmzzKYC16zK6B5SgabCmuD3B6M1SDttmVDLJv1U8yq4I0FFZZ uomH8/ZsvdyG9uArXWB2r+2vZH8+P/IPNd8dP5W8LvYy992fDLOJHYflLZtAPxnKkZbjVV ughUAoYnKLJb06MFuqh7XvK5o5lr9gtuKKDvLuRQNUm9IzfJWwbcDs+ZV7uvTZ75rf+kMm KP+UpN737MhuzQDihhmyvnwjY/w4Oqc4iqBqfsZYD6omJ/WNu051Ha7p9Hn4uA3GEJovfD w1TKydPG/T9KqBUooAwavRMOynnjYzboqOMupeVBw2F1XUE3hoyL+pPNaS44AA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HH50mkqzDhT; Sun, 30 Apr 2023 06:58:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6w9b6071828; Sun, 30 Apr 2023 06:58:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6w9Qn071827; Sun, 30 Apr 2023 06:58:09 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:58:09 GMT Message-Id: <202304300658.33U6w9Qn071827@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: fbedcad985b5 - stable/13 - Implement an API for sending a zero-length-packet. The purpose of such a USB packet is to toggle the binary packet counter for USB 1.0/2.0 protocols, without sending any data, so that the first packet sent after opening a USB BULK endpoint doesn't get lost. This is for devices not supporting the USB standard defined clear-stall handling. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fbedcad985b52481991636a26409d6f55660a3f0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=fbedcad985b52481991636a26409d6f55660a3f0 commit fbedcad985b52481991636a26409d6f55660a3f0 Author: Hans Petter Selasky AuthorDate: 2021-07-06 10:29:57 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:18 +0000 Implement an API for sending a zero-length-packet. The purpose of such a USB packet is to toggle the binary packet counter for USB 1.0/2.0 protocols, without sending any data, so that the first packet sent after opening a USB BULK endpoint doesn't get lost. This is for devices not supporting the USB standard defined clear-stall handling. Tested by: jmg Sponsored by: NVIDIA Networking (cherry picked from commit f83f5d58394db57576bbed6dc7531997cabeb102) (cherry picked from commit ec97e9ca1fa543a4a803e84706564d41cd492065) --- sys/dev/usb/usb_transfer.c | 59 +++++++++++++++++++++++++++++++++++++++++++--- sys/dev/usb/usbdi.h | 3 +++ 2 files changed, 59 insertions(+), 3 deletions(-) diff --git a/sys/dev/usb/usb_transfer.c b/sys/dev/usb/usb_transfer.c index 455b23e2c306..20ed2c897aac 100644 --- a/sys/dev/usb/usb_transfer.c +++ b/sys/dev/usb/usb_transfer.c @@ -2,7 +2,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2008-2021 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -2689,6 +2689,61 @@ usbd_transfer_start_cb(void *arg) } } +/*------------------------------------------------------------------------* + * usbd_xfer_set_zlp + * + * This function sets the USB transfers ZLP flag. + *------------------------------------------------------------------------*/ +void +usbd_xfer_set_zlp(struct usb_xfer *xfer) +{ + if (xfer == NULL) { + /* tearing down */ + return; + } + USB_XFER_LOCK_ASSERT(xfer, MA_OWNED); + + /* avoid any races by locking the USB mutex */ + USB_BUS_LOCK(xfer->xroot->bus); + xfer->flags.send_zlp = 1; + USB_BUS_UNLOCK(xfer->xroot->bus); +} + +/*------------------------------------------------------------------------* + * usbd_xfer_get_and_clr_zlp + * + * This function gets and clears the USB transfers ZLP flag and + * queues a zero-length USB transfer if the flag was set. + *------------------------------------------------------------------------*/ +uint8_t +usbd_xfer_get_and_clr_zlp(struct usb_xfer *xfer) +{ + uint8_t retval; + + if (xfer == NULL) { + /* tearing down */ + return (0); + } + USB_XFER_LOCK_ASSERT(xfer, MA_OWNED); + + retval = xfer->flags.send_zlp; + + if (retval != 0) { + DPRINTFN(1, "Sending zero-length packet.\n"); + + /* avoid any races by locking the USB mutex */ + USB_BUS_LOCK(xfer->xroot->bus); + xfer->flags.send_zlp = 0; + USB_BUS_UNLOCK(xfer->xroot->bus); + + /* queue up a zero-length packet */ + usbd_xfer_set_frame_len(xfer, 0, 0); + usbd_xfer_set_frames(xfer, 1); + usbd_transfer_submit(xfer); + } + return (retval); +} + /*------------------------------------------------------------------------* * usbd_xfer_set_stall * @@ -2733,9 +2788,7 @@ usbd_transfer_clear_stall(struct usb_xfer *xfer) /* avoid any races by locking the USB mutex */ USB_BUS_LOCK(xfer->xroot->bus); - xfer->flags.stall_pipe = 0; - USB_BUS_UNLOCK(xfer->xroot->bus); } diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h index 1b3b4af5f717..287e40d59364 100644 --- a/sys/dev/usb/usbdi.h +++ b/sys/dev/usb/usbdi.h @@ -218,6 +218,7 @@ struct usb_xfer_flags { * option only has effect for * ISOCHRONOUS transfers. */ + uint8_t send_zlp:1; /* send a zero length packet first */ }; /* @@ -655,6 +656,8 @@ void usbd_xfer_set_frame_len(struct usb_xfer *xfer, usb_frcount_t frindex, usb_frlength_t len); void usbd_xfer_set_timeout(struct usb_xfer *xfer, int timeout); void usbd_xfer_set_frames(struct usb_xfer *xfer, usb_frcount_t n); +void usbd_xfer_set_zlp(struct usb_xfer *xfer); +uint8_t usbd_xfer_get_and_clr_zlp(struct usb_xfer *xfer); void usbd_xfer_set_stall(struct usb_xfer *xfer); int usbd_xfer_is_stalled(struct usb_xfer *xfer); void usbd_xfer_set_flag(struct usb_xfer *xfer, int flag); From nobody Sun Apr 30 06:58:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HH63Y54z48sMW; Sun, 30 Apr 2023 06:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8HH629H2z3NTf; Sun, 30 Apr 2023 06:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iozWvq3i5I4UB/+RQM8vTqyNTD3NHEd4uteijFE7TsI=; b=to4qou1pYEx3p0JWMRwJrh0tPf8qKVuS0L2WurgzfUHyenJMMewU/RwuHaWaxDovV5hsqD HQeX8kMb72HDmitrZbGqMXwPlNcdV2nal6767PYIpnBam03N67B5GR/9wbd6ideI/0N66l hRjPWRAL4IY6/0n2n2SpB9eWewFVx3xIlixU6SfhbnhM90p0H0yLa3s9Z0BwU4sHwJSNUe xJNBY2oALSrmbfytT+RpJJZjP5apOeCR/z8eHJjlrubp7VdPRG5c29Mi98VWjaY0KO0c3a Z4qUlPoJyxbMZ6vD9ErADBoZSxYCCw+a9L1YjosaD6mkKQpPsCpCEiZh8w2xOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iozWvq3i5I4UB/+RQM8vTqyNTD3NHEd4uteijFE7TsI=; b=hIBvcs14mxlrXyKmLfuuIHojxFSGhUEoVZj8ZNZ6/67Vc46bq5KKlwKhq7LmUlB6CtLtCb 6FBemghUztpP5muaLE+BnrX3zLDeXnzcyc3GMPn2IZiX1LO8hR0YTGJKjCamUw+wsdsSwn DvH8KkXekVfadkE+5QENr5bpS08jrAITpqrnKeqmeLBtA/Ybl+dMppwNIXj4v6hZkZN3by wXB+dZsTaeCOTJ0q4yGvkof9wAfKSu5MSAJR6nrb25L2FJRKgK5o6cGWfA9tZBHKo/Fedx scEW1hlj6rEZMPO6S3WAog91g4kWySGp7ilubkst1yzJNg6RSKMW3TDJRO7RaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837890; a=rsa-sha256; cv=none; b=TuE77cOnO2QprcrXDB55BalCcqr67IZ/GCBjyB7H+LcbBQgpgSAbbWtWo0j/g2uDKRbGZ2 cdZ0Yx1GBubow+/aaXGeeR7363VjdmVJxLm0U6W5xQSwgcrL74gzGNr1RyeO0rA9HWBs11 vHYMIh3R/8iM5Tgdt6BCOnpB7u5xXhwljiPEDPBeMkmEEAR8rbPuzePzuLVG3atFn6hVFx 2h+SC/lUluQlfHvLddn5mH8qgBzQhifvhUEw+jtfxDJWtNAB6i25TY71usaaQdTsVI3FE+ kS5jp4tFqsgCt4evH6Co7nNEH2vfAk7q+x23kNeG1JjeGLOqrx9JqF3OxQBAbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HH619HBzDr9; Sun, 30 Apr 2023 06:58:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6wAh0071848; Sun, 30 Apr 2023 06:58:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6wAMt071847; Sun, 30 Apr 2023 06:58:10 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:58:10 GMT Message-Id: <202304300658.33U6wAMt071847@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 61dd6a2ea1aa - stable/13 - mlx5: Implement diagostic counters as sysctl(8) nodes. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 61dd6a2ea1aa6349598bb1cc09976a4c76109ce7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=61dd6a2ea1aa6349598bb1cc09976a4c76109ce7 commit 61dd6a2ea1aa6349598bb1cc09976a4c76109ce7 Author: Hans Petter Selasky AuthorDate: 2023-04-18 11:38:59 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:18 +0000 mlx5: Implement diagostic counters as sysctl(8) nodes. Sponsored by: NVIDIA Networking (cherry picked from commit aa7bbdabde890676d54a22eeec3af9b7681d19b7) --- sys/conf/files | 2 + sys/dev/mlx5/driver.h | 22 ++ sys/dev/mlx5/mlx5_core/diag_cnt.h | 43 +++ sys/dev/mlx5/mlx5_core/mlx5_diag_cnt.c | 579 +++++++++++++++++++++++++++++++++ sys/dev/mlx5/mlx5_core/mlx5_main.c | 14 +- sys/dev/mlx5/mlx5_ifc.h | 36 ++ sys/modules/mlx5/Makefile | 1 + 7 files changed, 696 insertions(+), 1 deletion(-) diff --git a/sys/conf/files b/sys/conf/files index 2258acd4c9e7..5546925bccd8 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4952,6 +4952,8 @@ dev/mlx5/mlx5_core/mlx5_cmd.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_cq.c optional mlx5 pci \ compile-with "${OFED_C}" +dev/mlx5/mlx5_core/mlx5_diag_cnt.c optional mlx5 pci \ + compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_diagnostics.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_eq.c optional mlx5 pci \ diff --git a/sys/dev/mlx5/driver.h b/sys/dev/mlx5/driver.h index 6d3a3be6562e..e1766ae8a742 100644 --- a/sys/dev/mlx5/driver.h +++ b/sys/dev/mlx5/driver.h @@ -1,5 +1,6 @@ /*- * Copyright (c) 2013-2019, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2022 NVIDIA corporation & affiliates. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -656,6 +657,26 @@ struct mlx5_special_contexts { int resd_lkey; }; +struct mlx5_diag_cnt_id { + u16 id; + bool enabled; +}; + +struct mlx5_diag_cnt { +#define DIAG_LOCK(dc) mutex_lock(&(dc)->lock) +#define DIAG_UNLOCK(dc) mutex_unlock(&(dc)->lock) + struct mutex lock; + struct sysctl_ctx_list sysctl_ctx; + struct mlx5_diag_cnt_id *cnt_id; + u16 num_of_samples; + u16 sample_index; + u8 num_cnt_id; + u8 log_num_of_samples; + u8 log_sample_period; + u8 flag; + u8 ready; +}; + struct mlx5_flow_root_namespace; struct mlx5_core_dev { struct pci_dev *pdev; @@ -685,6 +706,7 @@ struct mlx5_core_dev { struct mlx5_priv priv; struct mlx5_profile *profile; atomic_t num_qps; + struct mlx5_diag_cnt diag_cnt; u32 vsc_addr; u32 issi; struct mlx5_special_contexts special_contexts; diff --git a/sys/dev/mlx5/mlx5_core/diag_cnt.h b/sys/dev/mlx5/mlx5_core/diag_cnt.h new file mode 100644 index 000000000000..25c460b19382 --- /dev/null +++ b/sys/dev/mlx5/mlx5_core/diag_cnt.h @@ -0,0 +1,43 @@ +/*- + * Copyright (c) 2018, Mellanox Technologies, Ltd. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS `AS IS' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef __MLX5_DIAG_CNT_H__ +#define __MLX5_DIAG_CNT_H__ + +#include +#include + +#define MLX5_DIAG_CNT_SUPPORTED(mdev) \ + (MLX5_CAP_GEN(mdev, debug) && \ + MLX5_CAP_GEN(mdev, num_of_diagnostic_counters)) + +int mlx5_diag_cnt_init(struct mlx5_core_dev *); +void mlx5_diag_cnt_cleanup(struct mlx5_core_dev *); + +int mlx5_diag_query_params(struct mlx5_core_dev *); +int mlx5_diag_set_params(struct mlx5_core_dev *); +int mlx5_diag_query_counters(struct mlx5_core_dev *, u8 * *out_buffer); + +#endif /* __MLX5_DIAG_CNT_H__ */ diff --git a/sys/dev/mlx5/mlx5_core/mlx5_diag_cnt.c b/sys/dev/mlx5/mlx5_core/mlx5_diag_cnt.c new file mode 100644 index 000000000000..83f8bf2b148f --- /dev/null +++ b/sys/dev/mlx5/mlx5_core/mlx5_diag_cnt.c @@ -0,0 +1,579 @@ +/*- + * Copyright (c) 2018, Mellanox Technologies, Ltd. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS `AS IS' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +static int get_supported_cnt_ids(struct mlx5_core_dev *dev); +static int enable_cnt_id(struct mlx5_core_dev *dev, u16 id); +static void reset_cnt_id(struct mlx5_core_dev *dev); +static void reset_params(struct mlx5_diag_cnt *diag_cnt); + +static int +mlx5_sysctl_counter_id(SYSCTL_HANDLER_ARGS) +{ + struct mlx5_diag_cnt *diag_cnt; + struct mlx5_core_dev *dev; + uint16_t *ptr; + size_t max; + size_t num; + size_t x; + int err; + + dev = arg1; + diag_cnt = &dev->diag_cnt; + + max = MLX5_CAP_GEN(dev, num_of_diagnostic_counters); + + ptr = kmalloc(sizeof(ptr[0]) * max, GFP_KERNEL); + + DIAG_LOCK(diag_cnt); + + for (x = num = 0; x != max; x++) { + if (diag_cnt->cnt_id[x].enabled) + ptr[num++] = diag_cnt->cnt_id[x].id; + } + + err = SYSCTL_OUT(req, ptr, sizeof(ptr[0]) * num); + if (err || !req->newptr) + goto done; + + num = req->newlen / sizeof(ptr[0]); + if (num > max) { + err = ENOMEM; + goto done; + } + + err = SYSCTL_IN(req, ptr, sizeof(ptr[0]) * num); + + reset_cnt_id(dev); + + for (x = 0; x != num; x++) { + err = enable_cnt_id(dev, ptr[x]); + if (err) + goto done; + } + + diag_cnt->num_cnt_id = num; +done: + kfree(ptr); + + if (err != 0 && req->newptr != NULL) + reset_cnt_id(dev); + + DIAG_UNLOCK(diag_cnt); + + return (err); +} + +#define NUM_OF_DIAG_PARAMS 5 + +static int +mlx5_sysctl_params(SYSCTL_HANDLER_ARGS) +{ + struct mlx5_diag_cnt *diag_cnt; + struct mlx5_core_dev *dev; + uint32_t temp[NUM_OF_DIAG_PARAMS]; + int err; + + dev = arg1; + diag_cnt = &dev->diag_cnt; + + DIAG_LOCK(diag_cnt); + + temp[0] = diag_cnt->log_num_of_samples; + temp[1] = diag_cnt->log_sample_period; + temp[2] = diag_cnt->flag; + temp[3] = diag_cnt->num_of_samples; + temp[4] = diag_cnt->sample_index; + + err = SYSCTL_OUT(req, temp, sizeof(temp)); + if (err || !req->newptr) + goto done; + + err = SYSCTL_IN(req, temp, sizeof(temp)); + if (err) + goto done; + + reset_params(&dev->diag_cnt); + + if (temp[0] > MLX5_CAP_DEBUG(dev, log_max_samples) || + (1U << (MLX5_CAP_DEBUG(dev, log_max_samples) - temp[0])) < + diag_cnt->num_cnt_id) { + err = ERANGE; + goto done; + } else if (temp[1] < MLX5_CAP_DEBUG(dev, log_min_sample_period)) { + err = ERANGE; + goto done; + } else if (temp[2] >= 0x100) { + err = ERANGE; + goto done; + } else if (temp[3] > (1U << diag_cnt->log_num_of_samples)) { + err = ERANGE; + goto done; + } else if (temp[4] > (1U << diag_cnt->log_num_of_samples)) { + err = ERANGE; + goto done; + } + + diag_cnt->log_num_of_samples = temp[0]; + diag_cnt->log_sample_period = temp[1]; + diag_cnt->flag = temp[2]; + diag_cnt->num_of_samples = temp[3]; + diag_cnt->sample_index = temp[4]; +done: + DIAG_UNLOCK(diag_cnt); + + return (err); +} + +static void +decode_cnt_buffer(u32 num_of_samples, u8 *out, struct sbuf *sbuf) +{ + void *cnt; + u64 temp; + u32 i; + + for (i = 0; i != num_of_samples; i++) { + cnt = MLX5_ADDR_OF(query_diagnostic_counters_out, + out, diag_counter[i]); + temp = MLX5_GET(diagnostic_cntr_struct, cnt, counter_value_h); + temp = (temp << 32) | + MLX5_GET(diagnostic_cntr_struct, cnt, counter_value_l); + sbuf_printf(sbuf, + "0x%04x,0x%04x,0x%08x,0x%016llx\n", + MLX5_GET(diagnostic_cntr_struct, cnt, counter_id), + MLX5_GET(diagnostic_cntr_struct, cnt, sample_id), + MLX5_GET(diagnostic_cntr_struct, cnt, time_stamp_31_0), + (unsigned long long)temp); + } +} + +static int +mlx5_sysctl_dump_set(SYSCTL_HANDLER_ARGS) +{ + struct mlx5_diag_cnt *diag_cnt; + struct mlx5_core_dev *dev; + uint8_t temp; + int err; + + dev = arg1; + diag_cnt = &dev->diag_cnt; + + DIAG_LOCK(diag_cnt); + + err = SYSCTL_OUT(req, &diag_cnt->ready, sizeof(diag_cnt->ready)); + if (err || !req->newptr) + goto done; + + err = SYSCTL_IN(req, &temp, sizeof(temp)); + if (err) + goto done; + + diag_cnt->ready = (temp != 0); + if (diag_cnt->ready != 0) + err = -mlx5_diag_set_params(dev); +done: + DIAG_UNLOCK(diag_cnt); + + return (err); +} + +static int +mlx5_sysctl_dump_get(SYSCTL_HANDLER_ARGS) +{ + struct mlx5_diag_cnt *diag_cnt; + struct mlx5_core_dev *dev; + struct sbuf sbuf; + u8 *out; + int err; + + dev = arg1; + diag_cnt = &dev->diag_cnt; + + err = sysctl_wire_old_buffer(req, 0); + if (err != 0) + return (err); + + DIAG_LOCK(diag_cnt); + + sbuf_new_for_sysctl(&sbuf, NULL, 65536, req); + + if (diag_cnt->ready != 0) { + err = -mlx5_diag_query_counters(dev, &out); + if (err) { + sbuf_printf(&sbuf, "\nCould not query counters: %d\n", err); + } else { + sbuf_printf(&sbuf, "\n"); + decode_cnt_buffer(diag_cnt->num_of_samples * + diag_cnt->num_cnt_id, out, &sbuf); + kfree(out); + } + } else { + sbuf_printf(&sbuf, "\nDump was not set.\n"); + } + + err = sbuf_finish(&sbuf); + + sbuf_delete(&sbuf); + + DIAG_UNLOCK(diag_cnt); + + return (err); +} + +static int +mlx5_sysctl_cap_read(SYSCTL_HANDLER_ARGS) +{ + struct mlx5_diag_cnt *diag_cnt; + struct mlx5_core_dev *dev; + struct sbuf sbuf; + int err; + u32 i; + + dev = arg1; + diag_cnt = &dev->diag_cnt; + + err = sysctl_wire_old_buffer(req, 0); + if (err != 0) + return (err); + + DIAG_LOCK(diag_cnt); + + sbuf_new_for_sysctl(&sbuf, NULL, 8192, req); + + sbuf_printf(&sbuf, "\n"); + + /* print cap */ + sbuf_printf(&sbuf, "log_max_samples=%d\n", + MLX5_CAP_DEBUG(dev, log_max_samples)); + sbuf_printf(&sbuf, "log_min_sample_period=%d\n", + MLX5_CAP_DEBUG(dev, log_min_sample_period)); + sbuf_printf(&sbuf, "repetitive=%d\n", + MLX5_CAP_DEBUG(dev, repetitive)); + sbuf_printf(&sbuf, "single=%d\n", + MLX5_CAP_DEBUG(dev, single)); + sbuf_printf(&sbuf, "num_of_diagnostic_counters=%d\n", + MLX5_CAP_GEN(dev, num_of_diagnostic_counters)); + + /* print list of supported counter */ + sbuf_printf(&sbuf, "supported counter id:\n"); + for (i = 0; i != MLX5_CAP_GEN(dev, num_of_diagnostic_counters); i++) + sbuf_printf(&sbuf, "0x%04x,", diag_cnt->cnt_id[i].id); + sbuf_printf(&sbuf, "\n"); + + err = sbuf_finish(&sbuf); + sbuf_delete(&sbuf); + + DIAG_UNLOCK(diag_cnt); + + return (err); +} + +static int +get_supported_cnt_ids(struct mlx5_core_dev *dev) +{ + u32 num_counters = MLX5_CAP_GEN(dev, num_of_diagnostic_counters); + struct mlx5_diag_cnt *diag_cnt = &dev->diag_cnt; + u32 i; + + diag_cnt->cnt_id = kzalloc(sizeof(*diag_cnt->cnt_id) * num_counters, + GFP_KERNEL); + if (!diag_cnt->cnt_id) + return (-ENOMEM); + + for (i = 0; i != num_counters; i++) { + diag_cnt->cnt_id[i].id = + MLX5_CAP_DEBUG(dev, diagnostic_counter[i].counter_id); + } + return (0); +} + +static void +reset_cnt_id(struct mlx5_core_dev *dev) +{ + struct mlx5_diag_cnt *diag_cnt = &dev->diag_cnt; + u32 i; + + diag_cnt->num_cnt_id = 0; + for (i = 0; i != MLX5_CAP_GEN(dev, num_of_diagnostic_counters); i++) + diag_cnt->cnt_id[i].enabled = false; +} + +static int +enable_cnt_id(struct mlx5_core_dev *dev, u16 id) +{ + struct mlx5_diag_cnt *diag_cnt = &dev->diag_cnt; + u32 i; + + for (i = 0; i != MLX5_CAP_GEN(dev, num_of_diagnostic_counters); i++) { + if (diag_cnt->cnt_id[i].id == id) { + if (diag_cnt->cnt_id[i].enabled) + return (EINVAL); + + diag_cnt->cnt_id[i].enabled = true; + break; + } + } + + if (i == MLX5_CAP_GEN(dev, num_of_diagnostic_counters)) + return (ENOENT); + else + return (0); +} + +static void +reset_params(struct mlx5_diag_cnt *diag_cnt) +{ + diag_cnt->log_num_of_samples = 0; + diag_cnt->log_sample_period = 0; + diag_cnt->flag = 0; + diag_cnt->num_of_samples = 0; + diag_cnt->sample_index = 0; +} + +int +mlx5_diag_set_params(struct mlx5_core_dev *dev) +{ + u8 out[MLX5_ST_SZ_BYTES(set_diagnostic_params_out)] = {0}; + struct mlx5_diag_cnt *diag_cnt = &dev->diag_cnt; + void *cnt_id; + void *ctx; + u16 in_sz; + int err; + u8 *in; + u32 i; + u32 j; + + if (!diag_cnt->num_cnt_id) + return (-EINVAL); + + in_sz = MLX5_ST_SZ_BYTES(set_diagnostic_params_in) + + diag_cnt->num_cnt_id * MLX5_ST_SZ_BYTES(counter_id); + in = kzalloc(in_sz, GFP_KERNEL); + if (!in) + return (-ENOMEM); + + MLX5_SET(set_diagnostic_params_in, in, opcode, + MLX5_CMD_OP_SET_DIAGNOSTICS); + + ctx = MLX5_ADDR_OF(set_diagnostic_params_in, in, + diagnostic_params_ctx); + MLX5_SET(diagnostic_params_context, ctx, num_of_counters, + diag_cnt->num_cnt_id); + MLX5_SET(diagnostic_params_context, ctx, log_num_of_samples, + diag_cnt->log_num_of_samples); + + MLX5_SET(diagnostic_params_context, ctx, single, + (diag_cnt->flag >> 7) & 1); + MLX5_SET(diagnostic_params_context, ctx, repetitive, + (diag_cnt->flag >> 6) & 1); + MLX5_SET(diagnostic_params_context, ctx, sync, + (diag_cnt->flag >> 5) & 1); + MLX5_SET(diagnostic_params_context, ctx, clear, + (diag_cnt->flag >> 4) & 1); + MLX5_SET(diagnostic_params_context, ctx, on_demand, + (diag_cnt->flag >> 3) & 1); + MLX5_SET(diagnostic_params_context, ctx, enable, + (diag_cnt->flag >> 2) & 1); + MLX5_SET(diagnostic_params_context, ctx, log_sample_period, + diag_cnt->log_sample_period); + + for (i = j = 0; i != MLX5_CAP_GEN(dev, num_of_diagnostic_counters); i++) { + if (diag_cnt->cnt_id[i].enabled) { + cnt_id = MLX5_ADDR_OF(diagnostic_params_context, + ctx, counter_id[j]); + MLX5_SET(counter_id, cnt_id, counter_id, + diag_cnt->cnt_id[i].id); + j++; + } + } + + err = mlx5_cmd_exec(dev, in, in_sz, out, sizeof(out)); + + kfree(in); + return (err); +} + +/* This function is for debug purpose */ +int +mlx5_diag_query_params(struct mlx5_core_dev *dev) +{ + u8 in[MLX5_ST_SZ_BYTES(query_diagnostic_params_in)] = {0}; + struct mlx5_diag_cnt *diag_cnt = &dev->diag_cnt; + void *cnt_id; + u16 out_sz; + void *ctx; + int err; + u8 *out; + u32 i; + + out_sz = MLX5_ST_SZ_BYTES(query_diagnostic_params_out) + + diag_cnt->num_cnt_id * MLX5_ST_SZ_BYTES(counter_id); + + out = kzalloc(out_sz, GFP_KERNEL); + if (!out) + return (-ENOMEM); + + MLX5_SET(query_diagnostic_params_in, in, opcode, + MLX5_CMD_OP_QUERY_DIAGNOSTIC_PARAMS); + err = mlx5_cmd_exec(dev, in, sizeof(in), out, out_sz); + if (err) + goto out; + + ctx = MLX5_ADDR_OF(query_diagnostic_params_out, out, + diagnostic_params_ctx); + mlx5_core_dbg(dev, "single=%x\n", + MLX5_GET(diagnostic_params_context, ctx, single)); + mlx5_core_dbg(dev, "repetitive=%x\n", + MLX5_GET(diagnostic_params_context, ctx, repetitive)); + mlx5_core_dbg(dev, "sync=%x\n", + MLX5_GET(diagnostic_params_context, ctx, sync)); + mlx5_core_dbg(dev, "clear=%x\n", + MLX5_GET(diagnostic_params_context, ctx, clear)); + mlx5_core_dbg(dev, "on_demand=%x\n", + MLX5_GET(diagnostic_params_context, ctx, on_demand)); + mlx5_core_dbg(dev, "enable=%x\n", + MLX5_GET(diagnostic_params_context, ctx, enable)); + mlx5_core_dbg(dev, "log_sample_period=%x\n", + MLX5_GET(diagnostic_params_context, ctx, + log_sample_period)); + + for (i = 0; i != diag_cnt->num_cnt_id; i++) { + cnt_id = MLX5_ADDR_OF(diagnostic_params_context, + ctx, counter_id[i]); + mlx5_core_dbg(dev, "counter_id[%d]=%x\n", i, + MLX5_GET(counter_id, cnt_id, counter_id)); + } +out: + kfree(out); + return (err); +} + +int +mlx5_diag_query_counters(struct mlx5_core_dev *dev, u8 **out_buffer) +{ + u8 in[MLX5_ST_SZ_BYTES(query_diagnostic_counters_in)] = {0}; + struct mlx5_diag_cnt *diag_cnt = &dev->diag_cnt; + u16 out_sz; + u8 *out; + int err; + + out_sz = MLX5_ST_SZ_BYTES(query_diagnostic_counters_out) + + diag_cnt->num_of_samples * diag_cnt->num_cnt_id * + MLX5_ST_SZ_BYTES(diagnostic_cntr_struct); + + out = kzalloc(out_sz, GFP_KERNEL); + if (!out) + return (-ENOMEM); + + MLX5_SET(query_diagnostic_counters_in, in, opcode, + MLX5_CMD_OP_QUERY_DIAGNOSTICS); + MLX5_SET(query_diagnostic_counters_in, in, num_of_samples, + diag_cnt->num_of_samples); + MLX5_SET(query_diagnostic_counters_in, in, sample_index, + diag_cnt->sample_index); + + err = mlx5_cmd_exec(dev, in, sizeof(in), out, out_sz); + + if (!err) + *out_buffer = out; + else + kfree(out); + + return (err); +} + +int +mlx5_diag_cnt_init(struct mlx5_core_dev *dev) +{ + struct mlx5_diag_cnt *diag_cnt = &dev->diag_cnt; + struct sysctl_oid *diag_cnt_sysctl_node; + int err; + + if (!MLX5_DIAG_CNT_SUPPORTED(dev)) + return (0); + + mutex_init(&diag_cnt->lock); + + /* Build private data */ + err = get_supported_cnt_ids(dev); + if (err) + return (err); + + sysctl_ctx_init(&diag_cnt->sysctl_ctx); + + diag_cnt_sysctl_node = SYSCTL_ADD_NODE(&diag_cnt->sysctl_ctx, + SYSCTL_CHILDREN(device_get_sysctl_tree(dev->pdev->dev.bsddev)), + OID_AUTO, "diag_cnt", CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, + "Diagnostics counters"); + + if (diag_cnt_sysctl_node == NULL) + return (-ENOMEM); + + SYSCTL_ADD_PROC(&diag_cnt->sysctl_ctx, SYSCTL_CHILDREN(diag_cnt_sysctl_node), + OID_AUTO, "counter_id", CTLTYPE_U16 | CTLFLAG_RW | CTLFLAG_MPSAFE, + dev, 0, mlx5_sysctl_counter_id, "SU", "Selected counter IDs"); + + SYSCTL_ADD_PROC(&diag_cnt->sysctl_ctx, SYSCTL_CHILDREN(diag_cnt_sysctl_node), + OID_AUTO, "params", CTLTYPE_U32 | CTLFLAG_RW | CTLFLAG_MPSAFE, + dev, 0, mlx5_sysctl_params, "IU", + "Counter parameters: log_num_of_samples, log_sample_perios, flag, num_of_samples, sample_index"); + + SYSCTL_ADD_PROC(&diag_cnt->sysctl_ctx, SYSCTL_CHILDREN(diag_cnt_sysctl_node), + OID_AUTO, "dump_set", CTLTYPE_U8 | CTLFLAG_RW | CTLFLAG_MPSAFE, + dev, 0, mlx5_sysctl_dump_set, "CU", + "Set dump parameters by writing 1 and enable dump_get. Write 0 to disable dump."); + + SYSCTL_ADD_PROC(&diag_cnt->sysctl_ctx, SYSCTL_CHILDREN(diag_cnt_sysctl_node), + OID_AUTO, "dump_get", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, + dev, 0, mlx5_sysctl_dump_get, "A", + "Get dump parameters."); + + SYSCTL_ADD_PROC(&diag_cnt->sysctl_ctx, SYSCTL_CHILDREN(diag_cnt_sysctl_node), + OID_AUTO, "cap", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, + dev, 0, mlx5_sysctl_cap_read, "A", + "Read capabilities."); + + return (0); +} + +void +mlx5_diag_cnt_cleanup(struct mlx5_core_dev *dev) +{ + struct mlx5_diag_cnt *diag_cnt = &dev->diag_cnt; + void *ptr; + + if (!MLX5_DIAG_CNT_SUPPORTED(dev)) + return; + + sysctl_ctx_free(&diag_cnt->sysctl_ctx); + + ptr = diag_cnt->cnt_id; + diag_cnt->cnt_id = NULL; + + kfree(ptr); + + reset_params(diag_cnt); +} diff --git a/sys/dev/mlx5/mlx5_core/mlx5_main.c b/sys/dev/mlx5/mlx5_core/mlx5_main.c index 6fcd7cf281f2..431a277119cf 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_main.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_main.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2013-2021, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2022 NVIDIA corporation & affiliates. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -50,6 +51,7 @@ #include #include #include +#include #ifdef PCI_IOV #include #include @@ -1190,10 +1192,16 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, struct mlx5_priv *priv, goto err_mpfs; } + err = mlx5_diag_cnt_init(dev); + if (err) { + mlx5_core_err(dev, "diag cnt init failed %d\n", err); + goto err_fpga; + } + err = mlx5_register_device(dev); if (err) { mlx5_core_err(dev, "mlx5_register_device failed %d\n", err); - goto err_fpga; + goto err_diag_cnt; } set_bit(MLX5_INTERFACE_STATE_UP, &dev->intf_state); @@ -1202,6 +1210,9 @@ out: mutex_unlock(&dev->intf_state_mutex); return 0; +err_diag_cnt: + mlx5_diag_cnt_cleanup(dev); + err_fpga: mlx5_fpga_device_stop(dev); @@ -1272,6 +1283,7 @@ static int mlx5_unload_one(struct mlx5_core_dev *dev, struct mlx5_priv *priv, mlx5_unregister_device(dev); mlx5_eswitch_cleanup(dev->priv.eswitch); + mlx5_diag_cnt_cleanup(dev); mlx5_fpga_device_stop(dev); mlx5_mpfs_destroy(dev); mlx5_cleanup_fs(dev); diff --git a/sys/dev/mlx5/mlx5_ifc.h b/sys/dev/mlx5/mlx5_ifc.h index 627c367eace5..b931bf9b3a0b 100644 --- a/sys/dev/mlx5/mlx5_ifc.h +++ b/sys/dev/mlx5/mlx5_ifc.h @@ -186,6 +186,7 @@ enum { MLX5_CMD_OP_DEACTIVATE_TRACER = 0x815, MLX5_CMD_OP_ALLOC_TRANSPORT_DOMAIN = 0x816, MLX5_CMD_OP_DEALLOC_TRANSPORT_DOMAIN = 0x817, + MLX5_CMD_OP_QUERY_DIAGNOSTIC_PARAMS = 0x819, MLX5_CMD_OP_SET_DIAGNOSTICS = 0x820, MLX5_CMD_OP_QUERY_DIAGNOSTICS = 0x821, MLX5_CMD_OP_QUERY_CONG_STATUS = 0x822, @@ -5118,6 +5119,22 @@ struct mlx5_ifc_query_dc_cnak_trace_in_bits { u8 reserved_2[0x40]; }; +struct mlx5_ifc_diagnostic_cntr_struct_bits { + u8 counter_id[0x10]; + u8 sample_id[0x10]; + + u8 time_stamp_31_0[0x20]; + + u8 counter_value_h[0x20]; + + u8 counter_value_l[0x20]; +}; + +enum { + MLX5_DIAGNOSTIC_PARAMS_CONTEXT_ENABLE_ENABLE = 0x1, + MLX5_DIAGNOSTIC_PARAMS_CONTEXT_ENABLE_DISABLE = 0x0, +}; + struct mlx5_ifc_query_cq_out_bits { u8 status[0x8]; u8 reserved_0[0x18]; @@ -6856,6 +6873,25 @@ struct mlx5_ifc_diagnostic_params_context_bits { struct mlx5_ifc_counter_id_bits counter_id[0]; }; +struct mlx5_ifc_query_diagnostic_params_in_bits { + u8 opcode[0x10]; + u8 reserved_at_10[0x10]; + + u8 reserved_at_20[0x10]; + u8 op_mod[0x10]; + + u8 reserved_at_40[0x40]; +}; + +struct mlx5_ifc_query_diagnostic_params_out_bits { + u8 status[0x8]; + u8 reserved_at_8[0x18]; + + u8 syndrome[0x20]; + + struct mlx5_ifc_diagnostic_params_context_bits diagnostic_params_ctx; +}; + struct mlx5_ifc_set_diagnostic_params_in_bits { u8 opcode[0x10]; u8 reserved_0[0x10]; diff --git a/sys/modules/mlx5/Makefile b/sys/modules/mlx5/Makefile index 2742a5f1ba90..d418375bdf69 100644 --- a/sys/modules/mlx5/Makefile +++ b/sys/modules/mlx5/Makefile @@ -8,6 +8,7 @@ SRCS= \ mlx5_alloc.c \ mlx5_cmd.c \ mlx5_cq.c \ +mlx5_diag_cnt.c \ mlx5_diagnostics.c \ mlx5_eq.c \ mlx5_eswitch.c \ From nobody Sun Apr 30 06:58:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HH73rrpz48sRq; Sun, 30 Apr 2023 06:58: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 4Q8HH739JCz3NgC; Sun, 30 Apr 2023 06:58:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L8rF+OibIgmfxuGZB2T+RWdNkYq6Q7NaQ3CnLoZ7PhY=; b=NJo0lV+DQQOJ0k2Q8UfuDobuhF6fNwZGZFCZz0/oitc94nhyhyHgAhxM7cKhX9G8l5sove BAxpcTTTkZNyuG3nSWC5IyhYLClLNvRxyhneEZJCFqpaYiHaSGLIqYazY99teMX59QXZl0 hQl7xcoOGbyAwxn/Ov69rfQhrgt47WTHeIbQ86MUOzghiakddMGKTL35sOrELaqU1oWR6N IFW0vefDOqWhuw+LzovopEvKYEsJpIdkltOq7oiWlWrZnD3kjanHxEmf9kVRmANyVIbzeq aGIuYCaOONXk+34ED2zLp7j+YtSCW6WhHF5cHy3KDEM2RfviOFbX9TDIYFf0YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L8rF+OibIgmfxuGZB2T+RWdNkYq6Q7NaQ3CnLoZ7PhY=; b=A6c/bMOMolypk4t564PQqPrem3lZSFrXjMINC9o3hP/uPDQxmkXDq8Zd8nanqFQfqt230q W668YF8XA3qe0s+WeIvh5aofIfazmK0aKXKdNrIq0eGki20FJHBeqgzyAeHyjRcREVFW8J hxoUSRZm6wiFDfR88skHlknc6ckbgTHmDw1lFlOPq0dGGT6GnWbf9c9++XlH22jb5md+bx FXZXO5cMRiDl5crTyAGei9oRYAm2ykfoC2x/CnnytEPMCWRRAPH1SxOexJ0++xA61IEL6p jJJ4F0icvf/gFhlxoS8li4voSVY1XVcMiKSASjmQ0spZ7tHwd/sxplMik6CTUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837891; a=rsa-sha256; cv=none; b=pW2IKEpWNTHFqe9YOESmRJPWlC2CGOBJ7v0JJaLBrWynmruLAt0XI+36kwc2NhIsOIq2S+ XzAzQNZDK9eqi+p1TPuyxGf952zV7tdukRfMV8XizCVBWRERntJqDYVjpUZE2/ajPnoevb ddVhrQubBVVdcHPhOpjAAFutihhBg/qhudZluJGLaU7ipD5j+Wx2VzRv3VebQ87PSiTfRX DrJkh09//RcIkafMaqphDaKyXENAwWLjvYR3UB7IyCvty5tqhndBnSJWE5zfye+WUmfSG6 gh3rJqDDJOvTLNAm3HbdmTuEMZXh3XrBDrpaWOeYVayg2/PBsK/mgSEmK3NRTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HH72CYyzDsx; Sun, 30 Apr 2023 06:58:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6wBT0071870; Sun, 30 Apr 2023 06:58:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6wBru071869; Sun, 30 Apr 2023 06:58:11 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:58:11 GMT Message-Id: <202304300658.33U6wBru071869@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 6148777d8692 - stable/13 - mlx5en(4): Explain why CQE zipping is off. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6148777d8692c4f31df011babe4deb16f308292b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=6148777d8692c4f31df011babe4deb16f308292b commit 6148777d8692c4f31df011babe4deb16f308292b Author: Hans Petter Selasky AuthorDate: 2023-04-18 11:12:32 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:19 +0000 mlx5en(4): Explain why CQE zipping is off. Sponsored by: NVIDIA Networking (cherry picked from commit 6bd4bb9bdbadb76c5502c7972df9f525b909e2f5) --- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index 7b754d901beb..97dcc04d7ae8 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -3841,9 +3841,10 @@ mlx5e_build_ifp_priv(struct mlx5_core_dev *mdev, priv->params.lro_wqe_sz = MLX5E_PARAMS_DEFAULT_LRO_WQE_SZ; /* - * CQE zipping is currently defaulted to off. when it won't - * anymore we will consider the HW capability: - * "!!MLX5_CAP_GEN(mdev, cqe_compression)" + * CQE zipping is off, because the per-packet 32-bit Toeplitz hash + * is then not supported. The 32-bit Toeplitz hash is needed to + * correctly demultiplex incoming traffic into the expected + * network queues. */ priv->params.cqe_zipping_en = false; From nobody Sun Apr 30 06:58:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HH84WnSz48sRv; Sun, 30 Apr 2023 06:58:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8HH841gJz3Nth; Sun, 30 Apr 2023 06:58:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xxn0RKvX7HldXlTzsOvgo8jL0xHRP+pRipmLroWJL+w=; b=xVd8VeBFUONux6DYiHu7Hl6g8Ii6dUAkr24ewPtd0vOzQJXBQMAvG7yfNQJZROeJivzrNT ZhDuQ0OUWFcgLR1ljHekpv3gEwiI8TvT99t9kKkxhQ0Xbk7RRwo4e2q392UdZlrZIbtOsb CT4gEnj2V9dB2SOPYd+0UZJorODtIuW7x1TRNlNFLlPYjWuIQIGUdHYZ9JuCPHv0p0R3dh W/5nAS62NULKJ2e0jC1xuhc5gk5zyDT4u8xfwE51KeKDrqkLA+NWoaHdwn3Legejt0tk77 tBAHeA5oDZvv0XHHhUdZ36JCi2IlF6dvAjunyhODRJ4I3J4kxTNn4Ieaa4Z/CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xxn0RKvX7HldXlTzsOvgo8jL0xHRP+pRipmLroWJL+w=; b=yWG4C17hNFuDeuHuDapn8jv0/ktWi5xphV8txc5AG4WR6KoL1MhY7JvWcbNAmcwmYF6hNS GAlOHNSBLZKWbH/uCUDS4iUFvWa801HRXFQakBivmMW/Vio6ItLGoEcGyoLZbYXTdNIrTp 5mXNJCPEQFFrecMrBALGWVpqPQgIVeER7LjyWXc2Gve0y1/wA/As3QARVaGmKTSPcLgrAf W6m6cuYf9Z/NKvkDN+9GfKtGz96yj07ldSvirZXOESlfUkAoZAhSYMLY/GP2E4V4QipwDq dCw62Q65j0rghdrnrNDhw26u327cxb6UnzD9gzotIkxTTMK+TcMCi7Q6Q9CR7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837892; a=rsa-sha256; cv=none; b=I2rQols0vxiI4blTjeDhtM5tfgO1Sura147/NRW4KzIRjhwe1AVgHFaw6aWA/Zd3hG3txj YZp9vuNY+n47gtdSfqzrDUR0Evd+CnoOKuK9VBSs+61HBck91CDo983ttIHAZqsuKLv5V8 VnSbif9cKKV8Bj2Hb8Q+ONC1excMrCbAaD9x9S6cWwJKDQpKZuAPW24xtZlntgIojFPbAk zGY9HGR+iWJgyHkTP7z5pNmr2UkcPJ9tg/0g+oFxAF9sXrnhHjDF63wBGVapAhjduidj+T Nk/DCVBmxh0/Mml7++Zifrvl43fu3Dq87fPa5ZowZEzfOwDKuZTRmbxM1H/8zg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HH837d6zDhV; Sun, 30 Apr 2023 06:58:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6wCVd071892; Sun, 30 Apr 2023 06:58:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6wCCD071891; Sun, 30 Apr 2023 06:58:12 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:58:12 GMT Message-Id: <202304300658.33U6wCCD071891@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: e8ad47b65447 - stable/13 - mlx5en(4): Don't wait for receive queue to fill up with mbufs during open channels. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e8ad47b65447c98050f4888aa0c3298663bb6ddb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=e8ad47b65447c98050f4888aa0c3298663bb6ddb commit e8ad47b65447c98050f4888aa0c3298663bb6ddb Author: Hans Petter Selasky AuthorDate: 2023-04-18 11:42:17 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:19 +0000 mlx5en(4): Don't wait for receive queue to fill up with mbufs during open channels. Failure to get mbufs may be transient. Don't permanently fail to open the channels due to lack of mbufs. This also makes modifying channel parameters faster. Sponsored by: NVIDIA Networking (cherry picked from commit 1943c40cd655b7259b9b21849f328362c97a2657) --- sys/dev/mlx5/mlx5_en/en.h | 2 -- sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c | 5 ----- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 26 -------------------------- 3 files changed, 33 deletions(-) diff --git a/sys/dev/mlx5/mlx5_en/en.h b/sys/dev/mlx5/mlx5_en/en.h index f552b1b653a6..41ea5c493d46 100644 --- a/sys/dev/mlx5/mlx5_en/en.h +++ b/sys/dev/mlx5/mlx5_en/en.h @@ -107,7 +107,6 @@ #define MLX5E_PARAMS_DEFAULT_RX_CQ_MODERATION_PKTS 0x20 #define MLX5E_PARAMS_DEFAULT_TX_CQ_MODERATION_USEC 0x10 #define MLX5E_PARAMS_DEFAULT_TX_CQ_MODERATION_PKTS 0x20 -#define MLX5E_PARAMS_DEFAULT_MIN_RX_WQES 0x80 #define MLX5E_PARAMS_DEFAULT_RX_HASH_LOG_TBL_SZ 0x7 #define MLX5E_CACHELINE_SIZE CACHE_LINE_SIZE #define MLX5E_HW2SW_MTU(hwmtu) \ @@ -672,7 +671,6 @@ struct mlx5e_params { u16 rx_cq_moderation_pkts; u16 tx_cq_moderation_usec; u16 tx_cq_moderation_pkts; - u16 min_rx_wqes; bool hw_lro_en; bool cqe_zipping_en; u32 lro_wqe_sz; diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c b/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c index f57d70080a46..ec861a4b260c 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c @@ -1035,11 +1035,6 @@ mlx5e_ethtool_handler(SYSCTL_HANDLER_ARGS) priv->params_ethtool.rx_queue_size = 1 << priv->params.log_rq_size; - /* update least number of RX WQEs */ - priv->params.min_rx_wqes = min( - priv->params_ethtool.rx_queue_size - 1, - MLX5E_PARAMS_DEFAULT_MIN_RX_WQES); - /* restart network interface, if any */ if (was_opened) mlx5e_open_locked(priv->ifp); diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index 97dcc04d7ae8..8bedf0ab7729 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -1402,23 +1402,6 @@ mlx5e_disable_rq(struct mlx5e_rq *rq) mlx5_core_destroy_rq(mdev, rq->rqn); } -static int -mlx5e_wait_for_min_rx_wqes(struct mlx5e_rq *rq) -{ - struct mlx5e_channel *c = rq->channel; - struct mlx5e_priv *priv = c->priv; - struct mlx5_wq_ll *wq = &rq->wq; - int i; - - for (i = 0; i < 1000; i++) { - if (wq->cur_sz >= priv->params.min_rx_wqes) - return (0); - - msleep(4); - } - return (-ETIMEDOUT); -} - static int mlx5e_open_rq(struct mlx5e_channel *c, struct mlx5e_rq_param *param, @@ -2504,7 +2487,6 @@ mlx5e_open_channels(struct mlx5e_priv *priv) struct mlx5e_channel_param *cparam; int err; int i; - int j; cparam = malloc(sizeof(*cparam), M_MLX5EN, M_WAITOK); @@ -2538,12 +2520,6 @@ mlx5e_open_channels(struct mlx5e_priv *priv) intr_setaffinity(irq, CPU_WHICH_INTRHANDLER, &cpuset); } } - - for (j = 0; j < priv->params.num_channels; j++) { - err = mlx5e_wait_for_min_rx_wqes(&priv->channel[j].rq); - if (err) - goto err_close_channels; - } free(cparam, M_MLX5EN); return (0); @@ -3817,8 +3793,6 @@ mlx5e_build_ifp_priv(struct mlx5_core_dev *mdev, MLX5E_PARAMS_DEFAULT_TX_CQ_MODERATION_USEC; priv->params.tx_cq_moderation_pkts = MLX5E_PARAMS_DEFAULT_TX_CQ_MODERATION_PKTS; - priv->params.min_rx_wqes = - MLX5E_PARAMS_DEFAULT_MIN_RX_WQES; priv->params.rx_hash_log_tbl_sz = (order_base_2(num_comp_vectors) > MLX5E_PARAMS_DEFAULT_RX_HASH_LOG_TBL_SZ) ? From nobody Sun Apr 30 06:58:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HH96bRQz48sDs; Sun, 30 Apr 2023 06:58:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8HH94Wwpz3Nh6; Sun, 30 Apr 2023 06:58:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DaMCCzYYbvv2HxlE+YgcxAffmKoVoYj8dxvX0hucd1k=; b=ipWxKupIkcggTFDlrGvXRGmvvQMNPCFUa5Tex94QFa8WjCuwoM9Ggarp+XqRWpSpSY8qhd 6y0Que+SCwvIUqFXOzVNKUX5R29m7rkD2ID3Wi7iZj+ZyuCLJ7uVa442bsiJiusmqhnJ94 JV5yLw0ClqW5Jr7dGgUPZ5YM4zqCXXVrn45xgjzSJhgrAFBLdwpV6SOf77oZjtA3Gou7dQ v23ewx59WyiWNiKQTzVnBVBGPLqyzjmeOLUjY8PKFrlv7dS625i9EAGyd5ZQ3SW4X4jqUJ 8NxrH1hiGWvlolimDuDrCKhRuYgUkN9fF63uNGxGCXhaSsodXzRwg0+XgY9SWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DaMCCzYYbvv2HxlE+YgcxAffmKoVoYj8dxvX0hucd1k=; b=skookalqOG0+iwMoUMntGbSgYbx2rUnikMN9q7ul7XCYF+AwzM5/RJqzhN+HiEPIlGqzUC vnILhBnrzyCoXTUVhwlXNbti2sxPURANHxZaYFhvjRG00iBiQ8AgwDIxYPgpL3FK+eKbeF 5sIXEMMYLOsAe5XYZv2kSh7Lar2OLkxUgEo6q//R9VdXQaS3zqmAILIWPBrRb11oHjmP8V SwB0kjYXwjl68kM/TO3zkoaYJVY2J9NKjgoQRSATZt3MX5ckxUumQPHRWdoOB1rk7WD83x eviAorN36Fyujz2s83AN/ff/57qFW+AHoYT23jcFgogJ/mkD0j6g35PwDbefzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837893; a=rsa-sha256; cv=none; b=QmuSK/jWJ0fGRAUpBp1FRxbVpxI+wHs6ssJaWk+MWlGwUoh84V0RQo6SgXADTkGs082ZWf hHSmMzGYPbNsVSJoLk7oVSzS1SmdL67fXbA+Ew65j0S/S3lOT7hCUA5Bi9MV2Q23u9XueX C+Xm2L4OrFN3SYJugn2UTTrbx91JnKaacD+l62EUHWflHD/7ScD6729IvjlsfKQeJ9eHYs 9GK42chx0IRS+R9ehaHMDkbm5I3EuEQ8B9Eww/JcVjp4Zu3wm+Vx+ksnLVM+PdLtHC6p/C 9ELFtW6ozThpV0vavXyhpMK/OLcOdTvIQ0Zn6N+7yvxyQGoWJEUGV4FqF/IMYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HH93dgSz1CvJ; Sun, 30 Apr 2023 06:58:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6wDAV071920; Sun, 30 Apr 2023 06:58:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6wDnw071919; Sun, 30 Apr 2023 06:58:13 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:58:13 GMT Message-Id: <202304300658.33U6wDnw071919@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 090e6cbc4d56 - stable/13 - mlx5: Make mlx5_del_flow_rule() NULL safe. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 090e6cbc4d56546e9ed9c462c8b063e95122361e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=090e6cbc4d56546e9ed9c462c8b063e95122361e commit 090e6cbc4d56546e9ed9c462c8b063e95122361e Author: Hans Petter Selasky AuthorDate: 2023-04-18 11:16:16 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:19 +0000 mlx5: Make mlx5_del_flow_rule() NULL safe. This change factors out repeated NULL checks. No functional change intended. Sponsored by: NVIDIA Networking (cherry picked from commit b0b87d9151456e71fd6a14736e132d67114db4aa) --- sys/dev/mlx5/fs.h | 2 +- sys/dev/mlx5/mlx5_core/mlx5_eswitch.c | 25 ++--- sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c | 6 +- sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c | 8 +- sys/dev/mlx5/mlx5_en/en.h | 1 - sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c | 162 ++++++------------------------ sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c | 10 +- 7 files changed, 51 insertions(+), 163 deletions(-) diff --git a/sys/dev/mlx5/fs.h b/sys/dev/mlx5/fs.h index e5ec897fd9f1..7246d8ddbd80 100644 --- a/sys/dev/mlx5/fs.h +++ b/sys/dev/mlx5/fs.h @@ -158,7 +158,7 @@ mlx5_add_flow_rule(struct mlx5_flow_table *ft, u32 action, u32 flow_tag, struct mlx5_flow_destination *dest); -void mlx5_del_flow_rule(struct mlx5_flow_rule *fr); +void mlx5_del_flow_rule(struct mlx5_flow_rule **); /*The following API is for sniffer*/ typedef int (*rule_event_fn)(struct mlx5_flow_rule *rule, diff --git a/sys/dev/mlx5/mlx5_core/mlx5_eswitch.c b/sys/dev/mlx5/mlx5_core/mlx5_eswitch.c index 6d3be72427c9..4e0da94483e8 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_eswitch.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_eswitch.c @@ -398,9 +398,7 @@ static int esw_del_uc_addr(struct mlx5_eswitch *esw, struct vport_addr *vaddr) mlx5_mpfs_del_mac(esw->dev, esw_uc->table_index); - if (vaddr->flow_rule) - mlx5_del_flow_rule(vaddr->flow_rule); - vaddr->flow_rule = NULL; + mlx5_del_flow_rule(&vaddr->flow_rule); l2addr_hash_del(esw_uc); return 0; @@ -459,15 +457,12 @@ static int esw_del_mc_addr(struct mlx5_eswitch *esw, struct vport_addr *vaddr) vport, mac, vaddr->flow_rule, esw_mc->refcnt, esw_mc->uplink_rule); - if (vaddr->flow_rule) - mlx5_del_flow_rule(vaddr->flow_rule); - vaddr->flow_rule = NULL; + mlx5_del_flow_rule(&vaddr->flow_rule); if (--esw_mc->refcnt) return 0; - if (esw_mc->uplink_rule) - mlx5_del_flow_rule(esw_mc->uplink_rule); + mlx5_del_flow_rule(&esw_mc->uplink_rule); l2addr_hash_del(esw_mc); return 0; @@ -684,14 +679,8 @@ out: static void esw_vport_cleanup_egress_rules(struct mlx5_eswitch *esw, struct mlx5_vport *vport) { - if (!IS_ERR_OR_NULL(vport->egress.allowed_vlan)) - mlx5_del_flow_rule(vport->egress.allowed_vlan); - - if (!IS_ERR_OR_NULL(vport->egress.drop_rule)) - mlx5_del_flow_rule(vport->egress.drop_rule); - - vport->egress.allowed_vlan = NULL; - vport->egress.drop_rule = NULL; + mlx5_del_flow_rule(&vport->egress.allowed_vlan); + mlx5_del_flow_rule(&vport->egress.drop_rule); } static void esw_vport_disable_egress_acl(struct mlx5_eswitch *esw, @@ -775,9 +764,7 @@ out: static void esw_vport_cleanup_ingress_rules(struct mlx5_eswitch *esw, struct mlx5_vport *vport) { - if (!IS_ERR_OR_NULL(vport->ingress.drop_rule)) - mlx5_del_flow_rule(vport->ingress.drop_rule); - vport->ingress.drop_rule = NULL; + mlx5_del_flow_rule(&vport->ingress.drop_rule); } static void esw_vport_disable_ingress_acl(struct mlx5_eswitch *esw, diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c index 543c7a4ef502..4dceaea7ea72 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c @@ -83,7 +83,7 @@ accel_fs_tcp_set_ipv6_flow(struct mlx5_flow_spec *spec, struct inpcb *inp) void mlx5e_accel_fs_del_inpcb(struct mlx5_flow_rule *rule) { - mlx5_del_flow_rule(rule); + mlx5_del_flow_rule(&rule); } struct mlx5_flow_rule * @@ -341,7 +341,7 @@ accel_fs_tcp_destroy_table(struct mlx5e_priv *priv, int i) fs_tcp = &priv->fts.accel_tcp; ft = fs_tcp->tables + i; - mlx5_del_flow_rule(fs_tcp->default_rules[i]); + mlx5_del_flow_rule(&fs_tcp->default_rules[i]); accel_fs_tcp_destroy_groups(ft); kfree(ft->g); @@ -394,7 +394,7 @@ mlx5e_accel_fs_tcp_create(struct mlx5e_priv *priv) err_destroy_rules: while (i--) - mlx5_del_flow_rule(priv->fts.accel_tcp.default_rules[i]); + mlx5_del_flow_rule(&priv->fts.accel_tcp.default_rules[i]); i = MLX5E_ACCEL_FS_TCP_NUM_TYPES; err_destroy_tables: diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c index 86cffe67583d..8d8b4f59e95e 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_tree.c @@ -1878,10 +1878,16 @@ mlx5_add_flow_rule(struct mlx5_flow_table *ft, } EXPORT_SYMBOL(mlx5_add_flow_rule); -void mlx5_del_flow_rule(struct mlx5_flow_rule *dst) +void mlx5_del_flow_rule(struct mlx5_flow_rule **pp) { struct mlx5_flow_namespace *ns; + struct mlx5_flow_rule *dst; + + dst = *pp; + *pp = NULL; + if (IS_ERR_OR_NULL(dst)) + return; ns = get_ns_with_notifiers(&dst->base); if (ns) down_read(&ns->dests_rw_sem); diff --git a/sys/dev/mlx5/mlx5_en/en.h b/sys/dev/mlx5/mlx5_en/en.h index 41ea5c493d46..0dc2e334cced 100644 --- a/sys/dev/mlx5/mlx5_en/en.h +++ b/sys/dev/mlx5/mlx5_en/en.h @@ -953,7 +953,6 @@ struct mlx5_flow_rule; struct mlx5e_eth_addr_info { u8 addr [ETH_ALEN + 2]; - u32 tt_vec; /* flow table rule per traffic type */ struct mlx5_flow_rule *ft_rule[MLX5E_NUM_TT]; }; diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c b/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c index 5607aad50da5..4e07f5424353 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c @@ -145,41 +145,17 @@ static void mlx5e_del_eth_addr_from_flow_table(struct mlx5e_priv *priv, struct mlx5e_eth_addr_info *ai) { - if (ai->tt_vec & (1 << MLX5E_TT_IPV6_IPSEC_ESP)) - mlx5_del_flow_rule(ai->ft_rule[MLX5E_TT_IPV6_IPSEC_ESP]); - - if (ai->tt_vec & (1 << MLX5E_TT_IPV4_IPSEC_ESP)) - mlx5_del_flow_rule(ai->ft_rule[MLX5E_TT_IPV4_IPSEC_ESP]); - - if (ai->tt_vec & (1 << MLX5E_TT_IPV6_IPSEC_AH)) - mlx5_del_flow_rule(ai->ft_rule[MLX5E_TT_IPV6_IPSEC_AH]); - - if (ai->tt_vec & (1 << MLX5E_TT_IPV4_IPSEC_AH)) - mlx5_del_flow_rule(ai->ft_rule[MLX5E_TT_IPV4_IPSEC_AH]); - - if (ai->tt_vec & (1 << MLX5E_TT_IPV6_TCP)) - mlx5_del_flow_rule(ai->ft_rule[MLX5E_TT_IPV6_TCP]); - - if (ai->tt_vec & (1 << MLX5E_TT_IPV4_TCP)) - mlx5_del_flow_rule(ai->ft_rule[MLX5E_TT_IPV4_TCP]); - - if (ai->tt_vec & (1 << MLX5E_TT_IPV6_UDP)) - mlx5_del_flow_rule(ai->ft_rule[MLX5E_TT_IPV6_UDP]); - - if (ai->tt_vec & (1 << MLX5E_TT_IPV4_UDP)) - mlx5_del_flow_rule(ai->ft_rule[MLX5E_TT_IPV4_UDP]); - - if (ai->tt_vec & (1 << MLX5E_TT_IPV6)) - mlx5_del_flow_rule(ai->ft_rule[MLX5E_TT_IPV6]); - - if (ai->tt_vec & (1 << MLX5E_TT_IPV4)) - mlx5_del_flow_rule(ai->ft_rule[MLX5E_TT_IPV4]); - - if (ai->tt_vec & (1 << MLX5E_TT_ANY)) - mlx5_del_flow_rule(ai->ft_rule[MLX5E_TT_ANY]); - - /* ensure the rules are not freed again */ - ai->tt_vec = 0; + mlx5_del_flow_rule(&ai->ft_rule[MLX5E_TT_IPV6_IPSEC_ESP]); + mlx5_del_flow_rule(&ai->ft_rule[MLX5E_TT_IPV4_IPSEC_ESP]); + mlx5_del_flow_rule(&ai->ft_rule[MLX5E_TT_IPV6_IPSEC_AH]); + mlx5_del_flow_rule(&ai->ft_rule[MLX5E_TT_IPV4_IPSEC_AH]); + mlx5_del_flow_rule(&ai->ft_rule[MLX5E_TT_IPV6_TCP]); + mlx5_del_flow_rule(&ai->ft_rule[MLX5E_TT_IPV4_TCP]); + mlx5_del_flow_rule(&ai->ft_rule[MLX5E_TT_IPV6_UDP]); + mlx5_del_flow_rule(&ai->ft_rule[MLX5E_TT_IPV4_UDP]); + mlx5_del_flow_rule(&ai->ft_rule[MLX5E_TT_IPV6]); + mlx5_del_flow_rule(&ai->ft_rule[MLX5E_TT_IPV4]); + mlx5_del_flow_rule(&ai->ft_rule[MLX5E_TT_ANY]); } static int @@ -319,7 +295,6 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_FS_ETH_FLOW_TAG, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; - ai->tt_vec |= BIT(MLX5E_TT_ANY); } mc_enable = MLX5_MATCH_OUTER_HEADERS; @@ -335,7 +310,6 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_FS_ETH_FLOW_TAG, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; - ai->tt_vec |= BIT(MLX5E_TT_IPV4); } if (tt_vec & BIT(MLX5E_TT_IPV6)) { @@ -348,7 +322,6 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_FS_ETH_FLOW_TAG, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; - ai->tt_vec |= BIT(MLX5E_TT_IPV6); } MLX5_SET_TO_ONES(fte_match_param, mc, outer_headers.ip_protocol); @@ -364,7 +337,6 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_FS_ETH_FLOW_TAG, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; - ai->tt_vec |= BIT(MLX5E_TT_IPV4_UDP); } if (tt_vec & BIT(MLX5E_TT_IPV6_UDP)) { @@ -377,7 +349,6 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_FS_ETH_FLOW_TAG, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; - ai->tt_vec |= BIT(MLX5E_TT_IPV6_UDP); } MLX5_SET(fte_match_param, mv, outer_headers.ip_protocol, IPPROTO_TCP); @@ -392,7 +363,6 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_FS_ETH_FLOW_TAG, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; - ai->tt_vec |= BIT(MLX5E_TT_IPV4_TCP); } if (tt_vec & BIT(MLX5E_TT_IPV6_TCP)) { @@ -405,8 +375,6 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_FS_ETH_FLOW_TAG, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; - - ai->tt_vec |= BIT(MLX5E_TT_IPV6_TCP); } MLX5_SET(fte_match_param, mv, outer_headers.ip_protocol, IPPROTO_AH); @@ -421,7 +389,6 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_FS_ETH_FLOW_TAG, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; - ai->tt_vec |= BIT(MLX5E_TT_IPV4_IPSEC_AH); } if (tt_vec & BIT(MLX5E_TT_IPV6_IPSEC_AH)) { @@ -434,7 +401,6 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_FS_ETH_FLOW_TAG, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; - ai->tt_vec |= BIT(MLX5E_TT_IPV6_IPSEC_AH); } MLX5_SET(fte_match_param, mv, outer_headers.ip_protocol, IPPROTO_ESP); @@ -449,7 +415,6 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_FS_ETH_FLOW_TAG, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; - ai->tt_vec |= BIT(MLX5E_TT_IPV4_IPSEC_ESP); } if (tt_vec & BIT(MLX5E_TT_IPV6_IPSEC_ESP)) { @@ -462,7 +427,6 @@ mlx5e_add_eth_addr_rule_sub(struct mlx5e_priv *priv, MLX5_FS_ETH_FLOW_TAG, &dest); if (IS_ERR_OR_NULL(*rule_p)) goto err_del_ai; - ai->tt_vec |= BIT(MLX5E_TT_IPV6_IPSEC_ESP); } return 0; @@ -503,73 +467,17 @@ add_eth_addr_rule_out: static void mlx5e_del_main_vxlan_rules(struct mlx5e_priv *priv) { - struct mlx5_flow_rule **ra = priv->fts.main_vxlan_rule, **r; - - r = &ra[MLX5E_TT_IPV6_IPSEC_ESP]; - if (*r != NULL) { - mlx5_del_flow_rule(*r); - *r = NULL; - } - - r = &ra[MLX5E_TT_IPV4_IPSEC_ESP]; - if (*r != NULL) { - mlx5_del_flow_rule(*r); - *r = NULL; - } - - r = &ra[MLX5E_TT_IPV6_IPSEC_AH]; - if (*r != NULL) { - mlx5_del_flow_rule(*r); - *r = NULL; - } - - r = &ra[MLX5E_TT_IPV4_IPSEC_AH]; - if (*r != NULL) { - mlx5_del_flow_rule(*r); - *r = NULL; - } - - r = &ra[MLX5E_TT_IPV6_TCP]; - if (*r != NULL) { - mlx5_del_flow_rule(*r); - *r = NULL; - } - - r = &ra[MLX5E_TT_IPV4_TCP]; - if (*r != NULL) { - mlx5_del_flow_rule(*r); - *r = NULL; - } - - r = &ra[MLX5E_TT_IPV6_UDP]; - if (*r != NULL) { - mlx5_del_flow_rule(*r); - *r = NULL; - } - - r = &ra[MLX5E_TT_IPV4_UDP]; - if (*r != NULL) { - mlx5_del_flow_rule(*r); - *r = NULL; - } - - r = &ra[MLX5E_TT_IPV6]; - if (*r != NULL) { - mlx5_del_flow_rule(*r); - *r = NULL; - } - - r = &ra[MLX5E_TT_IPV4]; - if (*r != NULL) { - mlx5_del_flow_rule(*r); - *r = NULL; - } - - r = &ra[MLX5E_TT_ANY]; - if (*r != NULL) { - mlx5_del_flow_rule(*r); - *r = NULL; - } + mlx5_del_flow_rule(&priv->fts.main_vxlan_rule[MLX5E_TT_IPV6_IPSEC_ESP]); + mlx5_del_flow_rule(&priv->fts.main_vxlan_rule[MLX5E_TT_IPV4_IPSEC_ESP]); + mlx5_del_flow_rule(&priv->fts.main_vxlan_rule[MLX5E_TT_IPV6_IPSEC_AH]); + mlx5_del_flow_rule(&priv->fts.main_vxlan_rule[MLX5E_TT_IPV4_IPSEC_AH]); + mlx5_del_flow_rule(&priv->fts.main_vxlan_rule[MLX5E_TT_IPV6_TCP]); + mlx5_del_flow_rule(&priv->fts.main_vxlan_rule[MLX5E_TT_IPV4_TCP]); + mlx5_del_flow_rule(&priv->fts.main_vxlan_rule[MLX5E_TT_IPV6_UDP]); + mlx5_del_flow_rule(&priv->fts.main_vxlan_rule[MLX5E_TT_IPV4_UDP]); + mlx5_del_flow_rule(&priv->fts.main_vxlan_rule[MLX5E_TT_IPV6]); + mlx5_del_flow_rule(&priv->fts.main_vxlan_rule[MLX5E_TT_IPV4]); + mlx5_del_flow_rule(&priv->fts.main_vxlan_rule[MLX5E_TT_ANY]); } static int @@ -857,28 +765,16 @@ mlx5e_del_vlan_rule(struct mlx5e_priv *priv, { switch (rule_type) { case MLX5E_VLAN_RULE_TYPE_UNTAGGED: - if (priv->vlan.untagged_ft_rule) { - mlx5_del_flow_rule(priv->vlan.untagged_ft_rule); - priv->vlan.untagged_ft_rule = NULL; - } + mlx5_del_flow_rule(&priv->vlan.untagged_ft_rule); break; case MLX5E_VLAN_RULE_TYPE_ANY_CTAG_VID: - if (priv->vlan.any_cvlan_ft_rule) { - mlx5_del_flow_rule(priv->vlan.any_cvlan_ft_rule); - priv->vlan.any_cvlan_ft_rule = NULL; - } + mlx5_del_flow_rule(&priv->vlan.any_cvlan_ft_rule); break; case MLX5E_VLAN_RULE_TYPE_ANY_STAG_VID: - if (priv->vlan.any_svlan_ft_rule) { - mlx5_del_flow_rule(priv->vlan.any_svlan_ft_rule); - priv->vlan.any_svlan_ft_rule = NULL; - } + mlx5_del_flow_rule(&priv->vlan.any_svlan_ft_rule); break; case MLX5E_VLAN_RULE_TYPE_MATCH_VID: - if (priv->vlan.active_vlans_ft_rule[vid]) { - mlx5_del_flow_rule(priv->vlan.active_vlans_ft_rule[vid]); - priv->vlan.active_vlans_ft_rule[vid] = NULL; - } + mlx5_del_flow_rule(&priv->vlan.active_vlans_ft_rule[vid]); mlx5e_vport_context_update_vlans(priv); break; default: @@ -1997,7 +1893,7 @@ mlx5e_del_vxlan_rule(struct mlx5e_priv *priv, sa_family_t family, u_int port) } if (el->installed) - mlx5_del_flow_rule(el->vxlan_ft_rule); + mlx5_del_flow_rule(&el->vxlan_ft_rule); TAILQ_REMOVE(&priv->vxlan.head, el, link); kvfree(el); return (0); @@ -2011,7 +1907,7 @@ mlx5e_del_all_vxlan_rules(struct mlx5e_priv *priv) TAILQ_FOREACH(el, &priv->vxlan.head, link) { if (!el->installed) continue; - mlx5_del_flow_rule(el->vxlan_ft_rule); + mlx5_del_flow_rule(&el->vxlan_ft_rule); el->installed = false; } } @@ -2019,7 +1915,7 @@ mlx5e_del_all_vxlan_rules(struct mlx5e_priv *priv) static void mlx5e_del_vxlan_catchall_rule(struct mlx5e_priv *priv) { - mlx5_del_flow_rule(priv->fts.vxlan_catchall_ft_rule); + mlx5_del_flow_rule(&priv->fts.vxlan_catchall_ft_rule); } void diff --git a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c index b509bc9982fc..019fbff7b940 100644 --- a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c +++ b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c @@ -2124,13 +2124,13 @@ static int mlx5_ib_destroy_flow(struct ib_flow *flow_id) mutex_lock(&dev->flow_db.lock); list_for_each_entry_safe(iter, tmp, &handler->list, list) { - mlx5_del_flow_rule(iter->rule); + mlx5_del_flow_rule(&iter->rule); put_flow_table(dev, iter->prio, true); list_del(&iter->list); kfree(iter); } - mlx5_del_flow_rule(handler->rule); + mlx5_del_flow_rule(&handler->rule); put_flow_table(dev, handler->prio, true); mutex_unlock(&dev->flow_db.lock); @@ -2295,7 +2295,7 @@ static struct mlx5_ib_flow_handler *create_dont_trap_rule(struct mlx5_ib_dev *de handler_dst = create_flow_rule(dev, ft_prio, flow_attr, dst); if (IS_ERR(handler_dst)) { - mlx5_del_flow_rule(handler->rule); + mlx5_del_flow_rule(&handler->rule); ft_prio->refcount--; kfree(handler); handler = handler_dst; @@ -2358,7 +2358,7 @@ static struct mlx5_ib_flow_handler *create_leftovers_rule(struct mlx5_ib_dev *de &leftovers_specs[LEFTOVERS_UC].flow_attr, dst); if (IS_ERR(handler_ucast)) { - mlx5_del_flow_rule(handler->rule); + mlx5_del_flow_rule(&handler->rule); ft_prio->refcount--; kfree(handler); handler = handler_ucast; @@ -2400,7 +2400,7 @@ static struct mlx5_ib_flow_handler *create_sniffer_rule(struct mlx5_ib_dev *dev, return handler_rx; err_tx: - mlx5_del_flow_rule(handler_rx->rule); + mlx5_del_flow_rule(&handler_rx->rule); ft_rx->refcount--; kfree(handler_rx); err: From nobody Sun Apr 30 06:58:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HHC0VG4z48sV6; Sun, 30 Apr 2023 06:58:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8HHB5fKHz3Nkk; Sun, 30 Apr 2023 06:58:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=662WUmzoeoGtEkpdv6avgWkNjlPctwHjqw/2JTyRZ5w=; b=yhAb3V4xCB8Ew7j5IeO6xHK5Z+AxceY/yXyeTUJe9412VdqxamRfSPE/kWzFn/ODwY8hfW +V78n6kVdn58TEZNCVyxFnjqyx8dHwYkqrotq4Gier0/MJrubGffiUabc7dYkAw6RxyTL8 nd0DjmJZS996SMKiTlQ2nK6GJ72/Bbv/UEfSSRo1iBJ0vUkShDiecnER6Du6z/C0MgLLqb ltq7Qx/4QUz4mhx27XQm5VNNhKDplfjwkF2TSQsIw6rPM7DuRG86wfMpxkeZ+U7vcJ/TjZ 8uJjz5aTjYuh3XGmYXaarfatnm/Vi8xbj0P5R7tpP1mpFaeGZ/HhKHVvAeTp9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=662WUmzoeoGtEkpdv6avgWkNjlPctwHjqw/2JTyRZ5w=; b=V58AWLi5SbWoUTlDHR1mnYag48bwQXPBi2MEXewyjLm2wXr/9IS9EYEwv6D7vVigyNGLhd f8LlsoEShBamxPP8uYqSl9+FDQfdiEITVfyNjK9ntlPy1LemMB/jTcWbuu76hjo5xlDJsm nVOF4+fwPZBUbgh/mvGC+UnhyRjKepU7o3Dw0mXMKgpUP0KVz5gPij426PYaajTqJU9X6d k/ExR1jMb6B/aXyyp3+mulrfng9EHP36BgYlWrXaNUXQwmyqRDKuqkaZAmqNCTMVFQtr2X QEGyEOJEeOlPt3al0FieyIQDpolmjmLMESrK/TK9LO6KNp+WirFhxAFo+sw0TA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837894; a=rsa-sha256; cv=none; b=IIFMh5FWkiUpQTtY9N6omZd4+x3cLq3rT/3VXRoYeYpHZcUsS8Q9nddwSGxY0ek6ZRtVMT UdhoeeooELMRJvUtF26dqGMexBuqjveiWOdBtIoNgDa1P4V1413KIfyDGENyYtX/wJ02i0 s4UFNX+DXQSkj24J7noA9Yw0vJl2Ecm8hBa7J1QjMA4ASO1nuJys+/bV82LMgewPwajmF+ YpmhOw3zhoXqGyhpCpG9SfyfPKtc/AjgrMt6mlOcggECDz/GB4ViIzgi0akWFp/MB2Qf3B y2Z5CsGXP9OfD9CDMIII7B8ojki5vwnFcDNw+0tZNoAp5Qc0ROxX89qIInqeIA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HHB4kzMz1CvK; Sun, 30 Apr 2023 06:58:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6wElT071940; Sun, 30 Apr 2023 06:58:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6wEc8071939; Sun, 30 Apr 2023 06:58:14 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:58:14 GMT Message-Id: <202304300658.33U6wEc8071939@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: e6f76b5b4d36 - stable/13 - mlx5: Fix duplicate free of default flow rule in error case. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e6f76b5b4d3675841b8ea4ffedfdd5a5469ae051 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=e6f76b5b4d3675841b8ea4ffedfdd5a5469ae051 commit e6f76b5b4d3675841b8ea4ffedfdd5a5469ae051 Author: Hans Petter Selasky AuthorDate: 2023-04-18 11:17:38 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:19 +0000 mlx5: Fix duplicate free of default flow rule in error case. Sponsored by: NVIDIA Networking (cherry picked from commit 2f7e9a8a21367393b613f0f150d49009fa74dd5c) --- sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c b/sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c index 4dceaea7ea72..54693e01ae1a 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_fs_tcp.c @@ -341,8 +341,6 @@ accel_fs_tcp_destroy_table(struct mlx5e_priv *priv, int i) fs_tcp = &priv->fts.accel_tcp; ft = fs_tcp->tables + i; - mlx5_del_flow_rule(&fs_tcp->default_rules[i]); - accel_fs_tcp_destroy_groups(ft); kfree(ft->g); ft->g = NULL; @@ -358,8 +356,10 @@ mlx5e_accel_fs_tcp_destroy(struct mlx5e_priv *priv) if (!MLX5_CAP_FLOWTABLE_NIC_RX(priv->mdev, ft_field_support.outer_ip_version)) return; - for (i = 0; i < MLX5E_ACCEL_FS_TCP_NUM_TYPES; i++) + for (i = 0; i < MLX5E_ACCEL_FS_TCP_NUM_TYPES; i++) { + mlx5_del_flow_rule(&priv->fts.accel_tcp.default_rules[i]); accel_fs_tcp_destroy_table(priv, i); + } } int From nobody Sun Apr 30 06:58:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HHD0BdGz48sBg; Sun, 30 Apr 2023 06:58:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8HHC6Wnbz3P18; Sun, 30 Apr 2023 06:58:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6ugO0Nju/m9CmbxYsywlnr95Has3nD2Kl6h2z1aHCdQ=; b=ilIJFIU6Jw+T4SLnPwUJ4Hbrwyny3SopciuFr+Xib/0Xg01vMh+b1CvtTndd72ScEd8cz8 U9OdsE02CDtUhvKl5HAc/orR40wVnyWsL9BurNo9tNqpTIViu+56M5jSGFyXQMvRWwqUDO P8ZhfDSz9WLrZCQN4G9zeDDF2nxgKp5bSNSgeLpedqTBnGtjXqrG9QACfO4DYOMMXgBt3q 8mC5IE/1D1popKJe1F5sWNX0luumaGWUppese3fuYrgDKK0ZhhrHZP5Ll56Sw3inKdjNA1 ThuqTvue99bJHVoKb/hR4yk284kRuDkMZppqh5tudIHsr+Uipp5W15fresXGzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6ugO0Nju/m9CmbxYsywlnr95Has3nD2Kl6h2z1aHCdQ=; b=vaDRfwC9hD/Py38vAeLtFpFQQyA9kXO44cIFFT+kVxz2H2FmFpMQZs4eZozS7RyMqjFc4f UE8Cu5Lyfekq8LWDyW5QBf1as25H/FPQAQeFtxWFt1RTTMAqkK9/v97WbeaIkKAfnDSzZc Sg1LAx3A6HYCadjU6IhdMnsVCx1xRbAhJ/g1VR61Gk7721UtkiqOXwWl7HUU9vTV2ZPWMA np72Zw62eo43G82O/NN8HraDfh10ppoE/wSDjGEtIVuEjiqY9UxeXnGpWtcxUgum9OKfWk L8UUta1h9111LZtVatYWVLL73YpF+P/Su2sgMWBsFXVQN60I3u+jz0IPAGM/qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837895; a=rsa-sha256; cv=none; b=puIKSqa0S9g0UQ6Wunpu0GIpDHxSGpoI3xjvBlmBY/QFQlJEB65PUPYS/q+HDPndj5n9mT /yo9HrVWmCeQioSFK98xaL66S0+sKhWekl4j/R+eGCZGIPCofPmxeFH9UZAkI4HK8BEWmM 3Mq5dqkBz028TPN4DOgk5RXEqddzSjL9kbLitcqSR99D0LtfRvXaC7071Hea4/N2fl/4D5 V11n4dNNGHvtl0hgJjNtecHInWMoufgI4kXKS8EyUni/UfcrIyYnT6t17b/YoSRv/sqPHi sMfqciAMq1U7rfpTlM6YRFiJwnWs8XzYdA0HvoDrK7WNtW246KiWrXQVdCjZHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HHC5cslzDrB; Sun, 30 Apr 2023 06:58:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6wFPA071959; Sun, 30 Apr 2023 06:58:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6wFSn071958; Sun, 30 Apr 2023 06:58:15 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:58:15 GMT Message-Id: <202304300658.33U6wFSn071958@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 3d052f97cef5 - stable/13 - mlx5: Make MLX5_COMP_EQ_SIZE tunable. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3d052f97cef570f0b65b8c93936e690af6d37acb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=3d052f97cef570f0b65b8c93936e690af6d37acb commit 3d052f97cef570f0b65b8c93936e690af6d37acb Author: Hans Petter Selasky AuthorDate: 2023-04-18 11:11:02 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:19 +0000 mlx5: Make MLX5_COMP_EQ_SIZE tunable. When using hardware pacing, this value can be increased, because more SQ's means more EQ events aswell. Make it tunable, hw.mlx5.comp_eq_size . Sponsored by: NVIDIA Networking (cherry picked from commit 3bb3e4768ff854b88ba0a7d129edad49f15d7ce3) --- sys/dev/mlx5/driver.h | 4 ---- sys/dev/mlx5/mlx5_core/mlx5_main.c | 23 ++++++++++++++++++++++- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/sys/dev/mlx5/driver.h b/sys/dev/mlx5/driver.h index e1766ae8a742..cdf8deb34a6c 100644 --- a/sys/dev/mlx5/driver.h +++ b/sys/dev/mlx5/driver.h @@ -831,10 +831,6 @@ struct mlx5_core_dct { u16 uid; }; -enum { - MLX5_COMP_EQ_SIZE = 1024, -}; - enum { MLX5_PTYS_IB = 1 << 0, MLX5_PTYS_EN = 1 << 2, diff --git a/sys/dev/mlx5/mlx5_core/mlx5_main.c b/sys/dev/mlx5/mlx5_core/mlx5_main.c index 431a277119cf..9862b9ecec56 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_main.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_main.c @@ -86,6 +86,11 @@ SYSCTL_INT(_hw_mlx5, OID_AUTO, fast_unload_enabled, CTLFLAG_RWTUN, &mlx5_fast_unload_enabled, 0, "Set to enable fast unload. Clear to disable."); +static int mlx5_core_comp_eq_size = 1024; +SYSCTL_INT(_hw_mlx5, OID_AUTO, comp_eq_size, CTLFLAG_RDTUN | CTLFLAG_MPSAFE, + &mlx5_core_comp_eq_size, 0, + "Set default completion EQ size between 1024 and 16384 inclusivly. Value should be power of two."); + static LIST_HEAD(intf_list); static LIST_HEAD(dev_list); static DEFINE_MUTEX(intf_mutex); @@ -180,6 +185,22 @@ static struct mlx5_profile profiles[] = { }, }; +static int +mlx5_core_get_comp_eq_size(void) +{ + int value = mlx5_core_comp_eq_size; + + if (value < 1024) + value = 1024; + else if (value > 16384) + value = 16384; + + /* make value power of two, rounded down */ + while (value & (value - 1)) + value &= (value - 1); + return (value); +} + static void mlx5_set_driver_version(struct mlx5_core_dev *dev) { const size_t driver_ver_sz = @@ -688,7 +709,7 @@ static int alloc_comp_eqs(struct mlx5_core_dev *dev) INIT_LIST_HEAD(&table->comp_eqs_list); ncomp_vec = table->num_comp_vectors; - nent = MLX5_COMP_EQ_SIZE; + nent = mlx5_core_get_comp_eq_size(); for (i = 0; i < ncomp_vec; i++) { eq = kzalloc_node(sizeof(*eq), GFP_KERNEL, dev->priv.numa_node); From nobody Sun Apr 30 06:58:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HHF3RRfz48sF1; Sun, 30 Apr 2023 06:58:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8HHF0f0Tz3NyW; Sun, 30 Apr 2023 06:58:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WuW/Iy1nr01Dig6ZIV/rWk5li1IR4AHByofrcNXc1l8=; b=iLOOxYxIsPn/22EJUoij+i6QSN0b5EoEVdSzbeGuipp7vx+26hk1PyAjA6geWzonRLrMds ClabK4HUYlS9iYCh/hoynLC3HQ0ynRlz7A45AyKqJ+9PWPYDD4VSWXspm5Dxv23m43UtYb 9PeAzWRQseDqgSL0mtpAcrFm658c89WsfAgos75sgwF2U3HbvDqX/HTe/Oi0++qNLkE+Pl YtN3OsUUDp8C82vZBsRg4sI4JCa/WeOA//wFqNCxMxYrZbqKt/JMN55BPCRdjO/GW0UT9c p2OVkOAGCpp3DQytrzQvyRIRXQzl7MNqJ22RMCF5VmtLQs2Oyz6T7q4KJA5CGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WuW/Iy1nr01Dig6ZIV/rWk5li1IR4AHByofrcNXc1l8=; b=vXPa8wosA1JIgjea4P/57xK/3zQmxi66hx9SUqcm26/tEGjaGtw0U8131qwu/mwyFrTaHG q+03v+8I9nGHF2VvihrfAcSUX2Pw+tFfT8ktBcUSw42yFFWiWOvmt5veLaeQMlcr94gd+X siEa9i9svhBecU5D9U0Z0hhkMD2JBcecDMkPmCk2sxTdMxxs34QACQMOwvf75XXCYzaZ77 UtGpAziW7V+s9HXuXQRMQIi02ZFjpEcAmmYCz18I4Ap3PaSr8KPncnYYFbtuyrjJoy3efA gx1CPeGRzLOUekTgNhtKxPzv0BEcfOgE8D8n3zAFpJsVA/JGgRXUJpqLIXVc9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837897; a=rsa-sha256; cv=none; b=gMWAG166QwJ+HeiH/mX7DymGgSSbKrf4fFLHrUj9UyWYvac/lMLRZHtBrj3V18WrrYW8N3 5CGAyLTliz3+EUtsAGah3UbgLtRadUCzjm2Kjv7CNWvVVtbXWqTCOLU1v8fwjtXw8HCCrt xOIt3I2v8bPKSCqjXLV9HX4VeLadOxTjfHbwBXGQz+rnJFzLu5/fDe3B5LqC+MyxLikZiz Tnlz3j8w5578hwkwCSF/864ZPGJVrF26S2jrj3YNhE0RBGGIq/Vw8Dk1K62lu6AnRO7Abv IXxAFnhXt2zh6t2+Q6soAvK5c9n6N846B8anYlFNEbxTur6NXTHsdHh+ayLGeA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HHD6ZpFzDhW; Sun, 30 Apr 2023 06:58:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6wGtK071980; Sun, 30 Apr 2023 06:58:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6wGom071979; Sun, 30 Apr 2023 06:58:16 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:58:16 GMT Message-Id: <202304300658.33U6wGom071979@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 4c002f0842e5 - stable/13 - mlx5: Implement mlx5_core_modify_cq_by_mask(). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4c002f0842e58bb00ed00e680f637e4aa7fb1bcc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=4c002f0842e58bb00ed00e680f637e4aa7fb1bcc commit 4c002f0842e58bb00ed00e680f637e4aa7fb1bcc Author: Hans Petter Selasky AuthorDate: 2023-04-18 11:21:28 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:19 +0000 mlx5: Implement mlx5_core_modify_cq_by_mask(). Implement one CQ modify function supporting all firmware versions, instead of having more variants of CQ modify. Sponsored by: NVIDIA Networking (cherry picked from commit 273bfac08ff838786c8b48bc7d3d7180b5f6a3be) --- sys/dev/mlx5/cq.h | 5 +++++ sys/dev/mlx5/mlx5_core/mlx5_cq.c | 44 +++++++++++++++++++++++----------------- 2 files changed, 30 insertions(+), 19 deletions(-) diff --git a/sys/dev/mlx5/cq.h b/sys/dev/mlx5/cq.h index d5e167498fd2..ffa98c38bee9 100644 --- a/sys/dev/mlx5/cq.h +++ b/sys/dev/mlx5/cq.h @@ -86,6 +86,7 @@ enum { MLX5_CQ_MODIFY_PERIOD = 1 << 0, MLX5_CQ_MODIFY_COUNT = 1 << 1, MLX5_CQ_MODIFY_OVERRUN = 1 << 2, + MLX5_CQ_MODIFY_EQN = 1 << 3, MLX5_CQ_MODIFY_PERIOD_MODE = 1 << 4, }; @@ -169,6 +170,10 @@ int mlx5_core_modify_cq_moderation_mode(struct mlx5_core_dev *dev, u16 cq_period, u16 cq_max_count, u8 cq_mode); +int mlx5_core_modify_cq_by_mask(struct mlx5_core_dev *, + struct mlx5_core_cq *, u32 mask, + u16 cq_period, u16 cq_max_count, + u8 cq_mode, u8 cq_eqn); int mlx5_debug_cq_add(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq); void mlx5_debug_cq_remove(struct mlx5_core_dev *dev, struct mlx5_core_cq *cq); diff --git a/sys/dev/mlx5/mlx5_core/mlx5_cq.c b/sys/dev/mlx5/mlx5_core/mlx5_cq.c index 8f873bde6073..e849663528b2 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_cq.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_cq.c @@ -219,18 +219,9 @@ int mlx5_core_modify_cq_moderation(struct mlx5_core_dev *dev, u16 cq_period, u16 cq_max_count) { - u32 in[MLX5_ST_SZ_DW(modify_cq_in)] = {0}; - void *cqc; - - MLX5_SET(modify_cq_in, in, cqn, cq->cqn); - cqc = MLX5_ADDR_OF(modify_cq_in, in, cq_context); - MLX5_SET(cqc, cqc, cq_period, cq_period); - MLX5_SET(cqc, cqc, cq_max_count, cq_max_count); - MLX5_SET(modify_cq_in, in, - modify_field_select_resize_field_select.modify_field_select.modify_field_select, - MLX5_CQ_MODIFY_PERIOD | MLX5_CQ_MODIFY_COUNT); - - return mlx5_core_modify_cq(dev, cq, in, sizeof(in)); + return (mlx5_core_modify_cq_by_mask(dev, cq, + MLX5_CQ_MODIFY_PERIOD | MLX5_CQ_MODIFY_COUNT, + cq_period, cq_max_count, 0, 0)); } int mlx5_core_modify_cq_moderation_mode(struct mlx5_core_dev *dev, @@ -239,19 +230,34 @@ int mlx5_core_modify_cq_moderation_mode(struct mlx5_core_dev *dev, u16 cq_max_count, u8 cq_mode) { - u32 in[MLX5_ST_SZ_DW(modify_cq_in)] = {0}; + return (mlx5_core_modify_cq_by_mask(dev, cq, + MLX5_CQ_MODIFY_PERIOD | MLX5_CQ_MODIFY_COUNT | MLX5_CQ_MODIFY_PERIOD_MODE, + cq_period, cq_max_count, cq_mode, 0)); +} + +int +mlx5_core_modify_cq_by_mask(struct mlx5_core_dev *dev, + struct mlx5_core_cq *cq, u32 mask, + u16 cq_period, u16 cq_max_count, u8 cq_mode, u8 cq_eqn) +{ + u32 in[MLX5_ST_SZ_DW(modify_cq_in)] = {}; void *cqc; MLX5_SET(modify_cq_in, in, cqn, cq->cqn); cqc = MLX5_ADDR_OF(modify_cq_in, in, cq_context); - MLX5_SET(cqc, cqc, cq_period, cq_period); - MLX5_SET(cqc, cqc, cq_max_count, cq_max_count); - MLX5_SET(cqc, cqc, cq_period_mode, cq_mode); + if (mask & MLX5_CQ_MODIFY_PERIOD) + MLX5_SET(cqc, cqc, cq_period, cq_period); + if (mask & MLX5_CQ_MODIFY_COUNT) + MLX5_SET(cqc, cqc, cq_max_count, cq_max_count); + if (mask & MLX5_CQ_MODIFY_PERIOD_MODE) + MLX5_SET(cqc, cqc, cq_period_mode, cq_mode); + if (mask & MLX5_CQ_MODIFY_EQN) + MLX5_SET(cqc, cqc, c_eqn, cq_eqn); + MLX5_SET(modify_cq_in, in, - modify_field_select_resize_field_select.modify_field_select.modify_field_select, - MLX5_CQ_MODIFY_PERIOD | MLX5_CQ_MODIFY_COUNT | MLX5_CQ_MODIFY_PERIOD_MODE); + modify_field_select_resize_field_select.modify_field_select.modify_field_select, mask); - return mlx5_core_modify_cq(dev, cq, in, sizeof(in)); + return (mlx5_core_modify_cq(dev, cq, in, sizeof(in))); } int mlx5_init_cq_table(struct mlx5_core_dev *dev) From nobody Sun Apr 30 06:58:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HHG6YPPz48sSD; Sun, 30 Apr 2023 06:58: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 4Q8HHG16sqz3Nyd; Sun, 30 Apr 2023 06:58:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N4OgmsG0GUacdTUTM+mS2qO6odQKaQA59WnaXtEF5yk=; b=r29vOzlL0M3tAyZKXf7Zq7vsqidFa+SIq01OsA1F+2LxJL32LWLfM7YEe/Wxn45x8pdHJo BWxTACD/hH0PauIcHHLHuAzmaPQh7huiPCn5kXh9tp/Sk/75uLqW/BsHtkX41hLYf9pOEL XVLOezvM28yQFnw67cnxoXfUPTk8eCJc96FRukSR6wMT1cUz7gvav+bej+fkzwT7C9rtSc k3tpL3YtXg6Vvr6ILz9YwPMJ5U+dkYgP/IQSgEHL11lwj54ez1cnkNALAerotYBlLvZSv1 T7qdbO6dexAEUte+Pg4XF7r3Ip02xMudon4AUZvDS/L5lH75AEl3SGQTlSWhfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N4OgmsG0GUacdTUTM+mS2qO6odQKaQA59WnaXtEF5yk=; b=kg7YhDQuZyEWIsyU0KcpysehOFh3wZ2MIrrNIKnN30nYdSdpTgpqPJbd4AeC1nLubBzjbz 33brSLGcHuLbRy/CZ1NivVhFAEiSdqqVwum5dfed1dqzsEgqq0KAva94cnz6tezgrUL8z4 YyF5fmYQp+ar/hBDCUXcs0rLtuHHQCSB9viLpQl2MGshwADioWRmmLd/6DB2GmAVehe98W RAGzESHgNzBjCo7FcjrncXHDweLnQhxgtN+Beq+aRiPm+iKdIGuXzvPa9Q7a1UcpC5FQzl 9uUyrUFtst0UUatr8WlU4tNlPyrLm6cug1y78KQrq5jtcSg29fwMOeCU61tUpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837898; a=rsa-sha256; cv=none; b=Eg5eVn7aAGPouPMz/NBuBos7v2JoXxxhxIcTUhhhgFY34tmlGeYCMKTQP3t1Uh+eW9E7Tg PQEM6OqA4KudOkbpQ6upLfZsJIRLoBpjNNKcEIg7Lnnh24TXEI/HQKsI/WW+gzrF43rD4W QKdD5/jPt9QrpK6Gy4bNYIWXey8hN0YIcXusFJlptpnqi2s+sgvzEbcsuELjfiHl2dSDvK y2NM2x9hsGdBCS4l1emshCbf91LRYh33U8+U1FvyS69aLTJh6zAe7ESJjpAS/wjGe9LoyP 4uaY4hM1Rz/wU2rhQ10bCdYIpMq1Y8cSxvE0tXss8y47+QAP+rxGQ/79RWFejg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HHG0CFCzDhX; Sun, 30 Apr 2023 06:58:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6wHdj072004; Sun, 30 Apr 2023 06:58:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6wHTt072003; Sun, 30 Apr 2023 06:58:17 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:58:17 GMT Message-Id: <202304300658.33U6wHTt072003@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 699eed180783 - stable/13 - mlx5: Don't give zero number of pages to the firmware. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 699eed1807838c743f8ce804b23c61e4ca51f3e8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=699eed1807838c743f8ce804b23c61e4ca51f3e8 commit 699eed1807838c743f8ce804b23c61e4ca51f3e8 Author: Hans Petter Selasky AuthorDate: 2023-04-18 11:22:41 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:19 +0000 mlx5: Don't give zero number of pages to the firmware. Can happen when using virtual mlx5_core functions, VFs. Sponsored by: NVIDIA Networking (cherry picked from commit 95bf70a4bf7982091bb59200bc2db2cb5cd840d7) --- sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c b/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c index d298da67057a..730c7ee8bee9 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_pagealloc.c @@ -509,7 +509,10 @@ int mlx5_satisfy_startup_pages(struct mlx5_core_dev *dev, int boot) mlx5_core_dbg(dev, "requested %d %s pages for func_id 0x%x\n", npages, boot ? "boot" : "init", func_id); - return give_pages(dev, func_id, npages, 0); + if (npages > 0) + return give_pages(dev, func_id, npages, 0); + else + return 0; } enum { From nobody Sun Apr 30 06:58:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HHH3Hf9z48sK9; Sun, 30 Apr 2023 06:58:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8HHH2Pfxz3P5K; Sun, 30 Apr 2023 06:58:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jc+aisS45ZlIsO9gpFEURqYehX2hxlSbgs6Z4DIfoDA=; b=ccXCZ5s9FRLBB8xhPOFvg3nIcLGK+XrcmlydC6H4ykT6rEKjOIBzsN2JCMVKJQRNn+p3KH rCSxiYWLwdH9Zk9K6Bqkyapos8pFW4Na1OxWtCkf0TawbjVB3v+2GfXtQWVCPjsq+OA/QF ULGyKqm/RCJsNoFlaVnMMoT2O4A0LfwqZc5HCM54y+LnRgYcKujJlv6kFHUQiOMjJYodsf m7VowbYkwFou1ILJtvDOVYUWMhQSrh0GCWSAliglGiakzWWPss9CzQPh9pZB/Mxp1OR34k RfvqryO6TSxyu2l5i0BkMV64iTMKVoL8vwQYfxmP+jHIzzuSOsSsfBJRuajnxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jc+aisS45ZlIsO9gpFEURqYehX2hxlSbgs6Z4DIfoDA=; b=TxE2V44QD081TG3EmZ2/o5MJC4FVqrU/yMLUcb7Ncam5Jc57UbDzaNPbUdWWAezay+0Qci dOEdkzM5S/k5EypG6oPY10jF25ofH/zyE2M6JmTToGhFQn3D5tOy2fvIij0do20pYXQE68 eu189jS4qohQD+Xk31Qny7KDTdS9RRIQDv5G5T31ikYs2I8/xKw4saT5RYSG2mSVQrlW/E Cq/2BXzKqCy1ryDtZvHQhM3AbjkaOyTNkdNzZ571RYTPp6vsgHEJ+SQACPSfAEKycA0fVt EYCRIL0itMKkFp775E9F8Gz8mA2CvSY1s4L/Wg62ZGqXrTbiKJ9MzVz9vP+Wjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837899; a=rsa-sha256; cv=none; b=FYn+HGGQwkS7+h3JKlrZtDQSHJLXwUk3dBuN20x6a7p5rdG6xlLA+/z2tFpzB2Wfn3+t8s jhNt38lPi5pWLH6ghYr7s47rukCcUXfwyMXmptOOQCadgS5wKycoYDJkrfTIAzDrUOjdxP Lje+zAVWZiBt3Pfsr+WzIwVdSOkEhJJMjP9v1zdW6RfxLollZ4rQoMBjDCqB167yXzOm5b lb3AfnybKGZAyQ42TBjpXyHa5YFtqrsTNjw2S0fuphk9uAoL6wDSy5ei8CC9EP1+hprIHs A7Kcdj+KZLWoSeVmQYBRhvcsEHxwaDTYjdBvB490vSBfXKMFb45M7fQB44Pfhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HHH1V4mzDrC; Sun, 30 Apr 2023 06:58:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6wJaV072026; Sun, 30 Apr 2023 06:58:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6wJ0p072025; Sun, 30 Apr 2023 06:58:19 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:58:19 GMT Message-Id: <202304300658.33U6wJ0p072025@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 9162793e44f0 - stable/13 - mlx5: Remove unused debugfs node pointers. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9162793e44f0d219750647fbbe90d50628b9cca5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=9162793e44f0d219750647fbbe90d50628b9cca5 commit 9162793e44f0d219750647fbbe90d50628b9cca5 Author: Hans Petter Selasky AuthorDate: 2023-04-18 11:40:22 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:20 +0000 mlx5: Remove unused debugfs node pointers. No functional change intended. Sponsored by: NVIDIA Networking (cherry picked from commit 80b4ef6d10544d30b6cfeddca12ae28d81816201) --- sys/dev/mlx5/driver.h | 19 +------------------ sys/dev/mlx5/mlx5_ib/mlx5_ib.h | 7 ------- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/sys/dev/mlx5/driver.h b/sys/dev/mlx5/driver.h index cdf8deb34a6c..f5fc7b09167d 100644 --- a/sys/dev/mlx5/driver.h +++ b/sys/dev/mlx5/driver.h @@ -177,7 +177,6 @@ enum { }; struct mlx5_field_desc { - struct dentry *dent; int i; }; @@ -185,7 +184,6 @@ struct mlx5_rsc_debug { struct mlx5_core_dev *dev; void *object; enum dbg_rsc_type type; - struct dentry *root; struct mlx5_field_desc fields[0]; }; @@ -248,12 +246,6 @@ struct mlx5_fw_page { #define mlx5_cmd_msg mlx5_fw_page struct mlx5_cmd_debug { - struct dentry *dbg_root; - struct dentry *dbg_in; - struct dentry *dbg_out; - struct dentry *dbg_outlen; - struct dentry *dbg_status; - struct dentry *dbg_run; void *in_msg; void *out_msg; u8 status; @@ -287,9 +279,6 @@ enum mlx5_cmd_mode { struct mlx5_cmd_stats { u64 sum; u64 n; - struct dentry *root; - struct dentry *avg; - struct dentry *count; /* protect command average calculations */ spinlock_t lock; }; @@ -589,10 +578,7 @@ struct mlx5_priv { /* start: qp staff */ struct mlx5_qp_table qp_table; - struct dentry *qp_debugfs; - struct dentry *eq_debugfs; - struct dentry *cq_debugfs; - struct dentry *cmdif_debugfs; + /* end: qp staff */ /* start: cq staff */ @@ -609,7 +595,6 @@ struct mlx5_priv { struct mutex pgdir_mutex; struct list_head pgdir_list; /* end: alloc staff */ - struct dentry *dbg_root; /* protect mkey key part */ spinlock_t mkey_lock; @@ -901,8 +886,6 @@ static inline struct mlx5_core_dev *pci2mlx5_core_dev(struct pci_dev *pdev) return pci_get_drvdata(pdev); } -extern struct dentry *mlx5_debugfs_root; - static inline u16 fw_rev_maj(struct mlx5_core_dev *dev) { return ioread32be(&dev->iseg->fw_rev) & 0xffff; diff --git a/sys/dev/mlx5/mlx5_ib/mlx5_ib.h b/sys/dev/mlx5/mlx5_ib/mlx5_ib.h index 47f9cc12d51a..2a8a6e4d0a50 100644 --- a/sys/dev/mlx5/mlx5_ib/mlx5_ib.h +++ b/sys/dev/mlx5/mlx5_ib/mlx5_ib.h @@ -576,7 +576,6 @@ struct mlx5_cache_ent { spinlock_t lock; - struct dentry *dir; char name[4]; u32 order; u32 size; @@ -584,11 +583,6 @@ struct mlx5_cache_ent { u32 miss; u32 limit; - struct dentry *fsize; - struct dentry *fcur; - struct dentry *fmiss; - struct dentry *flimit; - struct mlx5_ib_dev *dev; struct work_struct work; struct delayed_work dwork; @@ -599,7 +593,6 @@ struct mlx5_mr_cache { struct workqueue_struct *wq; struct mlx5_cache_ent ent[MAX_MR_CACHE_ENTRIES]; int stopped; - struct dentry *root; unsigned long last_add; }; From nobody Sun Apr 30 06:58:20 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HHJ4JPrz48sBq; Sun, 30 Apr 2023 06:58: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 4Q8HHJ3RnTz3PHQ; Sun, 30 Apr 2023 06:58:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837900; h=from:from:reply-to:subject:subject: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+rYSulscsbK+XnkbVRd7x11dd2GIqH1Lyc/Xrfouvs=; b=MwdvJklLopOqBJ5ybUUpOfWYuQcWZ0vIQZBjdVZDojL0yK9n0suPj1s9gK0UjstpCGtRPB q9Trnf6hb851DX6EQ8mUkkb++UeK3Yk++HubBw+gVTfo/rPp0eDPJUc8B4GU0VriZiKrhW 1AwlKsel8ECsFE8vHatR9xcq6k3dj31VqrCcMLGT8gLUl4dXdUxaR6Xix32G3hXsprl+zp 270o8R08kNudEJCWzr7bH1bkGPpCqF47TRehLSuHw0uso13a0tf5W58ZVPaEy2XxOkSZyV vD/0okWcwaBxAEuyE6moTBoUG1h5EjE2JsomUQUDwnw6Yk4719quxY0mp7hRRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837900; h=from:from:reply-to:subject:subject: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+rYSulscsbK+XnkbVRd7x11dd2GIqH1Lyc/Xrfouvs=; b=AMf2FBZmEZy4aXsLLTdjuqrsdUSDRywEcEgvpS1mI3Zk0QZ5BJE9qwk+GqXQJg8ltbcwwv pyi3xr0ECxxr6UldSlW3Nr9fXxKdfVLAmNXU3zU5kU11lpHosXiNkRR9XO/8bPdwCL9X9s eebr4yXf601sccaoZnbD4lC0HpLFAUuB6SP28f8PYNFc7uJ4ZlgOZijyQwe5aONoZ54+3V /ftUNZhl7YMOeORcoXgDdPjpQmPFb6Ox7uIIzLKI4WxqMcsf8NFc1NqHAPnm+TTU9iQLBz egUfhTQXHPtpQQ4sHdVZJ06DIx/GaPVmkQHWuBn+pZI0Y/0/9WxWqxkmFmN1Qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837900; a=rsa-sha256; cv=none; b=dSgSiqOhxTgwRSuIY7xGnrVK1wKOckP31ni549AIEhh+G2DJhobGeGOZ0ln3CPbV9gvAR+ 84cEuIIRfVgqd61IhrQ3aUuRedBW3v84wgXBhMD8CGelmZPvfsLH0UkIunXkmf/aUDZ8U4 Z2i4QortWOVS+F6NbmKqSaOmaXZYQJjqWXB54bY3Ijav9O7JuCgXoR8kaUkOlhl4qdaikt dgSZcdGx2+HUNBHMY8m+TAmYJ68Lu/Dsf78dVEXuzoWbgiKoxWXHuoUFIHGe1enwVlyetE EZyVgfDEOl6B73bCcaz6/uB6uiRyZWcVPbXMBE40qLVKKL6MPcW5reEn862fJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HHJ2Wzjz1Ccf; Sun, 30 Apr 2023 06:58:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6wKtH072045; Sun, 30 Apr 2023 06:58:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6wKgN072044; Sun, 30 Apr 2023 06:58:20 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:58:20 GMT Message-Id: <202304300658.33U6wKgN072044@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 49012db42f3d - stable/13 - libc: Sorting is not needed when there are less than two elements List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 49012db42f3d0bf29958e1248d1c45312815be05 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=49012db42f3d0bf29958e1248d1c45312815be05 commit 49012db42f3d0bf29958e1248d1c45312815be05 Author: Hans Petter Selasky AuthorDate: 2023-04-19 10:18:56 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:20 +0000 libc: Sorting is not needed when there are less than two elements If there are less than two elements avoid executing the first sorting loop. No functional change intended. Reviewed by: kib@ Sponsored by: NVIDIA Networking Differential Revision: https://reviews.freebsd.org/D39691 (cherry picked from commit ecb2ce3a51e9b09a57cd42262fc798ae089c0758) --- lib/libc/stdlib/qsort.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libc/stdlib/qsort.c b/lib/libc/stdlib/qsort.c index 015c648d633a..410118c5cd70 100644 --- a/lib/libc/stdlib/qsort.c +++ b/lib/libc/stdlib/qsort.c @@ -108,7 +108,8 @@ local_qsort(void *a, size_t n, size_t es, cmp_t *cmp, void *thunk) int cmp_result; int swap_cnt; - if (__predict_false(n == 0)) + /* if there are less than 2 elements, then sorting is not needed */ + if (__predict_false(n < 2)) return; loop: swap_cnt = 0; From nobody Sun Apr 30 06:58:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HHK6Pczz48sMx; Sun, 30 Apr 2023 06:58: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 4Q8HHK47x1z3PS2; Sun, 30 Apr 2023 06:58:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pHIz+tl8gXRdHh/w8S+IcFFIvTN1bJ2DyWU3kR/zD9Y=; b=VahJKRQwgj1CitdfShO6vbRMV0b3ep0odjnyiWSh3psCbJX6E/rVQrd9ftpP/hqXTFYleW R2A2LnNm1JoQ2qxn2Q+vMnrM8ZmTlY2BxQ3xvqv2T8hYXaW2dC0dAXWIiltd2XMdkYm4Qp 88GayZ6HLLr0cmtpzV4D02bk0VH3QIbGNij/ub6VyJtiVrCQDthF3A6oA/IaLc0L8m1fdu X+I1dvA5td2DlEyern4cZM8sgbZLR9j+Qn4Zs3pDnWRtfbVqwEo4r2DOZ2Ts04lv0byEqE IdktqTX/MMu7HN8f46FmJgACtlre0aCF8OYM8GbgZf2jXAtJ3ci6HUqoSGGfBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pHIz+tl8gXRdHh/w8S+IcFFIvTN1bJ2DyWU3kR/zD9Y=; b=MQV0ozHBe1cXQqCnEZ7V3pxQTGHOvr98o0vPJTXiwxZDAVxnwiDTjnpGSqd38kF5c2CzI8 o3NFaGPdveHk/qc59UoRcZ+SqoDXo11LGt9yf5BvGKl7fKzEn53xJxQUYF7dJZRpj79Ve2 QohUC8m8NpRVcBvQDihOPTYgjOsFvyJWp0Rzpz4AI5dn6V8cdc3VSkw5cnVe4maZOXZ3ec C2BTWvPYPqpEGk3BJZdG5Pm+saImp3qFsCFcnLRcu8jiD/yRruXh4xiL44qMfKtRiNS+A8 gKmNjviIRJIKNglV4I09KTYoElCveFpgpiemH4+PpwRHY4bDqkp8C+C47D5aYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837901; a=rsa-sha256; cv=none; b=u63D9j5F9lZLllkHdxrwUemuufwxSsU8gRVflLvVWfH3edoW3D6NyKQxi19lpTIgFBUpzz 4zR3Gbqj4huedFTEfiYnF6nKa9q6yjQyHNN4i6Cm948bqtpJmTz3gF0Zg2OkW2YM+orbYY IHs8nLWhSbyz5bZ166MQSGXm/TGhXKEzqzwp5I0QndrtK0nPbah33kqxdnpou3Mu7PeSWt gax4SpyIlTr158JCJ5z9j3yDAHGoMvQZT4Du2/1HdR4ZJgmKHJgdJdWJSfv1UJWeMVyak5 A1JcjTlpswmHlIM2a5f5dp1PlIm9BnnUka7/zkwDX7rqY0tVD7hAkZt6ANktoQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HHK3FqPz1Crk; Sun, 30 Apr 2023 06:58:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6wLoE072065; Sun, 30 Apr 2023 06:58:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6wLa4072064; Sun, 30 Apr 2023 06:58:21 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:58:21 GMT Message-Id: <202304300658.33U6wLa4072064@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: ee5121192a77 - stable/13 - libc: Add missing object size check to qsort_s(3) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ee5121192a77cb5a713915890d6a6a2cfeeaf1a9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=ee5121192a77cb5a713915890d6a6a2cfeeaf1a9 commit ee5121192a77cb5a713915890d6a6a2cfeeaf1a9 Author: Hans Petter Selasky AuthorDate: 2023-04-19 10:22:11 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:20 +0000 libc: Add missing object size check to qsort_s(3) When sorting, both the C11 standard (ISO/IEC 9899:2011, K.3.6.3.2) and the ISO/IEC JTC1 SC22 WG14 N1172 standard, does not define objects of zero size as undefined behaviour. However Microsoft's cpp-docs does. Add proper checks for this. Found while working on bsort(3). Reviewed by: kib@ and emaste@ Sponsored by: NVIDIA Networking Differential Revision: https://reviews.freebsd.org/D39687 (cherry picked from commit 27bb0d337c0d82a1a4f310315840236eb239963c) --- lib/libc/stdlib/qsort.3 | 10 +++++++--- lib/libc/stdlib/qsort.c | 4 ++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/libc/stdlib/qsort.3 b/lib/libc/stdlib/qsort.3 index 606185f9baee..dc14a4981fb7 100644 --- a/lib/libc/stdlib/qsort.3 +++ b/lib/libc/stdlib/qsort.3 @@ -32,7 +32,7 @@ .\" @(#)qsort.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd January 20, 2020 +.Dd April 19, 2023 .Dt QSORT 3 .Os .Sh NAME @@ -260,7 +260,7 @@ The order of arguments to .Fa compar is different .It -if +If .Fa nmemb or .Fa size @@ -270,7 +270,11 @@ or .Fa nmemb is not zero and .Fa compar -is NULL, then the runtime-constraint handler is called, and +is +.Dv NULL +or +.Fa size +is zero, then the runtime-constraint handler is called, and .Fn qsort_s returns an error. Note that the handler is called before diff --git a/lib/libc/stdlib/qsort.c b/lib/libc/stdlib/qsort.c index 410118c5cd70..98f7d02eb099 100644 --- a/lib/libc/stdlib/qsort.c +++ b/lib/libc/stdlib/qsort.c @@ -231,6 +231,10 @@ qsort_s(void *a, rsize_t n, rsize_t es, cmp_t *cmp, void *thunk) __throw_constraint_handler_s("qsort_s : cmp == NULL", EINVAL); return (EINVAL); + } else if (es <= 0) { + __throw_constraint_handler_s("qsort_s : es <= 0", + EINVAL); + return (EINVAL); } } From nobody Sun Apr 30 06:58:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HHL5T3Vz48sSP; Sun, 30 Apr 2023 06:58: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 4Q8HHL4zxJz3PPk; Sun, 30 Apr 2023 06:58:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bWgwcoW5veGMW40OYlwojRo/E5u8L31c79lZnsYAIHo=; b=wCnmQohdZPUWMn6p+5LQG4e4ruM6xvUYp9jtV/Ed/8ydEu0PCTStVLBkNOvcOu6aj0cD7I gex1LVewuL+ENc2DTu4oFCEdtcsEEZKZtkPXv31Fevhdl+ThbV/4c5PqMR+d5QTnSK6Cq3 dOX4tk6dry2sJgblCgbAmIsiP5gPecQGBET+FG0fzthCMdVbtY5QkQGdW73nYXXxiAhchX rOPAREg/v2RaqPm5dX4Mkln7Dba0AjVM8kr337/lHflPX8PzquZp23OOFdQUTSgkmC8jxq Qy07TDGjNGTebzv5uB7lfxAnmIyzjpKrWyebdrZEGaq5cLWipLQ9Z5coIAGunw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bWgwcoW5veGMW40OYlwojRo/E5u8L31c79lZnsYAIHo=; b=GvI7ba7CvLkCZBoUyZt8TM1iVaF/Oa7eU9+WNI8AdEc2BUZfgHUWxYsq8NQthMMusKi2Va NlNtuPrdaPFnvAR+Lc4kPLOoB7PbPndpkk2N7Tn3A3oS1rrYHxx9ssChMPcrKFQ2ZOz2CQ cnV4g8/sy3n9XHAR1rinbR7ZQjCjfVziYhMHKw/rZCYoGHe6GXI0ua5nQQQuytCkqqNLzD BpkWo9h7mLhHc0LD1eloBx/09aF+6uEOf7XEYABApdej2N1K73eAORA7Q4DflTgmgnAE5o sOXXFnNU4k0x03sz31rq86nSB0ZGkijCCG0mrIGJCwUsb8Sf/NUvRrXOGqXoqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837902; a=rsa-sha256; cv=none; b=JShX5EUfAgJdONBIkr79Beftaa8cmkesTJgi48ZfzMSYxeCuNCqTxKuBF2NfiFqCy+DDX8 yDmE5OW2Di5yMBJSURdHtRJheP0ndOss6VM4Sic+aoUvRHeMnZ4zDbhcZZT545jZD/HwbL 9E+7w1AfBuptzs+vBOf3iYr29wIocd/8zPbFYtGavvgmO1yURSq+lctXtourBLEutOzy7k zJUHLuwV+L8O1jS5L8SzrvmOkSEslQeDWncqjbjeGtoW3yT99LQnSFXDe7VpqPthJ5hn8d a892EcL+PrOMNNIXps7MsJLEmWA8giJ3mRahHag3K+82O+3CvWNmttbkq7batg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HHL45ZPz1Crl; Sun, 30 Apr 2023 06:58:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U6wMhj072092; Sun, 30 Apr 2023 06:58:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6wMPA072091; Sun, 30 Apr 2023 06:58:22 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:58:22 GMT Message-Id: <202304300658.33U6wMPA072091@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 517ccb7c8061 - stable/13 - mlx4: purge EOL release compatibility List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 517ccb7c8061ace6565fb27f8f0de7bb9305e853 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=517ccb7c8061ace6565fb27f8f0de7bb9305e853 commit 517ccb7c8061ace6565fb27f8f0de7bb9305e853 Author: Elliott Mitchell AuthorDate: 2022-06-23 00:53:47 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:20 +0000 mlx4: purge EOL release compatibility Remove FreeBSD 10 support code. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/603 Differential Revision: https://reviews.freebsd.org/D35560 (cherry picked from commit 026babd427e6511e53478814ce0aa1cc3f7a9988) --- sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c | 4 ---- sys/dev/mlx4/mlx4_en/mlx4_en_port.c | 12 ------------ sys/dev/mlx4/mlx4_en/mlx4_en_tx.c | 3 +-- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c b/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c index 14289cb20e13..bae22317574b 100644 --- a/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c +++ b/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c @@ -2067,7 +2067,6 @@ out: mutex_unlock(&mdev->state_lock); VLAN_CAPABILITIES(dev); break; -#if __FreeBSD_version >= 1100036 case SIOCGI2C: { struct ifi2creq i2c; @@ -2091,7 +2090,6 @@ out: error = copyout(&i2c, ifr_data_get_ptr(ifr), sizeof(i2c)); break; } -#endif case SIOCGIFRSSKEY: ifrk = (struct ifrsskey *)data; ifrk->ifrk_func = RSS_FUNC_TOEPLITZ; @@ -2263,12 +2261,10 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port, if (mdev->LSO_support) dev->if_capabilities |= IFCAP_TSO4 | IFCAP_TSO6 | IFCAP_VLAN_HWTSO; -#if __FreeBSD_version >= 1100000 /* set TSO limits so that we don't have to drop TX packets */ dev->if_hw_tsomax = MLX4_EN_TX_MAX_PAYLOAD_SIZE - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN) /* hdr */; dev->if_hw_tsomaxsegcount = MLX4_EN_TX_MAX_MBUF_FRAGS - 1 /* hdr */; dev->if_hw_tsomaxsegsize = MLX4_EN_TX_MAX_MBUF_SIZE; -#endif dev->if_capenable = dev->if_capabilities; diff --git a/sys/dev/mlx4/mlx4_en/mlx4_en_port.c b/sys/dev/mlx4/mlx4_en/mlx4_en_port.c index 2e19130b9e96..89193c68a055 100644 --- a/sys/dev/mlx4/mlx4_en/mlx4_en_port.c +++ b/sys/dev/mlx4/mlx4_en/mlx4_en_port.c @@ -346,7 +346,6 @@ int mlx4_en_DUMP_ETH_STATS(struct mlx4_en_dev *mdev, u8 port, u8 reset) vport_stats->tx_frames = be64_to_cpu(tmp_vport_stats.tx_frames); } -#if __FreeBSD_version >= 1100000 if (reset == 0) { if_inc_counter(dev, IFCOUNTER_IPACKETS, priv->pkstats.rx_packets - priv->pkstats_last.rx_packets); @@ -366,17 +365,6 @@ int mlx4_en_DUMP_ETH_STATS(struct mlx4_en_dev *mdev, u8 port, u8 reset) priv->pkstats.tx_multicast_packets - priv->pkstats_last.tx_multicast_packets); } priv->pkstats_last = priv->pkstats; -#else - dev->if_ipackets = priv->pkstats.rx_packets; - dev->if_opackets = priv->pkstats.tx_packets; - dev->if_ibytes = priv->pkstats.rx_bytes; - dev->if_obytes = priv->pkstats.tx_bytes; - dev->if_ierrors = priv->pkstats.rx_errors; - dev->if_iqdrops = priv->pkstats.rx_dropped; - dev->if_imcasts = priv->pkstats.rx_multicast_packets; - dev->if_omcasts = priv->pkstats.tx_multicast_packets; - dev->if_collisions = 0; -#endif spin_unlock(&priv->stats_lock); diff --git a/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c b/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c index 34af99ae0340..7cff1a224e9a 100644 --- a/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c +++ b/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c @@ -981,10 +981,9 @@ mlx4_en_transmit(struct ifnet *dev, struct mbuf *m) /* Poll CQ here */ mlx4_en_xmit_poll(priv, i); -#if __FreeBSD_version >= 1100000 if (unlikely(err != 0)) if_inc_counter(dev, IFCOUNTER_IQDROPS, 1); -#endif + return (err); } From eugen@grosbein.net Sun Apr 30 06:59:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HKN0k6Rz48sNh; Sun, 30 Apr 2023 07:00:07 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8HKL6dQBz3hgs; Sun, 30 Apr 2023 07:00:06 +0000 (UTC) (envelope-from eugen@grosbein.net) Authentication-Results: mx1.freebsd.org; none Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.17.1/8.17.1) with ESMTPS id 33U6xuLN075031 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 30 Apr 2023 06:59:57 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: phk@FreeBSD.org Received: from [10.58.0.11] (dadvw [10.58.0.11] (may be forged)) by eg.sd.rdtc.ru (8.16.1/8.16.1) with ESMTPS id 33U6xtFZ066230 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Sun, 30 Apr 2023 13:59:55 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: git: e0e5bf4d6283 - main - freebsd-update: Mention 13.2-RELEASE in usage. To: Poul-Henning Kamp , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202304300507.33U57MZh090662@gitrepo.freebsd.org> From: Eugene Grosbein Message-ID: Date: Sun, 30 Apr 2023 13:59:51 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 In-Reply-To: <202304300507.33U57MZh090662@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT autolearn=disabled version=3.4.6 X-Spam-Report: * -0.0 SHORTCIRCUIT No description available. * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on hz.grosbein.net X-Rspamd-Queue-Id: 4Q8HKL6dQBz3hgs X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N 30.04.2023 12:07, Poul-Henning Kamp wrote: > The branch main has been updated by phk: > > URL: https://cgit.FreeBSD.org/src/commit/?id=e0e5bf4d62831090a23dd0e0ac374baa0a00ef98 > > commit e0e5bf4d62831090a23dd0e0ac374baa0a00ef98 > Author: Poul-Henning Kamp > AuthorDate: 2023-04-30 05:06:56 +0000 > Commit: Poul-Henning Kamp > CommitDate: 2023-04-30 05:06:56 +0000 > > freebsd-update: Mention 13.2-RELEASE in usage. > --- > usr.sbin/freebsd-update/freebsd-update.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh > index 4ef44d1ad000..03eefee75bbd 100644 > --- a/usr.sbin/freebsd-update/freebsd-update.sh > +++ b/usr.sbin/freebsd-update/freebsd-update.sh > @@ -49,7 +49,7 @@ Options: > case of an unfinished upgrade > -j jail -- Operate on the given jail specified by jid or name > -k KEY -- Trust an RSA key with SHA256 hash of KEY > - -r release -- Target for upgrade (e.g., 11.1-RELEASE) > + -r release -- Target for upgrade (e.g., 13.2-RELEASE) > -s server -- Server from which to fetch updates > (default: update.FreeBSD.org) > -t address -- Mail output of cron command, if any, to address I took some historic data from https://www.freebsd.org/releases/ to make a table of release years: 9.2 2013 10.2 2015 11.2 2018 12.2 2020 13.2 2023 Note that formula (int)((year-1990)*2/5) gives exact major release number for .2 release and it uses integer arithmetic only. Given freebsd-update.sh is a shell script with $(( )) for integer arithmetic, we could automate the usage message for the future. From nobody Sun Apr 30 07:00:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HKz6zKyz48sVc; Sun, 30 Apr 2023 07:00: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 4Q8HKy4MVgz3jf2; Sun, 30 Apr 2023 07:00:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682838038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vMEDAgTr2S4+8ZMyfx+yIB8rdTmWiLhpqHLt5AiXkgg=; b=vVU7ggDudaBugsTEU4OqEfv7lwAfndbZ3OrJFdRJX23XyciLwrRjGgT3FwEPxCHfcnN+TB WziXAmIXafHS/xPpAH+PV//dAGVnaCfKvTIK+t5g/gNOsLaDI/2arZPDQTJjd1v5GrZPKA cGmZNvT40HJ6lw65ys+9ivvWz+GTkyj8WaqgGbd+RxGBelvjNcp3WQX9f+CKPagKlks09h SEDP0fcM9bQ9005kUfFcP2t5tXHp02um4Oe6fkiVTjCDLvX31JbOH4lJ9MLDWTOT53Yn8B LLoBqBGVpPOhbw3Wni4xU1LQQRfXVVteBiMQY8HNdgvdS3zXxGFmv0foKRsZoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682838038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vMEDAgTr2S4+8ZMyfx+yIB8rdTmWiLhpqHLt5AiXkgg=; b=gv6b3CYr0HBubwIeww/0TAI3+QISmu9J9R3FeouMS56PrzjGE7BT1+ecFsvmE92qKHwTUg HuqvgRMch/tm3PQkEGuyDKkXD0xz3uJ1V/CjmRvhkKIJWpNMqtRT+SnBS+9/EGn4yIb+8t 2SoyS5R8muBRa5s/6He3UrZzs2L88t3RvLbOn/TdbLb0vl5oGHzuwoZzPoS3838I9QMtWe VgOarmbhPLSLRCIaO1ZkYR7xXPo9U6rogCXzwyz3kXGaAdS+D6PRzyQIXmqlEneSe+wk6v ym3PmgFIIT180Bt8cFkxlB78o1tCBFdFUe9qLwiTTMFQRk3P2+LSh2sBF5LKPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682838038; a=rsa-sha256; cv=none; b=LeUl8U4CP+06uwYaX3OuTpQAraOr46yYXGcVJYsNQRA1qbHOUboEg+qpGc0IgvwsTFu7LG KUEggq0st0yFjuL/FH5kLuJZl/skM4EEBpM6yNG+W2h5hgAkrdhiUlYGrmSAxtBV95tnEG Fbjoak3uSKQHC+QzE7vWmM434z/yEQS7c6XedAmdZnN0vFORj35FhN81qUNNNLqFg5b/g7 64POx+TWJstsnSRlqeCTlGo91/H3NGmt5TdU9nwVN6goD+KIJLVzCRcB5Nz826UrJimwFO 7YTUtk1PrFRMoG7WG6GzpooFZKgDEFMqKS56Fxr8kljtmM17/W6NffpMV6lXMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8HKy3RRMz1Cs4; Sun, 30 Apr 2023 07:00:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U70c1i082165; Sun, 30 Apr 2023 07:00:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U70cF9082164; Sun, 30 Apr 2023 07:00:38 GMT (envelope-from git) Date: Sun, 30 Apr 2023 07:00:38 GMT Message-Id: <202304300700.33U70cF9082164@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: 2e7797cd9bba - main - Yet another try to fix printf format conflict. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2e7797cd9bba4fa82391b53a7dd7aac074baf716 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=2e7797cd9bba4fa82391b53a7dd7aac074baf716 commit 2e7797cd9bba4fa82391b53a7dd7aac074baf716 Author: Kirk McKusick AuthorDate: 2023-04-30 06:59:45 +0000 Commit: Kirk McKusick CommitDate: 2023-04-30 07:00:23 +0000 Yet another try to fix printf format conflict. I find it very annoying that there is no FreeBSD infrastructure to determine failures across architectures other than to check in changes and then have Jenkins find them. Suggested by: Jessica Clarke MFC after: 1 week --- sbin/dumpfs/dumpfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c index 743734660e57..a0767c39e6bf 100644 --- a/sbin/dumpfs/dumpfs.c +++ b/sbin/dumpfs/dumpfs.c @@ -245,7 +245,7 @@ dumpfs(const char *name, int dosb) default: goto err; } - printf("old_cpg\t%d\tsize_cg\t%d\tCGSIZE\t%d\n", + printf("old_cpg\t%d\tsize_cg\t%zu\tCGSIZE\t%zu\n", afs.fs_old_cpg, sizeof(struct cg), CGSIZE(&afs)); printf("sblkno\t%d\tcblkno\t%d\tiblkno\t%d\tdblkno\t%d\n", afs.fs_sblkno, afs.fs_cblkno, afs.fs_iblkno, afs.fs_dblkno); From nobody Sun Apr 30 07:08:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8HW94dGSz48syh for ; Sun, 30 Apr 2023 07:08:37 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8HW933mvz3pw2 for ; Sun, 30 Apr 2023 07:08:37 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-3f199696149so7357865e9.0 for ; Sun, 30 Apr 2023 00:08:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682838516; x=1685430516; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Gyb9Ne1GMyFbrT945dWJs4oM2gkhcF02/37+aES/MVo=; b=Dha03qwGEcWodaAlzr+rtEfk821F/Erwxwyv9w2kjGf1ZzqHxYrT4QEoQC/PdzR/Xh +T23dNwHIhk8AfaWggxs0WVQ/eK9fbq7NR0xZLexnhlbKQEGhGb2Sn30HGwJq7m/miFH FFXMthnHQaGAoEmPBPzNVGZdSnf+gj42EnZb+TXCtOZFCGG6eZLp/ewzOdTXDffyfmQF 5tOOisQ4PRT5pCwMp0eix5CQRPnzl6yp2unmurGMB1tg05Vd9LENY0w8puzzrdBhicxE Do4MunOXbf9c+Fh19L8FSY8s4lFo31IWhdayoQ66tipE2RzW3QELOGIkcZdbMblBXcS2 4H+A== X-Gm-Message-State: AC+VfDzk2TLa2FZGTfJBCBEfTCM0ku298Q/FQYlZFDzdoAJT/9wawICe 2jLN/vi7k3BzKLi60XKhNRZiqw== X-Google-Smtp-Source: ACHHUZ4TBctWh9gWZZwsSCHQ0mmAtysSe/89i64BzjxceFpt5Gx/SeYuYg9fFB47D7hLdmshXvMnVw== X-Received: by 2002:a1c:f707:0:b0:3f1:93c8:4a79 with SMTP id v7-20020a1cf707000000b003f193c84a79mr7032926wmh.29.1682838515932; Sun, 30 Apr 2023 00:08:35 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id o4-20020a056000010400b002fa67f77c16sm25001764wrx.57.2023.04.30.00.08.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 30 Apr 2023 00:08:35 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: 2e7797cd9bba - main - Yet another try to fix printf format conflict. From: Jessica Clarke In-Reply-To: <202304300700.33U70cF9082164@gitrepo.freebsd.org> Date: Sun, 30 Apr 2023 08:08:34 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <3ECD7073-5F45-4C62-BE47-D1C8CEC61883@freebsd.org> References: <202304300700.33U70cF9082164@gitrepo.freebsd.org> To: Kirk McKusick X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Rspamd-Queue-Id: 4Q8HW933mvz3pw2 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 30 Apr 2023, at 08:00, Kirk McKusick wrote: >=20 > The branch main has been updated by mckusick: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D2e7797cd9bba4fa82391b53a7dd7aac0= 74baf716 >=20 > commit 2e7797cd9bba4fa82391b53a7dd7aac074baf716 > Author: Kirk McKusick > AuthorDate: 2023-04-30 06:59:45 +0000 > Commit: Kirk McKusick > CommitDate: 2023-04-30 07:00:23 +0000 >=20 > Yet another try to fix printf format conflict. >=20 > I find it very annoying that there is no FreeBSD infrastructure to > determine failures across architectures other than to check in > changes and then have Jenkins find them. That=E2=80=99s what make universe/tinderbox/worlds/kernels are for? (See = build(7)) Jess > Suggested by: Jessica Clarke > MFC after: 1 week > --- > sbin/dumpfs/dumpfs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c > index 743734660e57..a0767c39e6bf 100644 > --- a/sbin/dumpfs/dumpfs.c > +++ b/sbin/dumpfs/dumpfs.c > @@ -245,7 +245,7 @@ dumpfs(const char *name, int dosb) > default: > goto err; > } > - printf("old_cpg\t%d\tsize_cg\t%d\tCGSIZE\t%d\n", > + printf("old_cpg\t%d\tsize_cg\t%zu\tCGSIZE\t%zu\n", > afs.fs_old_cpg, sizeof(struct cg), CGSIZE(&afs)); > printf("sblkno\t%d\tcblkno\t%d\tiblkno\t%d\tdblkno\t%d\n", > afs.fs_sblkno, afs.fs_cblkno, afs.fs_iblkno, afs.fs_dblkno); From nobody Sun Apr 30 09:45:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8M0X59t0z46ZlD; Sun, 30 Apr 2023 09:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8M0X3tz3z43rW; Sun, 30 Apr 2023 09:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682847948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8cFdFDWr+URZBqhhggdOCHcBQzcUKGZAbj8az83dD6c=; b=o/XjwvpGWdYGt8jEfHK5+H/XqC+u0vdngaleKxL6mAtoO1Q4ry9ruOJHUL894xudAvr0OC NL00qvGQ57pX+iryIMBm+ZmYVJln04Bmx2E7xH+tQWz1+EE90hpghEZPo93TMPOCt5+3Q0 mn2nFUaVt3av+NaHpiMHOYOmom6naugrw9utY9lNRQvszAtGwF0THLiQkxIeSrsdGPiuJB eit0S4mhjcZZJBhq3G/XWL/wP61mxBLQ0Ic7BtYT05Bwv9zEvu3Pmedg6IpSekrOgmFoqJ Ay88rm01zZXECH0ybdTUc1dIDv9ONvDlF7x/LX2exVAfYq7bcQEeH9/btxa+OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682847948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8cFdFDWr+URZBqhhggdOCHcBQzcUKGZAbj8az83dD6c=; b=QdOiMzFYc63ItTu/EctMBgl7mDilhLpibTtHO3xqRJ9q88dqZRSDtUzW0cwYMpugPVQ2Zw xIaW+35FsMrJJi8Lmlo/VQRsLsnV49pOBQzoIhRUU7SLTykPvbZS3PfjrHmRyUx9ZqH/5K jLhF15vMNR2ww5+WIWxo7Xls4pCKOvmW7p9ZtJT/K7hGiZX03kgBmLqcZ3SWTc/wgfg3wU 4dLSUVown41vl2ETGfyDyuK3HrxHmaKXgf3uAmbLH2Sn4I5MfRaJ+tkf4lbcOQr2+4DnVC aWVK+qfe1TVErhYJXsWtNN5So/gkCUOXn9EhsrfJWi418RaPRekZh3BWU7sPkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682847948; a=rsa-sha256; cv=none; b=cfKmiGBkins++ARUNjNV6H/3jfsHgONvBy11CF0i5LTZAnvRgx1YzJ0tkZ0MLlIRjGgOEa 9ZAZBVhkTJRoYR9HOEG9ooTFGxyqLxwEUQx11zcVc/yikxSejuXPjY73dszRfPIFV0pSth PadCwa0C6RjH0DB+DJjbn3z3AaM/AGnvUonpuD4thsDWbexYR3Qx/llvfxYuTj46I9zz4q Xm4qNjj2URoHJe+dxfpVnzn28aoyLJvGAA9Jjl9jNXkERm3o7M3kuNOZbbRlqD+ZiiwvK/ 5wKFSHQmW/Tm2TA+7Y+ZOTig6iFUUYNpKgbuEBPEy3CQ3iV/1wBLOGi2sRrUWQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8M0X2yDnzJh7; Sun, 30 Apr 2023 09:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33U9jmTo053454; Sun, 30 Apr 2023 09:45:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U9jmRb053453; Sun, 30 Apr 2023 09:45:48 GMT (envelope-from git) Date: Sun, 30 Apr 2023 09:45:48 GMT Message-Id: <202304300945.33U9jmRb053453@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 1f0e13449bee - main - sctp: improve handling of stale cookie error causes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1f0e13449beef3a983d9ed2faf4734075e4120d1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=1f0e13449beef3a983d9ed2faf4734075e4120d1 commit 1f0e13449beef3a983d9ed2faf4734075e4120d1 Author: Michael Tuexen AuthorDate: 2023-04-30 09:39:32 +0000 Commit: Michael Tuexen CommitDate: 2023-04-30 09:39:32 +0000 sctp: improve handling of stale cookie error causes * If a measure of staleness of 0 is reported, use the RTT instead. * Ensure that we always send a cookie preservative parameter by rounding up during the calculation. * If allowed, perform a round trip time measurement. * Clear the overall error counter, since the error cause also acts like an ACK. MFC after: 1 week --- sys/netinet/sctp_input.c | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index f01c1fe710e4..26abf4953164 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -1133,26 +1133,47 @@ sctp_handle_error(struct sctp_chunkhdr *ch, */ if ((cause_length >= sizeof(struct sctp_error_stale_cookie)) && (SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_ECHOED)) { + struct timeval now; struct sctp_error_stale_cookie *stale_cookie; + uint64_t stale_time; - stale_cookie = (struct sctp_error_stale_cookie *)cause; - /* stable_time is in usec, convert to msec. */ - asoc->cookie_preserve_req = ntohl(stale_cookie->stale_time) / 1000; - /* Double it to be more robust on RTX. */ - asoc->cookie_preserve_req *= 2; asoc->stale_cookie_count++; - if (asoc->stale_cookie_count > - asoc->max_init_times) { + if (asoc->stale_cookie_count > asoc->max_init_times) { sctp_abort_notification(stcb, false, true, 0, NULL, SCTP_SO_NOT_LOCKED); - /* now free the asoc */ (void)sctp_free_assoc(stcb->sctp_ep, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTP_INPUT + SCTP_LOC_12); return (-1); } - /* blast back to INIT state */ + stale_cookie = (struct sctp_error_stale_cookie *)cause; + stale_time = ntohl(stale_cookie->stale_time); + if (stale_time == 0) { + /* Use an RTT as an approximation. */ + (void)SCTP_GETTIME_TIMEVAL(&now); + timevalsub(&now, &asoc->time_entered); + stale_time = (uint64_t)1000000 * (uint64_t)now.tv_sec + (uint64_t)now.tv_usec; + if (stale_time == 0) { + stale_time = 1; + } + } + /* + * stale_time is in usec, convert it to + * msec. Round upwards, to ensure that it is + * non-zero. + */ + stale_time = (stale_time + 999) / 1000; + /* Double it, to be more robust on RTX. */ + stale_time = 2 * stale_time; + asoc->cookie_preserve_req = (uint32_t)stale_time; + if (asoc->overall_error_count == 0) { + sctp_calculate_rto(stcb, asoc, net, &asoc->time_entered, + SCTP_RTT_FROM_NON_DATA); + } + asoc->overall_error_count = 0; + /* Blast back to INIT state */ sctp_toss_old_cookies(stcb, &stcb->asoc); - SCTP_SET_STATE(stcb, SCTP_STATE_COOKIE_WAIT); sctp_stop_all_cookie_timers(stcb); + SCTP_SET_STATE(stcb, SCTP_STATE_COOKIE_WAIT); + (void)SCTP_GETTIME_TIMEVAL(&asoc->time_entered); sctp_send_initiate(stcb->sctp_ep, stcb, SCTP_SO_NOT_LOCKED); } break; From nobody Sun Apr 30 13:21:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8RpG3VSMz47pKW for ; Sun, 30 Apr 2023 13:22:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8RpG1jLbz3CKX for ; Sun, 30 Apr 2023 13:22:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-50bc070c557so1374488a12.0 for ; Sun, 30 Apr 2023 06:22:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1682860933; x=1685452933; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=WnfFLRJfb+vHl7Fa80ATV3sWMvXn495NuDC18xkVY+U=; b=5N8quyn8o2eiX0UU6FVw/OAuZHyzucf5pijy6wcGSneyKyp3EXH+cObi7rsZh00bmU jduvJdEsfSn/mUMwOj2qdEOULB+o2tnCNfoa3/5X/FqNBKhnc888s3atZrL2LkwoTXp4 InSQIF08KffTp+Hfhq6lgnfeOeRLR018ik6LGoCZQIekRovtH3OjSWYkzlOpyS14gMDg k5FXzXF40iX4WsLfC2utvvPYMZCuRDT6+KYuKw1AcrG3uFWCxhBsOkyyv/FfDyXm/PzM Lmu+lZU+kl0qGm+YMwPQAFxlR1Ort2mFtMfBB4IEg0hRysN9Cxm5aGdHlsUtSmmer5u6 UfQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682860933; x=1685452933; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WnfFLRJfb+vHl7Fa80ATV3sWMvXn495NuDC18xkVY+U=; b=DIvG5ilqyNnwqjhA56e1I5+9j8I8T5BRQ5CeGR3UF2x0GPBdQz7om1w6E5ydrijki0 3ooK+T/uaX7+xSXFPlV11GJcgzu0Ovt1KJwLV4nFQQsFvITemkyhKWVYzZco6npA9VEc mvoFwvNBlR85T0xo1MGxWtPrkcCUwWLI0+pqb0qaJi3NpDdpS7xQc3AjXfqV8DSjsfCa BixKFOGKUNWdwOFyiP0uMs2t3QW+7d0aV/tdEaXl4VacvUknN/9VNMuqucsPLeE4hhuO ZY2hIr8arfIi0vFyTp2iJWmHsKZQYVQDjgf49GKk+BVJHhfh4rqAgWbCdmmtRWOLZnJp xeFQ== X-Gm-Message-State: AC+VfDyCVDKRUMT+szuSHvv4FXMoBUmTOHHb/PM5Nz/8pSVzIG6D5LgL WEFJIQPt9iLLhjAtCvAimrTHlPXGQKgKxFc2rehfGA== X-Google-Smtp-Source: ACHHUZ5Bj05G/1QMyZ+3bvwy8MPzPsFWslOUuiSzESCde4/gEsQULdrUgGckbVgea0rSaZ4MsBxIdZtlJS/zSIdl30A= X-Received: by 2002:a05:6402:1017:b0:504:ae37:77d0 with SMTP id c23-20020a056402101700b00504ae3777d0mr3344455edu.10.1682860932594; Sun, 30 Apr 2023 06:22:12 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202304300700.33U70cF9082164@gitrepo.freebsd.org> <3ECD7073-5F45-4C62-BE47-D1C8CEC61883@freebsd.org> In-Reply-To: <3ECD7073-5F45-4C62-BE47-D1C8CEC61883@freebsd.org> From: Warner Losh Date: Sun, 30 Apr 2023 07:21:59 -0600 Message-ID: Subject: Re: git: 2e7797cd9bba - main - Yet another try to fix printf format conflict. To: Jessica Clarke Cc: Kirk McKusick , src-committers , "" , "" Content-Type: multipart/alternative; boundary="0000000000001811e605fa8d98c7" X-Rspamd-Queue-Id: 4Q8RpG1jLbz3CKX X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --0000000000001811e605fa8d98c7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Apr 30, 2023, 1:08 AM Jessica Clarke wrote: > On 30 Apr 2023, at 08:00, Kirk McKusick wrote: > > > > The branch main has been updated by mckusick: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D2e7797cd9bba4fa82391b53a7dd7aac= 074baf716 > > > > commit 2e7797cd9bba4fa82391b53a7dd7aac074baf716 > > Author: Kirk McKusick > > AuthorDate: 2023-04-30 06:59:45 +0000 > > Commit: Kirk McKusick > > CommitDate: 2023-04-30 07:00:23 +0000 > > > > Yet another try to fix printf format conflict. > > > > I find it very annoying that there is no FreeBSD infrastructure to > > determine failures across architectures other than to check in > > changes and then have Jenkins find them. > > That=E2=80=99s what make universe/tinderbox/worlds/kernels are for? (See = build(7)) > There's other ways too. The long way is to 'make buildworld TARGET=3Di386' which will catch things like this. However, that can take a while... If you've done one of those in the past, there will be enough of a tree for the next trick to work: cd sbin/dumpfs make buildenv TARGET=3Di386 make # in a subshell exit This will also build things and see if you got the printf formatting right and is pretty quick. So of course I always do this before I commit.... the fix that the tinderbox tells me I broke (since I don't always remember that I've changed a printf in larger commits). it would be nice if clang had a magic flag to catch this.... Warner Jess > > > Suggested by: Jessica Clarke > > MFC after: 1 week > > --- > > sbin/dumpfs/dumpfs.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c > > index 743734660e57..a0767c39e6bf 100644 > > --- a/sbin/dumpfs/dumpfs.c > > +++ b/sbin/dumpfs/dumpfs.c > > @@ -245,7 +245,7 @@ dumpfs(const char *name, int dosb) > > default: > > goto err; > > } > > - printf("old_cpg\t%d\tsize_cg\t%d\tCGSIZE\t%d\n", > > + printf("old_cpg\t%d\tsize_cg\t%zu\tCGSIZE\t%zu\n", > > afs.fs_old_cpg, sizeof(struct cg), CGSIZE(&afs)); > > printf("sblkno\t%d\tcblkno\t%d\tiblkno\t%d\tdblkno\t%d\n", > > afs.fs_sblkno, afs.fs_cblkno, afs.fs_iblkno, afs.fs_dblkno); > > --0000000000001811e605fa8d98c7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sun, Apr 30, 2023, 1:08 AM Jessica Clarke <jrtc27@freebsd.org> wrote:
On 30 Apr 2023, at 08:00, Kirk McKusick <= ;mckusick@FreeBSD.org> wrote:
>
> The branch main has been updated by mckusick:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=3D2e7797cd9bba4fa82391b53a7dd7aa= c074baf716
>
> commit 2e7797cd9bba4fa82391b53a7dd7aac074baf716
> Author:=C2=A0 =C2=A0 =C2=A0Kirk McKusick <mckusick@FreeBSD.org><= br> > AuthorDate: 2023-04-30 06:59:45 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Kirk McKusick <mckusick@FreeBSD.org><= br> > CommitDate: 2023-04-30 07:00:23 +0000
>
>=C2=A0 =C2=A0 Yet another try to fix printf format conflict.
>
>=C2=A0 =C2=A0 I find it very annoying that there is no FreeBSD infrastr= ucture to
>=C2=A0 =C2=A0 determine failures across architectures other than to che= ck in
>=C2=A0 =C2=A0 changes and then have Jenkins find them.

That=E2=80=99s what make universe/tinderbox/worlds/kernels are for? (See bu= ild(7))

There's other ways too. The long way is to 'make buildworld = TARGET=3Di386' which will catch things like this. However, that can tak= e a while... If you've done one of those in the past, there will be eno= ugh of a tree for the next trick to work:

=
cd sbin/dumpfs
make buildenv TARGE= T=3Di386
make=C2=A0 =C2=A0 =C2=A0# in a subshell
exit

This will also build things and see if you got the printf formatting right= and is pretty quick.

So= of course I always do this before I commit.... the fix that the tinderbox = tells me I broke (since I don't always remember that I've changed a= printf in larger commits). it would be nice if clang had a magic flag to c= atch this....

Warner

=
Jess

>=C2=A0 =C2=A0 Suggested by: Jessica Clarke
>=C2=A0 =C2=A0 MFC after:=C2=A0 =C2=A0 1 week
> ---
> sbin/dumpfs/dumpfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c
> index 743734660e57..a0767c39e6bf 100644
> --- a/sbin/dumpfs/dumpfs.c
> +++ b/sbin/dumpfs/dumpfs.c
> @@ -245,7 +245,7 @@ dumpfs(const char *name, int dosb)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0default:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0goto err;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> -=C2=A0 =C2=A0 =C2=A0printf("old_cpg\t%d\tsize_cg\t%d\tCGSIZE\t%d= \n",
> +=C2=A0 =C2=A0 =C2=A0printf("old_cpg\t%d\tsize_cg\t%zu\tCGSIZE\t%= zu\n",
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0afs.fs_old_cpg, sizeof(struct = cg), CGSIZE(&afs));
>=C2=A0 =C2=A0 =C2=A0 =C2=A0printf("sblkno\t%d\tcblkno\t%d\tiblkno\= t%d\tdblkno\t%d\n",
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0afs.fs_sblkno, afs.fs_cblkno, = afs.fs_iblkno, afs.fs_dblkno);

--0000000000001811e605fa8d98c7-- From nobody Sun Apr 30 17:59:26 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8Yy70sdHz486TF for ; Sun, 30 Apr 2023 17:59:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8Yy70KY5z3mGs; Sun, 30 Apr 2023 17:59:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682877567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uT8o4O2u5LasmUUfmYfYwqg1mY37uIx/AZNpJp2JSpk=; b=K+2Mn/g9e8k42FrZrsbztlv/LFhR1iaIVMtQ4fgEtnfwV4gbb1DsCIrY/A/PlPYrkvELr5 PoV0eOgjtxmpeuImaK2jx99pn9ostBLQgnPXWGScAf9a4FpiyrM+8qijOf6hDZvhfR6Ij2 rACRdQYnLNtTrgRonsnANpd/Rdf0ekgr7fQrOKl4tu2k3BROuQC37MqdlVMupYFLGyiWfT Wug6FN5M7UuFe+FhDDSSqDfiI+cNX9himB3qAcEtyOEeQyC2a1sLgpPGrbMWG6H4BpkrxJ 37zD36DlLbH4kvgKiYjv9CKb5EMWs3uRew5UBRt7HAbSDldGq2r26afwjNsc/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682877567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uT8o4O2u5LasmUUfmYfYwqg1mY37uIx/AZNpJp2JSpk=; b=f77gEzffi6HpNrpaOlONu1fZeawbtA4HVA1zAYFk3e1FrHwvEGBnFPebU2cD/is+9ItWHO tJd1O+/vo1nFha2LCAyyyr1WTMcHKNoI/9Ad/jZUBV5pAwO8kwIVdaR4km7PBn/Prl2BrA zBpFzqeKdivIEZuw73MOLHNCxKrf7ZFpulrFPyjHC8vFTz+35tRrF2u9urG7qaVRTy5l6l EpzgofqAjYpLbxKSHnLFdhy+DmOTHlF3hVeHrdT/wbYpiK8F2FHxq6RYlmCmZcn1fgXc4V wFqR238gcMQzzHJ26mW6CKeFLYJIJbNQBhEfEf/Lz/ZA/EUXNdL0XrHaqcU7Jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682877567; a=rsa-sha256; cv=none; b=fwP5BH41lHkpSFEKrivqaO1X4KiqTeY3UhdgyKTwZ+AN2albdG+9vv7la6izGrNMfGU5/F muDJCuvirsBV6b+nNA1F/cIUDxXLCOGF6VVNL5Xc1PcVs3kleiulSimytLHfDfPlU6sfVL JizHkOULkfM2J053M89FfPgamMBLnk2qmshsEjA8vgEYNIw2fYAtV24MyQqfB5UYNwlbds IDM33EJdpbOqMEeQQLiSczGTQMZ8PFxdgb+VuTjyGXf8A06QhOUUoePKDlZuJaAjS4sovM /Zn8YgTCsjU7UKs3gZy1mETyPuqWkdWwW/D8MDKCr5x6aphXbm25f8+ceoytGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8Yy66CJrzYPt; Sun, 30 Apr 2023 17:59:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33UHxQwx060399; Sun, 30 Apr 2023 17:59:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33UHxQRJ060398; Sun, 30 Apr 2023 17:59:26 GMT (envelope-from git) Date: Sun, 30 Apr 2023 17:59:26 GMT Message-Id: <202304301759.33UHxQRJ060398@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: =?utf-8?Q?Stefan=20E=C3=9Fer?= Subject: git: 0ff539eb7ca5..438a1101dc1f - vendor/bc - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/vendor/bc X-Git-Reftype: branch X-Git-Commit: 438a1101dc1f687928cdbe02cd7817a88a24f42f X-Git-Oldrev: 0ff539eb7ca570d65a23a7ad13a91a673d89abcf X-Git-Newrev: 438a1101dc1f687928cdbe02cd7817a88a24f42f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch vendor/bc has been updated by se: URL: https://cgit.FreeBSD.org/src/log/?id=0ff539eb7ca5..438a1101dc1f 438a1101dc1f contrib/bc: import version 6.5.0 From nobody Sun Apr 30 18:01:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8Z0F0d3Yz48692; Sun, 30 Apr 2023 18:01: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 4Q8Z0D6xqKz3mw9; Sun, 30 Apr 2023 18:01:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682877677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q8ULNVfdIOsXmf/+zJLfjeaqXkWcQzmpdcogn3UIUNs=; b=y1tkqrFqhh1jW15PGS4tfkxfOTaGAPzMDJZEubnku7Z05iff1kKVPpBtbFXoszTJEfHfGt UYBZkddSEwhuNp0qFTWAm4Ia9Kw2DlTH0zKqK5smDVosSqSI4uyOZYrsqgRJ/JQ7VbV+4C 75BQDQrIls554pfS+b5F/kSWbZv0yKhCQwipytevhEfAWrYXRWCGR78XjQfndG5Z0gTPnI Q7EXTuYIVUn4P0y6B2AvQIYPri+592lp8QyDRZCo/rsl4FtDKr8uY5SiKxDBMRORECtvg2 rHFB7u5u2Z/Vm0eX1p/8Kwm+GntDVzb8oqnHVeruQfeUpAZkydRT6P8P+x3aag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682877677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q8ULNVfdIOsXmf/+zJLfjeaqXkWcQzmpdcogn3UIUNs=; b=fLjGKS4i01EVc6zYd/zs7LsxQ/PDOleTQhO9pSOjsZxnzvpzGuzUNTmQsfjdpPnz5kPGn9 GgxXQmGQXCVFpYBxyiy80dG5Z0i6O3XyYE0S3oQ/X/PJEsSM0ym1gYWSGW1CJ2aFYwVYxb ZTVHx9fjjkikfeSiak3rsn0tetDAxjhE2u2GLdssNCtxEfsvW2AIqAUhA1hS66wNpC5Kj5 Oj3VgW+J8rtPXtyT0T9vwYqZ2oTlI/4ilT7zfYgdIs/wwAJXzmErqyb462AlOUxjkHt3eQ Odm1dgfKKzKAizzC/9n4Q4l4BxaQVSE9oxm9HUoILjqIGuRGHiGNtTyW3K43XA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682877677; a=rsa-sha256; cv=none; b=So3DEaAumzrgpAuRDcWCPFtCzqexcXXXQemJI9MhXeef7WaPDI1p5sZghWwj3Oi7EqaAU1 arCjGdlBA8IXr2B/zw8kscu5lcI8QXyGF76q14WnZiuDMUIUXBGb5O1/Ld9YGMCffKf702 iWxJQiEk2j66Cmd6FO0ODw6gm7I83e6MUNfymq79eyWDV07FCMi8O9l0/RtFkVGKzVPLze 6u6vEWdfHae7ni0r9NslzogW6lLz5zl7Gz9nZUzNod5YFPh/OQdOLzfImj/FjrX49Tac0V f/hiM/gCjQMwWWGf4rYY9g33izSGozBriORNjRMRQMEKFS/JFOGaGF9rTRPAUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8Z0D61JCzYN5; Sun, 30 Apr 2023 18:01:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33UI1G0Z071907; Sun, 30 Apr 2023 18:01:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33UI1Gk7071906; Sun, 30 Apr 2023 18:01:16 GMT (envelope-from git) Date: Sun, 30 Apr 2023 18:01:16 GMT Message-Id: <202304301801.33UI1Gk7071906@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: a50ef47c0a22 - main - newfs: fix up 32-bit compile List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a50ef47c0a22ca87cdbe669acbcbf999c72b8439 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=a50ef47c0a22ca87cdbe669acbcbf999c72b8439 commit a50ef47c0a22ca87cdbe669acbcbf999c72b8439 Author: Mateusz Guzik AuthorDate: 2023-04-30 18:00:20 +0000 Commit: Mateusz Guzik CommitDate: 2023-04-30 18:00:20 +0000 newfs: fix up 32-bit compile Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/newfs/mkfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c index 5af121104821..d8580a789b1d 100644 --- a/sbin/newfs/mkfs.c +++ b/sbin/newfs/mkfs.c @@ -674,7 +674,7 @@ retry: if ((int32_t)CGSIZE(&sblock) > sblock.fs_bsize) { printf("INTERNAL ERROR: ipg %d, fpg %d, contigsumsize %d, ", sblock.fs_ipg, sblock.fs_fpg, sblock.fs_contigsumsize); - printf("old_cpg %d, size_cg %jd, CGSIZE %jd\n", + printf("old_cpg %d, size_cg %zu, CGSIZE %zu\n", sblock.fs_old_cpg, sizeof(struct cg), CGSIZE(&sblock)); printf("Please file a FreeBSD bug report and include this " "output\n"); From nobody Sun Apr 30 18:12:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8ZDq4kgDz486xQ; Sun, 30 Apr 2023 18:12: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 4Q8ZDq4CB6z3ns1; Sun, 30 Apr 2023 18:12:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682878331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ah1nyT1baNYCNyDEjTPDf2IOsYlSGFxpl+HrHhpyqwA=; b=OhxcYEKg2bSHTLFJWBtdyoX4BpuCRHOUGOerI/4AXSnes0a3GwS+UIMT4L2V6WkgYle2Yz yO4X9NM4+tbR/xDy5zMO8tJ/KNnQpl/izq5OclEuv/NMOCH1p973oJM+dP2PqDkNtaRENX 3BXxo9pDhI0IbyxqAw7damXsB7iEoQGXGloXlXU2VyaJrBoTxgSwgP+feTduXDYyHvOm41 wukhyECRwKM+11Zp4xWc7/JB63JcAlhmZ0hrHn4M25t8betl5ywITew62mbcwda9BWCnZ/ D3YuMev02IdPzhEqDw8ovVSiBTYMP8G3+8EayJIeIpYNnQOo6TkqVnpZ5FVgbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682878331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ah1nyT1baNYCNyDEjTPDf2IOsYlSGFxpl+HrHhpyqwA=; b=wf5OzyPW1yWsPnVAWmAwYTKSqk9SyGRf/Ct3jRz/7s9uOl533MfZyT8rTtSUp+KUuCX1BP 4NZFcydCbTcSCv5LdKbg/UDKhxN91a5nlVYHPmAwfars7RxKml4ud7XQmq4BAaUenRudkY vyiCj4NrqMguNYyWguh+0EJTcD2jwOAD2ORn9Jfjx7ThdFrjqdyplHit9tLGNvcUsqCUI/ IFdICGSDX1QiBxJrqi6se5Ei9Rdsx2k/qNVtVapX+3XxR/3dq92kiCA0aXaXcS2mmaulKt Vmf7G9irqeSi7p4XrAz2/YUBzZPTE7aslkd3kEf9m+zKBYXaxTAefEhA1uMj8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682878331; a=rsa-sha256; cv=none; b=hYR0XwS5/KG4wyDScBkP3liRKp0dV/ZZXnFQz6CC5NLvmMHcp8htY/FOBIs09iu3fsOlDj 14ZyB5y84gHHZ5Z6zkCyAskJJecEcIKaqYXJNkV80quk159HvD6Q6DJcrNt0FMcwDbnKgs 2lHgM8/+9MgvnIHRroxR2+kFB8iYMtHaa0X2u8aKllIE84Hhf6f1m5/svPxfNtIuenHMyi V3tiYNVjvS17p9UkAQ8+FtN/x0WFqdKLnzOprwiXw9X8qgFU7/moQJn6tZlFFvvj9Z/7Yk Px2EuJX0fwJApwU5AQmf/hKZLvFUWLgKobUT6ig/oafOS91k+v5dCi9K/gfJEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8ZDq3FvrzYfy; Sun, 30 Apr 2023 18:12:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33UICB1v093314; Sun, 30 Apr 2023 18:12:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33UICBUY093313; Sun, 30 Apr 2023 18:12:11 GMT (envelope-from git) Date: Sun, 30 Apr 2023 18:12:11 GMT Message-Id: <202304301812.33UICBUY093313@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: 6a23843a4a6f - main - libifconfig: fix carp key configuration List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6a23843a4a6f2dae95a2029358468b697072b8d2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=6a23843a4a6f2dae95a2029358468b697072b8d2 commit 6a23843a4a6f2dae95a2029358468b697072b8d2 Author: Kristof Provost AuthorDate: 2023-04-28 16:18:55 +0000 Commit: Kristof Provost CommitDate: 2023-04-30 18:11:54 +0000 libifconfig: fix carp key configuration There were two issues with the carp key configuration in the new netlink code. The first is that userspace failed to actually pass the CARP_NL_KEY attribute to the kernel, so a key was never set. The second issue is that snl_attr_get_string() returns a pointer to the string inside the netlink message. It does not copy the string to the target buffer. That's somewhat inconvenient to work with in libifconfig where we have a static buffer for the key. Introduce snl_attr_copy_string() which can copy a string to a target buffer and uses the 'arg' parameter to pass the buffer size, so it doesn't accidentally exceed the available space. Reviewed by: melifaro Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D39874 --- lib/libifconfig/libifconfig_carp.c | 3 ++- sys/netlink/netlink_snl.h | 20 +++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/lib/libifconfig/libifconfig_carp.c b/lib/libifconfig/libifconfig_carp.c index 2b612f0ba51b..cb1a998b3a0c 100644 --- a/lib/libifconfig/libifconfig_carp.c +++ b/lib/libifconfig/libifconfig_carp.c @@ -55,7 +55,7 @@ static struct snl_attr_parser ap_carp_get[] = { { .type = CARP_NL_STATE, .off = _OUT(carpr_state), .cb = snl_attr_get_uint32 }, { .type = CARP_NL_ADVBASE, .off = _OUT(carpr_advbase), .cb = snl_attr_get_int32 }, { .type = CARP_NL_ADVSKEW, .off = _OUT(carpr_advskew), .cb = snl_attr_get_int32 }, - { .type = CARP_NL_KEY, .off = _OUT(carpr_key), .cb = snl_attr_get_string }, + { .type = CARP_NL_KEY, .off = _OUT(carpr_key), .cb = snl_attr_copy_string, .arg_u32 = CARP_KEY_LEN }, { .type = CARP_NL_ADDR, .off = _OUT(carpr_addr), .cb = snl_attr_get_in_addr }, { .type = CARP_NL_ADDR6, .off = _OUT(carpr_addr6), .cb = snl_attr_get_in6_addr }, }; @@ -176,6 +176,7 @@ ifconfig_carp_set_info(ifconfig_handle_t *h, const char *name, &carpr->carpr_addr); snl_add_msg_attr(&nw, CARP_NL_ADDR6, sizeof(carpr->carpr_addr6), &carpr->carpr_addr6); + snl_add_msg_attr_string(&nw, CARP_NL_KEY, carpr->carpr_key); hdr = snl_finalize_msg(&nw); if (hdr == NULL) { diff --git a/sys/netlink/netlink_snl.h b/sys/netlink/netlink_snl.h index 4cb1b3e13abc..822cec9b4dc4 100644 --- a/sys/netlink/netlink_snl.h +++ b/sys/netlink/netlink_snl.h @@ -138,7 +138,12 @@ struct snl_attr_parser { uint16_t type; /* Attribute type */ uint16_t off; /* field offset in the target structure */ snl_parse_attr_f *cb; /* parser function to call */ - const void *arg; /* Optional argument parser */ + + /* Optional parser argument */ + union { + const void *arg; + const uint32_t arg_u32; + }; }; struct snl_hdr_parser { @@ -588,6 +593,19 @@ snl_attr_get_stringn(struct snl_state *ss, struct nlattr *nla, return (true); } +static inline bool +snl_attr_copy_string(struct snl_state *ss, struct nlattr *nla, + const void *arg, void *target) +{ + char *tmp; + + if (snl_attr_get_string(ss, nla, NULL, &tmp)) { + strlcpy(target, tmp, (size_t)arg); + return (true); + } + return (false); +} + static inline bool snl_attr_get_nested(struct snl_state *ss, struct nlattr *nla, const void *arg, void *target) { From nobody Sun Apr 30 18:28:33 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8Zbk04r9z488Hn; Sun, 30 Apr 2023 18:28: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 4Q8Zbj6zhGz3qQF; Sun, 30 Apr 2023 18:28:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682879313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GKEw3uxKQld7x/uoWqqFskNp3mbVufz3lMY3HIY+am8=; b=Bt5Ba6pOYSZDDOtbKFpnlor0RaqZWbp6l3w30GDxrRyxe9lNr+WYSWbG/xiS5ICPWLBtjN IeU29fDX3tK8EwGb+V02VtWtbpyVOhRDpABaAjN9K6awqBQB8kGsX7OYHad4H0rOTBsXCE 9k832lYbRyr9nOmm37l71J/J6tLDRopgHdBY/kwUB44upKMV56gIXAMx5GbYYt6D9FhBHY GKFkOlfYTZcXKbM2xggfo/RqmizJGF5P6IEbvUELPmznfMqZKqIG2LARds0qecW+SXs51U hHlbbbn6wJBHH4VkfRsZITWN/qvzOzCoMfCVGSsmliG+RYTuyyLIyNCai5Fz2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682879313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GKEw3uxKQld7x/uoWqqFskNp3mbVufz3lMY3HIY+am8=; b=qtkG3ReqFmY2yePTNxUyDHzHnTB4ql1Ox3H8FKwN0nT+MJSNRzwxCucb1nIhO8+RzttqNT ReqaiHSoy9XXHO6LOkDo+ZBfA789Uymb3spWBEpA2IhqnyEYXXIhcqpgcPVMCoQprmM5nm WTzK+JzgXvn+4lnw8sG9DcsBUJjd2kRDEEhSw6cUqI5Jf59YTbvCfxNgKY9AkfcKf1/LdE vvxf+tGDJOlpnr0xOfz3rJY7MO3UAeDjLffzsgE0vAaT3qZGwj5TrQrr3z8qab5Cs0C2gP 0MwVIl8TJ+mdzuV4TuO7Fe89J75KoKz8o3MYkEv0ooZJWC6r+hwHUQKScxnx4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682879313; a=rsa-sha256; cv=none; b=K5rZyYUDuPHyAaEaBcdzi0w/MlDGXAdHkZdmDjkfalPM4eC+rNZfW1zd+Wpyq8/WAcuA+j YMS0TIRoxFzQoueRw7I69A64UF8RU28km/gjtuJJuvMl2tndGjalYP1814t4/a8mtPD8m2 yIfvk0KLxlSwqwFCZfxgePUq/r4IZbxrUhsM3toeWi+BovD9ksGSISCxgYnsvPFCQjAVF1 ILGwYUsRR/es7ev8sMPnOMYYinvc9qY0eMQxfanyy6SLHWRqzHSTczIWdCYbqZSPI9v1tJ ZVC5Pt7t+/Cx48knntEGPrnoF8BM6O6BCDYg36oSVLIFDRU/ia6Bhojjuv3KBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8Zbj62tWzYt7; Sun, 30 Apr 2023 18:28:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33UISXHX011122; Sun, 30 Apr 2023 18:28:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33UISXB6011121; Sun, 30 Apr 2023 18:28:33 GMT (envelope-from git) Date: Sun, 30 Apr 2023 18:28:33 GMT Message-Id: <202304301828.33UISXB6011121@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Stefan=20E=C3=9Fer?= Subject: git: 8c48f4c5377d - main - contrib/bc: import version 6.5.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8c48f4c5377ddc3dc55388f181f23111145f7099 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=8c48f4c5377ddc3dc55388f181f23111145f7099 commit 8c48f4c5377ddc3dc55388f181f23111145f7099 Author: Stefan Eßer AuthorDate: 2023-04-30 17:53:26 +0000 Commit: Stefan Eßer CommitDate: 2023-04-30 18:28:21 +0000 contrib/bc: import version 6.5.0 This release that fixes an infinite loop bug in the (non-standard) extended math library functions root() and cbrt(), fixes a bug with BC_LINE_LENGTH=0, and adds the fib() function to the extended math library to calculate Fibonacci numbers. (cherry picked from commit 438a1101dc1f687928cdbe02cd7817a88a24f42f) MFC after: 3 days --- contrib/bc/NEWS.md | 6 + contrib/bc/gen/lib2.bc | 24 +++- contrib/bc/include/version.h | 2 +- contrib/bc/src/vm.c | 8 +- contrib/bc/tests/bc/all.txt | 1 + contrib/bc/tests/bc/fib.txt | 31 +++++ contrib/bc/tests/bc/fib_results.txt | 31 +++++ contrib/bc/tests/bc/scripts/all.txt | 1 + contrib/bc/tests/bc/scripts/cbrt.txt | 100 ++++++++++++++ contrib/bc/tests/bc/scripts/root.bc | 19 +++ contrib/bc/tests/bc/scripts/root.txt | 255 +++++++++++++++++++++++++++++++++++ contrib/bc/tests/extra_required.txt | 1 + contrib/bc/tests/script.sh | 2 +- 13 files changed, 473 insertions(+), 8 deletions(-) diff --git a/contrib/bc/NEWS.md b/contrib/bc/NEWS.md index 6dff6822fb16..44b17b060f5c 100644 --- a/contrib/bc/NEWS.md +++ b/contrib/bc/NEWS.md @@ -1,5 +1,11 @@ # News +## 6.5.0 + +This is a production release that fixes an infinite loop bug in `root()` and +`cbrt()`, fixes a bug with `BC_LINE_LENGTH=0`, and adds the `fib()` function to +the extended math library to calculate Fibonacci numbers. + ## 6.4.0 This is a production release that fixes a `read()`/`?` bug and adds features to diff --git a/contrib/bc/gen/lib2.bc b/contrib/bc/gen/lib2.bc index 2811430d534e..ba3f76b1803a 100644 --- a/contrib/bc/gen/lib2.bc +++ b/contrib/bc/gen/lib2.bc @@ -93,6 +93,18 @@ define comb(n,r){ scale=s return f } +define fib(n){ + auto i,t,p,r + if(!n)return 0 + n=abs(n)$ + t=1 + for (i=1;i= UINT16_MAX) len = BC_NUM_PRINT_WIDTH; + len = (size_t) strtol(lenv, NULL, 10); + if (len != 0) + { + len -= 1; + if (len < 2 || len >= UINT16_MAX) len = BC_NUM_PRINT_WIDTH; + } } // Set the default. else len = BC_NUM_PRINT_WIDTH; diff --git a/contrib/bc/tests/bc/all.txt b/contrib/bc/tests/bc/all.txt index af5eaaa42fb7..3d0ea05ba7c0 100644 --- a/contrib/bc/tests/bc/all.txt +++ b/contrib/bc/tests/bc/all.txt @@ -34,6 +34,7 @@ arctangent sine cosine bessel +fib arrays misc misc1 diff --git a/contrib/bc/tests/bc/fib.txt b/contrib/bc/tests/bc/fib.txt new file mode 100644 index 000000000000..2fa2eea143ed --- /dev/null +++ b/contrib/bc/tests/bc/fib.txt @@ -0,0 +1,31 @@ +fib(0) +fib(1) +fib(2) +fib(3) +fib(4) +fib(5) +fib(6) +fib(7) +fib(8) +fib(9) +fib(10) +fib(11) +fib(12) +fib(13) +fib(14) +fib(15) +fib(16) +fib(17) +fib(18) +fib(19) +fib(20) +fib(21) +fib(22) +fib(23) +fib(24) +fib(25) +fib(26) +fib(27) +fib(28) +fib(29) +fib(30) diff --git a/contrib/bc/tests/bc/fib_results.txt b/contrib/bc/tests/bc/fib_results.txt new file mode 100644 index 000000000000..1837f6b7414f --- /dev/null +++ b/contrib/bc/tests/bc/fib_results.txt @@ -0,0 +1,31 @@ +0 +1 +1 +2 +3 +5 +8 +13 +21 +34 +55 +89 +144 +233 +377 +610 +987 +1597 +2584 +4181 +6765 +10946 +17711 +28657 +46368 +75025 +121393 +196418 +317811 +514229 +832040 diff --git a/contrib/bc/tests/bc/scripts/all.txt b/contrib/bc/tests/bc/scripts/all.txt index e2d2aa320c6f..a226bed54234 100644 --- a/contrib/bc/tests/bc/scripts/all.txt +++ b/contrib/bc/tests/bc/scripts/all.txt @@ -4,6 +4,7 @@ subtract.bc add.bc print.bc parse.bc +root.bc array.bc array2.bc atan.bc diff --git a/contrib/bc/tests/bc/scripts/cbrt.txt b/contrib/bc/tests/bc/scripts/cbrt.txt new file mode 100644 index 000000000000..bae7f3af0578 --- /dev/null +++ b/contrib/bc/tests/bc/scripts/cbrt.txt @@ -0,0 +1,100 @@ +.464158883361277889241007635091 +.215443469003188372175929356651 +.100000000000000000000000000000 +.046415888336127788924100763509 +.021544346900318837217592935665 +.010000000000000000000000000000 +.004641588833612778892410076350 +.002154434690031883721759293566 +.001000000000000000000000000000 +.000464158883361277889241007635 +.000215443469003188372175929356 +.000100000000000000000000000000 +.000046415888336127788924100763 +.000021544346900318837217592935 +.000010000000000000000000000000 +.000004641588833612778892410076 +.000002154434690031883721759293 +.000001000000000000000000000000 +.000000464158883361277889241007 +.000000215443469003188372175929 +.000000100000000000000000000000 +.000000046415888336127788924100 +.000000021544346900318837217592 +.000000010000000000000000000000 +.000000004641588833612778892410 +.000000002154434690031883721759 +.000000001000000000000000000000 +.000000000464158883361277889241 +.000000000215443469003188372175 +.000000000100000000000000000000 +.000000000046415888336127788924 +.000000000021544346900318837217 +.000000000010000000000000000000 +.000000000004641588833612778892 +.000000000002154434690031883721 +.000000000001000000000000000000 +.000000000000464158883361277889 +.000000000000215443469003188372 +.000000000000100000000000000000 +.000000000000046415888336127788 +.000000000000021544346900318837 +.000000000000010000000000000000 +.000000000000004641588833612778 +.000000000000002154434690031883 +.000000000000001000000000000000 +.000000000000000464158883361277 +.000000000000000215443469003188 +.000000000000000100000000000000 +.000000000000000046415888336127 +.000000000000000021544346900318 +.000000000000000010000000000000 +.000000000000000004641588833612 +.000000000000000002154434690031 +.000000000000000001000000000000 +.000000000000000000464158883361 +.000000000000000000215443469003 +.000000000000000000100000000000 +.000000000000000000046415888336 +.000000000000000000021544346900 +.000000000000000000010000000000 +.000000000000000000004641588833 +.000000000000000000002154434690 +.000000000000000000001000000000 +.000000000000000000000464158883 +.000000000000000000000215443469 +.000000000000000000000100000000 +.000000000000000000000046415888 +.000000000000000000000021544346 +.000000000000000000000010000000 +.000000000000000000000004641588 +.000000000000000000000002154434 +.000000000000000000000001000000 +.000000000000000000000000464158 +.000000000000000000000000215443 +.000000000000000000000000100000 +.000000000000000000000000046415 +.000000000000000000000000021544 +.000000000000000000000000010000 +.000000000000000000000000004641 +.000000000000000000000000002154 +.000000000000000000000000001000 +.000000000000000000000000000464 +.000000000000000000000000000215 +.000000000000000000000000000100 +.000000000000000000000000000046 +.000000000000000000000000000021 +.000000000000000000000000000010 +.000000000000000000000000000004 +.000000000000000000000000000002 +.000000000000000000000000000001 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 diff --git a/contrib/bc/tests/bc/scripts/root.bc b/contrib/bc/tests/bc/scripts/root.bc new file mode 100644 index 000000000000..95210fe290e6 --- /dev/null +++ b/contrib/bc/tests/bc/scripts/root.bc @@ -0,0 +1,19 @@ +scale = 30 + +s = 1 >> 1 + +for (i = 0; i < 100; ++i) +{ + cbrt(s) + s >>= 1 +} + +s = 1 >> 1 + +for (i = 0; i < 155; ++i) +{ + root(s, 5) + s >>= 1 +} + +halt diff --git a/contrib/bc/tests/bc/scripts/root.txt b/contrib/bc/tests/bc/scripts/root.txt new file mode 100644 index 000000000000..b720eb5de75f --- /dev/null +++ b/contrib/bc/tests/bc/scripts/root.txt @@ -0,0 +1,255 @@ +.464158883361277889241007635091 +.215443469003188372175929356651 +.100000000000000000000000000000 +.046415888336127788924100763509 +.021544346900318837217592935665 +.010000000000000000000000000000 +.004641588833612778892410076350 +.002154434690031883721759293566 +.001000000000000000000000000000 +.000464158883361277889241007635 +.000215443469003188372175929356 +.000100000000000000000000000000 +.000046415888336127788924100763 +.000021544346900318837217592935 +.000010000000000000000000000000 +.000004641588833612778892410076 +.000002154434690031883721759293 +.000001000000000000000000000000 +.000000464158883361277889241007 +.000000215443469003188372175929 +.000000100000000000000000000000 +.000000046415888336127788924100 +.000000021544346900318837217592 +.000000010000000000000000000000 +.000000004641588833612778892410 +.000000002154434690031883721759 +.000000001000000000000000000000 +.000000000464158883361277889241 +.000000000215443469003188372175 +.000000000100000000000000000000 +.000000000046415888336127788924 +.000000000021544346900318837217 +.000000000010000000000000000000 +.000000000004641588833612778892 +.000000000002154434690031883721 +.000000000001000000000000000000 +.000000000000464158883361277889 +.000000000000215443469003188372 +.000000000000100000000000000000 +.000000000000046415888336127788 +.000000000000021544346900318837 +.000000000000010000000000000000 +.000000000000004641588833612778 +.000000000000002154434690031883 +.000000000000001000000000000000 +.000000000000000464158883361277 +.000000000000000215443469003188 +.000000000000000100000000000000 +.000000000000000046415888336127 +.000000000000000021544346900318 +.000000000000000010000000000000 +.000000000000000004641588833612 +.000000000000000002154434690031 +.000000000000000001000000000000 +.000000000000000000464158883361 +.000000000000000000215443469003 +.000000000000000000100000000000 +.000000000000000000046415888336 +.000000000000000000021544346900 +.000000000000000000010000000000 +.000000000000000000004641588833 +.000000000000000000002154434690 +.000000000000000000001000000000 +.000000000000000000000464158883 +.000000000000000000000215443469 +.000000000000000000000100000000 +.000000000000000000000046415888 +.000000000000000000000021544346 +.000000000000000000000010000000 +.000000000000000000000004641588 +.000000000000000000000002154434 +.000000000000000000000001000000 +.000000000000000000000000464158 +.000000000000000000000000215443 +.000000000000000000000000100000 +.000000000000000000000000046415 +.000000000000000000000000021544 +.000000000000000000000000010000 +.000000000000000000000000004641 +.000000000000000000000000002154 +.000000000000000000000000001000 +.000000000000000000000000000464 +.000000000000000000000000000215 +.000000000000000000000000000100 +.000000000000000000000000000046 +.000000000000000000000000000021 +.000000000000000000000000000010 +.000000000000000000000000000004 +.000000000000000000000000000002 +.000000000000000000000000000001 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +.630957344480193249434360136622 +.398107170553497250770252305087 +.251188643150958011108503206779 +.158489319246111348520210137339 +.100000000000000000000000000000 +.063095734448019324943436013662 +.039810717055349725077025230508 +.025118864315095801110850320677 +.015848931924611134852021013733 +.010000000000000000000000000000 +.006309573444801932494343601366 +.003981071705534972507702523050 +.002511886431509580111085032067 +.001584893192461113485202101373 +.001000000000000000000000000000 +.000630957344480193249434360136 +.000398107170553497250770252305 +.000251188643150958011108503206 +.000158489319246111348520210137 +.000100000000000000000000000000 +.000063095734448019324943436013 +.000039810717055349725077025230 +.000025118864315095801110850320 +.000015848931924611134852021013 +.000010000000000000000000000000 +.000006309573444801932494343601 +.000003981071705534972507702523 +.000002511886431509580111085032 +.000001584893192461113485202101 +.000001000000000000000000000000 +.000000630957344480193249434360 +.000000398107170553497250770252 +.000000251188643150958011108503 +.000000158489319246111348520210 +.000000100000000000000000000000 +.000000063095734448019324943436 +.000000039810717055349725077025 +.000000025118864315095801110850 +.000000015848931924611134852021 +.000000010000000000000000000000 +.000000006309573444801932494343 +.000000003981071705534972507702 +.000000002511886431509580111085 +.000000001584893192461113485202 +.000000001000000000000000000000 +.000000000630957344480193249434 +.000000000398107170553497250770 +.000000000251188643150958011108 +.000000000158489319246111348520 +.000000000100000000000000000000 +.000000000063095734448019324943 +.000000000039810717055349725077 +.000000000025118864315095801110 +.000000000015848931924611134852 +.000000000010000000000000000000 +.000000000006309573444801932494 +.000000000003981071705534972507 +.000000000002511886431509580111 +.000000000001584893192461113485 +.000000000001000000000000000000 +.000000000000630957344480193249 +.000000000000398107170553497250 +.000000000000251188643150958011 +.000000000000158489319246111348 +.000000000000100000000000000000 +.000000000000063095734448019324 +.000000000000039810717055349725 +.000000000000025118864315095801 +.000000000000015848931924611134 +.000000000000010000000000000000 +.000000000000006309573444801932 +.000000000000003981071705534972 +.000000000000002511886431509580 +.000000000000001584893192461113 +.000000000000001000000000000000 +.000000000000000630957344480193 +.000000000000000398107170553497 +.000000000000000251188643150958 +.000000000000000158489319246111 +.000000000000000100000000000000 +.000000000000000063095734448019 +.000000000000000039810717055349 +.000000000000000025118864315095 +.000000000000000015848931924611 +.000000000000000010000000000000 +.000000000000000006309573444801 +.000000000000000003981071705534 +.000000000000000002511886431509 +.000000000000000001584893192461 +.000000000000000001000000000000 +.000000000000000000630957344480 +.000000000000000000398107170553 +.000000000000000000251188643150 +.000000000000000000158489319246 +.000000000000000000100000000000 +.000000000000000000063095734448 +.000000000000000000039810717055 +.000000000000000000025118864315 +.000000000000000000015848931924 +.000000000000000000010000000000 +.000000000000000000006309573444 +.000000000000000000003981071705 +.000000000000000000002511886431 +.000000000000000000001584893192 +.000000000000000000001000000000 +.000000000000000000000630957344 +.000000000000000000000398107170 +.000000000000000000000251188643 +.000000000000000000000158489319 +.000000000000000000000100000000 +.000000000000000000000063095734 +.000000000000000000000039810717 +.000000000000000000000025118864 +.000000000000000000000015848931 +.000000000000000000000010000000 +.000000000000000000000006309573 +.000000000000000000000003981071 +.000000000000000000000002511886 +.000000000000000000000001584893 +.000000000000000000000001000000 +.000000000000000000000000630957 +.000000000000000000000000398107 +.000000000000000000000000251188 +.000000000000000000000000158489 +.000000000000000000000000100000 +.000000000000000000000000063095 +.000000000000000000000000039810 +.000000000000000000000000025118 +.000000000000000000000000015848 +.000000000000000000000000010000 +.000000000000000000000000006309 +.000000000000000000000000003981 +.000000000000000000000000002511 +.000000000000000000000000001584 +.000000000000000000000000001000 +.000000000000000000000000000630 +.000000000000000000000000000398 +.000000000000000000000000000251 +.000000000000000000000000000158 +.000000000000000000000000000100 +.000000000000000000000000000063 +.000000000000000000000000000039 +.000000000000000000000000000025 +.000000000000000000000000000015 +.000000000000000000000000000010 +.000000000000000000000000000006 +.000000000000000000000000000003 +.000000000000000000000000000002 +.000000000000000000000000000001 +.000000000000000000000000000001 +0 +0 +0 +0 +0 diff --git a/contrib/bc/tests/extra_required.txt b/contrib/bc/tests/extra_required.txt index e36d95a1305b..c498802ffaea 100644 --- a/contrib/bc/tests/extra_required.txt +++ b/contrib/bc/tests/extra_required.txt @@ -1,5 +1,6 @@ engineering lib2 +fib places rand scientific diff --git a/contrib/bc/tests/script.sh b/contrib/bc/tests/script.sh index 438af17c79c4..fef0c5290615 100755 --- a/contrib/bc/tests/script.sh +++ b/contrib/bc/tests/script.sh @@ -132,7 +132,7 @@ fi # Skip the tests that require extra math if we don't have it. if [ "$run_extra_tests" -eq 0 ]; then - if [ "$f" = "rand.bc" ]; then + if [ "$f" = "rand.bc" ] || [ "$f" = "root.bc" ]; then printf 'Skipping %s script: %s\n' "$d" "$f" exit 0 fi From nobody Sun Apr 30 18:32:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8ZhG6dYkz488Qx for ; Sun, 30 Apr 2023 18:32:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8ZhG6Cnbz3rBP; Sun, 30 Apr 2023 18:32:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682879550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kKpZTAmaAVTkWzYIxIZSEI2XWTyFN7blSV7k/iqmynI=; b=fz/MLn5Xi3G8MuF8RUTlQaFNNMJRLVG5MZ5vwfD212hGCLMtl8aCv/psPfkf/tUH6H1MYb b61UljJL08lMSkSE3M3DHIpgDPz9rqVSsC8va5bfkFzn0yPJ0gZF+AUXS0qcjzs2bbYIKM MjjXQvBY93RB+jNzDN+9AHC79IA/sQuGKiT/QuAzzBCnjx3vjvEocgkzmwwScqYzQWAETu YjTgbv5kMTRMgsiR9oBVyyP4yHgHVI4UCCphnVjvnG2MO+to1pBH8gdmCAcRIuu+BQVTOl Vvdd761CNEVf4MSsT7wCMzPMuFAvHLPN493mU3hEXrceGfj4IgKMgtAoOSQ4+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682879550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kKpZTAmaAVTkWzYIxIZSEI2XWTyFN7blSV7k/iqmynI=; b=HW3Ky+1jUGcBqY9lUAFtIU4tFSrka2hdAMbt3eqJC8Akc/gAxyr5XDGNWVdRoL6RHIjcKs qfGgNh+SaGnpkkxIXWFlCTD+jojA0K9mZdbDutVO3aI/JYpgxR6EJbJjv+QxJqFTBwqgWR YoffQqxZpm2h4GykQjr4B6C9fW/+3mcXkP38eP97x50cBXWDfXIRWZpMaE3mMkkYVGMGdj /euYi8yf9TwCfOrx1jkWYrUMokzsKaNLTAv5foFyODKXO727hDT9GcMt3ZiVVWlMYR6HR+ UbVUuqrtzYnjCUnndmbRY7jj69VZyj0ag63hgxQ/hl29ejq3+FF5GD9dpL7EMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682879550; a=rsa-sha256; cv=none; b=bSsJ4UQlrpC+4E3s+FgTNerUmKcqxRPXL9ObgizLiRvpXnQ5auSrUV5UrWvh2EBbLZf4CJ RNcJiUvkruAPm8v0jG5PM7JLK4Pnej9KZDa8j7HdXOxc8opF5QnVnOfSQHVIyrJFL56b7m aMpo1BXjqmVxephnjzhgNZzMcVlIKY7hNs4lBq9q80eSvXiXBl5tm9daRhiCqIje97PaAG DiXW3P3c6QcLwhxLcX7GQy1x64aP3yhy/v6ymWet5UzOqxaRWD/s22YT1RmF8VqrKj6Ky0 yL97PvZ1A7nSo3c6ij3XIn1BG1SzB3ssmNjNwtWKp/PgSlIN0iPjek3kR4TUKw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8ZhG5JNWzYwy; Sun, 30 Apr 2023 18:32:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33UIWUDp026164; Sun, 30 Apr 2023 18:32:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33UIWUkM026163; Sun, 30 Apr 2023 18:32:30 GMT (envelope-from git) Date: Sun, 30 Apr 2023 18:32:30 GMT Message-Id: <202304301832.33UIWUkM026163@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: =?utf-8?Q?Stefan=20E=C3=9Fer?= Subject: git: 52004851efe7 - Create tag vendor/bc/6.5.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/tags/vendor/bc/6.5.0 X-Git-Reftype: annotated tag X-Git-Commit: 52004851efe772131d3b2875721b697d71a6b0f7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The annotated tag vendor/bc/6.5.0 has been created by se: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/bc/6.5.0 tag vendor/bc/6.5.0 Tagger: Stefan Eßer TaggerDate: 2023-04-30 18:31:54 +0000 tag version 6.5.0 commit 438a1101dc1f687928cdbe02cd7817a88a24f42f Author: Stefan Eßer AuthorDate: 2023-04-30 17:53:26 +0000 Commit: Stefan Eßer CommitDate: 2023-04-30 17:53:26 +0000 contrib/bc: import version 6.5.0 This release that fixes an infinite loop bug in the (non-standard) extended math library functions root() and cbrt(), fixes a bug with BC_LINE_LENGTH=0, and adds the fib() function to the extended math library to calculate Fibonacci numbers. From nobody Sun Apr 30 20:26:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8dDD6FxRz48GdW; Sun, 30 Apr 2023 20:26: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 4Q8dDD5fPVz44dZ; Sun, 30 Apr 2023 20:26:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682886412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a/tZpc3m2jZ3SMtGoxPcM3L9CqwMVW61IpD8h9FAGZg=; b=Emryr9IH0SB8OtKDEa6SwafKcIis277bZJFUs8JAmKoV9gYxsz45Jjo1433CtgQz33U0KU xK8CL2hdhvocR9GJ7h2PpRC0CN1pABggO3odTfRc1X8PBILDJAriGHQ0ipijmDY1xv0/zB hKtyOB5/P9NwPT50kxETpqE9j7tt0ubiK68xlUhDQ+71eoJoJW6h4Px36/WHtJlUbXJITu BpQmeV30/QDhExYzUEFF3oETW5ERvh6inFEXjn5NDuJB9qbSmWZdWU/h5cLxyDnKu/YXWK 0uRPZsyRpGYjsp7kFTfeY+WsNk9TwjUuzzUtQSeGHu6cHZtC0ChXy+OosSeq8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682886412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a/tZpc3m2jZ3SMtGoxPcM3L9CqwMVW61IpD8h9FAGZg=; b=UE59X6DB4HdYoAqv5kyO03CFfrdCXzv46i/FL2CcLFErtvY+SyIbeyRodNDvYjbVuOpMMr wQDhdt2BbY7avjcYyQEXFD6FCTjy6QxU3i9XG57G5DNn7pg5C9Zb4VHOJzkKbqKcNoFqEy yVarCBchpIjgkY9KhOaLsffp8HkEp9aro5k37PuRnuYOlqTLhiXiXs2ypjhNUK9dyRit4F uVKgFt1xioODkEut3vTXZccO+SaSLrgFVQcxWsKN42xhazs0bdO4XkDJ84a7JHcIUH0pn6 4DSUfLUfAiiLgbYPsuNnmyoHDUsqZ/Zt7PGoXrMdnf0IVRIdB8egQ3p/4lT7KQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682886412; a=rsa-sha256; cv=none; b=gv1Ak0Ml0jGgNyPi+FgjLxmUQDHIXF0Px5hrLUy8tRv6vnMgZWACk4/Jx9BhVrLUeuFcC4 JeUmmBkfRYR9u5uiTo3tfQL7sbZIrMpAmIsybmMVYjfa8Asn4d3PwIJ99d9lh67ZYgvCFF KPl1LG22quob+5kQbAYZWSFx0qW1U0ekxojss+vd7u79hZT8LOwLiZHA2AeYMW8SsdXym4 3y8xsWKgDvwvRcLJPkPmGkIQORQZxOq85RnHEiaWqqafs8hMRIdDQ48td9hfRqZTaaNc/j JOLqHUwVpeoB6XIgwLzuhUl+LdZKPMVx38hJt1hwZp1zl1kQTlTd8Y5LQz/ScQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8dDD4bzSzd4d; Sun, 30 Apr 2023 20:26:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33UKQqF6009094; Sun, 30 Apr 2023 20:26:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33UKQqwD009093; Sun, 30 Apr 2023 20:26:52 GMT (envelope-from git) Date: Sun, 30 Apr 2023 20:26:52 GMT Message-Id: <202304302026.33UKQqwD009093@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: 4824d7887259 - main - listen(2): improve administrator control over logging List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4824d788725987bccff53dec8c103cbac455b3ed Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=4824d788725987bccff53dec8c103cbac455b3ed commit 4824d788725987bccff53dec8c103cbac455b3ed Author: Eugene Grosbein AuthorDate: 2023-04-30 20:14:30 +0000 Commit: Eugene Grosbein CommitDate: 2023-04-30 20:26:44 +0000 listen(2): improve administrator control over logging As documented in listen.2 manual page, the kernel emits a LOG_DEBUG syslog message if a socket listen queue overflows. For some appliances, it may be desirable to change the priority to some higher value like LOG_INFO while keeping other debugging suppressed. OTOH there are cases when such overflows are normal and expected. Then it may be desirable to suppress overflow logging altogether, so that dmesg buffer is not flooded over long run. In addition to existing sysctl kern.ipc.sooverinterval, introduce new sysctl kern.ipc.sooverprio that defaults to 7 (LOG_DEBUG) to preserve current behavior. It may be changed to any value in a range of 0..7 for corresponding priority or to -1 to suppress logging. Document it in the listen.2 manual page. MFC after: 1 month --- lib/libc/sys/listen.2 | 15 +++++++++++++-- sys/kern/uipc_socket.c | 13 ++++++++++--- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/lib/libc/sys/listen.2 b/lib/libc/sys/listen.2 index 4d0962fd412c..076163548b72 100644 --- a/lib/libc/sys/listen.2 +++ b/lib/libc/sys/listen.2 @@ -28,7 +28,7 @@ .\" From: @(#)listen.2 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd April 14, 2020 +.Dd April 30, 2023 .Dt LISTEN 2 .Os .Sh NAME @@ -111,10 +111,20 @@ or less than zero is specified, is silently forced to .Va kern.ipc.soacceptqueue . .Pp -If the listen queue overflows, the kernel will emit a LOG_DEBUG syslog message. +If the listen queue overflows, the kernel will emit a syslog message +using default priority LOG_DEBUG (7). The .Xr sysctl 3 MIB variable +.Va kern.ipc.sooverprio +may be used to change this priority to any value in a range of 0..7 +(LOG_EMERG..LOG_DEBUG). +See +.Xr syslog 3 +for details. +It may be set to -1 to disable these messages. +.Pp +The variable .Va kern.ipc.sooverinterval specifies a per-socket limit on how often the kernel will emit these messages. .Sh INTERACTION WITH ACCEPT FILTERS @@ -164,6 +174,7 @@ The socket is not of a type that supports the operation .Xr connect 2 , .Xr socket 2 , .Xr sysctl 3 , +.Xr syslog 3 , .Xr sysctl 8 , .Xr accept_filter 9 .Sh HISTORY diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index f529f885d17c..eaff57d50d78 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -578,6 +578,10 @@ SYSCTL_INT(_regression, OID_AUTO, sonewconn_earlytest, CTLFLAG_RW, ®ression_sonewconn_earlytest, 0, "Perform early sonewconn limit test"); #endif +static int sooverprio = LOG_DEBUG; +SYSCTL_INT(_kern_ipc, OID_AUTO, sooverprio, CTLFLAG_RW, + &sooverprio, 0, "Log priority for listen socket overflows: 0..7 or -1 to disable"); + static struct timeval overinterval = { 60, 0 }; SYSCTL_TIMEVAL_SEC(_kern_ipc, OID_AUTO, sooverinterval, CTLFLAG_RW, &overinterval, @@ -617,7 +621,8 @@ solisten_clone(struct socket *head) if (over) { #endif head->sol_overcount++; - dolog = !!ratecheck(&head->sol_lastover, &overinterval); + dolog = (sooverprio >= 0) && + !!ratecheck(&head->sol_lastover, &overinterval); /* * If we're going to log, copy the overflow count and queue @@ -706,14 +711,16 @@ solisten_clone(struct socket *head) * sys/kern/sonewconn_overflow checks for it. */ if (head->so_cred == 0) { - log(LOG_DEBUG, "sonewconn: pcb %p (%s): " + log(LOG_PRI(sooverprio), + "sonewconn: pcb %p (%s): " "Listen queue overflow: %i already in " "queue awaiting acceptance (%d " "occurrences)\n", head->so_pcb, sbuf_data(&descrsb), qlen, overcount); } else { - log(LOG_DEBUG, "sonewconn: pcb %p (%s): " + log(LOG_PRI(sooverprio), + "sonewconn: pcb %p (%s): " "Listen queue overflow: " "%i already in queue awaiting acceptance " "(%d occurrences), euid %d, rgid %d, jail %s\n", From nobody Sun Apr 30 23:47:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8jgR6Yh7z48SrY; Sun, 30 Apr 2023 23:47:15 +0000 (UTC) (envelope-from jah@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 4Q8jgR60vsz4RvC; Sun, 30 Apr 2023 23:47:15 +0000 (UTC) (envelope-from jah@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682898435; 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=OukEzG48efWFkuOKgYZSFA4uDoevjeXSH4U0g2NKxT4=; b=hJ/gk9A3O3d9vMj9RvyixOJ2PAU/xpb3K+/E/B0ySzISEfbTYbm7RYRfkEJycFH7EOc/uY 2Yp02s0VmX/+JtE90yrEtnjc//ZjEfHlq34iSiwfGmOvMAxRqfXkUCcdtpYaUhqDfO/pBL 4AxR+JsUm4A4DnudCCLK8lu7OE3ckcxEzt2nWZ5A1+DduQX0G4W1q+658lQe3Ztoq/KHYs BHUWszqC31X0irFQW8hnFStTGJvLhsUrMM0FiCDwzCsf5+glIlZT/0a7Dfe91IPGVT7gYX u55r+aVAlLUrXDkAIiX1PU0dDyJoovVLAyfbQVYN4r/Db3BcxfW6hdzmXhDD6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682898435; 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=OukEzG48efWFkuOKgYZSFA4uDoevjeXSH4U0g2NKxT4=; b=Okcca9laYvruzKVorEn5ejSKQi4/lqFtYUeUEhkiXcfBkf7SBLdwIIawXuHsXubJD1PjiN fxTPB5NHASDHb2kLQoHKLuGmANpb1man8S9gv5JpespOwT+lQOrZGZriYPBVq9UG4i8flV Y9Cj72mKZQ64KiVFoTNJaMdKpQK788WcUQE7JoOHTqaSR1f2V11RdJRxnvAXNb5k3VHvfC xW7NcZcA6zWVUcBkKCLA4W72HxTwGRsXZsGsQrKTOFi7FcS9ubezCo8louD1yoD9DUg01B 7AHzrdcgy35J0cbk3J0O4jkxHauzNTX0/mhiycW8xQgt2M//MF8c3w4Dvi1W5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682898435; a=rsa-sha256; cv=none; b=DKHwon7FhEOOLZIqd+l9skiTInL+Vf57mEGibQugViZQtz15jbM2tt/fNzovrjwxuYDTCT NxF6jKCSGehs1ImbVTl74ciBORN8vcdAO+O4l7MTSAlWclUHHc9iKrNLVdAMuXutTsNQbn aPbAGrsEsyp+D4TZViLwGZsHRCoec/OKYS3QR4Qp2ah9WAqGnKXikNoXUcLrN4/nujRjGs DmT+VdRshytYWHQidoGov5C/r7Po+hPSgh1WhYsZlyw9h+sKEjUL6g+/wDgh59jsIFhdNH hFOk03HyUoJbvBxRE2EeRIU1YNKFdybG2YfMpJv2A7TAvnEz/6Bx5+9FfuwcMA== Received: from corona (047-232-115-243.res.spectrum.com [47.232.115.243]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jah) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q8jgR2PdNzTDr; Sun, 30 Apr 2023 23:47:15 +0000 (UTC) (envelope-from jah@freebsd.org) Date: Sun, 30 Apr 2023 18:47:13 -0500 From: "Jason A. Harmening" To: Konstantin Belousov Cc: Dimitry Andric , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Subject: Re: git: 060699e91369 - stable/13 - Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6 Message-ID: References: <202304092135.339LZMeJ081640@gitrepo.freebsd.org> <76DD2CB9-986B-4349-8F46-3B7BF63EB315@FreeBSD.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ThisMailContainsUnwantedMimeParts: N On Sun, Apr 30, 2023 at 08:09:16AM +0300, Konstantin Belousov wrote: > On Sat, Apr 29, 2023 at 02:27:50PM -0500, Jason A. Harmening wrote: > > On Sat, Apr 29, 2023 at 08:49:28PM +0200, Dimitry Andric wrote: > > > On 29 Apr 2023, at 20:33, Jason A. Harmening wrote: > > > > > > > > On Sun, Apr 09, 2023 at 09:35:22PM +0000, Dimitry Andric wrote: > > > >> The branch stable/13 has been updated by dim: > > > >> > > > >> URL: https://cgit.FreeBSD.org/src/commit/?id=060699e9136975d51d3f726b9785bdbac9a62ba6 > > > >> > > > >> commit 060699e9136975d51d3f726b9785bdbac9a62ba6 > > > >> Author: Dimitry Andric > > > >> AuthorDate: 2023-01-14 16:33:24 +0000 > > > >> Commit: Dimitry Andric > > > >> CommitDate: 2023-04-09 14:54:52 +0000 > > > >> > > > >> Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6 > > > >> > > > >> This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and > > > >> openmp to llvmorg-15.0.7-0-g8dfdcc7b7bf6. > > > >> > > > >> PR: 265425 > > > >> MFC after: 2 weeks > > > > > > > > This MFC of llvm15 appears to have completely broken the Intel IOMMU > > > > driver on my stable/13 machine. After this series of commits, any > > > > downstream DMA seems to produce an IOMMU translation fault, which > > > > renders the machine completely unusable: no nvme boot disk, no usb > > > > keyboard, etc. > > > > > > > > The faults I see look something like this: > > > > > > > > DMAR4: ahci0: pci0:17:5 sid 8d fault acc 0 adt 0x0 reason 0x3 addr 26000 > > > > > > > > It's a bit surprising to see a toolchain upgrade produce breakage like > > > > this, but that's what git bisect clearly tells me. I wonder if some of > > > > the IOMMU control structures might be defined as C bitfields and the new > > > > compiler is emitting them differently? Also, was any breakage like this > > > > observed when -current was upgraded to llvm15 several months ago? > > > > > > I haven't heard anything about such breakage, no. > > > > > > > > > > More generally, this is the second time in as many months I've had to > > > > deal with IOMMU breakage on -stable. I can't imagine I'm the only > > > > person who sees value in running with DMA remapping enabled; do we need > > > > a dedicated DMAR-enabled machine in the cluster to smoke-test changes > > > > like this? More generally, should we avoid MFCing high-risk changes > > > > like this? > > > > > > Since there were very few bug reports, it was not deemed high risk. > > > > > > In any case, it would be good to get the bottom of what is causing the > > > problem, so is there any way you can isolate which code seems to be > > > going "bad"? > > > > > > For example, if this problem affects code in sys/dev/iommu, is there > > > some way you can compile that part with -O1, or with an older version > > > of clang (from ports), to see if the problem goes away? > > > > I did try removing all custom make.conf settings (previously I just had > > CPUTYPE?=icelake-server), but that didn't change the behavior. > > > > Before I try further build tweaks, I'd like to ask if the IOMMU fault > > report can provide guidance here? AFAICT all the faults I'm getting > > show "reason 0x3". If I'm reading the VT-d spec correctly, FR=0x3 > > indicates an invalid context entry, in other words there's something the > > hardware doesn't like in the way the address width or pagetable base is > > configured for the PCIe requestor. > > I would start looking at the other direction: might be, there are still some > left shifts for int32 values with the shift count > 30, or uint32 with the > count > 31. > > Also might be useful to dump each context entry on creation, it is kept > constant after. I did look over the constants in intel_reg.h, and didn't see anything that looked as though it would be susceptible to sign-extension or truncation bugs. In the failing case it's much easier for me to catch the fault messages than any initialization message, so I instrumented the fault handler to get the context entry from the dmar_ctx object using the same logic as dmar_map_ctx_entry(), and then dump out the ctx1 and ctx2 fields. What I see are messages like: ... ctx1 0x10013b001 ctx2 0x103 At first glance these "look right": the P bit is set in ctx1, and the rest of the field looks like a valid physical address. ctx2 also doesn't have any of the reserved bits set, but in all cases it does have AW=3, which would indicate 57-bit AGAW. But when I boot the last working kernel, from the revision prior to the llvm15 MFC, I see this in dmesg: ahci0: dmar4 pci0:0:17:5 rid 8d domain 1 mgaw 48 agaw 48 re-mapped ...all reported devices show 48-bit MGAW/AGAW, so I would expect ctx2 to have AW=2. I suspect this may be the source of the fault, but I'm not sure how it's getting configured that way, whether it's an issue with reading the capability register or something else. From nobody Mon May 1 00:34:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8kkJ2Dr8z48WGD; Mon, 1 May 2023 00:34:48 +0000 (UTC) (envelope-from jah@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 4Q8kkJ1TJJz4YFZ; Mon, 1 May 2023 00:34:48 +0000 (UTC) (envelope-from jah@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682901288; 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=GgMCcZk5NtZQ2CmLkzaUejgO3Q+ZNczDvWWo6x0o++4=; b=jwidpCzPOh7nHQytADhpTSGxqqFsQz5I+dDsExAUIiVeizrH9WQJV40xEtcgBpzu6uRmxl NjkgY0wu6qgsMlYP5QGtUlta7ohMMprYZAS2oyZfS1U+VJgOEFV2Uhbx5jRjw8X4dEvc1Z 6zodjDgEITlyZwO6lsNKhg4C+5yH+/x5XxKWD5BL3FEcRJYuTV3r2HAjH9dN4NomCSbX57 n5IG4zf3lzf1uxgeKEqO62hQIVQB1BF4BSs0EtLHuPk4sgwi6QZ5AjJrC+h557CNVVV6JW sVQU+yj3EyK2v1DuOrnvrUGJMLGD5npNLhbgwTAp9W/tRN1SIoZLe0Mj1qOnBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682901288; 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=GgMCcZk5NtZQ2CmLkzaUejgO3Q+ZNczDvWWo6x0o++4=; b=ZkBs/npCsc/pXT1qUwaYutZXrdLJ19BYDrjkDpoW9RouuudDKb5lf4z6oSdqwnAUIhKOfh WKVHMcDk14tIeZgYJAa9Rljrogfv54S8ZxPBGa9memZs9UopzB+7O63Wy4SQaoNU8dqSLh Er+O4WX1iA08BAq/iW/Y58RjSpqhsPUQq7ctCU06RvNSwWWJxvx/3OJIA9G92IFSSQ/u5X OAFxcPq6JPm3yQmmMFU+uI6YsygxJPJLhVjO+FaNmQHUDUeIaCB5iWm3/MTaFXuflF3GD7 mQGBj3Qg6jH5A52wMvvfDx5aQVbkpTyiPG0TyGSPd80BKjGKPUm+EvBhMS/fjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682901288; a=rsa-sha256; cv=none; b=uIM9S/PVkEzrBjs0XYnP2vijpiY69+0aR/Deo/6jWGbaBIVqGb9wrJ5rw56wfFSyuRcG3h 9WkORaUUs7Pw74hr+ZWhAmjNA3ITh7ZfCLdxCikmpvq74D2IkofnkuDbni6ErkIygPgzVc uXShPTDh04qUniCyoAk/Tq/Ss+U4AJk8VtkQ5IQA2VzPkowpN2vFDY6SFjiXCShAx3/uDJ x6/UlwV9FDlwa5FgUJhmtwcB0qAwyQHXQrp5ZUkO6a9pHvz9+3CunpSWctw3wowyANFvbm X1p25ypNrIiZsLU89+VlvzB81Pza6uVlILjXOmlTOqrQUyu0fAoASW+oObGMRA== Received: from corona (047-232-115-243.res.spectrum.com [47.232.115.243]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jah) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q8kkH4zppzVVN; Mon, 1 May 2023 00:34:47 +0000 (UTC) (envelope-from jah@freebsd.org) Date: Sun, 30 Apr 2023 19:34:45 -0500 From: "Jason A. Harmening" To: Konstantin Belousov Cc: Dimitry Andric , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Subject: Re: git: 060699e91369 - stable/13 - Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6 Message-ID: References: <202304092135.339LZMeJ081640@gitrepo.freebsd.org> <76DD2CB9-986B-4349-8F46-3B7BF63EB315@FreeBSD.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ThisMailContainsUnwantedMimeParts: N On Sun, Apr 30, 2023 at 06:47:13PM -0500, Jason A. Harmening wrote: > On Sun, Apr 30, 2023 at 08:09:16AM +0300, Konstantin Belousov wrote: > > On Sat, Apr 29, 2023 at 02:27:50PM -0500, Jason A. Harmening wrote: > > > On Sat, Apr 29, 2023 at 08:49:28PM +0200, Dimitry Andric wrote: > > > > On 29 Apr 2023, at 20:33, Jason A. Harmening wrote: > > > > > > > > > > On Sun, Apr 09, 2023 at 09:35:22PM +0000, Dimitry Andric wrote: > > > > >> The branch stable/13 has been updated by dim: > > > > >> > > > > >> URL: https://cgit.FreeBSD.org/src/commit/?id=060699e9136975d51d3f726b9785bdbac9a62ba6 > > > > >> > > > > >> commit 060699e9136975d51d3f726b9785bdbac9a62ba6 > > > > >> Author: Dimitry Andric > > > > >> AuthorDate: 2023-01-14 16:33:24 +0000 > > > > >> Commit: Dimitry Andric > > > > >> CommitDate: 2023-04-09 14:54:52 +0000 > > > > >> > > > > >> Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6 > > > > >> > > > > >> This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and > > > > >> openmp to llvmorg-15.0.7-0-g8dfdcc7b7bf6. > > > > >> > > > > >> PR: 265425 > > > > >> MFC after: 2 weeks > > > > > > > > > > This MFC of llvm15 appears to have completely broken the Intel IOMMU > > > > > driver on my stable/13 machine. After this series of commits, any > > > > > downstream DMA seems to produce an IOMMU translation fault, which > > > > > renders the machine completely unusable: no nvme boot disk, no usb > > > > > keyboard, etc. > > > > > > > > > > The faults I see look something like this: > > > > > > > > > > DMAR4: ahci0: pci0:17:5 sid 8d fault acc 0 adt 0x0 reason 0x3 addr 26000 > > > > > > > > > > It's a bit surprising to see a toolchain upgrade produce breakage like > > > > > this, but that's what git bisect clearly tells me. I wonder if some of > > > > > the IOMMU control structures might be defined as C bitfields and the new > > > > > compiler is emitting them differently? Also, was any breakage like this > > > > > observed when -current was upgraded to llvm15 several months ago? > > > > > > > > I haven't heard anything about such breakage, no. > > > > > > > > > > > > > More generally, this is the second time in as many months I've had to > > > > > deal with IOMMU breakage on -stable. I can't imagine I'm the only > > > > > person who sees value in running with DMA remapping enabled; do we need > > > > > a dedicated DMAR-enabled machine in the cluster to smoke-test changes > > > > > like this? More generally, should we avoid MFCing high-risk changes > > > > > like this? > > > > > > > > Since there were very few bug reports, it was not deemed high risk. > > > > > > > > In any case, it would be good to get the bottom of what is causing the > > > > problem, so is there any way you can isolate which code seems to be > > > > going "bad"? > > > > > > > > For example, if this problem affects code in sys/dev/iommu, is there > > > > some way you can compile that part with -O1, or with an older version > > > > of clang (from ports), to see if the problem goes away? > > > > > > I did try removing all custom make.conf settings (previously I just had > > > CPUTYPE?=icelake-server), but that didn't change the behavior. > > > > > > Before I try further build tweaks, I'd like to ask if the IOMMU fault > > > report can provide guidance here? AFAICT all the faults I'm getting > > > show "reason 0x3". If I'm reading the VT-d spec correctly, FR=0x3 > > > indicates an invalid context entry, in other words there's something the > > > hardware doesn't like in the way the address width or pagetable base is > > > configured for the PCIe requestor. > > > > I would start looking at the other direction: might be, there are still some > > left shifts for int32 values with the shift count > 30, or uint32 with the > > count > 31. > > > > Also might be useful to dump each context entry on creation, it is kept > > constant after. > > I did look over the constants in intel_reg.h, and didn't see anything > that looked as though it would be susceptible to sign-extension or > truncation bugs. In the failing case it's much easier for me to catch > the fault messages than any initialization message, so I instrumented > the fault handler to get the context entry from the dmar_ctx object > using the same logic as dmar_map_ctx_entry(), and then dump out the ctx1 > and ctx2 fields. What I see are messages like: > > ... ctx1 0x10013b001 ctx2 0x103 > > At first glance these "look right": the P bit is set in ctx1, and the > rest of the field looks like a valid physical address. ctx2 also > doesn't have any of the reserved bits set, but in all cases it does have > AW=3, which would indicate 57-bit AGAW. But when I boot the last > working kernel, from the revision prior to the llvm15 MFC, I see this in > dmesg: > > ahci0: dmar4 pci0:0:17:5 rid 8d domain 1 mgaw 48 agaw 48 re-mapped > > ...all reported devices show 48-bit MGAW/AGAW, so I would expect ctx2 to > have AW=2. I suspect this may be the source of the fault, but I'm not > sure how it's getting configured that way, whether it's an issue with > reading the capability register or something else. > I can confirm that hacking domain_set_agaw() to always use the settings from sagaw_bits[2] eliminates the faults and at least allows the machine to boot to single-user mode. From nobody Mon May 1 03:31:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8pfg4X9Xz47hb3; Mon, 1 May 2023 03:31:55 +0000 (UTC) (envelope-from jah@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 4Q8pfg44fdz3PlK; Mon, 1 May 2023 03:31:55 +0000 (UTC) (envelope-from jah@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682911915; 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=vqcud5tgq7JLQZQeAzsNw4sqhMhRqHFxrRSEAnZcv3k=; b=wACWuRQXealEbrCyy4KX+57cWN464Cbv6HrgTOZAEg7C12+pMHNLyqxqkMfMlV7gXu/8Ry sVz1Oa5UUrC3BP/4MaRux+5D5G6eFsamG9R+0TJxWS43w18kN4Ors2lWBlmdeBmfz/hOGR 7q1axJuy3OVEUKKq9MGbXN1H+KT9KzZy7gxGp0mGmlN1bfyQTtuKSdOYjLOBiRl7ss/3IM iCAl9Qcdk6I9oda6+PFaFS/kG0HobaEGNXjLHUnYCS6eD+zQO30QzjS2XdzcFT0FCFkJUc G5FSvo93OfeM4LbXK8c2WfSANCZaNIg/SSB4Oj7DdE80f8kSgUp/WDyighAgyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682911915; 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=vqcud5tgq7JLQZQeAzsNw4sqhMhRqHFxrRSEAnZcv3k=; b=EYtUNUnhqvEHiTblMdtMnPszutXOLDk/DrKgN9oaHhWo+OLyNpNUitLWE51X/Pwiua6n4d xpzL2P00fOFJvHfEImZGt15eqeq06L/dsy6lMpmwTBwEo0va+8XTPlIUXUT+ZKDU58TKgY pKJ4QdkcfCjco/n/X4z6wP33GKzC1KRZckD+FTxp63pU9Of1LzHPGlAw6ul3kctjNtJEIP huDqJkzE7UNx0MAHVl5l8TzFbUzjVE9bM/7fh46UKIsRJGnzzHt/9EHKj6wWdfsZtFUqgt vDrFn5PXTEZz5f+01XZGKrhEYn8lc+rvU4bT4p+fJ0wtSeFGDppdL47r3UjAuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682911915; a=rsa-sha256; cv=none; b=j43BDIrA6hnM6IqDzLtkUcEcBDK24zG9je3veLRZebzyUfbzogYxLkGyT/mj2TFSy91GOp dEW2urQ7GFEAywQQ73Nitc+z6D1Qyuuk66GO0Jbx5PTOdCv27wtu6OlA0LMj0x3igFLwv0 ///+uj9g0ZIkkKL5mpOI+7AvReRHhrlPZUmfu+tEP7UZf3x7pL4Z+UISEx9sL5dQwfNdoW PgH50yo8230H2lUcpVZ2rF7dhpwLbr290GjhXetkp+tEoGbH6t2bfOgt1qXLPON9cit5fS ZFt36SALTgL8qAxkZL9ZWpiEBpI9nHa3sP4XpP6IcxwpmQlzxvkMnpxW8ABa+Q== Received: from corona (047-232-115-243.res.spectrum.com [47.232.115.243]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jah) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q8pff62lbzYKt; Mon, 1 May 2023 03:31:54 +0000 (UTC) (envelope-from jah@freebsd.org) Date: Sun, 30 Apr 2023 22:31:53 -0500 From: "Jason A. Harmening" To: Konstantin Belousov Cc: Dimitry Andric , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Subject: Re: git: 060699e91369 - stable/13 - Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6 Message-ID: References: <202304092135.339LZMeJ081640@gitrepo.freebsd.org> <76DD2CB9-986B-4349-8F46-3B7BF63EB315@FreeBSD.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ThisMailContainsUnwantedMimeParts: N On Sun, Apr 30, 2023 at 07:34:45PM -0500, Jason A. Harmening wrote: > On Sun, Apr 30, 2023 at 06:47:13PM -0500, Jason A. Harmening wrote: > > On Sun, Apr 30, 2023 at 08:09:16AM +0300, Konstantin Belousov wrote: > > > On Sat, Apr 29, 2023 at 02:27:50PM -0500, Jason A. Harmening wrote: > > > > On Sat, Apr 29, 2023 at 08:49:28PM +0200, Dimitry Andric wrote: > > > > > On 29 Apr 2023, at 20:33, Jason A. Harmening wrote: > > > > > > > > > > > > On Sun, Apr 09, 2023 at 09:35:22PM +0000, Dimitry Andric wrote: > > > > > >> The branch stable/13 has been updated by dim: > > > > > >> > > > > > >> URL: https://cgit.FreeBSD.org/src/commit/?id=060699e9136975d51d3f726b9785bdbac9a62ba6 > > > > > >> > > > > > >> commit 060699e9136975d51d3f726b9785bdbac9a62ba6 > > > > > >> Author: Dimitry Andric > > > > > >> AuthorDate: 2023-01-14 16:33:24 +0000 > > > > > >> Commit: Dimitry Andric > > > > > >> CommitDate: 2023-04-09 14:54:52 +0000 > > > > > >> > > > > > >> Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6 > > > > > >> > > > > > >> This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and > > > > > >> openmp to llvmorg-15.0.7-0-g8dfdcc7b7bf6. > > > > > >> > > > > > >> PR: 265425 > > > > > >> MFC after: 2 weeks > > > > > > > > > > > > This MFC of llvm15 appears to have completely broken the Intel IOMMU > > > > > > driver on my stable/13 machine. After this series of commits, any > > > > > > downstream DMA seems to produce an IOMMU translation fault, which > > > > > > renders the machine completely unusable: no nvme boot disk, no usb > > > > > > keyboard, etc. > > > > > > > > > > > > The faults I see look something like this: > > > > > > > > > > > > DMAR4: ahci0: pci0:17:5 sid 8d fault acc 0 adt 0x0 reason 0x3 addr 26000 > > > > > > > > > > > > It's a bit surprising to see a toolchain upgrade produce breakage like > > > > > > this, but that's what git bisect clearly tells me. I wonder if some of > > > > > > the IOMMU control structures might be defined as C bitfields and the new > > > > > > compiler is emitting them differently? Also, was any breakage like this > > > > > > observed when -current was upgraded to llvm15 several months ago? > > > > > > > > > > I haven't heard anything about such breakage, no. > > > > > > > > > > > > > > > > More generally, this is the second time in as many months I've had to > > > > > > deal with IOMMU breakage on -stable. I can't imagine I'm the only > > > > > > person who sees value in running with DMA remapping enabled; do we need > > > > > > a dedicated DMAR-enabled machine in the cluster to smoke-test changes > > > > > > like this? More generally, should we avoid MFCing high-risk changes > > > > > > like this? > > > > > > > > > > Since there were very few bug reports, it was not deemed high risk. > > > > > > > > > > In any case, it would be good to get the bottom of what is causing the > > > > > problem, so is there any way you can isolate which code seems to be > > > > > going "bad"? > > > > > > > > > > For example, if this problem affects code in sys/dev/iommu, is there > > > > > some way you can compile that part with -O1, or with an older version > > > > > of clang (from ports), to see if the problem goes away? > > > > > > > > I did try removing all custom make.conf settings (previously I just had > > > > CPUTYPE?=icelake-server), but that didn't change the behavior. > > > > > > > > Before I try further build tweaks, I'd like to ask if the IOMMU fault > > > > report can provide guidance here? AFAICT all the faults I'm getting > > > > show "reason 0x3". If I'm reading the VT-d spec correctly, FR=0x3 > > > > indicates an invalid context entry, in other words there's something the > > > > hardware doesn't like in the way the address width or pagetable base is > > > > configured for the PCIe requestor. > > > > > > I would start looking at the other direction: might be, there are still some > > > left shifts for int32 values with the shift count > 30, or uint32 with the > > > count > 31. > > > > > > Also might be useful to dump each context entry on creation, it is kept > > > constant after. > > > > I did look over the constants in intel_reg.h, and didn't see anything > > that looked as though it would be susceptible to sign-extension or > > truncation bugs. In the failing case it's much easier for me to catch > > the fault messages than any initialization message, so I instrumented > > the fault handler to get the context entry from the dmar_ctx object > > using the same logic as dmar_map_ctx_entry(), and then dump out the ctx1 > > and ctx2 fields. What I see are messages like: > > > > ... ctx1 0x10013b001 ctx2 0x103 > > > > At first glance these "look right": the P bit is set in ctx1, and the > > rest of the field looks like a valid physical address. ctx2 also > > doesn't have any of the reserved bits set, but in all cases it does have > > AW=3, which would indicate 57-bit AGAW. But when I boot the last > > working kernel, from the revision prior to the llvm15 MFC, I see this in > > dmesg: > > > > ahci0: dmar4 pci0:0:17:5 rid 8d domain 1 mgaw 48 agaw 48 re-mapped > > > > ...all reported devices show 48-bit MGAW/AGAW, so I would expect ctx2 to > > have AW=2. I suspect this may be the source of the fault, but I'm not > > sure how it's getting configured that way, whether it's an issue with > > reading the capability register or something else. > > > > I can confirm that hacking domain_set_agaw() to always use the settings > from sagaw_bits[2] eliminates the faults and at least allows the machine > to boot to single-user mode. I see what's happening now. When I added the hack to always set sagaw_bits[2], I noted that the passed-in MGAW was still 57, while unit->hw_cap had the correct value of 0x4 (=> 4-level paging, 48-bit AW) in bits 12:8. The problem is that sagaw_bits has agaw=64 in its last entry. This results in dmar_maxaddr2mgaw() attempting a comparison against 1ULL << 64 in the final iteration of its first loop. I suspect the new compiler probably determines that last iteration is meaningless and simply omits it from the (probably unrolled) loop. Since the "loop" terminates with i < nitems(sagaw_bits), the subsequent "allow_less ..." case doesn't execute and we end up erroneously selecting a 57-bit address width. Just commenting out that last entry in sagaw_bits fixes the problem. So, two questions: 1) Does any VT-d hardware actually support 6-level paging? The ca. 2021 VT-d spec I'm looking at indicates 5-level is the greatest depth supported, with everything above that being reserved. 2) I'd expect clang to try very hard to error out in a situation like this, but I see that sys/conf/kern.mk sets -Wno-shift-count-overflow among other things, and more of them were added for clang 15. This seems like a really bad idea, regardless of how much of a PITA it may be to fix these warnings. From nobody Mon May 1 04:01:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8qKL2XVSz47k6N; Mon, 1 May 2023 04:01:58 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8qKK21y8z3RBy; Mon, 1 May 2023 04:01:57 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of byond.lenox@gmail.com designates 209.85.219.42 as permitted sender) smtp.mailfrom=byond.lenox@gmail.com; dmarc=none Received: by mail-qv1-f42.google.com with SMTP id 6a1803df08f44-61af33bdf1dso3103426d6.2; Sun, 30 Apr 2023 21:01:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682913715; x=1685505715; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SEtNwz/dw/MqjA1dPhaef+AK/Kg+mhLEjFM5l9cXumo=; b=A1BDoib4z1WMSaC8Q35aOxBtLHRLjC7AulCv8G7+GQdWlmCzEKCq99HMyD7wLWxUAc Czd+oMiypkKo6gEhGkKym7lxYIUw4fSvj3pQtz2L6Ii+ij/cA2SugLoyeFxUX554e8mn ZK2Ap4Cx1ZyBzALMih19H97PqOYebJeXHly+V65sZPYwG55Ycan9owFYc7XzDUwF5X1S h+nJCLLG6dssscURNobE9ZAHOis09p7hMbhHx31jFchpUKwSD4Fn5QU/CavVJkFTv87A /veoJkyNIYSLiA7rwTaVmIvvGw/P3ySSH4SKMqhhoeU2QAQyUPa+4d6/y0K7FUrs3thH N29A== X-Gm-Message-State: AC+VfDwkMsgIlD4UAq2z9StnXHX/DWCo/dTTvStCIo2JL89XQJ++am9A xvHfPB2SsfdL4QGaQg3fnN77YNYrJmc= X-Google-Smtp-Source: ACHHUZ7tFMGp4achLCstx3m4POK7XNKM5blXw2I3bnbDC9ivFqWeuH0cc9yaLVv/TsO/Mztf4NTxzQ== X-Received: by 2002:a05:6214:d4e:b0:5bf:ba9d:8726 with SMTP id 14-20020a0562140d4e00b005bfba9d8726mr22047094qvr.10.1682913715524; Sun, 30 Apr 2023 21:01:55 -0700 (PDT) Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com. [209.85.219.49]) by smtp.gmail.com with ESMTPSA id b5-20020a0cf045000000b0061b5d3a61aesm16684qvl.9.2023.04.30.21.01.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 30 Apr 2023 21:01:55 -0700 (PDT) Received: by mail-qv1-f49.google.com with SMTP id 6a1803df08f44-61af33bdf1dso3103396d6.2; Sun, 30 Apr 2023 21:01:55 -0700 (PDT) X-Received: by 2002:a05:6214:248f:b0:61a:5664:f8e9 with SMTP id gi15-20020a056214248f00b0061a5664f8e9mr5094664qvb.51.1682913714963; Sun, 30 Apr 2023 21:01:54 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202101100241.10A2fvtm057663@gitrepo.freebsd.org> In-Reply-To: <202101100241.10A2fvtm057663@gitrepo.freebsd.org> From: Kyle Evans Date: Sun, 30 Apr 2023 23:01:44 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 5844bd058aed - main - jobc: rework detection of orphaned groups. To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-2.77 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.94)[-0.941]; NEURAL_HAM_MEDIUM(-0.82)[-0.824]; FORGED_SENDER(0.30)[self@kyle-evans.net,byondlenox@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_NONE(0.00)[209.85.219.42:from,209.85.219.49:received]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; MIME_TRACE(0.00)[0:+]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.219.42:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; R_DKIM_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; FROM_NEQ_ENVFROM(0.00)[self@kyle-evans.net,byondlenox@gmail.com]; DMARC_NA(0.00)[kyle-evans.net]; RCPT_COUNT_THREE(0.00)[4]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; TAGGED_FROM(0.00)[] X-Rspamd-Queue-Id: 4Q8qKK21y8z3RBy X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N On Sat, Jan 9, 2021 at 8:43=E2=80=AFPM Konstantin Belousov wrote: > > The branch main has been updated by kib: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D5844bd058aed6f3d0c8cbbddd6= aa95993ece0189 > > commit 5844bd058aed6f3d0c8cbbddd6aa95993ece0189 > Author: Konstantin Belousov > AuthorDate: 2020-12-29 00:41:56 +0000 > Commit: Konstantin Belousov > CommitDate: 2021-01-10 02:41:20 +0000 > > jobc: rework detection of orphaned groups. > > Instead of trying to maintain pg_jobc counter on each process group > update (and sometimes before), just calculate the counter when needed= . > Still, for the benefit of the signal delivery code, explicitly mark > orphaned groups as such with the new process group flag. > > This way we prevent bugs in the corner cases where updates to the cou= nter > were missed due to complicated configuration of p_pptr/p_opptr/real_p= arent > (debugger). > > Since we need to iterate over all children of the process on exit, th= is > change mostly affects the process group entry and leave, where we nee= d > to iterate all process group members to detect orpaned status. > Hi, I have a question about the locking here... > [... snip ...] > @@ -678,43 +677,40 @@ jobc_reaper(struct proc *p) > } > > static struct proc * > -jobc_parent(struct proc *p) > +jobc_parent(struct proc *p, struct proc *p_exiting) > { > struct proc *pp; > > - sx_assert(&proctree_lock, SX_LOCKED); > + sx_assert(&proctree_lock, SA_LOCKED); > > pp =3D proc_realparent(p); > - if (pp->p_pptr =3D=3D NULL || > + if (pp->p_pptr =3D=3D NULL || pp =3D=3D p_exiting || > (pp->p_treeflag & P_TREE_GRPEXITED) =3D=3D 0) > return (pp); > return (jobc_reaper(pp)); > } > > -#ifdef INVARIANTS > -static void > -check_pgrp_jobc(struct pgrp *pgrp) > +static int > +pgrp_calc_jobc(struct pgrp *pgrp) > { > struct proc *q; > int cnt; > > - sx_assert(&proctree_lock, SX_LOCKED); > - PGRP_LOCK_ASSERT(pgrp, MA_NOTOWNED); > +#ifdef INVARIANTS > + if (!mtx_owned(&pgrp->pg_mtx)) > + sx_assert(&proctree_lock, SA_LOCKED); > +#endif > > cnt =3D 0; > - PGRP_LOCK(pgrp); > LIST_FOREACH(q, &pgrp->pg_members, p_pglist) { > if ((q->p_treeflag & P_TREE_GRPEXITED) !=3D 0 || > q->p_pptr =3D=3D NULL) > continue; > - if (isjobproc(jobc_parent(q), pgrp)) > + if (isjobproc(jobc_parent(q, NULL), pgrp)) > cnt++; > } > - KASSERT(pgrp->pg_jobc =3D=3D cnt, ("pgrp %d %p pg_jobc %d cnt %d"= , > - pgrp->pg_id, pgrp, pgrp->pg_jobc, cnt)); > - PGRP_UNLOCK(pgrp); > + return (cnt); > } > -#endif > > /* > * Move p to a process group > [... snip ...] So the proctree lock is sufficient for pgrp_calc_jobc() to provide a stable answer needed for everything fixjobc_kill() uses it for... > @@ -934,35 +827,46 @@ fixjobc_kill(struct proc *p) > p->p_treeflag |=3D P_TREE_GRPEXITED; > > /* > - * Check p's parent to see whether p qualifies its own process > - * group; if so, adjust count for p's process group. > + * Check if exiting p orphans its own group. > */ > - if (isjobproc(jobc_parent(p), pgrp)) > - pgadjustjobc(pgrp, false); > + pgrp =3D p->p_pgrp; > + if (isjobproc(jobc_parent(p, NULL), pgrp)) { > + PGRP_LOCK(pgrp); > + if (pgrp_calc_jobc(pgrp) =3D=3D 0) > + orphanpg(pgrp); > + PGRP_UNLOCK(pgrp); > + } > > /* > * Check this process' children to see whether they qualify > - * their process groups after reparenting to reaper. If so, > - * adjust counts for children's process groups. > + * their process groups after reparenting to reaper. > */ > LIST_FOREACH(q, &p->p_children, p_sibling) { > - if ((q->p_treeflag & P_TREE_ORPHANED) !=3D 0) > - continue; > - fixjobc_kill_q(p, q, true); > + pgrp =3D q->p_pgrp; > + PGRP_LOCK(pgrp); > + if (pgrp_calc_jobc(pgrp) =3D=3D 0) { > + /* > + * We want to handle exactly the children that > + * has p as realparent. Then, when calculating > + * jobc_parent for children, we should ignore > + * P_TREE_GRPEXITED flag already set on p. > + */ > + if (jobc_parent(q, p) =3D=3D p && isjobproc(p, pg= rp)) > + orphanpg(pgrp); > + } else > + pgrp->pg_flags &=3D ~PGRP_ORPHANED; > + PGRP_UNLOCK(pgrp); > } > - LIST_FOREACH(q, &p->p_orphans, p_orphan) > - fixjobc_kill_q(p, q, true); > - LIST_FOREACH(q, &p->p_children, p_sibling) { > - if ((q->p_treeflag & P_TREE_ORPHANED) !=3D 0) > - continue; > - fixjobc_kill_q(p, q, false); > + LIST_FOREACH(q, &p->p_orphans, p_orphan) { > + pgrp =3D q->p_pgrp; > + PGRP_LOCK(pgrp); > + if (pgrp_calc_jobc(pgrp) =3D=3D 0) { > + if (isjobproc(p, pgrp)) > + orphanpg(pgrp); > + } else > + pgrp->pg_flags &=3D ~PGRP_ORPHANED; > + PGRP_UNLOCK(pgrp); > } > - LIST_FOREACH(q, &p->p_orphans, p_orphan) > - fixjobc_kill_q(p, q, false); > - > -#ifdef INVARIANTS > - check_pgrp_jobc(pgrp); > -#endif > } > > void ... and I would imagine the proctree lock is sufficient for isjobproc/jobc_parent as well- is there any reason we can't/shouldn't just use atomic(9) for operations with pgrp->pg_flags and push all of the extra lock acquisitions into the orphanpg() cases? It seems like we could avoid taking any pgrp lock in the common case and at least mitigate that additional overhead from the exit() path. Thanks, Kyle Evans From nobody Mon May 1 04:13:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8qZq4m70z47kq1; Mon, 1 May 2023 04:13: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 4Q8qZq4XPjz3j0t; Mon, 1 May 2023 04:13:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682914419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lwcUnG4slPzAVDC2XgFI47/D58fC6E9JJo3t6Ol8/Z4=; b=b/xaOJiIdiMLgU7K0w3T/qTKvqJNcSTUA8TF/fXrMCO/JgWUiirpBI7T25Sns0sQ8WJWc2 6/9gneJLwmnP0FDqwltEoc4CQta2pkd7Bt4n0YHLG3TOcdcIceEuX70vDt+ny9FSNT1l+f u5EsvguC/S8kj2bNbk+EhF2JarcXP0R1p/ipPWrWV0BJ//I6WbuigLvnriqbXfeNKyUqwe N5xuofWrSar0tepS1iQ+lVwA7o2UniaeKKeSGet1ihw64Ot52NYaFtA/1khSIIYGviHGD3 XGc+OPIVo2RYeN4WBiFbD6WxxCfLInPg7UASLN5+JpcdVPZC28rU3aa27VSg2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682914419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lwcUnG4slPzAVDC2XgFI47/D58fC6E9JJo3t6Ol8/Z4=; b=TU3sbY0pAQC/68TGjNf77I7hfCAczX5jJxzQXwDWKRCPvL9KU1AVVdor1h5rW39ib4TdSF 52nZa0/VIN5ZsSTXAtl0FXhlUXmwOB1rZXOyVxIyfja2zhdINrSx93VBR0DG4NuyX/Z6QI GQHtDijVtZSXR4Kp0qYzvk/GXgprSyBAc6iBXr56YjcQf/UwVeRcQMPWkt0Wjxv1PjRo1i p8zhk6QTKwKtT5zdjysSHInDKqVsLF/JAX+yK8HKPBmjdeRYCUozaUhYX7eA350o6/EgfJ FUnNK+SvjiqJExLqImF4WeloYgv4o+tIIuOndLh4P5JRzmLyJOV47qhQtuKUxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682914419; a=rsa-sha256; cv=none; b=JD216dysKORgbq6Lkjq9tx56g67I/12E469rvLCqJWsSOrEkTObIzeqwHg7sI2SM/mo2X/ eM2WvBfQLhQFapeoyqdfgdR4qniMP6HNDh5u0B3sVmAXVKQ7Z36I8ugtOgJJV4SErhRqa8 do+PxSQJmSiZlmOAzd+H3IcqULbHUoovNq5x1LUi0FIpNB0qPilLuG20Xf2j83I5+HeOfE r4o1XL7cLL/OCSTUD9/7JdeFAj4gx8npkFXo2eeDEr4RSdnzfSVj7HPc37vJgJ6RhrzYnk 3T2DNBHkviPsFHQTVFlNGfznATNP1FjeP70H7ToiO78wJjGyuJW4xwNnMTlqeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8qZq3cPlzqwD; Mon, 1 May 2023 04:13:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3414Dd7f082349; Mon, 1 May 2023 04:13:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3414DdCg082348; Mon, 1 May 2023 04:13:39 GMT (envelope-from git) Date: Mon, 1 May 2023 04:13:39 GMT Message-Id: <202305010413.3414DdCg082348@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 058a2846a24f - stable/13 - sqlite3: Vendor import of sqlite3 3.41.2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 058a2846a24f8b2e42cd9afe7fc94a3fc005b044 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=058a2846a24f8b2e42cd9afe7fc94a3fc005b044 commit 058a2846a24f8b2e42cd9afe7fc94a3fc005b044 Author: Cy Schubert AuthorDate: 2023-04-17 16:02:41 +0000 Commit: Cy Schubert CommitDate: 2023-05-01 04:13:00 +0000 sqlite3: Vendor import of sqlite3 3.41.2 Release notes at https://www.sqlite.org/releaselog/3_41_2.html. Obtained from: https://www.sqlite.org/2023/sqlite-autoconf-3410200.tar.gz Merge commit '853a43f7c79218855a6e45a25a00b942972e3fa1' (cherry picked from commit e7e621f94d9073d620a4d15f13952f1d40685ece) --- contrib/sqlite3/configure | 20 ++-- contrib/sqlite3/configure.ac | 2 +- contrib/sqlite3/shell.c | 10 +- contrib/sqlite3/sqlite3.c | 209 ++++++++++++++++++++++++++++----------- contrib/sqlite3/sqlite3.h | 6 +- contrib/sqlite3/sqlite3rc.h | 2 +- contrib/sqlite3/tea/configure | 18 ++-- contrib/sqlite3/tea/configure.ac | 2 +- 8 files changed, 182 insertions(+), 87 deletions(-) diff --git a/contrib/sqlite3/configure b/contrib/sqlite3/configure index e5cbf778e689..dea9860d00ee 100755 --- a/contrib/sqlite3/configure +++ b/contrib/sqlite3/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for sqlite 3.41.0. +# Generated by GNU Autoconf 2.71 for sqlite 3.41.2. # # Report bugs to . # @@ -621,8 +621,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.41.0' -PACKAGE_STRING='sqlite 3.41.0' +PACKAGE_VERSION='3.41.2' +PACKAGE_STRING='sqlite 3.41.2' PACKAGE_BUGREPORT='http://www.sqlite.org' PACKAGE_URL='' @@ -1367,7 +1367,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.41.0 to adapt to many kinds of systems. +\`configure' configures sqlite 3.41.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1438,7 +1438,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.41.0:";; + short | recursive ) echo "Configuration of sqlite 3.41.2:";; esac cat <<\_ACEOF @@ -1563,7 +1563,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.41.0 +sqlite configure 3.41.2 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1833,7 +1833,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.41.0, which was +It was created by sqlite $as_me 3.41.2, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3106,7 +3106,7 @@ fi # Define the identity of the package. PACKAGE='sqlite' - VERSION='3.41.0' + VERSION='3.41.2' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -15314,7 +15314,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.41.0, which was +This file was extended by sqlite $as_me 3.41.2, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15373,7 +15373,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -sqlite config.status 3.41.0 +sqlite config.status 3.41.2 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/contrib/sqlite3/configure.ac b/contrib/sqlite3/configure.ac index f7f6558c2db5..290f160afc56 100644 --- a/contrib/sqlite3/configure.ac +++ b/contrib/sqlite3/configure.ac @@ -10,7 +10,7 @@ # AC_PREREQ(2.61) -AC_INIT(sqlite, 3.41.0, http://www.sqlite.org) +AC_INIT(sqlite, 3.41.2, http://www.sqlite.org) AC_CONFIG_SRCDIR([sqlite3.c]) AC_CONFIG_AUX_DIR([.]) diff --git a/contrib/sqlite3/shell.c b/contrib/sqlite3/shell.c index d6a673fe2cfe..e6495d75128e 100644 --- a/contrib/sqlite3/shell.c +++ b/contrib/sqlite3/shell.c @@ -13023,10 +13023,14 @@ static int dbdataNext(sqlite3_vtab_cursor *pCursor){ if( pCsr->bOnePage==0 && pCsr->iPgno>pCsr->szDb ) return SQLITE_OK; rc = dbdataLoadPage(pCsr, pCsr->iPgno, &pCsr->aPage, &pCsr->nPage); if( rc!=SQLITE_OK ) return rc; - if( pCsr->aPage ) break; + if( pCsr->aPage && pCsr->nPage>=256 ) break; + sqlite3_free(pCsr->aPage); + pCsr->aPage = 0; if( pCsr->bOnePage ) return SQLITE_OK; pCsr->iPgno++; } + + assert( iOff+3+2<=pCsr->nPage ); pCsr->iCell = pTab->bPtr ? -2 : 0; pCsr->nCell = get_uint16(&pCsr->aPage[iOff+3]); } @@ -13261,8 +13265,7 @@ static int dbdataGetEncoding(DbdataCursor *pCsr){ int nPg1 = 0; u8 *aPg1 = 0; rc = dbdataLoadPage(pCsr, 1, &aPg1, &nPg1); - assert( rc!=SQLITE_OK || nPg1==0 || nPg1>=512 ); - if( rc==SQLITE_OK && nPg1>0 ){ + if( rc==SQLITE_OK && nPg1>=(56+4) ){ pCsr->enc = get_uint32(&aPg1[56]); } sqlite3_free(aPg1); @@ -17921,6 +17924,7 @@ static char *shell_error_context(const char *zSql, sqlite3 *db){ if( db==0 || zSql==0 || (iOffset = sqlite3_error_offset(db))<0 + || iOffset>=strlen(zSql) ){ return sqlite3_mprintf(""); } diff --git a/contrib/sqlite3/sqlite3.c b/contrib/sqlite3/sqlite3.c index b47891c3817b..947a15455173 100644 --- a/contrib/sqlite3/sqlite3.c +++ b/contrib/sqlite3/sqlite3.c @@ -1,6 +1,6 @@ /****************************************************************************** ** This file is an amalgamation of many separate C source files from SQLite -** version 3.41.0. By combining all the individual C code files into this +** version 3.41.2. By combining all the individual C code files into this ** single large file, the entire code can be compiled as a single translation ** unit. This allows many compilers to do optimizations that would not be ** possible if the files were compiled separately. Performance improvements @@ -452,9 +452,9 @@ extern "C" { ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ -#define SQLITE_VERSION "3.41.0" -#define SQLITE_VERSION_NUMBER 3041000 -#define SQLITE_SOURCE_ID "2023-02-21 18:09:37 05941c2a04037fc3ed2ffae11f5d2260706f89431f463518740f72ada350866d" +#define SQLITE_VERSION "3.41.2" +#define SQLITE_VERSION_NUMBER 3041002 +#define SQLITE_SOURCE_ID "2023-03-22 11:56:21 0d1fc92f94cb6b76bffe3ec34d69cffde2924203304e8ffc4155597af0c191da" /* ** CAPI3REF: Run-Time Library Version Numbers @@ -16592,7 +16592,7 @@ struct PgHdr { ** private to pcache.c and should not be accessed by other modules. ** pCache is grouped with the public elements for efficiency. */ - i16 nRef; /* Number of users of this page */ + i64 nRef; /* Number of users of this page */ PgHdr *pDirtyNext; /* Next element in list of dirty pages */ PgHdr *pDirtyPrev; /* Previous element in list of dirty pages */ /* NB: pDirtyNext and pDirtyPrev are undefined if the @@ -16673,12 +16673,12 @@ SQLITE_PRIVATE void sqlite3PcacheClearSyncFlags(PCache *); SQLITE_PRIVATE void sqlite3PcacheClear(PCache*); /* Return the total number of outstanding page references */ -SQLITE_PRIVATE int sqlite3PcacheRefCount(PCache*); +SQLITE_PRIVATE i64 sqlite3PcacheRefCount(PCache*); /* Increment the reference count of an existing page */ SQLITE_PRIVATE void sqlite3PcacheRef(PgHdr*); -SQLITE_PRIVATE int sqlite3PcachePageRefcount(PgHdr*); +SQLITE_PRIVATE i64 sqlite3PcachePageRefcount(PgHdr*); /* Return the total number of pages stored in the cache */ SQLITE_PRIVATE int sqlite3PcachePagecount(PCache*); @@ -18837,7 +18837,7 @@ struct NameContext { #define NC_HasAgg 0x000010 /* One or more aggregate functions seen */ #define NC_IdxExpr 0x000020 /* True if resolving columns of CREATE INDEX */ #define NC_SelfRef 0x00002e /* Combo: PartIdx, isCheck, GenCol, and IdxExpr */ -#define NC_VarSelect 0x000040 /* A correlated subquery has been seen */ +#define NC_Subquery 0x000040 /* A subquery has been seen */ #define NC_UEList 0x000080 /* True if uNC.pEList is used */ #define NC_UAggInfo 0x000100 /* True if uNC.pAggInfo is used */ #define NC_UUpsert 0x000200 /* True if uNC.pUpsert is used */ @@ -19156,6 +19156,7 @@ struct IndexedExpr { int iIdxCur; /* The index cursor */ int iIdxCol; /* The index column that contains value of pExpr */ u8 bMaybeNullRow; /* True if we need an OP_IfNullRow check */ + u8 aff; /* Affinity of the pExpr expression */ IndexedExpr *pIENext; /* Next in a list of all indexed expressions */ #ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS const char *zIdxName; /* Name of index, used only for bytecode comments */ @@ -19207,6 +19208,9 @@ struct Parse { u8 withinRJSubrtn; /* Nesting level for RIGHT JOIN body subroutines */ #if defined(SQLITE_DEBUG) || defined(SQLITE_COVERAGE_TEST) u8 earlyCleanup; /* OOM inside sqlite3ParserAddCleanup() */ +#endif +#ifdef SQLITE_DEBUG + u8 ifNotExists; /* Might be true if IF NOT EXISTS. Assert()s only */ #endif int nRangeReg; /* Size of the temporary register block */ int iRangeReg; /* First register in temporary register block */ @@ -52653,7 +52657,7 @@ bitvec_end: struct PCache { PgHdr *pDirty, *pDirtyTail; /* List of dirty pages in LRU order */ PgHdr *pSynced; /* Last synced page in dirty page list */ - int nRefSum; /* Sum of ref counts over all pages */ + i64 nRefSum; /* Sum of ref counts over all pages */ int szCache; /* Configured cache size */ int szSpill; /* Size before spilling occurs */ int szPage; /* Size of every page in this cache */ @@ -52683,7 +52687,7 @@ struct PCache { unsigned char *a; int j; pPg = (PgHdr*)pLower->pExtra; - printf("%3d: nRef %2d flgs %02x data ", i, pPg->nRef, pPg->flags); + printf("%3lld: nRef %2d flgs %02x data ", i, pPg->nRef, pPg->flags); a = (unsigned char *)pLower->pBuf; for(j=0; j<12; j++) printf("%02x", a[j]); printf(" ptr %p\n", pPg); @@ -53427,14 +53431,14 @@ SQLITE_PRIVATE PgHdr *sqlite3PcacheDirtyList(PCache *pCache){ ** This is not the total number of pages referenced, but the sum of the ** reference count for all pages. */ -SQLITE_PRIVATE int sqlite3PcacheRefCount(PCache *pCache){ +SQLITE_PRIVATE i64 sqlite3PcacheRefCount(PCache *pCache){ return pCache->nRefSum; } /* ** Return the number of references to the page supplied as an argument. */ -SQLITE_PRIVATE int sqlite3PcachePageRefcount(PgHdr *p){ +SQLITE_PRIVATE i64 sqlite3PcachePageRefcount(PgHdr *p){ return p->nRef; } @@ -74504,7 +74508,7 @@ static SQLITE_NOINLINE int btreeNext(BtCursor *pCur){ pPage = pCur->pPage; idx = ++pCur->ix; - if( NEVER(!pPage->isInit) || sqlite3FaultSim(412) ){ + if( !pPage->isInit || sqlite3FaultSim(412) ){ return SQLITE_CORRUPT_BKPT; } @@ -77633,6 +77637,7 @@ SQLITE_PRIVATE int sqlite3BtreeInsert( assert( szNew==pPage->xCellSize(pPage, newCell) ); assert( szNew <= MX_CELL_SIZE(p->pBt) ); idx = pCur->ix; + pCur->info.nSize = 0; if( loc==0 ){ CellInfo info; assert( idx>=0 ); @@ -77705,7 +77710,6 @@ SQLITE_PRIVATE int sqlite3BtreeInsert( ** larger than the largest existing key, it is possible to insert the ** row without seeking the cursor. This can be a big performance boost. */ - pCur->info.nSize = 0; if( pPage->nOverflow ){ assert( rc==SQLITE_OK ); pCur->curFlags &= ~(BTCF_ValidNKey); @@ -90915,8 +90919,7 @@ static u64 filterHash(const Mem *aMem, const Op *pOp){ }else if( p->flags & MEM_Real ){ h += sqlite3VdbeIntValue(p); }else if( p->flags & (MEM_Str|MEM_Blob) ){ - h += p->n; - if( p->flags & MEM_Zero ) h += p->u.nZero; + /* no-op */ } } return h; @@ -104495,14 +104498,10 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){ if( 0==sqlite3ExprCanBeNull(pExpr->pLeft) && !IN_RENAME_OBJECT ){ testcase( ExprHasProperty(pExpr, EP_OuterON) ); assert( !ExprHasProperty(pExpr, EP_IntValue) ); - if( pExpr->op==TK_NOTNULL ){ - pExpr->u.zToken = "true"; - ExprSetProperty(pExpr, EP_IsTrue); - }else{ - pExpr->u.zToken = "false"; - ExprSetProperty(pExpr, EP_IsFalse); - } - pExpr->op = TK_TRUEFALSE; + pExpr->u.iValue = (pExpr->op==TK_NOTNULL); + pExpr->flags |= EP_IntValue; + pExpr->op = TK_INTEGER; + for(i=0, p=pNC; p && ipNext, i++){ p->nRef = anRef[i]; } @@ -104804,8 +104803,8 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){ assert( pNC->nRef>=nRef ); if( nRef!=pNC->nRef ){ ExprSetProperty(pExpr, EP_VarSelect); - pNC->ncFlags |= NC_VarSelect; } + pNC->ncFlags |= NC_Subquery; } break; } @@ -109554,6 +109553,7 @@ SQLITE_PRIVATE void sqlite3ExprCodeGeneratedColumn( ){ int iAddr; Vdbe *v = pParse->pVdbe; + int nErr = pParse->nErr; assert( v!=0 ); assert( pParse->iSelfTab!=0 ); if( pParse->iSelfTab>0 ){ @@ -109566,6 +109566,7 @@ SQLITE_PRIVATE void sqlite3ExprCodeGeneratedColumn( sqlite3VdbeAddOp4(v, OP_Affinity, regOut, 1, 0, &pCol->affinity, 1); } if( iAddr ) sqlite3VdbeJumpHere(v, iAddr); + if( pParse->nErr>nErr ) pParse->db->errByteOffset = -1; } #endif /* SQLITE_OMIT_GENERATED_COLUMNS */ @@ -109582,6 +109583,7 @@ SQLITE_PRIVATE void sqlite3ExprCodeGetColumnOfTable( Column *pCol; assert( v!=0 ); assert( pTab!=0 ); + assert( iCol!=XN_EXPR ); if( iCol<0 || iCol==pTab->iPKey ){ sqlite3VdbeAddOp2(v, OP_Rowid, iTabCur, regOut); VdbeComment((v, "%s.rowid", pTab->zName)); @@ -109848,6 +109850,7 @@ static SQLITE_NOINLINE int sqlite3IndexedExprLookup( IndexedExpr *p; Vdbe *v; for(p=pParse->pIdxEpr; p; p=p->pIENext){ + u8 exprAff; int iDataCur = p->iDataCur; if( iDataCur<0 ) continue; if( pParse->iSelfTab ){ @@ -109855,6 +109858,16 @@ static SQLITE_NOINLINE int sqlite3IndexedExprLookup( iDataCur = -1; } if( sqlite3ExprCompare(0, pExpr, p->pExpr, iDataCur)!=0 ) continue; + assert( p->aff>=SQLITE_AFF_BLOB && p->aff<=SQLITE_AFF_NUMERIC ); + exprAff = sqlite3ExprAffinity(pExpr); + if( (exprAff<=SQLITE_AFF_BLOB && p->aff!=SQLITE_AFF_BLOB) + || (exprAff==SQLITE_AFF_TEXT && p->aff!=SQLITE_AFF_TEXT) + || (exprAff>=SQLITE_AFF_NUMERIC && p->aff!=SQLITE_AFF_NUMERIC) + ){ + /* Affinity mismatch on a generated column */ + continue; + } + v = pParse->pVdbe; assert( v!=0 ); if( p->bMaybeNullRow ){ @@ -110434,10 +110447,13 @@ expr_code_doover: return target; } case TK_COLLATE: { - if( !ExprHasProperty(pExpr, EP_Collate) - && ALWAYS(pExpr->pLeft) - && pExpr->pLeft->op==TK_FUNCTION - ){ + if( !ExprHasProperty(pExpr, EP_Collate) ){ + /* A TK_COLLATE Expr node without the EP_Collate tag is a so-called + ** "SOFT-COLLATE" that is added to constraints that are pushed down + ** from outer queries into sub-queries by the push-down optimization. + ** Clear subtypes as subtypes may not cross a subquery boundary. + */ + assert( pExpr->pLeft ); inReg = sqlite3ExprCodeTarget(pParse, pExpr->pLeft, target); if( inReg!=target ){ sqlite3VdbeAddOp2(v, OP_SCopy, inReg, target); @@ -110545,16 +110561,22 @@ expr_code_doover: break; } } - addrINR = sqlite3VdbeAddOp1(v, OP_IfNullRow, pExpr->iTable); - /* Temporarily disable factoring of constant expressions, since - ** even though expressions may appear to be constant, they are not - ** really constant because they originate from the right-hand side - ** of a LEFT JOIN. */ - pParse->okConstFactor = 0; + addrINR = sqlite3VdbeAddOp3(v, OP_IfNullRow, pExpr->iTable, 0, target); + /* The OP_IfNullRow opcode above can overwrite the result register with + ** NULL. So we have to ensure that the result register is not a value + ** that is suppose to be a constant. Two defenses are needed: + ** (1) Temporarily disable factoring of constant expressions + ** (2) Make sure the computed value really is stored in register + ** "target" and not someplace else. + */ + pParse->okConstFactor = 0; /* note (1) above */ inReg = sqlite3ExprCodeTarget(pParse, pExpr->pLeft, target); pParse->okConstFactor = okConstFactor; + if( inReg!=target ){ /* note (2) above */ + sqlite3VdbeAddOp2(v, OP_SCopy, inReg, target); + inReg = target; + } sqlite3VdbeJumpHere(v, addrINR); - sqlite3VdbeChangeP3(v, addrINR, inReg); break; } @@ -118917,7 +118939,7 @@ SQLITE_PRIVATE void sqlite3AddReturning(Parse *pParse, ExprList *pList){ if( pParse->pNewTrigger ){ sqlite3ErrorMsg(pParse, "cannot use RETURNING in a trigger"); }else{ - assert( pParse->bReturning==0 ); + assert( pParse->bReturning==0 || pParse->ifNotExists ); } pParse->bReturning = 1; pRet = sqlite3DbMallocZero(db, sizeof(*pRet)); @@ -118943,7 +118965,8 @@ SQLITE_PRIVATE void sqlite3AddReturning(Parse *pParse, ExprList *pList){ pRet->retTStep.pTrig = &pRet->retTrig; pRet->retTStep.pExprList = pList; pHash = &(db->aDb[1].pSchema->trigHash); - assert( sqlite3HashFind(pHash, RETURNING_TRIGGER_NAME)==0 || pParse->nErr ); + assert( sqlite3HashFind(pHash, RETURNING_TRIGGER_NAME)==0 + || pParse->nErr || pParse->ifNotExists ); if( sqlite3HashInsert(pHash, RETURNING_TRIGGER_NAME, &pRet->retTrig) ==&pRet->retTrig ){ sqlite3OomFault(db); @@ -119478,6 +119501,7 @@ SQLITE_PRIVATE void sqlite3AddGenerated(Parse *pParse, Expr *pExpr, Token *pType ** turn it into one by adding a unary "+" operator. */ pExpr = sqlite3PExpr(pParse, TK_UPLUS, pExpr, 0); } + if( pExpr && pExpr->op!=TK_RAISE ) pExpr->affExpr = pCol->affinity; sqlite3ColumnSetExpr(pParse, pTab, pCol, pExpr); pExpr = 0; goto generated_done; @@ -124184,7 +124208,7 @@ SQLITE_PRIVATE void sqlite3DeleteFrom( #endif /* SQLITE_OMIT_TRUNCATE_OPTIMIZATION */ { u16 wcf = WHERE_ONEPASS_DESIRED|WHERE_DUPLICATES_OK; - if( sNC.ncFlags & NC_VarSelect ) bComplex = 1; + if( sNC.ncFlags & NC_Subquery ) bComplex = 1; wcf |= (bComplex ? 0 : WHERE_ONEPASS_MULTIROW); if( HasRowid(pTab) ){ /* For a rowid table, initialize the RowSet to an empty set */ @@ -126881,6 +126905,18 @@ static void ceilingFunc( static double xCeil(double x){ return ceil(x); } static double xFloor(double x){ return floor(x); } +/* +** Some systems do not have log2() and log10() in their standard math +** libraries. +*/ +#if defined(HAVE_LOG10) && HAVE_LOG10==0 +# define log10(X) (0.4342944819032517867*log(X)) +#endif +#if defined(HAVE_LOG2) && HAVE_LOG2==0 +# define log2(X) (1.442695040888963456*log(X)) +#endif + + /* ** Implementation of SQL functions: ** @@ -136260,6 +136296,23 @@ SQLITE_PRIVATE void sqlite3Pragma( jmp4 = integrityCheckResultRow(v); sqlite3VdbeJumpHere(v, jmp2); + /* The OP_IdxRowid opcode is an optimized version of OP_Column + ** that extracts the rowid off the end of the index record. + ** But it only works correctly if index record does not have + ** any extra bytes at the end. Verify that this is the case. */ + if( HasRowid(pTab) ){ + int jmp7; + sqlite3VdbeAddOp2(v, OP_IdxRowid, iIdxCur+j, 3); + jmp7 = sqlite3VdbeAddOp3(v, OP_Eq, 3, 0, r1+pIdx->nColumn-1); + VdbeCoverage(v); + sqlite3VdbeLoadString(v, 3, + "rowid not at end-of-record for row "); + sqlite3VdbeAddOp3(v, OP_Concat, 7, 3, 3); + sqlite3VdbeLoadString(v, 4, " of index "); + sqlite3VdbeGoto(v, jmp5-1); + sqlite3VdbeJumpHere(v, jmp7); + } + /* Any indexed columns with non-BINARY collations must still hold ** the exact same text value as the table. */ label6 = 0; @@ -140555,8 +140608,6 @@ SQLITE_PRIVATE void sqlite3SubqueryColumnTypes( pCol->affinity = sqlite3ExprAffinity(p); if( pCol->affinity<=SQLITE_AFF_NONE ){ pCol->affinity = aff; - }else if( pCol->affinity>=SQLITE_AFF_NUMERIC && p->op==TK_CAST ){ - pCol->affinity = SQLITE_AFF_FLEXNUM; } if( pCol->affinity>=SQLITE_AFF_TEXT && pSelect->pNext ){ int m = 0; @@ -140570,6 +140621,9 @@ SQLITE_PRIVATE void sqlite3SubqueryColumnTypes( if( pCol->affinity>=SQLITE_AFF_NUMERIC && (m&0x02)!=0 ){ pCol->affinity = SQLITE_AFF_BLOB; } + if( pCol->affinity>=SQLITE_AFF_NUMERIC && p->op==TK_CAST ){ + pCol->affinity = SQLITE_AFF_FLEXNUM; + } } zType = columnType(&sNC, p, 0, 0, 0); if( zType==0 || pCol->affinity!=sqlite3AffinityType(zType, 0) ){ @@ -142084,7 +142138,9 @@ static Expr *substExpr( sqlite3VectorErrorMsg(pSubst->pParse, pCopy); }else{ sqlite3 *db = pSubst->pParse->db; - if( pSubst->isOuterJoin && pCopy->op!=TK_COLUMN ){ + if( pSubst->isOuterJoin + && (pCopy->op!=TK_COLUMN || pCopy->iTable!=pSubst->iNewTable) + ){ memset(&ifNullRow, 0, sizeof(ifNullRow)); ifNullRow.op = TK_IF_NULL_ROW; ifNullRow.pLeft = pCopy; @@ -144600,10 +144656,12 @@ static void optimizeAggregateUseOfIndexedExpr( NameContext *pNC /* Name context used to resolve agg-func args */ ){ assert( pAggInfo->iFirstReg==0 ); + assert( pSelect!=0 ); + assert( pSelect->pGroupBy!=0 ); pAggInfo->nColumn = pAggInfo->nAccumulator; if( ALWAYS(pAggInfo->nSortingColumn>0) ){ if( pAggInfo->nColumn==0 ){ - pAggInfo->nSortingColumn = 0; + pAggInfo->nSortingColumn = pSelect->pGroupBy->nExpr; }else{ pAggInfo->nSortingColumn = pAggInfo->aCol[pAggInfo->nColumn-1].iSorterColumn+1; @@ -145028,6 +145086,7 @@ static int countOfViewOptimization(Parse *pParse, Select *p){ if( p->pEList->nExpr!=1 ) return 0; /* Single result column */ if( p->pWhere ) return 0; if( p->pGroupBy ) return 0; + if( p->pOrderBy ) return 0; pExpr = p->pEList->a[0].pExpr; if( pExpr->op!=TK_AGG_FUNCTION ) return 0; /* Result is an aggregate */ assert( ExprUseUToken(pExpr) ); @@ -145038,7 +145097,8 @@ static int countOfViewOptimization(Parse *pParse, Select *p){ if( ExprHasProperty(pExpr, EP_WinFunc) ) return 0;/* Not a window function */ pSub = p->pSrc->a[0].pSelect; if( pSub==0 ) return 0; /* The FROM is a subquery */ - if( pSub->pPrior==0 ) return 0; /* Must be a compound ry */ + if( pSub->pPrior==0 ) return 0; /* Must be a compound */ + if( pSub->selFlags & SF_CopyCte ) return 0; /* Not a CTE */ do{ if( pSub->op!=TK_ALL && pSub->pPrior ) return 0; /* Must be UNION ALL */ if( pSub->pWhere ) return 0; /* No WHERE clause */ @@ -145481,7 +145541,6 @@ SQLITE_PRIVATE int sqlite3Select( && countOfViewOptimization(pParse, p) ){ if( db->mallocFailed ) goto select_end; - pEList = p->pEList; pTabList = p->pSrc; } #endif @@ -146843,6 +146902,7 @@ SQLITE_PRIVATE void sqlite3BeginTrigger( }else{ assert( !db->init.busy ); sqlite3CodeVerifySchema(pParse, iDb); + VVA_ONLY( pParse->ifNotExists = 1; ) } goto trigger_cleanup; } @@ -147624,7 +147684,7 @@ static void codeReturningTrigger( } sqlite3ExprListDelete(db, sSelect.pEList); pNew = sqlite3ExpandReturning(pParse, pReturning->pReturnEL, pTab); - if( !db->mallocFailed ){ + if( pParse->nErr==0 ){ NameContext sNC; memset(&sNC, 0, sizeof(sNC)); if( pReturning->nRetCol==0 ){ @@ -148846,12 +148906,22 @@ SQLITE_PRIVATE void sqlite3Update( /* Begin the database scan. ** ** Do not consider a single-pass strategy for a multi-row update if - ** there are any triggers or foreign keys to process, or rows may - ** be deleted as a result of REPLACE conflict handling. Any of these - ** things might disturb a cursor being used to scan through the table - ** or index, causing a single-pass approach to malfunction. */ + ** there is anything that might disrupt the cursor being used to do + ** the UPDATE: + ** (1) This is a nested UPDATE + ** (2) There are triggers + ** (3) There are FOREIGN KEY constraints + ** (4) There are REPLACE conflict handlers + ** (5) There are subqueries in the WHERE clause + */ flags = WHERE_ONEPASS_DESIRED; - if( !pParse->nested && !pTrigger && !hasFK && !chngKey && !bReplace ){ + if( !pParse->nested + && !pTrigger + && !hasFK + && !chngKey + && !bReplace + && (sNC.ncFlags & NC_Subquery)==0 + ){ flags |= WHERE_ONEPASS_MULTIROW; } pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere,0,0,0,flags,iIdxCur); @@ -150816,7 +150886,9 @@ static int vtabCallConstructor( sCtx.pPrior = db->pVtabCtx; sCtx.bDeclared = 0; db->pVtabCtx = &sCtx; + pTab->nTabRef++; rc = xConstruct(db, pMod->pAux, nArg, azArg, &pVTable->pVtab, &zErr); + sqlite3DeleteTable(db, pTab); db->pVtabCtx = sCtx.pPrior; if( rc==SQLITE_NOMEM ) sqlite3OomFault(db); assert( sCtx.pTab==pTab ); @@ -156848,7 +156920,7 @@ SQLITE_PRIVATE void sqlite3WhereTabFuncArgs( pRhs = sqlite3PExpr(pParse, TK_UPLUS, sqlite3ExprDup(pParse->db, pArgs->a[j].pExpr, 0), 0); pTerm = sqlite3PExpr(pParse, TK_EQ, pColRef, pRhs); - if( pItem->fg.jointype & (JT_LEFT|JT_LTORJ) ){ + if( pItem->fg.jointype & (JT_LEFT|JT_LTORJ|JT_RIGHT) ){ joinType = EP_OuterON; }else{ joinType = EP_InnerON; @@ -157985,6 +158057,10 @@ static SQLITE_NOINLINE void sqlite3ConstructBloomFilter( Vdbe *v = pParse->pVdbe; /* VDBE under construction */ WhereLoop *pLoop = pLevel->pWLoop; /* The loop being coded */ int iCur; /* Cursor for table getting the filter */ + IndexedExpr *saved_pIdxEpr; /* saved copy of Parse.pIdxEpr */ + + saved_pIdxEpr = pParse->pIdxEpr; + pParse->pIdxEpr = 0; assert( pLoop!=0 ); assert( v!=0 ); @@ -158041,9 +158117,8 @@ static SQLITE_NOINLINE void sqlite3ConstructBloomFilter( int r1 = sqlite3GetTempRange(pParse, n); int jj; for(jj=0; jjaiColumn[jj]; assert( pIdx->pTable==pItem->pTab ); - sqlite3ExprCodeGetColumnOfTable(v, pIdx->pTable, iCur, iCol,r1+jj); + sqlite3ExprCodeLoadIndexColumn(pParse, pIdx, iCur, jj, r1+jj); } sqlite3VdbeAddOp4Int(v, OP_FilterAdd, pLevel->regFilter, 0, r1, n); sqlite3ReleaseTempRange(pParse, r1, n); @@ -158074,6 +158149,7 @@ static SQLITE_NOINLINE void sqlite3ConstructBloomFilter( } }while( iLevel < pWInfo->nLevel ); sqlite3VdbeJumpHere(v, addrOnce); + pParse->pIdxEpr = saved_pIdxEpr; } @@ -158373,6 +158449,7 @@ static int whereKeyStats( assert( pIdx->nSample>0 ); assert( pRec->nField>0 ); + /* Do a binary search to find the first sample greater than or equal ** to pRec. If pRec contains a single field, the set of samples to search ** is simply the aSample[] array. If the samples in aSample[] contain more @@ -158417,7 +158494,12 @@ static int whereKeyStats( ** it is extended to two fields. The duplicates that this creates do not ** cause any problems. */ - nField = MIN(pRec->nField, pIdx->nSample); + if( !HasRowid(pIdx->pTable) && IsPrimaryKeyIndex(pIdx) ){ + nField = pIdx->nKeyCol; + }else{ + nField = pIdx->nColumn; + } + nField = MIN(pRec->nField, nField); iCol = 0; iSample = pIdx->nSample * nField; do{ @@ -162145,6 +162227,10 @@ static int wherePathSolver(WhereInfo *pWInfo, LogEst nRowEst){ if( pFrom->isOrdered==pWInfo->pOrderBy->nExpr ){ pWInfo->eDistinct = WHERE_DISTINCT_ORDERED; } + if( pWInfo->pSelect->pOrderBy + && pWInfo->nOBSat > pWInfo->pSelect->pOrderBy->nExpr ){ + pWInfo->nOBSat = pWInfo->pSelect->pOrderBy->nExpr; + } }else{ pWInfo->revMask = pFrom->revLoop; if( pWInfo->nOBSat<=0 ){ @@ -162556,6 +162642,9 @@ static SQLITE_NOINLINE void whereAddIndexedExpr( p->iIdxCur = iIdxCur; p->iIdxCol = i; p->bMaybeNullRow = bMaybeNullRow; + if( sqlite3IndexAffinityStr(pParse->db, pIdx) ){ + p->aff = pIdx->zColAff[i]; + } #ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS p->zIdxName = pIdx->zName; #endif @@ -193018,16 +193107,18 @@ static int fts3MsrBufferData( char *pList, i64 nList ){ - if( nList>pMsr->nBuffer ){ + if( (nList+FTS3_NODE_PADDING)>pMsr->nBuffer ){ char *pNew; - pMsr->nBuffer = nList*2; - pNew = (char *)sqlite3_realloc64(pMsr->aBuffer, pMsr->nBuffer); + int nNew = nList*2 + FTS3_NODE_PADDING; + pNew = (char *)sqlite3_realloc64(pMsr->aBuffer, nNew); if( !pNew ) return SQLITE_NOMEM; pMsr->aBuffer = pNew; + pMsr->nBuffer = nNew; } assert( nList>0 ); memcpy(pMsr->aBuffer, pList, nList); + memset(&pMsr->aBuffer[nList], 0, FTS3_NODE_PADDING); return SQLITE_OK; } @@ -240171,7 +240262,7 @@ static void fts5SourceIdFunc( ){ assert( nArg==0 ); UNUSED_PARAM2(nArg, apUnused); - sqlite3_result_text(pCtx, "fts5: 2023-02-21 18:09:37 05941c2a04037fc3ed2ffae11f5d2260706f89431f463518740f72ada350866d", -1, SQLITE_TRANSIENT); + sqlite3_result_text(pCtx, "fts5: 2023-03-22 11:56:21 0d1fc92f94cb6b76bffe3ec34d69cffde2924203304e8ffc4155597af0c191da", -1, SQLITE_TRANSIENT); } /* diff --git a/contrib/sqlite3/sqlite3.h b/contrib/sqlite3/sqlite3.h index 4c6addac26c3..7e43e1f1b4dc 100644 --- a/contrib/sqlite3/sqlite3.h +++ b/contrib/sqlite3/sqlite3.h @@ -146,9 +146,9 @@ extern "C" { ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ -#define SQLITE_VERSION "3.41.0" -#define SQLITE_VERSION_NUMBER 3041000 -#define SQLITE_SOURCE_ID "2023-02-21 18:09:37 05941c2a04037fc3ed2ffae11f5d2260706f89431f463518740f72ada350866d" +#define SQLITE_VERSION "3.41.2" +#define SQLITE_VERSION_NUMBER 3041002 +#define SQLITE_SOURCE_ID "2023-03-22 11:56:21 0d1fc92f94cb6b76bffe3ec34d69cffde2924203304e8ffc4155597af0c191da" /* ** CAPI3REF: Run-Time Library Version Numbers diff --git a/contrib/sqlite3/sqlite3rc.h b/contrib/sqlite3/sqlite3rc.h index 6b8378ed1271..1dd5484c2c96 100644 --- a/contrib/sqlite3/sqlite3rc.h +++ b/contrib/sqlite3/sqlite3rc.h @@ -1,3 +1,3 @@ #ifndef SQLITE_RESOURCE_VERSION -#define SQLITE_RESOURCE_VERSION 3,41,0 +#define SQLITE_RESOURCE_VERSION 3,41,2 #endif diff --git a/contrib/sqlite3/tea/configure b/contrib/sqlite3/tea/configure index d4a42170b424..750545f3961c 100755 --- a/contrib/sqlite3/tea/configure +++ b/contrib/sqlite3/tea/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for sqlite 3.41.0. +# Generated by GNU Autoconf 2.71 for sqlite 3.41.2. # # # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, @@ -608,8 +608,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.41.0' -PACKAGE_STRING='sqlite 3.41.0' +PACKAGE_VERSION='3.41.2' +PACKAGE_STRING='sqlite 3.41.2' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1331,7 +1331,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.41.0 to adapt to many kinds of systems. +\`configure' configures sqlite 3.41.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1393,7 +1393,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.41.0:";; + short | recursive ) echo "Configuration of sqlite 3.41.2:";; esac cat <<\_ACEOF @@ -1496,7 +1496,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.41.0 +sqlite configure 3.41.2 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1795,7 +1795,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.41.0, which was +It was created by sqlite $as_me 3.41.2, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -9560,7 +9560,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.41.0, which was +This file was extended by sqlite $as_me 3.41.2, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -9615,7 +9615,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -sqlite config.status 3.41.0 +sqlite config.status 3.41.2 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/contrib/sqlite3/tea/configure.ac b/contrib/sqlite3/tea/configure.ac index f6291d2557d4..8c06474a1af3 100644 --- a/contrib/sqlite3/tea/configure.ac +++ b/contrib/sqlite3/tea/configure.ac @@ -19,7 +19,7 @@ dnl to configure the system for the local environment. # so that we create the export library with the dll. #----------------------------------------------------------------------- -AC_INIT([sqlite],[3.41.0]) +AC_INIT([sqlite],[3.41.2]) #-------------------------------------------------------------------- # Call TEA_INIT as the first TEA_ macro to set up initial vars. From nobody Mon May 1 04:15:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8qcf11sLz47kqB; Mon, 1 May 2023 04:15: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 4Q8qcf0n4jz3j9C; Mon, 1 May 2023 04:15:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682914514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3UtwKzP8c3JRbihRlS+2aAKVi55seBMTfHirP+wb720=; b=pSjRO6OEfsACQZ5O3bR3X12HmsRz9ZdM0u9xC9Ojj01BAGz4JZpf4vxt82+labyCLNTNtV tbqS6QX4HqgM7xl6I4M49YfDME42tdpuxBzusfYwkDtuYinDexB8FnnXvnDzQCII+EI4Fk Wni6aA6hDlk1d1HgOBBfNxA7dVP+FDg951Pr9ES3r1ZcpX/NuuGXj98vLFdhwLotWUNVC7 cJQmvm3TIIYsoqOlwNmqUTAQbiB8P9MNtWuAA1FKBa8UUhq/x/P5NIyf7XUJ4upp7AKDIM s/DSijPu8axrLqKqZ1JheHYGmg0Qs5oO0OMzSH+2ASQa9IOgwoZvt0pS9ef4hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682914514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3UtwKzP8c3JRbihRlS+2aAKVi55seBMTfHirP+wb720=; b=Jm7paVhgctAAtL5o73soJtGcIMLliqpH95sISuEfXdxhV7gvY9JwDYbH0gw/aKpu3SiMtS XwfrvdeDnwq1Y1pWoh+69eOUEJajYuD9JrY2ObPW1ymBSORF3cJUMK9OChVs0zBQ/sFNOE yQb3nKH8TD62cpsqHTycOl1akwY6iL02FT7mKgOuzBOLYgMzwsfOz9gGwOewRCFf+jDZdn XEdkKSb3ovx8iZO41fUbuR+a8FkeFwfTYbzMZHS076yDAIVneu9+ykHaso6mTyNO+gEKCt pVOGhtnOs890OoxJcUtszGFcodpqUw1tyndDFLwd7JXyMPaQg08JvPpyAywlaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682914514; a=rsa-sha256; cv=none; b=fpjppXgwQbAobAqd7n2dOAG014yHa8ITWaKsN4AnAIh55UCt5KXm9e58VDLg4MRPE9tgt5 EOLDnHhZLKrfSJ3xXT4NxKqWBD2PAdxW/1z+0dVy0BDLG2RjSVkN9UFCY8MDC5vQUXDMe1 AQj7JZ+hFEUpEmb7ZbfiRVr1ih1VKqhadDfhxWn1noJDuDYqG8ODReorjSvCeJFFeZXfcZ UXQUs5Dg0P6Mio9rd1MoPzTl3HqfK6IfAtz4218LhYjs626qjdy/DAcfqLd7ourPJGBfKd P9RPntv2R6V5JNlvudhXWCgpki6GCBnLNDPzxHU04CvEeC5OmrWFiulgIqIXUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8qcd6yDvzqgX; Mon, 1 May 2023 04:15:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3414FDeH082691; Mon, 1 May 2023 04:15:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3414FDkj082688; Mon, 1 May 2023 04:15:13 GMT (envelope-from git) Date: Mon, 1 May 2023 04:15:13 GMT Message-Id: <202305010415.3414FDkj082688@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: c3bbba00e452 - stable/12 - sqlite3: Vendor import of sqlite3 3.41.2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: c3bbba00e4527d423803b3f0a5d473570e40570c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=c3bbba00e4527d423803b3f0a5d473570e40570c commit c3bbba00e4527d423803b3f0a5d473570e40570c Author: Cy Schubert AuthorDate: 2023-04-17 16:02:41 +0000 Commit: Cy Schubert CommitDate: 2023-05-01 04:14:45 +0000 sqlite3: Vendor import of sqlite3 3.41.2 Release notes at https://www.sqlite.org/releaselog/3_41_2.html. Obtained from: https://www.sqlite.org/2023/sqlite-autoconf-3410200.tar.gz Merge commit '853a43f7c79218855a6e45a25a00b942972e3fa1' (cherry picked from commit e7e621f94d9073d620a4d15f13952f1d40685ece) --- contrib/sqlite3/configure | 20 ++-- contrib/sqlite3/configure.ac | 2 +- contrib/sqlite3/shell.c | 10 +- contrib/sqlite3/sqlite3.c | 209 ++++++++++++++++++++++++++++----------- contrib/sqlite3/sqlite3.h | 6 +- contrib/sqlite3/sqlite3rc.h | 2 +- contrib/sqlite3/tea/configure | 18 ++-- contrib/sqlite3/tea/configure.ac | 2 +- 8 files changed, 182 insertions(+), 87 deletions(-) diff --git a/contrib/sqlite3/configure b/contrib/sqlite3/configure index e5cbf778e689..dea9860d00ee 100755 --- a/contrib/sqlite3/configure +++ b/contrib/sqlite3/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for sqlite 3.41.0. +# Generated by GNU Autoconf 2.71 for sqlite 3.41.2. # # Report bugs to . # @@ -621,8 +621,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.41.0' -PACKAGE_STRING='sqlite 3.41.0' +PACKAGE_VERSION='3.41.2' +PACKAGE_STRING='sqlite 3.41.2' PACKAGE_BUGREPORT='http://www.sqlite.org' PACKAGE_URL='' @@ -1367,7 +1367,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.41.0 to adapt to many kinds of systems. +\`configure' configures sqlite 3.41.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1438,7 +1438,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.41.0:";; + short | recursive ) echo "Configuration of sqlite 3.41.2:";; esac cat <<\_ACEOF @@ -1563,7 +1563,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.41.0 +sqlite configure 3.41.2 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1833,7 +1833,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.41.0, which was +It was created by sqlite $as_me 3.41.2, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3106,7 +3106,7 @@ fi # Define the identity of the package. PACKAGE='sqlite' - VERSION='3.41.0' + VERSION='3.41.2' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -15314,7 +15314,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.41.0, which was +This file was extended by sqlite $as_me 3.41.2, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15373,7 +15373,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -sqlite config.status 3.41.0 +sqlite config.status 3.41.2 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/contrib/sqlite3/configure.ac b/contrib/sqlite3/configure.ac index f7f6558c2db5..290f160afc56 100644 --- a/contrib/sqlite3/configure.ac +++ b/contrib/sqlite3/configure.ac @@ -10,7 +10,7 @@ # AC_PREREQ(2.61) -AC_INIT(sqlite, 3.41.0, http://www.sqlite.org) +AC_INIT(sqlite, 3.41.2, http://www.sqlite.org) AC_CONFIG_SRCDIR([sqlite3.c]) AC_CONFIG_AUX_DIR([.]) diff --git a/contrib/sqlite3/shell.c b/contrib/sqlite3/shell.c index d6a673fe2cfe..e6495d75128e 100644 --- a/contrib/sqlite3/shell.c +++ b/contrib/sqlite3/shell.c @@ -13023,10 +13023,14 @@ static int dbdataNext(sqlite3_vtab_cursor *pCursor){ if( pCsr->bOnePage==0 && pCsr->iPgno>pCsr->szDb ) return SQLITE_OK; rc = dbdataLoadPage(pCsr, pCsr->iPgno, &pCsr->aPage, &pCsr->nPage); if( rc!=SQLITE_OK ) return rc; - if( pCsr->aPage ) break; + if( pCsr->aPage && pCsr->nPage>=256 ) break; + sqlite3_free(pCsr->aPage); + pCsr->aPage = 0; if( pCsr->bOnePage ) return SQLITE_OK; pCsr->iPgno++; } + + assert( iOff+3+2<=pCsr->nPage ); pCsr->iCell = pTab->bPtr ? -2 : 0; pCsr->nCell = get_uint16(&pCsr->aPage[iOff+3]); } @@ -13261,8 +13265,7 @@ static int dbdataGetEncoding(DbdataCursor *pCsr){ int nPg1 = 0; u8 *aPg1 = 0; rc = dbdataLoadPage(pCsr, 1, &aPg1, &nPg1); - assert( rc!=SQLITE_OK || nPg1==0 || nPg1>=512 ); - if( rc==SQLITE_OK && nPg1>0 ){ + if( rc==SQLITE_OK && nPg1>=(56+4) ){ pCsr->enc = get_uint32(&aPg1[56]); } sqlite3_free(aPg1); @@ -17921,6 +17924,7 @@ static char *shell_error_context(const char *zSql, sqlite3 *db){ if( db==0 || zSql==0 || (iOffset = sqlite3_error_offset(db))<0 + || iOffset>=strlen(zSql) ){ return sqlite3_mprintf(""); } diff --git a/contrib/sqlite3/sqlite3.c b/contrib/sqlite3/sqlite3.c index b47891c3817b..947a15455173 100644 --- a/contrib/sqlite3/sqlite3.c +++ b/contrib/sqlite3/sqlite3.c @@ -1,6 +1,6 @@ /****************************************************************************** ** This file is an amalgamation of many separate C source files from SQLite -** version 3.41.0. By combining all the individual C code files into this +** version 3.41.2. By combining all the individual C code files into this ** single large file, the entire code can be compiled as a single translation ** unit. This allows many compilers to do optimizations that would not be ** possible if the files were compiled separately. Performance improvements @@ -452,9 +452,9 @@ extern "C" { ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ -#define SQLITE_VERSION "3.41.0" -#define SQLITE_VERSION_NUMBER 3041000 -#define SQLITE_SOURCE_ID "2023-02-21 18:09:37 05941c2a04037fc3ed2ffae11f5d2260706f89431f463518740f72ada350866d" +#define SQLITE_VERSION "3.41.2" +#define SQLITE_VERSION_NUMBER 3041002 +#define SQLITE_SOURCE_ID "2023-03-22 11:56:21 0d1fc92f94cb6b76bffe3ec34d69cffde2924203304e8ffc4155597af0c191da" /* ** CAPI3REF: Run-Time Library Version Numbers @@ -16592,7 +16592,7 @@ struct PgHdr { ** private to pcache.c and should not be accessed by other modules. ** pCache is grouped with the public elements for efficiency. */ - i16 nRef; /* Number of users of this page */ + i64 nRef; /* Number of users of this page */ PgHdr *pDirtyNext; /* Next element in list of dirty pages */ PgHdr *pDirtyPrev; /* Previous element in list of dirty pages */ /* NB: pDirtyNext and pDirtyPrev are undefined if the @@ -16673,12 +16673,12 @@ SQLITE_PRIVATE void sqlite3PcacheClearSyncFlags(PCache *); SQLITE_PRIVATE void sqlite3PcacheClear(PCache*); /* Return the total number of outstanding page references */ -SQLITE_PRIVATE int sqlite3PcacheRefCount(PCache*); +SQLITE_PRIVATE i64 sqlite3PcacheRefCount(PCache*); /* Increment the reference count of an existing page */ SQLITE_PRIVATE void sqlite3PcacheRef(PgHdr*); -SQLITE_PRIVATE int sqlite3PcachePageRefcount(PgHdr*); +SQLITE_PRIVATE i64 sqlite3PcachePageRefcount(PgHdr*); /* Return the total number of pages stored in the cache */ SQLITE_PRIVATE int sqlite3PcachePagecount(PCache*); @@ -18837,7 +18837,7 @@ struct NameContext { #define NC_HasAgg 0x000010 /* One or more aggregate functions seen */ #define NC_IdxExpr 0x000020 /* True if resolving columns of CREATE INDEX */ #define NC_SelfRef 0x00002e /* Combo: PartIdx, isCheck, GenCol, and IdxExpr */ -#define NC_VarSelect 0x000040 /* A correlated subquery has been seen */ +#define NC_Subquery 0x000040 /* A subquery has been seen */ #define NC_UEList 0x000080 /* True if uNC.pEList is used */ #define NC_UAggInfo 0x000100 /* True if uNC.pAggInfo is used */ #define NC_UUpsert 0x000200 /* True if uNC.pUpsert is used */ @@ -19156,6 +19156,7 @@ struct IndexedExpr { int iIdxCur; /* The index cursor */ int iIdxCol; /* The index column that contains value of pExpr */ u8 bMaybeNullRow; /* True if we need an OP_IfNullRow check */ + u8 aff; /* Affinity of the pExpr expression */ IndexedExpr *pIENext; /* Next in a list of all indexed expressions */ #ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS const char *zIdxName; /* Name of index, used only for bytecode comments */ @@ -19207,6 +19208,9 @@ struct Parse { u8 withinRJSubrtn; /* Nesting level for RIGHT JOIN body subroutines */ #if defined(SQLITE_DEBUG) || defined(SQLITE_COVERAGE_TEST) u8 earlyCleanup; /* OOM inside sqlite3ParserAddCleanup() */ +#endif +#ifdef SQLITE_DEBUG + u8 ifNotExists; /* Might be true if IF NOT EXISTS. Assert()s only */ #endif int nRangeReg; /* Size of the temporary register block */ int iRangeReg; /* First register in temporary register block */ @@ -52653,7 +52657,7 @@ bitvec_end: struct PCache { PgHdr *pDirty, *pDirtyTail; /* List of dirty pages in LRU order */ PgHdr *pSynced; /* Last synced page in dirty page list */ - int nRefSum; /* Sum of ref counts over all pages */ + i64 nRefSum; /* Sum of ref counts over all pages */ int szCache; /* Configured cache size */ int szSpill; /* Size before spilling occurs */ int szPage; /* Size of every page in this cache */ @@ -52683,7 +52687,7 @@ struct PCache { unsigned char *a; int j; pPg = (PgHdr*)pLower->pExtra; - printf("%3d: nRef %2d flgs %02x data ", i, pPg->nRef, pPg->flags); + printf("%3lld: nRef %2d flgs %02x data ", i, pPg->nRef, pPg->flags); a = (unsigned char *)pLower->pBuf; for(j=0; j<12; j++) printf("%02x", a[j]); printf(" ptr %p\n", pPg); @@ -53427,14 +53431,14 @@ SQLITE_PRIVATE PgHdr *sqlite3PcacheDirtyList(PCache *pCache){ ** This is not the total number of pages referenced, but the sum of the ** reference count for all pages. */ -SQLITE_PRIVATE int sqlite3PcacheRefCount(PCache *pCache){ +SQLITE_PRIVATE i64 sqlite3PcacheRefCount(PCache *pCache){ return pCache->nRefSum; } /* ** Return the number of references to the page supplied as an argument. */ -SQLITE_PRIVATE int sqlite3PcachePageRefcount(PgHdr *p){ +SQLITE_PRIVATE i64 sqlite3PcachePageRefcount(PgHdr *p){ return p->nRef; } @@ -74504,7 +74508,7 @@ static SQLITE_NOINLINE int btreeNext(BtCursor *pCur){ pPage = pCur->pPage; idx = ++pCur->ix; - if( NEVER(!pPage->isInit) || sqlite3FaultSim(412) ){ + if( !pPage->isInit || sqlite3FaultSim(412) ){ return SQLITE_CORRUPT_BKPT; } @@ -77633,6 +77637,7 @@ SQLITE_PRIVATE int sqlite3BtreeInsert( assert( szNew==pPage->xCellSize(pPage, newCell) ); assert( szNew <= MX_CELL_SIZE(p->pBt) ); idx = pCur->ix; + pCur->info.nSize = 0; if( loc==0 ){ CellInfo info; assert( idx>=0 ); @@ -77705,7 +77710,6 @@ SQLITE_PRIVATE int sqlite3BtreeInsert( ** larger than the largest existing key, it is possible to insert the ** row without seeking the cursor. This can be a big performance boost. */ - pCur->info.nSize = 0; if( pPage->nOverflow ){ assert( rc==SQLITE_OK ); pCur->curFlags &= ~(BTCF_ValidNKey); @@ -90915,8 +90919,7 @@ static u64 filterHash(const Mem *aMem, const Op *pOp){ }else if( p->flags & MEM_Real ){ h += sqlite3VdbeIntValue(p); }else if( p->flags & (MEM_Str|MEM_Blob) ){ - h += p->n; - if( p->flags & MEM_Zero ) h += p->u.nZero; + /* no-op */ } } return h; @@ -104495,14 +104498,10 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){ if( 0==sqlite3ExprCanBeNull(pExpr->pLeft) && !IN_RENAME_OBJECT ){ testcase( ExprHasProperty(pExpr, EP_OuterON) ); assert( !ExprHasProperty(pExpr, EP_IntValue) ); - if( pExpr->op==TK_NOTNULL ){ - pExpr->u.zToken = "true"; - ExprSetProperty(pExpr, EP_IsTrue); - }else{ - pExpr->u.zToken = "false"; - ExprSetProperty(pExpr, EP_IsFalse); - } - pExpr->op = TK_TRUEFALSE; + pExpr->u.iValue = (pExpr->op==TK_NOTNULL); + pExpr->flags |= EP_IntValue; + pExpr->op = TK_INTEGER; + for(i=0, p=pNC; p && ipNext, i++){ p->nRef = anRef[i]; } @@ -104804,8 +104803,8 @@ static int resolveExprStep(Walker *pWalker, Expr *pExpr){ assert( pNC->nRef>=nRef ); if( nRef!=pNC->nRef ){ ExprSetProperty(pExpr, EP_VarSelect); - pNC->ncFlags |= NC_VarSelect; } + pNC->ncFlags |= NC_Subquery; } break; } @@ -109554,6 +109553,7 @@ SQLITE_PRIVATE void sqlite3ExprCodeGeneratedColumn( ){ int iAddr; Vdbe *v = pParse->pVdbe; + int nErr = pParse->nErr; assert( v!=0 ); assert( pParse->iSelfTab!=0 ); if( pParse->iSelfTab>0 ){ @@ -109566,6 +109566,7 @@ SQLITE_PRIVATE void sqlite3ExprCodeGeneratedColumn( sqlite3VdbeAddOp4(v, OP_Affinity, regOut, 1, 0, &pCol->affinity, 1); } if( iAddr ) sqlite3VdbeJumpHere(v, iAddr); + if( pParse->nErr>nErr ) pParse->db->errByteOffset = -1; } #endif /* SQLITE_OMIT_GENERATED_COLUMNS */ @@ -109582,6 +109583,7 @@ SQLITE_PRIVATE void sqlite3ExprCodeGetColumnOfTable( Column *pCol; assert( v!=0 ); assert( pTab!=0 ); + assert( iCol!=XN_EXPR ); if( iCol<0 || iCol==pTab->iPKey ){ sqlite3VdbeAddOp2(v, OP_Rowid, iTabCur, regOut); VdbeComment((v, "%s.rowid", pTab->zName)); @@ -109848,6 +109850,7 @@ static SQLITE_NOINLINE int sqlite3IndexedExprLookup( IndexedExpr *p; Vdbe *v; for(p=pParse->pIdxEpr; p; p=p->pIENext){ + u8 exprAff; int iDataCur = p->iDataCur; if( iDataCur<0 ) continue; if( pParse->iSelfTab ){ @@ -109855,6 +109858,16 @@ static SQLITE_NOINLINE int sqlite3IndexedExprLookup( iDataCur = -1; } if( sqlite3ExprCompare(0, pExpr, p->pExpr, iDataCur)!=0 ) continue; + assert( p->aff>=SQLITE_AFF_BLOB && p->aff<=SQLITE_AFF_NUMERIC ); + exprAff = sqlite3ExprAffinity(pExpr); + if( (exprAff<=SQLITE_AFF_BLOB && p->aff!=SQLITE_AFF_BLOB) + || (exprAff==SQLITE_AFF_TEXT && p->aff!=SQLITE_AFF_TEXT) + || (exprAff>=SQLITE_AFF_NUMERIC && p->aff!=SQLITE_AFF_NUMERIC) + ){ + /* Affinity mismatch on a generated column */ + continue; + } + v = pParse->pVdbe; assert( v!=0 ); if( p->bMaybeNullRow ){ @@ -110434,10 +110447,13 @@ expr_code_doover: return target; } case TK_COLLATE: { - if( !ExprHasProperty(pExpr, EP_Collate) - && ALWAYS(pExpr->pLeft) - && pExpr->pLeft->op==TK_FUNCTION - ){ + if( !ExprHasProperty(pExpr, EP_Collate) ){ + /* A TK_COLLATE Expr node without the EP_Collate tag is a so-called + ** "SOFT-COLLATE" that is added to constraints that are pushed down + ** from outer queries into sub-queries by the push-down optimization. + ** Clear subtypes as subtypes may not cross a subquery boundary. + */ + assert( pExpr->pLeft ); inReg = sqlite3ExprCodeTarget(pParse, pExpr->pLeft, target); if( inReg!=target ){ sqlite3VdbeAddOp2(v, OP_SCopy, inReg, target); @@ -110545,16 +110561,22 @@ expr_code_doover: break; } } - addrINR = sqlite3VdbeAddOp1(v, OP_IfNullRow, pExpr->iTable); - /* Temporarily disable factoring of constant expressions, since - ** even though expressions may appear to be constant, they are not - ** really constant because they originate from the right-hand side - ** of a LEFT JOIN. */ - pParse->okConstFactor = 0; + addrINR = sqlite3VdbeAddOp3(v, OP_IfNullRow, pExpr->iTable, 0, target); + /* The OP_IfNullRow opcode above can overwrite the result register with + ** NULL. So we have to ensure that the result register is not a value + ** that is suppose to be a constant. Two defenses are needed: + ** (1) Temporarily disable factoring of constant expressions + ** (2) Make sure the computed value really is stored in register + ** "target" and not someplace else. + */ + pParse->okConstFactor = 0; /* note (1) above */ inReg = sqlite3ExprCodeTarget(pParse, pExpr->pLeft, target); pParse->okConstFactor = okConstFactor; + if( inReg!=target ){ /* note (2) above */ + sqlite3VdbeAddOp2(v, OP_SCopy, inReg, target); + inReg = target; + } sqlite3VdbeJumpHere(v, addrINR); - sqlite3VdbeChangeP3(v, addrINR, inReg); break; } @@ -118917,7 +118939,7 @@ SQLITE_PRIVATE void sqlite3AddReturning(Parse *pParse, ExprList *pList){ if( pParse->pNewTrigger ){ sqlite3ErrorMsg(pParse, "cannot use RETURNING in a trigger"); }else{ - assert( pParse->bReturning==0 ); + assert( pParse->bReturning==0 || pParse->ifNotExists ); } pParse->bReturning = 1; pRet = sqlite3DbMallocZero(db, sizeof(*pRet)); @@ -118943,7 +118965,8 @@ SQLITE_PRIVATE void sqlite3AddReturning(Parse *pParse, ExprList *pList){ pRet->retTStep.pTrig = &pRet->retTrig; pRet->retTStep.pExprList = pList; pHash = &(db->aDb[1].pSchema->trigHash); - assert( sqlite3HashFind(pHash, RETURNING_TRIGGER_NAME)==0 || pParse->nErr ); + assert( sqlite3HashFind(pHash, RETURNING_TRIGGER_NAME)==0 + || pParse->nErr || pParse->ifNotExists ); if( sqlite3HashInsert(pHash, RETURNING_TRIGGER_NAME, &pRet->retTrig) ==&pRet->retTrig ){ sqlite3OomFault(db); @@ -119478,6 +119501,7 @@ SQLITE_PRIVATE void sqlite3AddGenerated(Parse *pParse, Expr *pExpr, Token *pType ** turn it into one by adding a unary "+" operator. */ pExpr = sqlite3PExpr(pParse, TK_UPLUS, pExpr, 0); } + if( pExpr && pExpr->op!=TK_RAISE ) pExpr->affExpr = pCol->affinity; sqlite3ColumnSetExpr(pParse, pTab, pCol, pExpr); pExpr = 0; goto generated_done; @@ -124184,7 +124208,7 @@ SQLITE_PRIVATE void sqlite3DeleteFrom( #endif /* SQLITE_OMIT_TRUNCATE_OPTIMIZATION */ { u16 wcf = WHERE_ONEPASS_DESIRED|WHERE_DUPLICATES_OK; - if( sNC.ncFlags & NC_VarSelect ) bComplex = 1; + if( sNC.ncFlags & NC_Subquery ) bComplex = 1; wcf |= (bComplex ? 0 : WHERE_ONEPASS_MULTIROW); if( HasRowid(pTab) ){ /* For a rowid table, initialize the RowSet to an empty set */ @@ -126881,6 +126905,18 @@ static void ceilingFunc( static double xCeil(double x){ return ceil(x); } static double xFloor(double x){ return floor(x); } +/* +** Some systems do not have log2() and log10() in their standard math +** libraries. +*/ +#if defined(HAVE_LOG10) && HAVE_LOG10==0 +# define log10(X) (0.4342944819032517867*log(X)) +#endif +#if defined(HAVE_LOG2) && HAVE_LOG2==0 +# define log2(X) (1.442695040888963456*log(X)) +#endif + + /* ** Implementation of SQL functions: ** @@ -136260,6 +136296,23 @@ SQLITE_PRIVATE void sqlite3Pragma( jmp4 = integrityCheckResultRow(v); sqlite3VdbeJumpHere(v, jmp2); + /* The OP_IdxRowid opcode is an optimized version of OP_Column + ** that extracts the rowid off the end of the index record. + ** But it only works correctly if index record does not have + ** any extra bytes at the end. Verify that this is the case. */ + if( HasRowid(pTab) ){ + int jmp7; + sqlite3VdbeAddOp2(v, OP_IdxRowid, iIdxCur+j, 3); + jmp7 = sqlite3VdbeAddOp3(v, OP_Eq, 3, 0, r1+pIdx->nColumn-1); + VdbeCoverage(v); + sqlite3VdbeLoadString(v, 3, + "rowid not at end-of-record for row "); + sqlite3VdbeAddOp3(v, OP_Concat, 7, 3, 3); + sqlite3VdbeLoadString(v, 4, " of index "); + sqlite3VdbeGoto(v, jmp5-1); + sqlite3VdbeJumpHere(v, jmp7); + } + /* Any indexed columns with non-BINARY collations must still hold ** the exact same text value as the table. */ label6 = 0; @@ -140555,8 +140608,6 @@ SQLITE_PRIVATE void sqlite3SubqueryColumnTypes( pCol->affinity = sqlite3ExprAffinity(p); if( pCol->affinity<=SQLITE_AFF_NONE ){ pCol->affinity = aff; - }else if( pCol->affinity>=SQLITE_AFF_NUMERIC && p->op==TK_CAST ){ - pCol->affinity = SQLITE_AFF_FLEXNUM; } if( pCol->affinity>=SQLITE_AFF_TEXT && pSelect->pNext ){ int m = 0; @@ -140570,6 +140621,9 @@ SQLITE_PRIVATE void sqlite3SubqueryColumnTypes( if( pCol->affinity>=SQLITE_AFF_NUMERIC && (m&0x02)!=0 ){ pCol->affinity = SQLITE_AFF_BLOB; } + if( pCol->affinity>=SQLITE_AFF_NUMERIC && p->op==TK_CAST ){ + pCol->affinity = SQLITE_AFF_FLEXNUM; + } } zType = columnType(&sNC, p, 0, 0, 0); if( zType==0 || pCol->affinity!=sqlite3AffinityType(zType, 0) ){ @@ -142084,7 +142138,9 @@ static Expr *substExpr( sqlite3VectorErrorMsg(pSubst->pParse, pCopy); }else{ sqlite3 *db = pSubst->pParse->db; - if( pSubst->isOuterJoin && pCopy->op!=TK_COLUMN ){ + if( pSubst->isOuterJoin + && (pCopy->op!=TK_COLUMN || pCopy->iTable!=pSubst->iNewTable) + ){ memset(&ifNullRow, 0, sizeof(ifNullRow)); ifNullRow.op = TK_IF_NULL_ROW; ifNullRow.pLeft = pCopy; @@ -144600,10 +144656,12 @@ static void optimizeAggregateUseOfIndexedExpr( NameContext *pNC /* Name context used to resolve agg-func args */ ){ assert( pAggInfo->iFirstReg==0 ); + assert( pSelect!=0 ); + assert( pSelect->pGroupBy!=0 ); pAggInfo->nColumn = pAggInfo->nAccumulator; if( ALWAYS(pAggInfo->nSortingColumn>0) ){ if( pAggInfo->nColumn==0 ){ - pAggInfo->nSortingColumn = 0; + pAggInfo->nSortingColumn = pSelect->pGroupBy->nExpr; }else{ pAggInfo->nSortingColumn = pAggInfo->aCol[pAggInfo->nColumn-1].iSorterColumn+1; @@ -145028,6 +145086,7 @@ static int countOfViewOptimization(Parse *pParse, Select *p){ if( p->pEList->nExpr!=1 ) return 0; /* Single result column */ if( p->pWhere ) return 0; if( p->pGroupBy ) return 0; + if( p->pOrderBy ) return 0; pExpr = p->pEList->a[0].pExpr; if( pExpr->op!=TK_AGG_FUNCTION ) return 0; /* Result is an aggregate */ assert( ExprUseUToken(pExpr) ); @@ -145038,7 +145097,8 @@ static int countOfViewOptimization(Parse *pParse, Select *p){ if( ExprHasProperty(pExpr, EP_WinFunc) ) return 0;/* Not a window function */ pSub = p->pSrc->a[0].pSelect; if( pSub==0 ) return 0; /* The FROM is a subquery */ - if( pSub->pPrior==0 ) return 0; /* Must be a compound ry */ + if( pSub->pPrior==0 ) return 0; /* Must be a compound */ + if( pSub->selFlags & SF_CopyCte ) return 0; /* Not a CTE */ do{ if( pSub->op!=TK_ALL && pSub->pPrior ) return 0; /* Must be UNION ALL */ if( pSub->pWhere ) return 0; /* No WHERE clause */ @@ -145481,7 +145541,6 @@ SQLITE_PRIVATE int sqlite3Select( && countOfViewOptimization(pParse, p) ){ if( db->mallocFailed ) goto select_end; - pEList = p->pEList; pTabList = p->pSrc; } #endif @@ -146843,6 +146902,7 @@ SQLITE_PRIVATE void sqlite3BeginTrigger( }else{ assert( !db->init.busy ); sqlite3CodeVerifySchema(pParse, iDb); + VVA_ONLY( pParse->ifNotExists = 1; ) } goto trigger_cleanup; } @@ -147624,7 +147684,7 @@ static void codeReturningTrigger( } sqlite3ExprListDelete(db, sSelect.pEList); pNew = sqlite3ExpandReturning(pParse, pReturning->pReturnEL, pTab); - if( !db->mallocFailed ){ + if( pParse->nErr==0 ){ NameContext sNC; memset(&sNC, 0, sizeof(sNC)); if( pReturning->nRetCol==0 ){ @@ -148846,12 +148906,22 @@ SQLITE_PRIVATE void sqlite3Update( /* Begin the database scan. ** ** Do not consider a single-pass strategy for a multi-row update if - ** there are any triggers or foreign keys to process, or rows may - ** be deleted as a result of REPLACE conflict handling. Any of these - ** things might disturb a cursor being used to scan through the table - ** or index, causing a single-pass approach to malfunction. */ + ** there is anything that might disrupt the cursor being used to do + ** the UPDATE: + ** (1) This is a nested UPDATE + ** (2) There are triggers + ** (3) There are FOREIGN KEY constraints + ** (4) There are REPLACE conflict handlers + ** (5) There are subqueries in the WHERE clause + */ flags = WHERE_ONEPASS_DESIRED; - if( !pParse->nested && !pTrigger && !hasFK && !chngKey && !bReplace ){ + if( !pParse->nested + && !pTrigger + && !hasFK + && !chngKey + && !bReplace + && (sNC.ncFlags & NC_Subquery)==0 + ){ flags |= WHERE_ONEPASS_MULTIROW; } pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere,0,0,0,flags,iIdxCur); @@ -150816,7 +150886,9 @@ static int vtabCallConstructor( sCtx.pPrior = db->pVtabCtx; sCtx.bDeclared = 0; db->pVtabCtx = &sCtx; + pTab->nTabRef++; rc = xConstruct(db, pMod->pAux, nArg, azArg, &pVTable->pVtab, &zErr); + sqlite3DeleteTable(db, pTab); db->pVtabCtx = sCtx.pPrior; if( rc==SQLITE_NOMEM ) sqlite3OomFault(db); assert( sCtx.pTab==pTab ); @@ -156848,7 +156920,7 @@ SQLITE_PRIVATE void sqlite3WhereTabFuncArgs( pRhs = sqlite3PExpr(pParse, TK_UPLUS, sqlite3ExprDup(pParse->db, pArgs->a[j].pExpr, 0), 0); pTerm = sqlite3PExpr(pParse, TK_EQ, pColRef, pRhs); - if( pItem->fg.jointype & (JT_LEFT|JT_LTORJ) ){ + if( pItem->fg.jointype & (JT_LEFT|JT_LTORJ|JT_RIGHT) ){ joinType = EP_OuterON; }else{ joinType = EP_InnerON; @@ -157985,6 +158057,10 @@ static SQLITE_NOINLINE void sqlite3ConstructBloomFilter( Vdbe *v = pParse->pVdbe; /* VDBE under construction */ WhereLoop *pLoop = pLevel->pWLoop; /* The loop being coded */ int iCur; /* Cursor for table getting the filter */ + IndexedExpr *saved_pIdxEpr; /* saved copy of Parse.pIdxEpr */ + + saved_pIdxEpr = pParse->pIdxEpr; + pParse->pIdxEpr = 0; assert( pLoop!=0 ); assert( v!=0 ); @@ -158041,9 +158117,8 @@ static SQLITE_NOINLINE void sqlite3ConstructBloomFilter( int r1 = sqlite3GetTempRange(pParse, n); int jj; for(jj=0; jjaiColumn[jj]; assert( pIdx->pTable==pItem->pTab ); - sqlite3ExprCodeGetColumnOfTable(v, pIdx->pTable, iCur, iCol,r1+jj); + sqlite3ExprCodeLoadIndexColumn(pParse, pIdx, iCur, jj, r1+jj); } sqlite3VdbeAddOp4Int(v, OP_FilterAdd, pLevel->regFilter, 0, r1, n); sqlite3ReleaseTempRange(pParse, r1, n); @@ -158074,6 +158149,7 @@ static SQLITE_NOINLINE void sqlite3ConstructBloomFilter( } }while( iLevel < pWInfo->nLevel ); sqlite3VdbeJumpHere(v, addrOnce); + pParse->pIdxEpr = saved_pIdxEpr; } @@ -158373,6 +158449,7 @@ static int whereKeyStats( assert( pIdx->nSample>0 ); assert( pRec->nField>0 ); + /* Do a binary search to find the first sample greater than or equal ** to pRec. If pRec contains a single field, the set of samples to search ** is simply the aSample[] array. If the samples in aSample[] contain more @@ -158417,7 +158494,12 @@ static int whereKeyStats( ** it is extended to two fields. The duplicates that this creates do not ** cause any problems. */ - nField = MIN(pRec->nField, pIdx->nSample); + if( !HasRowid(pIdx->pTable) && IsPrimaryKeyIndex(pIdx) ){ + nField = pIdx->nKeyCol; + }else{ + nField = pIdx->nColumn; + } + nField = MIN(pRec->nField, nField); iCol = 0; iSample = pIdx->nSample * nField; do{ @@ -162145,6 +162227,10 @@ static int wherePathSolver(WhereInfo *pWInfo, LogEst nRowEst){ if( pFrom->isOrdered==pWInfo->pOrderBy->nExpr ){ pWInfo->eDistinct = WHERE_DISTINCT_ORDERED; } + if( pWInfo->pSelect->pOrderBy + && pWInfo->nOBSat > pWInfo->pSelect->pOrderBy->nExpr ){ + pWInfo->nOBSat = pWInfo->pSelect->pOrderBy->nExpr; + } }else{ pWInfo->revMask = pFrom->revLoop; if( pWInfo->nOBSat<=0 ){ @@ -162556,6 +162642,9 @@ static SQLITE_NOINLINE void whereAddIndexedExpr( p->iIdxCur = iIdxCur; p->iIdxCol = i; p->bMaybeNullRow = bMaybeNullRow; + if( sqlite3IndexAffinityStr(pParse->db, pIdx) ){ + p->aff = pIdx->zColAff[i]; + } #ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS p->zIdxName = pIdx->zName; #endif @@ -193018,16 +193107,18 @@ static int fts3MsrBufferData( char *pList, i64 nList ){ - if( nList>pMsr->nBuffer ){ + if( (nList+FTS3_NODE_PADDING)>pMsr->nBuffer ){ char *pNew; - pMsr->nBuffer = nList*2; - pNew = (char *)sqlite3_realloc64(pMsr->aBuffer, pMsr->nBuffer); + int nNew = nList*2 + FTS3_NODE_PADDING; + pNew = (char *)sqlite3_realloc64(pMsr->aBuffer, nNew); if( !pNew ) return SQLITE_NOMEM; pMsr->aBuffer = pNew; + pMsr->nBuffer = nNew; } assert( nList>0 ); memcpy(pMsr->aBuffer, pList, nList); + memset(&pMsr->aBuffer[nList], 0, FTS3_NODE_PADDING); return SQLITE_OK; } @@ -240171,7 +240262,7 @@ static void fts5SourceIdFunc( ){ assert( nArg==0 ); UNUSED_PARAM2(nArg, apUnused); - sqlite3_result_text(pCtx, "fts5: 2023-02-21 18:09:37 05941c2a04037fc3ed2ffae11f5d2260706f89431f463518740f72ada350866d", -1, SQLITE_TRANSIENT); + sqlite3_result_text(pCtx, "fts5: 2023-03-22 11:56:21 0d1fc92f94cb6b76bffe3ec34d69cffde2924203304e8ffc4155597af0c191da", -1, SQLITE_TRANSIENT); } /* diff --git a/contrib/sqlite3/sqlite3.h b/contrib/sqlite3/sqlite3.h index 4c6addac26c3..7e43e1f1b4dc 100644 --- a/contrib/sqlite3/sqlite3.h +++ b/contrib/sqlite3/sqlite3.h @@ -146,9 +146,9 @@ extern "C" { ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ -#define SQLITE_VERSION "3.41.0" -#define SQLITE_VERSION_NUMBER 3041000 -#define SQLITE_SOURCE_ID "2023-02-21 18:09:37 05941c2a04037fc3ed2ffae11f5d2260706f89431f463518740f72ada350866d" +#define SQLITE_VERSION "3.41.2" +#define SQLITE_VERSION_NUMBER 3041002 +#define SQLITE_SOURCE_ID "2023-03-22 11:56:21 0d1fc92f94cb6b76bffe3ec34d69cffde2924203304e8ffc4155597af0c191da" /* ** CAPI3REF: Run-Time Library Version Numbers diff --git a/contrib/sqlite3/sqlite3rc.h b/contrib/sqlite3/sqlite3rc.h index 6b8378ed1271..1dd5484c2c96 100644 --- a/contrib/sqlite3/sqlite3rc.h +++ b/contrib/sqlite3/sqlite3rc.h @@ -1,3 +1,3 @@ #ifndef SQLITE_RESOURCE_VERSION -#define SQLITE_RESOURCE_VERSION 3,41,0 +#define SQLITE_RESOURCE_VERSION 3,41,2 #endif diff --git a/contrib/sqlite3/tea/configure b/contrib/sqlite3/tea/configure index d4a42170b424..750545f3961c 100755 --- a/contrib/sqlite3/tea/configure +++ b/contrib/sqlite3/tea/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for sqlite 3.41.0. +# Generated by GNU Autoconf 2.71 for sqlite 3.41.2. # # # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, @@ -608,8 +608,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sqlite' PACKAGE_TARNAME='sqlite' -PACKAGE_VERSION='3.41.0' -PACKAGE_STRING='sqlite 3.41.0' +PACKAGE_VERSION='3.41.2' +PACKAGE_STRING='sqlite 3.41.2' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1331,7 +1331,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sqlite 3.41.0 to adapt to many kinds of systems. +\`configure' configures sqlite 3.41.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1393,7 +1393,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sqlite 3.41.0:";; + short | recursive ) echo "Configuration of sqlite 3.41.2:";; esac cat <<\_ACEOF @@ -1496,7 +1496,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sqlite configure 3.41.0 +sqlite configure 3.41.2 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1795,7 +1795,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sqlite $as_me 3.41.0, which was +It was created by sqlite $as_me 3.41.2, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -9560,7 +9560,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sqlite $as_me 3.41.0, which was +This file was extended by sqlite $as_me 3.41.2, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -9615,7 +9615,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -sqlite config.status 3.41.0 +sqlite config.status 3.41.2 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/contrib/sqlite3/tea/configure.ac b/contrib/sqlite3/tea/configure.ac index f6291d2557d4..8c06474a1af3 100644 --- a/contrib/sqlite3/tea/configure.ac +++ b/contrib/sqlite3/tea/configure.ac @@ -19,7 +19,7 @@ dnl to configure the system for the local environment. # so that we create the export library with the dll. #----------------------------------------------------------------------- -AC_INIT([sqlite],[3.41.0]) +AC_INIT([sqlite],[3.41.2]) #-------------------------------------------------------------------- # Call TEA_INIT as the first TEA_ macro to set up initial vars. From nobody Mon May 1 06:32:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8tg412f4z47t6J; Mon, 1 May 2023 06:32: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 4Q8tg40bW6z3spf; Mon, 1 May 2023 06:32:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682922752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CopiNaixuDUM/7jPC8YFQFmSTxTAlEa/FQtC3RsnDZM=; b=ZRQphPXzicSzhb4hpWBcQYUrcb51O2SUXJM3WmOuyES0jdgkEhoJPP9Dzwq+WPD8aIKlqM 9GhSDq6tzpMXI8xPlGnEp2pxfFHQvB1efxG/0n+XZ6Vobqg7CFmVQyIxXPFPbItXqO7YoZ zYXtEIZ0/ivgirqgEO8DvwyRZKgjaXEF5deT4HS/kBT4NeaNoZ3xpEs8panovqIajM8WpS u0bLiGjIKeGwkA9LLdm8yV69Bq1y5IgBDgUT1WE+6xR6/m0CNyfbH44MFYVgPtSuqvNqVs Je6OHNdvv9oCCnSzYe9EE0n2F6goV9Dw/rz0XB1B7UfV1VdftprTYqrirDFsbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682922752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CopiNaixuDUM/7jPC8YFQFmSTxTAlEa/FQtC3RsnDZM=; b=edTrtgsG8vDVJ8sPJQGovkIhqwdD1Nrpxb4YbtuvmGrKl8QYFTaJw+itwhj/xyUom6lfqF mJ1wQn7V83wmls3fEzjxnpK+bqHMCste03nk7EjMu2FHEUJP7rYUDSXbjwP4fcjJ4V+1E6 1ni4+IdDUlEeDSJnfOZNYyYp+ybLds2Q5dc5I0zjrfxGBgdCxMER5kRp8nhbn0Bm0GEQMI 55VKJr/VzBgnPFCrB+S9lCLJgDRlAq83+TFDkd7ajObwYhg3YzUdNLrMxJ9QdvnDzLhgLy ByEzuiQ3AeaveRhQdQE70vIhjY6rxvpfjRHhrSn0GxczLTaWe88PMfm+Gd7Dmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682922752; a=rsa-sha256; cv=none; b=JXwPobfBdkhNehkrcaX41kqm2YdqZYkxw+auNs23RR7ENBxDnKcm4auhTJGccB5SV0+r1e jaQQ7E35UeYegOJdHdzbkTivBIBPMtoadlA4XYGEJThC8xHfrm2YGF/tXEvvKfrxa1FXio Au5MyfSBd+bTDSQpPfmV0Wr9iofMhAqMOM+T4LUiutr7FE9WEKA3PIdPzNLhVvtDZ2hprV G0XYNw80uCQ6yM256XqYcfEci63TC/E/yX2up9F/l+KPEktH/wwwmOgVLhos5ma/bZSK1l fY/rjLgrH33u0dR90YdNpXSod5Ua0OtYmTJv/jadh4jvw21gDYbfwkgaVvn6eQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8tg36m0xzvq3; Mon, 1 May 2023 06:32:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3416WVGj012729; Mon, 1 May 2023 06:32:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3416WV6r012728; Mon, 1 May 2023 06:32:31 GMT (envelope-from git) Date: Mon, 1 May 2023 06:32:31 GMT Message-Id: <202305010632.3416WV6r012728@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: 3416e102c4e9 - main - arm: Remove TI code from GENERIC List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3416e102c4e978a394a604012dae1943c7300a1e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=3416e102c4e978a394a604012dae1943c7300a1e commit 3416e102c4e978a394a604012dae1943c7300a1e Author: Emmanuel Vadot AuthorDate: 2023-04-27 06:19:07 +0000 Commit: Emmanuel Vadot CommitDate: 2023-05-01 06:32:21 +0000 arm: Remove TI code from GENERIC TI support is in a sad state for years. We haven't been able to keep up with all the breaking changes that upstream do in the DTS. This requires a lot of new drivers to handle the new buses that they create and all the new clocks that they expose. Keep the code for now in case somebody is interested in reviving this platform but stop bloating GENERIC with code that don't work. Reviewed by: imp, mmel MFC after: never Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D39843 --- sys/arm/conf/GENERIC | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/sys/arm/conf/GENERIC b/sys/arm/conf/GENERIC index 815fd2a1881e..fc4ce2ef146a 100644 --- a/sys/arm/conf/GENERIC +++ b/sys/arm/conf/GENERIC @@ -43,9 +43,6 @@ files "../mv/files.arm7" files "../nvidia/tegra124/files.tegra124" files "../qemu/files.qemu" files "../rockchip/files.rk32xx" -files "../ti/files.ti" -files "../ti/am335x/files.am335x" -files "../ti/omap4/files.omap4" files "../xilinx/files.zynq7" options SOC_ALLWINNER_A10 @@ -140,12 +137,6 @@ device bcm2835_bsc device fsliic # Freescale i2c/iic device icee # AT24Cxxx and compatible EEPROMs device sy8106a # SY8106A Buck Regulator -device ti_i2c -device am335x_pmic # AM335x Power Management IC (TPC65217) -device am335x_rtc # RTC support (power management only) -device twl # TI TWLX0X0/TPS659x0 Power Management -device twl_vreg # twl voltage regulation -device twl_clks # twl external clocks # i2c RTCs device ds1307 # Dallas DS1307 RTC and compatible @@ -173,12 +164,8 @@ device spibus device spigen device bcm2835_spi device mv_spi -device ti_spi device zy7_qspi # Xilinx Zynq QSPI controller -# ADC support -device ti_adc - # PWM device pwm @@ -186,7 +173,6 @@ device pwm # If we don't enable the watchdog driver, the BeagleBone could potentially # reboot automatically because the boot loader might have enabled the # watchdog. -device ti_wdt device imxwdt # Watchdog. WARNING: can't be disabled!!! device aw_wdog # Allwinner Watchdog @@ -229,7 +215,6 @@ device miibus device awg # 10/100/1000 integrated EMAC controller device cgem # Cadence GEM Gigabit Ethernet device -device cpsw # TI Common Platform Ethernet Switch (CPSW) device dwc # 10/100/1000 integrated GMAC controller device emac # 10/100 integrated EMAC controller device ffec # Freescale Fast Ethernet Controller @@ -251,21 +236,11 @@ device dwc_hdmi device imx6_hdmi device imx6_ipu -# TDA19988 HDMI Encoder -device tda19988 - # Pinmux device fdt_pinctrl -# TI Programmable Realtime Unit support -device ti_pruss - -# Mailbox support -device ti_mbox - # DMA controller device fslsdma -device ti_sdma device a10_dmac device a31_dmac @@ -303,6 +278,4 @@ makeoptions MODULES_EXTRA+="dtb/zynq" # SOC-specific modules makeoptions MODULES_EXTRA+="allwinner" -makeoptions MODULES_EXTRA+="arm_ti" makeoptions MODULES_EXTRA+="imx" - From nobody Mon May 1 06:32:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8tg55BPvz47t6N; Mon, 1 May 2023 06:32: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 4Q8tg51Wpxz3skY; Mon, 1 May 2023 06:32:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682922753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bifXbOxRfh+OlX43MGbPoGE1N3V/nkH7b+4TLsC5JA0=; b=nXMtECCuWWp3OwzUIMkT6p+OcyLoDQtKmPl5Rxl8hNtQq9B5Fk/Cm7p/qdKuT/dclJwNZZ sh7R+GeNf/jYQnsDTtgAM4mrCbr52vCXracTBbO2bDG87TdktWtB6OBZ/U9lyC/EwdvC0q mYKtpoj0AGGpA6j5UyB1VGIsHLlb2+lIm3V38DjNJViRWtrysbs384Pl5fPk5bZnaUldgN NTFjNHEjgOk2RtZ6h4TpbTTZR54v6xc1bQ0YjqUzZ3Z4q75pc3QVzzbf6draUJQ66ejCw7 8lQ3EpKio8WpmiP05QcVVkMl6ZgcD+dIM6ok8srNupYw26BhQo8vLTtMH3gqqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682922753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bifXbOxRfh+OlX43MGbPoGE1N3V/nkH7b+4TLsC5JA0=; b=p57txRSbjrexRxhB5FQujIJv+rm12QZTNKJvyjA+YbmucmjcXW4QHvZ8mF98ThmoSXAH6U SrAexNCSRQImSh5xFeK+YUJrTJOg8NlSuarMqQWKA0c3JZdrsD2xV90mbcYO1aiO5CnlVF 0MRjJmU1onCkVTkEflBLUcXbS0Ooqwow9eMDAGqEAGgNkUekYm7GZ4TVT6hncACoRF4BoK yPpqCOHlqa9t7hEYEY/fE2QXqKY6YkvYwsYE2g2dLcL1sm9iT28oceHI8B0IbLZEt1Qs6+ by36F+VxZfR3aSMJ9P36DWJnzlml9CyICBY8CEWs5mfL2rlLydwniE6Nv4Hy0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682922753; a=rsa-sha256; cv=none; b=LevqeNkilyuSXeD3/7AT9T68DduXxrO2+b/HiwmiOzUkhsMovJnRateoHChxB6i5yGIPps KbIsWs4zCMd2am88jbPxb/BlPKXorkkXaceGjF6kce2Y16xaeXkgpUXrB6Vos2Ca+J6MK6 Ad727Il+TgN2Jw+X8EgDKSUXxJSLvg7NNhPiQxOlj+32YnAsXKIsnu5pXBw6mUAlfDNpsw QZVGjzHAARuyoHB2n5T7BySihzNyugr5L+8Vtm13iOYJmlSRHLk0KvV9G8BzWPRAxrzdQq T29VzWOaGkr5MhnSWVScgegA4IiMwNNj3RsRhD13+aAHUgpYjr1OQFpaxHuIjg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8tg50Lnhzw1y; Mon, 1 May 2023 06:32:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3416WWpJ012761; Mon, 1 May 2023 06:32:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3416WWxK012760; Mon, 1 May 2023 06:32:32 GMT (envelope-from git) Date: Mon, 1 May 2023 06:32:32 GMT Message-Id: <202305010632.3416WWxK012760@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: ea9075959bf3 - main - armv7: release: Stop installing BBB u-boot List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ea9075959bf3a6e98d9638467500a690267f3947 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=ea9075959bf3a6e98d9638467500a690267f3947 commit ea9075959bf3a6e98d9638467500a690267f3947 Author: Emmanuel Vadot AuthorDate: 2023-04-27 06:21:47 +0000 Commit: Emmanuel Vadot CommitDate: 2023-05-01 06:32:21 +0000 armv7: release: Stop installing BBB u-boot BBB code was removed from GENERIC kernel as it's not functional. Stop installing u-boot for a platform that we don't boot on. Reviewed by: imp, gjb Approved by: re@ (gjb) MFC after: never Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D39844 --- release/arm/GENERICSD.conf | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/release/arm/GENERICSD.conf b/release/arm/GENERICSD.conf index 32b780d04385..2a0672db9bbd 100644 --- a/release/arm/GENERICSD.conf +++ b/release/arm/GENERICSD.conf @@ -6,13 +6,12 @@ EMBEDDED_TARGET_ARCH="armv7" EMBEDDED_TARGET="arm" EMBEDDEDBUILD=1 -EMBEDDEDPORTS="sysutils/u-boot-beaglebone sysutils/u-boot-rpi2 sysutils/rpi-firmware" +EMBEDDEDPORTS="sysutils/u-boot-rpi2 sysutils/rpi-firmware" FAT_SIZE="50m -b 1m" FAT_TYPE="16" IMAGE_SIZE="5120M" KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" -BBB_UBOOT_DIR="/usr/local/share/u-boot/u-boot-beaglebone" RPI_UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi2" RPI_FIRMWARE_DIR="/usr/local/share/rpi-firmware" RPI_OL_DIR="${RPI_FIRMWARE_DIR}/overlays" @@ -49,20 +48,6 @@ arm_install_uboot_rpi2() { return 0 } -arm_install_uboot_bbb() { - FATMOUNT="${DESTDIR%${KERNEL}}/fat" - chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" - chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} - chroot ${CHROOTDIR} cp -p ${BBB_UBOOT_DIR}/MLO ${FATMOUNT}/MLO - chroot ${CHROOTDIR} cp -p ${BBB_UBOOT_DIR}/u-boot.img ${FATMOUNT}/u-boot.img - sync - umount_loop ${CHROOTDIR}/${FATMOUNT} - chroot ${CHROOTDIR} rmdir ${FATMOUNT} - - return 0 -} - arm_install_uboot() { - arm_install_uboot_bbb arm_install_uboot_rpi2 } From nobody Mon May 1 06:33:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8th74S3kz47t6Y; Mon, 1 May 2023 06:33:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8th7437qz3tYr; Mon, 1 May 2023 06:33:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682922807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fq4Tcesdcj4Vp+jEwmY92OBq9sGlVSbpjkEhfLQemIA=; b=Wdgg0qMPvW2kPqVuxyEEOvBBtMBeGN8MoYtPuMnpwo1oTtF1oIWWtdHn5S0HcrIllJrKpV umeX7ZU0oAA+nK3FErI+oFdzKJVf78VL9s7/a4h5e7yheUSjc05YF5Az2gbFMiYG+V3qE7 a+DVtR83b1u5vADC272TuLXI4cVXJONHR8H3gSsUJG4GnMN4ZHG6ydbOcIsAdgcO8QBwz8 5Iwi15NYs3ig82GI9OC8DfWZc6glJy619JvYfziOemRkS2KBbEcUEOBj4CjnA4fg0JjU5J +WiR1PlYybpUYN0/0Vh/CLdR7JoCDTKSPRMHQSji13y8QFiGr6zMeIBaRdvElA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682922807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fq4Tcesdcj4Vp+jEwmY92OBq9sGlVSbpjkEhfLQemIA=; b=PbbnWn3SBF59x2+MBRa6bZdzU5txOTzBLKe3RNcV3Gu2wjU/NBWhgY9bSsErj1T5Ku+rYG VQUcenbOXuenXpvkgVSL0Qbu+KyZfRD0hNu4DaQmF9MCNWvW1S/7+jGyAHSgwnXf84s3uk CUsBdw9fnJ5dNqtqwCb4rfepPEpKxfm+Vl1vmnKoXPtGFk14Y2J0f77HzSY21t+oOxl/vt NI4OWZlRiINp8axXU4WrNhjAuJFT1jxB1SckpW+AfgIBTZt6GShaVm5XJLTndB5MWzqM4L 3HBD6DAs8iWzdEjyw+aSANuZUXWMpKTLFh2oHJTj1fyljoiWRpQrMmuuD38o8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682922807; a=rsa-sha256; cv=none; b=DwoZdbz8M+wOlZTLmpJtGzMS6TDr91413yfpsFPn1SdTFqeO4cygNnJ+LiKZfXCFT8FI5l l6dF1DhOa7OGf9EGOm7WOVCAhwXYNCA/FvB15NssDp8/s5RfuIltmgDdhHI8JkN4cHpTCC 5gMlGLGrJbBGvdEgJWCloOVnsZCQdC6w+icCe02WZnw+SjKXdk6c7l8K9nZaev+NzHjZJX sMbcDwOepAVj8I9aKahKr5xeD685Tjv04n5G3jJcaljOYtkKCMO1NvNAIsl74rc0xCO0j7 x6UAlVCr9Rqs/x2HU5RpKk6nfhrYg7ZWdPanWmhD5DYHLpgtYvi0jCeMfBP2HQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8th735pwzvn3; Mon, 1 May 2023 06:33:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3416XReB013078; Mon, 1 May 2023 06:33:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3416XRFq013077; Mon, 1 May 2023 06:33:27 GMT (envelope-from git) Date: Mon, 1 May 2023 06:33:27 GMT Message-Id: <202305010633.3416XRFq013077@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: d198b8774d2c - main - fwget: Introduce new utility List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d198b8774d2cfb6f140893e1c6236af9e97d1497 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=d198b8774d2cfb6f140893e1c6236af9e97d1497 commit d198b8774d2cfb6f140893e1c6236af9e97d1497 Author: Emmanuel Vadot AuthorDate: 2023-04-26 05:46:20 +0000 Commit: Emmanuel Vadot CommitDate: 2023-05-01 06:32:59 +0000 fwget: Introduce new utility This script's goal is to check the system for peripherals that needs firmware and install the needed packages for them. For now it only support pci subsystem and only video classes for AMD and Intel GPUs. Reviewed by: bapt Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D39825 --- etc/mtree/BSD.usr.dist | 2 + release/packages/Makefile.package | 2 + usr.sbin/Makefile | 1 + usr.sbin/fwget/Makefile | 7 ++ usr.sbin/fwget/fwget.8 | 64 +++++++++++++++++ usr.sbin/fwget/fwget.sh | 110 +++++++++++++++++++++++++++++ usr.sbin/fwget/pci/Makefile | 11 +++ usr.sbin/fwget/pci/pci | 84 ++++++++++++++++++++++ usr.sbin/fwget/pci/pci_video_amd | 139 +++++++++++++++++++++++++++++++++++++ usr.sbin/fwget/pci/pci_video_intel | 78 +++++++++++++++++++++ 10 files changed, 498 insertions(+) diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index 2e7c999124fd..9a6ede64fa73 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -152,6 +152,8 @@ .. dwatch .. + fwget + .. hyperv .. lpr diff --git a/release/packages/Makefile.package b/release/packages/Makefile.package index 47e0ee1c224b..9bd2994c882a 100644 --- a/release/packages/Makefile.package +++ b/release/packages/Makefile.package @@ -64,6 +64,8 @@ ftp_COMMENT= FTP Utilities ftp_DESC= FTP Utilities ftpd_COMMENT= FTP Daemon ftpd_DESC= FTP Daemon +fwget_COMMENT= FWGET Utility +fwget_DESC= FWGET Utility games_COMMENT= Games games_DESC= Games gdb_COMMENT= GDB Utilities diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index fb707e515eaa..76e3a29bbfc9 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -28,6 +28,7 @@ SUBDIR= adduser \ fifolog \ fstyp \ fwcontrol \ + fwget \ getfmac \ getpmac \ gstat \ diff --git a/usr.sbin/fwget/Makefile b/usr.sbin/fwget/Makefile new file mode 100644 index 000000000000..1cdf0f18230d --- /dev/null +++ b/usr.sbin/fwget/Makefile @@ -0,0 +1,7 @@ +PACKAGE= fwget + +SCRIPTS= fwget +MAN= fwget.8 +SUBDIR= pci + +.include diff --git a/usr.sbin/fwget/fwget.8 b/usr.sbin/fwget/fwget.8 new file mode 100644 index 000000000000..71cee817b7e6 --- /dev/null +++ b/usr.sbin/fwget/fwget.8 @@ -0,0 +1,64 @@ +.\" Copyright (c) 2023 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 DEVELOPERS ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd Apr 26, 2023 +.Dt FWGET 8 +.Os +.Sh NAME +.Nm fwget +.Nd Install firmwares for the running system +.Sh SYNOPSIS +.Nm +.Op Fl v +.Op Fl n +.Ar subsystem +.Sh DESCRIPTION +The +.Nm +utility can be used to install firmwares packaged needed for the running +system +.Pp +If not specified the +.Ar subsystem +argument will default to pci cards. +.Pp +The options are as follows: +.Bl -tag -width +.It Fl n +Dry run, only show needed packages +.It Fl v +Be more verbose +.El +.Sh SEE ALSO +.Xr firmware 9 +.Sh HISTORY +The +.Nm +utility appeared in +.Fx 14.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +utility and this manual page were written by +.An Emmanuel Vadot Aq Mt manu@FreeBSD.org +for Beckhoff Automation GmbH & Co. KG . diff --git a/usr.sbin/fwget/fwget.sh b/usr.sbin/fwget/fwget.sh new file mode 100644 index 000000000000..cd5ee7a7048c --- /dev/null +++ b/usr.sbin/fwget/fwget.sh @@ -0,0 +1,110 @@ +#!/bin/sh + +#- +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright 2023 Beckhoff Automation GmbH & Co. KG +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted providing that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +: ${LIBEXEC_PATH:="/usr/libexec/fwget"} + +usage() +{ + cat <&1 4>&2 +} + +log() +{ + echo $@ 1>&3 +} + +log_verbose() +{ + if [ "${VERBOSE}" = "n" ]; then + return + fi + + echo $@ 1>&3 +} + +DRY_RUN=n +VERBOSE=n + +log_start + +while [ $# -gt 0 ]; do + case $1 in + -n) + DRY_RUN=y + ;; + -v) + VERBOSE=y + ;; + *) + subsystems="${subsystems} $1" + ;; + esac + shift +done + +# Default searching PCI subsystem +if [ -z "${subsystems}" ]; then + subsystems="pci" +fi + +# Fail early on unsupported subsystem +for subsystem in ${subsystems}; do + if [ ! -f ${LIBEXEC_PATH}/${subsystem} ]; then + usage + fi + . ${LIBEXEC_PATH}/${subsystem} +done + +packages="" +for subsystem in ${subsystems}; do + package=$(${subsystem}_search_packages) + + packages="${packages} ${package}" +done + +echo "Needed packages: ${packages}" +if [ "${DRY_RUN}" = "y" ]; then + exit 0 +fi + +pkg install -q ${package} diff --git a/usr.sbin/fwget/pci/Makefile b/usr.sbin/fwget/pci/Makefile new file mode 100644 index 000000000000..5cf3b0cd2ed9 --- /dev/null +++ b/usr.sbin/fwget/pci/Makefile @@ -0,0 +1,11 @@ +PACKAGE= fwget + +SCRIPTS=pci \ + pci_video_amd \ + pci_video_intel + +BINDIR= ${LIBEXECDIR}/fwget + +MAN= + +.include diff --git a/usr.sbin/fwget/pci/pci b/usr.sbin/fwget/pci/pci new file mode 100644 index 000000000000..f97cb97d16fe --- /dev/null +++ b/usr.sbin/fwget/pci/pci @@ -0,0 +1,84 @@ +#- +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright 2023 Beckhoff Automation GmbH & Co. KG +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted providing that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +pci_get_class() +{ + local hexclass=$(echo $1 | sed 's/.*class=\(0x[0-9a-z]*\).*/\1/') + case "${hexclass}" in + 0x030000) + echo "video" + ;; + esac +} + +pci_get_vendor() +{ + local hexvendor=$(echo $1 | sed 's/.*\ vendor=\(0x[0-9a-z]*\).*/\1/') + + case "${hexvendor}" in + 0x8086) + echo "intel" + ;; + 0x1002) + echo "amd" + ;; + esac +} + +pci_get_device() +{ + local hexdevice=$(echo $1 | sed 's/.*\ device=\(0x[0-9a-z]*\).*/\1/') + + echo ${hexdevice} +} + +pci_search_packages() +{ + local IFS + + oldifs=$IFS + IFS=$'\n' + for fulldevice in $(pciconf -l); do + class=$(pci_get_class "${fulldevice}") + if [ -z "${class}" ]; then + continue + fi + vendor=$(pci_get_vendor "${fulldevice}") + if [ -z "${vendor}" ]; then + continue + fi + device=$(pci_get_device "${fulldevice}") + + log_verbose "Trying to match device ${device} in class ${class} and vendor ${vendor} with pci_${class}_${vendor}" 1>&3 + if [ ! -f ${LIBEXEC_PATH}/pci_${class}_${vendor} ]; then + continue + fi + . ${LIBEXEC_PATH}/pci_${class}_${vendor} + + pci_${class}_${vendor} ${device} + done + IFS=${oldifs} +} diff --git a/usr.sbin/fwget/pci/pci_video_amd b/usr.sbin/fwget/pci/pci_video_amd new file mode 100644 index 000000000000..79f79d4958db --- /dev/null +++ b/usr.sbin/fwget/pci/pci_video_amd @@ -0,0 +1,139 @@ +#- +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright 2023 Beckhoff Automation GmbH & Co. KG +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted providing that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +pci_video_amd() +{ + case "$1" in + 0x678*|0x679*) + echo "gpu-firmware-amd-kmod-tahiti" + ;; + 0x680*|0x681*) + echo "gpu-firmware-amd-kmod-pitcairn" + ;; + 0x660*|0x661*|0x662*|0x663*) + echo "gpu-firmware-amd-kmod-oland" + ;; + 0x682*|0x683*) + echo "gpu-firmware-amd-kmod-verde gpu-firmware-amd-kmod-si58" + ;; + 0x666*) + echo "gpu-firmware-amd-kmod-hainan" + ;; + 0x13*) + echo "gpu-firmware-amd-kmod-kaveri" + ;; + 0x664*|0x664*) + echo "gpu-firmware-amd-kmod-bonaire" + ;; + 0x67a*|0x67b*) + echo "gpu-firmware-amd-kmod-hawaii" + ;; + 0x983*) + echo "gpu-firmware-amd-kmod-kabini" + ;; + 0x985*) + echo "gpu-firmware-amd-kmod-mullins" + ;; + 0x690*) + echo "gpu-firmware-amd-kmod-topaz" + ;; + 0x692*|0x693*) + echo "gpu-firmware-amd-kmod-tonga" + ;; + 0x730*) + echo "gpu-firmware-amd-kmod-fiji" + ;; + 0x987*) + echo "gpu-firmware-amd-kmod-carrizo" + ;; + 0x98e4*) + echo "gpu-firmware-amd-kmod-stoney" + ;; + 0x67e*|0x67ff) + echo "gpu-firmware-amd-kmod-polaris11" + ;; + 0x67c*|0x67d*|0x6fdf) + echo "gpu-firmware-amd-kmod-polaris10" + ;; + 0x698*|0x699*) + echo "gpu-firmware-amd-kmod-polaris12" + ;; + 0x694*) + echo "gpu-firmware-amd-kmod-vegam" + ;; + 0x686*|0x687*) + echo "gpu-firmware-amd-kmod-vega10" + ;; + 0x69a*) + echo "gpu-firmware-amd-kmod-vega12" + ;; + 0x66a*) + echo "gpu-firmware-amd-kmod-vega20" + ;; + 0x15d*) + echo "gpu-firmware-amd-kmod-raven" + ;; + 0x738*|0x739*) + echo "gpu-firmware-amd-kmod-arcturus" + ;; + 0x731*) + echo "gpu-firmware-amd-kmod-navi10" + ;; + 0x734*) + echo "gpu-firmware-amd-kmod-navi14" + ;; + 0x15e7|0x1636|0x1638|0x164c) + echo "gpu-firmware-amd-kmod-renoir" + ;; + 0x736*) + echo "gpu-firmware-amd-kmod-navi12" + ;; + 0x73a*|0x73b*) + echo "gpu-firmware-amd-kmod-sienna-cichlid" + ;; + 0x163f) + echo "gpu-firmware-amd-kmod-vangogh" + ;; + 0x164d|0x1681) + echo "gpu-firmware-amd-kmod-yellow-carp" + ;; + 0x73c*|0x73d*) + echo "gpu-firmware-amd-kmod-navy-flounder" + ;; + 0x73e*|0x73f*) + echo "gpu-firmware-amd-kmod-dimgrey-cavefish" + ;; + 0x740*|0x741*) + echo "gpu-firmware-amd-kmod-aldebaran" + ;; + 0x13fe) + echo "gpu-firmware-amd-kmod-cyan-skillfish2" + ;; + 0x742*|0x743*) + echo "gpu-firmware-amd-kmod-beige-goby" + ;; + esac +} diff --git a/usr.sbin/fwget/pci/pci_video_intel b/usr.sbin/fwget/pci/pci_video_intel new file mode 100644 index 000000000000..9a20abcdb17a --- /dev/null +++ b/usr.sbin/fwget/pci/pci_video_intel @@ -0,0 +1,78 @@ +#- +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright 2023 Beckhoff Automation GmbH & Co. KG +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted providing that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +pci_video_intel() +{ + case "$1" in + # Skylake + 0x19*) + echo "gpu-firmware-intel-kmod-skylake" + ;; + # Broxton + 0x0a*|0x1a*|0x5a84|0x5a85) + echo "gpu-firmware-intel-kmod-broxton" + ;; + # Geminilake + 0x318*) + echo "gpu-firmware-intel-kmod-geminilake" + ;; + # Kabylake, Coffeelake and Cometlake + 0x59*|0x87*|0x9b*|0x3e*) + echo "gpu-firmware-intel-kmod-kabylake" + ;; + # Cannonlake + 0x5a*) + echo "gpu-firmware-intel-cannonlake" + ;; + # Icelake + 0x8a*) + echo "gpu-firmware-intel-icelake" + ;; + # Elkhartlake/Jasperlake + 0x45*|0x4e*) + echo "gpu-firmware-intel-elkhartlake" + ;; + # Tigerlake + 0x9a*) + echo "gpu-firmware-intel-tigerlake" + ;; + # Rocketlake (Uses tigerlake GuC/HuC firmware) + 0x4c*) + echo "gpu-firmware-intel-rocketlake gpu-firmware-intel-tigerlake" + ;; + # DG1 + 0x49*) + echo "gpu-firmware-intel-dg1" + ;; + # Alderlake (Uses tigerlake GuC/HuC firmware) + 0x46*) + echo "gpu-firmware-intel-alderlake gpu-firmware-intel-tigerlake" + ;; + *) + log "No package found for device $1" + ;; + esac +} From nobody Mon May 1 06:46:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8typ0wrbz47tYy; Mon, 1 May 2023 06:46: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 4Q8typ0RcCz3vdX; Mon, 1 May 2023 06:46:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682923570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SWhI47WsPtrT0zYWaHdFvncOuC+PmrhS6Jp/QSxt8es=; b=RplPHTWVCNxmjE3dag1mJgIotJZ0nbVjQ1D7sFauTmRFMenpkyrC1yo3flltZhbogXKXtV z/LemnENbXJ3sngVkAHVeX9bYkOWZJtr6MvTPzYCJHfaTii4OIt9N256d7uP8wXakTtBJw HGja9EZvTKXbAURKbIBZBNqiTTxMJrRjJQMu4uns1WXaIuD4NX9kxJpGdBcgstrkMZC6Eb ziVbIphqveKbvtCezTG97kCCgPM1cKxCOh6+q/I2cKpXia5jKwxIo5/tbAakyoqjI9u2dz SvdPpeXJJxUaSOK8hmmEOxn8Q7dccoxX/FIAXFCCT7pASStA2Di8oNEMiUPyjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682923570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SWhI47WsPtrT0zYWaHdFvncOuC+PmrhS6Jp/QSxt8es=; b=GgxO7sCoeXVjQGgEXHfWLxjXhKBCyeEOVUKIpjXVYHvTGJClLGEBVfNhBfnhLYGAxCXDpO PJ8d4yN2lNX0CTDyOglcTi2yjuWQejrUGq3CqOc5sS4MWyj3CNTmJn3sYMOkuXbfwORy80 Aday14gLRbZ72w8LQZBRtbVnjr2tQMfpXEjaUPd5bIOlOlejedQfd/z1Wx7Nzq9vxxIggI GMlguthfmQDl5pTcckEZMgVZ6zHoyIc2Woq8kpjwpKPIRdUEl8A9KmJdItCOX4jwv+Owbg 7F0qABz7GM3MqsD1XYdG0CzfjktGJwEvX/mBPW3FgbZcSYYUILrw6psopcArCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682923570; a=rsa-sha256; cv=none; b=wUAaXLpwRZS9wvO+S2SMaNajrJnLEFBX3Y5blQUqlK95kz6FUV35i0qndeQncQR1yMYdHD YvK48m8PwmscoA3jms/ynbvQEPZsuKp4SiwTGZRVsrybvAhtPoLky3M7wBS50DV5nskFIO g0stnhjAh8SgLlS9fBrUoCnpS0NhPrnB/qWfkJz8q5bX5AQLfJvUy8x2HnJp32Atg5lIPV rY+qQW7LCNiY/ZCcJ7/IweNXwZS96oFWafQKwew/RSOTqSbVWH5Yb8P/9Z9aWlw2uq6NvY SbYXfLjz88HCKrwSw/ekvnWzkFf5TjlCE/f1tzvzjXerbQ+lV/ILsdZQB4mcdg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8tyn6W9hzvMq; Mon, 1 May 2023 06:46:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3416k94l030215; Mon, 1 May 2023 06:46:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3416k9Lu030214; Mon, 1 May 2023 06:46:09 GMT (envelope-from git) Date: Mon, 1 May 2023 06:46:09 GMT Message-Id: <202305010646.3416k9Lu030214@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 16004e477d38 - stable/13 - lookup(): ensure that openat("/", "..", O_RESOLVE_BENEATH) fails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 16004e477d387d6a075597ec76f0dc82d02b60db Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=16004e477d387d6a075597ec76f0dc82d02b60db commit 16004e477d387d6a075597ec76f0dc82d02b60db Author: Konstantin Belousov AuthorDate: 2023-04-23 23:21:42 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-01 06:45:28 +0000 lookup(): ensure that openat("/", "..", O_RESOLVE_BENEATH) fails PR: 269780 (cherry picked from commit a718431c30a57226bc7c1a9181fc84bab00641a1) --- sys/kern/vfs_lookup.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index b7ce93f3702d..7eca6eddd484 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -1014,12 +1014,16 @@ dirloop: pr = pr->pr_parent) if (dp == pr->pr_root) break; - if (dp == ndp->ni_rootdir || - dp == ndp->ni_topdir || - dp == rootvnode || - pr != NULL || - ((dp->v_vflag & VV_ROOT) != 0 && - (cnp->cn_flags & NOCROSSMOUNT) != 0)) { + bool isroot = dp == ndp->ni_rootdir || + dp == ndp->ni_topdir || dp == rootvnode || + pr != NULL; + if (isroot && (ndp->ni_lcf & + NI_LCF_STRICTRELATIVE) != 0) { + error = ENOTCAPABLE; + goto capdotdot; + } + if (isroot || ((dp->v_vflag & VV_ROOT) != 0 && + (cnp->cn_flags & NOCROSSMOUNT) != 0)) { ndp->ni_dvp = dp; ndp->ni_vp = dp; VREF(dp); @@ -1040,6 +1044,7 @@ dirloop: LK_RETRY, ISDOTDOT)); error = nameicap_check_dotdot(ndp, dp); if (error != 0) { +capdotdot: #ifdef KTRACE if (KTRPOINT(curthread, KTR_CAPFAIL)) ktrcapfail(CAPFAIL_LOOKUP, NULL, NULL); From nobody Mon May 1 06:46:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8tyq1gfvz47tqp; Mon, 1 May 2023 06:46: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 4Q8tyq182Vz3vp2; Mon, 1 May 2023 06:46:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682923571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LlHJ92wtrIgbNk8Vw5pNuSe2iJZ83+3x+gyaMm1WezM=; b=DZi3GHULsPjezON1JAKhqRfnv3q3bZ5qk8cljSfibPhl7pKBPdhIijPtQn343qyGDclUOe i/vx06VrEHBoF9F3WDDeJ4+TOZ4LtXpfFwnpLLdJC7Z59FKIo8kKzPO7amzx2k8WarJwHm iidHeY7z5g3/j+t6mEO4rzXe85FM1HA5eynSrr1kewaxWGhyrLLK5brpWNSaNi7/WGxhQl 0V69wAGsVh2Z8n8EPxfXFr5BnVu/Q9HGaeKsK8j+jhn1d4VBtdpbszaHnstC3qsyQQ81I+ XXj8FHk0yxQatqfsJv/5pm7Vimxduq5TGP4AOhLPnVluyBzdu9MdZbBwyVyOnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682923571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LlHJ92wtrIgbNk8Vw5pNuSe2iJZ83+3x+gyaMm1WezM=; b=tttcXZzEcAMLM+JsSDvTrVzQkSMmobQ+b8u8ww3uCDNiZ5+7bD5BgnWRCG7xkG0WcUbRTJ ZiFAmBQMtHpMN3wE2W8mtdAoqBksz6X+ouTupNTKSax+9Gllm8PyRzqzXQxv3Fo0kARAWF sYi/DBN/qPZ80/irIQGhuYNEBOc4xWABU6UgBPm4EVMmmFzj8bVXuSRaABi0c/z5nmccxK JvnTKGzLJ+b7flzF/qEaldWON09gzBrN/QCYHzUnR7B0XsmRVZM0gf74IXF97Jj3VtVTdn HT+DrXVN/FNu98/aY7B2u1npgVILG8l0/rLAWSHgP+6yj+bEMFBxw94s0slajg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682923571; a=rsa-sha256; cv=none; b=DMZOe7wzhpKIS5eIqauBxVwHRBXa655foAr8kANcf2nUk/VXNkwG5zUrO70ETLn6qoER9j AiETZLOy2YbSsECj0UQogo5quMjaxyGkYYs2ga1tx9WaM4ZRhzfRROm8/U+j8e92jVb87I Yfc3tuO9P0oOrTQoHCTv72a6A+fiRxrqj2qwC5GmK2xtMQQOn9f+fcWzRyXaAm9h2d6eD9 M/h1X7eSPpCfHeQ8tU3y7+hD1AFJjUDjReZls4ROh3orOPIi0cxz6RfQRw1FAmsbrLjdd7 S2ekYS7Oe2q0gJgLvu0Zouanr89aLBskZPd1n0WGE/KDfH0c290IXwDgBEvWgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8tyq01mmzvqs; Mon, 1 May 2023 06:46:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3416kAT1030240; Mon, 1 May 2023 06:46:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3416kAY2030239; Mon, 1 May 2023 06:46:10 GMT (envelope-from git) Date: Mon, 1 May 2023 06:46:10 GMT Message-Id: <202305010646.3416kAY2030239@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 3f5894cec67c - stable/13 - vn_open_vnode(): fix locking around VOP_CLOSE() on advisory lock error List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3f5894cec67cd437bce5b8941ebfb4095d98e01c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3f5894cec67cd437bce5b8941ebfb4095d98e01c commit 3f5894cec67cd437bce5b8941ebfb4095d98e01c Author: Olivier Certner AuthorDate: 2023-04-24 09:36:09 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-01 06:45:29 +0000 vn_open_vnode(): fix locking around VOP_CLOSE() on advisory lock error (cherry picked from commit 6a5e61401502288ec10629beb28be048c1cce34a) --- sys/kern/vfs_vnops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 566b781098ad..215c9d1cc0cc 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -478,8 +478,8 @@ vn_open_vnode(struct vnode *vp, int fmode, struct ucred *cred, * If there is no fp, due to kernel-mode open, * we can call VOP_CLOSE() now. */ - if (vp->v_type != VFIFO && (fmode & FWRITE) != 0 && - !MNT_EXTENDED_SHARED(vp->v_mount) && + if ((vp->v_type == VFIFO || (fmode & FWRITE) != 0 || + !MNT_EXTENDED_SHARED(vp->v_mount)) && VOP_ISLOCKED(vp) != LK_EXCLUSIVE) vn_lock(vp, LK_UPGRADE | LK_RETRY); (void)VOP_CLOSE(vp, fmode & (FREAD | FWRITE | FEXEC), From nobody Mon May 1 08:10:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8wr32Tfwz48DPW; Mon, 1 May 2023 08:10:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q8wr32Bknz455p; Mon, 1 May 2023 08:10:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682928627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QjAg+FwGgRxALzJ9eDpNLvHgF+uAWB0A119a10DXzBo=; b=ePKLd+EObcm4dPIVEyO8O8ztiDNvpksf21hSIon+QojTo2P+t6moLXqgkQBX0be8UhrcuG hlEGnJQ+K6RfHgZjdQ9ruDqHFYqxxYCmmDq5vHZ+vfOZWbORviAvdbKDMp85UfiH0K28Md b8eCGv/GxiGuxBfb2lZiAxBsg6ReRmt+bu6MINNtfx4bRbtOLuAq4X0OGpIIqL+Tf2xd3J 7otZ3rFd+pVKXwrp97cfooYuD0auCE7fQZRyuhG2ibfn+L+Dqb9x4KtsyPteBLrgtQRe/w fCXr+nIQE9pgeY/Fz0+TThG+JLJi7EwpwJ3k4QBcxXvmwPOY3SyZ88Fncbag2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682928627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QjAg+FwGgRxALzJ9eDpNLvHgF+uAWB0A119a10DXzBo=; b=wV0UUHi07nsqgGpsgX08vv69kti+MK9JYq2VOkbMzimSrBZLLGlahSD41sn+Il90/EcQXB 5/XqpLmdX1KQMh/tANrqbiNvnmHOxHXwtBLADfhj4uGuFhYUKyxYgahDC3MXyr4G+lvhyH aj0DRWOZNyV5vzlPhS1yikU9em2phqR30Oz8/yrlTMXMsHPc0VyJCdjv43X4yusZ+NwXXB p3jh9+6zGMsU7PpjjfnrPMwiPQtzqVQ0Gop7PZF12BaOkxqrx3bBIO1wJ8i0v5d2hOxN1c OdCwDXAtgwxhiFU4blkZIoKUXw+0x9R/0b7hVogHOvew7vA1N9xQyaNX9ENh9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682928627; a=rsa-sha256; cv=none; b=WUI+y3Cl3/LPZs9N4Dtdq+0RxT1+oEMbEnv6ET1G6qqcNE2NYINIZFtr++k9DZwleUWj8/ gBmPee9lxZr2HKTENhN2Mgtw6W7OQikylUI0CSAhu7Rhc5AcBDDEFPQE8h4L+h5euM3Bzg b7zucoQRXp3H6rZ7pM0UPkuRzNgj9TA53ePV0+ixGJycL2pU+UdrzjDokxBvXgFR4UHdRh 254O5MZ3X7wg+SfOdgcaadXS9V8NOftle0KqnNafc6MlS1brhYjuaifBgRCFJI8JPBN4Gr OMy4tsd3D2hDTg5cUYFK2hZKHByWfQyVcCArLwvZZstLs20vAIDcjpLGo+QJ2A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8wr31J6vzxj1; Mon, 1 May 2023 08:10:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3418ARvq071778; Mon, 1 May 2023 08:10:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3418ARVa071777; Mon, 1 May 2023 08:10:27 GMT (envelope-from git) Date: Mon, 1 May 2023 08:10:27 GMT Message-Id: <202305010810.3418ARVa071777@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Stefan=20E=C3=9Fer?= Subject: git: d767bf361b3e - stable/13 - msdosfs: fix debug print format and parameter List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d767bf361b3ebdb3955473cd378f8a8dcf9c85f0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=d767bf361b3ebdb3955473cd378f8a8dcf9c85f0 commit d767bf361b3ebdb3955473cd378f8a8dcf9c85f0 Author: Stefan Eßer AuthorDate: 2023-03-08 16:58:00 +0000 Commit: Stefan Eßer CommitDate: 2023-05-01 08:09:33 +0000 msdosfs: fix debug print format and parameter Building with -DMSDOSFS_DEBUG failed due to a format mismatch and a variable that has been renamed but not updated in the printf() parameter list. (cherry picked from commit 2d8cf575d5778781928699f9b7cfb448bd2f1f8e) fs/msdosfs: add tracking of free root directory entries This update implements tallying of free directory entries during create, delete, or rename operations on FAT12 and FAT16 file systems. Prior to this change, the total number of root directory entries was reported as number of inodes, but 0 as the number of free inodes, causing system health monitoring software to warn about a suspected disk full issue. The FAT12 and FAT16 file systems provide a limited number of root directory entries, e.g. 512 on typical hard disk formats. The valid range of values is 1 to 65535, but the msdosfs code will effectively round up "odd" values to the next multiple of 16 (e.g. 513 would allow for 528 root directory entries). This update implements tracking of directory entries during create, delete, or rename operations, with initial values determined by scanning the directory when the file system is mounted. Total and free directory entries are reported in the f_files and f_ffree elements of struct statfs, despite differences in semantics of these values: - There is no limit on the number of files and directories that can be created on a FAT file system. Only the root directory of FAT12 and FAT16 file systems is limited, any number of files can still be created in sub-directories, even when 0 free "inodes" are reported. - A single file can require 1 to 21 directory entries, depending on the character set, structure, and length of the name. The DOS 8.3 style file name takes up 1 entry, and if the name does not comply with the syntax of a DOS 8.3 file name, 1 additional entry is used for each 13 characters of the file name. Since all these entries have to be contiguous, it is possible that a file or directory with a long name can not be created, despite a sufficient total number of free directory entries. - Renaming a file can require more directory entries than currently allocated to store its long name, which may prevent an in-place update of the name if more entries are needed. This may cause a rename operation to fail if no contiguous range of free entries for the new name can be found. - The volume label is stored in a directory entry. An empty FAT file system with a volume label will therefore show 1 used "inode" in df. - The perceentage of free inodes shown in df or monitoring tools does only represent the state of the root directory of a FAT12 or FAT16 file system. Neither does a reported value of 0% free inodes does prevent files from being created in sub-directories, nor does a value of 50% free inodes guarantee that even a single file with a "long" name can be created in the root directory (if every other directory entry is occupied and there are no 2 contiguous entries). The statfs(2) and df(1) man pages have been updated with a notice regarding the possibly different semantics of values reported as total and free inodes for non-Unix file systems. PR: 270053 Reported by: Ben Woods Approved by: mckusick Differential Revision: https://reviews.freebsd.org/D38987 (cherry picked from commit c33db74b5323480fba7adef58e8aa88f6091d134) fs/msdosfs: Fix potential panic and size calculations Some combinations of FAT12 file system parameters could cause a kernel panic due to an unmapped access if the size of the FAT was larger than the CPU page size. The reason is that FAT12 uses 3 bytes to store 2 FAT pointers, leading to partial FAT pointers at the end of buffers of a size that is not a multiple of 3. With a typical page size of 4 KB, this caused the FAT entry at byte offsets 4095 and 4096 to cross the page boundary, with only the first page mapped. This was fixed by adjusting the mapping to always cover both bytes of each FAT entry. Testing revealed 2 other inconsistencies that are fixed by this commit: 1) The calculation of the size of the data area did not take into account the fact that the first two data block numbers are reserved and that the data area starts with block 2. This could cause a FAT12 file system created with the maximum supported number of blocks to be incorrectly identified as FAT16. 2) The root directory does not take up space in the data area of a FAT12 or FAT16 file system, since it is placed into a reserved area outside of that data area. This commits makes stat() report the logical size of the root directory, but with 0 blocks allocated from the data area. PR: 270587 Reviewed by: mckusick Differential Revision: https://reviews.freebsd.org/D39386 (cherry picked from commit 0728695c63efda298feccefb3615c23cb6682929) --- bin/df/df.1 | 13 ++++- lib/libc/sys/statfs.2 | 18 +++++- sys/fs/msdosfs/msdosfs_denode.c | 2 +- sys/fs/msdosfs/msdosfs_fat.c | 12 +++- sys/fs/msdosfs/msdosfs_lookup.c | 5 +- sys/fs/msdosfs/msdosfs_vfsops.c | 120 +++++++++++++++++++++++++++++++++++++--- sys/fs/msdosfs/msdosfs_vnops.c | 7 ++- sys/fs/msdosfs/msdosfsmount.h | 17 ++++++ 8 files changed, 177 insertions(+), 17 deletions(-) diff --git a/bin/df/df.1 b/bin/df/df.1 index 64e471fedc42..aa35318c2c65 100644 --- a/bin/df/df.1 +++ b/bin/df/df.1 @@ -29,7 +29,7 @@ .\" @(#)df.1 8.3 (Berkeley) 5/8/95 .\" $FreeBSD$ .\" -.Dd March 11, 2022 +.Dd March 29, 2023 .Dt DF 1 .Os .Sh NAME @@ -246,6 +246,17 @@ $ df -h /dev/ada1p2 Filesystem Size Used Avail Capacity Mounted on /dev/ada1p2 213G 152G 44G 78% / .Ed +.Sh NOTES +For non-Unix file systems, the reported values of used and free inodes +may have a different meaning than that of used and available files and +directories. +An example is msdosfs, which in the case of FAT12 or FAT16 file systems +reports the number of available and free root directory entries instead +of inodes +.Po +where 1 to 21 such directory entries are required to store +each file or directory name or disk label +.Pc . .Sh SEE ALSO .Xr lsvfs 1 , .Xr quota 1 , diff --git a/lib/libc/sys/statfs.2 b/lib/libc/sys/statfs.2 index a865652022bd..4df0e801e418 100644 --- a/lib/libc/sys/statfs.2 +++ b/lib/libc/sys/statfs.2 @@ -28,7 +28,7 @@ .\" @(#)statfs.2 8.5 (Berkeley) 5/24/95 .\" $FreeBSD$ .\" -.Dd March 30, 2020 +.Dd March 29, 2023 .Dt STATFS 2 .Os .Sh NAME @@ -230,6 +230,22 @@ error occurred while reading from or writing to the file system. .It Bq Er EINTEGRITY Corrupted data was detected while reading from the file system. .El +.Sh NOTES +The fields in the +.Vt statfs +structure have been defined to provide the parameters relevant for +traditional +.Tm UNIX +file systems. +For some other file systems, values that have similar, but not +identical, semantics to those described above may be returned. +An example is msdosfs, which in case of FAT12 or FAT13 file systems +reports the number of available and of free root directory entries +instead of inodes +.Po +where 1 to 21 such directory entries are required to store +each file or directory name or disk label +.Pc . .Sh SEE ALSO .Xr fhstatfs 2 , .Xr getfsstat 2 diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denode.c index 51c2e3beaf39..59107a6ca2ea 100644 --- a/sys/fs/msdosfs/msdosfs_denode.c +++ b/sys/fs/msdosfs/msdosfs_denode.c @@ -110,7 +110,7 @@ deget(struct msdosfsmount *pmp, u_long dirclust, u_long diroffset, #ifdef MSDOSFS_DEBUG printf("deget(pmp %p, dirclust %lu, diroffset %lx, flags %#x, " "depp %p)\n", - pmp, dirclust, diroffset, flags, depp); + pmp, dirclust, diroffset, lkflags, depp); #endif MPASS((lkflags & LK_TYPE_MASK) == LK_EXCLUSIVE); diff --git a/sys/fs/msdosfs/msdosfs_fat.c b/sys/fs/msdosfs/msdosfs_fat.c index e6d9b671e7d7..2d50d30f33b3 100644 --- a/sys/fs/msdosfs/msdosfs_fat.c +++ b/sys/fs/msdosfs/msdosfs_fat.c @@ -89,11 +89,17 @@ static void fatblock(struct msdosfsmount *pmp, u_long ofs, u_long *bnp, u_long *sizep, u_long *bop) { - u_long bn, size; + u_long bn, size, fatblocksec; + fatblocksec = pmp->pm_fatblocksec; + if (FAT12(pmp) && fatblocksec % 3 != 0) { + fatblocksec *= 3; + if (fatblocksec % 6 == 0) + fatblocksec /= 2; + } bn = ofs / pmp->pm_fatblocksize * pmp->pm_fatblocksec; - size = min(pmp->pm_fatblocksec, pmp->pm_FATsecs - bn) - * DEV_BSIZE; + size = roundup(min(fatblocksec, pmp->pm_FATsecs - bn) * DEV_BSIZE, + pmp->pm_BlkPerSec * DEV_BSIZE); bn += pmp->pm_fatblk + pmp->pm_curfat * pmp->pm_FATsecs; if (bnp) diff --git a/sys/fs/msdosfs/msdosfs_lookup.c b/sys/fs/msdosfs/msdosfs_lookup.c index 291f923d79fe..9d98bae86596 100644 --- a/sys/fs/msdosfs/msdosfs_lookup.c +++ b/sys/fs/msdosfs/msdosfs_lookup.c @@ -335,7 +335,7 @@ msdosfs_lookup_ino(struct vnode *vdp, struct vnode **vpp, struct componentname continue; } #ifdef MSDOSFS_DEBUG - printf("msdosfs_lookup(): match blkoff %d, diroff %d\n", + printf("msdosfs_lookup(): match blkoff %lu, diroff %d\n", blkoff, diroff); #endif /* @@ -688,6 +688,7 @@ createde(struct denode *dep, struct denode *ddep, struct denode **depp, return error; } ndep = bptoep(pmp, bp, ddep->de_fndoffset); + rootde_alloced(ddep); DE_EXTERNALIZE(ndep, dep); @@ -725,6 +726,7 @@ createde(struct denode *dep, struct denode *ddep, struct denode **depp, ndep--; ddep->de_fndoffset -= sizeof(struct direntry); } + rootde_alloced(ddep); if (!unix2winfn(un, unlen, (struct winentry *)ndep, cnt++, chksum, pmp)) break; @@ -1019,6 +1021,7 @@ removede(struct denode *pdep, struct denode *dep) */ offset -= sizeof(struct direntry); ep--->deName[0] = SLOT_DELETED; + rootde_freed(pdep); if ((pmp->pm_flags & MSDOSFSMNT_NOWIN95) || !(offset & pmp->pm_crbomask) || ep->deAttributes != ATTR_WIN95) diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index d7efa103581b..480d278a5a45 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -409,6 +409,97 @@ msdosfs_mount(struct mount *mp) return (0); } +/* + * The FAT12 and FAT16 file systems use a limited size root directory that + * can be created with 1 to 65535 entries for files, directories, or a disk + * label (but DOS or Windows creates at most 512 root directory entries). + * This function calculates the number of free root directory entries by + * counting the non-deleted entries (not starting with 0xE5) and by adding + * the amount of never used entries (with the position indicated by an + * entry that starts with 0x00). + */ +static int +rootdir_free(struct msdosfsmount* pmp) +{ + struct buf *bp; + struct direntry *dep; + u_long readsize; + int dirclu; + int diridx; + int dirmax; + int dirleft; + int ffree; + + dirclu = pmp->pm_rootdirblk; + + /* + * The msdosfs code ignores pm_RootDirEnts and uses pm_rootdirsize + * (measured in DEV_BSIZE) to prevent excess root dir allocations. + */ + dirleft = howmany(pmp->pm_rootdirsize * DEV_BSIZE, + sizeof(struct direntry)); + + /* Read in chunks of default maximum root directory size */ + readsize = 512 * sizeof(struct direntry); + +#ifdef MSDOSFS_DEBUG + printf("rootdir_free: blkpersec=%lu fatblksize=%lu dirsize=%lu " + "firstclu=%lu dirclu=%d entries=%d rootdirsize=%lu " + "bytespersector=%hu bytepercluster=%lu\n", + pmp->pm_BlkPerSec, pmp->pm_fatblocksize, readsize, + pmp->pm_firstcluster, dirclu, dirleft, pmp->pm_rootdirsize, + pmp->pm_BytesPerSec, pmp->pm_bpcluster); +#endif + ffree = dirleft; + while (dirleft > 0 && ffree > 0) { + if (readsize > dirleft * sizeof(struct direntry)) + readsize = dirleft * sizeof(struct direntry); +#ifdef MSDOSFS_DEBUG + printf("rootdir_free: dirclu=%d dirleft=%d readsize=%lu\n", + dirclu, dirleft, readsize); +#endif + if (bread(pmp->pm_devvp, dirclu, readsize, NOCRED, &bp) != 0) { + printf("rootdir_free: read error\n"); + if (bp != NULL) + brelse(bp); + return (-1); + } + dirmax = readsize / sizeof(struct direntry); + for (diridx = 0; diridx < dirmax && dirleft > 0; + diridx++, dirleft--) { + dep = (struct direntry*)bp->b_data + diridx; +#ifdef MSDOSFS_DEBUG + if (dep->deName[0] == SLOT_DELETED) + printf("rootdir_free: idx=%d \n", + diridx); + else if (dep->deName[0] == SLOT_EMPTY) + printf("rootdir_free: idx=%d \n", + diridx); + else if (dep->deAttributes == ATTR_WIN95) + printf("rootdir_free: idx=%d \n", + diridx, (dep->deName[0] & 0x1f) + 1); + else if (dep->deAttributes & ATTR_VOLUME) + printf("rootdir_free: idx=%d label='%11.11s'\n", + diridx, dep->deName); + else if (dep->deAttributes & ATTR_DIRECTORY) + printf("rootdir_free: idx=%d dir='%11.11s'\n", + diridx, dep->deName); + else + printf("rootdir_free: idx=%d file='%11.11s'\n", + diridx, dep->deName); +#endif + if (dep->deName[0] == SLOT_EMPTY) + dirleft = 0; + else if (dep->deName[0] != SLOT_DELETED) + ffree--; + } + brelse(bp); + bp = NULL; + dirclu += readsize / DEV_BSIZE; + } + return (ffree); +} + static int mountmsdosfs(struct vnode *odevvp, struct mount *mp) { @@ -611,11 +702,14 @@ mountmsdosfs(struct vnode *odevvp, struct mount *mp) } pmp->pm_maxcluster = (pmp->pm_HugeSectors - pmp->pm_firstcluster) / SecPerClust + 1; - pmp->pm_fatsize = pmp->pm_FATsecs * DEV_BSIZE; /* XXX not used? */ + pmp->pm_fatsize = pmp->pm_FATsecs * DEV_BSIZE; if (pmp->pm_fatmask == 0) { - if (pmp->pm_maxcluster <= ((CLUST_RSRVD - CLUST_FIRST) & - FAT12_MASK)) { + /* + * The last 10 (or 16?) clusters are reserved and must not + * be allocated for data. + */ + if (pmp->pm_maxcluster < (CLUST_RSRVD & FAT12_MASK)) { /* * This will usually be a floppy disk. This size makes * sure that one FAT entry will not be split across @@ -631,11 +725,11 @@ mountmsdosfs(struct vnode *odevvp, struct mount *mp) } } - clusters = (pmp->pm_fatsize / pmp->pm_fatmult) * pmp->pm_fatdiv; + clusters = (pmp->pm_fatsize / pmp->pm_fatmult) * pmp->pm_fatdiv ; if (pmp->pm_maxcluster >= clusters) { #ifdef MSDOSFS_DEBUG printf("Warning: number of clusters (%ld) exceeds FAT " - "capacity (%ld)\n", pmp->pm_maxcluster + 1, clusters); + "capacity (%ld)\n", pmp->pm_maxcluster - 1, clusters); #endif pmp->pm_maxcluster = clusters - 1; } @@ -749,6 +843,15 @@ mountmsdosfs(struct vnode *odevvp, struct mount *mp) goto error_exit; pmp->pm_fmod = 1; } + + if (FAT32(pmp)) { + pmp->pm_rootdirfree = 0; + } else { + pmp->pm_rootdirfree = rootdir_free(pmp); + if (pmp->pm_rootdirfree < 0) + goto error_exit; + } + mp->mnt_data = pmp; mp->mnt_stat.f_fsid.val[0] = dev2udev(dev); mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum; @@ -947,11 +1050,12 @@ msdosfs_statfs(struct mount *mp, struct statfs *sbp) pmp = VFSTOMSDOSFS(mp); sbp->f_bsize = pmp->pm_bpcluster; sbp->f_iosize = pmp->pm_bpcluster; - sbp->f_blocks = pmp->pm_maxcluster + 1; + sbp->f_blocks = pmp->pm_maxcluster - CLUST_FIRST + 1; sbp->f_bfree = pmp->pm_freeclustercount; sbp->f_bavail = pmp->pm_freeclustercount; - sbp->f_files = pmp->pm_RootDirEnts; /* XXX */ - sbp->f_ffree = 0; /* what to put in here? */ + sbp->f_files = howmany(pmp->pm_rootdirsize * DEV_BSIZE, + sizeof(struct direntry)); + sbp->f_ffree = pmp->pm_rootdirfree; return (0); } diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c index 94af83b5a0a6..c9263fe977d4 100644 --- a/sys/fs/msdosfs/msdosfs_vnops.c +++ b/sys/fs/msdosfs/msdosfs_vnops.c @@ -318,8 +318,11 @@ msdosfs_getattr(struct vop_getattr_args *ap) vap->va_flags |= UF_SYSTEM; vap->va_gen = 0; vap->va_blocksize = pmp->pm_bpcluster; - vap->va_bytes = - (dep->de_FileSize + pmp->pm_crbomask) & ~pmp->pm_crbomask; + if (dep->de_StartCluster != MSDOSFSROOT) + vap->va_bytes = + (dep->de_FileSize + pmp->pm_crbomask) & ~pmp->pm_crbomask; + else + vap->va_bytes = 0; /* FAT12/FAT16 root dir in reserved area */ vap->va_type = ap->a_vp->v_type; vap->va_filerev = dep->de_modrev; return (0); diff --git a/sys/fs/msdosfs/msdosfsmount.h b/sys/fs/msdosfs/msdosfsmount.h index 5caa40f2b648..5afbfc44dc0a 100644 --- a/sys/fs/msdosfs/msdosfsmount.h +++ b/sys/fs/msdosfs/msdosfsmount.h @@ -108,6 +108,7 @@ struct msdosfsmount { u_int pm_fatmult; /* these 2 values are used in FAT */ u_int pm_fatdiv; /* offset computation */ u_int pm_curfat; /* current FAT for FAT32 (0 otherwise) */ + int pm_rootdirfree; /* number of free slots in FAT12/16 root directory */ u_int *pm_inusemap; /* ptr to bitmap of in-use clusters */ uint64_t pm_flags; /* see below */ void *pm_u2w; /* Local->Unicode iconv handle */ @@ -222,6 +223,22 @@ struct msdosfs_fileno { ? roottobn((pmp), (dirofs)) \ : cntobn((pmp), (dirclu))) +/* + * Increment the number of used entries in a fixed size FAT12/16 root + * directory + */ +#define rootde_alloced(dep) \ + if ((dep)->de_StartCluster == MSDOSFSROOT) \ + (dep)->de_pmp->pm_rootdirfree--; + +/* + * Decrement the number of used entries in a fixed size FAT12/16 root + * directory + */ +#define rootde_freed(dep) \ + if ((dep)->de_StartCluster == MSDOSFSROOT) \ + (dep)->de_pmp->pm_rootdirfree++; + #define MSDOSFS_LOCK_MP(pmp) \ lockmgr(&(pmp)->pm_fatlock, LK_EXCLUSIVE, NULL) #define MSDOSFS_UNLOCK_MP(pmp) \ From nobody Mon May 1 08:12:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q8wt30284z48DhV; Mon, 1 May 2023 08:12: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 4Q8wt26jjcz45MF; Mon, 1 May 2023 08:12:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682928730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TkJPZglKCcFC8vJj4H2y4vFCNnSrIOILJOdhrgxHTlA=; b=QfyQ9x5yneMghKPH9OkNNSFhghBsqSvTRPLR5rwrfjvugMHQtI/nM0irpeeo5vyvEGnzwL IKPWJMdQNcmbaokBwprJnE6j+DS8MJ7vCWzEAjV71+R8mOZ190vdERMe5rmy+iuUo7DU+o tegg1cjeZbibBarn9j9ElKEy/S2erSF7z28j2L+0Z9onoxw4LLWSjSfKqE9U1KNPx983lM SZTHKizH0Iw8vj7YAI6cp4RaZGo+Fh1+hVF3K1hdBtB3faeefMp3CCZ5cPAJLPTJtYLrIh 7U8E3cv1IQVx4ngkf79+UjYXhmTU/3G/VzB75EFmntR0mmsZdciQvxITujLeMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682928730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TkJPZglKCcFC8vJj4H2y4vFCNnSrIOILJOdhrgxHTlA=; b=Ij4wKImjpsL2eai55b9hdh89+ImcZPNnqQCD9Nd4W6T7ElV86rlGjVz+zoKBzZ6j4o7KSv DATPjBgAPb4P8E1U5CCTt4Qu1hGq6n4XN2/6Z84wWKYDG/hd5dh8+rY+WFtbXVad0KEFVF NAYvWn/PXW3Jt/0XEbWfCWdeadb0jgf6fDzU/PPo3kOyjYD0uI4lqbBX3nqv7UuAW1AhiA BhvLHI2Zw4ka6b2KosaWp+sF1jDA9GmOtkiQY+uWYLgRWMx6XOUXvTzOa9LwF4eyrq5OyA Du+2JNZHJaLToRsnyUclvCXB6rJNxhHQz1YAyK/vieh9LBzfcZpJAirEjD4gCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682928730; a=rsa-sha256; cv=none; b=tpapIuy7DdTQeLuNzP9N+21q3hJvRuXQxAHUZHZruBDz2rorA4GtQkLdtJ5z0AAymBo/H4 jpkYgEbjBGnB546fcOBF+EYm1VeChzc7fTBXbI30RAB/VPyZ+6bGjY8KQUXvUwt4q39iNM QI/FqC5Vg1MTi4eXjHoT/43rdGQV8yAIZSTP8pvME72NDrR84w0L0eUmXv1H8ThlFKY1yc zTN66f0uPgrznO47O+QOjyOCZF7fgk/RT55XJwwGfRVsQf/x9udbia+DmdI8Ume71eJi4o FVc/xwUoBHSB2ufptTaX3GUEmtcyS5gLCTiDiqEC7mxIjeUYKAUI1AhUHjyhDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q8wt25pckzyNK; Mon, 1 May 2023 08:12:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3418CAFC078521; Mon, 1 May 2023 08:12:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3418CAVt078520; Mon, 1 May 2023 08:12:10 GMT (envelope-from git) Date: Mon, 1 May 2023 08:12:10 GMT Message-Id: <202305010812.3418CAVt078520@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Stefan=20E=C3=9Fer?= Subject: git: 3270f21597fb - stable/13 - sys/fs: do not report blocks allocated for synthetic file systems List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3270f21597fb35f7cdbc39f0f09eaf4f84e79fe6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=3270f21597fb35f7cdbc39f0f09eaf4f84e79fe6 commit 3270f21597fb35f7cdbc39f0f09eaf4f84e79fe6 Author: Stefan Eßer AuthorDate: 2023-04-25 07:40:05 +0000 Commit: Stefan Eßer CommitDate: 2023-05-01 08:11:44 +0000 sys/fs: do not report blocks allocated for synthetic file systems The pseudo file systems (devfs, fdescfs, procfs, etc.) report total and available blocks and inodes despite being synthetic with no underlying storage device to which those values could be applied. The current code of these file systems tends to report a fixed number of total blocks but no free blocks, and in the case of procfs, libprocfs, linsysfs also no free inodes. This can be irritating in e.g. the "df" output, since 100% of the resources seem to be in use, but it can also create warnings in monitoring tools used for capacity management. This patch makes these file systems return the same value for the total and free parameters, leading to 0% in use being displayed by "df". Since there is no resource that can be exhausted, this appears to be a sensible result. Reviewed by: mckusick Differential Revision: https://reviews.freebsd.org/D39442 (cherry picked from commit 88a795e80c03ff1d960d830ee273589664ab06cc) --- sys/fs/devfs/devfs_vfsops.c | 4 ++-- sys/fs/fdescfs/fdesc_vfsops.c | 4 ++-- sys/fs/pseudofs/pseudofs.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/fs/devfs/devfs_vfsops.c b/sys/fs/devfs/devfs_vfsops.c index 56297578ec2a..0fac2b68e2e1 100644 --- a/sys/fs/devfs/devfs_vfsops.c +++ b/sys/fs/devfs/devfs_vfsops.c @@ -230,8 +230,8 @@ devfs_statfs(struct mount *mp, struct statfs *sbp) sbp->f_bsize = DEV_BSIZE; sbp->f_iosize = DEV_BSIZE; sbp->f_blocks = 2; /* 1K to keep df happy */ - sbp->f_bfree = 0; - sbp->f_bavail = 0; + sbp->f_bfree = 2; + sbp->f_bavail = 2; sbp->f_files = 0; sbp->f_ffree = 0; return (0); diff --git a/sys/fs/fdescfs/fdesc_vfsops.c b/sys/fs/fdescfs/fdesc_vfsops.c index edc2cdd61847..2961c3bf6224 100644 --- a/sys/fs/fdescfs/fdesc_vfsops.c +++ b/sys/fs/fdescfs/fdesc_vfsops.c @@ -223,8 +223,8 @@ fdesc_statfs(struct mount *mp, struct statfs *sbp) sbp->f_bsize = DEV_BSIZE; sbp->f_iosize = DEV_BSIZE; sbp->f_blocks = 2; /* 1K to keep df happy */ - sbp->f_bfree = 0; - sbp->f_bavail = 0; + sbp->f_bfree = 2; + sbp->f_bavail = 2; sbp->f_files = lim + 1; /* Allow for "." */ sbp->f_ffree = freefd; /* See comments above */ return (0); diff --git a/sys/fs/pseudofs/pseudofs.c b/sys/fs/pseudofs/pseudofs.c index 44473a926182..3c82021a8148 100644 --- a/sys/fs/pseudofs/pseudofs.c +++ b/sys/fs/pseudofs/pseudofs.c @@ -377,10 +377,10 @@ pfs_mount(struct pfs_info *pi, struct mount *mp) vfs_mountedfrom(mp, pi->pi_name); sbp->f_bsize = PAGE_SIZE; sbp->f_iosize = PAGE_SIZE; - sbp->f_blocks = 1; - sbp->f_bfree = 0; - sbp->f_bavail = 0; - sbp->f_files = 1; + sbp->f_blocks = 2; + sbp->f_bfree = 2; + sbp->f_bavail = 2; + sbp->f_files = 0; sbp->f_ffree = 0; return (0); From nobody Mon May 1 10:48:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q90LC0W45z48Mbc; Mon, 1 May 2023 10:48:19 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q90LB1vJbz4H71; Mon, 1 May 2023 10:48:18 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.17.1/8.17.1) with ESMTPS id 341Am9R2092212 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 1 May 2023 13:48:12 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 341Am9R2092212 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 341Am96c092211; Mon, 1 May 2023 13:48:09 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 1 May 2023 13:48:09 +0300 From: Konstantin Belousov To: "Jason A. Harmening" Cc: Dimitry Andric , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Subject: Re: git: 060699e91369 - stable/13 - Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6 Message-ID: References: <202304092135.339LZMeJ081640@gitrepo.freebsd.org> <76DD2CB9-986B-4349-8F46-3B7BF63EB315@FreeBSD.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home X-Rspamd-Queue-Id: 4Q90LB1vJbz4H71 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Sun, Apr 30, 2023 at 10:31:53PM -0500, Jason A. Harmening wrote: > On Sun, Apr 30, 2023 at 07:34:45PM -0500, Jason A. Harmening wrote: > > On Sun, Apr 30, 2023 at 06:47:13PM -0500, Jason A. Harmening wrote: > > > On Sun, Apr 30, 2023 at 08:09:16AM +0300, Konstantin Belousov wrote: > > > > On Sat, Apr 29, 2023 at 02:27:50PM -0500, Jason A. Harmening wrote: > > > > > On Sat, Apr 29, 2023 at 08:49:28PM +0200, Dimitry Andric wrote: > > > > > > On 29 Apr 2023, at 20:33, Jason A. Harmening wrote: > > > > > > > > > > > > > > On Sun, Apr 09, 2023 at 09:35:22PM +0000, Dimitry Andric wrote: > > > > > > >> The branch stable/13 has been updated by dim: > > > > > > >> > > > > > > >> URL: https://cgit.FreeBSD.org/src/commit/?id=060699e9136975d51d3f726b9785bdbac9a62ba6 > > > > > > >> > > > > > > >> commit 060699e9136975d51d3f726b9785bdbac9a62ba6 > > > > > > >> Author: Dimitry Andric > > > > > > >> AuthorDate: 2023-01-14 16:33:24 +0000 > > > > > > >> Commit: Dimitry Andric > > > > > > >> CommitDate: 2023-04-09 14:54:52 +0000 > > > > > > >> > > > > > > >> Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6 > > > > > > >> > > > > > > >> This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and > > > > > > >> openmp to llvmorg-15.0.7-0-g8dfdcc7b7bf6. > > > > > > >> > > > > > > >> PR: 265425 > > > > > > >> MFC after: 2 weeks > > > > > > > > > > > > > > This MFC of llvm15 appears to have completely broken the Intel IOMMU > > > > > > > driver on my stable/13 machine. After this series of commits, any > > > > > > > downstream DMA seems to produce an IOMMU translation fault, which > > > > > > > renders the machine completely unusable: no nvme boot disk, no usb > > > > > > > keyboard, etc. > > > > > > > > > > > > > > The faults I see look something like this: > > > > > > > > > > > > > > DMAR4: ahci0: pci0:17:5 sid 8d fault acc 0 adt 0x0 reason 0x3 addr 26000 > > > > > > > > > > > > > > It's a bit surprising to see a toolchain upgrade produce breakage like > > > > > > > this, but that's what git bisect clearly tells me. I wonder if some of > > > > > > > the IOMMU control structures might be defined as C bitfields and the new > > > > > > > compiler is emitting them differently? Also, was any breakage like this > > > > > > > observed when -current was upgraded to llvm15 several months ago? > > > > > > > > > > > > I haven't heard anything about such breakage, no. > > > > > > > > > > > > > > > > > > > More generally, this is the second time in as many months I've had to > > > > > > > deal with IOMMU breakage on -stable. I can't imagine I'm the only > > > > > > > person who sees value in running with DMA remapping enabled; do we need > > > > > > > a dedicated DMAR-enabled machine in the cluster to smoke-test changes > > > > > > > like this? More generally, should we avoid MFCing high-risk changes > > > > > > > like this? > > > > > > > > > > > > Since there were very few bug reports, it was not deemed high risk. > > > > > > > > > > > > In any case, it would be good to get the bottom of what is causing the > > > > > > problem, so is there any way you can isolate which code seems to be > > > > > > going "bad"? > > > > > > > > > > > > For example, if this problem affects code in sys/dev/iommu, is there > > > > > > some way you can compile that part with -O1, or with an older version > > > > > > of clang (from ports), to see if the problem goes away? > > > > > > > > > > I did try removing all custom make.conf settings (previously I just had > > > > > CPUTYPE?=icelake-server), but that didn't change the behavior. > > > > > > > > > > Before I try further build tweaks, I'd like to ask if the IOMMU fault > > > > > report can provide guidance here? AFAICT all the faults I'm getting > > > > > show "reason 0x3". If I'm reading the VT-d spec correctly, FR=0x3 > > > > > indicates an invalid context entry, in other words there's something the > > > > > hardware doesn't like in the way the address width or pagetable base is > > > > > configured for the PCIe requestor. > > > > > > > > I would start looking at the other direction: might be, there are still some > > > > left shifts for int32 values with the shift count > 30, or uint32 with the > > > > count > 31. > > > > > > > > Also might be useful to dump each context entry on creation, it is kept > > > > constant after. > > > > > > I did look over the constants in intel_reg.h, and didn't see anything > > > that looked as though it would be susceptible to sign-extension or > > > truncation bugs. In the failing case it's much easier for me to catch > > > the fault messages than any initialization message, so I instrumented > > > the fault handler to get the context entry from the dmar_ctx object > > > using the same logic as dmar_map_ctx_entry(), and then dump out the ctx1 > > > and ctx2 fields. What I see are messages like: > > > > > > ... ctx1 0x10013b001 ctx2 0x103 > > > > > > At first glance these "look right": the P bit is set in ctx1, and the > > > rest of the field looks like a valid physical address. ctx2 also > > > doesn't have any of the reserved bits set, but in all cases it does have > > > AW=3, which would indicate 57-bit AGAW. But when I boot the last > > > working kernel, from the revision prior to the llvm15 MFC, I see this in > > > dmesg: > > > > > > ahci0: dmar4 pci0:0:17:5 rid 8d domain 1 mgaw 48 agaw 48 re-mapped > > > > > > ...all reported devices show 48-bit MGAW/AGAW, so I would expect ctx2 to > > > have AW=2. I suspect this may be the source of the fault, but I'm not > > > sure how it's getting configured that way, whether it's an issue with > > > reading the capability register or something else. > > > > > > > I can confirm that hacking domain_set_agaw() to always use the settings > > from sagaw_bits[2] eliminates the faults and at least allows the machine > > to boot to single-user mode. > > I see what's happening now. When I added the hack to always set > sagaw_bits[2], I noted that the passed-in MGAW was still 57, while > unit->hw_cap had the correct value of 0x4 (=> 4-level paging, 48-bit AW) > in bits 12:8. The problem is that sagaw_bits has agaw=64 in its last > entry. This results in dmar_maxaddr2mgaw() attempting a comparison > against 1ULL << 64 in the final iteration of its first loop. I suspect > the new compiler probably determines that last iteration is meaningless > and simply omits it from the (probably unrolled) loop. Since the "loop" > terminates with i < nitems(sagaw_bits), the subsequent "allow_less ..." > case doesn't execute and we end up erroneously selecting a 57-bit > address width. Just commenting out that last entry in sagaw_bits fixes > the problem. > > So, two questions: > 1) Does any VT-d hardware actually support 6-level paging? The ca. 2021 > VT-d spec I'm looking at indicates 5-level is the greatest depth > supported, with everything above that being reserved. I do not think that there is any hw supporting 6-level. Looking at the spec history, D51397-005 Rev 1.3 February 2011 declared that SAGAW 4 is 6-level, then D51397-006 Rev. 2.2 September 2013 designated SAGAW values 3 and 4 as reserved, then D51397-009 Rev. 2.5 November 2017 returned SAGAW 3 for 5-level mode. > > 2) I'd expect clang to try very hard to error out in a situation like > this, but I see that sys/conf/kern.mk sets -Wno-shift-count-overflow > among other things, and more of them were added for clang 15. This > seems like a really bad idea, regardless of how much of a PITA it may be > to fix these warnings. I think that removing the '64' bit sagaw_bit entry is fine, please proceed. From nobody Mon May 1 10:54:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q90TL5Pp9z48Ndh; Mon, 1 May 2023 10:54: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 4Q90TL4cWpz4HmK; Mon, 1 May 2023 10:54:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682938470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DGPsKGlozc2n/Cbekvlr0jUz8O3JkUg0yR9IgfpFSuE=; b=EYZCoDJhnt+O84/tPBybLFCia9zUMvaZ8SMorUm/4iBpf+UMu6cZ8A5Te782FjJv/4IJUh D54eN0PBM/N2koPB46KgC38i4/6+oWRbPl0x3g6xE+AjDiVpjnfBgb5AAIKpzJ11u64bC+ VDdcohVG8oY8o0pqAN28u0gxlS3bSaGPd0EO8Tgzee1ynG4hRXVb6uTwPOctXLc/NZBXRw 1vlEZ1ymkhocf7xaFEi90WbF3Z2I3I6RD7j7kZ1izQPObfcZIIuzUA4vlxMIqSRcKDcKUG isjKYYEmGGwZW2w6Vm57/ryZLXucc/vHwDAey4UZ6WC5xAW3Rf5aU+vgFCGW/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682938470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DGPsKGlozc2n/Cbekvlr0jUz8O3JkUg0yR9IgfpFSuE=; b=JiaFdMFzE0ex8E3/b9uPHkGEvGlMW0V69Rc/bP5MvpMDQ5Y1Nw6bVs7wM389IKtISiHnXz wrHitP/2x4Z0zT3rJtWtLCATWpkGFGQvT9u4wjuXG4EeRJ9orfj70/J4HtXP9rHaq685b5 FHzZfUVew7687I6kCBB72Qu9/fJCJC49EKM6i86rY8zrhg1lPAaeKv+e2P8FyKTMaA9QG2 /lnShkwgJ1xGNupEkXxOt3uyS0UpVQ0UFWE6j4WzdaR+ViG1rmy0/RqeAb+2dhWMR4lZx7 jrdNwDsopov3E1vjRAb10Sjd2LeHfi7IrrkPYg0lCOtgHu8vxw8jyx6SYcvC5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682938470; a=rsa-sha256; cv=none; b=dUMiAhpQQDgxh3YPCIJtB+cunMfN6buNavBFqrSnzCKIFn3I0jAGs5ZR8I4FeRv4USAdOd BthCKlbC1GTpGa+n9jydExA5xRx2a87z//7qtTb0XNLstCcnApQ6b0q/cyI93Nr6W7NfCH 8s38BGAawP+xNa6CRKM0/HQeOeNK/GEFbAA1i9Cou9/BE/ichAcjdgiqe9zg/YBg2x3P7c kZPsp+NwoD8Q1pBai7SAZGobTU9trv6AulPnAsfhUIWbeGfy7tYcCmqFmvssUKrRNQWLQm A2KIHYVUrafDNp37DXaOM6SxzOJH3fci5IkPJfJw6dHh01/pbnzvGEDniRaGfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q90TL3j7lz136r; Mon, 1 May 2023 10:54:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341AsUd4041676; Mon, 1 May 2023 10:54:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341AsULQ041675; Mon, 1 May 2023 10:54:30 GMT (envelope-from git) Date: Mon, 1 May 2023 10:54:30 GMT Message-Id: <202305011054.341AsULQ041675@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: b274854dd943 - main - stress2: Added a temporary fix for the UFS+SU "out of inodes" issue List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b274854dd943e66556ba2ecd7b6d3349b1cf8e6e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=b274854dd943e66556ba2ecd7b6d3349b1cf8e6e commit b274854dd943e66556ba2ecd7b6d3349b1cf8e6e Author: Peter Holm AuthorDate: 2023-05-01 10:52:42 +0000 Commit: Peter Holm CommitDate: 2023-05-01 10:52:42 +0000 stress2: Added a temporary fix for the UFS+SU "out of inodes" issue --- tools/test/stress2/misc/unionfs4.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/test/stress2/misc/unionfs4.sh b/tools/test/stress2/misc/unionfs4.sh index 2355005c1f8b..15ff314a980b 100755 --- a/tools/test/stress2/misc/unionfs4.sh +++ b/tools/test/stress2/misc/unionfs4.sh @@ -52,6 +52,8 @@ done mdconfig -a -t swap -s 2g -u $md1 mdconfig -a -t swap -s 2g -u $md2 +[ "$newfs_flags" = "-U" ] && + newfs_flags="-j" # "out of inodes" work around newfs $newfs_flags -n md$md1 > /dev/null newfs $newfs_flags -n md$md2 > /dev/null mount /dev/md$md1 $mp1 From nobody Mon May 1 11:49:36 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q91hw4LRqz48RW4; Mon, 1 May 2023 11:49: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 4Q91hw1r7nz4NhF; Mon, 1 May 2023 11:49:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682941776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uSXdCcdSAOF49tYCl+xqLZnhyuILTrrvpkbDo93nd7o=; b=w0U42Rg36CJ8svCTzlMCi8+bmbeKjcqBn2Cov0F+oxfArpR5TrNulxw7OYG3+c2igALY5a FNaFuyUKVcCElzeMlTxpDYWOzPO2ERVHj7DVOIVb3lGmbzXD10txBFsLVVSi1DMEiyIk8W KU1lfL45mtLY6TfQpcSelDspNfckzRHJ9ND27ZQPw9d7wvagqOtvks7oSjLRTBzBN25VGx W/XKAtKnRd/QGc/KOBRys22BasAVTqIHZc16Qa5h6vQMmXNemO9za9OwBEF7S7hE7W1ovH XvZgznRj8zYZ3hFebZ+liWo5vPQ2Xli5wAu7TJfqOhjoITRxEfgJ8UyqURvyBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682941776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uSXdCcdSAOF49tYCl+xqLZnhyuILTrrvpkbDo93nd7o=; b=jKDB6ATFIe+7cIxa8qCEZ5w8JqxxQA9cTxWRnpSr1QuVxt12mt0otsTxBNRFNW6FVnIKgJ shdnWVaVYCjMZ3zItYQprt42S0zC4sLWYshiPmfa3PTxNvdTAn1waX/GBzVUTIjdiTZKHj zWPntTBzZT4hoSL/2yU8HB91ZysiKWtmpiygdPoEanUEWeo0zKugREyHG2FJ2AZ8HSmfjB pDX+n3IZk8VFmk2/XjRql7eFQydJKE4l+yXyGtabxUuzTrOIQf+V3hhNazFd+9T02deb1x EsyKFzz8YzBDUFDB2GL6FfxNRlY59V22My+GkQAAzD0xjPnUWmNgK/6mnlJ+Ng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682941776; a=rsa-sha256; cv=none; b=nXyFgFyc9fIkRoL0rA7Vk8JrO7nzsOAYpJE17sE/COYBF1poeH9ypEvL3CZsAEvzFTg/6w VrRG9+NKoP3G6LsIA5+Rju1dz+3RFp7QN4Ml0eBghm8g806FPzweKhN/h2CK1KWDa0jGjQ dBGZLEfGrbqjJhUpuBNRX0EVwnL/bB1cuN+s1HYZQMCPcF8sWLfyU+I1os4gOyIERDYhcq VBQDzQVvksQtwGdn3+WaN9oDoxPtZ1xePb6rimQFDN8oK+l1BC9IzcuOcyKQR+2iRlAadV mSkDFu/zRIyo1IuZPbPzgBty6iWJlVgORHRaoA4crQyBY0kkYRl1xPjmrFf80A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q91hw0wK7z143x; Mon, 1 May 2023 11:49:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341Bnaff025387; Mon, 1 May 2023 11:49:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341BnaDY025386; Mon, 1 May 2023 11:49:36 GMT (envelope-from git) Date: Mon, 1 May 2023 11:49:36 GMT Message-Id: <202305011149.341BnaDY025386@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: a554ff467079 - main - libmlx5: Add more ConnectX-6/7/8 HCA IDs to hca_table. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a554ff467079c12f647d4bea46bbbc970bf68354 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=a554ff467079c12f647d4bea46bbbc970bf68354 commit a554ff467079c12f647d4bea46bbbc970bf68354 Author: Hans Petter Selasky AuthorDate: 2023-05-01 11:48:20 +0000 Commit: Hans Petter Selasky CommitDate: 2023-05-01 11:48:20 +0000 libmlx5: Add more ConnectX-6/7/8 HCA IDs to hca_table. To allow userspace utilities to use these devices. MFC after: 1 week Sponsored by: NVIDIA Networking --- contrib/ofed/libmlx5/mlx5.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/ofed/libmlx5/mlx5.c b/contrib/ofed/libmlx5/mlx5.c index 6577e07a4c4b..bc35ebe05cd9 100644 --- a/contrib/ofed/libmlx5/mlx5.c +++ b/contrib/ofed/libmlx5/mlx5.c @@ -81,8 +81,14 @@ static struct { HCA(MELLANOX, 4124), /* ConnectX-6 VF */ HCA(MELLANOX, 4125), /* ConnectX-6 DX */ HCA(MELLANOX, 4126), /* ConnectX family mlx5Gen Virtual Function */ + HCA(MELLANOX, 4127), /* ConnectX-6 LX */ + HCA(MELLANOX, 4129), /* ConnectX-7 */ + HCA(MELLANOX, 4131), /* ConnectX-8 */ HCA(MELLANOX, 41682), /* BlueField integrated ConnectX-5 network controller */ HCA(MELLANOX, 41683), /* BlueField integrated ConnectX-5 network controller VF */ + HCA(MELLANOX, 41686), /* BlueField-2 integrated ConnectX-6 Dx network controller */ + HCA(MELLANOX, 41692), /* BlueField-3 integrated ConnectX-7 network controller */ + HCA(MELLANOX, 41695), /* BlueField-4 integrated ConnectX-8 network controller */ }; uint32_t mlx5_debug_mask = 0; From nobody Mon May 1 11:49:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q91hw1LBfz48Rdt; Mon, 1 May 2023 11:49: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 4Q91hv0xZ3z4NhD; Mon, 1 May 2023 11: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=1682941775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bSawNKCdu5KJUx/93j9FP+dgAr/Fm4S31YZrowCAPAg=; b=xu3KxObUNIIfqOjmMDFaeaIdSk1aXSbO2bxyuL3Kue7lxSS4LcozYSGu5a+6KdczR4tBkk lNi/EW0RokrNkYh8M76QafwrhMRmtwkXN8cAwMBpYzMW5hFRZ4qAe7cO47+jX+5YqQEP8O 4hvb5aRmU4V14S+3EbKUQfwasDF744Q5q0H9B4xyYWVj1NPcfs7DQETfX7LeZL/42m9JPe +LWo028bY05+dpTXJmga1/Ih8kIlCnP2Sh1SBdhzMVbSPVjbP142dybnRN+xhuhI1S3kRG yEuNwGDE3tK61kLE/5U4EOMPDNFT1whJ5ugB/64pp0thZi79ewGX7A5ht0SsTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682941775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bSawNKCdu5KJUx/93j9FP+dgAr/Fm4S31YZrowCAPAg=; b=GItW5TdPJWpw6j5+rPJaTvlkuZ6s/Gr9Y1SVtmdwyu3duOT/wlnDcxibh12s4vpF7bEWju B6tX9ZJECf+Kx/0JtM5UPEX0QAUjzZh7Jfxl4x0IWPbTbfNO2uq0G88pOjRqmo+Vju7ty1 mL5mzU+5IiNCuL79swVCxXgzMhxa3E/Qq72VJBtO5vRFt4/N62+w2xzCAJhUUQCCwyk8w/ b/goURoppGCyt8/d47UHfhuzhFbI0dQ/SudY4TBJeUmedhkyzWApZPiuHnuNq7rZLLq7Bk HWd849Cc50SK6zbUuj1vXyUISZIzrwqJQeTa5YBz6kpR8q9B3pF8WuJZeSoxFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682941775; a=rsa-sha256; cv=none; b=bp1Fqbcj46JT+inDCmvpHn+m2t3scZpYHRcN7kDhWVUhQh3v/7bhdea50MuWJ6FOVcfM8m 4pc5LFvBRKz4H0XU7zvPe7uIFbCXTt4VP6Olrejbktb945y4A8mWjJ2XNRR9kab/6b+RbB 4fIWV0meS0BWlKlRMr0qWxZideZTBzlUqPMiuvshfTYRvx7tDvmYELw3HSbTGxAZIPbUUM e76HTttgKRa2W4Fv+mhyVm6Mn6vZYM185wXzvlPsucbGzPzvkVe5ypomiidtQQWumHe0WZ 3Slo2P+to/sg0XYSGhPK6IMvyM7wzxP1b5t8OoLQUxA+vqsSsRoqx6GKTOgh+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 4Q91hv02W6z14Gy; Mon, 1 May 2023 11:49:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341BnY7o025362; Mon, 1 May 2023 11:49:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341BnY9k025361; Mon, 1 May 2023 11:49:34 GMT (envelope-from git) Date: Mon, 1 May 2023 11:49:34 GMT Message-Id: <202305011149.341BnY9k025361@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: d502d3fc72f1 - main - opensm: Fix build with -Werror and -Wdate-time. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d502d3fc72f123f104cba3d1ad9135a7ef7cf78b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=d502d3fc72f123f104cba3d1ad9135a7ef7cf78b commit d502d3fc72f123f104cba3d1ad9135a7ef7cf78b Author: Mina Galić AuthorDate: 2023-05-01 09:13:30 +0000 Commit: Hans Petter Selasky CommitDate: 2023-05-01 11:46:24 +0000 opensm: Fix build with -Werror and -Wdate-time. This fixes builds WITH_OFED_EXTRA=YES . PR: 270776 Pull Request: https://github.com/freebsd/freebsd-src/pull/715 MFC after: 1 week Sponsored by: NVIDIA Networking --- contrib/ofed/opensm/opensm/osm_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/ofed/opensm/opensm/osm_console.c b/contrib/ofed/opensm/opensm/osm_console.c index 48ee2a4aa77e..1dfeeeaf0fbf 100644 --- a/contrib/ofed/opensm/opensm/osm_console.c +++ b/contrib/ofed/opensm/opensm/osm_console.c @@ -1652,7 +1652,7 @@ static void help_version(FILE * out, int detail) static void version_parse(char **p_last, osm_opensm_t * p_osm, FILE * out) { - fprintf(out, "%s build %s %s\n", p_osm->osm_version, __DATE__, __TIME__); + fprintf(out, "%s\n", p_osm->osm_version); } /* more parse routines go here */ From nobody Mon May 1 12:15:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q92Gg73ncz48Ssx; Mon, 1 May 2023 12:15:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q92Gg6Y1Cz4Q3v; Mon, 1 May 2023 12:15:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682943323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i13AkLTLVElTk/cm3Cu1aCBOs1z1Bd2DPw7Q5S8eQqs=; b=Fa8jgZeWndCPhuUql4zM3ZAXf4R+OvLFget2Lq6atLIZgBQUzXKReA2gJ3UKOwl4s/DJq3 EoxVZR2tygYEChpJEFpsaCp4iWRy4tkiBmy/mr9mcACOQ/abo0i4YMGLgesOwXl2UpOOQ4 vfjByNDzDyOhhN6U7EOBGOJFj4uL4jsIn7m5FuKymoEsWBAZm2LPWZZnQWfDcVQhhKGQdb vPnvkmoMeM1CrsMaeoIuOkgNA+uZsDfet5jj2Ge5PwGxIp8ezToNOgOSGALVvYbQQX3yRm D0GKZ1/SvvhtE0qW/oRzXJKWmO5sfg1fRnOlus4iOx2u2MR7casb3O0aJt8jrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682943323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i13AkLTLVElTk/cm3Cu1aCBOs1z1Bd2DPw7Q5S8eQqs=; b=RUCyEx+4Ne27GiUZYpy5srX93GYSraZ04ZXyrk2KyPARV6nBP0FklK4D8hrO/2bpZgVu7Z 1SaXyOvv4PSsPYASPKYKrEICrD+jau9s6kO+nSub3KDGXD6FvWQru3fpjKUwMCT3rmWOad qwrIerofDDseixls3hrt4ljCNxr13Jc+3bDpWKFuBoR0g1uXJF0RqyIjCRojgEeYijUE3B gNqrsS6MDECYUhyXjwQit6BEtXHq8sPbXr+AXLiyPz+XIaTtrOYPIghyEOS6YDM5gR0kZt XuFLa4K+Z/BS6sIabCAlmKZ0ZCtcJFP1gTyA19CN2nQ8dCle8eg6uTuJ/Y+vZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682943323; a=rsa-sha256; cv=none; b=Ncck/YXpFYxMiTgewJGR8okD3R0pDxDhxiq5cPE0rkQ4lHkXmR2dFVYOPa30EvuZEyoqYU u/XElxmrRdTkYreuIH1zfhyZ5oQd+n2e3UFAJODnN1VNdstsffu1KF7NZ2zKO48m2iDQWs RBy8/zpHAf41PJCCw7O1LImgePWVuD6em8n94D+h0pQgv1XRYrhpDPyE7zuyJByh1Vja/P LDcsVW1y/MjiSdX6pix1UQazxRv4z+RjEJIOLVL0tHv9G3LQziFcidKVxUeiXQoMf0LlUq pjkCmmlQizbumuVxHTyhk/1y4czEWk7wvPEpghCvhkZMIpL+mBgQPTTttbE9ug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q92Gg5ckWz14cC; Mon, 1 May 2023 12:15:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341CFNAY074996; Mon, 1 May 2023 12:15:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341CFNAg074995; Mon, 1 May 2023 12:15:23 GMT (envelope-from git) Date: Mon, 1 May 2023 12:15:23 GMT Message-Id: <202305011215.341CFNAg074995@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 878716d2ccbf - stable/13 - geom: use bool for one-bit wide bit-field List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 878716d2ccbf68946152728119f5320a46009d44 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=878716d2ccbf68946152728119f5320a46009d44 commit 878716d2ccbf68946152728119f5320a46009d44 Author: Ed Maste AuthorDate: 2023-04-17 18:56:51 +0000 Commit: Ed Maste CommitDate: 2023-05-01 12:15:08 +0000 geom: use bool for one-bit wide bit-field A one-bit wide bit-field can take only the values 0 and -1. Clang 16 introduced a warning that "implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1". Fix by using c99 bool. Reported by: Clang, via dim Reviewed by: dim Sponsored by: The FreeBSD Foundation (cherry picked from commit 00172f341666f2d5535ae6f4630c93593e86a4cb) --- sys/geom/part/g_part.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/geom/part/g_part.h b/sys/geom/part/g_part.h index c96cec264b87..4987b7c54c0e 100644 --- a/sys/geom/part/g_part.h +++ b/sys/geom/part/g_part.h @@ -132,10 +132,10 @@ struct g_part_entry { quad_t gpe_start; /* First LBA of partition. */ quad_t gpe_end; /* Last LBA of partition. */ int gpe_index; - int gpe_created:1; /* Entry is newly created. */ - int gpe_deleted:1; /* Entry has been deleted. */ - int gpe_modified:1; /* Entry has been modified. */ - int gpe_internal:1; /* Entry is not a used entry. */ + bool gpe_created:1; /* Entry is newly created. */ + bool gpe_deleted:1; /* Entry has been deleted. */ + bool gpe_modified:1; /* Entry has been modified. */ + bool gpe_internal:1; /* Entry is not a used entry. */ }; /* G_PART table (KOBJ instance). */ @@ -170,12 +170,12 @@ struct g_part_table { uint32_t gpt_heads; int gpt_depth; /* Sub-partitioning level. */ - int gpt_isleaf:1; /* Cannot be sub-partitioned. */ - int gpt_created:1; /* Newly created. */ - int gpt_modified:1; /* Table changes have been made. */ - int gpt_opened:1; /* Permissions obtained. */ - int gpt_fixgeom:1; /* Geometry is fixed. */ - int gpt_corrupt:1; /* Table is corrupt. */ + bool gpt_isleaf:1; /* Cannot be sub-partitioned. */ + bool gpt_created:1; /* Newly created. */ + bool gpt_modified:1; /* Table changes have been made. */ + bool gpt_opened:1; /* Permissions obtained. */ + bool gpt_fixgeom:1; /* Geometry is fixed. */ + bool gpt_corrupt:1; /* Table is corrupt. */ }; struct g_part_entry *g_part_new_entry(struct g_part_table *, int, quad_t, From nobody Mon May 1 12:15:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q92Gj17MHz48St0; Mon, 1 May 2023 12:15: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 4Q92Gj0JFlz4QNn; Mon, 1 May 2023 12:15:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682943325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A3us2kBAcyk/Go0z7zR+7ck4NwS4fVj32qxIj/M4eR0=; b=m985p5Wfg77sL/jBzbbdWT9UGWGbjupu5hDLN1/e9eHbOa3gAxTd5LSGkwqHzRn2Rs1OYq nL+JNZ3984y7W+tXPIySGeP+/TdOq+LDHbPdcVEIbSnkuqGdwrNTD0xYrZ2Jfy9Wf3Gyzd f+WBzzBp6KRCzHghV/Uhwlz/AbxBjIOors4MWiIOTY7WOuiFkA9J87YMYnzW5EEuqkDOR2 Vx5lP1ZYlcQl7O1qoH1MjUvEnqCKk+1jTXNQ4uzCACGshLjFp0PWS1BRWTY8sv2IAtT1/G lIL0m50zL8L8ry4SAEjxp5zppDhGX1lSd6mnxHWibfs71SEjjfYtICBg4v7Xaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682943325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A3us2kBAcyk/Go0z7zR+7ck4NwS4fVj32qxIj/M4eR0=; b=rLsYGvchUNCSw3U+kqddHw5o1SA6OLFANYfaUkj4zJc/VgrAi5CX7O0trKCITzWLvgz/de 2/76wtLtnvQy+eWdQtcqmGhX/DU6sxiBYnKoh8uR4w+xdvvT6eN9RHHL6d99QysWRPWupj eOqAvlksuy3Qcju2O8e/1m7UE7/j8nHCMSsBpG8+i2w/uPvKiRJOpXJktRLC2l9QvWxQtF hjM2XsXi10wwOlvJbuVfXKUDFU1Knua2AUd3uXp6cx6vHiE/wZ1vFbx/d8Q02f89e5eSwU k5EbUevhhaYg73YmqRsv2jCaXLR9ZuRYyu89gvj9KfBwpMjTxeSFdW5Nagl8Kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682943325; a=rsa-sha256; cv=none; b=MjYhYXxMgyKQLp6amG5KL9T1aUDLW8LCZNgf8Os1/eUYBJSy5kYo5BXRWu4VP5qlmU+fya hvmkWAq5buTqyD0lWLkpZb3fWvO6BepdKEiekYSWlY2d9sWVnryKcdmW3DOp2QaiFMr7En YfyO2kMObaR+n65IAvzJN2RjtLlP8rlmrPqsEfom9I3sg+SJ3SmX91jQS3Yp3NrMf+qQbj pYnr8ujuHoSgBSWkCckPCzcefn+zuFGkoFoEXQsv/eWHZJA3nJl38b1dQmra+WcuF0HOfW tD6f+A/zotzG6cCL+rlUHf9gepw6kFKTx7FHBE10cAByq96elYq1435QOpPNYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q92Gh6V7rz14b0; Mon, 1 May 2023 12:15:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341CFOMV075015; Mon, 1 May 2023 12:15:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341CFOb7075014; Mon, 1 May 2023 12:15:24 GMT (envelope-from git) Date: Mon, 1 May 2023 12:15:24 GMT Message-Id: <202305011215.341CFOb7075014@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 5c4e8a631097 - stable/13 - ipv6: disable RFC 4620 nodeinfo by default List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5c4e8a6310973f22eb76835f1b0d5ba5dd9df2f7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5c4e8a6310973f22eb76835f1b0d5ba5dd9df2f7 commit 5c4e8a6310973f22eb76835f1b0d5ba5dd9df2f7 Author: Ed Maste AuthorDate: 2023-04-24 19:41:45 +0000 Commit: Ed Maste CommitDate: 2023-05-01 12:15:08 +0000 ipv6: disable RFC 4620 nodeinfo by default RFC 4620 is an experimental RFC that can be used to request information about a host, including: - the fully-qualified or single-component name - some set of the Responder's IPv6 unicast addresses - some set of the Responder's IPv4 unicast addresses This is not something that should be made available by default. PR: 257709 Submitted by: ruben@verweg.com Reviewed by: melifaro Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39778 (cherry picked from commit b73183d1a243d486e3889bd71800e94812f5fa17) --- sys/netinet6/in6_proto.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c index fb4f76dd698c..07ce80b6ea68 100644 --- a/sys/netinet6/in6_proto.c +++ b/sys/netinet6/in6_proto.c @@ -413,8 +413,7 @@ VNET_DEFINE(int, icmp6_rediraccept) = 1;/* accept and process redirects */ VNET_DEFINE(int, icmp6_redirtimeout) = 10 * 60; /* 10 minutes */ VNET_DEFINE(int, icmp6errppslim) = 100; /* 100pps */ /* control how to respond to NI queries */ -VNET_DEFINE(int, icmp6_nodeinfo) = - (ICMP6_NODEINFO_FQDNOK|ICMP6_NODEINFO_NODEADDROK); +VNET_DEFINE(int, icmp6_nodeinfo) = 0; VNET_DEFINE(int, icmp6_nodeinfo_oldmcprefix) = 1; /* From nobody Mon May 1 14:09:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q94pt4xXqz48ZsY; Mon, 1 May 2023 14:09: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 4Q94pt4G43z3PGF; Mon, 1 May 2023 14:09:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682950198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hjDwiRh8RloamFxaD8w+YDkk4wAOINhIZxHZtsg5oW0=; b=fXwu16WQ6Vplm1mgEL448JnJxcJ08XyKGAST72bDm+CTuy9nZGcH6OxH3gsPOvD0nKktQU WiFn4QWuvGk6Mb+8UtyjYHtQ7ODBFMqETnkzFFOP33y2sbrfdoSuyC05NXA9ikUbRM26sH DUkdwuEmGTYYpeOEJDBThXzuWThK27/SA4GfM7gVyybP2/29Ps2YPScjQiaFhMaphAu2KY UkBZNwn46aj87FmBYCuB5TBqKwgYjsG+QfXo1zLUm+UMpJXTBi8wOl9UB/2ehqewmoE/qU YS8uWwOhokPR5M3vPPcYIjf5ap2GgrATEcfR99sP491zNxUuynkBCb7Ddm+yLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682950198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hjDwiRh8RloamFxaD8w+YDkk4wAOINhIZxHZtsg5oW0=; b=fvSdtjLeyi/RCloBTwnfRPMaKLExc/BwWPvalPrN7cN4cZky4JrIuJOyeI8Fmu901mmLon T3Kp5k+U+YkmOn9qv4RHqaAQ8XFj5sLHO8IhvANWVn5v0khmFzFXvN3qwM+nhYJ+ewTUJh Eq5hSnGa7ZPO6B0nnakGG03QC1CFrA86Ei7kvXh+Qf5aJumP4voA6SmDYsYoawkakNJFWc jW3HMS212srXF0kbep5f5LZB7Kj7kHTm4tFzwn4DP1rH9yz+HExBaklHkA4WN7asWQCemK ejT4c82w40qDEcwKJ1ob3fq6VRC2nDcCKyRY3Hwf4f2ZHQ2cGNnGIxJ8dJzYoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682950198; a=rsa-sha256; cv=none; b=eRGiqKUFQR+VJ2jRf6UGKPonAoOWo1x5N96CKJnxydfDo2FHIlcevcxje2hdztZ5OXlNrC VRjAV0tTvl2sV+PhqD6sfnfnE5HVmihW4tiAjL+Jp7I/MxkMluR8gYkyWuIYo9uoq91TDk H7h5hkezCdApFucEbFhmWJUcABUcPJ8i3no8eXqukro+DevMRHWO7bT6p84JrqHTq3lsuM IFfa8doyO1qHDUVPSnQLrGPR2VZ4hZR4vV52zrWi9jQV2Uf2udSA8xOSW3PJUxzUarM6ja Xtxpde9Lk5fNlkvQw61/xYs/6XKQp9LJOO/Pp4c+MGF0oNaOx9MqoZ7NyDoCXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q94pt3LRxz17SL; Mon, 1 May 2023 14:09:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341E9waw057674; Mon, 1 May 2023 14:09:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341E9wop057673; Mon, 1 May 2023 14:09:58 GMT (envelope-from git) Date: Mon, 1 May 2023 14:09:58 GMT Message-Id: <202305011409.341E9wop057673@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 6a09a7f1e9a5 - main - netlink: always zero provided header buffers. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6a09a7f1e9a52fb25158ca60216c6b817f8c0b71 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=6a09a7f1e9a52fb25158ca60216c6b817f8c0b71 commit 6a09a7f1e9a52fb25158ca60216c6b817f8c0b71 Author: Alexander V. Chernikov AuthorDate: 2023-05-01 14:07:33 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-05-01 14:09:47 +0000 netlink: always zero provided header buffers. Reported by: KMSAN MFC after: 3 days --- sys/netlink/netlink_message_writer.h | 1 + sys/netlink/route/neigh.c | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/netlink/netlink_message_writer.h b/sys/netlink/netlink_message_writer.h index 57fc1bf342ea..92e43834efc7 100644 --- a/sys/netlink/netlink_message_writer.h +++ b/sys/netlink/netlink_message_writer.h @@ -225,6 +225,7 @@ nlmsg_reserve_data_raw(struct nl_writer *nw, size_t sz) void *data_ptr = &nw->data[nw->offset]; nw->offset += sz; + bzero(data_ptr, sz); return (data_ptr); } diff --git a/sys/netlink/route/neigh.c b/sys/netlink/route/neigh.c index 807c125cc3f0..db72bc9bfd4e 100644 --- a/sys/netlink/route/neigh.c +++ b/sys/netlink/route/neigh.c @@ -156,12 +156,9 @@ dump_lle_locked(struct llentry *lle, void *arg) ndm = nlmsg_reserve_object(nw, struct ndmsg); ndm->ndm_family = wa->family; - ndm->ndm_pad1 = 0; - ndm->ndm_pad2 = 0; ndm->ndm_ifindex = wa->ifp->if_index; ndm->ndm_state = lle_state_to_nl_state(wa->family, lle); ndm->ndm_flags = lle_flags_to_nl_flags(lle); - ndm->ndm_type = 0; switch (wa->family) { #ifdef INET From nobody Mon May 1 14:16:07 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q94y01lJgz48bcF; Mon, 1 May 2023 14:16: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 4Q94y01CzTz3Q4K; Mon, 1 May 2023 14:16:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682950568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EMzxwqnznXN6yYeDNWoCw3sHWd86KjeIep24/QNu1UU=; b=Sb7wYMcT9Kgd6uBL9l1oskUQJ5mEvoHbd+J/MpBXTfqMFyVCDfT7i8xLm9A9jFe8qlZmyD qj9rMRvfJgXN8hVya4XEAHZ04zFHGC/FKxUMyiZvl4T9d0w12VRrGYHJTIIr38ZB4Smvkn PBV2oJJemHe25U/ouGwYyiKY3De8G7Q33gYhj7bVCv0iqX8lECjj9uUSdtKAz9YAwIJG6z DQGBO5YoBBCMIsmzKMVVHi2GPMXyX1lLGOYs6gHYkWveEk19JsVHt7lQOneCkSFrHFkZdK jlz6wRvLJGuyIx0Y0wUDRkZHl0uRb1N/lsRynfAMI6QSYLLENFeUAOzHBd5HyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682950568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EMzxwqnznXN6yYeDNWoCw3sHWd86KjeIep24/QNu1UU=; b=jVAQCv29YsiVcvZLfXf99z2zU6Qd0FqFvsD1aoEmM29ptXaT1pFpRbYLcgbEWoaramXfHi Ag25R4c8DdCqqwhjQEiN4ZAkIHvnq5I330vjrEqGyCQUehZ54yv36EpL3zezO0FHhSVzAb belg9YmTAoDraQYMNpiY4El7IEMg8IEvs0HEQ17k3oC3mtYbw7izWcFbUXlCJnHzvVcZro IH6PVTSYhyxM6DFiQoRMyhNtD8owiYOEk7Zf1KOjagXHMjdWf+AqPrxOSnvX4KzEdSi/dT 8NOEfL8QYY4nsIQ3W/QtIem8MSqfuAiT6FLdeEZSvyhv/GFtAL1RoNPvu3nYnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682950568; a=rsa-sha256; cv=none; b=r1NlrNG0ABBw9NuRdVILRbN/6Fdn3xWcUI9hKX44sP/qIoxV3La9z/R8BA8PbJO6oL75FA cXzIn0bflemctrS5F3xvnpaHyyrdKg3m/wT5VFVjsQCAbttksRTS1IYgrGgD0rlUwZVuKI JdiIeW/VEAVzRoHd5QSmNYr011E9L9XceHTYUMN9GCHIWFaXWgWAq4bNJzSHBgLMIoPQ6w uDNht6Pe7VffxTnao5YM+PFMsRUnty5cSdK71SNvhP+oNJdsTNvlO36Hpn89UTQZJ7xPeK 0QfejyLbHWUyeoNsjRbi7AEI9tAv2Jqous9GDyTb1VZ2S47jvmFP5/EWvZg/qA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q94y001Cpz17sK; Mon, 1 May 2023 14:16:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341EG7xw073567; Mon, 1 May 2023 14:16:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341EG7me073566; Mon, 1 May 2023 14:16:07 GMT (envelope-from git) Date: Mon, 1 May 2023 14:16:07 GMT Message-Id: <202305011416.341EG7me073566@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: db0a2bfd0c6d - main - pf: reduce number of hashing operations when handling source nodes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: db0a2bfd0c6df48ae1c5346198b97c83f746d219 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=db0a2bfd0c6df48ae1c5346198b97c83f746d219 commit db0a2bfd0c6df48ae1c5346198b97c83f746d219 Author: Kajetan Staszkiewicz AuthorDate: 2023-05-01 14:07:42 +0000 Commit: Kristof Provost CommitDate: 2023-05-01 14:15:30 +0000 pf: reduce number of hashing operations when handling source nodes Reduce number of hashing operations when handling source nodes by always having a pointer to the hash row mutex in the source node. Provide macros for handling and asserting the mutex. Calculate the hash only once in pf_find_src_node() and then use this hash in subsequent operations. Cherry-picked from development of D39880 Reviewed by: kp, mjg Sponsored by: InnoGames GmbH Differential Revision: https://reviews.freebsd.org/D39888 --- sys/net/pfvar.h | 39 ++++++++++++++++++++++++++++++++++- sys/netpfil/pf/pf.c | 55 ++++++++++++++++++++++++-------------------------- sys/netpfil/pf/pf_lb.c | 3 ++- 3 files changed, 66 insertions(+), 31 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index a82735f71c8c..c1550f2c30e6 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -375,6 +375,41 @@ struct pfi_dynaddr { #define PF_STATE_LOCK_ASSERT(s) do {} while (0) #endif /* INVARIANTS */ +#ifdef INVARIANTS +#define PF_SRC_NODE_LOCK(sn) \ + do { \ + struct pf_ksrc_node *_sn = (sn); \ + struct pf_srchash *_sh = &V_pf_srchash[ \ + pf_hashsrc(&_sn->addr, _sn->af)]; \ + MPASS(_sn->lock == &_sh->lock); \ + mtx_lock(_sn->lock); \ + } while (0) +#define PF_SRC_NODE_UNLOCK(sn) \ + do { \ + struct pf_ksrc_node *_sn = (sn); \ + struct pf_srchash *_sh = &V_pf_srchash[ \ + pf_hashsrc(&_sn->addr, _sn->af)]; \ + MPASS(_sn->lock == &_sh->lock); \ + mtx_unlock(_sn->lock); \ + } while (0) +#else +#define PF_SRC_NODE_LOCK(sn) mtx_lock((sn)->lock) +#define PF_SRC_NODE_UNLOCK(sn) mtx_unlock((sn)->lock) +#endif + +#ifdef INVARIANTS +#define PF_SRC_NODE_LOCK_ASSERT(sn) \ + do { \ + struct pf_ksrc_node *_sn = (sn); \ + struct pf_srchash *_sh = &V_pf_srchash[ \ + pf_hashsrc(&_sn->addr, _sn->af)]; \ + MPASS(_sn->lock == &_sh->lock); \ + PF_HASHROW_ASSERT(_sh); \ + } while (0) +#else /* !INVARIANTS */ +#define PF_SRC_NODE_LOCK_ASSERT(sn) do {} while (0) +#endif /* INVARIANTS */ + extern struct mtx_padalign pf_unlnkdrules_mtx; #define PF_UNLNKDRULES_LOCK() mtx_lock(&pf_unlnkdrules_mtx) #define PF_UNLNKDRULES_UNLOCK() mtx_unlock(&pf_unlnkdrules_mtx) @@ -845,6 +880,7 @@ struct pf_ksrc_node { u_int32_t expire; sa_family_t af; u_int8_t ruletype; + struct mtx *lock; }; #endif @@ -2120,7 +2156,8 @@ extern struct pf_kstate *pf_find_state_all(struct pf_state_key_cmp *, extern bool pf_find_state_all_exists(struct pf_state_key_cmp *, u_int); extern struct pf_ksrc_node *pf_find_src_node(struct pf_addr *, - struct pf_krule *, sa_family_t, int); + struct pf_krule *, sa_family_t, + struct pf_srchash **, bool); extern void pf_unlink_src_node(struct pf_ksrc_node *); extern u_int pf_free_src_nodes(struct pf_ksrc_node_list *); extern void pf_print_state(struct pf_kstate *); diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index a8da800dd814..e5f2a5ea57a0 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -683,6 +683,10 @@ pf_src_connlimit(struct pf_kstate **state) int bad = 0; PF_STATE_LOCK_ASSERT(*state); + /* + * XXXKS: The src node is accessed unlocked! + * PF_SRC_NODE_LOCK_ASSERT((*state)->src_node); + */ (*state)->src_node->conn++; (*state)->src.tcp_est = 1; @@ -827,25 +831,25 @@ pf_overload_task(void *v, int pending) */ struct pf_ksrc_node * pf_find_src_node(struct pf_addr *src, struct pf_krule *rule, sa_family_t af, - int returnlocked) + struct pf_srchash **sh, bool returnlocked) { - struct pf_srchash *sh; struct pf_ksrc_node *n; counter_u64_add(V_pf_status.scounters[SCNT_SRC_NODE_SEARCH], 1); - sh = &V_pf_srchash[pf_hashsrc(src, af)]; - PF_HASHROW_LOCK(sh); - LIST_FOREACH(n, &sh->nodes, entry) + *sh = &V_pf_srchash[pf_hashsrc(src, af)]; + PF_HASHROW_LOCK(*sh); + LIST_FOREACH(n, &(*sh)->nodes, entry) if (n->rule.ptr == rule && n->af == af && ((af == AF_INET && n->addr.v4.s_addr == src->v4.s_addr) || (af == AF_INET6 && bcmp(&n->addr, src, sizeof(*src)) == 0))) break; + if (n != NULL) { n->states++; - PF_HASHROW_UNLOCK(sh); - } else if (returnlocked == 0) - PF_HASHROW_UNLOCK(sh); + PF_HASHROW_UNLOCK(*sh); + } else if (returnlocked == false) + PF_HASHROW_UNLOCK(*sh); return (n); } @@ -865,17 +869,16 @@ static int pf_insert_src_node(struct pf_ksrc_node **sn, struct pf_krule *rule, struct pf_addr *src, sa_family_t af) { + struct pf_srchash *sh = NULL; KASSERT((rule->rule_flag & PFRULE_SRCTRACK || rule->rpool.opts & PF_POOL_STICKYADDR), ("%s for non-tracking rule %p", __func__, rule)); if (*sn == NULL) - *sn = pf_find_src_node(src, rule, af, 1); + *sn = pf_find_src_node(src, rule, af, &sh, true); if (*sn == NULL) { - struct pf_srchash *sh = &V_pf_srchash[pf_hashsrc(src, af)]; - PF_HASHROW_ASSERT(sh); if (!rule->max_src_nodes || @@ -904,6 +907,9 @@ pf_insert_src_node(struct pf_ksrc_node **sn, struct pf_krule *rule, rule->max_src_conn_rate.limit, rule->max_src_conn_rate.seconds); + MPASS((*sn)->lock == NULL); + (*sn)->lock = &sh->lock; + (*sn)->af = af; (*sn)->rule.ptr = rule; PF_ACPY(&(*sn)->addr, src, af); @@ -929,8 +935,8 @@ pf_insert_src_node(struct pf_ksrc_node **sn, struct pf_krule *rule, void pf_unlink_src_node(struct pf_ksrc_node *src) { + PF_SRC_NODE_LOCK_ASSERT(src); - PF_HASHROW_ASSERT(&V_pf_srchash[pf_hashsrc(&src->addr, src->af)]); LIST_REMOVE(src, entry); if (src->rule.ptr) counter_u64_add(src->rule.ptr->src_nodes, -1); @@ -1982,7 +1988,6 @@ static void pf_src_tree_remove_state(struct pf_kstate *s) { struct pf_ksrc_node *sn; - struct pf_srchash *sh; uint32_t timeout; timeout = s->rule.ptr->timeout[PFTM_SRC_NODE] ? @@ -1991,21 +1996,19 @@ pf_src_tree_remove_state(struct pf_kstate *s) if (s->src_node != NULL) { sn = s->src_node; - sh = &V_pf_srchash[pf_hashsrc(&sn->addr, sn->af)]; - PF_HASHROW_LOCK(sh); + PF_SRC_NODE_LOCK(sn); if (s->src.tcp_est) --sn->conn; if (--sn->states == 0) sn->expire = time_uptime + timeout; - PF_HASHROW_UNLOCK(sh); + PF_SRC_NODE_UNLOCK(sn); } if (s->nat_src_node != s->src_node && s->nat_src_node != NULL) { sn = s->nat_src_node; - sh = &V_pf_srchash[pf_hashsrc(&sn->addr, sn->af)]; - PF_HASHROW_LOCK(sh); + PF_SRC_NODE_LOCK(sn); if (--sn->states == 0) sn->expire = time_uptime + timeout; - PF_HASHROW_UNLOCK(sh); + PF_SRC_NODE_UNLOCK(sn); } s->src_node = s->nat_src_node = NULL; } @@ -4805,31 +4808,25 @@ csfailed: uma_zfree(V_pf_state_key_z, nk); if (sn != NULL) { - struct pf_srchash *sh; - - sh = &V_pf_srchash[pf_hashsrc(&sn->addr, sn->af)]; - PF_HASHROW_LOCK(sh); + PF_SRC_NODE_LOCK(sn); if (--sn->states == 0 && sn->expire == 0) { pf_unlink_src_node(sn); uma_zfree(V_pf_sources_z, sn); counter_u64_add( V_pf_status.scounters[SCNT_SRC_NODE_REMOVALS], 1); } - PF_HASHROW_UNLOCK(sh); + PF_SRC_NODE_UNLOCK(sn); } if (nsn != sn && nsn != NULL) { - struct pf_srchash *sh; - - sh = &V_pf_srchash[pf_hashsrc(&nsn->addr, nsn->af)]; - PF_HASHROW_LOCK(sh); + PF_SRC_NODE_LOCK(nsn); if (--nsn->states == 0 && nsn->expire == 0) { pf_unlink_src_node(nsn); uma_zfree(V_pf_sources_z, nsn); counter_u64_add( V_pf_status.scounters[SCNT_SRC_NODE_REMOVALS], 1); } - PF_HASHROW_UNLOCK(sh); + PF_SRC_NODE_UNLOCK(nsn); } return (PF_DROP); diff --git a/sys/netpfil/pf/pf_lb.c b/sys/netpfil/pf/pf_lb.c index 186634edbd56..ca8593a1c37d 100644 --- a/sys/netpfil/pf/pf_lb.c +++ b/sys/netpfil/pf/pf_lb.c @@ -348,12 +348,13 @@ pf_map_addr(sa_family_t af, struct pf_krule *r, struct pf_addr *saddr, { struct pf_kpool *rpool = &r->rpool; struct pf_addr *raddr = NULL, *rmask = NULL; + struct pf_srchash *sh = NULL; /* Try to find a src_node if none was given and this is a sticky-address rule. */ if (*sn == NULL && r->rpool.opts & PF_POOL_STICKYADDR && (r->rpool.opts & PF_POOL_TYPEMASK) != PF_POOL_NONE) - *sn = pf_find_src_node(saddr, r, af, 0); + *sn = pf_find_src_node(saddr, r, af, &sh, false); /* If a src_node was found or explicitly given and it has a non-zero route address, use this address. A zeroed address is found if the From nobody Mon May 1 14:30:35 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q95Gh287cz48c3y; Mon, 1 May 2023 14:30:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q95Gh1Zw7z3Qwc; Mon, 1 May 2023 14:30:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682951436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TuguMgBHchX0FelwnzNdQsYfKFxSnAa5IQ/hjnB8zL4=; b=wNKuAiPKJ+bK4uzy1+k+ENA4vJCmtg16D1+gWS5aqCH6I/VuL2e4LDtrSa4POYzRw+hs73 74cO9CnAZa0SjXgRJNIitQZO3BDZ0PefWc9QeHjrTAsT+SlGlCisSzK18BXjyZ2Uqn/JTX FuLryih9Ue4FMWJQZkmchd2EU8egGgqurvxk85l0wutDmW3MWP2IAPcK93bSBV0Q/+wWuq R0GupO3+f6WdKerXivMDPseuw/u+tN3+GBY843TyC/rF8orzshfv26g0ez+FMp0lqsA7YS paHm56CgkRVoX+1t+RB02+w5YSf0vN/m0cwPM7ZZREbxR2sGqY/LU05mS83nTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682951436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TuguMgBHchX0FelwnzNdQsYfKFxSnAa5IQ/hjnB8zL4=; b=flws97EwH9QV1m1hPx6P79EyDgFysjXe5fD3TjFV7gVyl13ncZf+uWVrukHEGuj6egpJE+ DyKC5Ie0QeMdOfvc557tVHJqT9OISjBpK3A/a1JlmD3gKL41EZxHtI/Y8vXbqnUQOfbgyX PxyuaazgPNa1nWZuMdHWm5WjvTjVcMC1JVB4mfDW56mnI3dPGAEiUXpiQkuN/u7Y+6IJIq 2BQfaVSYH2LleEMAId9NnMxfdg3ynIXPbZ2iMJfeXxzgnzfbEDKAYFS82/librONaBQunL gsF81G2KkmEFq86ivdLjAhjeDfY64smhtso5Db16yUUhPG1XEqMTEh+7GLEJQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682951436; a=rsa-sha256; cv=none; b=nfgqxOHY9ME7OTzlXvW8NgPK8h6e+6bN1M4BAHP90nnSOsRTX4+LlKLaDLlPDs042Q2tqq rj9oU7WjPnpNFd9/q2wxVPP1xxa0kiW7A+eGrPys6yx5gi2IrPW6z3oAxQWgSOnV+xgUHi rtT9VWV1nZELkScIRDGUmICesDQvwwrKeIJ4O8cFYDItWc/I5B7HDjtxYBaTtcmqp+pnKX tv3KrCZ5o7QrnkCoB3aMiOc9YEoleONbMJUkmgFUyEA9e5ED+76SehKoMmtvnKt1rRpsjE ZQ/j/cIJ0jDIi0dQPASQRxqXR73YVrOEWwiKXhXs3L70a3AC3qQAW+o9GJgw0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q95Gh0gB6z17h4; Mon, 1 May 2023 14:30:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341EUZZu099883; Mon, 1 May 2023 14:30:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341EUZ1W099855; Mon, 1 May 2023 14:30:35 GMT (envelope-from git) Date: Mon, 1 May 2023 14:30:35 GMT Message-Id: <202305011430.341EUZ1W099855@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: 9c353fa4a940 - main - libc: Fix a documentation spelling mistake List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c353fa4a94018dd963182d19eaa5ed59726062f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9c353fa4a94018dd963182d19eaa5ed59726062f commit 9c353fa4a94018dd963182d19eaa5ed59726062f Author: Tom Hukins AuthorDate: 2023-03-29 13:38:12 +0000 Commit: Ed Maste CommitDate: 2023-05-01 14:30:15 +0000 libc: Fix a documentation spelling mistake Pull Request: https://github.com/freebsd/freebsd-src/pull/704 --- lib/libc/softfloat/timesoftfloat.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/softfloat/timesoftfloat.txt b/lib/libc/softfloat/timesoftfloat.txt index addc64740c6d..ae992f983c11 100644 --- a/lib/libc/softfloat/timesoftfloat.txt +++ b/lib/libc/softfloat/timesoftfloat.txt @@ -60,7 +60,7 @@ of usage is written. It is also possible to evaluate all machine functions in a single invocation as explained in the section _Function_Sets_ later in this document. -Ordinarily, a function's speed will be evaulated separately for each of +Ordinarily, a function's speed will be evaluated separately for each of the four rounding modes, one after the other. If the rounding mode is not supposed to have any affect on the results of a function--for instance, some operations do not require rounding--only the nearest/even rounding mode From nobody Mon May 1 14:30:37 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q95Gj3338z48c6V; Mon, 1 May 2023 14:30: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 4Q95Gj2XtDz3RJq; Mon, 1 May 2023 14:30:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682951437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DKIxs4ZRtThXAFonYvTFRR226sPeh7zU7vKrFaBcGyc=; b=FsWkBf9CoA0ICx0/7PFdLaIzX4jeIEnFZBPFEdWLJkwiRNlretZAJ2NjK4WB9Fqdijcefr fgcHDt4RLolRWLFh29aXTcr83zY1xTg5AdpKUGvIY/C60+WFEn5h77mGsrUbmjpqvgjUy5 fC7l2i+C8/bMlfIeS/JOKzvr/GQ6ORlOefCulw1iP9/Bqw/1vKH0Udw1fBXv7LEIVmHZ+i MJyP0hU0GpQ6DDQ5m+FSHwfgMHqTveQRAZK8dnMljt9lAjjqMYpLFVpqF6MDryMhI5T92A tDu5gMYyW3Vv8HuXJ4/oFLvFxvFrfHEXhfV8Mogq6sx9+7LuQiOz0IXX/I8qnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682951437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DKIxs4ZRtThXAFonYvTFRR226sPeh7zU7vKrFaBcGyc=; b=VaOt62JZxhdVidLZm8iLxG9xoSvLHuYtbSodKcR0sFektwBN6eB6eA0C8Q8dDZONf7pgdu TB5YR8xjUV5UujVEapMTNKmGNcgF1C7EtFqcCo2owlKzHdcfC8GvDZL/VopoV7CkZws270 Hlw7pKaO4GwsNrTs6e25UqLl6GT0C9wJLNIE6uoNLsWYFLWPqcEOIXJYnbpKYB2D1XaaZL ZgDgK4AhfaOLjv3IfWNpUh1TKamvVADMBYBHqfzTBuKcTII90V7imJi2VxpGR+PyNCUJ7B vm+ulA9E71vO9IiR+lBH12yuL5hcs5ZmsNH70LH5kJDBm3agECKWwSPmZHUsnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682951437; a=rsa-sha256; cv=none; b=cuBuRJOSdiK/DQzr/yQojrueAYeNRrWc4isaSAOEy8H0i5CXRhrokQJJ6xkhnwSndy7nqP Eo0kmbk5M5txxeX7o/lxZf4dTMGIFhxqj+fHnAxQycmAOJBaqOP6XJ3mBEW5zC70YLrnt0 sZ5nOXKRLC8bRHfn/O5d89LccOsxr2qp3uWfw5201fSKxW4qIXKOSHCb31IHcGRt+IFvNu fQFoaZFU7TyO03wYxUSBMkP/tm+VOpbv4Cb2JSl+F9CG7oER/ORaoy/eORkng/yBPMT1Oq Op9slhsRZSVYQ1batx0dSlG4WHYveMJw2sQD60SB66b8zSXURSGTY06WdDMFfw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q95Gj1dvlz1884; Mon, 1 May 2023 14:30:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341EUb1m000324; Mon, 1 May 2023 14:30:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341EUb0K000323; Mon, 1 May 2023 14:30:37 GMT (envelope-from git) Date: Mon, 1 May 2023 14:30:37 GMT Message-Id: <202305011430.341EUb0K000323@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: 7626863e1983 - main - pf: Fix a spelling mistake in a comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7626863e198384cada38c5f8dd2aaed20029553a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7626863e198384cada38c5f8dd2aaed20029553a commit 7626863e198384cada38c5f8dd2aaed20029553a Author: Tom Hukins AuthorDate: 2023-03-29 14:00:00 +0000 Commit: Ed Maste CommitDate: 2023-05-01 14:30:15 +0000 pf: Fix a spelling mistake in a comment Pull Request: https://github.com/freebsd/freebsd-src/pull/704 --- sys/netpfil/pf/pf_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index c800d2048547..d5cea7d2a215 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -2050,7 +2050,7 @@ pf_rule_to_krule(const struct pf_rule *rule, struct pf_krule *krule) pf_pool_to_kpool(&rule->rpool, &krule->rpool); - /* Don't allow userspace to set evaulations, packets or bytes. */ + /* Don't allow userspace to set evaluations, packets or bytes. */ /* kif, anchor, overload_tbl are not copied over. */ krule->os_fingerprint = rule->os_fingerprint; From nobody Mon May 1 14:30:36 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q95Gm6P7fz48c2L; Mon, 1 May 2023 14:30:40 +0000 (UTC) (envelope-from garga@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 4Q95Gm5cFTz3h6P; Mon, 1 May 2023 14:30:40 +0000 (UTC) (envelope-from garga@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682951440; h=from:from:reply-to:subject: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=9fR9AZwin2BSDMTJITCZKzf++YtMmGyCaM1gnKEt7yA=; b=t5HPJBWWX1Vu2dBJ5sR1zbAiCA57a/qkHAdIZORpXStTmjnOnkcMwTbI3KrlRixtBYs6wl dngOpXPlW7pOsW+LDXxganz+ja3Fcxii2Tm2LM9QLgA/09Bga8lKW6Rsm0DPsKLZihCB27 JykFF8fKLZMc2QrWgdFgd57P+2afBUWhAWBcWEIm45TCv6tX1oKjmOOiXKWTOcJTkgOOJv PZ/tpCsv4t/7mOob3cqZPOv1LwSixrs1s8XSQZJJu9uC0GPUBDAENI5T5mP/AQiteULO2L vuEdVoB5911VyWUsfLkWIN//sAdakgts2NeNZneVLH9+UAQzxsH04ezQ92u/IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682951440; h=from:from:reply-to:subject: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=9fR9AZwin2BSDMTJITCZKzf++YtMmGyCaM1gnKEt7yA=; b=wMGfXfqozIzFJ1OazD8j43oCWfNQ3PqkeRDDjED3TrtsHOQO3q7ElY0WXdegtZTLClAT8q EZHnIayL/4CibMa6LB/p9XqPT48igWJSX41aenis2ZT7LVGgXDn4kT/ke1RxXj1GccDvlk 1SGFPGKdBAnjJXqycZOPmnWvQOjuOWh/eSbLEvzDjb5iL/TTiNTcpFlsSDWnQ1/R5juoG5 digiv1YdoI0mI0Z23nFvap1xTBPzdHzO5WChVhH/JJuDCzPCQVoRKz8H0vXRW7G4051mTF aottvwqlS3NForztXy+M1wu1zpc3TcMg/Cj0CNoMoCThWgKGwxqq8DeVykv/2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682951440; a=rsa-sha256; cv=none; b=a7xMVKgGylpeVRvUjMzaOGCOJe1CJrNQlDNobzTw1oi8owplJjasy5QEOlbBXDCumBO69p 7sUrt3Ua/UimKSYtg6U8oGu+/CBjmnzmgmm/BD7MB8WVHcoNoiKYMFoKc0VLFCRlJnVUU/ cT1rYQYwaWcKmCISwjASq8L0VVkH27/dWa1fC8SDaq9EPqsmCPmCQOgX7ghXcNxpLUaL2T iaOPqo4RAmju75jCsYqoqeGlQnPZiTXlAzWqMdk8m3MW+NvjEab0/K1tjbalUQYYQsVN3+ QKsoarlKb6ANdJokE71iDxTu8l4MxVNsvdbLWwA0ahPhjAnpkm93VX8qjrzuIg== Received: from [172.21.4.170] (dynamic-177-53-82-16.telecominternet.net.br [177.53.82.16]) (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: garga) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q95Gm09xpzlTZ; Mon, 1 May 2023 14:30:39 +0000 (UTC) (envelope-from garga@FreeBSD.org) Message-ID: <58128e85-82e3-e529-2d65-1145e6c84c09@FreeBSD.org> Date: Mon, 1 May 2023 11:30:36 -0300 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 6a09a7f1e9a5 - main - netlink: always zero provided header buffers. To: "Alexander V. Chernikov" , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202305011409.341E9wop057673@gitrepo.freebsd.org> Content-Language: en-US From: Renato Botelho In-Reply-To: <202305011409.341E9wop057673@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On 01/05/23 11:09, Alexander V. Chernikov wrote: > The branch main has been updated by melifaro: > > URL: https://cgit.FreeBSD.org/src/commit/?id=6a09a7f1e9a52fb25158ca60216c6b817f8c0b71 > > commit 6a09a7f1e9a52fb25158ca60216c6b817f8c0b71 > Author: Alexander V. Chernikov > AuthorDate: 2023-05-01 14:07:33 +0000 > Commit: Alexander V. Chernikov > CommitDate: 2023-05-01 14:09:47 +0000 > > netlink: always zero provided header buffers. > > Reported by: KMSAN > MFC after: 3 days > --- > sys/netlink/netlink_message_writer.h | 1 + > sys/netlink/route/neigh.c | 3 --- > 2 files changed, 1 insertion(+), 3 deletions(-) > > diff --git a/sys/netlink/netlink_message_writer.h b/sys/netlink/netlink_message_writer.h > index 57fc1bf342ea..92e43834efc7 100644 > --- a/sys/netlink/netlink_message_writer.h > +++ b/sys/netlink/netlink_message_writer.h > @@ -225,6 +225,7 @@ nlmsg_reserve_data_raw(struct nl_writer *nw, size_t sz) > > void *data_ptr = &nw->data[nw->offset]; > nw->offset += sz; > + bzero(data_ptr, sz); At first look, this line seems to be indented wrong. But looking at cgit web interface it seems that other lines are wrong and this is correct. -- Renato Botelho From nobody Mon May 1 14:38:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q95SB5mzfz48c4H; Mon, 1 May 2023 14: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 4Q95SB5Gy8z3j8q; Mon, 1 May 2023 14: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=1682951930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+5TcBpo1Qaw09UNKEM7pxtp/IMe+pV8HHrCyh37U5vo=; b=DkV6Hkx8iCecwQpxBYW9Jg1n3emudVU8Mmxsb7eH0SLViF2ptx40FF5FeFS2fYCqqCR73z DYSEpdPkmMaG3YSY2rO9wWEGPznXzXmHcAGf4RzKgSvCxaZHk5Ieslq6Yg6rTdwouaZ31H T1c0OZ8KPD4rRYSEClhNyN5BPWYxUVe/v9tP4HKxFdF2v2LtJAIayKnLBCvo0BCwdCzeLs EKsKrvpeFoffXCTikijzDFqLP9jIzw5Wjem5pH5BQLrKJH5WVKCgLsKYR4SuB37qi3imto UfRnPWU9OAzHMw8D1lW4j/u0Mq6aKm55r8wWWC2vh3a8qrABxT4fbGp8sTJMEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682951930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+5TcBpo1Qaw09UNKEM7pxtp/IMe+pV8HHrCyh37U5vo=; b=b5wOr+9g9Oj+xxd6mwv0jR7GZRi+0XeDPlmUQClukw/ZaWB98lUo8m7pCJq5c+XthQiHcX sxg+vKGqgntUGOcBWYqIwZJJd/C9rl+r4QLVcIoTdaqlsUHstMFtv6hSqH4/STSViehrWe REvah5ZNCrWiFg2EqyHRO73CrA40mF9KVQIbFQk7NwvWmD5d0pnppaX7aqxfcsgkIpeS/J wq7iLONJbWjgNxW5As729gy06ZhCKs4HqkrYVlk05VHveKfHvVxQDWCgRGms9Uk29E+znB JlTQMivzNTUO5humu2YG5PL7Sxna9ZdsKjtAVqvBwa1hElqEFsHeJdDtEXILZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682951930; a=rsa-sha256; cv=none; b=kVoqV1EgMd6BoO6P7a1u6GF+vBpqpytgdF83o5ocWhwsAa6C26j4hr59/3oMFiWi5r71+m 6p0qQmUXkXk5M1s+Hhfxx5SmmQQQj0MlDbITwOD9D2uzhsq3OZ8qee5RWvFR7WLFpLKKDU lEWagsXazDZTdTURQHKOcVIUnal1qheBW6pNv+L0EVyNvyX28HzDLgdOWUEQ/zlCAhddcQ 5xvMfKDPVbQWnmB58lWLP/MQ7QPntgXLCqng+5vrb6HPLB+nhYuZSy/SqkaWCnDjB+mL/o 6YRazDPulV7KB+M3vW3QiH3xXKdbvlgieHTfDXPo+NbQDTNX8AmMwVCeaDklCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q95SB4LXDz17mv; Mon, 1 May 2023 14:38:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341EcopH006999; Mon, 1 May 2023 14:38:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341EcoCH006998; Mon, 1 May 2023 14:38:50 GMT (envelope-from git) Date: Mon, 1 May 2023 14:38:50 GMT Message-Id: <202305011438.341EcoCH006998@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: a58648a68b4c - main - wlan(4): Add more related drivers to "See also" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a58648a68b4c73d14c31c4af07f31479393bc376 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a58648a68b4c73d14c31c4af07f31479393bc376 commit a58648a68b4c73d14c31c4af07f31479393bc376 Author: Tom Hukins AuthorDate: 2023-04-19 19:47:24 +0000 Commit: Ed Maste CommitDate: 2023-05-01 14:38:09 +0000 wlan(4): Add more related drivers to "See also" Pull Request: https://github.com/freebsd/freebsd-src/pull/721 --- share/man/man4/wlan.4 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/man/man4/wlan.4 b/share/man/man4/wlan.4 index d7a186a34efd..7c12e8b1f7f9 100644 --- a/share/man/man4/wlan.4 +++ b/share/man/man4/wlan.4 @@ -174,6 +174,7 @@ Stations implementing earlier drafts (e.g., Linux) may be incompatible. .Xr bwn 4 , .Xr ipw 4 , .Xr iwi 4 , +.Xr iwlwifi 4 , .Xr iwm 4 , .Xr iwn 4 , .Xr malo 4 , @@ -182,6 +183,7 @@ Stations implementing earlier drafts (e.g., Linux) may be incompatible. .Xr otus 4 , .Xr ral 4 , .Xr rsu 4 , +.Xr rtw88 4 , .Xr rtwn 4 , .Xr rum 4 , .Xr run 4 , From nobody Mon May 1 14:47:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q95dy1bw0z48cyL; Mon, 1 May 2023 14:47: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 4Q95dx6X7Nz3jyM; Mon, 1 May 2023 14:47:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682952437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DBNhsOdLw8Hdp7zFRgI1G5CyinQUf8gOokYlkD00u/Q=; b=Wn51MT+JUl+LVzj/YCbOvXe+tMVGPSKZ9xNYAfUcJLWMSbc6NmvURjqx0CZ8fLlP1y/3fS tBrOAY5LeulqqdLKwJgYyvq+Vc5642JALTMoX0pTL2/33zobjujvnccM+N/jpEpQViURp5 Di2knVn3KZPdWL4NHz8YM8cc/5LIZY4NVcRGu5a1xdndcBzxwhzMR+LdS94MGYK1ShyoVe 1Zvt83mEFDbZWVA3Oc4lQmzIMRYW8p0gzWca7CYAKIFoj4QSk7EAPDNKFQ+Ixj83oe6Z4y Ob7wkaTO5E/GXgfE21qjl1t9AqX3kt2fxG+uz6qhlU8ikh+925dxLxoHq6LZ3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682952437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DBNhsOdLw8Hdp7zFRgI1G5CyinQUf8gOokYlkD00u/Q=; b=mQz7H1flKZewYG2Dh4WzN+osoy4wDReDSI80ZarYuUuqQD5oYmq4wqrte+s+3LMbZRDvoh s8bM8SV6J3q9owDCybCeZsWEIZ2mZjOXf46otumOlM979Q/NSY3i6bkTna+TlwGXok9f/K NYMiGasWG+I240hG1cWkNuNqJSnrRXdYYayrQwoGP5EqOa8Tu7ykcvJ9Eaz3mOZtrxhJAT r8UR5o+i4dLOacKMMJdMtgm085VTG9J9HjZ5XdcAG1PGCJ2CwoCZ4RhhESW1AYdj+bUVLf +e1oc7DYF1NX1bYh+UlYNsau0adyVSsTysJ7T9rd++gQbpH77dmUHVRE7syzzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682952437; a=rsa-sha256; cv=none; b=VxRFaRuYUMGSM3ka5nw87QaiubpvVrOFy6IFGc65e23YUJRMx/vHBn81gazhYwi5t4oV0c qO3qeg/gM4C5yx5Zb3V4cVVy+4JNDS2d75t7DDsAKr/xvQXQjeYgku0ngUHlqV4ueKoOxa 8Wu/X5b9zFx0ScJXHzMzAbtiZsfSJRV+Z94oQMzGvAm3aP2Sjb5z6YmunZr4ufzqHN0+Qs sRUULCvBoc1lSGN7lVX5Ms8JqtJJvlJM3ehO6/HGiiYqo7e7sMpbaVGZpOc3eBWRoVxoY4 Fd7ClGN3QiBWlf4XsOWU7L6Bas7XMgSHxHNZ4zA7rlC2Qo9y7tEXS0Y6ytY3Xg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q95dx5Tzxz182P; Mon, 1 May 2023 14:47:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341ElHqg023341; Mon, 1 May 2023 14:47:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341ElHPM023339; Mon, 1 May 2023 14:47:17 GMT (envelope-from git) Date: Mon, 1 May 2023 14:47:17 GMT Message-Id: <202305011447.341ElHPM023339@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 88406e631e93 - main - netlink: whitespace fix in netlink_message_writer.h. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: melifaro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 88406e631e93e08deee9fde97b12e3e1bf6b0590 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=88406e631e93e08deee9fde97b12e3e1bf6b0590 commit 88406e631e93e08deee9fde97b12e3e1bf6b0590 Author: Alexander V. Chernikov AuthorDate: 2023-05-01 14:45:45 +0000 Commit: Alexander V. Chernikov CommitDate: 2023-05-01 14:47:11 +0000 netlink: whitespace fix in netlink_message_writer.h. Reported by: garga MFC after: 2 weeks --- sys/netlink/netlink_message_writer.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/sys/netlink/netlink_message_writer.h b/sys/netlink/netlink_message_writer.h index 92e43834efc7..d64400f3677e 100644 --- a/sys/netlink/netlink_message_writer.h +++ b/sys/netlink/netlink_message_writer.h @@ -186,7 +186,7 @@ nlmsg_reply(struct nl_writer *nw, const struct nlmsghdr *hdr, int payload_len) hdr->nlmsg_flags, payload_len)); } -#define nlmsg_data(_hdr) ((void *)((_hdr) + 1)) +#define nlmsg_data(_hdr) ((void *)((_hdr) + 1)) /* * KPI similar to mtodo(): @@ -196,7 +196,7 @@ nlmsg_reply(struct nl_writer *nw, const struct nlmsghdr *hdr, int payload_len) static inline int nlattr_save_offset(const struct nl_writer *nw) { - return (nw->offset - ((char *)nw->hdr - nw->data)); + return (nw->offset - ((char *)nw->hdr - nw->data)); } static inline void * @@ -218,16 +218,16 @@ nlmsg_reserve_data_raw(struct nl_writer *nw, size_t sz) { sz = NETLINK_ALIGN(sz); - if (__predict_false(nw->offset + sz > nw->alloc_len)) { + if (__predict_false(nw->offset + sz > nw->alloc_len)) { if (!nlmsg_refill_buffer(nw, sz)) return (NULL); - } + } - void *data_ptr = &nw->data[nw->offset]; - nw->offset += sz; + void *data_ptr = &nw->data[nw->offset]; + nw->offset += sz; bzero(data_ptr, sz); - return (data_ptr); + return (data_ptr); } #define nlmsg_reserve_object(_ns, _t) ((_t *)nlmsg_reserve_data_raw(_ns, sizeof(_t))) #define nlmsg_reserve_data(_ns, _sz, _t) ((_t *)nlmsg_reserve_data_raw(_ns, _sz)) @@ -263,24 +263,24 @@ nlattr_add(struct nl_writer *nw, int attr_type, int attr_len, const void *data) { int required_len = NLA_ALIGN(attr_len + sizeof(struct nlattr)); - if (__predict_false(nw->offset + required_len > nw->alloc_len)) { + if (__predict_false(nw->offset + required_len > nw->alloc_len)) { if (!nlmsg_refill_buffer(nw, required_len)) return (false); } - struct nlattr *nla = (struct nlattr *)(&nw->data[nw->offset]); + struct nlattr *nla = (struct nlattr *)(&nw->data[nw->offset]); - nla->nla_len = attr_len + sizeof(struct nlattr); - nla->nla_type = attr_type; - if (attr_len > 0) { + nla->nla_len = attr_len + sizeof(struct nlattr); + nla->nla_type = attr_type; + if (attr_len > 0) { if ((attr_len % 4) != 0) { /* clear padding bytes */ bzero((char *)nla + required_len - 4, 4); } - memcpy((nla + 1), data, attr_len); + memcpy((nla + 1), data, attr_len); } - nw->offset += required_len; - return (true); + nw->offset += required_len; + return (true); } static inline bool From nobody Mon May 1 14:52:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q95mF6fjMz48dPH; Mon, 1 May 2023 14:52:45 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q95mF5lL2z3kkv; Mon, 1 May 2023 14:52:45 +0000 (UTC) (envelope-from mhorne@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682952765; h=from:from:reply-to:subject: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=XmB/4OXmbdnIaFQEKcdaRTtOtjtu/EUfl3N/y+iSPzE=; b=dMvn6/UDSRNNc4cfmm8AHsfyHMjPptWrMIuZsODt72F8q3GsJ6h6GL7w78WuQGXFy1tCMx MhUHjslFT9q9sXlMhX5iU2KyK5Z5VXlSoH6SP82VDog3azZCUxIVIHNsLolSvhfGqdPwDn 3X8q8X0NMA7uMXnu/MBzH82bpuoMVq5841mTQCfKEY8XjYZ+xC0BToKbZkMvEv1mBz9YKk EYU8KLpYYPmqAHw1cYo5AdX16i+3Op2PBRcF9dnoF9YhHhSARWMqhwf3wrzHQ8RdGijhET pEj1zVB9yiQASlbq6Oiw4YXZ/nCTOkW4OZ9GFYc+wa0jTxJwmbZ3jrzs5jwdUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682952765; h=from:from:reply-to:subject: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=XmB/4OXmbdnIaFQEKcdaRTtOtjtu/EUfl3N/y+iSPzE=; b=HSNgu6X6oUqm++AzZKEZCM9g894pWnYHMk2135d0Pas5RYu7ZzN8OHMiApbUd7MdvNYCwo 1pj8u7raFdelRL4YlxhGL0X/+KhYh5MDVBqeSIreLiGEAtEMETqtLvXs+mr1+fQ5c/93vz krjlPSgxqthVAM7BRGjmBXlkSYzBmqd7JiaO3Nm3oxrE99btN+4+q6q+pi/GW8GwxV52LJ EVTWOCUvODo1OlcWlGABg8gWE7T24exCAgp1MBQWX4l9rEcsYCC3I2HYck1ktuZDxK7edO gguObiUsrnLeryknTv8wlVZ2vXzc6+KoTmsXVgswlICijtiq7tMs1kIgCIHfJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682952765; a=rsa-sha256; cv=none; b=YbGtFYa8DhylVNVoH0I7FR1GzOE3Vypj8CkwDdeqGb68mmWEEu844Ful6DsdDwJEOIpXx/ 4A/pUq5CZOyczNr9lJ72rCIlPLmKyI4XmWf83sNKqwTW+MH3rlrGkIT0gytyli7J+oVqo2 lHI1Dm2GlTUR9QGEgKlTlvneOhT5LjiymJptJMl4TSKqZL016y1h8KuyEbca1UfswbWL/e /jmSb4fPSC/lw49CMUJXRwFBGgb8GezjqaGfUtiCtBSFfLR7tSNQZjy5US+R42TqNEj3wn GnZwrWzVDWlLVhnbFXgkrgsCmXBIndOHqnQ6nfilWrmoQovFyP+ez0jTlwx+Jg== Received: from [192.168.1.151] (host-173-212-76-127.public.eastlink.ca [173.212.76.127]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mhorne) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q95mF24Yjzkh7; Mon, 1 May 2023 14:52:45 +0000 (UTC) (envelope-from mhorne@freebsd.org) Message-ID: Date: Mon, 1 May 2023 11:52:43 -0300 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: git: 3416e102c4e9 - main - arm: Remove TI code from GENERIC Content-Language: en-CA To: Emmanuel Vadot , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202305010632.3416WV6r012728@gitrepo.freebsd.org> From: Mitchell Horne In-Reply-To: <202305010632.3416WV6r012728@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On 5/1/23 03:32, Emmanuel Vadot wrote: > The branch main has been updated by manu: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3416e102c4e978a394a604012dae1943c7300a1e > > commit 3416e102c4e978a394a604012dae1943c7300a1e > Author: Emmanuel Vadot > AuthorDate: 2023-04-27 06:19:07 +0000 > Commit: Emmanuel Vadot > CommitDate: 2023-05-01 06:32:21 +0000 > > arm: Remove TI code from GENERIC > > TI support is in a sad state for years. > We haven't been able to keep up with all the breaking changes that > upstream do in the DTS. This requires a lot of new drivers to handle the > new buses that they create and all the new clocks that they expose. > Keep the code for now in case somebody is interested in reviving this > platform but stop bloating GENERIC with code that don't work. > > Reviewed by: imp, mmel > MFC after: never > Sponsored by: Beckhoff Automation GmbH & Co. KG > Differential Revision: https://reviews.freebsd.org/D39843 I think this needs a RELNOTES entry, no? Mitchell > --- > sys/arm/conf/GENERIC | 27 --------------------------- > 1 file changed, 27 deletions(-) > > diff --git a/sys/arm/conf/GENERIC b/sys/arm/conf/GENERIC > index 815fd2a1881e..fc4ce2ef146a 100644 > --- a/sys/arm/conf/GENERIC > +++ b/sys/arm/conf/GENERIC > @@ -43,9 +43,6 @@ files "../mv/files.arm7" > files "../nvidia/tegra124/files.tegra124" > files "../qemu/files.qemu" > files "../rockchip/files.rk32xx" > -files "../ti/files.ti" > -files "../ti/am335x/files.am335x" > -files "../ti/omap4/files.omap4" > files "../xilinx/files.zynq7" > > options SOC_ALLWINNER_A10 > @@ -140,12 +137,6 @@ device bcm2835_bsc > device fsliic # Freescale i2c/iic > device icee # AT24Cxxx and compatible EEPROMs > device sy8106a # SY8106A Buck Regulator > -device ti_i2c > -device am335x_pmic # AM335x Power Management IC (TPC65217) > -device am335x_rtc # RTC support (power management only) > -device twl # TI TWLX0X0/TPS659x0 Power Management > -device twl_vreg # twl voltage regulation > -device twl_clks # twl external clocks > > # i2c RTCs > device ds1307 # Dallas DS1307 RTC and compatible > @@ -173,12 +164,8 @@ device spibus > device spigen > device bcm2835_spi > device mv_spi > -device ti_spi > device zy7_qspi # Xilinx Zynq QSPI controller > > -# ADC support > -device ti_adc > - > # PWM > device pwm > > @@ -186,7 +173,6 @@ device pwm > # If we don't enable the watchdog driver, the BeagleBone could potentially > # reboot automatically because the boot loader might have enabled the > # watchdog. > -device ti_wdt > device imxwdt # Watchdog. WARNING: can't be disabled!!! > device aw_wdog # Allwinner Watchdog > > @@ -229,7 +215,6 @@ device miibus > > device awg # 10/100/1000 integrated EMAC controller > device cgem # Cadence GEM Gigabit Ethernet device > -device cpsw # TI Common Platform Ethernet Switch (CPSW) > device dwc # 10/100/1000 integrated GMAC controller > device emac # 10/100 integrated EMAC controller > device ffec # Freescale Fast Ethernet Controller > @@ -251,21 +236,11 @@ device dwc_hdmi > device imx6_hdmi > device imx6_ipu > > -# TDA19988 HDMI Encoder > -device tda19988 > - > # Pinmux > device fdt_pinctrl > > -# TI Programmable Realtime Unit support > -device ti_pruss > - > -# Mailbox support > -device ti_mbox > - > # DMA controller > device fslsdma > -device ti_sdma > device a10_dmac > device a31_dmac > > @@ -303,6 +278,4 @@ makeoptions MODULES_EXTRA+="dtb/zynq" > > # SOC-specific modules > makeoptions MODULES_EXTRA+="allwinner" > -makeoptions MODULES_EXTRA+="arm_ti" > makeoptions MODULES_EXTRA+="imx" > - From nobody Mon May 1 14:58:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q95tk6Vjdz48dZk; Mon, 1 May 2023 14:58:22 +0000 (UTC) (envelope-from melifaro@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 4Q95tk6198z3l61; Mon, 1 May 2023 14:58:22 +0000 (UTC) (envelope-from melifaro@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682953102; 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=PTRtQNzpkr5FVEddJcLRIWVbwQ1pufCHCEe3U2NipIk=; b=U4K50Nq/zepkRiiVDCCOsCg8OL77G79mMoHxN1owa008Lc6Fl36OsbAFWqSYzwFSQePVMq Kn/VkotdU5BntYmAMf4DYoRvNvEe3dGuiXTcqKOkKVUUVWOxQorn96vQPwnlBafCz2ofge QvJS8lwJxbdUb6ygO8aEhw4MdxjJTySwsIQBLDYC6UvaKg0m46jEi0uzBng1bRih6Im6+s F7U8sddS62Q9Nnh5xGH7kyNiLnfzZKrguxs5YkmqtVR5k30LbrEZh1xrHzuOgyjEU2jjz2 fzB3AtWfDpueE+ahvsLzXyEmZh7YLWXuWzBawdt4lCXrrgw4yt5SCy1+ZcXMzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682953102; 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=PTRtQNzpkr5FVEddJcLRIWVbwQ1pufCHCEe3U2NipIk=; b=LPY3uL8fkK9NqrCMikrZIoxELI8DFz9OQW/CYDow2zBK4WFrYJtUNCqHTh8sc1j+5hscpw gupPYAa41pVg0D9S/KreQLT88mj9QMAli+R5Q2jJw3tsPRyUFGttT5IiVc/ZceWVOuI5fs Fmo3RdjLffhocr8fuAIxZmP+7f5w6SCQDrb9ONMDUIzVxZV2kyiyQuyVtfO9g4tqMEwl4q cqR0IHyw5+/HT33eHEN6OOOwumcz/Lv95imHciLzUCBi2l4rtt+RFkTFDTkBL9ltlDAVED SCL6h+XMNwa7PT3SnnUQm28m2LaNRMMgmwiL7aedxyR5W6slEZtDT8EIY5Cj/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682953102; a=rsa-sha256; cv=none; b=NTJeF6/9uIfv5ZHkpZkVMUgaA3DRBHSe/lXZ+Sqky+0gDsmy83UXqMNvK2ji/tvWbKxGt8 cFyaMHaMsyXVSZchUp1F0UmcHuxNz4Wh9dOnj8rqQ+l5B1/acSaoNXWATAJEi0cRaA0ScX 52o/3DHAjWOxGQVj4KePgbCv49RLPcCZm1MO5ampXrCC7Lp6P9jg832O8Sb59fu4RRO6y0 I39iBMd2DaqGoBV14qrAMe6Et4ahTNvk+qqPc8zSXKhSH9WXBY5Gaq5yeYUONbKoKO/hzP OeAAxV1wIffqL11lGAU4WH+WAAe4pZzBwMvh8PBpjTbkOI5YjLSQIYhy+W35UA== Received: from smtpclient.apple (unknown [IPv6:2a02:8084:d6bb:510:3cee:d979:6270:71a5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: melifaro/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q95tk1NHDzkh8; Mon, 1 May 2023 14:58:22 +0000 (UTC) (envelope-from melifaro@freebsd.org) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Re: git: 6a09a7f1e9a5 - main - netlink: always zero provided header buffers. From: Alexander Chernikov In-Reply-To: <58128e85-82e3-e529-2d65-1145e6c84c09@FreeBSD.org> Date: Mon, 1 May 2023 15:58:10 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <7CBFB961-B052-4F95-BE04-8865D9B49034@FreeBSD.org> References: <202305011409.341E9wop057673@gitrepo.freebsd.org> <58128e85-82e3-e529-2d65-1145e6c84c09@FreeBSD.org> To: Renato Botelho X-Mailer: Apple Mail (2.3731.400.51.1.1) X-ThisMailContainsUnwantedMimeParts: N > On 1 May 2023, at 15:30, Renato Botelho wrote: >=20 > On 01/05/23 11:09, Alexander V. Chernikov wrote: >> The branch main has been updated by melifaro: >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D6a09a7f1e9a52fb25158ca60216c6b81= 7f8c0b71 >> commit 6a09a7f1e9a52fb25158ca60216c6b817f8c0b71 >> Author: Alexander V. Chernikov >> AuthorDate: 2023-05-01 14:07:33 +0000 >> Commit: Alexander V. Chernikov >> CommitDate: 2023-05-01 14:09:47 +0000 >> netlink: always zero provided header buffers. >> Reported by: KMSAN >> MFC after: 3 days >> --- >> sys/netlink/netlink_message_writer.h | 1 + >> sys/netlink/route/neigh.c | 3 --- >> 2 files changed, 1 insertion(+), 3 deletions(-) >> diff --git a/sys/netlink/netlink_message_writer.h = b/sys/netlink/netlink_message_writer.h >> index 57fc1bf342ea..92e43834efc7 100644 >> --- a/sys/netlink/netlink_message_writer.h >> +++ b/sys/netlink/netlink_message_writer.h >> @@ -225,6 +225,7 @@ nlmsg_reserve_data_raw(struct nl_writer *nw, = size_t sz) >> void *data_ptr =3D &nw->data[nw->offset]; >> nw->offset +=3D sz; >> + bzero(data_ptr, sz); >=20 > At first look, this line seems to be indented wrong. But looking at = cgit web interface it seems that other lines are wrong and this is = correct. Ups. Somehow I messed with spaces. Thanks for pointing this out! Should = be fixed by 88406e631e93. /Alexander > --=20 > Renato Botelho >=20 From nobody Mon May 1 15:29:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q96b6721Bz48gQ8; Mon, 1 May 2023 15:29: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 4Q96b66Sckz3q8K; Mon, 1 May 2023 15:29:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682954994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eOAKDarBd43RjYhCx2qKIv+Yo0bkEbyYCdoBNT/dwv8=; b=q8jzs9tHs2/k5WBaFC7vNpMRq0wsZj1kkEHaWnvvrBKSEB3G6b1kpuVuin7KIK0GKglXRb QTCI8ZRdpG74HQoSwiziwP5XeazcQRz1FtnA6OdWV19T4piS3a462wYi0hqGajhZOuSP7F 7VJJj3+9I2KuUreTC3p7b7pNk0M91g4Kya76pJZZGuGiNt7srA1Fcq3Wtqrvce+W7RYUcY 24JvbKTHioBRmqUXdkmtwTz/ZYAVItjGxkUtmYUMIGxtxb7wzMWIOkfrcQOHQv/kbdk5A5 wwttvt/QKuBaQTannelKRsUXuRu9xyxig7NiPnbaF5nTgBr71GgoLAAGIKulyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682954994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eOAKDarBd43RjYhCx2qKIv+Yo0bkEbyYCdoBNT/dwv8=; b=Qt1E+FcRwVN0Y5v8ZQh/ckDzB/Mns98unkhWbiRS+pTFecJPjPAyOI7yQhNBj522QW4ORv 2Cv5nYHfnWI+Lyd3ZX08aqzz8TBpnJpRpohqd2K76i0HLSO9GcBfJC4SdA/UYT7XZ3mSqy NM6e1zUc9UjlZsI8PwUyiJg516QAIQ5/9IPJr4sM7Jx1hHKAAfo6Fbu7V5OT03twmPpZfa mNW7EgGD+4PyBHRrXSjZpgr28i4bwSHP2g3xWOdORSRPBdraNpSbw+dL04Yla3BOgDTLSg oTaR2XBYaJ/Ane6FS+4MWQt0+tCpGcRfXPhVs5FK1KKgHJHww5FMUPqNO8h9ig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682954994; a=rsa-sha256; cv=none; b=QIqB+4UbhwN3P9SRh1E7SVIXfrvk8ELraq0m0y1MhEVix1b7uQgbAG9V9KoYAfTBHtJSjE MaDB1MeNXW9+FJpxe7gCZTMu0Xt13QMTDL27pu/6CV8RpsQzjjnIJPS3Bu1knsfRStydrx 6rbfGhwMRpUMkZd7e/7wtHp0w7BgGtk1KFEWRoiuySWm/fQLSUv/zr0FzW+JqrukP/TmpO 04OqQA7NW9TmDmaD9RmZGjGyPR1g1QEj2hmzPBXDsJk2ysFLr551CLRZoE424AFoAGB3dX 4WS4DSGVUciUnglosGAXjTkg3I2HpfH0CkuG5R6j8pr/UycCweHh0VQGocQe1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q96b65NShz19F2; Mon, 1 May 2023 15:29:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341FTsqW090080; Mon, 1 May 2023 15:29:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341FTs4l090079; Mon, 1 May 2023 15:29:54 GMT (envelope-from git) Date: Mon, 1 May 2023 15:29:54 GMT Message-Id: <202305011529.341FTs4l090079@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: 865362061dac - main - mfi(4): Refer to mrsas(4) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 865362061dacd06562dc839e97577cbe8319f7f7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=865362061dacd06562dc839e97577cbe8319f7f7 commit 865362061dacd06562dc839e97577cbe8319f7f7 Author: Tom Hukins AuthorDate: 2023-04-19 20:03:09 +0000 Commit: Ed Maste CommitDate: 2023-05-01 15:06:00 +0000 mfi(4): Refer to mrsas(4) Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/722 --- share/man/man4/mfi.4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man4/mfi.4 b/share/man/man4/mfi.4 index 12a4ec5290da..9be944d8ae9d 100644 --- a/share/man/man4/mfi.4 +++ b/share/man/man4/mfi.4 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 13, 2019 +.Dd April 19, 2023 .Dt MFI 4 .Os .Sh NAME @@ -81,14 +81,14 @@ If the tunable .Va hw.mfi.mrsas_enable is set to 1, then the driver will reduce its probe priority to allow -.Cd mrsas +.Xr mrsas 4 to attach to the card instead of .Nm . .Pp .Nm does not provide ATA TRIM support. Refer to -.Cd mrsas +.Xr mrsas 4 if TRIM support is required. .Sh HARDWARE The From nobody Mon May 1 15:29:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q96b81fbJz48gQH; Mon, 1 May 2023 15:29: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 4Q96b76yGbz3pkw; Mon, 1 May 2023 15:29:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682954996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U96e8rPiDF9lTYmOIfrH8IsQDH9fjCbiiYiC3uWZabY=; b=rltajk64SBEg9T+T5tUjbuTUGH0n7KmpWsjk0tvInNHeQXjOKpWgKiavwEC8MK9RaLwzLG fvrCGqU/kTcResv6OwvbKJmwoyQWtg0+obzDKFZENOHvZU/H86Jg+k9CRny5+sz4B6yJc7 Sv3wjl0qoyEW9xE73FfeghcK1fDJO9phAvrwMCnnJZJiT4kO9HhzcaIxVRug/vqrwnBCgD L/j+zSeojaU31iFDIy7v3StEaJBF/16KZx2+N2zLDkgQw7WrPhprkfAmFwykE/1eDXP8au E8HgVrRPstsSVU/EDo445Z35kKjafFDAwjIkh63P//r10At4SqDmZoBxZ43R5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682954996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U96e8rPiDF9lTYmOIfrH8IsQDH9fjCbiiYiC3uWZabY=; b=EIN4c3xwKhjN5HUX6fbp38MRJhfEKFwKObLt4R0fkkQZCyqZ7FUa4yvZV3c2e6n5jWQ7O5 0q5O8v0XT4fH3Hg14fmTMdUWADmU/PwO3FB6ZFOq/RUg7Hx5Ydrgg0+WxXNlfwdKolb6DP 7HZUkv/b4HlXYGBcZhMQ1PgR7eIorJuL60vocFOTFuv8JeSTis2rkd0num+TrdsKvaF2P1 4WypvELHFNsX+j9HjSdxCo6DQj2eg1sBATy9vAbbl02uCP1iP6xpshzCkndgxVFbkgtpZy u8gm7+3SiYn5pdfTTyIFmtEtjpINbveaRgVKsTrx49PqcV+gQVDoDZ5LfVgH6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682954996; a=rsa-sha256; cv=none; b=CKoWiGl1XIVv5QFmpM562RuJ/VKKnO0lQ0xg1lKk8SDOa9mDXcPeOAPSXm7IMoqhXVDxcT N/qX5w+0kYCbHyR+LmbgWMDaVkrfZR8TRvE6eSSl9SRo4oTE3zXtHfbpWxp7vipJds1045 ShvN9Zp4TJzXqox1g6JZxZcd3BzAz2t28sHlcu0bC6OeSnmyKPCSPsZjNKJs9NpYqlBsSR OU7gLVG8f8LD89SdiFQPqSKvv9LMANLLNIJ+vAnwsEgpunGFACFK8UVxS0pmu80qlunmBh SeS/WhILRu5BL+MrekcUslQz65an2iPsnHA3fHTCc8qKxioLfLK6US6w+3UzPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q96b75mmcz19Bd; Mon, 1 May 2023 15:29:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341FTtjV090105; Mon, 1 May 2023 15:29:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341FTtjM090104; Mon, 1 May 2023 15:29:55 GMT (envelope-from git) Date: Mon, 1 May 2023 15:29:55 GMT Message-Id: <202305011529.341FTtjM090104@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: e5bc2547a5f8 - main - geom(4): Add cross reference to geom(8) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e5bc2547a5f8173d1e5b72c1713a54dc89e29620 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e5bc2547a5f8173d1e5b72c1713a54dc89e29620 commit e5bc2547a5f8173d1e5b72c1713a54dc89e29620 Author: Tom Hukins AuthorDate: 2023-03-27 20:50:25 +0000 Commit: Ed Maste CommitDate: 2023-05-01 15:06:00 +0000 geom(4): Add cross reference to geom(8) PR: 264387 Reviewed by: ceri Pull Request: https://github.com/freebsd/freebsd-src/pull/702 --- share/man/man4/geom.4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/man/man4/geom.4 b/share/man/man4/geom.4 index f6988c663f54..91ba9360ec3b 100644 --- a/share/man/man4/geom.4 +++ b/share/man/man4/geom.4 @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 13, 2019 +.Dd March 27, 2023 .Dt GEOM 4 .Os .Sh NAME @@ -445,6 +445,7 @@ Dump contents of gctl requests. .El .Sh SEE ALSO .Xr libgeom 3 , +.Xr geom 8 , .Xr DECLARE_GEOM_CLASS 9 , .Xr disk 9 , .Xr g_access 9 , From nobody Mon May 1 15:40:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q96qf5XjHz48gmW; Mon, 1 May 2023 15:40: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 4Q96qf56xSz3rnG; Mon, 1 May 2023 15:40:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682955646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9vmbunr5ciTc57M5jNDNSwPlNulnF3KMCjDwMKUyUAo=; b=hyHappalyqIbf3peisNy2tNfyEBeSTF5NP7Il+IWQziWitLe9g9LOnvV5/PuXZ+TD7Quck BQEvGaXzKvbfQ2pl3BHtH6xaTZOU0ppME9VHZ4b0YiyQYL3AVw8rZr1LYXyJOSiWg6lvDu YQzj+bxsOOs2kANdQkphTyCuV8+dumlOxohBsXJebFmzjm6qDY75pPSXpjzx8LtbMgLV4P xiLrnUknvcZaTroszewbukz4aszk0WGyf8vyibxRxbQNjfivrC7VS7PIjy5efUH2m2dv6b 4lq6IjQh50RmBapLOLCNyGvnA48kOPYTG6cMX1rzdzf1hBO2c1ZrSbvhfUz2AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682955646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9vmbunr5ciTc57M5jNDNSwPlNulnF3KMCjDwMKUyUAo=; b=M3DcHFuzuwo+lgEs36UJ5qMm45YyyQqgUOLerWrJYq4oCKqTZ2lFwEhDBKyPzMeDuubpBV Xm5DDcdJ3FHnv/CQyAuGqMMN4Vu/StwduTvcXrijjgKoEhQgdV8gUCu1shEsUUNPMWMBfe JUu4kdGVfaAEPwGY/hK0igQR86nE1doUjRlWny1oDMJvgKDjfnUQGMWNbrnRbsQlScfUuK W+/WgdHb/XoDxU5TRKMV7Q6sTr4efou12J7lvlHDMDZOPcspDCwAhK3dtyKGHg19wMhRvT Ih4yr1kZ85UKgj6L2JyCib4cvPnxD0/uohd4UrjIXwRX1T61Q4V3fjnfv3DWQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682955646; a=rsa-sha256; cv=none; b=RNVmfbansMcNX/Q+N6+5GYKfUvyomM+7S+IYehzTgEmrVF5lAsUWr6xsCPBOv4TY+B0TR9 o/ykQiCvvYfdPt+zN8hzOycgs/XNtCXqoF2CWxDIX6ztYydSqxMow8fgX+DTqCfaQiKEnu 1sKnhWnBpeYDbIZARIT9NkgcpU4zccwRpPgRxwMC5BktbB9qDgPRCSQCDpcBqcirt3IbqL bO1WtfBEUQ9vkJfSPOmJK9lvjiXMR72DodOhGMmWSlpglSKpO4tKHY6+PNp2q+m6mcLPiy dFl5VMhsnw9aBE/lyFfaO4bESLLdbFETOcWg3VJYEXGeRjLTbgPY3+8zZrL3Lg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q96qf4BF7z19XP; Mon, 1 May 2023 15:40:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341FekMT016442; Mon, 1 May 2023 15:40:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341Fek6p016441; Mon, 1 May 2023 15:40:46 GMT (envelope-from git) Date: Mon, 1 May 2023 15:40:46 GMT Message-Id: <202305011540.341Fek6p016441@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 56da525b535f - main - hwpmc: Fix a typo List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 56da525b535f8537205bccd1f4b25b3ce354ca62 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=56da525b535f8537205bccd1f4b25b3ce354ca62 commit 56da525b535f8537205bccd1f4b25b3ce354ca62 Author: Mark Johnston AuthorDate: 2023-05-01 15:19:25 +0000 Commit: Mark Johnston CommitDate: 2023-05-01 15:40:29 +0000 hwpmc: Fix a typo MFC after: 1 week --- sys/dev/hwpmc/hwpmc_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/hwpmc/hwpmc_core.c b/sys/dev/hwpmc/hwpmc_core.c index ff6bfbd4322f..5d29931c90f0 100644 --- a/sys/dev/hwpmc/hwpmc_core.c +++ b/sys/dev/hwpmc/hwpmc_core.c @@ -1248,7 +1248,7 @@ pmc_core_initialize(struct pmc_mdep *md, int maxcpu, int version_override) if (core_version < 1 || core_version > 5 || (core_cputype != PMC_CPU_INTEL_CORE && core_version == 1)) { /* Unknown PMC architecture. */ - printf("hwpc_core: unknown PMC architecture: %d\n", + printf("hwpmc_core: unknown PMC architecture: %d\n", core_version); return (EPROGMISMATCH); } From nobody Mon May 1 15:40:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q96qg6ml5z48gh6; Mon, 1 May 2023 15:40: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 4Q96qg67YVz3rwb; Mon, 1 May 2023 15:40:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682955647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S3iCNXTG809XJwu+ERned5KistTMvnoT7tCTvGAzYJk=; b=yS5hsvhYD1Qo9CkcQ/b3YG8YY5JisD+5Ti3zJUvrcB7CNt4i1+inLwX5WNJEPQM1GuMmJU VA6SG0Zgz95ZkUYVntN9QhwTdM2iSJUajQnYjuLS0cKwi4GqRQbWOUjiQrJFLk7JhDu7Yd DlqaGgjMm5QG3BHIgaKILN+1XUsLXPGwhpICgfFgToVcvEHE9E4Rnc3fGspMw9dDyw6XRB HDvQysg669JPskztPXlWbWMNm00Ctou4ubY6e/mdpEdqJzg6RQF8j7OrtvTYNNqcr9jttB gJqV3HP4yvX0Olh9OykqWBaZRXYBW7U5beWwM9vlx1tN2AfuwodWWwMx4a18NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682955647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S3iCNXTG809XJwu+ERned5KistTMvnoT7tCTvGAzYJk=; b=Ylp9mOvi74P0O/zU72Tg/J9ltJwM1YG1L3UMMq9vd9DD/xTWlxwSuNRugw+WfYXQhDsoXT 0VWuSKrYhl0VQmvnaA1JKvnMFweYSYP2uaxwqt5dJik39ESiVsZuFAberx70Nu83ePtZwh QoAlDYNUQKWfHOLVBOUn1sOGgL/QCRFadRuzEFlg6x02iRuFnBw/pomEp54XGS8a7Q09hH TaHL9gfUPfEW0ll2ioFHrmqhxLfql/S9aTIklfY7+h/Ccy9RcOn3qwVuIKMuZBef7YQG/f PlFq6MQJAGAexWvhMz2D9sLmzKwEPrfkY1ZgW1/zdOhku1TiaxnDOpDOGpB5UA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682955647; a=rsa-sha256; cv=none; b=T85jUDXblCG7tJKphM7py6O0D3dhSgKlSMqx0NYTiM2gc/yqq8JnJoW51dvFgKztwZX3PV keJHKcQidUQmp4f3W9O0smUJmRiCr/DyaK1HNnowrQlIckxsPzpQcOlPzqsk03k+WgDyo8 Db093fQs6mWes22e8dGd3Di/+Ie1ldnejgvKi5vLChF98V4G9Hu8GLbFOs98/QETPUj+Dq y9KRK0p+Kd068YoFEpZgxTuOt/eivOnp3GQC4N9uiRzN9ECPRHvI1CG7X5+kMQDUnK4lq/ nko1+TNZiWjrP2Tjf64lKiuro7olwTeY/rFo6iwOXQS5dkfyTnxSEkEBa9fVUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q96qg4dZLz19s1; Mon, 1 May 2023 15:40:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341Fel75016489; Mon, 1 May 2023 15:40:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341Felmr016485; Mon, 1 May 2023 15:40:47 GMT (envelope-from git) Date: Mon, 1 May 2023 15:40:47 GMT Message-Id: <202305011540.341Felmr016485@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: aad1685066fc - main - fbt: get rid of redundant defines List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aad1685066fc2430d6ee9b3025369ba6bd513333 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=aad1685066fc2430d6ee9b3025369ba6bd513333 commit aad1685066fc2430d6ee9b3025369ba6bd513333 Author: Christos Margiolis AuthorDate: 2023-05-01 15:20:34 +0000 Commit: Mark Johnston CommitDate: 2023-05-01 15:40:29 +0000 fbt: get rid of redundant defines No functional change intended. Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39882 --- sys/cddl/dev/fbt/aarch64/fbt_isa.c | 2 -- sys/cddl/dev/fbt/arm/fbt_isa.c | 3 --- sys/cddl/dev/fbt/fbt.h | 3 +++ sys/cddl/dev/fbt/powerpc/fbt_isa.c | 2 -- sys/cddl/dev/fbt/riscv/fbt_isa.c | 2 -- sys/cddl/dev/fbt/x86/fbt_isa.c | 3 --- 6 files changed, 3 insertions(+), 12 deletions(-) diff --git a/sys/cddl/dev/fbt/aarch64/fbt_isa.c b/sys/cddl/dev/fbt/aarch64/fbt_isa.c index 07f02e2edb72..26d750bf540c 100644 --- a/sys/cddl/dev/fbt/aarch64/fbt_isa.c +++ b/sys/cddl/dev/fbt/aarch64/fbt_isa.c @@ -42,8 +42,6 @@ #define AARCH64_BRK_IMM16_SHIFT 5 #define AARCH64_BRK_IMM16_VAL (0x40d << AARCH64_BRK_IMM16_SHIFT) #define FBT_PATCHVAL (AARCH64_BRK | AARCH64_BRK_IMM16_VAL) -#define FBT_ENTRY "entry" -#define FBT_RETURN "return" #define FBT_AFRAMES 4 int diff --git a/sys/cddl/dev/fbt/arm/fbt_isa.c b/sys/cddl/dev/fbt/arm/fbt_isa.c index 0be28b56aa6a..d52809c9f227 100644 --- a/sys/cddl/dev/fbt/arm/fbt_isa.c +++ b/sys/cddl/dev/fbt/arm/fbt_isa.c @@ -45,9 +45,6 @@ #define FBT_JUMP 0xea000000 #define FBT_SUBSP 0xe24dd000 -#define FBT_ENTRY "entry" -#define FBT_RETURN "return" - int fbt_invop(uintptr_t addr, struct trapframe *frame, uintptr_t rval) { diff --git a/sys/cddl/dev/fbt/fbt.h b/sys/cddl/dev/fbt/fbt.h index aa9bce564fa0..2816eec992ff 100644 --- a/sys/cddl/dev/fbt/fbt.h +++ b/sys/cddl/dev/fbt/fbt.h @@ -34,6 +34,9 @@ #include "fbt_isa.h" +#define FBT_ENTRY "entry" +#define FBT_RETURN "return" + /* * fbt_probe is a bit of a misnomer. One of these structures is created for * each trace point of an FBT probe. A probe might have multiple trace points diff --git a/sys/cddl/dev/fbt/powerpc/fbt_isa.c b/sys/cddl/dev/fbt/powerpc/fbt_isa.c index eb7feceb269d..7f52308e1f76 100644 --- a/sys/cddl/dev/fbt/powerpc/fbt_isa.c +++ b/sys/cddl/dev/fbt/powerpc/fbt_isa.c @@ -46,8 +46,6 @@ #define FBT_BR_MASK 0x03fffffc #define FBT_IS_JUMP(instr) ((instr & ~FBT_BR_MASK) == FBT_BRANCH) -#define FBT_ENTRY "entry" -#define FBT_RETURN "return" #define FBT_AFRAMES 5 int diff --git a/sys/cddl/dev/fbt/riscv/fbt_isa.c b/sys/cddl/dev/fbt/riscv/fbt_isa.c index baf268028988..5c8340d9f001 100644 --- a/sys/cddl/dev/fbt/riscv/fbt_isa.c +++ b/sys/cddl/dev/fbt/riscv/fbt_isa.c @@ -43,8 +43,6 @@ #define FBT_C_PATCHVAL MATCH_C_EBREAK #define FBT_PATCHVAL MATCH_EBREAK -#define FBT_ENTRY "entry" -#define FBT_RETURN "return" #define FBT_AFRAMES 5 int diff --git a/sys/cddl/dev/fbt/x86/fbt_isa.c b/sys/cddl/dev/fbt/x86/fbt_isa.c index 481e65bd761b..8c536335791c 100644 --- a/sys/cddl/dev/fbt/x86/fbt_isa.c +++ b/sys/cddl/dev/fbt/x86/fbt_isa.c @@ -57,9 +57,6 @@ #define FBT_PATCHVAL 0xf0 #endif -#define FBT_ENTRY "entry" -#define FBT_RETURN "return" - int fbt_invop(uintptr_t addr, struct trapframe *frame, uintptr_t scratch __unused) { From nobody Mon May 1 15:40:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q96qh6m0qz48gmd; Mon, 1 May 2023 15:40: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 4Q96qh6MVdz3s4C; Mon, 1 May 2023 15:40:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682955648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z+QY7Fkym7acnMeba4wRvUhJJRPfzHSro/xZ6ik+CvI=; b=oChBSBqgmhmlYVLcXfORJrO658Xy6A+M1dORIgtUB1Ia/J2CUrgFxdtCh8T6+4TaU3FJDx p7tGwPmRqIpXdWRlGrE43cvb+oTK2f8/8prgNnJTKBRDAK3PBsdyTUdnq5EBhAnA+JADGZ indGX15Ie0jXE4odmItdflYLR/fIvxWh0AaS0Sz6O4nZqkA6VX7gL3EID1oYyd7ysenHMR J0h4xrMxxJ5QMlKPdmXE9+YWlfyAtaD9jBPN7M8hdkF4gUw/CExeeFAxcPQcVTZ9i2fJ41 xAGP0rfQwLc0dkpKU4LVqZTRJvthXUXyEXgq6Jg3GPCgcErBpMa8aGpxG5MsqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682955648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z+QY7Fkym7acnMeba4wRvUhJJRPfzHSro/xZ6ik+CvI=; b=NzSqbQItyXVRRoglzofAIW+i/E3ZdeMVhbAOlpmDGlhDKbXjfg4BfhcmddE3mm26GW1sy9 PStgOt/UbIZOYh/F+VRC+6wguM4hfVbgjTrh68Qm46QcWW/V8cvqnhWzrBRs5INzd6QK/R mSAfshqYFkxPvE/pYpdzV7tMcTbAEaDa9viODNZfoh7LgvmmHU/GzMNu0iLJIKSZBG1R6D WVKLRHcIzlbsyaDvsVcZNVQPUdsK5Dy6zxY/toP5yyeOrp27PfBUKlx6gFaAOKZVnB6fBX x3klNDN+FQaB2MAj+yHv95F22xmm49p7S1TvTRSf14KddbLrFq+5IbLS0ZDlkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682955648; a=rsa-sha256; cv=none; b=UsN946jrW9X1RLsxMohJOxNgpQd4UIPUCd6eftpKwu007PqXF+clZk3UaYLCkbDqpdwcCq 6sxsh5jIvAWahUupgOoVfzpIVufdIQUJLUoNIJG0GjsaOhmvnjOVu94Zo/xk+1vQ19u8b3 cGEmeuFbr/K7pBhLe3CzBf9iHeYfcqAWAsqOcH8hOhsuG/uHZWrxC8gyZOx52+/RwAmOa/ K9NuczjNHzEeKyuYp9cZs/p12nBZjNRSZIinK0DmtjdiUU3ZL98DcXNx3PjgUucDoL+4Af GNp/viHIvCQ5ZJ7GGNZ1dpQvN3Zgn4SWTpL7dU5MlPgRz+t4m8a4z2OV+EpcTw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q96qh5L1Dz19Fv; Mon, 1 May 2023 15:40:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341Fem5v017375; Mon, 1 May 2023 15:40:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341Femeh017374; Mon, 1 May 2023 15:40:48 GMT (envelope-from git) Date: Mon, 1 May 2023 15:40:48 GMT Message-Id: <202305011540.341Femeh017374@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: e11d11c543e7 - main - kinst: test lock in kinst_trampoline_dealloc_locked() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e11d11c543e7303685c8b5a32bb0338cd3e61f1e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e11d11c543e7303685c8b5a32bb0338cd3e61f1e commit e11d11c543e7303685c8b5a32bb0338cd3e61f1e Author: Christos Margiolis AuthorDate: 2023-05-01 15:22:37 +0000 Commit: Mark Johnston CommitDate: 2023-05-01 15:40:29 +0000 kinst: test lock in kinst_trampoline_dealloc_locked() Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39883 --- sys/cddl/dev/kinst/trampoline.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/cddl/dev/kinst/trampoline.c b/sys/cddl/dev/kinst/trampoline.c index ba61faa2b3ab..6614a6ed9302 100644 --- a/sys/cddl/dev/kinst/trampoline.c +++ b/sys/cddl/dev/kinst/trampoline.c @@ -163,6 +163,8 @@ kinst_trampoline_dealloc_locked(uint8_t *tramp, bool freechunks) struct trampchunk *chunk; int off; + sx_assert(&kinst_tramp_sx, SX_XLOCKED); + if (tramp == NULL) return; From nobody Mon May 1 16:14:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q97ZF1NCMz48jdg; Mon, 1 May 2023 16:14:13 +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 4Q97ZF0rp3z3wpx; Mon, 1 May 2023 16:14:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682957653; 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=PBOFWMV1w/fWQWiSF94c8oq0Ah+YawO89Bqj0IApLqs=; b=v85H0S4BisiWpgsNix3F4y25Ov4UoUfMNDlVQCyHe3rgF6yTwIb3uPMTq8oEgbnM50ECAM 0036laUgEfv0RYnYTyO4RP2bpMIqFheDl11HPQmybLX/Jxw8xcPIhDfnczZl9LmVve+zPg /vmHF7yNsqfMecR2YatXt5xvAbIsck8TMASYU67yFbaKd2n9GdrV04yDtL8rTEcN47CFxK WUdxgrrGpai4kzBQNSs7sDj3Z7TWsdUt+fbozSV46x8vwKa4V+wFsK7yPwxZLDPtWJVZNc kmuceydk3lGpayMhizrnPmIhl4QXOHVp0iGERvx7amu7zE8ZE7b4cuTrlbtrLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682957653; 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=PBOFWMV1w/fWQWiSF94c8oq0Ah+YawO89Bqj0IApLqs=; b=bK5KvpRcU+DpklfUOfCldKuTVBdGmGskiZeyUAwFimGbQDjbbkkJgvxNojuQ4G9LFw2ji2 qC6mlzjzFdIDNpA9P0eiAqJjoDv4RAhlKdOhIbK84Ihnj3PEpka5LynIJM+7fzDthTQhq2 TdJvfovwgVsjglgKUF12IKzoNRcRZnIAoZxt4jVewTx0EGw8WrWBinqIhA0KHuH05Orbor cBp9P7n0WEJftZYS3bsNXa/1zrvFqf5dLjyb+5Xhc3GLP7jZtUl1udzakJSJSXmaVV6sgQ AkbzmcrjwnHY+mpKWfXc94KsiMxcR150SOlU2449WBoMBlR4zQohg5CWE0MgMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682957653; a=rsa-sha256; cv=none; b=Zl6B8AYMRMEbIcrsTg4ZOGBeKI9xuL3dUL0MKK6/SCPN7XjxDVPHn/WXX7y1r1XsWva3/B UyivnJwGLFOrA49CRFS0IE+9bc92v1D41u1mTA/T4Ogq4dVkOykdFG7cEdNUSg5Fb4KHYC PwYHeWVAqjuaf+PHGx2+mjRIRL7f6PkkHeLYw7IR0hsGnIQhe9tyU5qikXpaAptnJXcXSa hVdTGVXp2K10I325yWhOBeqTcz2nRI8wxWoTqd3M4xdEqsXPt8mFdvrIIgS8bK6vxBBSLY oofL+WdDxxn0TQhjp8h2R8AZTlQHXODdA4AgLrVeryLnNdFPV8mizXyC3RPnOg== Received: from [IPV6:2601:648:8680:16b0:6863:4e51:eaeb:9500] (unknown [IPv6:2601:648:8680:16b0:6863:4e51:eaeb:9500]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q97ZD2mCPznpP; Mon, 1 May 2023 16:14:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Mon, 1 May 2023 09:14:11 -0700 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: git: 060699e91369 - stable/13 - Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6 Content-Language: en-US To: "Jason A. Harmening" , Konstantin Belousov Cc: Dimitry Andric , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org References: <202304092135.339LZMeJ081640@gitrepo.freebsd.org> <76DD2CB9-986B-4349-8F46-3B7BF63EB315@FreeBSD.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On 4/30/23 8:31 PM, Jason A. Harmening wrote: > On Sun, Apr 30, 2023 at 07:34:45PM -0500, Jason A. Harmening wrote: >> On Sun, Apr 30, 2023 at 06:47:13PM -0500, Jason A. Harmening wrote: >>> On Sun, Apr 30, 2023 at 08:09:16AM +0300, Konstantin Belousov wrote: >>>> On Sat, Apr 29, 2023 at 02:27:50PM -0500, Jason A. Harmening wrote: >>>>> On Sat, Apr 29, 2023 at 08:49:28PM +0200, Dimitry Andric wrote: >>>>>> On 29 Apr 2023, at 20:33, Jason A. Harmening wrote: >>>>>>> >>>>>>> On Sun, Apr 09, 2023 at 09:35:22PM +0000, Dimitry Andric wrote: >>>>>>>> The branch stable/13 has been updated by dim: >>>>>>>> >>>>>>>> URL: https://cgit.FreeBSD.org/src/commit/?id=060699e9136975d51d3f726b9785bdbac9a62ba6 >>>>>>>> >>>>>>>> commit 060699e9136975d51d3f726b9785bdbac9a62ba6 >>>>>>>> Author: Dimitry Andric >>>>>>>> AuthorDate: 2023-01-14 16:33:24 +0000 >>>>>>>> Commit: Dimitry Andric >>>>>>>> CommitDate: 2023-04-09 14:54:52 +0000 >>>>>>>> >>>>>>>> Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6 >>>>>>>> >>>>>>>> This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and >>>>>>>> openmp to llvmorg-15.0.7-0-g8dfdcc7b7bf6. >>>>>>>> >>>>>>>> PR: 265425 >>>>>>>> MFC after: 2 weeks >>>>>>> >>>>>>> This MFC of llvm15 appears to have completely broken the Intel IOMMU >>>>>>> driver on my stable/13 machine. After this series of commits, any >>>>>>> downstream DMA seems to produce an IOMMU translation fault, which >>>>>>> renders the machine completely unusable: no nvme boot disk, no usb >>>>>>> keyboard, etc. >>>>>>> >>>>>>> The faults I see look something like this: >>>>>>> >>>>>>> DMAR4: ahci0: pci0:17:5 sid 8d fault acc 0 adt 0x0 reason 0x3 addr 26000 >>>>>>> >>>>>>> It's a bit surprising to see a toolchain upgrade produce breakage like >>>>>>> this, but that's what git bisect clearly tells me. I wonder if some of >>>>>>> the IOMMU control structures might be defined as C bitfields and the new >>>>>>> compiler is emitting them differently? Also, was any breakage like this >>>>>>> observed when -current was upgraded to llvm15 several months ago? >>>>>> >>>>>> I haven't heard anything about such breakage, no. >>>>>> >>>>>> >>>>>>> More generally, this is the second time in as many months I've had to >>>>>>> deal with IOMMU breakage on -stable. I can't imagine I'm the only >>>>>>> person who sees value in running with DMA remapping enabled; do we need >>>>>>> a dedicated DMAR-enabled machine in the cluster to smoke-test changes >>>>>>> like this? More generally, should we avoid MFCing high-risk changes >>>>>>> like this? >>>>>> >>>>>> Since there were very few bug reports, it was not deemed high risk. >>>>>> >>>>>> In any case, it would be good to get the bottom of what is causing the >>>>>> problem, so is there any way you can isolate which code seems to be >>>>>> going "bad"? >>>>>> >>>>>> For example, if this problem affects code in sys/dev/iommu, is there >>>>>> some way you can compile that part with -O1, or with an older version >>>>>> of clang (from ports), to see if the problem goes away? >>>>> >>>>> I did try removing all custom make.conf settings (previously I just had >>>>> CPUTYPE?=icelake-server), but that didn't change the behavior. >>>>> >>>>> Before I try further build tweaks, I'd like to ask if the IOMMU fault >>>>> report can provide guidance here? AFAICT all the faults I'm getting >>>>> show "reason 0x3". If I'm reading the VT-d spec correctly, FR=0x3 >>>>> indicates an invalid context entry, in other words there's something the >>>>> hardware doesn't like in the way the address width or pagetable base is >>>>> configured for the PCIe requestor. >>>> >>>> I would start looking at the other direction: might be, there are still some >>>> left shifts for int32 values with the shift count > 30, or uint32 with the >>>> count > 31. >>>> >>>> Also might be useful to dump each context entry on creation, it is kept >>>> constant after. >>> >>> I did look over the constants in intel_reg.h, and didn't see anything >>> that looked as though it would be susceptible to sign-extension or >>> truncation bugs. In the failing case it's much easier for me to catch >>> the fault messages than any initialization message, so I instrumented >>> the fault handler to get the context entry from the dmar_ctx object >>> using the same logic as dmar_map_ctx_entry(), and then dump out the ctx1 >>> and ctx2 fields. What I see are messages like: >>> >>> ... ctx1 0x10013b001 ctx2 0x103 >>> >>> At first glance these "look right": the P bit is set in ctx1, and the >>> rest of the field looks like a valid physical address. ctx2 also >>> doesn't have any of the reserved bits set, but in all cases it does have >>> AW=3, which would indicate 57-bit AGAW. But when I boot the last >>> working kernel, from the revision prior to the llvm15 MFC, I see this in >>> dmesg: >>> >>> ahci0: dmar4 pci0:0:17:5 rid 8d domain 1 mgaw 48 agaw 48 re-mapped >>> >>> ...all reported devices show 48-bit MGAW/AGAW, so I would expect ctx2 to >>> have AW=2. I suspect this may be the source of the fault, but I'm not >>> sure how it's getting configured that way, whether it's an issue with >>> reading the capability register or something else. >>> >> >> I can confirm that hacking domain_set_agaw() to always use the settings >> from sagaw_bits[2] eliminates the faults and at least allows the machine >> to boot to single-user mode. > > I see what's happening now. When I added the hack to always set > sagaw_bits[2], I noted that the passed-in MGAW was still 57, while > unit->hw_cap had the correct value of 0x4 (=> 4-level paging, 48-bit AW) > in bits 12:8. The problem is that sagaw_bits has agaw=64 in its last > entry. This results in dmar_maxaddr2mgaw() attempting a comparison > against 1ULL << 64 in the final iteration of its first loop. I suspect > the new compiler probably determines that last iteration is meaningless > and simply omits it from the (probably unrolled) loop. Since the "loop" > terminates with i < nitems(sagaw_bits), the subsequent "allow_less ..." > case doesn't execute and we end up erroneously selecting a 57-bit > address width. Just commenting out that last entry in sagaw_bits fixes > the problem. > > So, two questions: > 1) Does any VT-d hardware actually support 6-level paging? The ca. 2021 > VT-d spec I'm looking at indicates 5-level is the greatest depth > supported, with everything above that being reserved. > > 2) I'd expect clang to try very hard to error out in a situation like > this, but I see that sys/conf/kern.mk sets -Wno-shift-count-overflow > among other things, and more of them were added for clang 15. This > seems like a really bad idea, regardless of how much of a PITA it may be > to fix these warnings. FWIW, I've been working on trying to re-enable some of the warnings that were disabled for clang 15 in main. I'll move that one higher up on my todo list. -- John Baldwin From nobody Mon May 1 17:03:37 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q98gJ2w2sz48m53; Mon, 1 May 2023 17:03:40 +0000 (UTC) (envelope-from jah@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 4Q98gJ0Jjrz42qW; Mon, 1 May 2023 17:03:40 +0000 (UTC) (envelope-from jah@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682960620; 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=4MFH2o6+V/AFYcwXnnrZ1zBcr5kDTGhNyMzmdF/JUrA=; b=bhtndloaDRHLViM1C7tXA9vgy+jhlK16DqEcc4SCaR6j/P7g8t4One1TwKmubH4gcBs+Mc R1aUc0f6Pi9NSZcu3sdnm9XtkdQSvLbGX3MhJmvNjE3DXi3VU5WDsjN7tHJd4+OkRHEvWU w0989Igo7uFgBlipy6mGh2g/q9O4DiKwcOY/gmdYZ5/XSetg8AAGK5qI+kn+9Auj9UBcWc 3jYVYhJ7sEWtqNur+sRppXqoQ/igZ3C2KG3OyNwn7cV2lsoy58izm0iiVoZA2gtUJGuqWF AWjk0EaTYFvko+oe6eXBrjI8mY4EQqdZbrjbZyaVNhKYXO60y7vOp3oCiFCtHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682960620; 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=4MFH2o6+V/AFYcwXnnrZ1zBcr5kDTGhNyMzmdF/JUrA=; b=IkSPhonlLlnmrq+ej2QudRSMioWtinhWUFf4ACGoL6FgLNkEhe/vjrM2XSy/9JdhvBAppu 280HrHQlsk8enS0uJsqql7vZ35caEWz+ayiZvnneXuaAldCZcL5u/I65+KlUvvHA4pSfKX 6mS0OIYdj3jRL36ec7k2ydlft2Bdk3B8N2GQEZ3qNw/SXzVuz2xzjKiOyVHnqqzsALlJxx 2T22hSGSbJDByMz69SGUwgQAdccLis6EqyVUy5gRypAbLWdsxG2hdQKvik4P0OO+b6CQMH gPl/HVV76rCYJlNLNJdDIew711+aL93rFkacBZ6a/F5m3Bju7ezRQJ8tr4p8Kw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682960620; a=rsa-sha256; cv=none; b=P37b1Zs6GzvM5P9ffUO7rjJCNN5fKe1ISxPuNqACZpa1e9rpIaTL8VwPpE72/OQXjPVb9D t9szFrHGiDAbhPu27Po3OHC4Mxx3B0qRhJoRYhZ9bp/VLatWo81zvEYGoKkYmV7NfFWOGa LvbjyC5WdaS7nBNuZFF8MYgF8i6/HiUgm+q82OlWOOn+NiqJapjEahA3AeNyGpOTfKyis9 BLWbhtOGshk+X5ADTh/ZHOQBJBhg+X6Rdb9EXWem53chttpSSq2H0GBOLq1AUzDPHPR/xe 6fS3TVHFyQ1DaDT0WxXCqi8vGZZHYi9dEyegAHfHbRgC61Qix7M2UhXfdHY2Pw== Received: from corona (047-232-115-243.res.spectrum.com [47.232.115.243]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jah) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q98gH3NtBzpV7; Mon, 1 May 2023 17:03:39 +0000 (UTC) (envelope-from jah@freebsd.org) Date: Mon, 1 May 2023 12:03:37 -0500 From: "Jason A. Harmening" To: John Baldwin Cc: Konstantin Belousov , Dimitry Andric , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Subject: Re: git: 060699e91369 - stable/13 - Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6 Message-ID: References: <202304092135.339LZMeJ081640@gitrepo.freebsd.org> <76DD2CB9-986B-4349-8F46-3B7BF63EB315@FreeBSD.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ThisMailContainsUnwantedMimeParts: N On Mon, May 01, 2023 at 09:14:11AM -0700, John Baldwin wrote: > On 4/30/23 8:31 PM, Jason A. Harmening wrote: > > On Sun, Apr 30, 2023 at 07:34:45PM -0500, Jason A. Harmening wrote: > >> On Sun, Apr 30, 2023 at 06:47:13PM -0500, Jason A. Harmening wrote: > >>> On Sun, Apr 30, 2023 at 08:09:16AM +0300, Konstantin Belousov wrote: > >>>> On Sat, Apr 29, 2023 at 02:27:50PM -0500, Jason A. Harmening wrote: > >>>>> On Sat, Apr 29, 2023 at 08:49:28PM +0200, Dimitry Andric wrote: > >>>>>> On 29 Apr 2023, at 20:33, Jason A. Harmening wrote: > >>>>>>> > >>>>>>> On Sun, Apr 09, 2023 at 09:35:22PM +0000, Dimitry Andric wrote: > >>>>>>>> The branch stable/13 has been updated by dim: > >>>>>>>> > >>>>>>>> URL: https://cgit.FreeBSD.org/src/commit/?id=060699e9136975d51d3f726b9785bdbac9a62ba6 > >>>>>>>> > >>>>>>>> commit 060699e9136975d51d3f726b9785bdbac9a62ba6 > >>>>>>>> Author: Dimitry Andric > >>>>>>>> AuthorDate: 2023-01-14 16:33:24 +0000 > >>>>>>>> Commit: Dimitry Andric > >>>>>>>> CommitDate: 2023-04-09 14:54:52 +0000 > >>>>>>>> > >>>>>>>> Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6 > >>>>>>>> > >>>>>>>> This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and > >>>>>>>> openmp to llvmorg-15.0.7-0-g8dfdcc7b7bf6. > >>>>>>>> > >>>>>>>> PR: 265425 > >>>>>>>> MFC after: 2 weeks > >>>>>>> > >>>>>>> This MFC of llvm15 appears to have completely broken the Intel IOMMU > >>>>>>> driver on my stable/13 machine. After this series of commits, any > >>>>>>> downstream DMA seems to produce an IOMMU translation fault, which > >>>>>>> renders the machine completely unusable: no nvme boot disk, no usb > >>>>>>> keyboard, etc. > >>>>>>> > >>>>>>> The faults I see look something like this: > >>>>>>> > >>>>>>> DMAR4: ahci0: pci0:17:5 sid 8d fault acc 0 adt 0x0 reason 0x3 addr 26000 > >>>>>>> > >>>>>>> It's a bit surprising to see a toolchain upgrade produce breakage like > >>>>>>> this, but that's what git bisect clearly tells me. I wonder if some of > >>>>>>> the IOMMU control structures might be defined as C bitfields and the new > >>>>>>> compiler is emitting them differently? Also, was any breakage like this > >>>>>>> observed when -current was upgraded to llvm15 several months ago? > >>>>>> > >>>>>> I haven't heard anything about such breakage, no. > >>>>>> > >>>>>> > >>>>>>> More generally, this is the second time in as many months I've had to > >>>>>>> deal with IOMMU breakage on -stable. I can't imagine I'm the only > >>>>>>> person who sees value in running with DMA remapping enabled; do we need > >>>>>>> a dedicated DMAR-enabled machine in the cluster to smoke-test changes > >>>>>>> like this? More generally, should we avoid MFCing high-risk changes > >>>>>>> like this? > >>>>>> > >>>>>> Since there were very few bug reports, it was not deemed high risk. > >>>>>> > >>>>>> In any case, it would be good to get the bottom of what is causing the > >>>>>> problem, so is there any way you can isolate which code seems to be > >>>>>> going "bad"? > >>>>>> > >>>>>> For example, if this problem affects code in sys/dev/iommu, is there > >>>>>> some way you can compile that part with -O1, or with an older version > >>>>>> of clang (from ports), to see if the problem goes away? > >>>>> > >>>>> I did try removing all custom make.conf settings (previously I just had > >>>>> CPUTYPE?=icelake-server), but that didn't change the behavior. > >>>>> > >>>>> Before I try further build tweaks, I'd like to ask if the IOMMU fault > >>>>> report can provide guidance here? AFAICT all the faults I'm getting > >>>>> show "reason 0x3". If I'm reading the VT-d spec correctly, FR=0x3 > >>>>> indicates an invalid context entry, in other words there's something the > >>>>> hardware doesn't like in the way the address width or pagetable base is > >>>>> configured for the PCIe requestor. > >>>> > >>>> I would start looking at the other direction: might be, there are still some > >>>> left shifts for int32 values with the shift count > 30, or uint32 with the > >>>> count > 31. > >>>> > >>>> Also might be useful to dump each context entry on creation, it is kept > >>>> constant after. > >>> > >>> I did look over the constants in intel_reg.h, and didn't see anything > >>> that looked as though it would be susceptible to sign-extension or > >>> truncation bugs. In the failing case it's much easier for me to catch > >>> the fault messages than any initialization message, so I instrumented > >>> the fault handler to get the context entry from the dmar_ctx object > >>> using the same logic as dmar_map_ctx_entry(), and then dump out the ctx1 > >>> and ctx2 fields. What I see are messages like: > >>> > >>> ... ctx1 0x10013b001 ctx2 0x103 > >>> > >>> At first glance these "look right": the P bit is set in ctx1, and the > >>> rest of the field looks like a valid physical address. ctx2 also > >>> doesn't have any of the reserved bits set, but in all cases it does have > >>> AW=3, which would indicate 57-bit AGAW. But when I boot the last > >>> working kernel, from the revision prior to the llvm15 MFC, I see this in > >>> dmesg: > >>> > >>> ahci0: dmar4 pci0:0:17:5 rid 8d domain 1 mgaw 48 agaw 48 re-mapped > >>> > >>> ...all reported devices show 48-bit MGAW/AGAW, so I would expect ctx2 to > >>> have AW=2. I suspect this may be the source of the fault, but I'm not > >>> sure how it's getting configured that way, whether it's an issue with > >>> reading the capability register or something else. > >>> > >> > >> I can confirm that hacking domain_set_agaw() to always use the settings > >> from sagaw_bits[2] eliminates the faults and at least allows the machine > >> to boot to single-user mode. > > > > I see what's happening now. When I added the hack to always set > > sagaw_bits[2], I noted that the passed-in MGAW was still 57, while > > unit->hw_cap had the correct value of 0x4 (=> 4-level paging, 48-bit AW) > > in bits 12:8. The problem is that sagaw_bits has agaw=64 in its last > > entry. This results in dmar_maxaddr2mgaw() attempting a comparison > > against 1ULL << 64 in the final iteration of its first loop. I suspect > > the new compiler probably determines that last iteration is meaningless > > and simply omits it from the (probably unrolled) loop. Since the "loop" > > terminates with i < nitems(sagaw_bits), the subsequent "allow_less ..." > > case doesn't execute and we end up erroneously selecting a 57-bit > > address width. Just commenting out that last entry in sagaw_bits fixes > > the problem. > > > > So, two questions: > > 1) Does any VT-d hardware actually support 6-level paging? The ca. 2021 > > VT-d spec I'm looking at indicates 5-level is the greatest depth > > supported, with everything above that being reserved. > > > > 2) I'd expect clang to try very hard to error out in a situation like > > this, but I see that sys/conf/kern.mk sets -Wno-shift-count-overflow > > among other things, and more of them were added for clang 15. This > > seems like a really bad idea, regardless of how much of a PITA it may be > > to fix these warnings. > > FWIW, I've been working on trying to re-enable some of the warnings that > were disabled for clang 15 in main. I'll move that one higher up on my > todo list. Can we also have a DMAR-enabled machine in something like the Jenkins cluster to smoke-test IOMMU support before breakage like this makes it into -current let alone -stable? I'd be willing to donate money for such a thing. > > -- > John Baldwin > From nobody Mon May 1 18:04:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9B0w6tzhz48pq1; Mon, 1 May 2023 18:04:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9B0w6DY7z47rv; Mon, 1 May 2023 18:04:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682964240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nA0+yaR2bH6M5iXNhua5h+BIUmgTE++3RyyC95aHzQQ=; b=x5+fN39UjN1sgzVM15mRefw8FTnBU/glljaOfu5WX5zBPXC1UWMbbC/auNQy4w2r5MXQex 7Uf5iZYghBsGWfXxHIxlqak/TXN2kDMQWFekQFvCq/WY0Mr7yclK0LqG7utMUqCKHYRDmA CTK5viKwaybEoIEnXReRtezWQqgU3npq8+zKbLaidc0sAw4rHmDrtyZ4OPXqc2qbnn7aqa JXDfig5RcLa9F3sDdHK3qhmS08/duV3q+/H6YZ9ie+ioTdv0rg7hjmG4NemsNOjPMHqCg/ WvzbTWE2lTlARy5PsHrzu9KAtrEOYpavWiD7tdmBM4E1/vY/MKwcCpucb3mg5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682964240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nA0+yaR2bH6M5iXNhua5h+BIUmgTE++3RyyC95aHzQQ=; b=O6Rh+Aus0iixmHvVbjTmlv8vlccX5FO8PrUHg10ftGzGTqiVTqvf4bnK6jTbdZc2T7vv9R k2f7lWEcLAPLm/CiD1hFT6otqglyZw/wOiJ9wkYeUDmIxZhbCCNmZX2q+M5yimliL574MC 6f/ait3OUcKeGmrMRN4TUdg5a7ppPa8m5873JIpGhoWLJtMCIsVjQk64S3HC6NgwyKmFTl QrW6nDAzR9uX+YrLNbEooa/7v4U3yzHVc+v028BXynWU6b50RjLsg+42q9unZtSlK5ES5E DbZGYRUrFpBhpsIF/oNa4vTzs+PJtfNiU7duU8ck+nzHKROMcHPsxetN6YSt7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682964240; a=rsa-sha256; cv=none; b=a6My7gW/k363IekNPayGkv0aIfE1RtT7XauNqKmr5RY9AhQ84AZ7nv/WF21RoYy19fIUDd sBowQ669ZMPowRbMjJLvtFIa0ks5Q44jH8HFHObwQ2KKC+otwzvctEYE3AlnFpJpwj4Xhy Rqq5iXWzcPSitYNUMVnFfMg/xaHVLUFZSP94BmkYgtoDhMtbQMLhZ5EVnRPTANVmqNWIrT aCVpXE2QegtoJu1kGzEnq+aTeoJ6OQ2PW3LSZT/VehYyhipXJqEw7CeDLN/ffPAMtU74M4 JbM56fWQU3lyKJU8yIzXB00fi4xQ4pGmDqMD0O9Y2LXWpK5uyxgwhEDssN7ZgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9B0w5GwMzFyY; Mon, 1 May 2023 18:04:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341I409h054187; Mon, 1 May 2023 18:04:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341I40xr054186; Mon, 1 May 2023 18:04:00 GMT (envelope-from git) Date: Mon, 1 May 2023 18:04:00 GMT Message-Id: <202305011804.341I40xr054186@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: 75baf3765c68 - main - Cirrus-CI: set PKG_FORMAT via top level `env:` List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 75baf3765c686547e8e4a5510858f45c23ccdec3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=75baf3765c686547e8e4a5510858f45c23ccdec3 commit 75baf3765c686547e8e4a5510858f45c23ccdec3 Author: Ed Maste AuthorDate: 2023-05-01 16:45:36 +0000 Commit: Ed Maste CommitDate: 2023-05-01 18:03:32 +0000 Cirrus-CI: set PKG_FORMAT via top level `env:` This ensures consistency among different CI scripts, including future ones for pkgbase work. Sponsored by: The FreeBSD Foundation --- .cirrus.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index f2c8fa83c59f..f560e9476bc8 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -10,6 +10,9 @@ compute_engine_instance: memory: 8G disk: 40 +env: + PKG_FORMAT: tar + task: matrix: - name: World and kernel amd64 build and boot smoke test @@ -46,7 +49,7 @@ task: - su user -c "make -j$(sysctl -n hw.ncpu) CROSS_TOOLCHAIN=${TOOLCHAIN_PKG} WITHOUT_TOOLCHAIN=yes buildworld buildkernel" package_script: - - su user -c "make CROSS_TOOLCHAIN=${TOOLCHAIN_PKG} WITHOUT_TOOLCHAIN=yes PKG_FORMAT=tar packages" + - su user -c "make CROSS_TOOLCHAIN=${TOOLCHAIN_PKG} WITHOUT_TOOLCHAIN=yes packages" package_check_script: - su user -c "/usr/libexec/flua tools/pkgbase/metalog_reader.lua -c /usr/obj/$(pwd -P)/${TARGET}.${TARGET_ARCH}/worldstage/METALOG" From nobody Mon May 1 18:41:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9Brc52c4z48sLc; Mon, 1 May 2023 18:41:52 +0000 (UTC) (envelope-from dim@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 4Q9Brc4W4mz4Jdn; Mon, 1 May 2023 18:41:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682966512; 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=WQJSoBUPDxqD7SODKYPTU7VQN3SnaoXEl9/nRJRuMyQ=; b=TWqANdDgeEecgngXZJvuolXFN/5RMTAsCXqXrEW59fGec9+fG2Fxf05YydoSa6wIqw0YSH vs50FwX5uaBfV3Fc6zwPRc+Yy5QxUvev8BkcWeVjpM3juUnPJoYt/aoFZJ+9jmI07SKwIK Xiz2OfNoNtizwBWk1wrgEQe1ywlQ0XPO6PITCvdMyJ5CYqg2WJD23wNGXlXZZ4XESBIxeI BTa9j0VvY3Gqzhx/p17mcKqcsXFStI1kpgmzz6nvHf719B6ZSeDF24ViB1klKq0w0oyk/9 30UWLDg+KBZWqM0nhVSXHP0lmTHhjfHFeVbsl1leIBHRojBpoXPiV1vVbCjBRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682966512; 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=WQJSoBUPDxqD7SODKYPTU7VQN3SnaoXEl9/nRJRuMyQ=; b=PZwkcykz3CdXQM60BdTo/38r86IGkHRMGWqBQhoXofX13chI5Wb+aqKwrNtz9vph1USudM C5fFzlyhlNrzyvjMaHIfsTiq0ja1EsQ9n/c3qGWz6MCtV2KAxXehk5PZf/U3tta8zjEqp5 O4JicQDo0KyTA8Drc/nFUYBxUhSZwnh2swTyL5scwQTP8B4XM2ckZCE6hPm+dnakC4wSPu bRglotCIa6onHZ6euemFkKVaFThHZEGLkR90y30KC4LgARKARcKf6eU+afSPGaBm24Iswu DkTZ3Q1uCfb5XDXsuehmmILNONjdTwpqCAVbvoM1gyVeq2JqGIpIF5MwKYk4Qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682966512; a=rsa-sha256; cv=none; b=Sfl4M4CE6JU2h5U8w4sNGf72VElVtL628KRg9e7iLqlRkP12Fvob1KkoCq4dnAdkivb8/p hnzS0Ps35Tv9SSOdv+HV2Bhe/XRAKs7A1BB2RkyCjLZFdfCd/EfIOmrk5eFA9P137WjkMO rqAmtyL6V90kpNVsWRnGIpPUuRz5VMvcNX5tQFE00rJqDcYDchzhv7qJRiRleklwc3txuq IXfGkEcD2bn9ugRiNosXgFbE4Rj1bYJuPM36zVaEpaKqG2OF66AsoEGOuJtCG0i4a+3Sdn mFrOX0iW/0MiDBfQzi9tI2NVcMhxa4Wbj8HFETIFhpRZ7A4UHyYauapNzkt30g== Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "tensor.andric.com", Issuer "R3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q9Brc2rHdzssr; Mon, 1 May 2023 18:41:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (longrow.home.andric.com [192.168.0.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 3FC596EBE8; Mon, 1 May 2023 20:41:51 +0200 (CEST) Content-Type: multipart/signed; boundary="Apple-Mail=_4E63B4C0-59F7-4609-A297-F6686495A611"; protocol="application/pgp-signature"; micalg=pgp-sha1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) Subject: Re: git: 060699e91369 - stable/13 - Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6 From: Dimitry Andric In-Reply-To: Date: Mon, 1 May 2023 20:41:32 +0200 Cc: "Jason A. Harmening" , Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Message-Id: References: <202304092135.339LZMeJ081640@gitrepo.freebsd.org> <76DD2CB9-986B-4349-8F46-3B7BF63EB315@FreeBSD.org> To: John Baldwin X-Mailer: Apple Mail (2.3731.500.231) X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_4E63B4C0-59F7-4609-A297-F6686495A611 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 1 May 2023, at 18:14, John Baldwin wrote: >=20 > On 4/30/23 8:31 PM, Jason A. Harmening wrote: >> On Sun, Apr 30, 2023 at 07:34:45PM -0500, Jason A. Harmening wrote: >>> On Sun, Apr 30, 2023 at 06:47:13PM -0500, Jason A. Harmening wrote: >>>> On Sun, Apr 30, 2023 at 08:09:16AM +0300, Konstantin Belousov = wrote: >>>>> On Sat, Apr 29, 2023 at 02:27:50PM -0500, Jason A. Harmening = wrote: >>>>>> On Sat, Apr 29, 2023 at 08:49:28PM +0200, Dimitry Andric wrote: >>>>>>> On 29 Apr 2023, at 20:33, Jason A. Harmening = wrote: >>>>>>>>=20 >>>>>>>> On Sun, Apr 09, 2023 at 09:35:22PM +0000, Dimitry Andric wrote: >>>>>>>>> The branch stable/13 has been updated by dim: >>>>>>>>>=20 >>>>>>>>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D060699e9136975d51d3f726b9785bdba= c9a62ba6 >>>>>>>>>=20 >>>>>>>>> commit 060699e9136975d51d3f726b9785bdbac9a62ba6 >>>>>>>>> Author: Dimitry Andric >>>>>>>>> AuthorDate: 2023-01-14 16:33:24 +0000 >>>>>>>>> Commit: Dimitry Andric >>>>>>>>> CommitDate: 2023-04-09 14:54:52 +0000 >>>>>>>>>=20 >>>>>>>>> Merge llvm-project release/15.x = llvmorg-15.0.7-0-g8dfdcc7b7bf6 >>>>>>>>>=20 >>>>>>>>> This updates llvm, clang, compiler-rt, libc++, libunwind, = lld, lldb and >>>>>>>>> openmp to llvmorg-15.0.7-0-g8dfdcc7b7bf6. >>>>>>>>>=20 >>>>>>>>> PR: 265425 >>>>>>>>> MFC after: 2 weeks >>>>>>>>=20 >>>>>>>> This MFC of llvm15 appears to have completely broken the Intel = IOMMU >>>>>>>> driver on my stable/13 machine. After this series of commits, = any >>>>>>>> downstream DMA seems to produce an IOMMU translation fault, = which >>>>>>>> renders the machine completely unusable: no nvme boot disk, no = usb >>>>>>>> keyboard, etc. >>>>>>>>=20 >>>>>>>> The faults I see look something like this: >>>>>>>>=20 >>>>>>>> DMAR4: ahci0: pci0:17:5 sid 8d fault acc 0 adt 0x0 reason 0x3 = addr 26000 >>>>>>>>=20 >>>>>>>> It's a bit surprising to see a toolchain upgrade produce = breakage like >>>>>>>> this, but that's what git bisect clearly tells me. I wonder if = some of >>>>>>>> the IOMMU control structures might be defined as C bitfields = and the new >>>>>>>> compiler is emitting them differently? Also, was any breakage = like this >>>>>>>> observed when -current was upgraded to llvm15 several months = ago? >>>>>>>=20 >>>>>>> I haven't heard anything about such breakage, no. >>>>>>>=20 >>>>>>>=20 >>>>>>>> More generally, this is the second time in as many months I've = had to >>>>>>>> deal with IOMMU breakage on -stable. I can't imagine I'm the = only >>>>>>>> person who sees value in running with DMA remapping enabled; do = we need >>>>>>>> a dedicated DMAR-enabled machine in the cluster to smoke-test = changes >>>>>>>> like this? More generally, should we avoid MFCing high-risk = changes >>>>>>>> like this? >>>>>>>=20 >>>>>>> Since there were very few bug reports, it was not deemed high = risk. >>>>>>>=20 >>>>>>> In any case, it would be good to get the bottom of what is = causing the >>>>>>> problem, so is there any way you can isolate which code seems to = be >>>>>>> going "bad"? >>>>>>>=20 >>>>>>> For example, if this problem affects code in sys/dev/iommu, is = there >>>>>>> some way you can compile that part with -O1, or with an older = version >>>>>>> of clang (from ports), to see if the problem goes away? >>>>>>=20 >>>>>> I did try removing all custom make.conf settings (previously I = just had >>>>>> CPUTYPE?=3Dicelake-server), but that didn't change the behavior. >>>>>>=20 >>>>>> Before I try further build tweaks, I'd like to ask if the IOMMU = fault >>>>>> report can provide guidance here? AFAICT all the faults I'm = getting >>>>>> show "reason 0x3". If I'm reading the VT-d spec correctly, = FR=3D0x3 >>>>>> indicates an invalid context entry, in other words there's = something the >>>>>> hardware doesn't like in the way the address width or pagetable = base is >>>>>> configured for the PCIe requestor. >>>>>=20 >>>>> I would start looking at the other direction: might be, there are = still some >>>>> left shifts for int32 values with the shift count > 30, or uint32 = with the >>>>> count > 31. >>>>>=20 >>>>> Also might be useful to dump each context entry on creation, it is = kept >>>>> constant after. >>>>=20 >>>> I did look over the constants in intel_reg.h, and didn't see = anything >>>> that looked as though it would be susceptible to sign-extension or >>>> truncation bugs. In the failing case it's much easier for me to = catch >>>> the fault messages than any initialization message, so I = instrumented >>>> the fault handler to get the context entry from the dmar_ctx object >>>> using the same logic as dmar_map_ctx_entry(), and then dump out the = ctx1 >>>> and ctx2 fields. What I see are messages like: >>>>=20 >>>> ... ctx1 0x10013b001 ctx2 0x103 >>>>=20 >>>> At first glance these "look right": the P bit is set in ctx1, and = the >>>> rest of the field looks like a valid physical address. ctx2 also >>>> doesn't have any of the reserved bits set, but in all cases it does = have >>>> AW=3D3, which would indicate 57-bit AGAW. But when I boot the last >>>> working kernel, from the revision prior to the llvm15 MFC, I see = this in >>>> dmesg: >>>>=20 >>>> ahci0: dmar4 pci0:0:17:5 rid 8d domain 1 mgaw 48 agaw 48 re-mapped >>>>=20 >>>> ...all reported devices show 48-bit MGAW/AGAW, so I would expect = ctx2 to >>>> have AW=3D2. I suspect this may be the source of the fault, but = I'm not >>>> sure how it's getting configured that way, whether it's an issue = with >>>> reading the capability register or something else. >>>>=20 >>>=20 >>> I can confirm that hacking domain_set_agaw() to always use the = settings >>> from sagaw_bits[2] eliminates the faults and at least allows the = machine >>> to boot to single-user mode. >> I see what's happening now. When I added the hack to always set >> sagaw_bits[2], I noted that the passed-in MGAW was still 57, while >> unit->hw_cap had the correct value of 0x4 (=3D> 4-level paging, = 48-bit AW) >> in bits 12:8. The problem is that sagaw_bits has agaw=3D64 in its = last >> entry. This results in dmar_maxaddr2mgaw() attempting a comparison >> against 1ULL << 64 in the final iteration of its first loop. I = suspect >> the new compiler probably determines that last iteration is = meaningless >> and simply omits it from the (probably unrolled) loop. Since the = "loop" >> terminates with i < nitems(sagaw_bits), the subsequent "allow_less = ..." >> case doesn't execute and we end up erroneously selecting a 57-bit >> address width. Just commenting out that last entry in sagaw_bits = fixes >> the problem. >> So, two questions: >> 1) Does any VT-d hardware actually support 6-level paging? The ca. = 2021 >> VT-d spec I'm looking at indicates 5-level is the greatest depth >> supported, with everything above that being reserved. >> 2) I'd expect clang to try very hard to error out in a situation like >> this, but I see that sys/conf/kern.mk sets -Wno-shift-count-overflow >> among other things, and more of them were added for clang 15. This >> seems like a really bad idea, regardless of how much of a PITA it may = be >> to fix these warnings. >=20 > FWIW, I've been working on trying to re-enable some of the warnings = that > were disabled for clang 15 in main. I'll move that one higher up on = my > todo list. In this particular case, it doesn't warn about it though. I think KASAN might be a better 'catcher' for this kind of error, or a KUBSAN, if we had one... -Dimitry --Apple-Mail=_4E63B4C0-59F7-4609-A297-F6686495A611 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCZFAH3AAKCRCwXqMKLiCW o8k3AJ9DkrMB167K+sSNel6qHWAMhRILBwCfYE5kwUADLOtEslYT8QQ1pzM2sYI= =/I7V -----END PGP SIGNATURE----- --Apple-Mail=_4E63B4C0-59F7-4609-A297-F6686495A611-- From nobody Mon May 1 19:28:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9Ctl1pqVz48vjn; Mon, 1 May 2023 19:28:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9Ctl1M7Xz4Mwx; Mon, 1 May 2023 19:28:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682969327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D4OuiSfR+Ioq/kpqeQhiuNJNsa0sfFPLiKxDpPXrFUA=; b=eauecoYqd60AiepqBEYXkitgjsFrOhVQMJxPE0vnEcnr6SVd0xm4BaFNfaBiEQNUnhOvf2 alzQYYqG5atGLbRohiipupu2ljA3gNV4pKBHTCJ99U7Vze9mVlZ40p6cyJV369zGM2AhzE 43LVH3FWU7VZR5yJIMxD/plx0oAXoEIvWyRu0w4cyBtT0Q+VfG+hcBmWZxzEhS91WxVgBd ZvMqRLJoVXFy3wU+E0N8YaKMTOrpt4+rVpXiDJ5EWjqChaEQFR5whxdIXgTxXR5WYttK+p ijZUKD63+TV42NlfiEZvoouxtQpoWmSy65PhmPFry1MnSBcVloWrWh5URf4UnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682969327; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D4OuiSfR+Ioq/kpqeQhiuNJNsa0sfFPLiKxDpPXrFUA=; b=kYc4gVBKYjt2JJHJ3SObO23XflYS054oohsyo+ERc1yn5YxVZbQ+VtfP2PYErfPQiXO/3o N/HpN87Z82aqBtxFH2ZCH20UUX42SWptoupkygvp5lpvaTsDisZEslQkxFQyTunET0362V fzoW8XegjUQfXfwbPqSwpP6oIo8/RzQjjpN9jca0ge7wo1j/d3Av31cD9sAl6QdTsj9QC5 Zr1GRCPOHQDj2SdoG4JmTymn3cjYkjlqah4AGzqWA0/eyftcPfiJabjUQP9i8jk9K+oSFP MIWmlgd9sBQSyBFakSLcO1NYN2Xo9ts+LDXj+qnmfGRPOsxL09v9GmbRAUpO5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682969327; a=rsa-sha256; cv=none; b=FbZQPmRIXFavU6nkHI+lMZ+dN3/QG/hiPXtj1bkzFGCREX7luD+q2f4btDYWxdhCpipvKp 8ryG3st7KcxjIyVbr256K1gYNu4rTNOcYjk2M8gWLT7HciRC8Czv4fn0cbA5E8VJygoUVb FyAKrCV+kouLB0ODUjx6381qdXgp1H4Ianh8EGw9FRK7UDpj+anMZaHSUhsCbd3xiKx31p C1JR9g8a8gJfA/oM17M+AQ9D5g5Lr41qiOZzgfrzIE05uDcdZSCmNg+xsni3gRREbKivYE RE9n/3OUZr6tDbFhG9lEzrs2QMHGsWi/zVrJOmzJ5/sEWymV6zDWeaerUS5FBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9Ctl0Lq8zHsc; Mon, 1 May 2023 19:28:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341JSkXM087162; Mon, 1 May 2023 19:28:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341JSkmO087161; Mon, 1 May 2023 19:28:46 GMT (envelope-from git) Date: Mon, 1 May 2023 19:28:46 GMT Message-Id: <202305011928.341JSkmO087161@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: 2a3bd0870869 - main - pkgbase: hide duplicate METALOG directory warnings under verbose List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2a3bd0870869819354b5ea65761d13e5e2987697 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2a3bd0870869819354b5ea65761d13e5e2987697 commit 2a3bd0870869819354b5ea65761d13e5e2987697 Author: Ed Maste AuthorDate: 2023-05-01 17:25:18 +0000 Commit: Ed Maste CommitDate: 2023-05-01 19:22:36 +0000 pkgbase: hide duplicate METALOG directory warnings under verbose Creating directories multiple times is an inherent side effect of the way installation is done. Hide warnings from duplicate directory entries (with identical metadata) under metalog_reader's verbose mode. Duplicate file entries are always reported. They currently generate warnings but will be switched to errors once the few instances currently in the tree are fixed. PR: 244596, 271178 Reviewed by: kevans Sponsored By: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39898 --- tools/pkgbase/metalog_reader.lua | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tools/pkgbase/metalog_reader.lua b/tools/pkgbase/metalog_reader.lua index 3e8cf8461914..9cc5fd727923 100644 --- a/tools/pkgbase/metalog_reader.lua +++ b/tools/pkgbase/metalog_reader.lua @@ -392,12 +392,18 @@ function Analysis_session(metalog, verbose, w_notagdirs) if #rows == 1 then goto continue end local iseq, offby = metalogrows_all_equal(rows) if iseq then -- repeated line, just a warning - warn[#warn+1] = 'warning: '..filename - .. ' ' .. rows[1].attrs.type - ..' repeated with same meta: line ' - ..table.concat( - table_map(rows, function(e) return e.linenum end), ',') - warn[#warn+1] = '\n' + local dupmsg = filename .. ' ' .. + rows[1].attrs.type .. + ' repeated with same meta: line ' .. + table.concat(table_map(rows, function(e) return e.linenum end), ',') + if rows[1].attrs.type == "dir" then + if verbose then + warn[#warn+1] = 'warning: ' .. dupmsg .. '\n' + end + else + -- XXX downgrade to warning until instances in the tree are fixed (PR271178) + warn[#warn+1] = 'error: ' .. dupmsg .. '\n' + end elseif not metalogrows_all_equal(rows, false, true) then -- same filename (possibly different tags), different metadata, an error errs[#errs+1] = 'error: '..filename From nobody Mon May 1 19:33:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9D0k5tSmz48w8p; Mon, 1 May 2023 19:33:58 +0000 (UTC) (envelope-from jah@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 4Q9D0k5L9yz4NQ1; Mon, 1 May 2023 19:33:58 +0000 (UTC) (envelope-from jah@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682969638; 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=DzInxjNQtfRHVEkkiG1V4W/0Aq6ZooQr32FG+ULdV2E=; b=ZuqicZ/iJyEBWoE+bf3Ero7zzjveeGef/UtYuvCNgH9OXs0kFZkqzJoUjqg8emI4IMrMOi 0NAC1hIWXSmE7NSi/8YgoRAgw+0QRctDIRSG2DwumNkFaTkogJ2nqcglyRYa6Zk9S9vwi+ 2kTZk0wm8uySwNxfE2QC2K3xG0U9uicdzxxLgGS8s9wyepx4nosh5tRyDBfr7e2m+z5/PQ RvGPYuEbH+CTGvdJHqWSXZhVrZPBBsxrlvsrX1CBP3yKPpIugwkVnlsggYvX5HaCWK+ZZ2 3UFaq4mkm4JmERbcHt65Kv2537rhbCAe3+lzZAwJgpt7tbpc4gNY5ZETNxJIsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682969638; 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=DzInxjNQtfRHVEkkiG1V4W/0Aq6ZooQr32FG+ULdV2E=; b=d7wLt4f8k8Gi+tX+a26zyEaXDXMXf0JzBW3Q37hPuZtxsZv4hwt2QHSx6kMPMqBvgKWEBj L5S47Jo63zQq13inp34unRLJql+almEHW+mF1jsivehajOPnlgPny+Nf4To+FbDbCo2dQz dkk/Rpddc6XVpKap2aDg4eEm8wleJH+nQvQ08Fh4YvJw1MQ08dceVNmLrpO0ozlEM2A4L6 4clwLO4lGxD/enxx0E9fk2DFue8gKj+gJGY9QhmHDANmNfXrc7Tk4t/ZlHF9zolvLH1lyU +Bmkxyx7o4LhsIxQ3AoGG/S28aIGzLLvGS6FUZ38WEGeKzSQgJ9v6ByFPQJ3NA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682969638; a=rsa-sha256; cv=none; b=CyRetMIjwE7G7XyP6hwoZj+K+TE5V7451XRbs541wfH202XPE7jEHI5+dxZQfIBPNKtF7n BPg4OFnWN4zb05V4hYv2RDUm24NzCBkx1uCV6RrVOxx4JzilDFg72k7rwh0luRJ5QKvALo kOWycWD9wQb58d9sVyIitty/srB+Zvb9ughJi3gJsgIDOvUXy5oW9wa9PKkomv8DfM/Bmo 4/bLE5/jVXuwc9uLbbc4gagCH1qmPbzV5KMqMSfy6yLMANnhUKYImrM0Yp6yrBAXMAqODl z4HsNeEtsv5pABXvzDrXaT0KrRO2prrcOpZke8dZIJP9DS3LDwwualyPmcca9Q== Received: from corona (047-232-115-243.res.spectrum.com [47.232.115.243]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jah) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q9D0k1S4SztrW; Mon, 1 May 2023 19:33:58 +0000 (UTC) (envelope-from jah@freebsd.org) Date: Mon, 1 May 2023 14:33:56 -0500 From: "Jason A. Harmening" To: Dimitry Andric Cc: John Baldwin , Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Subject: Re: git: 060699e91369 - stable/13 - Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6 Message-ID: References: <202304092135.339LZMeJ081640@gitrepo.freebsd.org> <76DD2CB9-986B-4349-8F46-3B7BF63EB315@FreeBSD.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ThisMailContainsUnwantedMimeParts: N On Mon, May 01, 2023 at 08:41:32PM +0200, Dimitry Andric wrote: > On 1 May 2023, at 18:14, John Baldwin wrote: > > > > On 4/30/23 8:31 PM, Jason A. Harmening wrote: > >> On Sun, Apr 30, 2023 at 07:34:45PM -0500, Jason A. Harmening wrote: > >>> On Sun, Apr 30, 2023 at 06:47:13PM -0500, Jason A. Harmening wrote: > >>>> On Sun, Apr 30, 2023 at 08:09:16AM +0300, Konstantin Belousov wrote: > >>>>> On Sat, Apr 29, 2023 at 02:27:50PM -0500, Jason A. Harmening wrote: > >>>>>> On Sat, Apr 29, 2023 at 08:49:28PM +0200, Dimitry Andric wrote: > >>>>>>> On 29 Apr 2023, at 20:33, Jason A. Harmening wrote: > >>>>>>>> > >>>>>>>> On Sun, Apr 09, 2023 at 09:35:22PM +0000, Dimitry Andric wrote: > >>>>>>>>> The branch stable/13 has been updated by dim: > >>>>>>>>> > >>>>>>>>> URL: https://cgit.FreeBSD.org/src/commit/?id=060699e9136975d51d3f726b9785bdbac9a62ba6 > >>>>>>>>> > >>>>>>>>> commit 060699e9136975d51d3f726b9785bdbac9a62ba6 > >>>>>>>>> Author: Dimitry Andric > >>>>>>>>> AuthorDate: 2023-01-14 16:33:24 +0000 > >>>>>>>>> Commit: Dimitry Andric > >>>>>>>>> CommitDate: 2023-04-09 14:54:52 +0000 > >>>>>>>>> > >>>>>>>>> Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6 > >>>>>>>>> > >>>>>>>>> This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and > >>>>>>>>> openmp to llvmorg-15.0.7-0-g8dfdcc7b7bf6. > >>>>>>>>> > >>>>>>>>> PR: 265425 > >>>>>>>>> MFC after: 2 weeks > >>>>>>>> > >>>>>>>> This MFC of llvm15 appears to have completely broken the Intel IOMMU > >>>>>>>> driver on my stable/13 machine. After this series of commits, any > >>>>>>>> downstream DMA seems to produce an IOMMU translation fault, which > >>>>>>>> renders the machine completely unusable: no nvme boot disk, no usb > >>>>>>>> keyboard, etc. > >>>>>>>> > >>>>>>>> The faults I see look something like this: > >>>>>>>> > >>>>>>>> DMAR4: ahci0: pci0:17:5 sid 8d fault acc 0 adt 0x0 reason 0x3 addr 26000 > >>>>>>>> > >>>>>>>> It's a bit surprising to see a toolchain upgrade produce breakage like > >>>>>>>> this, but that's what git bisect clearly tells me. I wonder if some of > >>>>>>>> the IOMMU control structures might be defined as C bitfields and the new > >>>>>>>> compiler is emitting them differently? Also, was any breakage like this > >>>>>>>> observed when -current was upgraded to llvm15 several months ago? > >>>>>>> > >>>>>>> I haven't heard anything about such breakage, no. > >>>>>>> > >>>>>>> > >>>>>>>> More generally, this is the second time in as many months I've had to > >>>>>>>> deal with IOMMU breakage on -stable. I can't imagine I'm the only > >>>>>>>> person who sees value in running with DMA remapping enabled; do we need > >>>>>>>> a dedicated DMAR-enabled machine in the cluster to smoke-test changes > >>>>>>>> like this? More generally, should we avoid MFCing high-risk changes > >>>>>>>> like this? > >>>>>>> > >>>>>>> Since there were very few bug reports, it was not deemed high risk. > >>>>>>> > >>>>>>> In any case, it would be good to get the bottom of what is causing the > >>>>>>> problem, so is there any way you can isolate which code seems to be > >>>>>>> going "bad"? > >>>>>>> > >>>>>>> For example, if this problem affects code in sys/dev/iommu, is there > >>>>>>> some way you can compile that part with -O1, or with an older version > >>>>>>> of clang (from ports), to see if the problem goes away? > >>>>>> > >>>>>> I did try removing all custom make.conf settings (previously I just had > >>>>>> CPUTYPE?=icelake-server), but that didn't change the behavior. > >>>>>> > >>>>>> Before I try further build tweaks, I'd like to ask if the IOMMU fault > >>>>>> report can provide guidance here? AFAICT all the faults I'm getting > >>>>>> show "reason 0x3". If I'm reading the VT-d spec correctly, FR=0x3 > >>>>>> indicates an invalid context entry, in other words there's something the > >>>>>> hardware doesn't like in the way the address width or pagetable base is > >>>>>> configured for the PCIe requestor. > >>>>> > >>>>> I would start looking at the other direction: might be, there are still some > >>>>> left shifts for int32 values with the shift count > 30, or uint32 with the > >>>>> count > 31. > >>>>> > >>>>> Also might be useful to dump each context entry on creation, it is kept > >>>>> constant after. > >>>> > >>>> I did look over the constants in intel_reg.h, and didn't see anything > >>>> that looked as though it would be susceptible to sign-extension or > >>>> truncation bugs. In the failing case it's much easier for me to catch > >>>> the fault messages than any initialization message, so I instrumented > >>>> the fault handler to get the context entry from the dmar_ctx object > >>>> using the same logic as dmar_map_ctx_entry(), and then dump out the ctx1 > >>>> and ctx2 fields. What I see are messages like: > >>>> > >>>> ... ctx1 0x10013b001 ctx2 0x103 > >>>> > >>>> At first glance these "look right": the P bit is set in ctx1, and the > >>>> rest of the field looks like a valid physical address. ctx2 also > >>>> doesn't have any of the reserved bits set, but in all cases it does have > >>>> AW=3, which would indicate 57-bit AGAW. But when I boot the last > >>>> working kernel, from the revision prior to the llvm15 MFC, I see this in > >>>> dmesg: > >>>> > >>>> ahci0: dmar4 pci0:0:17:5 rid 8d domain 1 mgaw 48 agaw 48 re-mapped > >>>> > >>>> ...all reported devices show 48-bit MGAW/AGAW, so I would expect ctx2 to > >>>> have AW=2. I suspect this may be the source of the fault, but I'm not > >>>> sure how it's getting configured that way, whether it's an issue with > >>>> reading the capability register or something else. > >>>> > >>> > >>> I can confirm that hacking domain_set_agaw() to always use the settings > >>> from sagaw_bits[2] eliminates the faults and at least allows the machine > >>> to boot to single-user mode. > >> I see what's happening now. When I added the hack to always set > >> sagaw_bits[2], I noted that the passed-in MGAW was still 57, while > >> unit->hw_cap had the correct value of 0x4 (=> 4-level paging, 48-bit AW) > >> in bits 12:8. The problem is that sagaw_bits has agaw=64 in its last > >> entry. This results in dmar_maxaddr2mgaw() attempting a comparison > >> against 1ULL << 64 in the final iteration of its first loop. I suspect > >> the new compiler probably determines that last iteration is meaningless > >> and simply omits it from the (probably unrolled) loop. Since the "loop" > >> terminates with i < nitems(sagaw_bits), the subsequent "allow_less ..." > >> case doesn't execute and we end up erroneously selecting a 57-bit > >> address width. Just commenting out that last entry in sagaw_bits fixes > >> the problem. > >> So, two questions: > >> 1) Does any VT-d hardware actually support 6-level paging? The ca. 2021 > >> VT-d spec I'm looking at indicates 5-level is the greatest depth > >> supported, with everything above that being reserved. > >> 2) I'd expect clang to try very hard to error out in a situation like > >> this, but I see that sys/conf/kern.mk sets -Wno-shift-count-overflow > >> among other things, and more of them were added for clang 15. This > >> seems like a really bad idea, regardless of how much of a PITA it may be > >> to fix these warnings. > > > > FWIW, I've been working on trying to re-enable some of the warnings that > > were disabled for clang 15 in main. I'll move that one higher up on my > > todo list. > > In this particular case, it doesn't warn about it though. I think KASAN > might be a better 'catcher' for this kind of error, or a KUBSAN, if we > had one... If you've tried turning all the relevant warnings/errors back on for this code, and clang truly doesn't warn about it, then wouldn't this warrant a bug against upstream clang? This is a situation in which the compiler detects a left-shift overflow, by itself at least a warning condition, and uses it to materially alter program flow. > > -Dimitry > From nobody Mon May 1 20:23:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9F6P0CjQz48yfp; Mon, 1 May 2023 20:23:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9F6N6q23z3DHJ; Mon, 1 May 2023 20:23:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682972637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UqyrauoSd8xuNLKL5GZmlaoc/xG1V1IN59S90RPFTQw=; b=KtnAp7M3sTGO18yVnMXBJhvVk1pNj36F2p6wl7/kOh46QfBpPdkjJyxZhZp3zVWogr4/xT 5SbSD5rKJaR4A06EcDpHk6vQw3eLBKh8HW3mdFLGSdtbU31VdykVB/WOS/ichF5OqP8Duu czlqZ0kdTHjdpYsyVoR9ChU8w2SBhZeA60QaCtKP8DER1SlxgMbJ4DakiTGrij+CWl6Q1R b1qF7Bt+MDtOOq+3v75ylfwzCamIrgPtnKvsuMbEFiAKI4GT3GZYQ6pgTAulixW7zGg+Ig 9Q+IAprYwWAn/Bb+pzz30O1FIPCc88YA3fkR5GFJKAfKMEoMwxMx5kKj5VLdgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682972637; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UqyrauoSd8xuNLKL5GZmlaoc/xG1V1IN59S90RPFTQw=; b=ulgCGwnX4uV6p618MqHDYxlK4Q7Dmn7hFoRtQDvDHCmx2FGzP7R1GuQVkpKcqyAJLLx4R4 bzfDrIZWmZTBKRu2FRedlN1MqHEfAO/9Pl7TJz9TbcPuSVjuaI0z+a18ZFCcDm1VeM+nya bVvdTb7+81RChuk7cCYHbNvcaTbglMGcPt+LoVBqMslQX2izByUfgc4Qz71hP6xlr7dneh ql5mCgwNL1IaXczXPPTp4VHbwKH2p261XYnVnIKtPzNDpd0pIrE0+gIwOVbDnh6H6g7mQ7 1/EQZj8YyJdgiaCXvozt42fGfXaNGbtY7vpHkM4RnssC2IJ7Lh4OMZ0mjKehHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682972637; a=rsa-sha256; cv=none; b=UdJjCVF6kkutB3mcc5bHsR/iXyxUYnMraqBRBtEMNen4KlHbqvJg2BqPZNj3ORyR3CL03Y H1xodNhTXQQWeuKGE5K1o8Gtd3tYd+6r9lDlfWwYWjCt5GvnmZk8eqFnudN+siMAtJc9g0 SjNbnKyXeroA0Xz8yo1yz40ufKpWG5uk68hiUK3h+q8jAHukqGgso+R9AXANmXXegWho53 VX13HuZvhbaa/7O4Lifcy/+ULsoXiYHpklnY1+PnYWtfrtRS5YVz1Mm9tTSKCz1mh9iI7Q h8rd30gCDLl4/YsKryXkq/WXCpXc/MGvF4r9uXv67voK4nohT9JRNeKLtZxRTg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9F6N5sDPzJll; Mon, 1 May 2023 20:23:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341KNuRq085471; Mon, 1 May 2023 20:23:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341KNubv085470; Mon, 1 May 2023 20:23:56 GMT (envelope-from git) Date: Mon, 1 May 2023 20:23:56 GMT Message-Id: <202305012023.341KNubv085470@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: ed2e50508ce4 - main - bxe: prefer C99 bool to boolean_t List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ed2e50508ce4f3473cf8afc9b395813149486196 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ed2e50508ce4f3473cf8afc9b395813149486196 commit ed2e50508ce4f3473cf8afc9b395813149486196 Author: Ed Maste AuthorDate: 2019-07-04 14:56:07 +0000 Commit: Ed Maste CommitDate: 2023-05-01 20:23:39 +0000 bxe: prefer C99 bool to boolean_t Differential Revision: https://reviews.freebsd.org/D20853 --- sys/dev/bxe/bxe.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/dev/bxe/bxe.c b/sys/dev/bxe/bxe.c index 3a25321138ec..537501b6b959 100644 --- a/sys/dev/bxe/bxe.c +++ b/sys/dev/bxe/bxe.c @@ -7566,12 +7566,12 @@ bxe_attn_int_deasserted4(struct bxe_softc *sc, uint32_t attn) { uint32_t val; - boolean_t err_flg = FALSE; + bool err_flg = false; if (attn & AEU_INPUTS_ATTN_BITS_PGLUE_HW_INTERRUPT) { val = REG_RD(sc, PGLUE_B_REG_PGLUE_B_INT_STS_CLR); BLOGE(sc, "PGLUE hw attention 0x%08x\n", val); - err_flg = TRUE; + err_flg = true; if (val & PGLUE_B_PGLUE_B_INT_STS_REG_ADDRESS_ERROR) BLOGE(sc, "PGLUE_B_PGLUE_B_INT_STS_REG_ADDRESS_ERROR\n"); if (val & PGLUE_B_PGLUE_B_INT_STS_REG_INCORRECT_RCV_BEHAVIOR) @@ -7595,7 +7595,7 @@ bxe_attn_int_deasserted4(struct bxe_softc *sc, if (attn & AEU_INPUTS_ATTN_BITS_ATC_HW_INTERRUPT) { val = REG_RD(sc, ATC_REG_ATC_INT_STS_CLR); BLOGE(sc, "ATC hw attention 0x%08x\n", val); - err_flg = TRUE; + err_flg = true; if (val & ATC_ATC_INT_STS_REG_ADDRESS_ERROR) BLOGE(sc, "ATC_ATC_INT_STS_REG_ADDRESS_ERROR\n"); if (val & ATC_ATC_INT_STS_REG_ATC_TCPL_TO_NOT_PEND) @@ -7615,7 +7615,7 @@ bxe_attn_int_deasserted4(struct bxe_softc *sc, BLOGE(sc, "FATAL parity attention set4 0x%08x\n", (uint32_t)(attn & (AEU_INPUTS_ATTN_BITS_PGLUE_PARITY_ERROR | AEU_INPUTS_ATTN_BITS_ATC_PARITY_ERROR))); - err_flg = TRUE; + err_flg = true; } if (err_flg) { BXE_SET_ERROR_BIT(sc, BXE_ERR_MISC); @@ -8019,7 +8019,7 @@ bxe_attn_int_deasserted2(struct bxe_softc *sc, int reg_offset; uint32_t val0, mask0, val1, mask1; uint32_t val; - boolean_t err_flg = FALSE; + bool err_flg = false; if (attn & AEU_INPUTS_ATTN_BITS_CFC_HW_INTERRUPT) { val = REG_RD(sc, CFC_REG_CFC_INT_STS_CLR); @@ -8027,7 +8027,7 @@ bxe_attn_int_deasserted2(struct bxe_softc *sc, /* CFC error attention */ if (val & 0x2) { BLOGE(sc, "FATAL error from CFC\n"); - err_flg = TRUE; + err_flg = true; } } @@ -8037,13 +8037,13 @@ bxe_attn_int_deasserted2(struct bxe_softc *sc, /* RQ_USDMDP_FIFO_OVERFLOW */ if (val & 0x18000) { BLOGE(sc, "FATAL error from PXP\n"); - err_flg = TRUE; + err_flg = true; } if (!CHIP_IS_E1x(sc)) { val = REG_RD(sc, PXP_REG_PXP_INT_STS_CLR_1); BLOGE(sc, "PXP hw attention-1 0x%08x\n", val); - err_flg = TRUE; + err_flg = true; } } @@ -8080,7 +8080,7 @@ bxe_attn_int_deasserted2(struct bxe_softc *sc, */ if (val0 & PXP2_EOP_ERROR_BIT) { BLOGE(sc, "PXP2_WR_PGLUE_EOP_ERROR\n"); - err_flg = TRUE; + err_flg = true; /* * if only PXP2_PXP2_INT_STS_0_REG_WR_PGLUE_EOP_ERROR is @@ -8103,7 +8103,7 @@ bxe_attn_int_deasserted2(struct bxe_softc *sc, BLOGE(sc, "FATAL HW block attention set2 0x%x\n", (uint32_t)(attn & HW_INTERRUT_ASSERT_SET_2)); - err_flg = TRUE; + err_flg = true; bxe_panic(sc, ("HW block attention set2\n")); } if(err_flg) { @@ -8121,7 +8121,7 @@ bxe_attn_int_deasserted1(struct bxe_softc *sc, int port = SC_PORT(sc); int reg_offset; uint32_t val; - boolean_t err_flg = FALSE; + bool err_flg = false; if (attn & AEU_INPUTS_ATTN_BITS_DOORBELLQ_HW_INTERRUPT) { val = REG_RD(sc, DORQ_REG_DORQ_INT_STS_CLR); @@ -8129,7 +8129,7 @@ bxe_attn_int_deasserted1(struct bxe_softc *sc, /* DORQ discard attention */ if (val & 0x2) { BLOGE(sc, "FATAL error from DORQ\n"); - err_flg = TRUE; + err_flg = true; } } @@ -8143,7 +8143,7 @@ bxe_attn_int_deasserted1(struct bxe_softc *sc, BLOGE(sc, "FATAL HW block attention set1 0x%08x\n", (uint32_t)(attn & HW_INTERRUT_ASSERT_SET_1)); - err_flg = TRUE; + err_flg = true; bxe_panic(sc, ("HW block attention set1\n")); } if(err_flg) { From nobody Mon May 1 20:47:26 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9FdW1fMNz49062; Mon, 1 May 2023 20:47:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9FdW18TDz3FtQ; Mon, 1 May 2023 20:47:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682974047; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Ni0Xmg5xVHphoHDT51QpkRp391fgCctIMQ2aT0o7p8=; b=RMOS/M/dQPxTTPPYQMB19xhT6rnhlDuSJJEevG87vnpQmZ8m4sPV5Vk8qnzddIKIcD0cKm 2eopPshVe+lBK4fHG0vUls7UG9GXnotZm49GCeX8p8NEpoyf0Iy2niOitOV60SAuwjINez qc1esVk0Q2/wdqwE5CBogBLdJ5nINjT1GzCmAancpwkNEf1rT1AOqDJ2OzIPwyzYnSwiLR cUFu7e2cufRjIfcPbJGfsRh3XDSA7y+DEmhsxle9Gww16kigBFcg6B33qwTqrXz3Pyn1G9 C129/My6NozJ0xvBrd1K2N9aEiIfWX2Y/RyklGbgcuqStygt6MLfOFKm5x1kxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682974047; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Ni0Xmg5xVHphoHDT51QpkRp391fgCctIMQ2aT0o7p8=; b=sCAxsxqiJFS1PjGt4WdcMm9Wi8TAmFe8zTwNk5NFyhRq98/iMyL8IqW1JWJWy48aMbjJ8s 0SxMYW4sXpPfcU+23jQ4sr/sbiqVyu27CRWh47M2OwmLsOJKcEy2atAmvDHpQtTViyZ89G iT7nltu12xfzm5k0jlLGlkfGZaGXHUCt2uBWFQscgOMOtUMxIm8TyjkkrH5Q7/Be/WBDjq 19/PwDoR8ydrIQ3mperki7i0hcWgkx72rXRu43Wy+ae+DJhv8xF3snRZQY3dE9PaB1PsqY HilUM8TP+KlGFSrC3uIknBo17XqfbZy/+0eOpUnEtk+aH2B9CLA2rr92OTcMMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682974047; a=rsa-sha256; cv=none; b=fJoPHlOcYXYTGMY7hU715n4Z31Rb+6285XZA0A5lemPDF8IiKsGSpuBACevyUwCAEaGawx yf+qmUGOCXaVlZ0zMn+O7387UAb/KFzevYnTpznAbl2rFpRVRA1M0PQ70zRPFGOZ3n96F7 PPPusk7/ITysZY9/tZe8j3+xJPj0fhHp8DohnNxodthoBgdDvLME+7PsTkMRijWhoxhzWn yCC4/oSH9vh89IF6GSVYoTtS4WO7eqAeJa+8dFQDgaLSRD4C8IYgtAohlXyETXlxyfOwUT BFCFaEATZfshG4uKDgwiogNYmcEubZJcex2oZ2yaB4XAhn/r5J3RqGJclnGjDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9FdW062rzKvM; Mon, 1 May 2023 20:47:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341KlQpQ018581; Mon, 1 May 2023 20:47:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341KlQVT018580; Mon, 1 May 2023 20:47:26 GMT (envelope-from git) Date: Mon, 1 May 2023 20:47:26 GMT Message-Id: <202305012047.341KlQVT018580@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: 5f2e84015da7 - main - bsd.lib.mk: decouple lib*_pic.a from TOOLCHAIN build knob List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5f2e84015da7a664bba0af7727349c9c3f6902ba Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5f2e84015da7a664bba0af7727349c9c3f6902ba commit 5f2e84015da7a664bba0af7727349c9c3f6902ba Author: Ed Maste AuthorDate: 2023-05-01 20:33:47 +0000 Commit: Ed Maste CommitDate: 2023-05-01 20:46:39 +0000 bsd.lib.mk: decouple lib*_pic.a from TOOLCHAIN build knob A user may use a tool chain from a package or just use an existing tool chain from a previous installation. There is no reason for this to disable the installation of lib${LIB}_pic.a. This also means we don't need to force MK_TOOLCHAIN=yes in lib/libc. This reverts part of commit c0f5aeb0329d71e6b02379133c0c9c0145c9afea. Reviewed by: jrtc27 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39917 --- lib/libc/Makefile | 3 --- share/mk/bsd.lib.mk | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/libc/Makefile b/lib/libc/Makefile index e2a8f1473bf3..2b06bc1b3c5a 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -6,9 +6,6 @@ SHLIBDIR?= /lib .include -# Force building of libc_pic.a -MK_TOOLCHAIN= yes - LIBC_SRCTOP?= ${.CURDIR} # Pick the current architecture directory for libc. In general, this is diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 1d4a97134d41..8e5035f6db41 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -378,7 +378,7 @@ ${SHLIB_NAME}.debug: ${SHLIB_NAME_FULL} .endif .endif #defined(SHLIB_NAME) -.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" +.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) _LIBS+= lib${LIB_PRIVATE}${LIB}_pic.a lib${LIB_PRIVATE}${LIB}_pic.a: ${SOBJS} @@ -540,7 +540,7 @@ _libinstall: .endif # SHLIB_LDSCRIPT .endif # SHLIB_LINK .endif # SHIB_NAME -.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" +.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dev} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR}/ .endif From nobody Mon May 1 21:04:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G0q2vk1z491J4; Mon, 1 May 2023 21: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 4Q9G0q2Rkyz3HkX; Mon, 1 May 2023 21: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=1682975051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HMtSs3ABBn7HI15+LTQTbaR3b0XVROrcanyWpONxqZQ=; b=kq2uvsmjpqXw/p4naAkybydQe4A4ImbYdhFWY4vWV3CkHvGOCCACrUY0t4TUbFsr02vWT5 ctiDY08y5wedu2m2V8JpNfA4j7m9/+wx2Ggz2BJvKqWQj3Ckp5rhGpWwgl5lvvaT60ATOB cOaFP2TrIuZL1QvvFaCiHBAvtf/YLLBN5Of50wGCVGNKy4ia4He+RhvL2yU3qmHQanvD1n uQu68e8rbZvddfFgVeJdXa1ONRy6ik6N7DhWIt/FVVV4OiWx9zjOs35cXnPBRXgxS28zgA vQK5f5+49m3fu7fEnFa45PT06yWwaI4ATSXo97TKyiTttLIW4M1kuX3Ag3YNng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HMtSs3ABBn7HI15+LTQTbaR3b0XVROrcanyWpONxqZQ=; b=OGsCy5oHAm0RwXk+l1BlZnmCwyB4vw6Z9VVqKlBvVlS/AZis9yXwI1wny8Ruq3pzK1okd2 ft2EqgvoHA/EKMq8+7Z2lIt4rl0zfG/wtgsReMzmUzhilJijobIHDy0tIa5EGnZtrohtn3 5P6LWZi3aAFLyS0ZIKePG+YuUYCn2CN8lNsdRqRO5hvi9LnX+FUXXBlxAfV2+4VBSyafqH p8NgYpHEP4+EooXYX5IYYp5lTcNbMR0cM6YVCzq7esVh0N5t1pfftRF3t+qlL8v6STSodY Trrw1091cKn4bXba3kauOwAIhM/tCA87tadOn1ib9IGLBrkbG8E04+kzkoHtdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975051; a=rsa-sha256; cv=none; b=eChHSkOdSA5/MgMqMjuWoq0tkpIwk4cyvWkXFH0PxySPqHPlNXDT29C+64aksWX/6VUxmL wu2KfRdWer4O3MY6Cxv5SnZ8L6c438dugY+VBD+k/cBuOSA8+ipESEpVvKTso2tK+XLuO/ XzCTSxqbEl35Z9y9jZ/4MaEl0v1NNP8AicCtsDogBcNAzbvYg8u7mT9teNDLol7oxU/tdB rD1F6TfDPwKpMoo4kRDGcWWgTDz9XoN0nNUJ4VyZUk6wHNt7iIHNQBT8O6UNk0pJqJietd tHFF0zBqWztZw0Q4v7Uj/wWF7iCl/V1SFRH6hQXKbMThSQvgt3ZTch3bm0O15A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G0q1WCzzLWq; Mon, 1 May 2023 21:04:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4BrU051715; Mon, 1 May 2023 21:04:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4Br9051714; Mon, 1 May 2023 21:04:11 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:11 GMT Message-Id: <202305012104.341L4Br9051714@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: 91ac713b646d - main - stand/boot1.efi: Allow modules to add env variables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 91ac713b646de667ac149be7dfe06adba4ce55cc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=91ac713b646de667ac149be7dfe06adba4ce55cc commit 91ac713b646de667ac149be7dfe06adba4ce55cc Author: Warner Losh AuthorDate: 2023-05-01 15:26:31 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:52 +0000 stand/boot1.efi: Allow modules to add env variables Sometimes filesystem modules need to pass details of the state of the filesystem to later stages of a boot. Provide a generic method to do so. We'll add them after any env variables set in our config files. Sponsored by: Netflix Reviewed by: tsoome, kevans Differential Revision: https://reviews.freebsd.org/D39407 --- stand/efi/boot1/boot1.c | 20 ++++++++++++++++++++ stand/efi/boot1/boot_module.h | 3 +++ 2 files changed, 23 insertions(+) diff --git a/stand/efi/boot1/boot1.c b/stand/efi/boot1/boot1.c index 088821ecd1f8..2f9801c8ea92 100644 --- a/stand/efi/boot1/boot1.c +++ b/stand/efi/boot1/boot1.c @@ -96,6 +96,26 @@ try_boot(const boot_module_t *mod, dev_info_t *dev, void *loaderbuf, size_t load buf = NULL; } + /* + * See if there's any env variables the module wants to set. If so, + * append it to any config present. + */ + if (mod->extra_env != NULL) { + const char *env = mod->extra_env(); + if (env != NULL) { + size_t newlen = cmdsize + strlen(env) + 1; + + cmd = realloc(cmd, newlen); + if (cmd == NULL) + goto errout; + if (cmdsize > 0) + strlcat(cmd, " ", newlen); + strlcat(cmd, env, newlen); + cmdsize = strlen(cmd); + free(__DECONST(char *, env)); + } + } + if ((status = BS->LoadImage(TRUE, IH, efi_devpath_last_node(dev->devpath), loaderbuf, loadersize, &loaderhandle)) != EFI_SUCCESS) { printf("Failed to load image provided by %s, size: %zu, (%lu)\n", diff --git a/stand/efi/boot1/boot_module.h b/stand/efi/boot1/boot_module.h index 99046fb53577..4ecfa4c72a83 100644 --- a/stand/efi/boot1/boot_module.h +++ b/stand/efi/boot1/boot_module.h @@ -94,6 +94,9 @@ typedef struct boot_module_t /* valid devices as found by probe. */ dev_info_t *(*devices)(void); + + /* return any environment variables to pass to next stage */ + const char *(*extra_env)(void); } boot_module_t; extern const boot_module_t *boot_modules[]; From nobody Mon May 1 21:04:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G0r6g9Tz491Xn; Mon, 1 May 2023 21:04: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 4Q9G0r3h96z3HqH; Mon, 1 May 2023 21:04:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r9fofuUvWy42TVqtSfNQcJKL+g81fCnTkBliklDSAhQ=; b=fYfKRryiWrAtNwLN6QvhWfhs6AK7NCjqYkKEQz6u1alFpUdSlyLMk7FEkHbh8b720G1YjC IQB0gzO2ptrQ2CkUnC6HI1v4YMculDJd2oHF5RH4SOG7c+5EYEuQwYDV4Aa7pquL/eqm+A yAzK7NOsvbu2yIe9ESRdhBA9NVYxrWqLQV+Rv0xNkGGLZJzToOEMbXo17RVqqXKmmP8uVu GNVsBN6S7Jz424lD0GZdVSCbXV5GVcfJy6OfcwmkPwvDG1sbl3K7wb4shc5famxS6eIUdv mJKzXmHSMfADEy78aq8mIObvcbEPgO4ICsLt3hgzwXUTU5f9hcJqkWVs/xZ1dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r9fofuUvWy42TVqtSfNQcJKL+g81fCnTkBliklDSAhQ=; b=oYc8m/yKS//zvd7KD/mw4PTtTLiMcR6CxWw85Z4Vd86uFhoaszQAiQwZguWQ/+x2zjx0QT WZSsWialDXU5YId3r0dk/Jl6m5kGGbYuv0aGwuB21DJOdDRtsUoMUZQqXHY8u7G3TfIHDW 2ijhCoVkKJ2yFrlCKzo7iw9thd4Kt8fy4ZzS7gHcYX6y+YLDfhn3v+RyR6OQNwkbATEmmR 8VbxE3KkqK5G4QwkfhEQNld07YbH2WUwPyx/NxqQWuzt7cDfe+8cbDhfp6wXYovhZ5yvq/ Yd+aMrYKNWbTweYV0Vt7tDTpL5b9UzKzHOEv7NL8icSsoQjWZiGv0uNTuAyQhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975052; a=rsa-sha256; cv=none; b=gMo9u+OCXrKaxxWyfsf1Je5KabugwvRjwDXZaVmV4WH7Y11Ua52aDpr6BhyxXAh06qx+cO f7pDqxkxthylRmyLsdoXVy23jxfScuMjcOITFanMC9+aOwdBxaxrQs532vL0rjLwT3CGF4 PerCo2JxgqQL5/8yuhaeNK3MJLcM3Cq14JmgUXhAO/26Ic01uGcRrVp1hhhOnrDxmioQAw nPmLiBEbFVxVOiFu+fY8QqatkiM/efxpNFOhHJ1RVtrOnZuoUSp2+gnxsqKVr5f6iInqfo kTTmjI4fmkEJRfj4fSO1LPiErfk0DuaY/Wzr3slx3SSlnMlHw2uZMGhylrhi8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G0r2lghzL2g; Mon, 1 May 2023 21:04:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4Cp2051739; Mon, 1 May 2023 21:04:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4ClE051738; Mon, 1 May 2023 21:04:12 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:12 GMT Message-Id: <202305012104.341L4ClE051738@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: 439a9766adba - main - stand/zfs: Move spa_find_by_dev from zfsimpl.c to zfs.c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 439a9766adbabcdfcce9fb0396b43c9e1482155a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=439a9766adbabcdfcce9fb0396b43c9e1482155a commit 439a9766adbabcdfcce9fb0396b43c9e1482155a Author: Warner Losh AuthorDate: 2023-05-01 15:26:44 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:52 +0000 stand/zfs: Move spa_find_by_dev from zfsimpl.c to zfs.c zfsimpl.c doesn't know about devdesc at all, but zfs.c does. Move it to zfs.c, which is the only user. Keep it static for now, but it could be exposed later if something else were to need it. Sponsored by: Netflix Reviewed by: tsoome, kevans Differential Revision: https://reviews.freebsd.org/D39408 --- stand/libsa/zfs/zfs.c | 13 +++++++++++++ stand/libsa/zfs/zfsimpl.c | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/stand/libsa/zfs/zfs.c b/stand/libsa/zfs/zfs.c index 3d5a392dd03f..4a4d3cf26843 100644 --- a/stand/libsa/zfs/zfs.c +++ b/stand/libsa/zfs/zfs.c @@ -373,6 +373,19 @@ zfs_readdir(struct open_file *f, struct dirent *d) } } +static spa_t * +spa_find_by_dev(struct zfs_devdesc *dev) +{ + + if (dev->dd.d_dev->dv_type != DEVT_ZFS) + return (NULL); + + if (dev->pool_guid == 0) + return (STAILQ_FIRST(&zfs_pools)); + + return (spa_find_by_guid(dev->pool_guid)); +} + /* * if path is NULL, create mount structure, but do not add it to list. */ diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c index 4a285470642e..29e8bb82b6e2 100644 --- a/stand/libsa/zfs/zfsimpl.c +++ b/stand/libsa/zfs/zfsimpl.c @@ -1367,19 +1367,6 @@ spa_find_by_name(const char *name) return (NULL); } -static spa_t * -spa_find_by_dev(struct zfs_devdesc *dev) -{ - - if (dev->dd.d_dev->dv_type != DEVT_ZFS) - return (NULL); - - if (dev->pool_guid == 0) - return (STAILQ_FIRST(&zfs_pools)); - - return (spa_find_by_guid(dev->pool_guid)); -} - static spa_t * spa_create(uint64_t guid, const char *name) { From nobody Mon May 1 21:04:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G0s598zz491Xr; Mon, 1 May 2023 21:04: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 4Q9G0s4W24z3Hsr; Mon, 1 May 2023 21:04:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HI34fVl5UNMSx7e2ObdFctGSBKOG6yX/p/yjS3B7ox0=; b=HcgYsqMKq2FCWBXE7RndIB0vA+yhJS2140EDxa+6SN7hGU+BOmpkUA/lj0CAX3/RQ8g/vk NOrz5urQucYCsRKJJmVPGY4sP4aIl5MrrLtNHgAGb+6eiZwVrJ7ZdujEgdEI/kSCx/ycUS yWKSeiJMhkoG4zGX6+cIj7nK+S41HHspHA+4w6tdGkyv00vWpGTLLp/GIcObNuswg2A3dh WXAwnEDbcyKwV7t39g6sJb5kyrE94TiBfJWPgqBe/NnUMWcjjp+ePUJ3lXIeapU5c00Vn3 VCiYlDAXV93Xc8VgIEF8D+xneGEfS7w/IvGCvWceFZzx1tXY3/zF1VZDz+U6zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HI34fVl5UNMSx7e2ObdFctGSBKOG6yX/p/yjS3B7ox0=; b=lMX26aNpfkOZx2ampH9O/90fn1CdIJQfvHF4Vcwh6TIjnHm/z6zKC9OqePyz2qzBJSeqPq FV79GlzpAaqIkUW4dGfCFQakmAFqYmWzS+nELP1M/ExXk5fj5CY8O+y+Q6UkeUkqk2X2mp N7WQ9BnZMQgLPSva9KwhKFUdSx6L/4TUHYSfzQ5cRWFkgY1E7Mv+PsMqsrVIGfDDzaK++l qPSHV/+9jmgAgcq56iGQMWAu8St80lxaYQkXs2kNbUnmNGA3KHNFHX2U+Z9elsGA52NBQb wjepoN2R1qplIgn/+xEBzKGZRa0+m7/8/ARoPqZzji9FlPFm6HLnBU8kFXTNSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975053; a=rsa-sha256; cv=none; b=g4aiKTVcUu0EDqB5FBauadAd/FUksHHhgucVoIecQEURGbK1pBEyBJFlF51N1wZpWSb9tD rw1kFmHX2j+tVa0xf8tbrNuVROoFtWEe/1y7Ecka4GFixSdyrj49yw3R1TN6BdfGAmcRoz j3ZCFT0n+x3JL9eMM6pQuJClxMMmDcmS0G5XDC4bt8ejHUkmAr1zsHFZbb0y0Eg9i7sw0I yVcvT2KFU6i4ePOCA9BHHwvt57tl3r3IvCBKNtp47TZ8Gnm3J6E5BFZLWc8x571xABAX61 v5NXLalwhbLvsdvrGsQw0Figr6isnH1ROToHJWfKkCcj5sJE+Nf/w7vx5IRUcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G0s3Jf9zKkx; Mon, 1 May 2023 21:04:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4DvC051760; Mon, 1 May 2023 21:04:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4Dlu051759; Mon, 1 May 2023 21:04:13 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:13 GMT Message-Id: <202305012104.341L4Dlu051759@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: 6479bd1b7d34 - main - stand/zfs: Refactor zfs_get_bootenv List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6479bd1b7d347e42012fab64b595b0cf091e13f4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6479bd1b7d347e42012fab64b595b0cf091e13f4 commit 6479bd1b7d347e42012fab64b595b0cf091e13f4 Author: Warner Losh AuthorDate: 2023-05-01 15:26:51 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:53 +0000 stand/zfs: Refactor zfs_get_bootenv Create a new interface to zfs_get_bootenv called zfs_get_bootenv_spa which takes a spa instead of a void * (effectively a devdesc *). Use that in zfs_get_bootenv. Sponsored by: Netflix Reviewed by: tsoome, kevans Differential Revision: https://reviews.freebsd.org/D39409 --- stand/libsa/zfs/zfs.c | 27 ++------------------------- stand/libsa/zfs/zfsimpl.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/stand/libsa/zfs/zfs.c b/stand/libsa/zfs/zfs.c index 4a4d3cf26843..17f213fe833c 100644 --- a/stand/libsa/zfs/zfs.c +++ b/stand/libsa/zfs/zfs.c @@ -798,35 +798,12 @@ zfs_probe_partition(void *arg, const char *partname, int zfs_get_bootenv(void *vdev, nvlist_t **benvp) { - struct zfs_devdesc *dev = (struct zfs_devdesc *)vdev; - nvlist_t *benv = NULL; - vdev_t *vd; spa_t *spa; - if (dev->dd.d_dev->dv_type != DEVT_ZFS) - return (ENOTSUP); - - if ((spa = spa_find_by_dev(dev)) == NULL) + if ((spa = spa_find_by_dev((struct zfs_devdesc *)vdev)) == NULL) return (ENXIO); - if (spa->spa_bootenv == NULL) { - STAILQ_FOREACH(vd, &spa->spa_root_vdev->v_children, - v_childlink) { - benv = vdev_read_bootenv(vd); - - if (benv != NULL) - break; - } - spa->spa_bootenv = benv; - } else { - benv = spa->spa_bootenv; - } - - if (benv == NULL) - return (ENOENT); - - *benvp = benv; - return (0); + return (zfs_get_bootenv_spa(spa, benvp)); } /* diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c index 29e8bb82b6e2..40a1448a0c9f 100644 --- a/stand/libsa/zfs/zfsimpl.c +++ b/stand/libsa/zfs/zfsimpl.c @@ -3853,3 +3853,33 @@ done: free(entry); return (rc); } + +/* + * Return either a cached copy of the bootenv, or read each of the vdev children + * looking for the bootenv. Cache what's found and return the results. Returns 0 + * when benvp is filled in, and some errno when not. + */ +static int +zfs_get_bootenv_spa(spa_t *spa, nvlist_t **benvp) +{ + vdev_t *vd; + nvlist_t *benv = NULL; + + if (spa->spa_bootenv == NULL) { + STAILQ_FOREACH(vd, &spa->spa_root_vdev->v_children, + v_childlink) { + benv = vdev_read_bootenv(vd); + + if (benv != NULL) + break; + } + spa->spa_bootenv = benv; + } + benv = spa->spa_bootenv; + + if (benv == NULL) + return (ENOENT); + + *benvp = benv; + return (0); +} From nobody Mon May 1 21:04:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G0t6d2Gz491J9; Mon, 1 May 2023 21:04: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 4Q9G0t686dz3HrS; Mon, 1 May 2023 21:04:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AELX0kqbNaAkvNEtris2lMCW8x7iyCp1ByGF1B656MY=; b=mRZP04XbRulFcjGG2RG7Y+7gquPIjWKQgqotxlh99muoAJaeeNpwSdil1e3FIbhczwb8Q4 zetth19QWOrQOV/MWyjCoiVJPgDRvR/T07TQqdra95WdBi6MjggSLq3fHzqRV1F9SuW6in kwiTjMCdCk1xwnGIambERaE11dOkADZlrK5xnL0Tweaviq0fNHA/lDpIMWQGFwbpmdAFrQ BY/tafcm+8x1xMTtXP6jXBLGBM9N79zl/D1KhtwPIqZoiPSeHqqQgRdfhWpRDdvZHhk6/B VwTJPsfN+PA+xYXhSB4pMG8GRpXej+UjCO5/RdlhMkH27nT9ljmv4AMtnfX5AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AELX0kqbNaAkvNEtris2lMCW8x7iyCp1ByGF1B656MY=; b=I4BuZ6iKmAiBKwWFBBRjRu/lHdsnTHndadruTd3stbI/Ewgl4v/3hogAQCqrYBLInFj36x Xa4Kk8Hy56YejNQzkacTJvzxH+WHyzJfmVQyMvTxuN2RHslDCvvU6peTRDmyJNnLVfLpy4 kb8DXu7e/NJo7RdkVf884xMeDdLvl82QMQeDVAHIld0kRjdXWZRaYFIqZz4joTLJWj+iOg 5bI7Dn7q0fcLEL38RRKAEhiHNuAJSHWudvHygbSR/9IUwr7Trz012gprs9r1503jMzWyGx 3yqjePKCs5pnPn0EJf48iLyZR4ltj4AAHlon50r+FBX57RaKEA1azStg159xOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975054; a=rsa-sha256; cv=none; b=TVOfRCoY/zSukK84a3P2ctRwwVlXUCuJenBvRvPqHSkUc3IqkUeI1X9igHjTnWmjZvy7gL OAQEOjuwYnf+S9Etp06cEvpvNLRBZ2BRy0TP7umRE1h4tfaoB+WsiT/zvakW/puigT+Dml 2GZkNEBazmn9eyfYPaVR/2m7zi+72yK7IvUnrfX/suZV2hlfAC25k/xDflNo082CYU4vZa 3u3MF3//5VPt+vc5NlXtFXtmdG7jcwHMkQygltmmKqVgAv0B1e2GVoB8rI1wmKvXsHR8sZ 1aU8P6ez4EumzNN0T0BIQjoE3CweOyxgGbHjGKq43Mx344BCZsGOrQ2GlB0bIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G0t53v4zLZk; Mon, 1 May 2023 21:04:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4EWa051780; Mon, 1 May 2023 21:04:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4EB0051779; Mon, 1 May 2023 21:04:14 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:14 GMT Message-Id: <202305012104.341L4EB0051779@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: 4dcae288fe63 - main - stand/zfs: Refactor zfs_set_bootenv List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4dcae288fe63667bdf930258b94e0e51a2d05787 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4dcae288fe63667bdf930258b94e0e51a2d05787 commit 4dcae288fe63667bdf930258b94e0e51a2d05787 Author: Warner Losh AuthorDate: 2023-05-01 15:26:59 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:53 +0000 stand/zfs: Refactor zfs_set_bootenv Refactor zfs_set_bootenv to split out the lookup of spa from the rest. zfs_set_bootenv_spa flushes the benv to the vdevs and updates the cached benv. Sponsored by: Netflix Reviewed by: tsoome, kevans Differential Revision: https://reviews.freebsd.org/D39410 --- stand/libsa/zfs/zfs.c | 14 ++------------ stand/libsa/zfs/zfsimpl.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/stand/libsa/zfs/zfs.c b/stand/libsa/zfs/zfs.c index 17f213fe833c..7cdfa1a06df9 100644 --- a/stand/libsa/zfs/zfs.c +++ b/stand/libsa/zfs/zfs.c @@ -812,22 +812,12 @@ zfs_get_bootenv(void *vdev, nvlist_t **benvp) int zfs_set_bootenv(void *vdev, nvlist_t *benv) { - struct zfs_devdesc *dev = (struct zfs_devdesc *)vdev; spa_t *spa; - vdev_t *vd; - if (dev->dd.d_dev->dv_type != DEVT_ZFS) - return (ENOTSUP); - - if ((spa = spa_find_by_dev(dev)) == NULL) + if ((spa = spa_find_by_dev((struct zfs_devdesc *)vdev)) == NULL) return (ENXIO); - STAILQ_FOREACH(vd, &spa->spa_root_vdev->v_children, v_childlink) { - vdev_write_bootenv(vd, benv); - } - - spa->spa_bootenv = benv; - return (0); + return (zfs_set_bootenv_spa(spa, benv)); } /* diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c index 40a1448a0c9f..3b093dea3c41 100644 --- a/stand/libsa/zfs/zfsimpl.c +++ b/stand/libsa/zfs/zfsimpl.c @@ -3883,3 +3883,19 @@ zfs_get_bootenv_spa(spa_t *spa, nvlist_t **benvp) *benvp = benv; return (0); } + +/* + * Store nvlist to pool label bootenv area. Also updates cached pointer in spa. + */ +static int +zfs_set_bootenv_spa(spa_t *spa, nvlist_t *benv) +{ + vdev_t *vd; + + STAILQ_FOREACH(vd, &spa->spa_root_vdev->v_children, v_childlink) { + vdev_write_bootenv(vd, benv); + } + + spa->spa_bootenv = benv; + return (0); +} From nobody Mon May 1 21:04:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G0v7012z491DV; Mon, 1 May 2023 21:04: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 4Q9G0v64b1z3Hts; Mon, 1 May 2023 21:04:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GZGVgCXaYZ8dHgzloyRJVIhQawhhsB6l/cMwA/nvVCw=; b=kOdhMLGbdw3RkSl0RwOrgBjnqogMJzbFRDWZbns81YIjmkzqyPtL2xTzgbgQGnuS4OAcci ysLKBmFCcSM3kzyQ45wjtY8EO2F9doL6UjIKjDkrTIsVEo3b/jlGEi9vd3IW+J5E9Hv9me r+xxGQMIuHBza6l9fJqYompcF4QtsR2kRUHq0m3xtMGQB47xQqHMSobmjPVM/z5PscBwAp xwJ0yltRqWIJX1lbepcG1CFtkKZc/VCO/DlHawYMD9aueM4PqnwQNzrJB+iw2h1gvfPFk3 iLIfyO3NR250fqcS09o9d+JVb4G58rqcVBQW/+HmhTuaIb+C47aRdkS2y2BT+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GZGVgCXaYZ8dHgzloyRJVIhQawhhsB6l/cMwA/nvVCw=; b=WIqFIhbuWUPzvrwaDm3nW9rWa3/UFrzgu1LWdnlm+5Tt9vKtMgwm04hhiOssmU3Nra9r6L ZndYMBpDs5qb/I3FM3l+z3oZhsmRnHjFh5AYg+kL7jet47yez2Bwg0UzNwNKVZeFa3OPV9 whamkG/lV0IGhp5utkUU+oXhQT0Yno3hYVpjsjf/IcU+vWwMySf0/G3HXsbjLw+Ang53jh 18G/2r8WTnkj0m8DVKAeBDVLWanuwh/Gz3/oFztI6ghdq8OjI8TVk8twfLsJ/20rJNpRqM B8pfBqj/o5f3Ohp/w+UQoTSiRBUtopNLMTXSnm/d9/vGWrkZG3Ip+2PUdyXF9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975055; a=rsa-sha256; cv=none; b=ZWV1wTlygWDI059Gk+2/1ykAtunzNhGVsxBXfW+OT4yNRFeOREQDWvgHgQuv7uZGxAP5Bt VUG04njasoVjbEdpPqMQ3f90O6/NdpntCmeCdzPWuRYho9dtgX/bt97et5OCON3S2Bh/l3 Md9+32OKFvhQfOOtIIQwMWqpVBpLQFIKBMJQUl2fY2icZXU+h/vh1gj0g4XOkYUXzNl19I x2LCF7ElX8qnupPdzRWHwzOrhZSsru4lSPgvA4ifyOqeemMpUaADRCSDXceIcrisnLt/Uf CPdMMUXiLnGIcoF5qrfozZYOR+bGDf2ulYF4KO87mBUQoiuidzVWCXeUJlNJMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G0v550GzLWv; Mon, 1 May 2023 21:04:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4FFA051806; Mon, 1 May 2023 21:04:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4FMP051805; Mon, 1 May 2023 21:04:15 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:15 GMT Message-Id: <202305012104.341L4FMP051805@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: b765cfa380a4 - main - stand/zfs: Refactor zfs_get_bootonce List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b765cfa380a47de2b77cbf8a6249e226b0de2275 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b765cfa380a47de2b77cbf8a6249e226b0de2275 commit b765cfa380a47de2b77cbf8a6249e226b0de2275 Author: Warner Losh AuthorDate: 2023-05-01 15:27:06 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:53 +0000 stand/zfs: Refactor zfs_get_bootonce Lookup the spa and pass it into zfs_get_bootonce_spa to process the boot once protocol. Sponsored by: Netflix Reviewed by: tsoome, kevans Differential Revision: https://reviews.freebsd.org/D39411 --- stand/libsa/zfs/zfs.c | 23 ++++------------------- stand/libsa/zfs/zfsimpl.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 19 deletions(-) diff --git a/stand/libsa/zfs/zfs.c b/stand/libsa/zfs/zfs.c index 7cdfa1a06df9..8ddd6de8623d 100644 --- a/stand/libsa/zfs/zfs.c +++ b/stand/libsa/zfs/zfs.c @@ -827,27 +827,12 @@ zfs_set_bootenv(void *vdev, nvlist_t *benv) int zfs_get_bootonce(void *vdev, const char *key, char *buf, size_t size) { - nvlist_t *benv; - char *result = NULL; - int result_size, rv; - - if ((rv = zfs_get_bootenv(vdev, &benv)) != 0) - return (rv); + spa_t *spa; - if ((rv = nvlist_find(benv, key, DATA_TYPE_STRING, NULL, - &result, &result_size)) == 0) { - if (result_size == 0) { - /* ignore empty string */ - rv = ENOENT; - } else { - size = MIN((size_t)result_size + 1, size); - strlcpy(buf, result, size); - } - (void) nvlist_remove(benv, key, DATA_TYPE_STRING); - (void) zfs_set_bootenv(vdev, benv); - } + if ((spa = spa_find_by_dev((struct zfs_devdesc *)vdev)) == NULL) + return (ENXIO); - return (rv); + return (zfs_get_bootonce_spa(spa, key, buf, size)); } /* diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c index 3b093dea3c41..996245b92c45 100644 --- a/stand/libsa/zfs/zfsimpl.c +++ b/stand/libsa/zfs/zfsimpl.c @@ -3899,3 +3899,36 @@ zfs_set_bootenv_spa(spa_t *spa, nvlist_t *benv) spa->spa_bootenv = benv; return (0); } + +/* + * Get bootonce value by key. The bootonce pair is removed from the + * bootenv nvlist and the remaining nvlist is committed back to disk. This process + * the bootonce flag since we've reached the point in the boot that we've 'used' + * the BE. For chained boot scenarios, we may reach this point multiple times (but + * only remove it and return 0 the first time). + */ +static int +zfs_get_bootonce_spa(spa_t *spa, const char *key, char *buf, size_t size) +{ + nvlist_t *benv; + char *result = NULL; + int result_size, rv; + + if ((rv = zfs_get_bootenv_spa(spa, &benv)) != 0) + return (rv); + + if ((rv = nvlist_find(benv, key, DATA_TYPE_STRING, NULL, + &result, &result_size)) == 0) { + if (result_size == 0) { + /* ignore empty string */ + rv = ENOENT; + } else if (buf != NULL) { + size = MIN((size_t)result_size + 1, size); + strlcpy(buf, result, size); + } + (void)nvlist_remove(benv, key, DATA_TYPE_STRING); + (void)zfs_set_bootenv_spa(spa, benv); + } + + return (rv); +} From nobody Mon May 1 21:04:16 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G0x10m2z491DY; Mon, 1 May 2023 21:04: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 4Q9G0x0CpVz3J19; Mon, 1 May 2023 21:04:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hEFvj8dhCHBlT0WZp0so12oDUQ1eebyCso8Rg1bYrsU=; b=HuQi4ZF95srmis6QnW72FfDEXc5iUJH6F26c1pQo57LTHP29uwGoBzIoYzchkDn4zytbOx 7CBVBMqaiA1B//dBWS8B1YUjduCrgT60pIUG9gqFU0TlVNq5PVYzOil77WaH3QuHPtDztS CYw76A27/sMo0Buvpl0BN7M+tfyUBKHAeVXwM1+1Cr2LKndXNbvZBfRR2Rz+T9jPd4i0/b A8rM3mIjD3ssk8daEHG2E0vKmfgsN/rrFKTowt++pnqgWlhebkaetRRf+TmEe/O2BMvL16 K6yPrpQXqjE+OvIpGJtYa26LL/P523BSa7dVBKCd0Nc1cp6W8jBx2gNuNouhUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hEFvj8dhCHBlT0WZp0so12oDUQ1eebyCso8Rg1bYrsU=; b=hicmxU3Wte0R/XNyfiUjLJ5QRzfnW2RoclRGx/kUdzxxKSZLbPHINxSWcOpvE3d/T1aiwn Q53v9+V/W7EXKEfFadrnoihRLm6JpzmcI5heEU+/Y5wNY8yypG7Yl3TTQqJMoomydVogaf g6ozBk3YsxOhkGGvcg04zxW+0niJ6zq2fJe+iHw0tLVOJF50xOC0v+xGJmMvgLq+HzgOEZ I1SneaNTR2lyjOxfe3cggltWsM6hT8BYmMuS5+dDVAEFQBqRCn6WnZomP29B9Ml9adBlR7 QrpZKFIfC+uoWBDfSnLYtJGydjiAdiB0sZhevwhnyQzyhaM/9MSFAqx+EOpxgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975057; a=rsa-sha256; cv=none; b=jNrmrEQGimbXpvjgpG0oZx+57EX33FabDZS3FXpvkuVFcJsbgJ09oUZ/1zZStAA1KTaCSY PvRNTgD6a59BzaN/1bvWD/k4UrPKBME/PodqATnIcCpuwbEJBN19+LewPHykbTwYeo0Q5c B7eWIISjAsQeE843/xD5eSZAn/NVbEQQh3kQ9ZtrjUyK16HOLUwv6P14pAauEJg/5bC46t 30eQMg22qD0/b9dfOJGQgGfFNzqPS4Szp9BH5VvDOrmXHOX3gRhxM68JZcb5RKWvaPyb3F Sd/Tgso+6NiOupTTs53V/92qUuYdR8x+2s5vaCXcYlZZ7YT1V8BBa5SULi3TGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G0w6DTVzKky; Mon, 1 May 2023 21:04:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4GZG051830; Mon, 1 May 2023 21:04:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4GLq051829; Mon, 1 May 2023 21:04:16 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:16 GMT Message-Id: <202305012104.341L4GLq051829@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: 43f7eeff0d45 - main - stand/boot1.efi: Implement bootonce for ZFS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 43f7eeff0d45769e1deaf0a6879bc807fdafaf4c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=43f7eeff0d45769e1deaf0a6879bc807fdafaf4c commit 43f7eeff0d45769e1deaf0a6879bc807fdafaf4c Author: Warner Losh AuthorDate: 2023-05-01 15:27:14 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:53 +0000 stand/boot1.efi: Implement bootonce for ZFS Implement ZFS bootonce protocol. We pass zfs-bootonce=t to the next boot stage as a command line argument. Unlike zfsboot -> loader handoff in the BIOS case, we don't use the OS_BOOTONCE_USED. This would require modifications to loader.efi which would only server to make it more complicated. Instead, use the command line parsing interface for the boot1.efi -> loader.efi to pass in the zfs-bootonce kenv that will be needed by rc.d/zfsbe to activate the BE if boot progresses that far. Sponsored by: Netflix Reviewed by: tsoome, kevans Differential Revision: https://reviews.freebsd.org/D39412 --- stand/efi/boot1/zfs_module.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/stand/efi/boot1/zfs_module.c b/stand/efi/boot1/zfs_module.c index 7aaca72e30f1..234b50084839 100644 --- a/stand/efi/boot1/zfs_module.c +++ b/stand/efi/boot1/zfs_module.c @@ -40,6 +40,8 @@ static dev_info_t *devices; +static char zfs_bootonce[VDEV_PAD_SIZE]; + uint64_t ldi_get_size(void *priv) { @@ -165,6 +167,16 @@ load(const char *filepath, dev_info_t *devinfo, void **bufp, size_t *bufsize) return (EFI_NOT_FOUND); } + /* + * OK. We've found a filesystem. Any attempt to use it should clear the + * 'once' flag. Prior to now, we'd not be able to clear it anyway. We + * don't care if we can't find the files to boot, or if there's a + * problem with it: we've tried to use it once we're able to mount the + * ZFS dataset. + */ + *zfs_bootonce = '\0'; + zfs_get_bootonce_spa(spa, OS_BOOTONCE, zfs_bootonce, sizeof(zfs_bootonce)); + if ((err = zfs_lookup(&zmount, filepath, &dn)) != 0) { if (err == ENOENT) { DPRINTF("Failed to find '%s' on pool '%s' (%d)\n", @@ -220,6 +232,18 @@ status(void) printf("\n"); } +static const char * +extra_env(void) +{ + char *rv = NULL; /* So we return NULL if asprintf fails */ + + if (*zfs_bootonce == '\0') + return NULL; + asprintf(&rv, "zfs-bootonce=%s", zfs_bootonce); + return (rv); +} + + static void init(void) { @@ -241,5 +265,6 @@ const boot_module_t zfs_module = .probe = probe, .load = load, .status = status, - .devices = _devices + .devices = _devices, + .extra_env = extra_env, }; From nobody Mon May 1 21:04:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G0y33xmz491GV; Mon, 1 May 2023 21:04: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 4Q9G0y101Mz3J1Q; Mon, 1 May 2023 21:04:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VNGWiiYddpYGpr8540z8ps58eBVxEt8jWvnYt/k7SdU=; b=Rsy4CHuYfsyDOypMF5PlgJ333YsMcpM2B0LSyoYVwfpOr3clsAASU/W93BRxqzRE9uYzdj 23QYX3OhUk39m/RKdDWI2S7qoyyDjxNOTo67VaQRNXpmFhHgAcvZAs1sQYrNUZRt84GEEu QYH5rTg2+BdzX9RWQnNm/2u+1PXBUkMS4GAyzta/J4iMJ34DQBYOOd8+gaA0xPxkKYnKuC tvk9LzYB4b+DEFthYRcIfnTKjT2hIooJ62OaVukvyg5uSTfatKWA79sT8Bt8Rk2Iz4y+Hm Li+ZdcIMCJCHVeUmZtrGprbe4Dqtsj0qFzCdKEuuMwIiu0pk1XfWSQ5Pp2c7rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VNGWiiYddpYGpr8540z8ps58eBVxEt8jWvnYt/k7SdU=; b=VaHIrm+TS1oazfkxHjyrTnlRiMxlavkazqvVUxn8ysFPLsXGUDSl1ynVza/oSFtECDS+qs E/Hj/78Rbw8DRnl21St5hwrwk4MoRp5BhZxWbnLOmGEBw0FidKv+OAb7wrjp3CVdf5Ew4q BFhsvV1qpPDeFzz6oyiB6ucmRmNv7TPHsRkikHVpO3i7M6AqoulO3LDn4pYImEI5D7cFop 17nZ6vaBHisW+2D3jkTEKpb2QSSdwt+wazU8eKr5fRE6BJjKBBa9FwbzGVuPzlebQtw04O C7W+8+a5VjHKAf50zpperBQRXfVkfD9MWKkEHFZ5Vvc0anlQ6LcgaQyu85oDsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975058; a=rsa-sha256; cv=none; b=AYiAs+s7SBuLO3A9Ad+FAyz1SoD2bnFNHVWjQSXJRt+fJ38XCSRYx8CFfS6eYRGAcPnMHk x5mY+befWtckbDZpnBrpTVbc0xljcFoGEoLPOguYninbMP4joZ3Vi8SSjiSLsPRq5rUxpH 0lE+6ctenacTDnpd4+Jx9VeugdzLPWXkbhDqu2ws080AHL2OtGwFLXsxx0DyvaDh1QWQBF vDKmmOUrFCI6jv0go29ct6rAjJosVI637S/m4mWfPyCAhMzZHMoXJPOLUgzMXWHXmioXdS 2n2lo1eiCKMenNPhvB3Y18SMFyqGLKSJ5HrZAfv4CKKV1/tiPOYT+ur4HNCWIA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G0y01qvzLXS; Mon, 1 May 2023 21:04:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4HKn051849; Mon, 1 May 2023 21:04:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4HSA051848; Mon, 1 May 2023 21:04:17 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:17 GMT Message-Id: <202305012104.341L4HSA051848@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: 0c4183f02efc - main - rc.d/zfsbe: Simplify List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0c4183f02efccbb09892f3e5c97745884afe189d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0c4183f02efccbb09892f3e5c97745884afe189d commit 0c4183f02efccbb09892f3e5c97745884afe189d Author: Warner Losh AuthorDate: 2023-05-01 15:28:11 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:53 +0000 rc.d/zfsbe: Simplify So $(foo) is a shorter version of "`foo`". Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D39413 --- libexec/rc/rc.d/zfsbe | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.d/zfsbe b/libexec/rc/rc.d/zfsbe index e0a30c5a16b4..c69255363ecf 100755 --- a/libexec/rc/rc.d/zfsbe +++ b/libexec/rc/rc.d/zfsbe @@ -57,7 +57,7 @@ activate_bootonce() _dev=$1 _be=${_dev##*/} - _bootonce="`kenv -q zfs-bootonce`" + _bootonce=$(kenv -q zfs-bootonce) if [ "$_bootonce" = "zfs:${_dev}:" ] ; then bectl activate $_be fi From nobody Mon May 1 21:04:19 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G0z3V9Yz491VM; Mon, 1 May 2023 21:04: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 4Q9G0z2thKz3J26; Mon, 1 May 2023 21:04:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2B8NEASbiy7uMb7Pd/KgrKb2sCo+DIt7mWyYypvEbM4=; b=QyqtdC6RlMFfNY2CtHP/rpTHOWiL3/lvAbvAyqaFlcYw5HLx2MNS1ONe6Bgm7odl7IwIg1 eOLOHmgeio2Nu2H4IaoAno+O/HqXVDRi8pk3/G2Hv/LBv4GH4Ll4xFciVL3LGysSv6PdJ0 m5kf5GWWxQXKTJOJYv2JZfrNarvP2sf0TqBm5GioddZRoIhfhmib0PzPynh+KLyG6dIxio 2e+deA9cOMZkAGbCm0VIE/9KRDpHSfNjyQqspzAp3xQF3nbfXYkUOCR5P7TgoBe5w1vle7 bRH8k45csIKA8wLduac0OFY/DivwhXIAiZoeJTVulLPWp8QPZ39CM6A+HsOgig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975059; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2B8NEASbiy7uMb7Pd/KgrKb2sCo+DIt7mWyYypvEbM4=; b=i/Dy5S+mb/WlyZCYUIZFcn99PBMCCbdBRSNYYyF94UzvYtk1/z5D2QNUXd99GQUu2uei7C ERkKkHksvNLWI6PoWA4tceackaOuceoiSh6l2kyPpLbwPuBsFh20zesd+n0D+p0TyOjzJ8 WCaGrOR6djA+1zyDfGJ4dF9J8HECLBNvD5cwvWgqO1EtndkrBKDHyYMKVOaXoLscemBhOO KX1qDhzXHtgnDYmNpuXT76+xsZdtVImeLUGIjHH3cTdsbq5ro0gZnXCwes1/8CxPAATEby yIFyBBvwk9DYlz45a9xNFOzho/2UJoFKnXbX4wMWwtBv7n9FEDu6sI+WDhL8Qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975059; a=rsa-sha256; cv=none; b=yZRML6uyMidIMktnYcPV5/YbD/m9blNFzxoZrnv61xTN/w/aElVbR6phB5BLtx9uTYjMHM UcmLeFG7Yi+HNsjYRQ6YlBF8my6r0wpEQxn/RTMTjsa6L6Eyqo4wE2y+ZKYT3tLcjVp4qx FGpWSpegibD3ANpETyF23QvJGVL0EVZ1zMq+xa8W3rtiTNHZqRTf2ldlZc4UsIofmQbxF4 WVy4SNym4BLceZ1oFVU5V9Tdtlrg6/IfGWh7sRNZs61f3+WjotGx2lslmWPp2eb1zjSi1p zNYfMa5PPxCcJvbyIVEq+3EZmwHlxtw/EgY1cNlU3PEU7qN9TVDoAywu7vuaPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G0z1mygzL9k; Mon, 1 May 2023 21:04:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4JY7051873; Mon, 1 May 2023 21:04:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4JTS051872; Mon, 1 May 2023 21:04:19 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:19 GMT Message-Id: <202305012104.341L4JTS051872@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: 5ce98ee5f42d - main - stand/userboot: Simplify code List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5ce98ee5f42de10d29f3a99719652c272d13c2e7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5ce98ee5f42de10d29f3a99719652c272d13c2e7 commit 5ce98ee5f42de10d29f3a99719652c272d13c2e7 Author: Warner Losh AuthorDate: 2023-05-01 15:28:17 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:53 +0000 stand/userboot: Simplify code We have way more than 8k of stack for the current value of the zfs bootonce attribute. Allocate buf on the stack rather than the complicated malloc / free dance. Sponsored by: Netflix Reviewed by: tsoome, kevans, jhb Differential Revision: https://reviews.freebsd.org/D39414 --- stand/userboot/userboot/main.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/stand/userboot/userboot/main.c b/stand/userboot/userboot/main.c index b134d86de9bd..3dde6f6b4109 100644 --- a/stand/userboot/userboot/main.c +++ b/stand/userboot/userboot/main.c @@ -235,7 +235,6 @@ extract_currdev(void) struct devdesc *dd; #if defined(USERBOOT_ZFS_SUPPORT) struct zfs_devdesc zdev; - char *buf = NULL; if (userboot_zfs_found) { @@ -272,17 +271,14 @@ extract_currdev(void) #if defined(USERBOOT_ZFS_SUPPORT) if (userboot_zfs_found) { - buf = malloc(VDEV_PAD_SIZE); - if (buf != NULL) { - if (zfs_get_bootonce(&zdev, OS_BOOTONCE, buf, - VDEV_PAD_SIZE) == 0) { - printf("zfs bootonce: %s\n", buf); - set_currdev(buf); - setenv("zfs-bootonce", buf, 1); - } - free(buf); - (void) zfs_attach_nvstore(&zdev); + char buf[VDEV_PAD_SIZE]; + + if (zfs_get_bootonce(&zdev, OS_BOOTONCE, buf, sizeof(buf)) == 0) { + printf("zfs bootonce: %s\n", buf); + set_currdev(buf); + setenv("zfs-bootonce", buf, 1); } + (void)zfs_attach_nvstore(&zdev); } #endif } From nobody Mon May 1 21:04:20 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G102w7Qz491Zj; Mon, 1 May 2023 21:04: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 4Q9G102Ldsz3JKy; Mon, 1 May 2023 21:04:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mK/fq7aynaWLRB/xWGtQcw73PWb1XKKw5flCAtzip6c=; b=hi8wiZ0kKGOfaeHeVGM4CVduwK/TBr98uLrbf0QbLnkrrw8nNp7TwFzhDmEolLPY4fACK8 TXWOsn/UQJ7RVq3gtjMAylIL+GWIMEXBe61lDozuxTxYp0W/Tq2pMalmK8Jt6WymklIdRi +hEo7kEfd3wcceLX1YyJekAvNhgdpetRNaGGf8Kv6uAFUIvPVgXgDGXcLt0GsRnrealGXb 0WOwyji3k1Ev7rTtYiQFunDh92i9o2Xc+cUatKYU6z0OV+jYT9aiCY/UD/DjB5JY4UFFtd vqtRqbSA7POPB3Ck6uOCo0UCuKU61TyIP/3odAnW9q5yheE6RWQd8U36fpXvKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975060; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mK/fq7aynaWLRB/xWGtQcw73PWb1XKKw5flCAtzip6c=; b=RfKLJ7P6pxvEi4RxYUxseWy6fjSq6gUg6xdusHoBfnQVEUYnyxYyeub1/OFOukuNcFSeaN j83xyILI+a9riTkkfeAIFwoUAZePMDNGTRdF8BHdBojnqQMuEl0ct9EN2hg7fr0BbtB+WM iK9+Wm2Ia6LUslYwooJHIZglQfS2wfi69oMJMZlBkv2OBEejNjtHVd4ZpruTiYE2uCIo/r IHKjPovjteyx/N+KXLIZ5RgBceE2PAXPphBPpzl2cqO87G/PxXBec5WWrR7tS8KoYWK5ef X62V70K5zkNjrL/DLUmz783BWSNqycFzl4To0cX+mzwARtvcqXOfvhMgR/0SQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975060; a=rsa-sha256; cv=none; b=E4D+Q2k4fD664uUZSRvtXb9rL+NMHP2+uwFMH4bf3bnkjWtDiWt0DSL6H983b4op85iqWz Zn4+OUJ0vyNIU5llvtfaXsCeTyFYSrk0FBZSpFmgkFeJVmfRMEfWyUb3t8CrY1EK4NyBHe /O5FjCvwCelOOeUZO77wty2t2Hl756Q2++Cbr3IwP6Qi5Z9SWWlgtHS6w11Pk4LV1ElI1b borXh8iQShaYFi8F9yYdfwxFW0yvYmnLCa+44wpgphYshJJq9vVrYG47NKftSquyR2YJbz Zivbp2l2AVYILfMO6Uhd1uvqkIjAVdwgKFmxutUknzF4SjHiIwzd/nyqciLFbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G101PX3zLM6; Mon, 1 May 2023 21:04:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4Kbr051893; Mon, 1 May 2023 21:04:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4KVY051892; Mon, 1 May 2023 21:04:20 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:20 GMT Message-Id: <202305012104.341L4KVY051892@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: d5babd0d2376 - main - stand/efi: Simplify code here List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d5babd0d23769d365a83bebc0a5cd8cbfb55564d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d5babd0d23769d365a83bebc0a5cd8cbfb55564d commit d5babd0d23769d365a83bebc0a5cd8cbfb55564d Author: Warner Losh AuthorDate: 2023-05-01 15:28:25 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:53 +0000 stand/efi: Simplify code here We have plenty of stack in the EFI case, so use it instead of the complicated malloc / free dance. Sponsored by: Netflix Reviewed by: tsoome, kevans Differential Revision: https://reviews.freebsd.org/D39415 --- stand/efi/loader/main.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 9ff5f1dd7674..e5f9b40ae55f 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -252,7 +252,6 @@ probe_zfs_currdev(uint64_t guid) { char *devname; struct zfs_devdesc currdev; - char *buf = NULL; bool bootable; currdev.dd.d_dev = &zfs_dev; @@ -265,18 +264,16 @@ probe_zfs_currdev(uint64_t guid) bootable = sanity_check_currdev(); if (bootable) { - buf = malloc(VDEV_PAD_SIZE); - if (buf != NULL) { - if (zfs_get_bootonce(&currdev, OS_BOOTONCE, buf, - VDEV_PAD_SIZE) == 0) { - printf("zfs bootonce: %s\n", buf); - set_currdev(buf); - setenv("zfs-bootonce", buf, 1); - } - free(buf); - (void) zfs_attach_nvstore(&currdev); + char buf[VDEV_PAD_SIZE]; + + if (zfs_get_bootonce(&currdev, OS_BOOTONCE, buf, sizeof(buf)) == 0) { + printf("zfs bootonce: %s\n", buf); + set_currdev(buf); + setenv("zfs-bootonce", buf, 1); } + (void)zfs_attach_nvstore(&currdev); } + return (bootable); } #endif From nobody Mon May 1 21:04:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G113rNjz491Gf; Mon, 1 May 2023 21:04:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9G113MSmz3JCc; Mon, 1 May 2023 21:04:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZFff6DH81IAYEJqUhhaQmIVWUYAhd9QB1u1pVAZArlA=; b=WryedrZQBy5kmCMEUTLnDDUZUz4PXe1HVV0WoDluGnsCuu3iCCbxIOl5EmR1TAKzIwLO2P PGaceMTLaeeNaywQQXvHgt+9JSuo1DJAcX397oxdkqrxJkseBin4FGbVpRHb1bf360atwu NS5QO+8OrKblQByeO2uKmKbxt0PHojAXF87+lNdFIjFbdL4eWWg/k+CxNPhpyKHcKWSHpt 518Dc5/i5aCwF+T1f4VTT8qvh3ZVseEaioE1jvTn5njUXMXxkHvtklJrpBRZ/yR94OOY5q 7l63ra46yv1MrdCuZdoU/U9tgZtg243N0ue//OtgneEXKoHP2J83WUu6HPsmwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZFff6DH81IAYEJqUhhaQmIVWUYAhd9QB1u1pVAZArlA=; b=s4LyaPlUA54vNpSlmeRQDM91TYZ09OqCDI/5uxnOdB7hG+3As0jPUV2BW+AU5uUvDGsopB PF8VmC3Fwg3IfpsnrCtHqQG8xQsX1VemvvzlNMwZdvfLQU/koRiW09befwUWX2z7e31ecG gQgP/odEDdiy26g7BIVuREwQzbC2H+YvIwGHA4wffgskwr83DZzqpd9JCUOxXgJspV+WTD qv5jnJ7grjPZnl1wGuIOJCng8NU/z6sdQuccxfGv29qBLTcv4jOG8yoSVvYeJIx4Bq2OjJ HibL3gEH82DjpEbjsZhKdNEdjzkLHhzvOUJESSKwU2wnhXlGR/6uugF7xL3lWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975061; a=rsa-sha256; cv=none; b=rDWR8fRvFUM1DoRBtPEiSR05EJuA9jQO9rCBbmlQoJfSdhAgS/irAJjsl21kfWIQQuukLz XGSF7SlPOC8n8E7Vj3eI4LpZT/5RGNRBoEyWan9fkcdEJi4xL9BeGSYzOZ6fYNdqHkx7rd OT/ehOHbyBxixDi/f5hP0xpaXD9jc5GifD4A0Eszr3OI3Wb0XYMJr9i1pgzrRRZgZmYo+a nfXC+La6uoCjSsd8EwQK77jazjNn1MiImEioh1hYaV6hPJ4Ehz062VUyfiVA6rL3kUGPrd WWaToHwI6CTTiTm36Mb1Ef1u/cgzWjgq9GtpQuGb7Az0RqplsX0gdOVU+tztCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G112JWnzLXT; Mon, 1 May 2023 21:04:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4LAp051928; Mon, 1 May 2023 21:04:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4L17051927; Mon, 1 May 2023 21:04:21 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:21 GMT Message-Id: <202305012104.341L4L17051927@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: 5328f9034fc4 - main - stand/kboot: Simplify List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5328f9034fc410b105629700a1309bebf094266a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5328f9034fc410b105629700a1309bebf094266a commit 5328f9034fc410b105629700a1309bebf094266a Author: Warner Losh AuthorDate: 2023-05-01 15:28:32 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:53 +0000 stand/kboot: Simplify There's plenty of stack in kboot, so use it here rather than the malloc/free dance. Sponsored by: Netflix Reviewed by: tsoome, kevans Differential Revision: https://reviews.freebsd.org/D39416 --- stand/kboot/hostdisk.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/stand/kboot/hostdisk.c b/stand/kboot/hostdisk.c index 5cc7825034dd..d28530891e0e 100644 --- a/stand/kboot/hostdisk.c +++ b/stand/kboot/hostdisk.c @@ -574,7 +574,6 @@ probe_zfs_currdev(uint64_t pool_guid, uint64_t root_guid, bool setcurrdev) { char *devname; struct zfs_devdesc currdev; - char *buf = NULL; bool bootable; currdev.dd.d_dev = &zfs_dev; @@ -587,18 +586,15 @@ probe_zfs_currdev(uint64_t pool_guid, uint64_t root_guid, bool setcurrdev) bootable = sanity_check_currdev(); if (bootable) { - buf = malloc(VDEV_PAD_SIZE); - if (buf != NULL) { - if (zfs_get_bootonce(&currdev, OS_BOOTONCE, buf, - VDEV_PAD_SIZE) == 0) { - printf("zfs bootonce: %s\n", buf); - if (setcurrdev) - set_currdev(buf); - setenv("zfs-bootonce", buf, 1); - } - free(buf); - (void)zfs_attach_nvstore(&currdev); + char buf[VDEV_PAD_SIZE]; + + if (zfs_get_bootonce(&currdev, OS_BOOTONCE, buf, sizeof(buf)) == 0) { + printf("zfs bootonce: %s\n", buf); + if (setcurrdev) + set_currdev(buf); + setenv("zfs-bootonce", buf, 1); } + (void)zfs_attach_nvstore(&currdev); init_zfs_boot_options(devname); } return (bootable); From nobody Mon May 1 21:04:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G125gl0z491B9; Mon, 1 May 2023 21:04: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 4Q9G124SNhz3JJS; Mon, 1 May 2023 21:04:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975062; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s3Eal/GI4uR4zDMUvDYiYNWCDjAoTU9Z6fHOPA0O9jE=; b=Icat5eaHx2LwFYmYWka7rAyECEuOopVji2t9AFYgCsCKtUVTNP2U3qEjVzvAjeEAXPuHSn JZVwZ8B2C3D0bnwV4ojI4GYbPv687vRbI1BivbQB6EaKjK2zRxMnrkZId28SZaBtIL+sWO P4+tr2pRcG4g2dFpMcpPgeKGqntpWfkorcgt5bMX6um/TstK7xg7ZaL9kKLSUuh1WY1/KE QFzvFVUS2UQ9JF1ZTUmXVC1f/3cVUUZjKGRewiw7S0CHfCnLkEIgk/nXXCiKm9Wma6RlKk XN4FznAEgv5fqlGbWpHij5hwYy+tV0OMzl5EzaPZ4ta5Sx+Ox1VhGhaI4Yd4rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975062; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s3Eal/GI4uR4zDMUvDYiYNWCDjAoTU9Z6fHOPA0O9jE=; b=BK2MHR8Ry2vZm760eUdWSiwSgdNin3eFtz11fIFOMo4L0xAv/g94REQYc9sj9W2EwUbAn6 iP2ZPed+TOzPDBruIPUun1G2MN27vc29T0Fil5P5RSUl7aCnIpkxDkfkEu/bv+SHLtM+Fr IcdT+UFg4ovJDBuOPaHTLIB1bliUKj1hyyy+/eNZBk9VOoXUHQ1OhGMIg/UcEPjbGuqoRU HMIlcSyKBSyNmaszo4Lq+tiVWBUnSoYSlW0pd6fEYCQUGxzTEggrSY7kzK+01oAps+mXNd m4c5UNtVOsPc3K39IjoB+vEyXiHOjW8mwXg6UNw1r7xeZlYZ9pJ+Xydt0nxd+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975062; a=rsa-sha256; cv=none; b=a7KR4I7kQBU87zqpHSJ0IWfx38jY6QKdenE/ClAMXXV8U7VCkq9IIYSGt57Hdvh+yu8+/o O5xSz7YAhgoVV06hncUbccqQcPHBfNohfnNY2cB3C84U4L17SQMqNaDOEZ6gx3mdy0WKpN 21qW0GPlTmVHV34zCfa2I0STxa9hd/uAOPPaJyKoGMf1Uks2TqVGYHouSK6ZlwUDoswifv FqyLWtOpJH8rvGhU8J5ad0HVEl6UKNMvGISzyJKPg4JifNtw8qwWmidI3bsSOxBlV60UBr bQfWTKsxMocifyvRqxtbD9Ajm79FNWdYbAVBEPfo/fjvWcWSyxz5JOV/Twr1Ng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G123FmxzLZl; Mon, 1 May 2023 21:04:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4Mkv051947; Mon, 1 May 2023 21:04:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4Man051946; Mon, 1 May 2023 21:04:22 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:22 GMT Message-Id: <202305012104.341L4Man051946@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: cb8179079ab0 - main - stand: Fix warning about variable unused List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cb8179079ab08263b0e3835655a83a8915f33eb4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cb8179079ab08263b0e3835655a83a8915f33eb4 commit cb8179079ab08263b0e3835655a83a8915f33eb4 Author: Warner Losh AuthorDate: 2023-05-01 15:35:16 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:54 +0000 stand: Fix warning about variable unused dflag is unused when LOADER_VERIEXEC isn't defined, so move it under the ifdef. Sponsored by: Netflix --- stand/common/module.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/stand/common/module.c b/stand/common/module.c index 43c04728b4fa..9902309b7f99 100644 --- a/stand/common/module.c +++ b/stand/common/module.c @@ -114,10 +114,14 @@ command_load(int argc, char *argv[]) char *typestr; #ifdef LOADER_VERIEXEC char *prefix, *skip; + int dflag = 0; + char *args = "dkp:s:t:"; +#else + char *args = "kt:"; #endif - int dflag, dofile, dokld, ch, error; + int dofile, dokld, ch, error; - dflag = dokld = dofile = 0; + dokld = dofile = 0; optind = 1; optreset = 1; typestr = NULL; @@ -129,11 +133,13 @@ command_load(int argc, char *argv[]) prefix = NULL; skip = NULL; #endif - while ((ch = getopt(argc, argv, "dkp:s:t:")) != -1) { + while ((ch = getopt(argc, argv, args)) != -1) { switch(ch) { +#ifdef LOADER_VERIEXEC case 'd': dflag++; break; +#endif case 'k': dokld = 1; break; From nobody Mon May 1 21:04:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G135hYpz491BD; Mon, 1 May 2023 21:04:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9G1357tQz3JRg; Mon, 1 May 2023 21:04:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975063; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LKkzAGoFohP8o2Ux7RAr4fSYoQiusofS1T1v++0puSE=; b=ryS8VVe3/bxwvOn6+jRAwbezHqJ2RgV2/3TccGZzvwOOCAGsASBHQJ/E+pL6wrm/Mp4Lfb xzc1baOvp2p4jMMz+PnRCZ7ZWJpE5FBe/MGJmRWYkTRaCE0iY2peL17TYT4KmMklXH6oIH ipjO9jg71/Vk0jNwGUPi0IescKfPQpRg/KCnSwDaGGlnGEia2yGpwyKX6jJcXXXpkhS7eU VFFmUbAuA3o5940cN7XliY1jaB8ciKuEAKx6ERTeuwB9LnIW+prc4ydr3lYGDJ+noUZvA6 PXFrZENOpv0E3j0krz2hRJYPVxq3xDxFZQgNWDr5A68GxGr3exstqlBkaY/zDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975063; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LKkzAGoFohP8o2Ux7RAr4fSYoQiusofS1T1v++0puSE=; b=wAJKJ7fvpCa8nZ+HZPhzh8qsbELmsEHvl/nb9ZLlXP4pC/NwrjdpIH5WO0gIY727DkgyR5 fqgMCivT9WRQsvhdEx0Y4kxug9TQC40m41q55TKaVEF1xWMefDx5O6Y5iR7UswTr7MnUCx c1awT6ds7EoV6XMSn2wmRGQe2qrzOQQqV0zU72xdptUHh3Igu76tpbUW2RWMHLHm2NxWMV Zd2DKj6+L+vzzB99l8zVLTj49dY6d2nmTmdaM1yiwYi8d1BUj9MC2R3ThPZCav1NpDVeHJ kISkBTuWyLtJq4fgVHPr02jIsMpSXlRb7CuNd/nkBGweLNE/mPi6r+YbjHc3rw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975063; a=rsa-sha256; cv=none; b=EEfsjWfaYxmU7drAtoxEi5G7L3XDq6ubFZOZNvY92frqAs20BhLkssrDdU3oaLZVZglKdu UJQId4fDG/SfO5uEH5A7kQkRAz0K+JHBq1Bgi+7Q6CWiF/WOie7UQzXCWsgRKnOs01K8Am SPEPk9i+axTRYFNs76qs8CNhpHo8f/5epGO0bH6bbmmKbhlCs+7PEHCXrymYzsBcD5fuKV 3KgPHv/MPxE0vdIAFaDw3CR/mt5X1CO2lx+WXCrLvl1xtiPnnpfs+PW22dvV4E9ZjtRe4i 78yLx/aGdbGy//3kzrLcV/wDhOzOqZqI3V5ThV8sTQiLfJfFjY1CzXLx63tqSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G133y17zLXV; Mon, 1 May 2023 21:04:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4N4O051970; Mon, 1 May 2023 21:04:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4NtL051969; Mon, 1 May 2023 21:04:23 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:23 GMT Message-Id: <202305012104.341L4NtL051969@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: 96b119340eec - main - stand: remove ZFS warning about computered but unused variable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 96b119340eec331bdbbbdea606dae64cd2dce774 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=96b119340eec331bdbbbdea606dae64cd2dce774 commit 96b119340eec331bdbbbdea606dae64cd2dce774 Author: Warner Losh AuthorDate: 2023-05-01 15:45:41 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:54 +0000 stand: remove ZFS warning about computered but unused variable Toss a __unused on the unexpected_errors variable. We compute it, but never use it. Sponsored by: Netflix --- sys/cddl/boot/zfs/zfssubr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cddl/boot/zfs/zfssubr.c b/sys/cddl/boot/zfs/zfssubr.c index 1dcb0829680c..13edcc8ee747 100644 --- a/sys/cddl/boot/zfs/zfssubr.c +++ b/sys/cddl/boot/zfs/zfssubr.c @@ -1574,7 +1574,7 @@ vdev_raidz_read(vdev_t *vd, const blkptr_t *bp, void *data, raidz_map_t *rm; raidz_col_t *rc; int c, error; - int unexpected_errors; + int unexpected_errors __unused; int parity_errors; int parity_untried; int data_errors; From nobody Mon May 1 21:04:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G146mGmz491Gp; Mon, 1 May 2023 21:04:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9G145lM7z3Jfp; Mon, 1 May 2023 21:04:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975064; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=psvg0fVYxabq0vGqcRVmyRm8XiHsrIik67hxMtF5ipQ=; b=CVDpZMnzKyZFq1gued7cigi8FzOiT5YO5dL6NSZvwB0SMAFtIsO0sO7aMy6pHFFGEfwelY HqBeU/wgl+lSqNwh/RIOv5tquwEUiD1690a91A1RwhGTgesMAA+ORtfkWn8K8iptYv66v+ wbS/GWYXgfG+fusdrv7hZbgJBUrvQkU/rdNgLmi2F5MEN6srglq6CyhiPLdSkG3ujgdhL7 6QdJVUqcoyYmUNPhYZgFjiqxDyXGQs1ZWq6Fjxerq8dsRmnNXY5gsXteUniqusa9LsRO9j x/kZs++oaS8cqWqUxPDfaSEos8ggM4Q+P6bhqr8TA3X+zfAaAGFCTDZV32377w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975064; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=psvg0fVYxabq0vGqcRVmyRm8XiHsrIik67hxMtF5ipQ=; b=P4NxXOPqO4YfAdovK7KjFimKRpYLMAd4sN8PouGWuvGZARmrhJSPgtNUkMRg2XLgg1vwc8 KNtctn75ZKHRiaSxBmIu3DsY/0xGSugDSkGVoToTUjratMxOxA8YsYbCQtbeoEGbxLQD7l wmtJpMM8LIhw3r5vi0riLVajUVSt331BiA6DteLNYBJJDOBWmSHS/TMPOKwgZi5QQ45HWv Hmvdca9kiFksf+ruMphoRZ47+H6Y4u3pRQMzBypJ7YaJYO1YqdmjtWNS1pZjxZ7gIi5P2w z/jThs3WEsSFtJzrOxdtNXLVSN769YIYLq+uCTAX3kWWuV33MLBMDXbhQXCEtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975064; a=rsa-sha256; cv=none; b=TWuHA6AF/x5SCWhADgUNqYOJEgZ2+Oac+qBBIQ4Mi9a5DxUuCDEinorATQQmVajkV4XEHK yZr0rpYWsIJiaajQxWja+bEc8+ikpQSHPQMQeN3tQBBzbdvRrfJiFyL0EH8hHRfSgiOCot BLDtxxCB12nssK/fYcEhgiZ2pPf5ZqN+dakHzTsuxvmGNyvvuSBpl5iaUKrrmboVRxqzHB VTTmTQHam8cYjKv/74LasvrXpAmsLwypa6FpUOAZ81avEE7Fwl2si2MyLUpxFAFaKONblg 2jEMifjtQOPWOLBcoYvTDSkTfZsvj+4QPJPS/J2+xjq7aI6IMMVFB1wvhEIcig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G144rJRzL2h; Mon, 1 May 2023 21:04:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4Oa7051989; Mon, 1 May 2023 21:04:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4OoW051988; Mon, 1 May 2023 21:04:24 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:24 GMT Message-Id: <202305012104.341L4OoW051988@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: 6c8358cd7ffd - main - stand: back out the most of the horrible aarch64 kludge List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6c8358cd7ffd71acec74036429a8afb502720722 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6c8358cd7ffd71acec74036429a8afb502720722 commit 6c8358cd7ffd71acec74036429a8afb502720722 Author: Warner Losh AuthorDate: 2023-05-01 16:07:00 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:54 +0000 stand: back out the most of the horrible aarch64 kludge Add one ifdef to upstrem code and get rid of compiling the horrible checked-in aarch64 assembler for the boot loader that the loader will never use. I'll attempt to upstream this and adjust as needed. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D39897 --- stand/libsa/zfs/Makefile.inc | 33 ++++------------------ stand/libsa/zfs/blake3_impl_hack.c | 23 ++------------- .../openzfs/module/icp/algs/blake3/blake3_impl.c | 13 +++++---- 3 files changed, 15 insertions(+), 54 deletions(-) diff --git a/stand/libsa/zfs/Makefile.inc b/stand/libsa/zfs/Makefile.inc index 7660f4ab7baf..6eded5659602 100644 --- a/stand/libsa/zfs/Makefile.inc +++ b/stand/libsa/zfs/Makefile.inc @@ -19,11 +19,6 @@ ZSTD_SRC+= zstd_common.c ZSTD_SRC+= zstd_ddict.c zstd_decompress.c zstd_decompress_block.c ZSTD_SRC+= zstd_double_fast.c zstd_fast.c zstd_lazy.c zstd_ldm.c -# This is completely bogus: We should be able to omit this code completely. -.if ${MACHINE_ARCH} == "aarch64" -ZFS_SRC_AS = b3_aarch64_sse2.S b3_aarch64_sse41.S -.endif - SRCS+= ${ZFS_SRC} ${ZSTD_SRC} ${ZFS_SRC_AS} # @@ -52,9 +47,9 @@ CFLAGS.$i+= -include ${ZFSOSINC}/spl/sys/ccompile.h -Wformat -Wall -I${OZFS}/inc -DNEED_SOLARIS_BOOLEAN .endfor -CFLAGS_EARLY.blake3.c+= ${ZFS_EARLY} -CFLAGS_EARLY.blake3_generic.c+= ${ZFS_EARLY} -CFLAGS_EARLY.blake3_impl_hack.c+= ${ZFS_EARLY} +CFLAGS_EARLY.blake3.c+= ${ZFS_EARLY} -DOMIT_SIMD +CFLAGS_EARLY.blake3_generic.c+= ${ZFS_EARLY} -DOMIT_SIMD +CFLAGS_EARLY.blake3_impl_hack.c+= ${ZFS_EARLY} -DOMIT_SIMD CFLAGS_EARLY.list.c+= ${ZFS_EARLY} CFLAGS_EARLY.zfs_zstd.c+= ${ZFS_EARLY} CFLAGS_EARLY.nvlist.c+= ${ZFS_EARLY} @@ -73,9 +68,6 @@ CFLAGS.zfs.c+= -DHAS_ZSTD_ZFS \ -I${SYSDIR}/crypto/skein \ -I${SRCTOP}/sys/cddl/contrib/opensolaris/common/lz4 -.for i in ${ZFS_SRC_AS} -CFLAGS.$i+= -DLOCORE -.endfor # # ZSTD coding style has some issues, so suppress clang's warnings. Also, zstd's # use of BMI instrucitons is broken in this environment, so avoid them. @@ -86,24 +78,9 @@ CFLAGS.$i+= -U__BMI__ ${NO_WBITWISE_INSTEAD_OF_LOGICAL} CFLAGS.zfs_zstd.c+= -DIN_BASE -DIN_LIBSA +CFLAGS.blake3_impl_hack.c+= -I${OZFS}/module/icp/algs/blake3 -I${OZFS}/module/icp/include + # Do not unroll skein loops, reduce code size CFLAGS.skein_block.c+= -DSKEIN_LOOP=111 -# To find blake3_impl.c in OpenZFS tree for our somehat ugly blake3_impl_hack.c -# that's needed until the necessary tweaks can be upstreamed. -# XXX the last import gutted all this since upstream changes broke this hack. -CFLAGS.blake3_impl_hack.c+= -I${OZFS}/module/icp/algs/blake3 -I${OZFS}/module/icp/include - CWARNFLAGS.zfs.c+= ${NO_WDANGLING_POINTER} - -# Needing to remove the -mgeneral-regs-only is a red flag that this is not quite -# right. But it's needed at the moment due to the muddled upstream. -b3_aarch64_sse2.o: b3_aarch64_sse2.S - ${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${.IMPSRC} \ - -o ${.TARGET} - ${CTFCONVERT_CMD} - -b3_aarch64_sse41.o: b3_aarch64_sse41.S - ${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${.IMPSRC} \ - -o ${.TARGET} - ${CTFCONVERT_CMD} diff --git a/stand/libsa/zfs/blake3_impl_hack.c b/stand/libsa/zfs/blake3_impl_hack.c index 2be6cc54e774..789807714e2c 100644 --- a/stand/libsa/zfs/blake3_impl_hack.c +++ b/stand/libsa/zfs/blake3_impl_hack.c @@ -5,8 +5,8 @@ */ /* - * Hack for aarch64... There's no way to tell it omit the SIMD - * versions, so we fake it here. + * Hack for aarch64... Not sure why isspace isn't defined, but it sure doesn't + * belong here. */ #ifndef isspace static __inline int isspace(int c) @@ -16,22 +16,3 @@ static __inline int isspace(int c) #endif #include "blake3_impl.c" - -/* -static inline boolean_t blake3_is_not_supported(void) -{ - return (B_FALSE); -} - -const blake3_ops_t blake3_sse2_impl = { - .is_supported = blake3_is_not_supported, - .degree = 4, - .name = "fakesse2" -}; - -const blake3_ops_t blake3_sse41_impl = { - .is_supported = blake3_is_not_supported, - .degree = 4, - .name = "fakesse41" -}; -*/ diff --git a/sys/contrib/openzfs/module/icp/algs/blake3/blake3_impl.c b/sys/contrib/openzfs/module/icp/algs/blake3/blake3_impl.c index f3f48c2dfa1a..5684b4ff1a97 100644 --- a/sys/contrib/openzfs/module/icp/algs/blake3/blake3_impl.c +++ b/sys/contrib/openzfs/module/icp/algs/blake3/blake3_impl.c @@ -30,10 +30,13 @@ #include "blake3_impl.h" -#if defined(__aarch64__) || \ +#if !defined(OMIT_SIMD) && (defined(__aarch64__) || \ (defined(__x86_64) && defined(HAVE_SSE2)) || \ - (defined(__PPC64__) && defined(__LITTLE_ENDIAN__)) + (defined(__PPC64__) && defined(__LITTLE_ENDIAN__))) +#define USE_SIMD +#endif +#ifdef USE_SIMD extern void ASMABI zfs_blake3_compress_in_place_sse2(uint32_t cv[8], const uint8_t block[BLAKE3_BLOCK_LEN], uint8_t block_len, uint64_t counter, uint8_t flags); @@ -96,9 +99,7 @@ const blake3_ops_t blake3_sse2_impl = { }; #endif -#if defined(__aarch64__) || \ - (defined(__x86_64) && defined(HAVE_SSE2)) || \ - (defined(__PPC64__) && defined(__LITTLE_ENDIAN__)) +#ifdef USE_SIMD extern void ASMABI zfs_blake3_compress_in_place_sse41(uint32_t cv[8], const uint8_t block[BLAKE3_BLOCK_LEN], uint8_t block_len, @@ -257,6 +258,7 @@ extern const blake3_ops_t blake3_generic_impl; static const blake3_ops_t *const blake3_impls[] = { &blake3_generic_impl, +#ifdef USE_SIMD #if defined(__aarch64__) || \ (defined(__x86_64) && defined(HAVE_SSE2)) || \ (defined(__PPC64__) && defined(__LITTLE_ENDIAN__)) @@ -273,6 +275,7 @@ static const blake3_ops_t *const blake3_impls[] = { #if defined(__x86_64) && defined(HAVE_AVX512F) && defined(HAVE_AVX512VL) &blake3_avx512_impl, #endif +#endif }; /* use the generic implementation functions */ From nobody Mon May 1 21:04:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9G163MzJz491dX; Mon, 1 May 2023 21:04:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9G1615bXz3JSd; Mon, 1 May 2023 21:04:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nR0TKkdWk92IJd+DUctzVzk6Sj8accfeDlWD8wwZ/DY=; b=FlPqm+HVD9Wzo5u7ayh2JeYinQdFRCYqVIH/zAkcavWcqP9qJAOJ1/5VZXmnpp/5FDb2mW WdLVrpBpbxww2jXSIDXyyRTpt5rs9tBla/UpKCSSCKwuGIK9P5GhYj4Y4c7TPHNtPCBoDf I4zgDJCJzECsny9WB7+dBIz5WNbeaVgWKdce+Z9LP/nUdk9v0XqLiXwWBFYp0IHBjxX9Fb 5lxcYKG5NsL8XfaQMVZAMfB4lsMkBEEPEX/mf7knj3Of6Gx2ramRpVZ+t7GHt4IPpJGkCh Gg/ccJlVy6yXXcYLhvor6b+61rra+lPIVfPEYFMkEpxxuAx4todAIXuS46SzqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682975066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nR0TKkdWk92IJd+DUctzVzk6Sj8accfeDlWD8wwZ/DY=; b=ANc+SS5jQEtrpC9M7wT0WLjI5Gw+F62cSpyCTaZdvDGLPdA/j/N0zYRAjkrsw1l6kUUjTD 5X3Eab0CvDO8IK2B5N/mBHW9Bik8LO6cGCXF3HBfzv/SmM8tivZ1RdCA6TSbIvQ6hbFZ8s jiww3K0Pacjxx0QIq+i0d6evA1I3gFKn8UyRWM2gSy0LXt9FNpg1g8G7YDO3ijGsBkneqS fANeVIatLiU8Vbr7SQjSxHrk4oXvIeim+ORlNHt7rAv+K3PASiDLslOG9fyj5SPfVX6BFN TMLqrZHsfqoQaovzbhZ/q5Arn7KEbDHC3exXzTaV+ae/YrEIFcI0luuBSH3g6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682975066; a=rsa-sha256; cv=none; b=Goo1FCChQ5QS4DDyF0V3PeF8Mm5d5LDbuTXDuZyQ+BPfuaszQtZOUwiDdtU3qvvvil6nto ok7ANp8VupUrqq+gc2EIxdTIXEg2JgGsGTRBCwFQD6QtxwdfUeUd4u2648zdSzJ3ZjT+f9 ve1c2IePWv1xOi6ewysLpbZDJgjpDn/raZskya62md839I80mcziEDwSzdpWHIL3YgGW4e TfBkJRNt2WbMmXNh37mCKa1yeY1/dWZ6hXWdcvxqHsATDMRAymVdxuTUuA3kjhHDkwJtgn RBtCJuSjY5cgJjR6oEYCB8i02LPzZmH09L8HIKlEBbBzqPBpqc2pg32f91Ph7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9G155qhMzLM9; Mon, 1 May 2023 21:04:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341L4Pxd052011; Mon, 1 May 2023 21:04:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341L4PxL052007; Mon, 1 May 2023 21:04:25 GMT (envelope-from git) Date: Mon, 1 May 2023 21:04:25 GMT Message-Id: <202305012104.341L4PxL052007@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: b53ec4e44f6f - main - stand: Add isspace to FreeBSD ctypes.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b53ec4e44f6f66f2235a96f7c0508a586b1275f1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b53ec4e44f6f66f2235a96f7c0508a586b1275f1 commit b53ec4e44f6f66f2235a96f7c0508a586b1275f1 Author: Warner Losh AuthorDate: 2023-05-01 17:50:21 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:02:54 +0000 stand: Add isspace to FreeBSD ctypes.h And eliminate blake3_impl_hack.c since it's no longer needed. Sponsored by: Netflix Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D39899 --- stand/libsa/zfs/Makefile.inc | 6 +++--- stand/libsa/zfs/blake3_impl_hack.c | 18 ------------------ sys/contrib/openzfs/include/os/freebsd/spl/sys/ctype.h | 1 + 3 files changed, 4 insertions(+), 21 deletions(-) diff --git a/stand/libsa/zfs/Makefile.inc b/stand/libsa/zfs/Makefile.inc index 6eded5659602..8bf430a8e4bf 100644 --- a/stand/libsa/zfs/Makefile.inc +++ b/stand/libsa/zfs/Makefile.inc @@ -11,7 +11,7 @@ .PATH: ${OZFS}/module/icp/algs/blake3 ZFS_SRC= zfs.c nvlist.c skein.c skein_block.c list.c ZFS_SRC+= zfs_zstd.c -ZFS_SRC+= blake3.c blake3_generic.c blake3_impl_hack.c +ZFS_SRC+= blake3.c blake3_generic.c blake3_impl.c ZSTD_SRC+= entropy_common.c error_private.c ZSTD_SRC+= fse_decompress.c hist.c ZSTD_SRC+= huf_decompress.c pool.c xxhash.c @@ -49,7 +49,7 @@ CFLAGS.$i+= -include ${ZFSOSINC}/spl/sys/ccompile.h -Wformat -Wall -I${OZFS}/inc CFLAGS_EARLY.blake3.c+= ${ZFS_EARLY} -DOMIT_SIMD CFLAGS_EARLY.blake3_generic.c+= ${ZFS_EARLY} -DOMIT_SIMD -CFLAGS_EARLY.blake3_impl_hack.c+= ${ZFS_EARLY} -DOMIT_SIMD +CFLAGS_EARLY.blake3_impl.c+= ${ZFS_EARLY} -DOMIT_SIMD CFLAGS_EARLY.list.c+= ${ZFS_EARLY} CFLAGS_EARLY.zfs_zstd.c+= ${ZFS_EARLY} CFLAGS_EARLY.nvlist.c+= ${ZFS_EARLY} @@ -78,7 +78,7 @@ CFLAGS.$i+= -U__BMI__ ${NO_WBITWISE_INSTEAD_OF_LOGICAL} CFLAGS.zfs_zstd.c+= -DIN_BASE -DIN_LIBSA -CFLAGS.blake3_impl_hack.c+= -I${OZFS}/module/icp/algs/blake3 -I${OZFS}/module/icp/include +CFLAGS.blake3_impl.c+= -I${OZFS}/module/icp/algs/blake3 -I${OZFS}/module/icp/include # Do not unroll skein loops, reduce code size CFLAGS.skein_block.c+= -DSKEIN_LOOP=111 diff --git a/stand/libsa/zfs/blake3_impl_hack.c b/stand/libsa/zfs/blake3_impl_hack.c deleted file mode 100644 index 789807714e2c..000000000000 --- a/stand/libsa/zfs/blake3_impl_hack.c +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright 2022, Netflix, Inc - * - * SPDX-License-Identifier: BSD-2-Clause - */ - -/* - * Hack for aarch64... Not sure why isspace isn't defined, but it sure doesn't - * belong here. - */ -#ifndef isspace -static __inline int isspace(int c) -{ - return c == ' ' || (c >= 0x9 && c <= 0xd); -} -#endif - -#include "blake3_impl.c" diff --git a/sys/contrib/openzfs/include/os/freebsd/spl/sys/ctype.h b/sys/contrib/openzfs/include/os/freebsd/spl/sys/ctype.h index 53afd8b8bd42..201fa95550e3 100644 --- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/ctype.h +++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/ctype.h @@ -39,5 +39,6 @@ ((C) >= 0x3A && (C) <= 0x40) || \ ((C) >= 0x5B && (C) <= 0x60) || \ ((C) >= 0x7B && (C) <= 0x7E)) +#define isspace(C) ((C) == 0x20 || ((C) >= 0x9 && (C) <= 0xD)) #endif From nobody Mon May 1 21:28:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9GYC1shHz492VC; Mon, 1 May 2023 21:28:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9GYC1RHxz3jlY; Mon, 1 May 2023 21:28:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682976527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pIDqWRZYmNRF8K3o8CijELZAbc4LiZCvqIAuKJ3O2tk=; b=A6cI8x2V5+6bt6GLyFuyjbCxfSa3EKun00xj9f7+CMSsFliFoyBP+AL4epzhP3QS16aKQO F4j2QOl7Wlp00PHqGZGFij/ixAsj7gj2LztdBQvtcvZKdzdZbXxcDibamSDdxG4x64+fG+ p9DHqycqnJqU2MvAN91eEN2J/WXKy0PysgYIqDVbqlEoLCRegLyk+plT8lUpdnYUV5/RZi 94TAKZG0nzRgf9xtqe5uj/bH0FiCRb6sdp8cPcCuob1Tk+S0qqJ3capfMUATOrHqXolg49 eVdptjLdVtVuqvm0j61QA8ZQv5GUpmEaQQAOwPZo0FT7tMeDh+EOkij6eRCTxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682976527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pIDqWRZYmNRF8K3o8CijELZAbc4LiZCvqIAuKJ3O2tk=; b=q9wEiGYlH6oPuBtNQEoKQhgnw4xH7aw7YAudAYMHZ7VCz7bSUfQfTggC3IGetIoQ4GdGew xQyn3nTn+Zo60+qiyZ2LIM42M6XQECfyyZdv8IWzTzAsIRBSfvB4GwNvSkuB5eheKKlFzs nT4Q67PJVCDoHqw/6AXJE8ZY70rHTj8Q6UriDeW+ISY7Ky95vRV/Ju8SIxshkIcGmA9GUr ii4+6udDhSXSaf558EUAKuY3wpayeTZdOvkf/QWkCHzwcBXj7mXDiNi3iMbE7FR0BeOVi6 cp7Zg2U2aqviBqnRHWZo0uiITL799rhRLjHa1ZWIBsVxnZsx8KPFvx085zPdTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682976527; a=rsa-sha256; cv=none; b=OIcjI/i9UOknHzdxdT05NVmB8kuGDgu4/nmu6A9so27jtXoLu/R0Fb34BTMsvdvYWY162m 2dqZgVxVdGPiDl6N6tKjM0CEpdwSnoaV0+9hUXdagJYmijkOTAy6r1I6tTCke60fXv0r26 L1krcg5pyAA5WhIjzyfWVCAsmST23A5u9jbneGA+kYL3tZwcQ7DUEYg9dVTrPLOMs48UPm 9sO54hO2AdZLPUAqkLMyk4bDU17ZwM29zU2coHSb9FaOIaEEHdARU7bTUbUMxk7s72tm0t pzdQhf7jpsHe87ogzlrg2dIpCpDRRIHouZvCn96QpWCBdW6DG4w3TRMuzykOqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9GYC0VSMzMJh; Mon, 1 May 2023 21:28:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341LSkfO085838; Mon, 1 May 2023 21:28:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341LSk6A085837; Mon, 1 May 2023 21:28:46 GMT (envelope-from git) Date: Mon, 1 May 2023 21:28:46 GMT Message-Id: <202305012128.341LSk6A085837@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: 83eabc64efec - main - kboot: Add HOST_MAP_FAILED define List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 83eabc64efec4aaf46f87bf2ba5560ecd4c336d7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=83eabc64efec4aaf46f87bf2ba5560ecd4c336d7 commit 83eabc64efec4aaf46f87bf2ba5560ecd4c336d7 Author: Warner Losh AuthorDate: 2023-05-01 21:11:32 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:11:32 +0000 kboot: Add HOST_MAP_FAILED define Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D39790 --- stand/kboot/host_syscall.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stand/kboot/host_syscall.h b/stand/kboot/host_syscall.h index 64288f48e6f0..c85284d03be7 100644 --- a/stand/kboot/host_syscall.h +++ b/stand/kboot/host_syscall.h @@ -123,6 +123,8 @@ struct host_timeval { #define HOST_MAP_FIXED 0x10 #define HOST_MAP_ANONYMOUS 0x20 +#define HOST_MAP_FAILED ((void *)-1) + /* Mount flags from uapi */ #define MS_RELATIME (1 << 21) From nobody Mon May 1 21:28:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9GYD2kpgz492gT; Mon, 1 May 2023 21:28: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 4Q9GYD22PSz3jx1; Mon, 1 May 2023 21:28:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682976528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3cxwkESzsjNm9nXqINQUPNdClWBzFWw3uTVD0m0UY/c=; b=pcg/5MHJDrkwmw3TBjkneNSIlZgvUbUVg00bUNTlI6w1Vypw16pYxJWcX7lajN3ELTKwUq Iy6e0iGICIcqOWLR1612p7i4pKUR2YEe/vHt1Ya8ZZTJuTuD0jjqgKUdTQVFyeAh3jFLpj R3/++7AZ8/amI8r4qVQZ5mx8YG5Hln/psqTgWO9EHfNTWC0aA0TT7LpnSyrOgB2zPNRrol AyVBOraz4JovJ/pO2uzG+oM3IEnK6DdbrI8bWVkRQrWBBob/CYD0xSvygFpKRBtJrJp5q0 Rmygv3A5Hmy3N2GRklQN0yDcJjX/XD1RxyQrnid05Wu/scywiaKNtTVP+CGLZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682976528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3cxwkESzsjNm9nXqINQUPNdClWBzFWw3uTVD0m0UY/c=; b=bFZ4oVmRkGxsSA20BvG6Ea3Al+oxoDePRjRz6FO3GXomS1d1f5qCTGiTIAX5F7UoVeJBGJ lkfSuhxKTfaRkesxK2xr6/hJtl1yvqxzASzylc5O7cUVdnuwhkFCokw1eAcRzHOKoTjUFM lT7Kg5t6Z6SyIpjxb/l8jzFEfCcyM2P4ZjkE4owuPv43bTAsy+wHHXRBdq8L0/SHw4myUQ itBHueus181mtaTZzfvdAGZuA/ZV/s9W6JdETO9htndBTKR4Prk7RYVGLxpTQIAxmGBU9G YA/10KEqbEdotAmZrrpLtfH0NHGqy0D8V5+LPDqOCrvd4zP68b2Ni4vAC6cXig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682976528; a=rsa-sha256; cv=none; b=AL35dV9bEpqvSp1ZjRvMmmhM6eS99CbxXk/iHaPK7HXkFatSnFmXAKieR2FFt4VvVTQUks UWV3akr2in9Om/Q58zW99IVaR3IaboGFhWaZciLtbfabGCzzVKQNkIQrCGp3lQk1SWoRNe zQ62pAilIddjmS/IQkdfTm7hkMX+tE0bumoKJ7Ry/hAoV9qfuW1zAeuv3scx1mFj7LknsA 3WnSMQydHQhcR+UhPDSJH18dsa9fZ3v8oXHcfSUHgdMi4iTNmX6F4kTE3tnoxJGS0dEZvA P8tL/ZosOowUlTibWYgj6L21W+9IaDSyO4oIXYInGIggzypLBQdFC3nZXRbD1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9GYD17XKzLj7; Mon, 1 May 2023 21:28:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341LSmsJ085868; Mon, 1 May 2023 21:28:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341LSmDU085867; Mon, 1 May 2023 21:28:48 GMT (envelope-from git) Date: Mon, 1 May 2023 21:28:48 GMT Message-Id: <202305012128.341LSmDU085867@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: cf6044857e2b - main - stand: Testing program for smbios List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cf6044857e2b20f2ecf90929027e9dd335b38803 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cf6044857e2b20f2ecf90929027e9dd335b38803 commit cf6044857e2b20f2ecf90929027e9dd335b38803 Author: Warner Losh AuthorDate: 2023-05-01 21:12:19 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:12:19 +0000 stand: Testing program for smbios Write a quick and dirty testing program to dump physical memory to help test and debug the smbios.c code in new environments. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D39791 --- tools/boot/smbios/Makefile | 11 ++++++ tools/boot/smbios/main.c | 96 ++++++++++++++++++++++++++++++++++++++++++++++ tools/boot/smbios/stand.h | 18 +++++++++ 3 files changed, 125 insertions(+) diff --git a/tools/boot/smbios/Makefile b/tools/boot/smbios/Makefile new file mode 100644 index 000000000000..a555470aab14 --- /dev/null +++ b/tools/boot/smbios/Makefile @@ -0,0 +1,11 @@ +# $FreeBSD$ + +PROG= smbios +MAN= +.PATH: ${SRCTOP}/stand/libsa +SRCS= main.c +CFLAGS+= -I${.CURDIR} -I${SRCTOP}/stand/libsa + +.include + +CFLAGS+= -Wno-cast-align diff --git a/tools/boot/smbios/main.c b/tools/boot/smbios/main.c new file mode 100644 index 000000000000..60263d2ea8d9 --- /dev/null +++ b/tools/boot/smbios/main.c @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2023 Warner Losh + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +/* + * Test program for smbios support in the boot loader. This program will mmap + * physical memory, and print the smbios table at the passed in PA. This is + * intended to test the code and debug problems in a debugger friendly + * environment. + */ + +#include +#define setenv my_setenv + +#define SMBIOS_SERIAL_NUMBERS 1 +#define SMBIOS_LITTLE_ENDIAN_UUID 1 + +#include + +#include "smbios.h" +#include "smbios.c" + +#include + +#define MAX_MAP 10 +#define PAGE (64<<10) + +static struct mapping +{ + uintptr_t pa; + caddr_t va; +} map[MAX_MAP]; +static int fd; +static int nmap; + +caddr_t ptov(uintptr_t pa) +{ + caddr_t va; + uintptr_t pa2; + struct mapping *m = map; + + pa2 = rounddown(pa, PAGE); + for (int i = 0; i < nmap; i++, m++) { + if (m->pa == pa2) { + return (m->va + pa - m->pa); + } + } + if (nmap == MAX_MAP) + errx(1, "Too many maps"); + va = mmap(0, PAGE, PROT_READ, MAP_SHARED, fd, pa2); + if (va == MAP_FAILED) + err(1, "mmap offset %#lx", (long)pa2); + m = &map[nmap++]; + m->pa = pa2; + m->va = va; + return (m->va + pa - m->pa); +} + +static void +cleanup(void) +{ + for (int i = 0; i < nmap; i++) { + munmap(map[i].va, PAGE); + } +} + +int +my_setenv(const char *name, const char *value, int overwrite __unused) +{ + printf("%s=%s\n", name, value); + return 0; +} + +static void +usage(void) +{ + errx(1, "smbios address"); +} + +int +main(int argc, char **argv) +{ + uintptr_t addr; + + if (argc != 2) + usage(); + addr = strtoull(argv[1], NULL, 0); + /* For mmap later */ + fd = open("/dev/mem", O_RDONLY); + if (fd < 0) + err(1, "Opening /dev/mem"); + smbios_detect(ptov(addr)); + cleanup(); +} diff --git a/tools/boot/smbios/stand.h b/tools/boot/smbios/stand.h new file mode 100644 index 000000000000..d754189fad13 --- /dev/null +++ b/tools/boot/smbios/stand.h @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2023 Warner Losh + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +caddr_t ptov(uintptr_t pa); From nobody Mon May 1 21:28:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9GYF3ZFhz492VJ; Mon, 1 May 2023 21:28: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 4Q9GYF35v1z3k7B; Mon, 1 May 2023 21:28:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682976529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dekcKSxGupNVe1AyBkbHrhIKSbbtmCVHtodjrNIjbvo=; b=sk1vA/PVVayzb7uGKkUT8AK1nYG7grlMxLNGceS6XYeeOjbype2lQJc+zzTwNWqhBv2L9l GWTl9bHGUY/quarKCoCrTp87i5ATqcBiYWB14SKVnCJGdxNqxMcN3nB+ZfeOuR+RXq5cyi DwXC9fQSe6hBMn6kSWWYtICg7nMOnJjYQB4LJ8w0ViQHGauyNuJ4wO+U83i16Lab7urg+5 BeRzoMx0N7Amjq2QzAa2bKdGa48i+UHniIjAHqXH8LGVyIgnJLWKAkVGmUJYMpUhZG8f+r SSic0aKCyXkOsf6uC6IBw2v5/E/8e4FUQctjU8nFrfJTkRjupzMrMEIuIGxo3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682976529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dekcKSxGupNVe1AyBkbHrhIKSbbtmCVHtodjrNIjbvo=; b=iurPgKMwRdbN+K0gqv1YZYBT1HnuZChK4C4ZWgn4GUAlOrYZPDC20UncEQiK9ZncNN2e/4 QqAxlUghJuO5sS6E42NsZO8H2cX6TM2TacpFziczSfA4/hVBDTrM3TREV02gkrvPpvKIAG 4ZctDDlNsuS99EgPAZBJjXt3ncYg0D8yv3y3o1fcGKwchKl3GBQxxSwgV3lBLS8yRs+lLg KYeH7LjQlznLw6YPsQZkGxVPVzgx9lK1dGvZs48Sc221taIl2U8oCtXzggBPAB53KIyMZ2 NR2W0SZyjBaNQmK+z1g3LOwlprBCkItYnsKl2wGaQxnZU4BHUYgyTlYMPU1FgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682976529; a=rsa-sha256; cv=none; b=ECWysxLuGQyJ1Nb83qqXB7ILVVpLtlIlyJ7MmOFjIAauA+kMRQzZThSlNPD2VpgT89bbOd ZMXU/hfwxL8buF/5f2clz/NFZ2BSIQ/X/okHtnXFwyVhTgV51ACSUDdMZzQ9HBF8LBi2w7 jkNLA6rNu2FTSsZDZQXGSveZdjYi5l5B94vlQCkfhdWEkU4QG44ZyC16icUBn9YvaGrOFN RzmsNu24aohPVFh2aC8NtUvo+QmlqxgukGUejmN+7ZqUm2rVaAuJm5IcyY2GRuH3sESSZq XKpp/1LYL/GkL8uDNfS/2QKUXG+lPuTXwO/ZW6ZX1VP47Mv08vV9JSHqCkDeAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9GYF2C8RzM0L; Mon, 1 May 2023 21:28:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341LSnbC085895; Mon, 1 May 2023 21:28:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341LSnRw085894; Mon, 1 May 2023 21:28:49 GMT (envelope-from git) Date: Mon, 1 May 2023 21:28:49 GMT Message-Id: <202305012128.341LSnRw085894@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: facd0edbb26c - main - kboot: Fix an off by one error List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: facd0edbb26cec53e8b958f426b7f46550db6c5f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=facd0edbb26cec53e8b958f426b7f46550db6c5f commit facd0edbb26cec53e8b958f426b7f46550db6c5f Author: Warner Losh AuthorDate: 2023-05-01 21:12:24 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:12:24 +0000 kboot: Fix an off by one error Fix an off-by-one error that would mean we'd get stuck on the newline if ACPI= wasn't first. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D39817 --- stand/kboot/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/kboot/main.c b/stand/kboot/main.c index 3895f7e76773..ecf96cc73d4d 100644 --- a/stand/kboot/main.c +++ b/stand/kboot/main.c @@ -168,7 +168,7 @@ kboot_rsdp_from_efi(void) return((vm_offset_t)strtoull(walker + 7, NULL, 0)); if (strncmp("ACPI=", walker, 5) == 0) return((vm_offset_t)strtoull(walker + 5, NULL, 0)); - walker += strcspn(walker, "\n"); + walker += strcspn(walker, "\n") + 1; } return (0); } From nobody Mon May 1 21:28:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9GYG4m6yz492Fy; Mon, 1 May 2023 21:28: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 4Q9GYG41kBz3kBG; Mon, 1 May 2023 21:28:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682976530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GJle0ds6veaoHgMWOkq7iPt4o8Cwp+HFRnBvp1EXkfw=; b=P6F6GUeg//tJoI8Vk4sX+THbVav/jRyV+hOXr7i1L1myKi2kKhfgPgfpjcpN7bFUjSaAXr /V18/fO0hoiwLkFfhqdeg62VViYJReGNXtj7H34D6jtZ1W+xh/t0eBq3jFtp4joPZbIELc vOADy949CBMREbFTXs3rDC8rqGgMOukVQQRp3RXYz7/4dSUmMuC+FJKf0UXGNCyvZbczEs Lj351gI7s67EiqeGY0tBcjslvYL4WlpjNvkjJyd3ZKsRU8Rtqvx0AHMrnWId0ueJrcL5iN q71+tGbPm5SB+qKbAk9yB/cqDI4X71C+ccpmBGdpRL5JnXIk3u8vnH8T9MXchw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682976530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GJle0ds6veaoHgMWOkq7iPt4o8Cwp+HFRnBvp1EXkfw=; b=TxK7eDOjO21wG62vWefOpX0SqJNTriwfctiPA1ZGb+ZZxDWU6BfwWp/Dv1gJ4lZ9HTkmJX G/DrXfnqoDUpYVRbcj473OYEKW5PtmbtGjx/AIhSYTiq3BlT6msm7WBPrUFP17vwzXzIp9 Wv5GMynZyHR77RfJALyetfPE0UIdqGBLuXCbESE6WqvnGN3TDcVHXHMeQODxwmntRDGkEU tOddq6EDaGbHXvEK1NzO35as9db1Pajfx1xseqoZdklnKDnWZIcgZQvbjhT0tZB5F0Kgpd a5L8yKb6KlcDxyH2KvE9vhrACaLN1LDTu5g0RR81TqDLIPr+PDbMoXMJpingTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682976530; a=rsa-sha256; cv=none; b=a5WVMdinTHmR67U4FRFbd42Ap4B+mpuiEfgP5sEWo5UvqegN+/s8j3FHoavIEF0hgIgPM/ DENarxo2bzzycGpuHSmk+mB/G2MvNZPUrVRNNVgsN1gqFJ1K/4313onKklNQT6Byerhb8t acM9W8Kf90fX/jHxZstlQVk8xwNzSy/AqtOLcvwxcosqCSc2n8uktMvy8k4v3sb2et5gO6 v6g+3vpi0aglOCFAs9HyTQyWAMIdqF8B8XzwBNVTXzKuoTRhDWwWXbIIv0mjvR74SBkCkn k4rzrSyRtq4/l5iNUIqLlIxfMFEwooOwq+lIXj/wk1hxYF7MdPI8rDg0EvZb/g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9GYG36fczMKL; Mon, 1 May 2023 21:28:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341LSojk085920; Mon, 1 May 2023 21:28:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341LSono085919; Mon, 1 May 2023 21:28:50 GMT (envelope-from git) Date: Mon, 1 May 2023 21:28:50 GMT Message-Id: <202305012128.341LSono085919@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: a083d0867635 - main - kboot: Add smbios support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a083d086763594a7072b11fd9ef0553c6466da34 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a083d086763594a7072b11fd9ef0553c6466da34 commit a083d086763594a7072b11fd9ef0553c6466da34 Author: Warner Losh AuthorDate: 2023-05-01 21:12:29 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:12:29 +0000 kboot: Add smbios support Add support for getting smbios from /sys/firmware/efi/systab, if any. Add ptov mapping that uses mmap on /dev/mem to do the mapping with 64k pages (usually we only need 1 or two mappings). Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D39792 --- stand/kboot/main.c | 107 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 106 insertions(+), 1 deletion(-) diff --git a/stand/kboot/main.c b/stand/kboot/main.c index ecf96cc73d4d..c8c49067bcc7 100644 --- a/stand/kboot/main.c +++ b/stand/kboot/main.c @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include "host_syscall.h" #include "kboot.h" #include "stand.h" +#include struct arch_switch archsw; extern void *_end; @@ -195,6 +196,107 @@ has_acpi(void) return rsdp != 0; } +/* + * SMBIOS support. We map the physical memory address we get into a VA in this + * address space with mmap with 64k pages. Once we're done, we cleanup any + * mappings we made. + */ + +#define MAX_MAP 10 +#define PAGE (64<<10) + +static struct mapping +{ + uintptr_t pa; + caddr_t va; +} map[MAX_MAP]; +static int smbios_fd; +static int nmap; + +caddr_t ptov(uintptr_t pa) +{ + caddr_t va; + uintptr_t pa2; + struct mapping *m = map; + + pa2 = rounddown(pa, PAGE); + for (int i = 0; i < nmap; i++, m++) { + if (m->pa == pa2) { + return (m->va + pa - m->pa); + } + } + if (nmap == MAX_MAP) + panic("Too many maps for smbios"); + + /* + * host_mmap returns small negative numbers on errors, can't return an + * error here, so we have to panic. The Linux wrapper will set errno + * based on this and then return HOST_MAP_FAILED. Since we're calling + * the raw system call we have to do that ourselves. + */ + va = host_mmap(0, PAGE, HOST_PROT_READ, HOST_MAP_SHARED, smbios_fd, pa2); + if ((intptr_t)va < 0 && (intptr_t)va >= -511) + panic("smbios mmap offset %#jx failed", (uintmax_t)pa2); + m = &map[nmap++]; + m->pa = pa2; + m->va = va; + return (m->va + pa - m->pa); +} + +static void +smbios_cleanup(void) +{ + for (int i = 0; i < nmap; i++) { + host_munmap(map[i].va, PAGE); + } +} + +static vm_offset_t +kboot_find_smbios(void) +{ + char buffer[512 + 1]; + char *walker, *ep; + + if (!file2str("/sys/firmware/efi/systab", buffer, sizeof(buffer))) + return (0); /* Not an EFI system */ + ep = buffer + strlen(buffer); + walker = buffer; + while (walker <= ep) { + if (strncmp("SMBIOS3=", walker, 8) == 0) + return((vm_offset_t)strtoull(walker + 8, NULL, 0)); + if (strncmp("SMBIOS=", walker, 7) == 0) + return((vm_offset_t)strtoull(walker + 7, NULL, 0)); + walker += strcspn(walker, "\n") + 1; + } + return (0); +} + +static void +find_smbios(void) +{ + char buf[40]; + uintptr_t pa; + caddr_t va; + + pa = kboot_find_smbios(); + printf("SMBIOS at %#jx\n", (uintmax_t)pa); + if (pa == 0) + return; + + snprintf(buf, sizeof(buf), "%#jx", (uintmax_t)pa); + setenv("hint.smbios.0.mem", buf, 1); + smbios_fd = host_open("/dev/mem", O_RDONLY, 0); + if (smbios_fd < 0) { + printf("Can't open /dev/mem to read smbios\n"); + return; + } + va = ptov(pa); + printf("Start of smbios at pa %p va %p\n", (void *)pa, va); + smbios_detect(va); + smbios_cleanup(); + host_close(smbios_fd); +} + static void parse_file(const char *fn) { @@ -300,6 +402,8 @@ main(int argc, const char **argv) */ find_acpi(); + find_smbios(); + interact(); /* doesn't return */ return (0); @@ -531,5 +635,6 @@ command_fdt(int argc, char *argv[]) return (command_fdt_internal(argc, argv)); } - + COMMAND_SET(fdt, "fdt", "flattened device tree handling", command_fdt); + From nobody Mon May 1 21:28:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9GYJ1360z492VS; Mon, 1 May 2023 21:28: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 4Q9GYH547wz3k3X; Mon, 1 May 2023 21:28:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682976531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7tW3QgpM1XRy1VVgPvmOdCvPZ/snqfLvv8MHZg5196s=; b=SOSAADGL28035vwC4UfEqZgGJDgr2QPuqGiAqlFyqg+XUozBzoHWrrUscvG320btGPC7UB dz6rMHxFxHIea20FjR81WA+7ZrMdbJ7uVNR94oyG1VmC86MgRRYJtjZ35RzLT26XPIzngZ 9IPETFrXPMPVyQGSE7HwPiBdQxQyJjFrJuUWBYCHOJD+Zb9vLkFNKMAJQla4WgPPQv1y8j 74q44BowL/5rpspk1Vj+NiHx2IitFWDcO68ME3CLXsKXX3Mo8qozghzXNl9m70Vwz6gapd QhyaLBpyc/fg0Scfw0bG0v5fgzY9IM1hc2yN6GZT7VC4aMgDyxhxf4vWUjU+xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682976531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7tW3QgpM1XRy1VVgPvmOdCvPZ/snqfLvv8MHZg5196s=; b=HtS+B/VdawvaMAL8/qtTR8ODYKTbLH5u2aCvquc9dR3Y9XHAEq62KseUUdpxIL+eGcpo90 JLrKeB7cqMvVa3j+BimKaKID9iVhAvha8EHk1n55iaua0zpPUNFLPsK7jbVIR0/vBey5au cDWcAfBp0q1P4ZtJTfeYOv2dfi8er2z74vQ/CD+G1bzFW3IbinY2fpLr0V7wStND4UWq0n Fqrlo8diK/bnkIzVCoQrkqIUYc+yuhpNYkifYjKvJJ2EaOx9rvCNY/YQbm9xMtMy8xVIxU QC7xed18DuJFoO/uogHYQVoGlGnj2W2UiHzoTkTcVfNqK3yMdw7+LywuJEJs7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682976531; a=rsa-sha256; cv=none; b=lUyoIku5yabuIamRRtvWDBr0IwFHnMyIqY+dvMPxB3AhZE1oMUjaIeRuhj8gYRBRL0YAEV WPKcpIMNmNY+GeCrNcFijOaMrbRvlbt5mlZO5Rw4F1qukvpuovXvYaozROLaz5WN59KuGZ Q5aKbQ1BAgrwFdkGiCo7tXh+3Qo+yweAVVpwG/4zdf+35wwVBJKE5LJNt4+VjFKZM4CLIr w21vANvBfTCyR+T5u8i+B6mhmOt5Zc/6U0MEYHAT0a0ZI5NXugiAhoWFvB7UkF8HelKZQG 12jqMudIMAZhyhOzeDLEmeZVDsafvkl/9yCVRJNEIQkqt7eLRjv0Her/Al3lUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9GYH42zDzM0M; Mon, 1 May 2023 21:28:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341LSpex085939; Mon, 1 May 2023 21:28:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341LSpEB085938; Mon, 1 May 2023 21:28:51 GMT (envelope-from git) Date: Mon, 1 May 2023 21:28:51 GMT Message-Id: <202305012128.341LSpEB085938@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: c5e433b99ed3 - main - stand: Avoid unaligned access in smbios code List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c5e433b99ed3ddef0eb4fa937f38c34d4a3c4ae0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c5e433b99ed3ddef0eb4fa937f38c34d4a3c4ae0 commit c5e433b99ed3ddef0eb4fa937f38c34d4a3c4ae0 Author: Warner Losh AuthorDate: 2023-05-01 21:12:34 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:12:34 +0000 stand: Avoid unaligned access in smbios code This code was written on x86 where unaligned accesses were easy. LinuxBoot running on aarch64 uses mmap of /dev/mem to read the smbios table. Linux's mapping of this memory doesn't allow the normal unaligned fixup, so we get a bus error instead. We can't use the more natural le16dec and friends because they optimize into a single, unaligned memory load. We don't see this issue on aarch64 UEFI because memory is mapped such that unaligned accesses are fixed up. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D39793 --- stand/libsa/smbios.c | 47 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/stand/libsa/smbios.c b/stand/libsa/smbios.c index 657e1635e6e1..a88d3ac4ab69 100644 --- a/stand/libsa/smbios.c +++ b/stand/libsa/smbios.c @@ -96,10 +96,47 @@ __FBSDID("$FreeBSD$"); #define SMBIOS3_SIG "_SM3_" #define SMBIOS_DMI_SIG "_DMI_" -#define SMBIOS_GET8(base, off) (*(uint8_t *)((base) + (off))) -#define SMBIOS_GET16(base, off) (*(uint16_t *)((base) + (off))) -#define SMBIOS_GET32(base, off) (*(uint32_t *)((base) + (off))) -#define SMBIOS_GET64(base, off) (*(uint64_t *)((base) + (off))) +/* + * 5.1 General + *... + * NOTE The Entry Point Structure and all SMBIOS structures assume a + * little-endian ordering convention... + * ... + * + * We use memcpy to avoid unaligned access to memory. To normal memory, this is + * fine, but the memory we are using might be mmap'd /dev/mem which under Linux + * on aarch64 doesn't allow unaligned access. leXdec and friends can't be used + * because those can optimize to an unaligned load (which often is fine, but not + * for mmap'd /dev/mem which has special memory attributes). + */ +static inline uint8_t SMBIOS_GET8(const caddr_t base, int off) { return (base[off]); } + +static inline uint16_t +SMBIOS_GET16(const caddr_t base, int off) +{ + uint16_t v; + + memcpy(&v, base + off, sizeof(v)); + return (le16toh(v)); +} + +static inline uint32_t +SMBIOS_GET32(const caddr_t base, int off) +{ + uint32_t v; + + memcpy(&v, base + off, sizeof(v)); + return (le32toh(v)); +} + +static inline uint64_t +SMBIOS_GET64(const caddr_t base, int off) +{ + uint64_t v; + + memcpy(&v, base + off, sizeof(v)); + return (le64toh(v)); +} #define SMBIOS_GETLEN(base) SMBIOS_GET8(base, 0x01) #define SMBIOS_GETSTR(base) ((base) + SMBIOS_GETLEN(base)) @@ -195,7 +232,7 @@ smbios_setenv(const char *name, caddr_t addr, const int offset) #define UUID_TYPE uint32_t #define UUID_STEP sizeof(UUID_TYPE) #define UUID_ALL_BITS (UUID_SIZE / UUID_STEP) -#define UUID_GET(base, off) (*(UUID_TYPE *)((base) + (off))) +#define UUID_GET(base, off) SMBIOS_GET32(base, off) static void smbios_setuuid(const char *name, const caddr_t addr, const int ver __unused) From nobody Mon May 1 21:28:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9GYJ6Hnjz492XB; Mon, 1 May 2023 21:28: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 4Q9GYJ5hp7z3kBt; Mon, 1 May 2023 21:28:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682976532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yb8ykKk+3NSbK8koskW5nDBOoGnrjmcMN8FxQEh5ksc=; b=IL2V64kaa4ITqGSsUp4Gyv+KLyT2HcfXpG/kqAlGjhQrjP9PXWHUkbfwpo7Itrfyjrz2na vOAj06F8Ql7ZyjUAjLCMvKDh937AAsOOk0zs1GeahATML2wTs9VkPgHxP0qQtaq/FkFxAY psIYthrd4iOGqnb/iXS2fupJei8dG63XSwhMU4NDhzsAmKAzZCW2GAIvSByv1ehLBT34ji qQCzLrRK14QcHppu3d5om0BgBdbzXhdsmnzL+yGY3KD6142TPKWZqw+SRAYi3rXMJ9uO9+ NTZ8BLwKBtdvpn8Le/5bTttB8A3A4z1Nq9lXRh0UqMaCBdZI2Bq4n9kfcENPJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682976532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yb8ykKk+3NSbK8koskW5nDBOoGnrjmcMN8FxQEh5ksc=; b=FbuLBanGllTRr81+AD4xxIC7dQ9j2yd/HCdHB0VJVnUc9MO2ozF3jw7wsJqE94wbty3xFv dbAPzYVgZBmh/rucdoBTi9YjIjbvfZGOfhDNu8CE4t9KTIEh+2JzB46I4PY88JqHuvKR/F TwnOHowulGrMQCHJLXEXlJiZyJfNAB3L5Dn53ThVr7cePZvWlsHIA/3nX/Uznr8NUPiRrl MgUdXL5YSlxZS8cw9HgBgzf5ziC41aIiPYqkZpV4Up3Bp3Qfuv2up2jEjrGIGCsAnnU/dI ikiFhfq+7o76Gc909UhxrF9IJmEy/ob7Gr6SwSdF1dz1pkiPbYydSGQV4Y7YLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682976532; a=rsa-sha256; cv=none; b=vB8Y4vp8RMFIbOtyw02gnv83Tw9bE7HokoyV1fcAJCvQq9tGWzggF5LzPWOvZ79ln+d2zJ 3iP8pw8L3t7LOHp3TJ/u5EgtMNzrbiwioH+zM89yYtkMpC63Fd5nbXXMKaNb8EwFF24zpL FBE5MHKSnW5bls9MYbNxPGuyOgzQ+UKZCJXu3uBUOcoQWFXRlMyr3LGiE4O6/+sbK8kenR V0c1w6de1ONpzBslR/H9M7VwH5EehzMI/9ZPA943lnTIuHlodUpYFVNXgAL0tCROvuqiL0 1b3eq449RY0IXLB063mdmfVcv1oW9wrpXzmULg9Rjc4aPHS1hb2eygjmaLFo9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9GYJ4kN2zMJZ; Mon, 1 May 2023 21:28:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 341LSqkO085958; Mon, 1 May 2023 21:28:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 341LSqiM085957; Mon, 1 May 2023 21:28:52 GMT (envelope-from git) Date: Mon, 1 May 2023 21:28:52 GMT Message-Id: <202305012128.341LSqiM085957@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: a5b4ec528192 - main - stand: More protection against malformed smbios tables List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a5b4ec5281929a9b7ef4a8005bb4b0035322e922 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a5b4ec5281929a9b7ef4a8005bb4b0035322e922 commit a5b4ec5281929a9b7ef4a8005bb4b0035322e922 Author: Warner Losh AuthorDate: 2023-05-01 21:12:41 +0000 Commit: Warner Losh CommitDate: 2023-05-01 21:12:41 +0000 stand: More protection against malformed smbios tables Add some more sanity checks to make sure we don't march off the end of the table. Typically, smbios structures are well formed, or Windows wouldn't boot. Sometimes they aren't, and this at least fails safe. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D39794 --- stand/libsa/smbios.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/stand/libsa/smbios.c b/stand/libsa/smbios.c index a88d3ac4ab69..01083fdfd756 100644 --- a/stand/libsa/smbios.c +++ b/stand/libsa/smbios.c @@ -520,19 +520,23 @@ smbios_find_struct(int type) { caddr_t dmi; size_t i; + caddr_t ep; if (smbios.addr == NULL) return (NULL); + ep = smbios.addr + smbios.length; for (dmi = smbios.addr, i = 0; - dmi < smbios.addr + smbios.length && i < smbios.count; i++) { - if (SMBIOS_GET8(dmi, 0) == type) + dmi < ep && i < smbios.count; i++) { + if (SMBIOS_GET8(dmi, 0) == type) { return dmi; + } /* Find structure terminator. */ dmi = SMBIOS_GETSTR(dmi); - while (SMBIOS_GET16(dmi, 0) != 0) + while (SMBIOS_GET16(dmi, 0) != 0 && dmi < ep) { dmi++; - dmi += 2; + } + dmi += 2; /* For checksum */ } return (NULL); From nobody Mon May 1 22:11:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9HW26HG4z494by; Mon, 1 May 2023 22:11:58 +0000 (UTC) (envelope-from dim@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 4Q9HW25rvNz3nsq; Mon, 1 May 2023 22:11:58 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682979118; 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=iirxyIiCrm77DSD3YVatS+WXkJbuWLhKEXDibH6i5yc=; b=SBGqehFg5WDM4DqoQBvCHUmGJOJP+9EyynNSv9eB/GLR/b1VRdM2GtL4SLc19lB/o9ICPN M7Dfhhp0oqTV7jp0AiTYG69/g5tDe9i7hkiIq/C/76rDqn2v3ohZMs1ZwY8WpOxoa6nydB mN6ABgEOFIkFRrVBycSexQfEQw1Rv0F/vftgnK7IJWg7s9Famr2yeAp4zZxW0UXHaSZ5tH 4Dg2zAa3kQqTiWREcN7r9yvDOBylu6h1Ipo4OTmxb/7v3W+E0FZ1eUadV0CI1jfJ9zAjPV QiwmgCQpKMT/OmDFONGJT1AnkYD9d7YoFCvGFD0eXlIU2nuIbqWoTO+GLwCUyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682979118; 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=iirxyIiCrm77DSD3YVatS+WXkJbuWLhKEXDibH6i5yc=; b=WmSr2F5Zt/odct1Y4e6QGTY7ZMNoEeYyW6BZsOY7JCfyxX9vqO9KMO5Ak9Ekb1duVnJx3b 5nr0/XEL4BOgRfatPsYtCGOCKkMF3friBoqowk8RU93BWT9ot/0tREM/6j004GxzJEPANk CBK1KJCWGlY79afIe8tbqyS6kMSYoPM60VKIRbW/Nr+jGXfRgL5OVY4jaEQ2ivJNLNSniu 6QzBcLJ7Ar06MsLvXP9IGRlTHUMICYHQ20mWUhPhAcctHiobZzi/X2EJb0hmtc4KedULnC 2HWuzz6lZS5vtMgDAZDfqs83Hm+4ribFe9PrD6Zoq+Z50fdpKmXAytaKxjlaKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682979118; a=rsa-sha256; cv=none; b=aAZ9QtHHN0pgsAnHAJS6q5LtBOIXfpnNojb9IVAr0R2vT5cHbRn1DwUQPvhYklorEGappa YTu1CQUGDhPNgs+EyZAGQtxz1kbsrsavSehj3rnhEBUwSRN6VfFKCz9jHJ2+paZY9BaA7+ kL12LYE1cUjNO12F7FqpbmejJjnUd34AjYags3vS1AXLFfqLde+g/Zy54iI86d6hMDFpdR f4L8VVyv8Jq4tRhmPq9AO2jho+VSDcUv5Ctu0xXFsQtvXTsp7RHIpmiLw7MhRschZjWeji RV7+XiXBoTBykgNwDqYhsjoL4mEwKu/ZXsqauoWIcp37e9/OH6Uvf9xRoYbxlA== Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "tensor.andric.com", Issuer "R3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q9HW24Ctszwkm; Mon, 1 May 2023 22:11:58 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (longrow.home.andric.com [192.168.0.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 6E9356EE6F; Tue, 2 May 2023 00:11:57 +0200 (CEST) Content-Type: multipart/signed; boundary="Apple-Mail=_8AAB2DF7-0578-4C2A-A09B-84677789D39C"; protocol="application/pgp-signature"; micalg=pgp-sha1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) Subject: Re: git: 060699e91369 - stable/13 - Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6 From: Dimitry Andric In-Reply-To: Date: Tue, 2 May 2023 00:11:40 +0200 Cc: John Baldwin , Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Message-Id: <331B50E9-A7F9-4BCF-90BD-EA1E69A8F1ED@FreeBSD.org> References: <202304092135.339LZMeJ081640@gitrepo.freebsd.org> <76DD2CB9-986B-4349-8F46-3B7BF63EB315@FreeBSD.org> To: "Jason A. Harmening" X-Mailer: Apple Mail (2.3731.500.231) X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_8AAB2DF7-0578-4C2A-A09B-84677789D39C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 1 May 2023, at 21:33, Jason A. Harmening wrote: >=20 > On Mon, May 01, 2023 at 08:41:32PM +0200, Dimitry Andric wrote: >> On 1 May 2023, at 18:14, John Baldwin wrote: >>>=20 >>> On 4/30/23 8:31 PM, Jason A. Harmening wrote: >>>> On Sun, Apr 30, 2023 at 07:34:45PM -0500, Jason A. Harmening wrote: >>>>> On Sun, Apr 30, 2023 at 06:47:13PM -0500, Jason A. Harmening = wrote: >>>>>> On Sun, Apr 30, 2023 at 08:09:16AM +0300, Konstantin Belousov = wrote: >>>>>>> On Sat, Apr 29, 2023 at 02:27:50PM -0500, Jason A. Harmening = wrote: >>>>>>>> On Sat, Apr 29, 2023 at 08:49:28PM +0200, Dimitry Andric wrote: >>>>>>>>> On 29 Apr 2023, at 20:33, Jason A. Harmening = wrote: >>>>>>>>>>=20 >>>>>>>>>> On Sun, Apr 09, 2023 at 09:35:22PM +0000, Dimitry Andric = wrote: >>>>>>>>>>> The branch stable/13 has been updated by dim: >>>>>>>>>>>=20 >>>>>>>>>>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D060699e9136975d51d3f726b9785bdba= c9a62ba6 >>>>>>>>>>>=20 >>>>>>>>>>> commit 060699e9136975d51d3f726b9785bdbac9a62ba6 >>>>>>>>>>> Author: Dimitry Andric >>>>>>>>>>> AuthorDate: 2023-01-14 16:33:24 +0000 >>>>>>>>>>> Commit: Dimitry Andric >>>>>>>>>>> CommitDate: 2023-04-09 14:54:52 +0000 >>>>>>>>>>>=20 >>>>>>>>>>> Merge llvm-project release/15.x = llvmorg-15.0.7-0-g8dfdcc7b7bf6 >>>>>>>>>>>=20 >>>>>>>>>>> This updates llvm, clang, compiler-rt, libc++, libunwind, = lld, lldb and >>>>>>>>>>> openmp to llvmorg-15.0.7-0-g8dfdcc7b7bf6. >>>>>>>>>>>=20 >>>>>>>>>>> PR: 265425 >>>>>>>>>>> MFC after: 2 weeks >>>>>>>>>>=20 >>>>>>>>>> This MFC of llvm15 appears to have completely broken the = Intel IOMMU >>>>>>>>>> driver on my stable/13 machine. After this series of = commits, any >>>>>>>>>> downstream DMA seems to produce an IOMMU translation fault, = which >>>>>>>>>> renders the machine completely unusable: no nvme boot disk, = no usb >>>>>>>>>> keyboard, etc. >>>>>>>>>>=20 >>>>>>>>>> The faults I see look something like this: >>>>>>>>>>=20 >>>>>>>>>> DMAR4: ahci0: pci0:17:5 sid 8d fault acc 0 adt 0x0 reason 0x3 = addr 26000 >>>>>>>>>>=20 >>>>>>>>>> It's a bit surprising to see a toolchain upgrade produce = breakage like >>>>>>>>>> this, but that's what git bisect clearly tells me. I wonder = if some of >>>>>>>>>> the IOMMU control structures might be defined as C bitfields = and the new >>>>>>>>>> compiler is emitting them differently? Also, was any = breakage like this >>>>>>>>>> observed when -current was upgraded to llvm15 several months = ago? >>>>>>>>>=20 >>>>>>>>> I haven't heard anything about such breakage, no. >>>>>>>>>=20 >>>>>>>>>=20 >>>>>>>>>> More generally, this is the second time in as many months = I've had to >>>>>>>>>> deal with IOMMU breakage on -stable. I can't imagine I'm the = only >>>>>>>>>> person who sees value in running with DMA remapping enabled; = do we need >>>>>>>>>> a dedicated DMAR-enabled machine in the cluster to smoke-test = changes >>>>>>>>>> like this? More generally, should we avoid MFCing high-risk = changes >>>>>>>>>> like this? >>>>>>>>>=20 >>>>>>>>> Since there were very few bug reports, it was not deemed high = risk. >>>>>>>>>=20 >>>>>>>>> In any case, it would be good to get the bottom of what is = causing the >>>>>>>>> problem, so is there any way you can isolate which code seems = to be >>>>>>>>> going "bad"? >>>>>>>>>=20 >>>>>>>>> For example, if this problem affects code in sys/dev/iommu, is = there >>>>>>>>> some way you can compile that part with -O1, or with an older = version >>>>>>>>> of clang (from ports), to see if the problem goes away? >>>>>>>>=20 >>>>>>>> I did try removing all custom make.conf settings (previously I = just had >>>>>>>> CPUTYPE?=3Dicelake-server), but that didn't change the = behavior. >>>>>>>>=20 >>>>>>>> Before I try further build tweaks, I'd like to ask if the IOMMU = fault >>>>>>>> report can provide guidance here? AFAICT all the faults I'm = getting >>>>>>>> show "reason 0x3". If I'm reading the VT-d spec correctly, = FR=3D0x3 >>>>>>>> indicates an invalid context entry, in other words there's = something the >>>>>>>> hardware doesn't like in the way the address width or pagetable = base is >>>>>>>> configured for the PCIe requestor. >>>>>>>=20 >>>>>>> I would start looking at the other direction: might be, there = are still some >>>>>>> left shifts for int32 values with the shift count > 30, or = uint32 with the >>>>>>> count > 31. >>>>>>>=20 >>>>>>> Also might be useful to dump each context entry on creation, it = is kept >>>>>>> constant after. >>>>>>=20 >>>>>> I did look over the constants in intel_reg.h, and didn't see = anything >>>>>> that looked as though it would be susceptible to sign-extension = or >>>>>> truncation bugs. In the failing case it's much easier for me to = catch >>>>>> the fault messages than any initialization message, so I = instrumented >>>>>> the fault handler to get the context entry from the dmar_ctx = object >>>>>> using the same logic as dmar_map_ctx_entry(), and then dump out = the ctx1 >>>>>> and ctx2 fields. What I see are messages like: >>>>>>=20 >>>>>> ... ctx1 0x10013b001 ctx2 0x103 >>>>>>=20 >>>>>> At first glance these "look right": the P bit is set in ctx1, and = the >>>>>> rest of the field looks like a valid physical address. ctx2 also >>>>>> doesn't have any of the reserved bits set, but in all cases it = does have >>>>>> AW=3D3, which would indicate 57-bit AGAW. But when I boot the = last >>>>>> working kernel, from the revision prior to the llvm15 MFC, I see = this in >>>>>> dmesg: >>>>>>=20 >>>>>> ahci0: dmar4 pci0:0:17:5 rid 8d domain 1 mgaw 48 agaw 48 = re-mapped >>>>>>=20 >>>>>> ...all reported devices show 48-bit MGAW/AGAW, so I would expect = ctx2 to >>>>>> have AW=3D2. I suspect this may be the source of the fault, but = I'm not >>>>>> sure how it's getting configured that way, whether it's an issue = with >>>>>> reading the capability register or something else. >>>>>>=20 >>>>>=20 >>>>> I can confirm that hacking domain_set_agaw() to always use the = settings >>>>> from sagaw_bits[2] eliminates the faults and at least allows the = machine >>>>> to boot to single-user mode. >>>> I see what's happening now. When I added the hack to always set >>>> sagaw_bits[2], I noted that the passed-in MGAW was still 57, while >>>> unit->hw_cap had the correct value of 0x4 (=3D> 4-level paging, = 48-bit AW) >>>> in bits 12:8. The problem is that sagaw_bits has agaw=3D64 in its = last >>>> entry. This results in dmar_maxaddr2mgaw() attempting a comparison >>>> against 1ULL << 64 in the final iteration of its first loop. I = suspect >>>> the new compiler probably determines that last iteration is = meaningless >>>> and simply omits it from the (probably unrolled) loop. Since the = "loop" >>>> terminates with i < nitems(sagaw_bits), the subsequent "allow_less = ..." >>>> case doesn't execute and we end up erroneously selecting a 57-bit >>>> address width. Just commenting out that last entry in sagaw_bits = fixes >>>> the problem. >>>> So, two questions: >>>> 1) Does any VT-d hardware actually support 6-level paging? The ca. = 2021 >>>> VT-d spec I'm looking at indicates 5-level is the greatest depth >>>> supported, with everything above that being reserved. >>>> 2) I'd expect clang to try very hard to error out in a situation = like >>>> this, but I see that sys/conf/kern.mk sets = -Wno-shift-count-overflow >>>> among other things, and more of them were added for clang 15. This >>>> seems like a really bad idea, regardless of how much of a PITA it = may be >>>> to fix these warnings. >>>=20 >>> FWIW, I've been working on trying to re-enable some of the warnings = that >>> were disabled for clang 15 in main. I'll move that one higher up on = my >>> todo list. >>=20 >> In this particular case, it doesn't warn about it though. I think = KASAN >> might be a better 'catcher' for this kind of error, or a KUBSAN, if = we >> had one... >=20 > If you've tried turning all the relevant warnings/errors back on for > this code, and clang truly doesn't warn about it, then wouldn't this > warrant a bug against upstream clang? This is a situation in which = the > compiler detects a left-shift overflow, by itself at least a warning > condition, and uses it to materially alter program flow. You could try, but it will probably be classified as undefined behavior. I guess the warning will only show up in a more full-blown analyzer. I haven't tried that. -Dimitry --Apple-Mail=_8AAB2DF7-0578-4C2A-A09B-84677789D39C Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCZFA5HAAKCRCwXqMKLiCW o+hGAJ9WQT+6SV3pPcdi8c/OZWlFdkQDmQCgiybouLUiZxuGlvEul8mPjb6TzgI= =DLM8 -----END PGP SIGNATURE----- --Apple-Mail=_8AAB2DF7-0578-4C2A-A09B-84677789D39C-- From nobody Tue May 2 00:40:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9LpZ564yz48CF8; Tue, 2 May 2023 00:40: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 4Q9LpZ4cNcz3wZX; Tue, 2 May 2023 00:40:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682988038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BF+BzyWLmmlUWz5cO2/Rp4L3xjheVbIxWwZTLDjOLvo=; b=K6IIO96xR8DSJykIGBa/gQAuKXQW8ztXe5b463gYGpieXI5RKbN08UGBsURnM2r4vkQZXR bQvqI7VtlPE5g6PodNVz2iQO53la0tuyG40ySxBjmzJWh9g9p7eIKOSsPu75wiguKHhptO h6efjxvCqLGh6zJUT4xlShOlqaQwepe3me1qXGS+HTdcM7cGqFOxLzf7z6IB8uR+Jxeynp bWaIQdO4RqCUgr8y+RlHykOA+22tYIhzmOjjj21iquF8L6AEXgrH2YLCi3w3Bry8GP321R eAIQfmjhG4tORfpNZ1U4Rvhspn54iB/Mo3GEGbE9pIHGjpRpfvg07xPD47NHSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682988038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BF+BzyWLmmlUWz5cO2/Rp4L3xjheVbIxWwZTLDjOLvo=; b=REdWvCrSAdYC70Cr+wEGe17mJrKlvXfKpmFBhIuKYG1Z1Vwm86DLYWcM5vShmaURX1ZaT4 4I8gflmzLYXkMZ1Sur/eanEhTOgGwheqTJsSLg4y3+W89001/QkGSVO1I/zse6tTWWDYMv HJtTKMVsseQDvOsdPpL7+q5xORRDeQpdFHtpOh2M8kkD4zMXeVeFgC/oY3ERVAEjzAZk8z QVHoFu96kh5PunTjHqdK3j409Dp8RcNDypTPeASwd9Zbgnxlj344y4rWcrhgbf+szQBXiX hHIQQAb31TTq0bhuKOcIsl5DqgcuE9tGf67nQGmoVKU1MRtQWghMhv/h3MHp7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682988038; a=rsa-sha256; cv=none; b=OBr16ehSyPd2e3o9EDhFDvOoH7fCURLAISY0sAq5DQmvrTCJoh+D0eihA9cBQGUVzr638q BYvMI5woDImO7FjfIVPW+0IVzwyp8wdNZJdxnNll92j14aTQJq837BxkAMMAhIdCORZCPF 1ohZLgL4rE9nUqqGWqyT411E4rYuNACzLgYwRWueWU6GJbHsNK0EgDhZbda6H7i6iIe5w0 liEs5qgD9hsJIDOrksDCaAgaSeupGQUFlZiWsQt2brCY78gl3OF2EKXu6Eoo8EaTLcAGVl z3r5pvXSj2eyLZ1xDs2kx8i1DuPEgNa190RcN+ytFSbfMcaqZrE6JrVCVP6Bcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9LpZ3gfCzRrr; Tue, 2 May 2023 00:40:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3420ecc8006254; Tue, 2 May 2023 00:40:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3420ecFM006253; Tue, 2 May 2023 00:40:38 GMT (envelope-from git) Date: Tue, 2 May 2023 00:40:38 GMT Message-Id: <202305020040.3420ecFM006253@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: 0b4568e36fa6 - main - src.opts.mk: Decouple MK_INCLUDES from MK_TOOLCHAIN List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b4568e36fa622d406008e7f482821f603fedd6d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0b4568e36fa622d406008e7f482821f603fedd6d commit 0b4568e36fa622d406008e7f482821f603fedd6d Author: Ed Maste AuthorDate: 2023-05-01 20:58:42 +0000 Commit: Ed Maste CommitDate: 2023-05-02 00:33:08 +0000 src.opts.mk: Decouple MK_INCLUDES from MK_TOOLCHAIN Prior to 590461a4b89b installation of include files was controlled directly by ${MK_TOOLCHAIN}. 590461a4b89b added an INCLUDES knob defaulting to YES. Setting WITHOUT_TOOLCHAIN forced it off to retain existing behaviour. Decouple them now, as there are reasonable use cases for installing libraries and include files without a compiler or other tool chain components. Reviewed by: imp, jrtc27 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39918 --- share/mk/src.opts.mk | 1 - tools/build/options/WITHOUT_TOOLCHAIN | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 0bbb2dd6c539..c61ce50a7c4e 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -459,7 +459,6 @@ MK_LLD_BOOTSTRAP:= no .if ${MK_TOOLCHAIN} == "no" MK_CLANG:= no -MK_INCLUDES:= no MK_LLD:= no MK_LLDB:= no MK_LLVM_BINUTILS:= no diff --git a/tools/build/options/WITHOUT_TOOLCHAIN b/tools/build/options/WITHOUT_TOOLCHAIN index 57deb32a51f7..9568c0affa4f 100644 --- a/tools/build/options/WITHOUT_TOOLCHAIN +++ b/tools/build/options/WITHOUT_TOOLCHAIN @@ -1,4 +1,4 @@ .\" $FreeBSD$ -Do not install header or +Do not install programs used for program development, compilers, debuggers etc. From nobody Tue May 2 00:40:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9Lpc1LzQz48Cgp; Tue, 2 May 2023 00:40: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 4Q9Lpb58Msz3x0x; Tue, 2 May 2023 00:40:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682988039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AdX6Js+KL95v6omSvc7/dFwWNwINfHdszXL20t2eIns=; b=xB+x12c1Qj/XC/olWxAl4Ir52Q28ORrVJ92fhHcjJgCARjpUWx7VMvkYIU0xszwxb6Ct1z DJhENo5zqTE29iOOL/hgAADIz1a0ISSZ2qoOLrY8xJSZSxWOulETZy7yDSqp+YGr1MtDBJ l4lh8OJs5Qp54TwyI46OqKMwNNZ+OArEU5VItaia5Jnk9Vod8IHaY1Vu7ZRR5W8DfZlchg xoCGoPyfMAYNfcKapXEI05TKRqz0LrQKPYQpCONLZ1gsYh5ptdLzgXzgbcHa13+6ius1aZ pXQ0k6Iqk6X9QD9m3IjQ1gEWmpxbPPx+H+dVUTJuD/pgxOcWDFnnxQI/APqSjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682988039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AdX6Js+KL95v6omSvc7/dFwWNwINfHdszXL20t2eIns=; b=koiM7K2O2s3oXtHePSjCvE09xq0L7ENopjXUd3qC+lv1fSrhKI6JoH4rTLNLWtFOcxfZzV kwm3xcqOZCWGxAb0KUDH3ZIPMeAywyzrISdLAimKdgy5ccGLcfWsQzkyEgwaQxrQkaUGGY adUdaDFB/TnvhT1sdXWo6SrCc4FSqS74hlihAbrL5QV67Ym3aKJnF7ROLKwHJsbytSZ5js Xl8X4AsKe/fLzz1b+5M74c0yTHtyfb4m0jefgc62zT2ydkWUxMKU2sUXuykoEHBCJ/Kbq0 Il3APREybu/nGF0w+gE2dmpoViXbe3TafUnaOCxELd3j9Jfqlwc3hQH28wUwxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682988039; a=rsa-sha256; cv=none; b=kdPqR4f3zg0DyMgQDcASxdpFjjRDZTde/CfGTM/rZ+c9s2pcFpT+jeD1LjnTHRMJXymuEI AfCG8oLd6jVzzBUwgiXj5JajPoTRMP4ns/95hijzinhMCVrKBHb8OIj6GpctdT4OAU19E3 XHN8qNOahReCYdWcw8gsKCf0ZidRxYJOOyYint0HV7LblaRSvC3PG4ps25mviBWoGyb2hr NpmEV++uGl3nI63YcqUz5ZZWFXn8lFQ+IBxLEesKxIKG2uyqxvajqaWdkz2Fmsi5rxZ62T PRjhVU8Pj8s4heyz3TfgEc7h/cSQ3mqXz0Tkg6k0tBan1MUy9yWI08lfyNyIbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9Lpb4DlszRdJ; Tue, 2 May 2023 00:40:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3420edag006273; Tue, 2 May 2023 00:40:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3420edSh006272; Tue, 2 May 2023 00:40:39 GMT (envelope-from git) Date: Tue, 2 May 2023 00:40:39 GMT Message-Id: <202305020040.3420edSh006272@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: 83d5725005c5 - main - src.conf.5: regen after MK_TOOLCHAIN / MK_INCLUDES decoupling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 83d5725005c5186110fd28627d6c363c91320393 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=83d5725005c5186110fd28627d6c363c91320393 commit 83d5725005c5186110fd28627d6c363c91320393 Author: Ed Maste AuthorDate: 2023-05-02 00:39:30 +0000 Commit: Ed Maste CommitDate: 2023-05-02 00:39:30 +0000 src.conf.5: regen after MK_TOOLCHAIN / MK_INCLUDES decoupling --- share/man/man5/src.conf.5 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 2c625e50eba5..5a1bb730f957 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd April 28, 2023 +.Dd May 1, 2023 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1671,7 +1671,7 @@ Do not build or install and .Xr tftpd 8 . .It Va WITHOUT_TOOLCHAIN -Do not install header or +Do not install programs used for program development, compilers, debuggers etc. When set, it enforces these options: @@ -1686,8 +1686,6 @@ When set, it enforces these options: .It .Va WITHOUT_CLANG_FULL .It -.Va WITHOUT_INCLUDES -.It .Va WITHOUT_LLD .It .Va WITHOUT_LLDB From nobody Tue May 2 03:44:36 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9Qtr3RsXz48NmM for ; Tue, 2 May 2023 03: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 4Q9Qtr3214z4DgY; Tue, 2 May 2023 03:44:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682999076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GIgtBtjp+T036zut6UxIuPbrUURZ1cKkPbIwTKzbWEI=; b=PMhLiD3hvXsMpIa2D1D/wDvJCpB5SMVdSvJERxRJxpvtwZFQKjPXLEqObD8JBBeEbqwZmx qjZ8sAT1TsAy1GvtozOcpOEBtpnidY8xXh2kiZA5nWMJxUsAt8IrJZLujTjzzHVIiYRK0W Q/0gCGTOWFp+JW6TVPlHaW35akbwwpNU1aEa6CMyVl6UnONohuZ54LH2bap4vkBZjNkbEF TU9yUC93a9mNs3nz3aWszaXZhIPv4haXuZDPPU3nn/hq/R+n0Yl91HP3z/JtfX9yOENP5z OqK8SfPzzyz/x32ravxjdYrQkbFTUSapkKLduq/rG7/VrZ6X2UISAyI2ljkNEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682999076; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GIgtBtjp+T036zut6UxIuPbrUURZ1cKkPbIwTKzbWEI=; b=K39IuhOwxEuidQ4Krx8zzHXMe9xBvvaAwE3UOo5VP3ZcWqoyUT2LhIq7H4oMcrXtDg1h1Q +nNXHkBf2Cjb5ZZWBHudmUJqHBjPFL2Lz0+xtulLX7CvQfDmtvjMSOdf3KCtp/jSayoVLb U/L6H17GTAAOx2qX8g3z0PRKA7ZL20DjxN08R9Qb20cORGtyabaMvzyImfKjCexZ1KHwYq Z0wWrzNK4eIwtRu7aaWqQCQkTk9RxJruhH5NFCUgmbrk4bP0XiUHCekHGO8QwXZWd50XBw shxeQSPVo+zAqANxj1ZVYUS0xazLuGm34slfoFNaWwDeOCkY9ROeqmVAXPbbQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682999076; a=rsa-sha256; cv=none; b=QqQNEAr8TudSutUcY3wr5q9ZqcDwDd5Y3Pw3rJsJg/kn42db+fMVgNzF0OJRAfmIP1kwvG lzXYH2Dv+uNk+lOtL/2n+Iwk3SSzhEvmpk1/9oPyHqhuOTYd1FRZXSHAbP/slYwFruHt07 V2BhaxlcwnPVInaScjrifOLIqTxJlGjfjVYl77pytXSMsIy3iVYRFFqXhctNaWP56A/emZ aj+9SVFORjCq+JFTo5BV4w8NOpvVLbMl4v38WxznAko5iUOy9gKzApsaAws6PAFS8hgxkF iLSmpXy0hLyu8+DbE+CEZSyszP92D9D1xKlW+vwJ9bmpsJOTcnuZcHr8PnP32g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9Qtr1qCSzY09; Tue, 2 May 2023 03:44:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3423ia4L013801; Tue, 2 May 2023 03:44:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3423iasU013800; Tue, 2 May 2023 03:44:36 GMT (envelope-from git) Date: Tue, 2 May 2023 03:44:36 GMT Message-Id: <202305020344.3423iasU013800@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Xin LI Subject: git: 2b6624fffa5f..159d764c1668 - vendor/less - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/vendor/less X-Git-Reftype: branch X-Git-Commit: 159d764c16684166cab1428d7aebd0c0f3666cd3 X-Git-Oldrev: 2b6624fffa5fac26d860898ddb335f852cfeb6b5 X-Git-Newrev: 159d764c16684166cab1428d7aebd0c0f3666cd3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch vendor/less has been updated by delphij: URL: https://cgit.FreeBSD.org/src/log/?id=2b6624fffa5f..159d764c1668 159d764c1668 Vendor import of less v632. From nobody Tue May 2 03:44:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9QvC4FsPz48P7T for ; Tue, 2 May 2023 03:44:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9QvC3mS5z4Dtt; Tue, 2 May 2023 03:44:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682999095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VE1HFstUqnINE5uS6fBh1b/jk7+Y8TEHHW3Qsz8k53E=; b=dSEhTl/TIumx+akd0PYioSYuhxBgD8wo1lQDW+8rMoHKU+aB8Udi6M2KSO1aEuy80tL44U IfmFB0s3X7gkGQi0fPvncn0ElDxebm2ypQfX/apkyeVSFnUTUpfFcNV1oV14vIppQoWEyj cleQKKS47gQvpWw2YCCLYPnw5Pdkpf+2RefvxWRTz3m7s+CVlaAaw37lmuk+Ja2KFpefSi 67DiuntCaAics4wdbrwGWj1qjKv8N+coCDdXsV2hXlMuS87ngzDxtQ8fdfAWfhZD0hMnuq LO+SB0Rt50FNK4YbmxB1Rkam5vaVaCUh0yVPDfiLeHD69SBqfnDfhKYZli/6uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682999095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VE1HFstUqnINE5uS6fBh1b/jk7+Y8TEHHW3Qsz8k53E=; b=h4cUduSmxe7YuKLeBdzrjCQxmOb5hbpBnAoEy7GCS9IkHHS6kaDJ+inVh3qRrLK0mdkOVK Tp4vk7EmC1uik3H+ZBYcukfw8IJ3zY+nlCdVUsXss+ACGy53EZKDdKtKpK68i4v9mNl2d4 9illJEywD9adi8mKUMtE16Mc6nHErG9KSO9uaURaYUrNZlAQRpxIZiCuCwJhtTH+EYz5wE cbChHZXVafL3ZTr2YmgTRoeel1jkNbVCCPr0cDmCyuDrypXLw5sEjfkSWi74tgUYpoH5GW gQuVsmlx8GmzQDq9NcXMVRQPzeGS58OHf2ECMFp6YLE8B0VjGUZqVy+RtCDCTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682999095; a=rsa-sha256; cv=none; b=VJdr4TzRlB0xHQ/UmqvL5DmXqcQT9fR4Ppwzo408X7g3xbe7XSblNfu8C9FgHahseo6oI+ Pe+Zt5ey0U+OfiacT7f35l72SdBnIvknwRxFP+VD94XaAdaGuIdOcEbqocnbY1w8yejn+8 IarHnOmTB/Ss9hPCL/+c0fRgzbP+7FtkC3G7Wg2Eb4UTAAeo8nlojQ7BOBTpXx5VnvVgm6 JFNQeESq+P5Lpr/4J2m0I3+uHWiFmwiQnXGd1Fkk6DDoW10MXQqrgkOOf+0bn9HwdzcCJb OIm1LHZt1l8ySfomuXDgHPJlwWoqNNjMSTQFPk5JVthEHztWk7GEnOawGEfBcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9QvC2WbJzY4N; Tue, 2 May 2023 03:44:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3423itfP013925; Tue, 2 May 2023 03:44:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3423itFX013924; Tue, 2 May 2023 03:44:55 GMT (envelope-from git) Date: Tue, 2 May 2023 03:44:55 GMT Message-Id: <202305020344.3423itFX013924@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Xin LI Subject: git: 0fe70504c630 - Create tag vendor/less/v632 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/tags/vendor/less/v632 X-Git-Reftype: annotated tag X-Git-Commit: 0fe70504c63015fa63556843d8f4fbc836e2fa66 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The annotated tag vendor/less/v632 has been created by delphij: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/less/v632 tag vendor/less/v632 Tagger: Xin LI TaggerDate: 2023-05-01 08:23:46 +0000 Tag less v632. commit 159d764c16684166cab1428d7aebd0c0f3666cd3 Author: Xin LI AuthorDate: 2023-05-01 08:22:19 +0000 Commit: Xin LI CommitDate: 2023-05-01 08:22:19 +0000 Vendor import of less v632. From nobody Tue May 2 03:45:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9QvW3hJxz48NmW; Tue, 2 May 2023 03:45:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9QvW3Sl6z4FBS; Tue, 2 May 2023 03:45:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682999111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j2rFI/sga0nvdF+37PNYrAiwkV3CgpZN6HImBnh2kws=; b=SmKEDpgr3pNeFkqIIhClCwiHDnwDdc+a1fZCLnekGv0cTA6WanRNRfc4bcYsGBxDzMpiE9 f/Kv5Fz3cu0S0FIYvekNqU3qQMQ0mF5QcVAOh1wrG/8Vazmo4CgNLHEV+9nHWPptoFQM5J a80puL5vTf5MAtQ3+xFa55tfwLP9lUi4ptKL/7rubcMt2hh9Lh0IjYq6vOorImMqnmudou K5BT5lrjN32E+7C6hTggg3m2PQzGHodx9fXsLrDhbGT4aFB5XfWfOhXTDbdfbY8YdFxunC 4X8AzneGKufbWzKyggASnIzma9eQebkoBBO3oxtDdbxP6QlxHnN3H4cPY7sZQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682999111; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j2rFI/sga0nvdF+37PNYrAiwkV3CgpZN6HImBnh2kws=; b=dXmLMyHDDqavcUz6xT9u6bP5KnjSi3ToIEp31eoRxtKCvQ/5xT3kcz6lCCzRVdRx6fklaf PHVPg5TPO/+bKCGe45U1QLLlNQfwjtybZBEFyj0l/AjK4AynO0G+aJYoUANdq1IpJNJq2C 52TvYRRBoNvD9nla/PZ/8n/OM2XAh8lgGm/5AirrboLnLAdFUBokL61wOXvRZQiS1VDoB0 E7R3BNGkdYwFMS3FjTJ4uVndyCKUkLl2P8KGJdufhT0yN61uuDc3s0KFPuYp2OJ/1C+qWx dxwiEO6YiHDmU4mJtBrk2ybu8Ws3MyGh653fg1MIjYxLGhgk6mae5FNOU+JhHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682999111; a=rsa-sha256; cv=none; b=mNWncH4mJF0wH7x++yfvPnKkVOVM2tONWARGpyLXHEvFazOywrEuScRnyhYZujaQsdoWXY GfXnYWe48K3q50q2BrKALeC3W8eE8/K7uXkjoOlMtQUjnW94RLpHyhgYSq+0GrCg2gurRs Npph9wOmcdrciSu8X4KXgPWsXKBWrkHkkJB4uxnJ7YWI6AwPY5GMExHRuK/0wy7UBjrfxp h9PInnThWPL7V2I31dvcLEKlnT7m6DPs/jahiWaFn35GIpU9sU/0vXA+gr8cby7T4D7RKI 8AuLwk7doWaF9ir3KU1ApZHIC3Ido3hRq9pZZE8qMkAhNvgW3dE21P65mYACjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9QvW2WcczY0B; Tue, 2 May 2023 03:45:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3423jBh8014058; Tue, 2 May 2023 03:45:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3423jB5J014057; Tue, 2 May 2023 03:45:11 GMT (envelope-from git) Date: Tue, 2 May 2023 03:45:11 GMT Message-Id: <202305020345.3423jB5J014057@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: d713e0891ff9 - main - MFV: less v632. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d713e0891ff9ab8246245c3206851d486ecfdd37 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=d713e0891ff9ab8246245c3206851d486ecfdd37 commit d713e0891ff9ab8246245c3206851d486ecfdd37 Merge: 83d5725005c5 159d764c1668 Author: Xin LI AuthorDate: 2023-05-02 03:43:57 +0000 Commit: Xin LI CommitDate: 2023-05-02 03:43:57 +0000 MFV: less v632. MFC after: 2 weeks contrib/less/LICENSE | 2 +- contrib/less/NEWS | 79 ++++- contrib/less/brac.c | 9 +- contrib/less/ch.c | 321 ++++++++----------- contrib/less/charset.c | 234 +++++++++----- contrib/less/charset.h | 2 +- contrib/less/cmd.h | 3 +- contrib/less/cmdbuf.c | 211 +++--------- contrib/less/command.c | 200 ++++++------ contrib/less/compose.uni | 14 +- contrib/less/cvt.c | 19 +- contrib/less/decode.c | 144 ++------- contrib/less/edit.c | 357 +++++++++++++++------ contrib/less/filename.c | 137 ++++---- contrib/less/fmt.uni | 4 +- contrib/less/forwback.c | 64 +--- contrib/less/funcs.h | 748 ++++++++++++++++++++++--------------------- contrib/less/help.c | 46 ++- contrib/less/ifile.c | 118 ++----- contrib/less/input.c | 203 +++++++++--- contrib/less/jump.c | 37 +-- contrib/less/less.h | 89 +++-- contrib/less/less.hlp | 44 ++- contrib/less/less.nro | 677 ++++++++++++++++++++++++++------------- contrib/less/lessecho.c | 44 +-- contrib/less/lessecho.nro | 38 +-- contrib/less/lesskey.c | 66 ++-- contrib/less/lesskey.h | 2 +- contrib/less/lesskey.nro | 62 ++-- contrib/less/lesskey_parse.c | 111 ++----- contrib/less/lglob.h | 2 +- contrib/less/line.c | 467 ++++++++++++--------------- contrib/less/linenum.c | 53 ++- contrib/less/lsystem.c | 18 +- contrib/less/main.c | 54 ++-- contrib/less/mark.c | 84 ++--- contrib/less/mkutable | 15 +- contrib/less/optfunc.c | 314 ++++++++---------- contrib/less/option.c | 105 ++---- contrib/less/option.h | 4 +- contrib/less/opttbl.c | 116 +++++-- contrib/less/os.c | 231 +++++++------ contrib/less/output.c | 135 ++++---- contrib/less/pattern.c | 176 +++++----- contrib/less/pattern.h | 10 +- contrib/less/pckeys.h | 2 +- contrib/less/position.c | 41 +-- contrib/less/position.h | 2 +- contrib/less/prompt.c | 78 ++--- contrib/less/screen.c | 562 +++++++++++++++----------------- contrib/less/scrsize.c | 2 +- contrib/less/search.c | 370 ++++++++------------- contrib/less/signal.c | 29 +- contrib/less/tags.c | 87 ++--- contrib/less/ttyin.c | 52 +-- contrib/less/ubin.uni | 16 +- contrib/less/version.c | 31 +- contrib/less/wide.uni | 22 +- contrib/less/xbuf.c | 150 +++++++-- contrib/less/xbuf.h | 7 +- usr.bin/less/defines.h | 24 +- 61 files changed, 3721 insertions(+), 3623 deletions(-) diff --cc contrib/less/command.c index 8bd999e9f7a3,000000000000..88c0cb49ee77 mode 100644,000000..100644 --- a/contrib/less/command.c +++ b/contrib/less/command.c @@@ -1,2099 -1,0 +1,2095 @@@ +/* $FreeBSD$ */ +/* - * Copyright (C) 1984-2022 Mark Nudelman ++ * Copyright (C) 1984-2023 Mark Nudelman + * + * You may distribute under the terms of either the GNU General Public + * License or the Less License, as specified in the README file. + * + * For more information, see the README file. + */ + + +/* + * User-level command processor. + */ + +#include "less.h" +#if MSDOS_COMPILER==WIN32C +#include +#endif +#include "position.h" +#include "option.h" +#include "cmd.h" + +extern int erase_char, erase2_char, kill_char; +extern int sigs; +extern int quit_if_one_screen; ++extern int one_screen; +extern int squished; +extern int sc_width; +extern int sc_height; +extern char *kent; +extern int swindow; +extern int jump_sline; +extern int quitting; +extern int wscroll; +extern int top_scroll; +extern int ignore_eoi; +extern int secure; +extern int hshift; +extern int bs_mode; ++extern int proc_backspace; +extern int show_attn; +extern int less_is_more; +extern int status_col; +extern POSITION highest_hilite; +extern POSITION start_attnpos; +extern POSITION end_attnpos; +extern char *every_first_cmd; +extern char version[]; +extern struct scrpos initial_scrpos; +extern IFILE curr_ifile; +extern void *ml_search; +extern void *ml_examine; +extern int wheel_lines; +extern int header_lines; +extern int def_search_type; +extern int updown_match; +#if SHELL_ESCAPE || PIPEC +extern void *ml_shell; +#endif +#if EDITOR +extern char *editor; +extern char *editproto; +#endif +extern int screen_trashed; /* The screen has been overwritten */ +extern int shift_count; +extern int oldbot; +extern int forw_prompt; +extern int incr_search; ++extern int full_screen; +#if MSDOS_COMPILER==WIN32C +extern int utf_mode; +#endif + +#if SHELL_ESCAPE +static char *shellcmd = NULL; /* For holding last shell command for "!!" */ +#endif +static int mca; /* The multicharacter command (action) */ +static int search_type; /* The previous type of search */ ++static int last_search_type; /* Type of last executed search */ +static LINENUM number; /* The number typed by the user */ +static long fraction; /* The fractional part of the number */ +static struct loption *curropt; +static int opt_lower; +static int optflag; +static int optgetname; +static POSITION bottompos; +static int save_hshift; +static int save_bs_mode; ++static int save_proc_backspace; +#if PIPEC +static char pipec; +#endif + +/* Stack of ungotten chars (via ungetcc) */ +struct ungot { + struct ungot *ug_next; + LWCHAR ug_char; +}; +static struct ungot* ungot = NULL; + - static void multi_search LESSPARAMS((char *pattern, int n, int silent)); ++static void multi_search (char *pattern, int n, int silent); + +/* + * Move the cursor to start of prompt line before executing a command. + * This looks nicer if the command takes a long time before + * updating the screen. + */ - static void - cmd_exec(VOID_PARAM) ++static void cmd_exec(void) +{ + clear_attn(); + clear_bot(); + flush(); +} + +/* + * Indicate we are reading a multi-character command. + */ - static void - set_mca(action) - int action; ++static void set_mca(int action) +{ + mca = action; + clear_bot(); + clear_cmd(); +} + +/* + * Indicate we are not reading a multi-character command. + */ - static void - clear_mca(VOID_PARAM) ++static void clear_mca(void) +{ + if (mca == 0) + return; + mca = 0; +} + +/* + * Set up the display to start a new multi-character command. + */ - static void - start_mca(action, prompt, mlist, cmdflags) - int action; - constant char *prompt; - void *mlist; - int cmdflags; ++static void start_mca(int action, constant char *prompt, void *mlist, int cmdflags) +{ + set_mca(action); + cmd_putstr(prompt); + set_mlist(mlist, cmdflags); +} + - public int - in_mca(VOID_PARAM) ++public int in_mca(void) +{ + return (mca != 0 && mca != A_PREFIX); +} + +/* + * Set up the display to start a new search command. + */ - static void - mca_search1(VOID_PARAM) ++static void mca_search1(void) +{ ++ int i; ++ +#if HILITE_SEARCH + if (search_type & SRCH_FILTER) + set_mca(A_FILTER); + else +#endif + if (search_type & SRCH_FORW) + set_mca(A_F_SEARCH); + else + set_mca(A_B_SEARCH); + + if (search_type & SRCH_NO_MATCH) + cmd_putstr("Non-match "); + if (search_type & SRCH_FIRST_FILE) + cmd_putstr("First-file "); + if (search_type & SRCH_PAST_EOF) + cmd_putstr("EOF-ignore "); + if (search_type & SRCH_NO_MOVE) + cmd_putstr("Keep-pos "); + if (search_type & SRCH_NO_REGEX) + cmd_putstr("Regex-off "); + if (search_type & SRCH_WRAP) + cmd_putstr("Wrap "); ++ for (i = 1; i <= NUM_SEARCH_COLORS; i++) ++ { ++ if (search_type & SRCH_SUBSEARCH(i)) ++ { ++ char buf[8]; ++ SNPRINTF1(buf, sizeof(buf), "Sub-%d ", i); ++ cmd_putstr(buf); ++ } ++ } + +#if HILITE_SEARCH + if (search_type & SRCH_FILTER) + cmd_putstr("&/"); + else +#endif + if (search_type & SRCH_FORW) + cmd_putstr("/"); + else + cmd_putstr("?"); + forw_prompt = 0; +} + - static void - mca_search(VOID_PARAM) ++static void mca_search(void) +{ + mca_search1(); + set_mlist(ml_search, 0); +} + +/* + * Set up the display to start a new toggle-option command. + */ - static void - mca_opt_toggle(VOID_PARAM) ++static void mca_opt_toggle(void) +{ + int no_prompt; + int flag; + char *dash; + + no_prompt = (optflag & OPT_NO_PROMPT); + flag = (optflag & ~OPT_NO_PROMPT); + dash = (flag == OPT_NO_TOGGLE) ? "_" : "-"; + + set_mca(A_OPT_TOGGLE); + cmd_putstr(dash); + if (optgetname) + cmd_putstr(dash); + if (no_prompt) + cmd_putstr("(P)"); + switch (flag) + { + case OPT_UNSET: + cmd_putstr("+"); + break; + case OPT_SET: + cmd_putstr("!"); + break; + } + forw_prompt = 0; + set_mlist(NULL, 0); +} + +/* + * Execute a multicharacter command. + */ - static void - exec_mca(VOID_PARAM) ++static void exec_mca(void) +{ + char *cbuf; + + cmd_exec(); + cbuf = get_cmdbuf(); + if (cbuf == NULL) + return; + + switch (mca) + { + case A_F_SEARCH: + case A_B_SEARCH: + multi_search(cbuf, (int) number, 0); + break; +#if HILITE_SEARCH + case A_FILTER: + search_type ^= SRCH_NO_MATCH; + set_filter_pattern(cbuf, search_type); + break; +#endif + case A_FIRSTCMD: + /* + * Skip leading spaces or + signs in the string. + */ + while (*cbuf == '+' || *cbuf == ' ') + cbuf++; + if (every_first_cmd != NULL) + free(every_first_cmd); + if (*cbuf == '\0') + every_first_cmd = NULL; + else + every_first_cmd = save(cbuf); + break; + case A_OPT_TOGGLE: + toggle_option(curropt, opt_lower, cbuf, optflag); + curropt = NULL; + break; + case A_F_BRACKET: + match_brac(cbuf[0], cbuf[1], 1, (int) number); + break; + case A_B_BRACKET: + match_brac(cbuf[1], cbuf[0], 0, (int) number); + break; +#if EXAMINE + case A_EXAMINE: + if (secure) + break; + edit_list(cbuf); +#if TAGS + /* If tag structure is loaded then clean it up. */ + cleantags(); +#endif + break; +#endif +#if SHELL_ESCAPE + case A_SHELL: + /* + * !! just uses whatever is in shellcmd. + * Otherwise, copy cmdbuf to shellcmd, + * expanding any special characters ("%" or "#"). + */ + if (*cbuf != '!') + { + if (shellcmd != NULL) + free(shellcmd); + shellcmd = fexpand(cbuf); + } + + if (secure) + break; + if (shellcmd == NULL) + lsystem("", "!done"); + else + lsystem(shellcmd, "!done"); + break; ++ case A_PSHELL: ++ if (secure) ++ break; ++ lsystem(pr_expand(cbuf), "#done"); ++ break; +#endif +#if PIPEC + case A_PIPE: + if (secure) + break; + (void) pipe_mark(pipec, cbuf); + error("|done", NULL_PARG); + break; +#endif + } +} + +/* + * Is a character an erase or kill char? + */ - static int - is_erase_char(c) - int c; ++static int is_erase_char(int c) +{ + return (c == erase_char || c == erase2_char || c == kill_char); +} + +/* + * Is a character a carriage return or newline? + */ - static int - is_newline_char(c) - int c; ++static int is_newline_char(int c) +{ + return (c == '\n' || c == '\r'); +} + +/* + * Handle the first char of an option (after the initial dash). + */ - static int - mca_opt_first_char(c) - int c; ++static int mca_opt_first_char(int c) +{ + int no_prompt = (optflag & OPT_NO_PROMPT); + int flag = (optflag & ~OPT_NO_PROMPT); + if (flag == OPT_NO_TOGGLE) + { + switch (c) + { + case '_': + /* "__" = long option name. */ + optgetname = TRUE; + mca_opt_toggle(); + return (MCA_MORE); + } + } else + { + switch (c) + { + case '+': + /* "-+" = UNSET. */ + optflag = no_prompt | ((flag == OPT_UNSET) ? + OPT_TOGGLE : OPT_UNSET); + mca_opt_toggle(); + return (MCA_MORE); + case '!': + /* "-!" = SET */ + optflag = no_prompt | ((flag == OPT_SET) ? + OPT_TOGGLE : OPT_SET); + mca_opt_toggle(); + return (MCA_MORE); + case CONTROL('P'): + optflag ^= OPT_NO_PROMPT; + mca_opt_toggle(); + return (MCA_MORE); + case '-': + /* "--" = long option name. */ + optgetname = TRUE; + mca_opt_toggle(); + return (MCA_MORE); + } + } + /* Char was not handled here. */ + return (NO_MCA); +} + +/* + * Add a char to a long option name. + * See if we've got a match for an option name yet. + * If so, display the complete name and stop + * accepting chars until user hits RETURN. + */ - static int - mca_opt_nonfirst_char(c) - int c; ++static int mca_opt_nonfirst_char(int c) +{ + char *p; + char *oname; + int err; + + if (curropt != NULL) + { + /* + * Already have a match for the name. + * Don't accept anything but erase/kill. + */ + if (is_erase_char(c)) + return (MCA_DONE); + return (MCA_MORE); + } + /* + * Add char to cmd buffer and try to match + * the option name. + */ + if (cmd_char(c) == CC_QUIT) + return (MCA_DONE); + p = get_cmdbuf(); + if (p == NULL) + return (MCA_MORE); + opt_lower = ASCII_IS_LOWER(p[0]); + err = 0; + curropt = findopt_name(&p, &oname, &err); + if (curropt != NULL) + { + /* + * Got a match. + * Remember the option and + * display the full option name. + */ + cmd_reset(); + mca_opt_toggle(); + for (p = oname; *p != '\0'; p++) + { + c = *p; + if (!opt_lower && ASCII_IS_LOWER(c)) + c = ASCII_TO_UPPER(c); + if (cmd_char(c) != CC_OK) + return (MCA_DONE); + } + } else if (err != OPT_AMBIG) + { + bell(); + } + return (MCA_MORE); +} + +/* + * Handle a char of an option toggle command. + */ - static int - mca_opt_char(c) - int c; ++static int mca_opt_char(int c) +{ + PARG parg; + + /* + * This may be a short option (single char), + * or one char of a long option name, + * or one char of the option parameter. + */ + if (curropt == NULL && len_cmdbuf() == 0) + { + int ret = mca_opt_first_char(c); + if (ret != NO_MCA) + return (ret); + } + if (optgetname) + { + /* We're getting a long option name. */ + if (!is_newline_char(c) && c != '=') + return (mca_opt_nonfirst_char(c)); + if (curropt == NULL) + { + parg.p_string = get_cmdbuf(); + if (parg.p_string == NULL) + return (MCA_MORE); + error("There is no --%s option", &parg); + return (MCA_DONE); + } + optgetname = FALSE; + cmd_reset(); + } else + { + if (is_erase_char(c)) + return (NO_MCA); + if (curropt != NULL) + /* We're getting the option parameter. */ + return (NO_MCA); + curropt = findopt(c); + if (curropt == NULL) + { + parg.p_string = propt(c); + error("There is no %s option", &parg); + return (MCA_DONE); + } + opt_lower = ASCII_IS_LOWER(c); + } + /* + * If the option which was entered does not take a + * parameter, toggle the option immediately, + * so user doesn't have to hit RETURN. + */ + if ((optflag & ~OPT_NO_PROMPT) != OPT_TOGGLE || + !opt_has_param(curropt)) + { + toggle_option(curropt, opt_lower, "", optflag); + return (MCA_DONE); + } + /* + * Display a prompt appropriate for the option parameter. + */ + start_mca(A_OPT_TOGGLE, opt_prompt(curropt), (void*)NULL, 0); + return (MCA_MORE); +} + +/* + * Normalize search type. + */ - public int - norm_search_type(st) - int st; ++public int norm_search_type(int st) +{ + /* WRAP and PAST_EOF are mutually exclusive. */ + if ((st & (SRCH_PAST_EOF|SRCH_WRAP)) == (SRCH_PAST_EOF|SRCH_WRAP)) + st ^= SRCH_PAST_EOF; + return st; +} + +/* + * Handle a char of a search command. + */ - static int - mca_search_char(c) - int c; ++static int mca_search_char(int c) +{ + int flag = 0; + + /* + * Certain characters as the first char of + * the pattern have special meaning: + * ! Toggle the NO_MATCH flag + * * Toggle the PAST_EOF flag + * @ Toggle the FIRST_FILE flag + */ + if (len_cmdbuf() > 0) + return (NO_MCA); + + switch (c) + { + case '*': + if (less_is_more) + break; + case CONTROL('E'): /* ignore END of file */ + if (mca != A_FILTER) + flag = SRCH_PAST_EOF; + break; + case '@': + if (less_is_more) + break; + case CONTROL('F'): /* FIRST file */ + if (mca != A_FILTER) + flag = SRCH_FIRST_FILE; + break; + case CONTROL('K'): /* KEEP position */ + if (mca != A_FILTER) + flag = SRCH_NO_MOVE; + break; ++ case CONTROL('S'): { /* SUBSEARCH */ ++ char buf[32]; ++ SNPRINTF1(buf, sizeof(buf), "Sub-pattern (1-%d):", NUM_SEARCH_COLORS); ++ clear_bot(); ++ cmd_putstr(buf); ++ flush(); ++ c = getcc(); ++ if (c >= '1' && c <= '0'+NUM_SEARCH_COLORS) ++ flag = SRCH_SUBSEARCH(c-'0'); ++ else ++ flag = -1; /* calls mca_search() below to repaint */ ++ break; } + case CONTROL('W'): /* WRAP around */ + if (mca != A_FILTER) + flag = SRCH_WRAP; + break; + case CONTROL('R'): /* Don't use REGULAR EXPRESSIONS */ + flag = SRCH_NO_REGEX; + break; + case CONTROL('N'): /* NOT match */ + case '!': + flag = SRCH_NO_MATCH; + break; + } + + if (flag != 0) + { - search_type = norm_search_type(search_type ^ flag); ++ if (flag != -1) ++ search_type = norm_search_type(search_type ^ flag); + mca_search(); + return (MCA_MORE); + } + return (NO_MCA); +} + +/* + * Handle a character of a multi-character command. + */ - static int - mca_char(c) - int c; ++static int mca_char(int c) +{ + int ret; + + switch (mca) + { + case 0: + /* + * We're not in a multicharacter command. + */ + return (NO_MCA); + + case A_PREFIX: + /* + * In the prefix of a command. + * This not considered a multichar command + * (even tho it uses cmdbuf, etc.). + * It is handled in the commands() switch. + */ + return (NO_MCA); + + case A_DIGIT: + /* + * Entering digits of a number. + * Terminated by a non-digit. + */ + if ((c >= '0' && c <= '9') || c == '.') + break; + switch (editchar(c, ECF_PEEK|ECF_NOHISTORY|ECF_NOCOMPLETE|ECF_NORIGHTLEFT)) + { + case A_NOACTION: + /* + * Ignore this char and get another one. + */ + return (MCA_MORE); + case A_INVALID: + /* + * Not part of the number. + * End the number and treat this char + * as a normal command character. + */ + number = cmd_int(&fraction); + clear_mca(); + cmd_accept(); + return (NO_MCA); + } + break; + + case A_OPT_TOGGLE: + ret = mca_opt_char(c); + if (ret != NO_MCA) + return (ret); + break; + + case A_F_SEARCH: + case A_B_SEARCH: + case A_FILTER: + ret = mca_search_char(c); + if (ret != NO_MCA) + return (ret); + break; + + default: + /* Other multicharacter command. */ + break; + } + + /* + * The multichar command is terminated by a newline. + */ + if (is_newline_char(c)) + { + /* + * Execute the command. + */ + exec_mca(); + return (MCA_DONE); + } + + /* + * Append the char to the command buffer. + */ + if (cmd_char(c) == CC_QUIT) + /* + * Abort the multi-char command. + */ + return (MCA_DONE); + + switch (mca) + { + case A_F_BRACKET: + case A_B_BRACKET: + if (len_cmdbuf() >= 2) + { + /* + * Special case for the bracket-matching commands. + * Execute the command after getting exactly two + * characters from the user. + */ + exec_mca(); + return (MCA_DONE); + } + break; + case A_F_SEARCH: + case A_B_SEARCH: + if (incr_search) + { + /* Incremental search: do a search after every input char. */ - int st = (search_type & (SRCH_FORW|SRCH_BACK|SRCH_NO_MATCH|SRCH_NO_REGEX|SRCH_NO_MOVE|SRCH_WRAP)); ++ int st = (search_type & (SRCH_FORW|SRCH_BACK|SRCH_NO_MATCH|SRCH_NO_REGEX|SRCH_NO_MOVE|SRCH_WRAP|SRCH_SUBSEARCH_ALL)); + char *pattern = get_cmdbuf(); + if (pattern == NULL) + return (MCA_MORE); + /* + * Must save updown_match because mca_search + * reinits it. That breaks history scrolling. + * {{ This is ugly. mca_search probably shouldn't call set_mlist. }} + */ + int save_updown_match = updown_match; + cmd_exec(); + if (*pattern == '\0') + { + /* User has backspaced to an empty pattern. */ + undo_search(1); + } else + { + if (search(st | SRCH_INCR, pattern, 1) != 0) + /* No match, invalid pattern, etc. */ + undo_search(1); + } + /* Redraw the search prompt and search string. */ ++ if (!full_screen) ++ { ++ clear(); ++ repaint(); ++ } + mca_search1(); + updown_match = save_updown_match; + cmd_repaint(NULL); + } + break; + } + + /* + * Need another character. + */ + return (MCA_MORE); +} + +/* + * Discard any buffered file data. + */ - static void - clear_buffers(VOID_PARAM) ++static void clear_buffers(void) +{ + if (!(ch_getflags() & CH_CANSEEK)) + return; + ch_flush(); + clr_linenum(); +#if HILITE_SEARCH + clr_hilite(); +#endif +} + +/* + * Make sure the screen is displayed. + */ - static void - make_display(VOID_PARAM) ++static void make_display(void) +{ ++ /* ++ * If not full_screen, we can't rely on scrolling to fill the screen. ++ * We need to clear and repaint screen before any change. ++ */ ++ if (!full_screen && !(quit_if_one_screen && one_screen)) ++ clear(); + /* + * If nothing is displayed yet, display starting from initial_scrpos. + */ + if (empty_screen()) + { + if (initial_scrpos.pos == NULL_POSITION) + jump_loc(ch_zero(), 1); + else + jump_loc(initial_scrpos.pos, initial_scrpos.ln); - } else if (screen_trashed) ++ } else if (screen_trashed || !full_screen) + { + int save_top_scroll = top_scroll; + int save_ignore_eoi = ignore_eoi; + top_scroll = 1; + ignore_eoi = 0; + if (screen_trashed == 2) + { + /* Special case used by ignore_eoi: re-open the input file + * and jump to the end of the file. */ + reopen_curr_ifile(); + jump_forw(); + } + repaint(); + top_scroll = save_top_scroll; + ignore_eoi = save_ignore_eoi; + } +} + +/* + * Display the appropriate prompt. + */ - static void - prompt(VOID_PARAM) ++static void prompt(void) +{ + constant char *p; + + if (ungot != NULL && ungot->ug_char != CHAR_END_COMMAND) + { + /* + * No prompt necessary if commands are from + * ungotten chars rather than from the user. + */ + return; + } + + /* + * Make sure the screen is displayed. + */ + make_display(); + bottompos = position(BOTTOM_PLUS_ONE); + + /* + * If we've hit EOF on the last file and the -E flag is set, quit. + */ + if (get_quit_at_eof() == OPT_ONPLUS && + eof_displayed() && !(ch_getflags() & CH_HELPFILE) && + next_ifile(curr_ifile) == NULL_IFILE) + quit(QUIT_OK); + + /* + * If the entire file is displayed and the -F flag is set, quit. + */ + if (quit_if_one_screen && *** 3700 LINES SKIPPED *** From nobody Tue May 2 07:23:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9Wlk6qKnz48clW for ; Tue, 2 May 2023 07:23: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 4Q9Wlk6JBkz4Xpk; Tue, 2 May 2023 07:23:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683012226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sUYeAht/i7Aj67V2QVzetLA/YVXuSrPiowr3OMr/xKU=; b=EHLUMkiOk7DOQ0anX5Vi6eLpoKAisFSWWaf2c4DFI43ly3lMZcyP+UfGNfA2bYu8OpIQMz AM1Tf+3+aph98AJVbbAgJk3uUyUVLjV4TqnksHEH43CW/BOQy7LJJwmq+Sx19OGSN4ghM3 AbWXndrUTLcdpnmz/hh60NuUDBtZs7uHXiFjy8ea0yimJrgr01KZvEkd6ECTQr2kxLdHEL uEC6QA1SuC1Y3jdTL/hH5EIs1tRJr8BpONNlpcoPJ+RKSjTVlTzvv+vBi945zkXZD0k8lj 2ysmiMxKLOF3HnNKNitDqEgZRRiOk6jbnw3jtcnhG+PAnaSH4ssEWWjv6C02Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683012226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sUYeAht/i7Aj67V2QVzetLA/YVXuSrPiowr3OMr/xKU=; b=VxW4mrZICEXUC4xZ+MetW2qU60+3q8WSncSCo4zxFv51aVAGY/H5+pGQINUb206+ICf70j Y/Z47iqOlmT42Bt8Smqq03MDRsPXRcg7KMMFcN2pdYehAXYqW3yORblD9l0Bes5l7IMWid CLoPnbicFcUXoTIuS8Isdaz88HqytfmQM5KhxeZGfF/AZXg7pR3J7zxd6u/C2NkqqgI1Eh 69+uO4H6ZqjyKsW0ea2eG0yGQOpWbdnmpEFSE+tO3vkUvy0G0hWedlG6xKSFNN2EiEr/cl +4zeZX+xy+9/kCD/vHIHU1tCKqEh36X+nAp2HolymksTGH6C7q52qoNTb/N+DQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683012226; a=rsa-sha256; cv=none; b=xH0mm3H/6ddgfsFVW1PArb+nmARHoTL74RosCYJQoSpY8oIrSEtkvjsKaERy7nyUG/6UU7 p0wF54CTt/Y4SSfYhlDj/dVOrTQEWJ3BM/kLv24B+gdbGbIPKo2Cs0NhahTZMV1kYRqdVN HMBL7hduPry8icmWUt9/HvSXJXsSkfPwV0cjVjhI+rMBvsmxhXSjoIhfA99gBpFJu73MA9 LyLze+WJl82JS20JSLyy1yte8lz9strBBmn8fmqDw7OayNf99aygknCiXyFhDC3xM4PFjS qHgtgo4TiCutsJcnUhLNULaHju6P1lwsbYE26425BUACwM4v+PL5GaXXW+hQEA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9Wlk5M0QzfNm; Tue, 2 May 2023 07:23:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3427Nk0D077602; Tue, 2 May 2023 07:23:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3427NknB077601; Tue, 2 May 2023 07:23:46 GMT (envelope-from git) Date: Tue, 2 May 2023 07:23:46 GMT Message-Id: <202305020723.3427NknB077601@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: 431083f75bdd..e2a92d726e18 - vendor/openzfs/master - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/vendor/openzfs/master X-Git-Reftype: branch X-Git-Commit: e2a92d726e1849f646d137510796b11c26d45cae X-Git-Oldrev: 431083f75bdd3efaee992bdd672625ec7240d252 X-Git-Newrev: e2a92d726e1849f646d137510796b11c26d45cae Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch vendor/openzfs/master has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=431083f75bdd..e2a92d726e18 21c4b2a944dc Linux 6.2 compat: META 1142362ff606 Use vmem_zalloc to silence allocation warning c5431f14655c linux 6.3 compat: needs REQ_PREFLUSH | REQ_OP_WRITE 3399a30ee02d contrib: dracut: fix race with root=zfs:dset when necessities required 6ecdd35bdbcd Fix "Add colored output to zfs list" 8eb2f2605717 Linux 6.3 compat: writepage_t first arg struct folio* 1038f87c4edc Fix some signedness issues in arc_evict() b66c2a0899a7 Storage device expansion "silently" fails on degraded vdev ece7ab7e7de8 vdev: expose zfs_vdev_def_queue_depth as a module parameter a3f82aec9336 Miscellaneous FreBSD compilation bugfixes 0b8fdb8ade5d ZTS: Use inbuilt monotonic time 8ab674ab9c8f ZTS: add existing tests to runfiles a8a127e2c9f3 Fix typo in check_clones() ff73574cd835 vdev: expose zfs_vdev_max_ms_shift as a module parameter baca06c258e0 libzfs: add v2 iterator interfaces dee77f45d0f9 module: resync part of Makefile.bsd d0cbd9feaf5b module: freebsd: fix aarch64 fpu handling d4dc53dad2f6 Linux 6.3 compat: idmapped mount API changes 678a3b8f999b Trim needless zeroes from checksum events 574e09d8c6b4 Fix in check_filesystem() 6e015933f88f initramfs: source user scripts from /e/z/initramfs-tools-load-key{,.d/*} c71fe716401f Fix data corruption when cloning embedded blocks 27a82cbb3ef2 Linux 6.3 compat: Fix memcpy "detected field-spanning write" error ac18dc77f370 Minor improvements to zpoolconcepts.7 3b5af2013992 Fix VERIFY(!zil_replaying(zilog, tx)) panic 8ed62440eff5 Work around Raspberry Pi kernel packaging oddities accfdeb948da Revert "ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()" f9e1c63f8c32 Values printed by zpool-iostat(8) should be right-aligned 23f84d161ed0 Silence clang warning of flexible array not at end 3d37e7e5f540 zfsprops.7: update mandlock 719534ca8e8d Fix "Detach spare vdev in case if resilvering does not happen" d4657835c8a5 ZTS: send-c_volume is flaky 71d191ef25d1 Allow MMP to bypass waiting for other threads 3e4ed4213d7b Create zap for root vdev a10c64561648 ZTS: zvol_misc_trim retry busy export ab71b24d20df Linux: zfs_zaccess_trivial() should always call generic_permission() 135d9a9048e3 Linux: Suppress -Wordered-compare-function-pointers in tracepoint code 8eae2d214cfa Add support for zpool user properties 62cc9d4f6b5a FreeBSD: make zfs_vfs_held() definition consistent with declaration a7982d5d30da FreeBSD: fix up EXDEV handling for clone_range ff0e135e25fa FreeBSD: try to fallback early if can't do optimized copy 81a2b2e6a6d9 FreeBSD: add missing vop_fplookup assignments 6b6aaf6dc2e6 Taught zdb -bb to print metadata totals 6d59d5df9808 Add loongarch64 support 0e8a42bbee2c Revert "Fix data race between zil_commit() and zil_suspend()" d960beca61b3 zdb: Fix minor memory leak b69cb06664ad tests/zdb_encrypted: parse numbers a little more robustly 88b8777159f6 FreeBSD: add missing vn state transition for .zfs e37a89d5d0ba FreeBSD: fix up EINVAL from getdirentries on .zfs bba7cbf0a481 Fix positive ABD size assertion in abd_verify(). b5411618f727 Fix checkstyle warning ee728008a427 Fix BLAKE3 aarch64 assembly for FreeBSD and macOS ae0d0f0e047e PAM: support the authentication facility 2fd1c3042362 Mark TX_COMMIT transaction with TXG_NOTHROTTLE. 5a83f761c7c7 powerpc64: Support ELFv2 asm on Big Endian 0c93d86f01e5 Correct ABD size for split block ZIOs e2a92d726e18 blake3: fix up bogus checksums in face of cpu migration From nobody Tue May 2 11:39:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9dRC1kKqz48tJQ; Tue, 2 May 2023 11:39: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 4Q9dRC0sp0z3qBf; Tue, 2 May 2023 11:39:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683027591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jOBAnurKyn7R3b4vwVGxF+WNhhOTA26RHhBT6Gqh/YU=; b=AkdlIAWFps/IFv7RIjpM5j24lt2eYwZfytqPdbvFgjvUgZNmLQD342LsNqSUDnkb1UrUw6 k/pTGUI1miGHK9EhGu+IiKFSg+Z075ugb/7M27FPe4NvpMPmHrbzS7WhtCzGPKylXzQOcF uQPNtuFDml1SeTaaQCz2O4fkK6OASKNqYJ+VlLOCLjrNrxdncJtfBxCtjtSmcfDKtUewOt +dLq3bQbyqIXYA4JC9Cw1cXO01YmxO30VF80PIkoqaAkxT9+aTgahchhNim8q+GjfLDX3z BZh3GBto6P7A2MdH0GUQxIDIFhyGz+Gkrr2ceKSDXz1fI3HyE+hZpFUVJR5lpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683027591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jOBAnurKyn7R3b4vwVGxF+WNhhOTA26RHhBT6Gqh/YU=; b=nuS3JimfGyTc+9g4NzWOkT9KfVGMGepIFi8R7r8qo283U46yoasSMrc9+/tVTH0A3bTxYH iVbt59iIQNOddd6NYMxGWChaM4khRgKyUNLlK/2UojF0+AQ3kcGAFIa2AYvtl1M3+rLWTD kqV+9cQznC3fMV2rcQRwgwkzG33//jZMe/8/ngLnuaI+m/zDt6mdt/KxEBha0M0UsIHF/v yLcCkH8pDrp8Q56U7wlrjFz+cWTXbhE4bLgFLPnD/2Fec213VK4Uw0FceNZV3bj2b6A5nw 25NwNmb4fcKZnaQc81Jd6YHWYHootMpwqhTIowZFRtb5UQRFYzfBjBWE0nfxbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683027591; a=rsa-sha256; cv=none; b=Qa3CkD36MQfA8yuL0ZTvnWo5h8ZlxAXw0B5PfgYqdX/QhR0eXPRdRLBcAOZ9v4dXnA02Tj XP3F4Aui+0CfoYy7KJggn5PmmI3/K+z1mtWcq51B9oM7fR55UvESIjlGjKFjMCMhQqDU7S X4a6pIcDrwUuJFlJwFwQa7WBVs0FJNVkfgob/SGYmMVK4c3SnQqO6ghdpfWFqrYIwG2Gi9 YeBd2D/Clma9hE1niZtPGs5n6xHgiPn8439/pRK/owWUdM5yx0QOa35+yOkIyhZQbRRgP7 HeKRIK+G+0VhaUrXYBpplC3V0XPRBLo2E34nfRPAoq+MtL2ddxz01I8eE212nA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9dRB72thzm4n; Tue, 2 May 2023 11:39:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342Bdod7092284; Tue, 2 May 2023 11:39:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342BdoTQ092283; Tue, 2 May 2023 11:39:50 GMT (envelope-from git) Date: Tue, 2 May 2023 11:39:50 GMT Message-Id: <202305021139.342BdoTQ092283@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: 32bb28d8ad31 - main - amd64: move definition of the struct pmap_pcids into _pmap.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 32bb28d8ad31294579bd95c29e84a5985e543ae5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=32bb28d8ad31294579bd95c29e84a5985e543ae5 commit 32bb28d8ad31294579bd95c29e84a5985e543ae5 Author: Konstantin Belousov AuthorDate: 2023-05-01 11:06:30 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-02 11:32:20 +0000 amd64: move definition of the struct pmap_pcids into _pmap.h and rename the structure to pmap_pcid. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D39890 --- sys/amd64/amd64/pmap.c | 2 ++ sys/amd64/include/_pmap.h | 39 +++++++++++++++++++++++++++++++++++++++ sys/amd64/include/pmap.h | 8 ++------ 3 files changed, 43 insertions(+), 6 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index e8a88aab3225..92d9a66837cd 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -4362,6 +4362,8 @@ pmap_free_pt_page(pmap_t pmap, vm_page_t m, bool zerofilled) pmap_pt_page_count_adj(pmap, -1); } +_Static_assert(sizeof(struct pmap_pcid) == 8, "Fix pcpu zone for pm_pcidp"); + /* * Initialize a preallocated and zeroed pmap structure, * such as one in a vmspace structure. diff --git a/sys/amd64/include/_pmap.h b/sys/amd64/include/_pmap.h new file mode 100644 index 000000000000..b4b1b5962838 --- /dev/null +++ b/sys/amd64/include/_pmap.h @@ -0,0 +1,39 @@ +/*- + * Copyright (c) 2014-2020 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by + * Konstantin Belousov under sponsorship from + * the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _MACHINE__PMAP_H_ +#define _MACHINE__PMAP_H_ + +struct pmap_pcid { + uint32_t pm_pcid; + uint32_t pm_gen; +}; + +#endif diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index d74f25cc8024..3b99b88742e5 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -291,6 +291,7 @@ #include #include #include +#include #include #include #include @@ -371,11 +372,6 @@ enum pmap_type { PT_RVI, /* AMD's nested page tables */ }; -struct pmap_pcids { - uint32_t pm_pcid; - uint32_t pm_gen; -}; - /* * The kernel virtual address (KVA) of the level 4 page table page is always * within the direct map (DMAP) region. @@ -394,7 +390,7 @@ struct pmap { long pm_eptgen; /* EPT pmap generation id */ smr_t pm_eptsmr; int pm_flags; - struct pmap_pcids pm_pcids[MAXCPU]; + struct pmap_pcid pm_pcids[MAXCPU]; struct rangeset pm_pkru; }; From nobody Tue May 2 11:39:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9dRD2gNhz48tLw; Tue, 2 May 2023 11:39: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 4Q9dRD1ws0z3q1v; Tue, 2 May 2023 11:39:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683027592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kEMz9Q848nF/TqBsfRurMbq9DWY6yE/++wuG/YScsFQ=; b=X+kLNEP70yCyyW/Go9rskFX5KAuPURI8TLBIROHMrgYFqsRsB8u37xUeY4oQNLRDinvGA3 /2627NEWf4jLTgVisS1u5+H6QNlft6ugmsnOgLLsPZz2B1Nb+lmzxsKwplo72rBfXFEZ3O 3lMR3AzwvLdgp9oRo8FCVw5+wIqrOO5d+gbnH+8j1qoYShZY09EakiSTOyNdfLzJYGoqiv cuUfD9/BG8OdmhbTEEyHVrLQ8LX2v1eQVoXAWuRjHKcaamSHhgQgS9XNlwht0VoQCcTat0 EChIzDJgnGWbEro2hWbUUsPOUdKdtJ31OYTnw3a6/fNE9tNy5tMloiYDTBN6xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683027592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kEMz9Q848nF/TqBsfRurMbq9DWY6yE/++wuG/YScsFQ=; b=ca6ZOgwJyaghkVa6QjP3OX/13nUITz4v/9BxyuZ1vy4kpbLjoeOeKWmlIAGZlbPg5QODF+ xpIhUjZMTHgiuH8P3OEh/M1EICcW+eA1UmJbiGvmebcrnMT/IMCQE+W4Iiy2vkVsYeDxMe Wf2SF31xeqB/D20vyP6AlaHLztPhoOdjrZwHxRrfWIJYAafyaTPYbKmbS59UYJUCdqqtdd BZ6H01fMMpJS0FFSLHowKfkpzphIulA4HyK9Yy6RSVyA68VhC9XRNsvhNVtRV5XPDlxNNX L8gNL157MlxS6OOnRyZ/4GfR78YW6OAxiPRKUUeVEwE6prYZsY//ptvqlYAJrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683027592; a=rsa-sha256; cv=none; b=mp7m+5XPv1bg6uUJO5oG33C7Vuj8+kgLBnpQ1sTLQdA3oRJSoqsefKdfuaCq6EGy5sdNte u9oy20qJxHCrX/XdRqaxFNk/B9p+T5kJo0h7EtgpbKQaXBfqqxtABvHv6SpYTHjVh83Hor LsYI4+ki6Vd11fEy7BRD0AZIuGW+6YIJCCmDP+PV+5nrArDQEsAUEToMGOSEqlGGendIZC ZnN66IdLzQmGoLboAskrJWwFsxXYCbJUV1qI4DnN7+WW1nJNvuD32oQqK3GkGYk0QWvpwm tujW4ZsRKrtUF9Lu2wYlr3WU6AGG+lMZx9MsT2sXbPkKij4fLmTuHnSeOpr08A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9dRD0vhrzmB0; Tue, 2 May 2023 11:39:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342BdqfA092305; Tue, 2 May 2023 11:39:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342BdqT1092304; Tue, 2 May 2023 11:39:52 GMT (envelope-from git) Date: Tue, 2 May 2023 11:39:52 GMT Message-Id: <202305021139.342BdqT1092304@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: 86b61ccb34d4 - main - amd64 pmap: add pmap_pinit_pcids() helper List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 86b61ccb34d44e0e73dd2a68174ebc869ebccf8e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=86b61ccb34d44e0e73dd2a68174ebc869ebccf8e commit 86b61ccb34d44e0e73dd2a68174ebc869ebccf8e Author: Konstantin Belousov AuthorDate: 2023-05-01 11:21:10 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-02 11:32:29 +0000 amd64 pmap: add pmap_pinit_pcids() helper to initialize pm_pcids array for a new user pmap Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D39890 --- sys/amd64/amd64/pmap.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 92d9a66837cd..3b125041bb29 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -4193,12 +4193,24 @@ pmap_abort_ptp(pmap_t pmap, vm_offset_t va, vm_page_t mpte) } } +static void +pmap_pinit_pcids(pmap_t pmap, uint32_t pcid, int gen) +{ + struct pmap_pcid *pcidp; + int i; + + CPU_FOREACH(i) { + pcidp = &pmap->pm_pcids[i]; + pcidp->pm_pcid = pcid; + pcidp->pm_gen = gen; + } +} + void pmap_pinit0(pmap_t pmap) { struct proc *p; struct thread *td; - int i; PMAP_LOCK_INIT(pmap); pmap->pm_pmltop = kernel_pmap->pm_pmltop; @@ -4211,10 +4223,7 @@ pmap_pinit0(pmap_t pmap) TAILQ_INIT(&pmap->pm_pvchunk); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); pmap->pm_flags = pmap_flags; - CPU_FOREACH(i) { - pmap->pm_pcids[i].pm_pcid = PMAP_PCID_KERN + 1; - pmap->pm_pcids[i].pm_gen = 1; - } + pmap_pinit_pcids(pmap, PMAP_PCID_KERN + 1, 1); pmap_activate_boot(pmap); td = curthread; if (pti) { @@ -4373,7 +4382,6 @@ pmap_pinit_type(pmap_t pmap, enum pmap_type pm_type, int flags) { vm_page_t pmltop_pg, pmltop_pgu; vm_paddr_t pmltop_phys; - int i; bzero(&pmap->pm_stats, sizeof pmap->pm_stats); @@ -4397,9 +4405,8 @@ pmap_pinit_type(pmap_t pmap, enum pmap_type pm_type, int flags) pmltop_phys = VM_PAGE_TO_PHYS(pmltop_pg); pmap->pm_pmltop = (pml5_entry_t *)PHYS_TO_DMAP(pmltop_phys); - CPU_FOREACH(i) { - pmap->pm_pcids[i].pm_pcid = PMAP_PCID_NONE; - pmap->pm_pcids[i].pm_gen = 0; + if (pmap_pcid_enabled) { + pmap_pinit_pcids(pmap, PMAP_PCID_NONE, 0); } pmap->pm_cr3 = PMAP_NO_CR3; /* initialize to an invalid value */ pmap->pm_ucr3 = PMAP_NO_CR3; From nobody Tue May 2 11:39:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9dRF3sZNz48tLy; Tue, 2 May 2023 11:39: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 4Q9dRF2yHyz3qHh; Tue, 2 May 2023 11:39:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683027593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tsjRBY6jJrr88Ej/fXla6xr34i14eivdEwfnoCxXACo=; b=Dnk9wmaJYnVAEhRLn6QMR4eJVDevpPg0QCdb+i3koHWFBIlCu9tuQ58iUigziLVWZVeRoH fuFP8YCJZgUykDPjQwAFkye+j7DKUwTrmY4RxSGclmiknbtbPfZuK4YH1efFNWCSMRR44i Yw8DdlQ6s9rWPegLIEd7lG5ftTVOUrsZyULejCzmIOPtpbl7WwsvxS9BqTC3UrX71mGf2k 8XWuoDitEPbYr2TzbWNzS/vdMnzrJn7hPgMIlaYX6d96J6Ow1yzOXA4A9GOYRRonm4q8j/ 5mm3bSBmniy/CF9X7/Rh8JsMYKMxQKWyin3EHOze1Dv08hE4Ck96hPBH4i90BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683027593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tsjRBY6jJrr88Ej/fXla6xr34i14eivdEwfnoCxXACo=; b=vWe2FrxOHBOG7fHiLU6Gc2tM8L0JpnTBFBHi9Pbo8sor+OdEWtWwZP5f5lSby7Evo2nvz8 aETjJ7NihgJda+ajYmWGqI+vZDIZCDSguwY/skd399CJ3Mh5qQWB94ffq1Kiik5z8wRdIT ewF4nZScjjcCWRbp/mTbfMvV28j1lE33RWU2D8bbYi7rGyHGcSiRMKhc8suTo+DIinbAcn chse+FduQGERH5glWRZtzk5T/TeNPp/t7YeT4lm9TUAl4tnw9aSoqliUssoyqkhZpf8tx5 FbnBTW0tEhiyGrX/yDiJulPlgASW/UK7n28o2TW9DfARnwOVDSW5CH7GLfaSRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683027593; a=rsa-sha256; cv=none; b=AcRxhIsJNQfnDpuneMwv+9p/JBqEJaMXC3Pv0jL1A77qbcLotgm0hk8l9k9GnC8r8Xd9aR TamoUfWtxorQukUb+aLHbyIQwCTJTIZTl66BwejHRFTvkBXP2WO/uoyPtX4HOXBUbtaB/h bssSPzaoazyXN2ML/qUzPNHR3lPdVFSDbw3ZNKMZM3kxZwbt9nb6c1x8Rrk2lXm4tzRwQ/ JP+ZI2el0oB+wmV+DU7yrgkzMJuStBaj50ThsRAIjqJ2RJPwIpoZZisPuimbwZjvLfs/j3 q5Nf5Y6wOY79FeQL9foOG8lzKa5X+93KXbOkW1UvLqT9w7QzsWi7prqyB9KNrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9dRF1wcTzmB1; Tue, 2 May 2023 11:39:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342Bdrea092324; Tue, 2 May 2023 11:39:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342BdrSS092323; Tue, 2 May 2023 11:39:53 GMT (envelope-from git) Date: Tue, 2 May 2023 11:39:53 GMT Message-Id: <202305021139.342BdrSS092323@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: 9e0143694ad3 - main - amd64: add pmap_get_pcid() helper List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9e0143694ad31b534310a473b993e520264f11e2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9e0143694ad31b534310a473b993e520264f11e2 commit 9e0143694ad31b534310a473b993e520264f11e2 Author: Konstantin Belousov AuthorDate: 2023-05-01 11:02:59 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-02 11:32:35 +0000 amd64: add pmap_get_pcid() helper Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D39890 --- sys/amd64/amd64/efirt_machdep.c | 19 +++++++++++++------ sys/amd64/amd64/mp_machdep.c | 20 ++++++++------------ sys/amd64/amd64/pmap.c | 16 ++++------------ sys/amd64/include/pmap.h | 8 ++++++++ 4 files changed, 33 insertions(+), 30 deletions(-) diff --git a/sys/amd64/amd64/efirt_machdep.c b/sys/amd64/amd64/efirt_machdep.c index 6fffd113f868..b7f7a91b8671 100644 --- a/sys/amd64/amd64/efirt_machdep.c +++ b/sys/amd64/amd64/efirt_machdep.c @@ -298,6 +298,7 @@ int efi_arch_enter(void) { pmap_t curpmap; + uint64_t cr3; curpmap = PCPU_GET(curpmap); PMAP_LOCK_ASSERT(curpmap, MA_OWNED); @@ -313,8 +314,10 @@ efi_arch_enter(void) if (pmap_pcid_enabled && !invpcid_works) PCPU_SET(curpmap, NULL); - load_cr3(VM_PAGE_TO_PHYS(efi_pmltop_page) | (pmap_pcid_enabled ? - curpmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid : 0)); + cr3 = VM_PAGE_TO_PHYS(efi_pmltop_page); + if (pmap_pcid_enabled) + cr3 |= pmap_get_pcid(curpmap); + load_cr3(cr3); /* * If PCID is enabled, the clear CR3_PCID_SAVE bit in the loaded %cr3 * causes TLB invalidation. @@ -328,12 +331,16 @@ void efi_arch_leave(void) { pmap_t curpmap; + uint64_t cr3; curpmap = &curproc->p_vmspace->vm_pmap; - if (pmap_pcid_enabled && !invpcid_works) - PCPU_SET(curpmap, curpmap); - load_cr3(curpmap->pm_cr3 | (pmap_pcid_enabled ? - curpmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid : 0)); + cr3 = curpmap->pm_cr3; + if (pmap_pcid_enabled) { + cr3 |= pmap_get_pcid(curpmap); + if (!invpcid_works) + PCPU_SET(curpmap, curpmap); + } + load_cr3(cr3); if (!pmap_pcid_enabled) invltlb(); vm_fault_enable_pagefaults(curthread->td_md.md_efirt_dis_pf); diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 5c60d301c1e7..94589f736637 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -767,7 +767,7 @@ invltlb_invpcid_handler(pmap_t smp_tlb_pmap) (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ - d.pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid; + d.pcid = pmap_get_pcid(smp_tlb_pmap); d.pad = 0; d.addr = 0; invpcid(&d, smp_tlb_pmap == kernel_pmap ? INVPCID_CTXGLOB : @@ -786,7 +786,7 @@ invltlb_invpcid_pti_handler(pmap_t smp_tlb_pmap) (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; #endif /* COUNT_IPIS */ - d.pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid; + d.pcid = pmap_get_pcid(smp_tlb_pmap); d.pad = 0; d.addr = 0; if (smp_tlb_pmap == kernel_pmap) { @@ -808,8 +808,6 @@ invltlb_invpcid_pti_handler(pmap_t smp_tlb_pmap) static void invltlb_pcid_handler(pmap_t smp_tlb_pmap) { - uint32_t pcid; - #ifdef COUNT_XINVLTLB_HITS xhits_gbl[PCPU_GET(cpuid)]++; #endif /* COUNT_XINVLTLB_HITS */ @@ -828,8 +826,8 @@ invltlb_pcid_handler(pmap_t smp_tlb_pmap) * CPU. */ if (smp_tlb_pmap == PCPU_GET(curpmap)) { - pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid; - load_cr3(smp_tlb_pmap->pm_cr3 | pcid); + load_cr3(smp_tlb_pmap->pm_cr3 | + pmap_get_pcid(smp_tlb_pmap)); if (smp_tlb_pmap->pm_ucr3 != PMAP_NO_CR3) PCPU_SET(ucr3_load_mask, ~CR3_PCID_SAVE); } @@ -865,8 +863,7 @@ invlpg_invpcid_handler(pmap_t smp_tlb_pmap, vm_offset_t smp_tlb_addr1) if (smp_tlb_pmap == PCPU_GET(curpmap) && smp_tlb_pmap->pm_ucr3 != PMAP_NO_CR3 && PCPU_GET(ucr3_load_mask) == PMAP_UCR3_NOMASK) { - d.pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid | - PMAP_PCID_USER_PT; + d.pcid = pmap_get_pcid(smp_tlb_pmap) | PMAP_PCID_USER_PT; d.pad = 0; d.addr = smp_tlb_addr1; invpcid(&d, INVPCID_ADDR); @@ -890,7 +887,7 @@ invlpg_pcid_handler(pmap_t smp_tlb_pmap, vm_offset_t smp_tlb_addr1) if (smp_tlb_pmap == PCPU_GET(curpmap) && (ucr3 = smp_tlb_pmap->pm_ucr3) != PMAP_NO_CR3 && PCPU_GET(ucr3_load_mask) == PMAP_UCR3_NOMASK) { - pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid; + pcid = pmap_get_pcid(smp_tlb_pmap); kcr3 = smp_tlb_pmap->pm_cr3 | pcid | CR3_PCID_SAVE; ucr3 |= pcid | PMAP_PCID_USER_PT | CR3_PCID_SAVE; pmap_pti_pcid_invlpg(ucr3, kcr3, smp_tlb_addr1); @@ -944,8 +941,7 @@ invlrng_invpcid_handler(pmap_t smp_tlb_pmap, vm_offset_t smp_tlb_addr1, if (smp_tlb_pmap == PCPU_GET(curpmap) && smp_tlb_pmap->pm_ucr3 != PMAP_NO_CR3 && PCPU_GET(ucr3_load_mask) == PMAP_UCR3_NOMASK) { - d.pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid | - PMAP_PCID_USER_PT; + d.pcid = pmap_get_pcid(smp_tlb_pmap) | PMAP_PCID_USER_PT; d.pad = 0; d.addr = smp_tlb_addr1; do { @@ -978,7 +974,7 @@ invlrng_pcid_handler(pmap_t smp_tlb_pmap, vm_offset_t smp_tlb_addr1, if (smp_tlb_pmap == PCPU_GET(curpmap) && (ucr3 = smp_tlb_pmap->pm_ucr3) != PMAP_NO_CR3 && PCPU_GET(ucr3_load_mask) == PMAP_UCR3_NOMASK) { - pcid = smp_tlb_pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid; + pcid = pmap_get_pcid(smp_tlb_pmap); kcr3 = smp_tlb_pmap->pm_cr3 | pcid | CR3_PCID_SAVE; ucr3 |= pcid | PMAP_PCID_USER_PT | CR3_PCID_SAVE; pmap_pti_pcid_invlrng(ucr3, kcr3, smp_tlb_addr1, smp_tlb_addr2); diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 3b125041bb29..16bfe9986c6b 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -3076,7 +3076,6 @@ pmap_invalidate_page_pcid_cb(pmap_t pmap, vm_offset_t va, struct invpcid_descr d; uint64_t kcr3, ucr3; uint32_t pcid; - u_int cpuid; /* * Because pm_pcid is recalculated on a context switch, we @@ -3095,9 +3094,7 @@ pmap_invalidate_page_pcid_cb(pmap_t pmap, vm_offset_t va, PCPU_GET(ucr3_load_mask) != PMAP_UCR3_NOMASK) return; - cpuid = PCPU_GET(cpuid); - - pcid = pmap->pm_pcids[cpuid].pm_pcid; + pcid = pmap_get_pcid(pmap); if (invpcid_works1) { d.pcid = pcid | PMAP_PCID_USER_PT; d.pad = 0; @@ -3172,7 +3169,6 @@ pmap_invalidate_range_pcid_cb(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, struct invpcid_descr d; uint64_t kcr3, ucr3; uint32_t pcid; - u_int cpuid; CRITICAL_ASSERT(curthread); @@ -3181,9 +3177,7 @@ pmap_invalidate_range_pcid_cb(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, PCPU_GET(ucr3_load_mask) != PMAP_UCR3_NOMASK) return; - cpuid = PCPU_GET(cpuid); - - pcid = pmap->pm_pcids[cpuid].pm_pcid; + pcid = pmap_get_pcid(pmap); if (invpcid_works1) { d.pcid = pcid | PMAP_PCID_USER_PT; d.pad = 0; @@ -3273,7 +3267,6 @@ pmap_invalidate_all_pcid_cb(pmap_t pmap, bool invpcid_works1) struct invpcid_descr d; uint64_t kcr3; uint32_t pcid; - u_int cpuid; if (pmap == kernel_pmap) { if (invpcid_works1) { @@ -3284,9 +3277,8 @@ pmap_invalidate_all_pcid_cb(pmap_t pmap, bool invpcid_works1) } } else if (pmap == PCPU_GET(curpmap)) { CRITICAL_ASSERT(curthread); - cpuid = PCPU_GET(cpuid); - pcid = pmap->pm_pcids[cpuid].pm_pcid; + pcid = pmap_get_pcid(pmap); if (invpcid_works1) { d.pcid = pcid; d.pad = 0; @@ -10152,7 +10144,7 @@ pmap_activate_boot(pmap_t pmap) if (pti) { kcr3 = pmap->pm_cr3; if (pmap_pcid_enabled) - kcr3 |= pmap->pm_pcids[cpuid].pm_pcid | CR3_PCID_SAVE; + kcr3 |= pmap_get_pcid(pmap) | CR3_PCID_SAVE; } else { kcr3 = PMAP_NO_CR3; } diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index 3b99b88742e5..cef718fb50d5 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -533,6 +533,14 @@ pmap_invlpg(pmap_t pmap, vm_offset_t va) } #endif /* sys/pcpu.h && machine/cpufunc.h */ +/* Return pcid for the pmap pmap on current cpu */ +static __inline uint32_t +pmap_get_pcid(pmap_t pmap) +{ + MPASS(pmap_pcid_enabled); + return (pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid); +} + #endif /* _KERNEL */ /* Return various clipped indexes for a given VA */ From nobody Tue May 2 11:39:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9dRG4CtDz48tRL; Tue, 2 May 2023 11:39: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 4Q9dRG3nR0z3q9l; Tue, 2 May 2023 11:39:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683027594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VCdIENffwrLjZb0tFlUh/KZB0WC9BCONd3614CwLCt8=; b=jr1w6Obkf0aEfaxFtVR9ni1mXBlGqcYYCyGiF3NPnM8ZwAdmiWiUOIEI0Tx3n2M8yDi2lJ oCZPUD9M0W37MBkONnDeudPAFcuJYCnrzP2Kf1ICnEnzfHvhqAxt/mfPtlPR1dBXC09Bwr 5wbRpWbVvOewQgKfPBdUr9KBS3FXsQNs1lEscxQVcAY1soF0dgk3tnWJpTbrwshot+x4hW bvdCmsvOf/YXqr/80QmE64fPue72iwziNHGfioEAweb4owBjuEd4+TDYSYrVEtrqFmi2cC rAmqGenBtrC+euFmuAMpvr5/w/mscgDKbzK2liLMNeYMk+j03Mo+wIJGEHcgYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683027594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VCdIENffwrLjZb0tFlUh/KZB0WC9BCONd3614CwLCt8=; b=Lp7wAhPYxeXzjayHsEZM8ZFcDEyf6ri3Oi/QKkSjti2+4E6hGg0HbHzzr2/c5/EP6NtB+b n64PyU7byDumo7ZBys0NmOopiaHhp1eVpN73nAV1QLByiseCiHID2uSd+5Jf9Jj4sNqXbN wQUxBoEtQNDv92JVhxJ2/gRxqy/FXXe1MhztVeuqvaeC9s8L0BPqYNwTAvhhXVyWv1Zr6o L7wbPqNNi3XKYpqp1sVCHJ5MGEFO4rcj5/5t3HNLy+2xZYlRZ72M8Qkuqs3RzciQKYuAy3 HwkO6LYziXNR8OUGcMuU2rSkzvph1U3k0Hbvhq1F5LbB2/XXg8xjfPeD1q0d8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683027594; a=rsa-sha256; cv=none; b=dP90mQsHnZw0NAMdC50+S8ukKnqT+/qee5/NtIfqPVWc24lADp4naJ+TruGAicI3lv5Nel H3tf2GcqD6GiobX0ZTlZ6s5gJCZnWpGaidEvHSZHNxISaFfbJHTfai9ptn/U2l6JuhE9kV KAhNjEBvnDPKL0+m/s6gkG6aRvwa/3IvaqxIvRR/h3u0qTm7gWJp8dX85zpu+nKjmzf2px r/QW5Wbzru7v0ZgxawrrEe1yNU8h2K+Wbq1HrMqnIlp2mw/ch6I6nZmD2rxrS0AZQzDd6x hsBLpCAwiDwBcF3+leHnqxK9Uk3qVr0FizaIt4fBbyrZ8D9ODjZNakHVLB11nw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9dRG2d0dzmRm; Tue, 2 May 2023 11:39:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342Bds9H092350; Tue, 2 May 2023 11:39:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342BdsGp092349; Tue, 2 May 2023 11:39:54 GMT (envelope-from git) Date: Tue, 2 May 2023 11:39:54 GMT Message-Id: <202305021139.342BdsGp092349@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: 9c8cbf381985 - main - amd64 pmap_pcid_alloc(): pass a pointer to struct pmap_pcid instead of cpuid List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c8cbf3819854d9acbf4c0fba43942036f956786 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9c8cbf3819854d9acbf4c0fba43942036f956786 commit 9c8cbf3819854d9acbf4c0fba43942036f956786 Author: Konstantin Belousov AuthorDate: 2023-05-01 11:35:48 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-02 11:32:40 +0000 amd64 pmap_pcid_alloc(): pass a pointer to struct pmap_pcid instead of cpuid Cpuid is used to index the pmap->pm_pcids array only. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D39890 --- sys/amd64/amd64/pmap.c | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 16bfe9986c6b..a7716d7f394e 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -9926,20 +9926,20 @@ out: } static uint64_t -pmap_pcid_alloc(pmap_t pmap, u_int cpuid) +pmap_pcid_alloc(pmap_t pmap, struct pmap_pcid *pcidp) { uint32_t gen, new_gen, pcid_next; CRITICAL_ASSERT(curthread); gen = PCPU_GET(pcid_gen); - if (pmap->pm_pcids[cpuid].pm_pcid == PMAP_PCID_KERN) + if (pcidp->pm_pcid == PMAP_PCID_KERN) return (pti ? 0 : CR3_PCID_SAVE); - if (pmap->pm_pcids[cpuid].pm_gen == gen) + if (pcidp->pm_gen == gen) return (CR3_PCID_SAVE); pcid_next = PCPU_GET(pcid_next); KASSERT((!pti && pcid_next <= PMAP_PCID_OVERMAX) || (pti && pcid_next <= PMAP_PCID_OVERMAX_KERN), - ("cpu %d pcid_next %#x", cpuid, pcid_next)); + ("cpu %d pcid_next %#x", PCPU_GET(cpuid), pcid_next)); if ((!pti && pcid_next == PMAP_PCID_OVERMAX) || (pti && pcid_next == PMAP_PCID_OVERMAX_KERN)) { new_gen = gen + 1; @@ -9950,25 +9950,23 @@ pmap_pcid_alloc(pmap_t pmap, u_int cpuid) } else { new_gen = gen; } - pmap->pm_pcids[cpuid].pm_pcid = pcid_next; - pmap->pm_pcids[cpuid].pm_gen = new_gen; + pcidp->pm_pcid = pcid_next; + pcidp->pm_gen = new_gen; PCPU_SET(pcid_next, pcid_next + 1); return (0); } static uint64_t -pmap_pcid_alloc_checked(pmap_t pmap, u_int cpuid) +pmap_pcid_alloc_checked(pmap_t pmap, struct pmap_pcid *pcidp) { uint64_t cached; - cached = pmap_pcid_alloc(pmap, cpuid); - KASSERT(pmap->pm_pcids[cpuid].pm_pcid < PMAP_PCID_OVERMAX, - ("pmap %p cpu %d pcid %#x", pmap, cpuid, - pmap->pm_pcids[cpuid].pm_pcid)); - KASSERT(pmap->pm_pcids[cpuid].pm_pcid != PMAP_PCID_KERN || - pmap == kernel_pmap, + cached = pmap_pcid_alloc(pmap, pcidp); + KASSERT(pcidp->pm_pcid < PMAP_PCID_OVERMAX, + ("pmap %p cpu %d pcid %#x", pmap, PCPU_GET(cpuid), pcidp->pm_pcid)); + KASSERT(pcidp->pm_pcid != PMAP_PCID_KERN || pmap == kernel_pmap, ("non-kernel pmap pmap %p cpu %d pcid %#x", - pmap, cpuid, pmap->pm_pcids[cpuid].pm_pcid)); + pmap, PCPU_GET(cpuid), pcidp->pm_pcid)); return (cached); } @@ -9984,6 +9982,7 @@ static void pmap_activate_sw_pcid_pti(struct thread *td, pmap_t pmap, u_int cpuid) { pmap_t old_pmap; + struct pmap_pcid *pcidp, *old_pcidp; uint64_t cached, cr3, kcr3, ucr3; KASSERT((read_rflags() & PSL_I) == 0, @@ -9994,17 +9993,18 @@ pmap_activate_sw_pcid_pti(struct thread *td, pmap_t pmap, u_int cpuid) PCPU_SET(ucr3_load_mask, PMAP_UCR3_NOMASK); old_pmap = PCPU_GET(curpmap); MPASS(old_pmap->pm_ucr3 != PMAP_NO_CR3); - old_pmap->pm_pcids[cpuid].pm_gen = 0; + old_pcidp = &old_pmap->pm_pcids[cpuid]; + old_pcidp->pm_gen = 0; } - cached = pmap_pcid_alloc_checked(pmap, cpuid); + pcidp = &pmap->pm_pcids[cpuid]; + cached = pmap_pcid_alloc_checked(pmap, pcidp); cr3 = rcr3(); if ((cr3 & ~CR3_PCID_MASK) != pmap->pm_cr3) - load_cr3(pmap->pm_cr3 | pmap->pm_pcids[cpuid].pm_pcid); + load_cr3(pmap->pm_cr3 | pcidp->pm_pcid); PCPU_SET(curpmap, pmap); - kcr3 = pmap->pm_cr3 | pmap->pm_pcids[cpuid].pm_pcid; - ucr3 = pmap->pm_ucr3 | pmap->pm_pcids[cpuid].pm_pcid | - PMAP_PCID_USER_PT; + kcr3 = pmap->pm_cr3 | pcidp->pm_pcid; + ucr3 = pmap->pm_ucr3 | pcidp->pm_pcid | PMAP_PCID_USER_PT; if (!cached && pmap->pm_ucr3 != PMAP_NO_CR3) PCPU_SET(ucr3_load_mask, ~CR3_PCID_SAVE); @@ -10021,16 +10021,17 @@ static void pmap_activate_sw_pcid_nopti(struct thread *td __unused, pmap_t pmap, u_int cpuid) { + struct pmap_pcid *pcidp; uint64_t cached, cr3; KASSERT((read_rflags() & PSL_I) == 0, ("PCID needs interrupts disabled in pmap_activate_sw()")); - cached = pmap_pcid_alloc_checked(pmap, cpuid); + pcidp = &pmap->pm_pcids[cpuid]; + cached = pmap_pcid_alloc_checked(pmap, pcidp); cr3 = rcr3(); if (!cached || (cr3 & ~CR3_PCID_MASK) != pmap->pm_cr3) - load_cr3(pmap->pm_cr3 | pmap->pm_pcids[cpuid].pm_pcid | - cached); + load_cr3(pmap->pm_cr3 | pcidp->pm_pcid | cached); PCPU_SET(curpmap, pmap); if (cached) counter_u64_add(pcid_save_cnt, 1); From nobody Tue May 2 11:39:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9dRH6Hhbz48tWj; Tue, 2 May 2023 11:39:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9dRH47yGz3q7f; Tue, 2 May 2023 11:39:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683027595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5aVITDJ/FwISQGWt3FgtwqZVCoSJS/rzEvIkklcypRM=; b=GX/nPgHkRsZefNPYIMt95xmZ90ygCyyeOOFUTcqjcXl2A8Tw8485lYQoHaP4nkhNlRI5pa YuKzaBZdAf5Ea7yhoW8fEjJb/IdViXumg8ljOJ37hrE7EGrst6eBryGaeC5nWzwgONKNFf YIR2xvdwirv7ialap38aCfmSdVDLaske9NSSnhU7Q1DPApFTR9V90TfX0idZ9LsurBMjr3 kETOl3FsfrgdNiQmEAG6VwsOppGbP8+wVosyIf0aaPO6HV14nsIe7/ljFVgTQsBVkxlRrJ hKLe90cofvlKbiEa4bNdOSWoYa5eioS+geKbvCp0mB5e6l3jrcZBMUkdmCLQ4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683027595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5aVITDJ/FwISQGWt3FgtwqZVCoSJS/rzEvIkklcypRM=; b=WcojJpCr+dfpkNHcviRB5+zoKddrHquIeQR0Nk4fNEQFq0cfcs1Nx7UYO9Tc81+couJvJb yEuCy9f2B7WPQAPyZ4SYi/7eh4Qhygqyk3vX3/hHUA72yCZHEUcsBRWnjGgoztgXKqcYsd HWGvJR4AaVwLbl3/uyaLTR902ozZdMGQUCT22FbbAT0lStvoIij5fm2svIRSF4MQlJoBXu nvdBNJOreN8rbNCbVoF0AhwoczJpVxonV2FfXL+xflpVlTwcfXtYfzEyhZqAZ5Dx+I/g6S dZd8G5GXEXnSwlL3BX74c5cAyyArtB4iGdkYW6CtGGXVDgh+4TOx7Zn6cw2tzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683027595; a=rsa-sha256; cv=none; b=RaK0/pcm6ppN2ysNl9KyT8dwa9oNxoWeAMN8TgnJ+YkDM+5W+XKQaJ/Ple2b44oserLExU rR3iPoAJ05WPbGWlLKB6T1ddpxxQ9DN7GZ+Ywu9H9jGS7hHz6LU4ypWC8hhmQfe7My3peH bNW2gvcVXREVsAPEY1O6wQVbpnPjBHBzCcwoBNTQrJo19SjjYlIoQJ985XfvvrLjGzyNGr gy0magW2JF6rct+JKSeXLqiYwOnFYwg65tLgFNUWi862qgDNcv0p3l5uYGYowMis9ZYQWd MNqQymnrsOzkrx7lLjJKBwdQ6LpN7MfArqDCKNc+yof9go56o2Lqe7ekE+I/dQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9dRH3G20zmPd; Tue, 2 May 2023 11:39:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342BdtKT092369; Tue, 2 May 2023 11:39:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342Bdtn7092368; Tue, 2 May 2023 11:39:55 GMT (envelope-from git) Date: Tue, 2 May 2023 11:39:55 GMT Message-Id: <202305021139.342Bdtn7092368@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: 42f722e721cd - main - amd64: store pcids pmap data in pcpu zone List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 42f722e721cd010ae5759a4b0d3b7b93c2b9cad2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=42f722e721cd010ae5759a4b0d3b7b93c2b9cad2 commit 42f722e721cd010ae5759a4b0d3b7b93c2b9cad2 Author: Konstantin Belousov AuthorDate: 2023-05-01 05:17:45 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-02 11:32:47 +0000 amd64: store pcids pmap data in pcpu zone This change eliminates the struct pmap_pcid array embedded into struct pmap and sized by MAXCPU, which would bloat with MAXCPU increase. Also it removes false sharing of cache lines, since the array elements are mostly locally accessed by corresponding CPUs. Suggested by: mjg Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D39890 --- sys/amd64/amd64/pmap.c | 38 +++++++++++++++++++++++++++++--------- sys/amd64/include/pcpu.h | 4 +++- sys/amd64/include/pmap.h | 8 ++++++-- 3 files changed, 38 insertions(+), 12 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index a7716d7f394e..a09920d62961 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -384,7 +384,15 @@ pmap_pku_mask_bit(pmap_t pmap) #define VM_PAGE_TO_PV_LIST_LOCK(m) \ PHYS_TO_PV_LIST_LOCK(VM_PAGE_TO_PHYS(m)) -struct pmap kernel_pmap_store; +/* + * Statically allocate kernel pmap memory. However, memory for + * pm_pcids is obtained after the dynamic allocator is operational. + * Initialize it with a non-canonical pointer to catch early accesses + * regardless of the active mapping. + */ +struct pmap kernel_pmap_store = { + .pm_pcidp = (void *)0xdeadbeefdeadbeef, +}; vm_offset_t virtual_avail; /* VA of first avail page (after kernel bss) */ vm_offset_t virtual_end; /* VA of last avail page (end of kernel AS) */ @@ -2026,9 +2034,14 @@ pmap_bootstrap(vm_paddr_t *firstaddr) /* Initialize TLB Context Id. */ if (pmap_pcid_enabled) { + kernel_pmap->pm_pcidp = (void *)(uintptr_t) + offsetof(struct pcpu, pc_kpmap_store); for (i = 0; i < MAXCPU; i++) { - kernel_pmap->pm_pcids[i].pm_pcid = PMAP_PCID_KERN; - kernel_pmap->pm_pcids[i].pm_gen = 1; + struct pmap_pcid *pcidp; + + pcidp = zpcpu_get_cpu(kernel_pmap->pm_pcidp, i); + pcidp->pm_pcid = PMAP_PCID_KERN; + pcidp->pm_gen = 1; } /* @@ -3031,6 +3044,7 @@ pmap_invalidate_ept(pmap_t pmap) static inline void pmap_invalidate_preipi_pcid(pmap_t pmap) { + struct pmap_pcid *pcidp; u_int cpuid, i; sched_pin(); @@ -3040,8 +3054,10 @@ pmap_invalidate_preipi_pcid(pmap_t pmap) cpuid = 0xffffffff; /* An impossible value */ CPU_FOREACH(i) { - if (cpuid != i) - pmap->pm_pcids[i].pm_gen = 0; + if (cpuid != i) { + pcidp = zpcpu_get_cpu(pmap->pm_pcidp, i); + pcidp->pm_gen = 0; + } } /* @@ -4192,7 +4208,7 @@ pmap_pinit_pcids(pmap_t pmap, uint32_t pcid, int gen) int i; CPU_FOREACH(i) { - pcidp = &pmap->pm_pcids[i]; + pcidp = zpcpu_get_cpu(pmap->pm_pcidp, i); pcidp->pm_pcid = pcid; pcidp->pm_gen = gen; } @@ -4215,6 +4231,7 @@ pmap_pinit0(pmap_t pmap) TAILQ_INIT(&pmap->pm_pvchunk); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); pmap->pm_flags = pmap_flags; + pmap->pm_pcidp = uma_zalloc_pcpu(pcpu_zone_8, M_WAITOK); pmap_pinit_pcids(pmap, PMAP_PCID_KERN + 1, 1); pmap_activate_boot(pmap); td = curthread; @@ -4398,6 +4415,9 @@ pmap_pinit_type(pmap_t pmap, enum pmap_type pm_type, int flags) pmap->pm_pmltop = (pml5_entry_t *)PHYS_TO_DMAP(pmltop_phys); if (pmap_pcid_enabled) { + if (pmap->pm_pcidp == NULL) + pmap->pm_pcidp = uma_zalloc_pcpu(pcpu_zone_8, + M_WAITOK); pmap_pinit_pcids(pmap, PMAP_PCID_NONE, 0); } pmap->pm_cr3 = PMAP_NO_CR3; /* initialize to an invalid value */ @@ -9993,11 +10013,11 @@ pmap_activate_sw_pcid_pti(struct thread *td, pmap_t pmap, u_int cpuid) PCPU_SET(ucr3_load_mask, PMAP_UCR3_NOMASK); old_pmap = PCPU_GET(curpmap); MPASS(old_pmap->pm_ucr3 != PMAP_NO_CR3); - old_pcidp = &old_pmap->pm_pcids[cpuid]; + old_pcidp = zpcpu_get_cpu(old_pmap->pm_pcidp, cpuid); old_pcidp->pm_gen = 0; } - pcidp = &pmap->pm_pcids[cpuid]; + pcidp = zpcpu_get_cpu(pmap->pm_pcidp, cpuid); cached = pmap_pcid_alloc_checked(pmap, pcidp); cr3 = rcr3(); if ((cr3 & ~CR3_PCID_MASK) != pmap->pm_cr3) @@ -10027,7 +10047,7 @@ pmap_activate_sw_pcid_nopti(struct thread *td __unused, pmap_t pmap, KASSERT((read_rflags() & PSL_I) == 0, ("PCID needs interrupts disabled in pmap_activate_sw()")); - pcidp = &pmap->pm_pcids[cpuid]; + pcidp = zpcpu_get_cpu(pmap->pm_pcidp, cpuid); cached = pmap_pcid_alloc_checked(pmap, pcidp); cr3 = rcr3(); if (!cached || (cr3 & ~CR3_PCID_MASK) != pmap->pm_cr3) diff --git a/sys/amd64/include/pcpu.h b/sys/amd64/include/pcpu.h index c0c35f4419e8..342bdde312be 100644 --- a/sys/amd64/include/pcpu.h +++ b/sys/amd64/include/pcpu.h @@ -35,6 +35,7 @@ #ifndef _MACHINE_PCPU_H_ #define _MACHINE_PCPU_H_ +#include #include #include @@ -101,7 +102,8 @@ _Static_assert(sizeof(struct monitorbuf) == 128, "2x cache line"); uint64_t pc_ucr3_load_mask; \ u_int pc_small_core; \ u_int pc_pcid_invlpg_workaround; \ - char __pad[2908] /* pad to UMA_PCPU_ALLOC_SIZE */ + struct pmap_pcid pc_kpmap_store; \ + char __pad[2900] /* pad to UMA_PCPU_ALLOC_SIZE */ #define PC_DBREG_CMD_NONE 0 #define PC_DBREG_CMD_LOAD 1 diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index cef718fb50d5..1b3aeb248ebb 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -286,6 +286,7 @@ #ifndef LOCORE +#include #include #include #include @@ -390,7 +391,7 @@ struct pmap { long pm_eptgen; /* EPT pmap generation id */ smr_t pm_eptsmr; int pm_flags; - struct pmap_pcid pm_pcids[MAXCPU]; + struct pmap_pcid *pm_pcidp; struct rangeset pm_pkru; }; @@ -537,8 +538,11 @@ pmap_invlpg(pmap_t pmap, vm_offset_t va) static __inline uint32_t pmap_get_pcid(pmap_t pmap) { + struct pmap_pcid *pcidp; + MPASS(pmap_pcid_enabled); - return (pmap->pm_pcids[PCPU_GET(cpuid)].pm_pcid); + pcidp = zpcpu_get(pmap->pm_pcidp); + return (pcidp->pm_pcid); } #endif /* _KERNEL */ From nobody Tue May 2 12:20:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9fLK5fYmz48wDq; Tue, 2 May 2023 12:20:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9fLK5CWxz3thl; Tue, 2 May 2023 12:20:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683030041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uXOT0xGaHYqivs0iNlWLQumvjmypZ2FRGuOWLXnps2k=; b=NEYlfAQmtz/9QUrYA/YFf362kAldq8mHJaPo7tWg9297vob4GHH7/oDF+OqfHEVr2PUj2z 0mmtHLB+KljWJcxjjc7vnINnWCzNynTjkKoE8zkce9z8Pp3A4pOP0CHmIJVlgSt4b8BIdE duwSWrWV9r/LKLrb8IPhliZDo0oG6vkJgTrgOxCJqFShF0I+haNeGN0i+HdS1C1WLwWtv5 UqPEpzZBOSz2WpIyS/lh3PkmANlWauKalDF6Wq0n1ncGv1YK/IJBhOnY0WDk7D8INsyNh7 UpQwPOuJ9Zn9dOLd6jOmA+4d6TpJ2hnF+Gdw1R3XHkhFaBMTRNvNbD9HT5Rvbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683030041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uXOT0xGaHYqivs0iNlWLQumvjmypZ2FRGuOWLXnps2k=; b=ijsiHlnDL6DWEhB03lQXkhOLI6vKnNLYvGI/SZRjf0avr86hw/QPKE5mZxhjC5L4p2wpKU Aih3qaR9VLI0+Lda40GqrEwas2rnKxnlsUMRKT351vj8ZalzpKQL16gXkEyNUx4FZmemlW PFfZAqdiqq9o+Sl/GoQej23eRahd/yslLreXLDsArEbUiRBKzzFXZpOKLLKwlP4H5sFdQk yxGevVb4ffG6mI3ZFpy7+YyTEU+MLkdyrlZepSEAbXxkGByZXZnDwMK/Ay8r8UUku29Wxj 9ccrXToXFUWq1nc5VvBKh/862pw1mER60Udw35YxvBHUMvlnwg3lFRQBeJXGYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683030041; a=rsa-sha256; cv=none; b=pLCqCAH3/3ShF5J5vSIKnFjiCToDNKo0wgZ7nMnKqe8V9XDMK2tZf+zBtS5sdh0hVxeRgN Bk6BTAn+5/0S63crs+zqLUFSl1MBJIDSXdkd0IWVMtfDsFNC53VKPtsUdmuSP1IrTm39Ou YxVBEYOzrGkBb5R7Ip6TFpHzTuGCdI6pcV5sIMt5uw9FqvB6COthx950Qlp5CZ61mzEIez rJ446M8ItH1/0ZuQ+idGiecBJ9eIYM0PpQ3TV5U/NJf7lQZK0DCU5zwVdts7Bj8W2WhS03 BrxJz2JSeY/sD7bhqG2COIVacTParpnbCespFRYPSdIccNC2HYLp4MJCvZhQrg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9fLK4JGSznGG; Tue, 2 May 2023 12:20:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342CKfaJ067607; Tue, 2 May 2023 12:20:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342CKflN067606; Tue, 2 May 2023 12:20:41 GMT (envelope-from git) Date: Tue, 2 May 2023 12:20:41 GMT Message-Id: <202305021220.342CKflN067606@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mariusz Zaborski Subject: git: 2de69df6f398 - stable/12 - mpr: fix copying of event_mask List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 2de69df6f398987cecbc5ac02b2183c561e0f220 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=2de69df6f398987cecbc5ac02b2183c561e0f220 commit 2de69df6f398987cecbc5ac02b2183c561e0f220 Author: Mariusz Zaborski AuthorDate: 2023-04-21 07:50:16 +0000 Commit: Mariusz Zaborski CommitDate: 2023-05-02 12:19:26 +0000 mpr: fix copying of event_mask Before the commit 6cc44223cb6717795afdac4348bbe7e2a968a07d the field event_mask was fully copied to the EventMasks field. After this commit the event_mask (uint8_t) is 4 times casted to EventMask (uint32_t). Because of that 24 bits of each event_mask array is lost. This commits brings back simple copying of field, and after words converting 32 bits field to the requested endian. I don't think we need more sophisticated method, as the array is of size 4 (for 32 bits version). Reviewed by: imp MFC after: 1 week Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D39562 (cherry picked from commit ea6597c38c77c7bfaae71259d8636cbb89add6a3) --- sys/dev/mpr/mpr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/mpr/mpr.c b/sys/dev/mpr/mpr.c index 308c88112168..33afb7adf852 100644 --- a/sys/dev/mpr/mpr.c +++ b/sys/dev/mpr/mpr.c @@ -2795,8 +2795,9 @@ mpr_update_events(struct mpr_softc *sc, struct mpr_event_handle *handle, bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, 16); } #else + bcopy(sc->event_mask, (uint8_t *)&evtreq->EventMasks, sizeof(sc->event_mask)); for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) - evtreq->EventMasks[i] = htole32(sc->event_mask[i]); + evtreq->EventMasks[i] = htole32(evtreq->EventMasks[i]); #endif cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; cm->cm_data = NULL; @@ -2850,8 +2851,9 @@ mpr_reregister_events(struct mpr_softc *sc) bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, 16); } #else + bcopy(sc->event_mask, (uint8_t *)&evtreq->EventMasks, sizeof(sc->event_mask)); for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) - evtreq->EventMasks[i] = htole32(sc->event_mask[i]); + evtreq->EventMasks[i] = htole32(evtreq->EventMasks[i]); #endif cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; cm->cm_data = NULL; From nobody Tue May 2 12:20:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9fLM1CMbz48wDr; Tue, 2 May 2023 12:20:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9fLL67s6z3tgS; Tue, 2 May 2023 12:20:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683030042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dqVMgIoRUiWnGQETenOZsfGar4NP+8/8XpiupNqJkWg=; b=LLfotNiLnZpuxy/InUNHDW45gVwXSKUVXTZw/F+SxOUyaMisK6EILrbPCbvNKtrokRk8HA ZqRqwjlZpo7Au+bh5H4rXuLJ0oujr5Yu171lLZxM7/O/aV6QUrfkdibeeejd33O7W8C/7d ouE7DbA0XxhN5pSxg0Ws41xTG/KnfJ6/l7TAKjqKRZ3xT6FZimUXx1xW4BdwY7OeGa+Jx2 c587GnJD2mbGx96BSoeOIFAP9GZVPe39UgnahfJmrTMzR0ZTWPXnnc+9NE7IE/nb9YRhWZ CXWvAJiO2WLdkajLw62Y4dDNRL78U+BzNgsClzPbSpyhokOL0sGS+IsXYtjjhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683030042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dqVMgIoRUiWnGQETenOZsfGar4NP+8/8XpiupNqJkWg=; b=mItCIar7KeQbzJ/4+B3lv02awxUylnuU598+trdfGMD93K5Mo+5w7kF8oL/bXz9w7oRv18 KjoZMr3RCQJLq6QsZfOWWiImZ9AKFCO5gDkI2Q7A9HXyD8OhCAEdgdtAlUO+fKZfQbKONz 9eVlAX8DPy3DMUnp6x3I5SR+MFTichljZRB5k3Z1tCdhSOj7rhD9gOH5dSa94gKO33HKWx ZOUug4fftM6PmrE8w9jJzGtYVn2h+syeo4AIzXEmVrsT+alKFBsK1xIFWoGKxD1cHv/SsM ikJp+UMWZPT4lGTKcqYAT6FL7FTAIEuoNTbEYgNmQR5nW+9n4Afr1lWZGDJGXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683030042; a=rsa-sha256; cv=none; b=YFkMwRNGyMjXWufZQI5dyRCe8lEMDBwvE2HQl8y0g0IGNEgvhSyZwJJPg/5hlmVEDTNsbd 1lJn61Y8c6YCx8quO0ZyOYyR91n0sKWXrSEqVB0SwB9QDFfkgfW4DhDnpDrzebC5n14so7 gvMnb4hqDWHq5dybY3pLVC7Er9PhFf9Ztr4la8L6m4baiuwJHWS+V0L+LoBpdfE5eMtovx WtGh/SpKaorq3HrmToIqy4zdP3elICVowAU3Qa68RDt1079rxPx8To+tE/ChgPBhqOMKlp cmQvSo4q79MUbQMKjqHyPv+/BhhFPm3NwZ3sp8vJsx750yGcFseRCXOg2v8pxw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9fLL58jfznR7; Tue, 2 May 2023 12:20:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342CKg7P067632; Tue, 2 May 2023 12:20:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342CKgHs067631; Tue, 2 May 2023 12:20:42 GMT (envelope-from git) Date: Tue, 2 May 2023 12:20:42 GMT Message-Id: <202305021220.342CKgHs067631@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mariusz Zaborski Subject: git: 485005801104 - stable/12 - mpr: don't use hardcoded value in debug branch List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 4850058011041b5e3b1956cd76016f6cc50dc979 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=4850058011041b5e3b1956cd76016f6cc50dc979 commit 4850058011041b5e3b1956cd76016f6cc50dc979 Author: Mariusz Zaborski AuthorDate: 2023-04-21 07:57:38 +0000 Commit: Mariusz Zaborski CommitDate: 2023-05-02 12:19:35 +0000 mpr: don't use hardcoded value in debug branch Pointed out by: imp Sponsored by: Klara Inc. (cherry picked from commit 444c6615459efe2b015deb1cffc54fcaa3ea1fca) --- sys/dev/mpr/mpr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/dev/mpr/mpr.c b/sys/dev/mpr/mpr.c index 33afb7adf852..562d629c7afa 100644 --- a/sys/dev/mpr/mpr.c +++ b/sys/dev/mpr/mpr.c @@ -2790,9 +2790,9 @@ mpr_update_events(struct mpr_softc *sc, struct mpr_event_handle *handle, evtreq->SASBroadcastPrimitiveMasks = 0; #ifdef MPR_DEBUG_ALL_EVENTS { - u_char fullmask[16]; - memset(fullmask, 0x00, 16); - bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, 16); + u_char fullmask[sizeof(evtreq->EventMasks)]; + memset(fullmask, 0x00, sizeof(fullmask)); + bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, sizeof(fullmask)); } #else bcopy(sc->event_mask, (uint8_t *)&evtreq->EventMasks, sizeof(sc->event_mask)); @@ -2846,9 +2846,9 @@ mpr_reregister_events(struct mpr_softc *sc) evtreq->SASBroadcastPrimitiveMasks = 0; #ifdef MPR_DEBUG_ALL_EVENTS { - u_char fullmask[16]; - memset(fullmask, 0x00, 16); - bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, 16); + u_char fullmask[sizeof(evtreq->EventMasks)]; + memset(fullmask, 0x00, sizeof(fullmask)); + bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, sizeof(fullmask)); } #else bcopy(sc->event_mask, (uint8_t *)&evtreq->EventMasks, sizeof(sc->event_mask)); From nobody Tue May 2 12:22:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9fMy3gCtz48wkh; Tue, 2 May 2023 12:22: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 4Q9fMy3Fs9z3vZD; Tue, 2 May 2023 12:22:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683030126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oJpv64Xrstpr5hBfu4kP5YuRnzEU8+78QMI5L2tUiVo=; b=Wh2Te2NGHZX/cHrtrzrZQHf+kldyVK8TGUszp9Fir8FgdVQIpChFG04+aTBtAp/IIavGfY K7Nchs1O2d+mXfsTr2kCtzU8Xs9elwa0XsGebmRWwnxBszgKUF1yiNbPDZRodtZ687OSSq qij00OBPr+yKE1aALNB+84PoplwMAVW14gZTAMoQCzi40Fcc68lQUN6nBZ2mEevGWtL2NR 1iF+rBDngT2ZjTyOIgKyqyhwGx3G80b472n89TDLX5cfqHqxwQYdhjjeFvz+5jRHy3A8HD IGj+/RNWslGo6Vi/VfHnK/TYicpJRcHyd8FV7PhN2WnVW8jczLfTi3DBndyauQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683030126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oJpv64Xrstpr5hBfu4kP5YuRnzEU8+78QMI5L2tUiVo=; b=Rbg2AE3joJ2FPsi32hRSSpT6GNwQ2fXYOhDlQjZ1ww3M6CDv5RVkAly6y6nckFa9gn8Wtw zBrKsgYDhe0Swfe9LSxO5T+HxMha3RiCF3ffb/XJNreY1I9djm4x9hMME93KJ0zisDBA0A Txr0gDAotmhGwxmq4QXbi95jR+fG7UEAI4L+hjkcChzrQ1XNm5gRNbo83PSFs1IBjEOBn5 RS2RBn4urAvDGvjYeafrle1zp5YFIwZUPouYhDRHw/KJL3nzTkBwPP/hs2THLONQ6O/7OH UBZcACNsrqTK4xK5Wl9cC9x1VwVxDw8z074wKvkKwFjB/anbuRlU2x4YAOPl+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683030126; a=rsa-sha256; cv=none; b=cee95fEaGZZ7n9rtB0jsxn5yqH5VOGvrbOAoLDpmx5rub4A9xl6uGaeK8TGl+Nqocltwfv rio2sS8JA/hP7atSxHRF4tHCCu48PHT8kHFmB9nMHesAJvBeCQIK6hKJ9MBhG3/Sjucc52 Hjll6KRQ9z98cwjavNVEulhmbdewCM0kIdA43aQd8mgRco0NhRd1R7hB4/c5zjRMJOTJEf fdPAI9r3w/k04NXTb+X0hmj4kDom9HtWzSqDiMZ1epU+K8dXuj1V5s7bts4vOWR7K9Mxnn XJoNnSeYyQUKA2MI44ELW4q8uuLLj+Fiz+5OIZF4Tjd+CtvtXqdqZsX3vsH59w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9fMy2JxyznJH; Tue, 2 May 2023 12:22:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342CM6jb073118; Tue, 2 May 2023 12:22:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342CM68D073117; Tue, 2 May 2023 12:22:06 GMT (envelope-from git) Date: Tue, 2 May 2023 12:22:06 GMT Message-Id: <202305021222.342CM68D073117@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mariusz Zaborski Subject: git: e7a3a08febd0 - stable/13 - mpr: fix copying of event_mask List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e7a3a08febd01c95b74185bb971ec29cca64b8e1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=e7a3a08febd01c95b74185bb971ec29cca64b8e1 commit e7a3a08febd01c95b74185bb971ec29cca64b8e1 Author: Mariusz Zaborski AuthorDate: 2023-04-21 07:50:16 +0000 Commit: Mariusz Zaborski CommitDate: 2023-05-02 12:21:35 +0000 mpr: fix copying of event_mask Before the commit 6cc44223cb6717795afdac4348bbe7e2a968a07d the field event_mask was fully copied to the EventMasks field. After this commit the event_mask (uint8_t) is 4 times casted to EventMask (uint32_t). Because of that 24 bits of each event_mask array is lost. This commits brings back simple copying of field, and after words converting 32 bits field to the requested endian. I don't think we need more sophisticated method, as the array is of size 4 (for 32 bits version). Reviewed by: imp MFC after: 1 week Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D39562 (cherry picked from commit ea6597c38c77c7bfaae71259d8636cbb89add6a3) --- sys/dev/mpr/mpr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/mpr/mpr.c b/sys/dev/mpr/mpr.c index 6f54b1f57950..c105174b0e21 100644 --- a/sys/dev/mpr/mpr.c +++ b/sys/dev/mpr/mpr.c @@ -2764,8 +2764,9 @@ mpr_update_events(struct mpr_softc *sc, struct mpr_event_handle *handle, bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, 16); } #else + bcopy(sc->event_mask, (uint8_t *)&evtreq->EventMasks, sizeof(sc->event_mask)); for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) - evtreq->EventMasks[i] = htole32(sc->event_mask[i]); + evtreq->EventMasks[i] = htole32(evtreq->EventMasks[i]); #endif cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; cm->cm_data = NULL; @@ -2819,8 +2820,9 @@ mpr_reregister_events(struct mpr_softc *sc) bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, 16); } #else + bcopy(sc->event_mask, (uint8_t *)&evtreq->EventMasks, sizeof(sc->event_mask)); for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) - evtreq->EventMasks[i] = htole32(sc->event_mask[i]); + evtreq->EventMasks[i] = htole32(evtreq->EventMasks[i]); #endif cm->cm_desc.Default.RequestFlags = MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE; cm->cm_data = NULL; From nobody Tue May 2 12:22:07 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9fMz4RRnz48wj8; Tue, 2 May 2023 12:22:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9fMz3mJ0z3vML; Tue, 2 May 2023 12:22:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683030127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7p0xH60o2FgIxavuNVRqmRDMdOh9qtrBBiNYgBFhyLU=; b=QQWfP/bYmFpN+Ckgs2hkx915/iDMi8JwU+M9JsadniO+KIQ46VgXYN+7Ihkk5nqu5x+qdC 3h8qNwsqb2o8hbj0d0ujZZDyTF2oTBWI5vdU3FaxpjZImyLqF2c/8JtTmDpSon895F51I9 j5Tv/Rnzad/DXe1aDv89/iRXW2W1/Sf2mXIMbdzNcon5iBm6OMRKtue2raa5R/YOb+64Of co00TxHslG9I0Hl2p9z/hwmRuCMBSAD35hKgesy/cbYANnh4y+L1Bp6QzMSYxYeR/wbd2T BtLouSa6qhKKw3wYCmIaleupz4LWTpCPCDs+qM/1wUSGK0zHxAQdQsDDl5hMcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683030127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7p0xH60o2FgIxavuNVRqmRDMdOh9qtrBBiNYgBFhyLU=; b=OvS3XzUeqCq0mNGQNtaE4Ejck9dmSy99AcH/wbfjgdnMvvWmB1xp5/2wYXh+wEDaJn6qIV BjnUDOQK/2sTwTVApc+T99ATAzKN02HfNeyc0ytI06skA1pSoD62YJoSjlnI97h4X3ocXR w+i6XK8X42iRSJZRTjszw9Fei3L1rgWRRwCw5+Ie96i48W3fmoTW6Z671lRxyJGUsTjB7D 2YYjCEEXwYSQiefGW6TAavZNy8fTgZJsof6S35DWHtV3C15w3AnXMaxSJjg3Kamz5inhpN NQax0hEzsDPe3n2awoqXs6S3kYsnH5D9N9S5oYb+wOw0W/Pw3Lix+BTf+cxf5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683030127; a=rsa-sha256; cv=none; b=L+gLs/TbQKQsWz/FqNCABQARZav8OvIrMi806HuS/YwVnkEmbPumJ8rCMgMnWBIt4bwIbM CI89qnwcrFzuaso4S89fXTbBkep3WauzbBjHSXraljaw6Nw5Son1JvmXfvZvneLLmtIbdx DsF7GcQRKnRLF515M7kBIpL9jlB5iWmfpg1NSQ/gm5kXwr1KycS/WiK0Q7HCm6rRSDsySs ZES61LStNqCziHIM6pohkcgfJtqRIKOsE/dlG1NIWGXDjxGU0X69GJpBW1plA8JycmQLLl C0nKW42P00UgO7i3PJO428lu3AD5vHXbb5xgmPy4SwF0288qw2+i4ftgrG9I5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9fMz2kBwzn6y; Tue, 2 May 2023 12:22:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342CM7XP073147; Tue, 2 May 2023 12:22:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342CM7DA073146; Tue, 2 May 2023 12:22:07 GMT (envelope-from git) Date: Tue, 2 May 2023 12:22:07 GMT Message-Id: <202305021222.342CM7DA073146@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mariusz Zaborski Subject: git: 834fdebb56fb - stable/13 - mpr: don't use hardcoded value in debug branch List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 834fdebb56fbf9ae111f5da91683fea5ddcebe08 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=834fdebb56fbf9ae111f5da91683fea5ddcebe08 commit 834fdebb56fbf9ae111f5da91683fea5ddcebe08 Author: Mariusz Zaborski AuthorDate: 2023-04-21 07:57:38 +0000 Commit: Mariusz Zaborski CommitDate: 2023-05-02 12:21:48 +0000 mpr: don't use hardcoded value in debug branch Pointed out by: imp Sponsored by: Klara Inc. (cherry picked from commit 444c6615459efe2b015deb1cffc54fcaa3ea1fca) --- sys/dev/mpr/mpr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/dev/mpr/mpr.c b/sys/dev/mpr/mpr.c index c105174b0e21..35d59b43a011 100644 --- a/sys/dev/mpr/mpr.c +++ b/sys/dev/mpr/mpr.c @@ -2759,9 +2759,9 @@ mpr_update_events(struct mpr_softc *sc, struct mpr_event_handle *handle, evtreq->SASBroadcastPrimitiveMasks = 0; #ifdef MPR_DEBUG_ALL_EVENTS { - u_char fullmask[16]; - memset(fullmask, 0x00, 16); - bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, 16); + u_char fullmask[sizeof(evtreq->EventMasks)]; + memset(fullmask, 0x00, sizeof(fullmask)); + bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, sizeof(fullmask)); } #else bcopy(sc->event_mask, (uint8_t *)&evtreq->EventMasks, sizeof(sc->event_mask)); @@ -2815,9 +2815,9 @@ mpr_reregister_events(struct mpr_softc *sc) evtreq->SASBroadcastPrimitiveMasks = 0; #ifdef MPR_DEBUG_ALL_EVENTS { - u_char fullmask[16]; - memset(fullmask, 0x00, 16); - bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, 16); + u_char fullmask[sizeof(evtreq->EventMasks)]; + memset(fullmask, 0x00, sizeof(fullmask)); + bcopy(fullmask, (uint8_t *)&evtreq->EventMasks, sizeof(fullmask)); } #else bcopy(sc->event_mask, (uint8_t *)&evtreq->EventMasks, sizeof(sc->event_mask)); From nobody Tue May 2 14:08:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9hl624Lhz491Yn; Tue, 2 May 2023 14:08: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 4Q9hl61Rzsz45dF; Tue, 2 May 2023 14:08:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683036530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bHZNvtfXcEhmeSUEqEv0lRUOG/4DO57k50g0Q+3XNwI=; b=ZCHJm0xmvJXQLDUO417siao0bZNaeq359e/xgXQ7psLHxBT2B1zWNnkaS0JPBwBExgdFHf GK4R3oXFsfMHuUyxzmP7PGZOoqKRikQjstpR/SWVWCp1av2rVofib0b6UX0IRu0YdyoUTf 6fSaa3X1mpTLFuA4VqwwPRyYkX+q+k1uzPU+yi0PbmYJg7MtuSzL/ca/dZQgRaBbsVCFpF SKcLWPJxuqZXC3h5t4VTCr4nyLgxXZn7Of/z541VrlYSr1J2CXPKDnahl3cQZITZaSorrY W7rz1oo4k7s84sWTTffTOpkVDYBihc+78l1aifLzp3yULJ7yw6/sn8Q5pQUNHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683036530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bHZNvtfXcEhmeSUEqEv0lRUOG/4DO57k50g0Q+3XNwI=; b=NPdCM9eJlagiIty/5CMWanGHzSAuJHTlOyw3TOF5RJEboCC9fMIouvfjECo2R8FVDPyb0U uPd+b9dPek/PDsoWKtrYoeTzqU3DCYLSrtMsf9hE+755ZhTAs9QCehCpLnyoPuLax7L5Ag Thx3tui3fHgEmwvemqBqFMGcJk0DWWMGmI25JRGhfvlK+2lNyjNDARbryznFXyhYqk2uwa ok96Z8gHSwbuTSQ4aadkHTc0pIsOU0KPetxl2YjKszMReUdIilbc3HezmXM8Zdlk2/jeBZ Jio3SscEiyIX4llG2z6QhYsS7F9ETG1UoGWFD+zBnD0hVdMIUAGiH4Yt4kUWZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683036530; a=rsa-sha256; cv=none; b=eKxi5eg7nWouMduJE6lFHMANiL4wGeYV56JU3XUfL9cTFVSFk9UGlSYBxqTKpU2swiKtsj HMESyrBptl5ze/c0WiRcab8HY/qm5b15f9LkFtRCWO6J1acuP6MPy4Ue3z/9dUvFF8ZGAm oTXnRb7eOISYXVbAj9faUupV81D5Ipe9fLadW/BpkSLYVHJF/QxYnYYVDNj60tX/jRJ5Ik 0idgtpvQTcts0kUnCicw4XznV0QIqocv3pFmUCe4HoNegwdAlv5ooVGfab+BDjYNJR2lB/ oSblRnVn2rKgqvnETYDCyBujIAxiSpCN2YAlBUvUQDTzFDsLtuaOPs6PYvMYhQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9hl60Pm4zr0B; Tue, 2 May 2023 14:08:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342E8nw8041015; Tue, 2 May 2023 14:08:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342E8nRS041014; Tue, 2 May 2023 14:08:49 GMT (envelope-from git) Date: Tue, 2 May 2023 14:08:49 GMT Message-Id: <202305021408.342E8nRS041014@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Jason A. Harmening" Subject: git: 6f378116e9bf - main - Intel DMAR: remove parsing of 6-level paging capability List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jah X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6f378116e9bf982b8246d033d81cb64d52b24462 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=6f378116e9bf982b8246d033d81cb64d52b24462 commit 6f378116e9bf982b8246d033d81cb64d52b24462 Author: Jason A. Harmening AuthorDate: 2023-05-01 16:22:39 +0000 Commit: Jason A. Harmening CommitDate: 2023-05-02 14:06:11 +0000 Intel DMAR: remove parsing of 6-level paging capability Early versions of the VT-d spec mentioned 6-level paging support as a possible value for the SAGAW capability, but later versions removed it and SAGAW=0x10 is currently listed as a reserved value. The 6-level (agaw=64) entry in sagaw_bits is furthermore problematic with clang15 because the attempted comparison against 1ULL << 64 in dmar_maxaddr2mgaw() causes the compiler to elide the last iteration of the initial loop, which bypasses the subsequent logic to find the greatest HW-supported address width. This results in 5-level paging always being selected regardless of whether the hardware supports it, which can result address translation failure due to invalid context- entry programming. Reviewed by: kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D39896 --- sys/x86/iommu/intel_utils.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sys/x86/iommu/intel_utils.c b/sys/x86/iommu/intel_utils.c index e3ebea648c4c..f2cf58ca04fa 100644 --- a/sys/x86/iommu/intel_utils.c +++ b/sys/x86/iommu/intel_utils.c @@ -99,9 +99,14 @@ static const struct sagaw_bits_tag { {.agaw = 48, .cap = DMAR_CAP_SAGAW_4LVL, .awlvl = DMAR_CTX2_AW_4LVL, .pglvl = 4}, {.agaw = 57, .cap = DMAR_CAP_SAGAW_5LVL, .awlvl = DMAR_CTX2_AW_5LVL, - .pglvl = 5}, - {.agaw = 64, .cap = DMAR_CAP_SAGAW_6LVL, .awlvl = DMAR_CTX2_AW_6LVL, - .pglvl = 6} + .pglvl = 5} + /* + * 6-level paging (DMAR_CAP_SAGAW_6LVL) is not supported on any + * current VT-d hardware and its SAGAW field value is listed as + * reserved in the VT-d spec. If support is added in the future, + * this structure and the logic in dmar_maxaddr2mgaw() will need + * to change to avoid attempted comparison against 1ULL << 64. + */ }; bool From nobody Tue May 2 15:12:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9k900Fd6z494GX; Tue, 2 May 2023 15:12: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 4Q9k8z6PWmz4FYj; Tue, 2 May 2023 15:12:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683040371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UKoBdg+HQaXykZF2yJIZkV12X5nbiw90PT5xCT0kGyA=; b=sJK+XEYwioocHvCv5VWviuMGMho6FM5v7YiRrlQxhSa9zfaPJwBKg04QvceaKO1eqXaET+ czeiIDAUMJN6GwSCWADw7cFb5suous+k8LIiUpyw62Qf6lCXb5DsX3kjUG+3OgKUZn5UOd PaZUd4D/Rl5dr2x9l9JsdAIBB1fqGlANjCV5aaPJJIKk1P9/dUymM2fFxnj9qko76/0y5x kwgyFSEqvS057zCFJ2BgqQK1HcSlfrsz16iRnk4IEwSXAsdQqCmzY5t5c7M/sUfAwURmrQ eRoM9AgBIA39e1ui1FGHK9f0Q/ymuzz9oYmJ6ABG1QqmBnVxOZgjUEfzgSusfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683040371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UKoBdg+HQaXykZF2yJIZkV12X5nbiw90PT5xCT0kGyA=; b=gDJ/2ce2avDMyHS/G0QdJCSGVa/VtAab1zVWrt39EN/0az5XyeYPfuOP/5Mp17+SJp0qdH /mF2muDDTa+h9/nLNnWW3/HGw5u6NW4OVS5QLirwcRbjhc1qvhmzu3dxH6pSpXAUo/NnOE iRuN5clcZAHC3Io5fa+Ge4mzHXTZceHSPYt6DpL0xP4qsGPTtnVrlzcJ8ZfE8FFn3qqjrj yf1mHYgZhveqrmlc1HK/o8HXaTlgaW2ctbwaDbfPuKSBWg7y4lBco3KwM19gGV4HEWgcYi gPBxOP8egLuPgMliwc0HrcVAYqvz06fz9kJqHxBxWGHYgiNH2m7nORnQNz9FPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683040371; a=rsa-sha256; cv=none; b=S0W81LV0XGpfKGQYxV4h/Q5+sbykGA1NNlirpLqG6Frs0VzRC0BdKREhEZBDBMNPb8F1BS O8rgvG8+tSeRA/TJPo2X6djLB7Tl848QL0L2MOWWK5gu/utBA+eDme3b2M5lNJT5ZCZWl/ 0xkkbASE0NVQ/gf6WPCM8YeAO+1SiJY9emxs8XZjpz7nzgCuth1ZBhJ0D7Lg4RceWhrs2g DSzxqh/lTrpti7pWJwuEGZxT4IfVfptPu4ntQFHdhY8MwnkTOiUFrx4t9tPVDqe43gRQ3H 0ah9qF+DcJaSChJZFfMlj4RgnYrd/iUX2ww9nG5XkIo+/7yfDlgO2Qzd6XVMrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9k8z5QLczspP; Tue, 2 May 2023 15:12:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342FCpxX056203; Tue, 2 May 2023 15:12:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342FCpbN056202; Tue, 2 May 2023 15:12:51 GMT (envelope-from git) Date: Tue, 2 May 2023 15:12:51 GMT Message-Id: <202305021512.342FCpbN056202@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: a1d71cebc05c - main - fstatat(2): restore AT_EMPTY_PATH handling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a1d71cebc05ccfeedf95f2db3e94b17270167888 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a1d71cebc05ccfeedf95f2db3e94b17270167888 commit a1d71cebc05ccfeedf95f2db3e94b17270167888 Author: Konstantin Belousov AuthorDate: 2023-05-02 15:11:39 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-02 15:11:39 +0000 fstatat(2): restore AT_EMPTY_PATH handling Fixes: cb858340dcbf214cc4c4d78dbb741620d7b3a252 Reported by: markj Sponsored by: The FreeBSD Foundation --- sys/kern/vfs_syscalls.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 5c0a291e3b0b..d68af4ea4d51 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -2438,8 +2438,12 @@ kern_statat(struct thread *td, int flag, int fd, const char *path, AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH) | LOCKSHARED | LOCKLEAF | AUDITVNODE1, pathseg, path, fd, &cap_fstat_rights); - if ((error = namei(&nd)) != 0) + if ((error = namei(&nd)) != 0) { + if (error == ENOTDIR && + (nd.ni_resflags & NIRES_EMPTYPATH) != 0) + error = kern_fstat(td, fd, sbp); return (error); + } error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED); NDFREE_PNBUF(&nd); vput(nd.ni_vp); From nobody Tue May 2 16:07:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9lNQ53Cgz4971M; Tue, 2 May 2023 16:07: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 4Q9lNQ4DLLz4MX0; Tue, 2 May 2023 16:07:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683043670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+wabTW0aVaBRpETJEMbIfwnyJIud0PBWSnrd36fFypo=; b=rEW2RoLp2+q753/NoSL1GE5yCSZZVlSUCIpA2L2LvV4zsjwR843sYSGCEhjAd53LTiSQpT F83s4WKAKmMMIc0RmF7pe8pRuO6ybetI5OBr/aDezu6COLOwJHTsY6fKea+q9Rc7wSefkw kh04MUWJms3LYMhw/qzrtq/2oWRKfpOMrIXOerixcFWdD2j2wDWmAebVQcyBLOjrSaQ1oD TUU1F+zrmtqGgIejM0gbefnpVsaFtuac1nchUKETuJqT9X0ZV5K/avnqDhoI8JM0k3QKwS FpLCyrZv5cY9/ZxT/Cnz9o8ZbGDUt6R6c1a5GRhuQAR4J7PTb6iSTGXA4PKo5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683043670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+wabTW0aVaBRpETJEMbIfwnyJIud0PBWSnrd36fFypo=; b=R7Sb7VV1m1leEenQcXEDuujCwLq77zm8NAj1cHeufTmh/l1pV86u8DamaXZ4bG04D+Odr2 7oado/hJ6V8pVnHP9fZk6lxjq/qvlUV9pVhytWQ2tjQ/KrRf8Uhnax5JArTgUC6OsJ+u67 rpkGoXzu8mJwuSY0jhk7hfXF0q2hjrXWGkndrpBF5vaDeBdlsOS9mtOmQWouo68g+Y7hQ0 SplJQX0HLPV8G7Hc05QKEoc2FaKau3do6FBIdIppab64i34EtetU4TMonkkdwV4sWsR+Pr JIP6ERioghbZrCgI0e7aoFcCuUHu08lP97h9PNHl85g+tVoSiRk/n550+1k9Iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683043670; a=rsa-sha256; cv=none; b=UzXfRArYVGzp4T9MDyJKJKrSUv4GAjdjTCNvjD04QfIP8eszPPRu2vsBVOe8wycjoJGAw1 2SQ4WklQNC7od819Nj4QiIUo67s0gwM6OQAnizzUVuq+NIdvfFlxVRCOmsBVkGPRkANzpI WzYE7MbFJaNS15cs2tG3TSnyFMZfp7ik+KrfxVKDoeQN7MtzDs2tu97fpcZ8DWJcKZOPw8 32yf74B2rvxo77dzUQaUUFD3nsL4p+aYLho8rDuYgPhGDJo1dWVmfVdd8pvptULk54hOU/ q4q4XV9G2pzNwT21dZwXUJDQX/dtmfjwyI3LXqoiSjNjxdxRiu9C8K/F3D4I+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 4Q9lNQ3HHnztjG; Tue, 2 May 2023 16:07:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342G7oIl040167; Tue, 2 May 2023 16:07:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342G7oRW040166; Tue, 2 May 2023 16:07:50 GMT (envelope-from git) Date: Tue, 2 May 2023 16:07:50 GMT Message-Id: <202305021607.342G7oRW040166@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: 476babaea7a3 - main - rtsol: introduce an 'always' script List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 476babaea7a32ef215e6a3791eed267252f93d79 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=476babaea7a32ef215e6a3791eed267252f93d79 commit 476babaea7a32ef215e6a3791eed267252f93d79 Author: Kristof Provost AuthorDate: 2023-05-02 08:45:01 +0000 Commit: Kristof Provost CommitDate: 2023-05-02 16:07:36 +0000 rtsol: introduce an 'always' script In addition to the 'M' and 'O' scripts (for when 'Managed' and 'Other' flags are set) also introduce an 'always' script that is called for any router advertisement (so even if M and O are not set). This is primarly useful for systems like pfSense that wish to be informed of routers for further system configuration. See also https://redmine.pfsense.org/issues/14072 Reviewed by: melifaro Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D39931 --- usr.sbin/rtsold/rtsol.c | 12 ++++++++++++ usr.sbin/rtsold/rtsold.8 | 18 +++++++++++++++++- usr.sbin/rtsold/rtsold.c | 19 ++++++++++++++++--- usr.sbin/rtsold/rtsold.h | 2 ++ 4 files changed, 47 insertions(+), 4 deletions(-) diff --git a/usr.sbin/rtsold/rtsol.c b/usr.sbin/rtsold/rtsol.c index 646dd092cb0c..e15b9f202468 100644 --- a/usr.sbin/rtsold/rtsol.c +++ b/usr.sbin/rtsold/rtsol.c @@ -81,6 +81,7 @@ static char *make_rsid(const char *, const char *, struct rainfo *); #define _ARGS_MANAGED managedconf_script, ifi->ifname, rasender #define _ARGS_OTHER otherconf_script, ifi->ifname, rasender +#define _ARGS_ALWAYS alwaysconf_script, ifi->ifname, rasender #define _ARGS_RESADD resolvconf_script, "-a", rsid #define _ARGS_RESDEL resolvconf_script, "-d", rsid @@ -327,6 +328,17 @@ rtsol_input(int sock) if (!ifi->managedconfig) CALL_SCRIPT(OTHER, NULL); } + + /* + * "Always" script. + */ + if (!ifi->alwaysconfig) { + const char *rasender = inet_ntop(AF_INET6, &from.sin6_addr, + ntopbuf, sizeof(ntopbuf)); + ifi->alwaysconfig = 1; + CALL_SCRIPT(ALWAYS, NULL); + } + clock_gettime(CLOCK_MONOTONIC_FAST, &now); newent_rai = 0; rai = find_rainfo(ifi, &from); diff --git a/usr.sbin/rtsold/rtsold.8 b/usr.sbin/rtsold/rtsold.8 index 992d3a0f784d..cc5505a7de5c 100644 --- a/usr.sbin/rtsold/rtsold.8 +++ b/usr.sbin/rtsold/rtsold.8 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 15, 2021 +.Dd May 2, 2023 .Dt RTSOLD 8 .Os .\" @@ -42,6 +42,7 @@ .Op Fl dDfFimu1 .Op Fl M Ar script-name .Op Fl O Ar script-name +.Op Fl A Ar script-name .Op Fl p Ar pidfile .Op Fl R Ar script-name .Ar interface ... @@ -49,6 +50,7 @@ .Op Fl dDfFimu1 .Op Fl M Ar script-name .Op Fl O Ar script-name +.Op Fl A Ar script-name .Op Fl p Ar pidfile .Op Fl R Ar script-name .Fl a @@ -56,12 +58,14 @@ .Op Fl dDiu .Op Fl M Ar script-name .Op Fl O Ar script-name +.Op Fl A Ar script-name .Op Fl R Ar script-name .Ar interface ... .Nm rtsol .Op Fl dDiu .Op Fl M Ar script-name .Op Fl O Ar script-name +.Op Fl A Ar script-name .Op Fl R Ar script-name .Fl a .\" @@ -250,6 +254,18 @@ router advertisement is also TRUE. must be the absolute path from root to the script file, be a regular file, and be created by the same owner who runs .Nm . +.It Fl A Ar script-name +Specifies a supplement script file to always be called for the router +advertisement. +.Nm +will invoke +.Ar script-name +with a first argument of the receiving interface name +and a second argument of the sending router address. +.Ar script-name +must be the absolute path from root to the script file, be a regular +file, and be created by the same owner who runs +.Nm . .It Fl p Ar pidfile Writes the process ID of .Nm diff --git a/usr.sbin/rtsold/rtsold.c b/usr.sbin/rtsold/rtsold.c index f1ba3b07c879..3da2a225307b 100644 --- a/usr.sbin/rtsold/rtsold.c +++ b/usr.sbin/rtsold/rtsold.c @@ -82,6 +82,7 @@ int uflag = 0; const char *managedconf_script; const char *otherconf_script; +const char *alwaysconf_script; const char *resolvconf_script = "/sbin/resolvconf"; cap_channel_t *capllflags, *capscript, *capsendmsg, *capsyslog; @@ -126,11 +127,11 @@ main(int argc, char **argv) progname = basename(argv[0]); if (strcmp(progname, "rtsold") == 0) { - opts = "adDfFim1M:O:p:R:u"; + opts = "adDfFim1M:O:A:p:R:u"; once = 0; pidfilepath = NULL; } else { - opts = "adDFiM:O:R:u"; + opts = "adDFiM:O:A:R:u"; fflag = 1; once = 1; } @@ -167,6 +168,9 @@ main(int argc, char **argv) case 'O': otherconf_script = optarg; break; + case 'A': + alwaysconf_script = optarg; + break; case 'p': pidfilepath = optarg; break; @@ -204,6 +208,9 @@ main(int argc, char **argv) if (otherconf_script != NULL && *otherconf_script != '/') errx(1, "configuration script (%s) must be an absolute path", otherconf_script); + if (alwaysconf_script != NULL && *alwaysconf_script != '/') + errx(1, "configuration script (%s) must be an absolute path", + alwaysconf_script); if (*resolvconf_script != '/') errx(1, "configuration script (%s) must be an absolute path", resolvconf_script); @@ -336,7 +343,8 @@ init_capabilities(void) { #ifdef WITH_CASPER const char *const scripts[] = - { resolvconf_script, managedconf_script, otherconf_script }; + { resolvconf_script, managedconf_script, otherconf_script, + alwaysconf_script }; cap_channel_t *capcasper; nvlist_t *limits; @@ -616,6 +624,7 @@ rtsol_check_timer(void) if (probe) { ifi->managedconfig = 0; ifi->otherconfig = 0; + ifi->alwaysconfig = 0; } if (probe && mobile_node) { error = cap_probe_defrouters(capsendmsg, @@ -786,13 +795,17 @@ usage(const char *progname) if (strcmp(progname, "rtsold") == 0) { fprintf(stderr, "usage: rtsold [-dDfFm1] [-O script-name] " + "[-M script-name ] [-A script-name ] " "[-p pidfile] [-R script-name] interface ...\n"); fprintf(stderr, "usage: rtsold [-dDfFm1] [-O script-name] " + "[-M script-name ] [-A script-name ] " "[-p pidfile] [-R script-name] -a\n"); } else { fprintf(stderr, "usage: rtsol [-dDF] [-O script-name] " + "[-M script-name ] [-A script-name ] " "[-p pidfile] [-R script-name] interface ...\n"); fprintf(stderr, "usage: rtsol [-dDF] [-O script-name] " + "[-M script-name ] [-A script-name ] " "[-p pidfile] [-R script-name] -a\n"); } exit(1); diff --git a/usr.sbin/rtsold/rtsold.h b/usr.sbin/rtsold/rtsold.h index 1342ad87703b..6b8db8466e62 100644 --- a/usr.sbin/rtsold/rtsold.h +++ b/usr.sbin/rtsold/rtsold.h @@ -75,6 +75,7 @@ struct ifinfo { * configuration */ int otherconfig; /* need a separate protocol for the "other" * configuration */ + int alwaysconfig; /* Have we called the 'always' script? */ int state; int probes; int dadcount; @@ -160,6 +161,7 @@ extern int Fflag; extern int uflag; extern const char *managedconf_script; extern const char *otherconf_script; +extern const char *alwaysconf_script; extern const char *resolvconf_script; extern struct cap_channel *capllflags, *capscript, *capsendmsg, *capsyslog; From nobody Tue May 2 17:00:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9mXp3KzDz49BFD; Tue, 2 May 2023 17:00:10 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Received: from heemeyer.club (heemeyer.club [195.93.173.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9mXn5jLZz3hBt; Tue, 2 May 2023 17:00:09 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Authentication-Results: mx1.freebsd.org; none Received: from heemeyer.club (localhost [127.0.0.1]) by heemeyer.club (8.17.1/8.16.1) with ESMTP id 342H01rL012468; Tue, 2 May 2023 20:00:01 +0300 (MSK) (envelope-from dchagin@heemeyer.club) Received: (from dchagin@localhost) by heemeyer.club (8.17.1/8.16.1/Submit) id 342H01Jw012467; Tue, 2 May 2023 20:00:01 +0300 (MSK) (envelope-from dchagin) Date: Tue, 2 May 2023 20:00:01 +0300 From: Dmitry Chagin To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: a1d71cebc05c - main - fstatat(2): restore AT_EMPTY_PATH handling Message-ID: References: <202305021512.342FCpbN056202@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202305021512.342FCpbN056202@gitrepo.freebsd.org> X-Rspamd-Queue-Id: 4Q9mXn5jLZz3hBt X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:61400, ipnet:195.93.173.0/24, country:RU] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Tue, May 02, 2023 at 03:12:51PM +0000, Konstantin Belousov wrote: > The branch main has been updated by kib: > > URL: https://cgit.FreeBSD.org/src/commit/?id=a1d71cebc05ccfeedf95f2db3e94b17270167888 > > commit a1d71cebc05ccfeedf95f2db3e94b17270167888 > Author: Konstantin Belousov > AuthorDate: 2023-05-02 15:11:39 +0000 > Commit: Konstantin Belousov > CommitDate: 2023-05-02 15:11:39 +0000 > > fstatat(2): restore AT_EMPTY_PATH handling > > Fixes: cb858340dcbf214cc4c4d78dbb741620d7b3a252 > Reported by: markj > Sponsored by: The FreeBSD Foundation > --- > sys/kern/vfs_syscalls.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c > index 5c0a291e3b0b..d68af4ea4d51 100644 > --- a/sys/kern/vfs_syscalls.c > +++ b/sys/kern/vfs_syscalls.c > @@ -2438,8 +2438,12 @@ kern_statat(struct thread *td, int flag, int fd, const char *path, > AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH) | LOCKSHARED | LOCKLEAF | > AUDITVNODE1, pathseg, path, fd, &cap_fstat_rights); > > - if ((error = namei(&nd)) != 0) > + if ((error = namei(&nd)) != 0) { > + if (error == ENOTDIR && > + (nd.ni_resflags & NIRES_EMPTYPATH) != 0) > + error = kern_fstat(td, fd, sbp); > return (error); > + } cache_fplookup_dirfd() doesnt set the NIRES_EMPTYPATH flag > error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED); > NDFREE_PNBUF(&nd); > vput(nd.ni_vp); From nobody Tue May 2 17:14:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9msd2rXSz49CCt; Tue, 2 May 2023 17:14: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 4Q9msd0QCYz3lkg; Tue, 2 May 2023 17:14:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683047685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AQ+qPgtmJl02weQUt5tImpKbNf+TBfxRLMFmpxE/S7Q=; b=V+Ht2RJTuuxVlTpmpmrKQb0DrCabftxwhN2UPV8w0k2RRNLiRk+DFNr8CvBZAfUO4+uAoU kWDdxYMcJwVGRpa2q1IxUuph+sqj3e5pLpJ/Z1+mVVl7uZEzQJQ1soOWrZS7At2iBbYQd9 NnHS61a4JYSsGYX/RSE0DEAEt+EuwUd2+nGkGTvKN1Y8zOMCXymhOM8z7j+zBBmoKnAHrH 0wF6wBFWWQVx1iwKOdzeKpWJep6UanJHWxkptrh+0OhTyaBsO/NC8y9o5McGTvEcYrHgpi Wk0EGRtt05C2yeDsiasBByQlMT9IhV9Sr0tvCIsCFKGpoGBi+b0kJhXnfkK+Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683047685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AQ+qPgtmJl02weQUt5tImpKbNf+TBfxRLMFmpxE/S7Q=; b=Av6t9iqiQ/qdo3LMxuzkU5OXEuJ8B/aWqmPlsm1Hx6qJ7PtofkbEphicoQmk3eyOR0P5wp tPOqAZ0iT/AbnnFe6ItTUh+FyDnFvn+JH2CF3rydMqMwoDM1qRuR8MQghY0SHX0ITPeaHW DR3eUQSFb0ksx5/JNEuKU66AVXkLJs45oOuIzKQAlYLJ74HkxSBhUWIy+7QwrmaObbt5XB SYai4L307QZX71difQdpjR5LOy6I+5lvhASYk0lj/rOJBDGGUvadj2Xk55lbOsasVyUp7j 6FEFQIbFvyx1bWrtYdqpsGGmlXQ86QBaLCxjFCycbZHOUBuhXnuSwDlND2hq4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683047685; a=rsa-sha256; cv=none; b=S6npEA2ZpuMLzkZFiVyC53hI10euZRjmLiIDvUtYhxpaWNFYpiBqBYLhkNawmm2Ca/EsCR 3L79RKgGMjve8XAMYUL2YdCdY8onn/6R0xxNdv2Q0aJJqaRWoRHiM7F0S2+RDaLjQqV2jI /jb5nX14COylVbd/vl0+SGPfjmT5WJl0cnxBEFkoeWqQ4vFIWfsJXyxafbqGuP09GJb7B5 AU3bFxB1UE4PrAS0VhSFRInv6ZGB/WndoIoeJvCWSKBtoQkW1vUgDYA/Uiqqweaj8wo+7A OUbfZNpfNnr4Adcw0v0Tw7QUrSAzHEJ5KNkqA1+ghmED/TiclV3076E1BPnbYQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9msc6c5szwVN; Tue, 2 May 2023 17:14:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342HEiPV060992; Tue, 2 May 2023 17:14:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342HEiUY060991; Tue, 2 May 2023 17:14:44 GMT (envelope-from git) Date: Tue, 2 May 2023 17:14:44 GMT Message-Id: <202305021714.342HEiUY060991@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: f5db29b8ceb5 - stable/13 - libpmc: Use LIB_CXX instead of explicit LDADD to link a C++ library. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f5db29b8ceb59f2ebb6fb836534f5f4a770f2c65 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f5db29b8ceb59f2ebb6fb836534f5f4a770f2c65 commit f5db29b8ceb59f2ebb6fb836534f5f4a770f2c65 Author: John Baldwin AuthorDate: 2023-03-23 16:31:29 +0000 Commit: John Baldwin CommitDate: 2023-05-02 16:49:38 +0000 libpmc: Use LIB_CXX instead of explicit LDADD to link a C++ library. This uses the C++ compiler as the linker instead of the C compiler letting the compiler driver pick the right libraries. This is a no-op on main and stable/13 but matters for stable/12 where the current logic breaks for external GCC since it tries to use a non-existent libstdc++. Reviewed by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D39197 (cherry picked from commit c6b3f47fedd3f94f74cc4f7c40761b1d0e777f17) --- lib/libpmc/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/libpmc/Makefile b/lib/libpmc/Makefile index 2ef0d288064c..65ddb7f48b59 100644 --- a/lib/libpmc/Makefile +++ b/lib/libpmc/Makefile @@ -1,12 +1,11 @@ # $FreeBSD$ -LIB= pmc +LIB_CXX= pmc SRCS= libpmc.c pmclog.c libpmc_pmu_util.c libpmc_json.cc INCS= pmc.h pmclog.h pmcformat.h CFLAGS+= -I${SRCTOP}/${RELDIR:H}/libpmcstat -LDADD+= -lc++ .if ${MACHINE_CPUARCH} == "aarch64" EVENT_ARCH="arm64" From nobody Tue May 2 17:14:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9msl5B81z49CXS; Tue, 2 May 2023 17:14: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 4Q9msl1VM4z3lwM; Tue, 2 May 2023 17:14:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683047691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FiDt0BlQW4lNbqd5trpJ66R7cQUFOiAG01GtooSpzAk=; b=Fjn2spV43bFYArHP3IBfT0LJvvhsaayfaXSrCHslklRypEnzy1phcJ2bb9PVrhlfQgHDe2 sRYmUHn5qMxMjnKc9vlnUUOyp5SMrhjnpFRFF7rh3v3tRRh0uO4tvIwIas3vjX0zBKicYV KiZvmisvpQrO+tndbkX6DRTXPJU7WY6IhIDR3QajSiPf9YX55/sjNXqG5NVeWhZQcsGabv jeSbNmttvYcPqM+tSAwjjZsXHLknTJlWxM9gTxIQgrDMUb7THSZG7qVsZeauuFG+WQpnsb wLD5dDZ5UF0oRNAeEQiuxp68kyVeTrs2e+7gH6rppf/YtC6+l3JX1Lwrc6H4hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683047691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FiDt0BlQW4lNbqd5trpJ66R7cQUFOiAG01GtooSpzAk=; b=f/aW9WHeXQHiTcnDl72Eg/di7wNf+0Yax7xoXL9ybV9XxzbTmMDAvA0Ua8d3V/pAZdN7KH mIK/UUzez15oZcq2uw7MJiNuAxjQuUZS/DJdGSzUad2ILouReFVBrA+KRsRDrsWmVqef1o 4HyJ7pllTwTijBZ+7zDwp5vSaBnesYn3wZbx/rroiMvecCD0khz39v0/jLXmAE2u/KfLmA rkPrhfYR8Yd1js4M8uqtL2abVDsywJqYKe7rflVDLbVwcHqRdc8pBninu3Lv5APrlXY6kl QpE6zTCAgS4CSntrIEJDJaBqE1DBBnllnhv/f8dtsr+Pm40bodnwmDwMPnngXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683047691; a=rsa-sha256; cv=none; b=t7Gd0OJnsfRA0cI7iHTOwnMtzDcYUP3Upcuxiusma91XOEKdRKaeZEyKgR08FUm6psdFTA wLxDGKRRaImSVIsl030R6Z6kTF92uZrGn6bj4xvWgWQzEQCylnhljdY44jcs8FIEjRaiGx SjSAiZtnKnKBOzyGHthmrrA+D5I+4nG6W4+/iAlZ4jDtnLxOAuoTBVwKAH16WhKyzHTeXJ EbqQ8WH0kPJlck9hGI6IuWMnPvBC3IevVEF4eoHogN2J2cW/4BTTyUC8TaeFqnK3v1sCpU ezo12t5Cu2H2ylj2nudwmglrzT6HmWhP95A12UFt7c79hT6HKOyx7vF8vsZ6PQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9msl0XYKzwxr; Tue, 2 May 2023 17:14:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342HEoSF061121; Tue, 2 May 2023 17:14:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342HEoEJ061120; Tue, 2 May 2023 17:14:50 GMT (envelope-from git) Date: Tue, 2 May 2023 17:14:50 GMT Message-Id: <202305021714.342HEoEJ061120@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 076116b88474 - stable/12 - libpmc: Use LIB_CXX instead of explicit LDADD to link a C++ library. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 076116b884744947ca33e6a8ff1007bf260614af Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=076116b884744947ca33e6a8ff1007bf260614af commit 076116b884744947ca33e6a8ff1007bf260614af Author: John Baldwin AuthorDate: 2023-03-23 16:31:29 +0000 Commit: John Baldwin CommitDate: 2023-05-02 16:52:38 +0000 libpmc: Use LIB_CXX instead of explicit LDADD to link a C++ library. This uses the C++ compiler as the linker instead of the C compiler letting the compiler driver pick the right libraries. This is a no-op on main and stable/13 but matters for stable/12 where the current logic breaks for external GCC since it tries to use a non-existent libstdc++. Reviewed by: emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D39197 (cherry picked from commit c6b3f47fedd3f94f74cc4f7c40761b1d0e777f17) --- lib/libpmc/Makefile | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/libpmc/Makefile b/lib/libpmc/Makefile index 1e204e13fdb2..973ce5a28687 100644 --- a/lib/libpmc/Makefile +++ b/lib/libpmc/Makefile @@ -1,19 +1,12 @@ # $FreeBSD$ -PACKAGE=lib${LIB} -LIB= pmc +LIB_CXX= pmc SRCS= libpmc.c pmclog.c libpmc_pmu_util.c libpmc_json.cc INCS= pmc.h pmclog.h pmcformat.h CFLAGS+= -I${.CURDIR} CWARNFLAGS.gcc+= -Wno-shadow -Wno-cast-align -.include -.if ${COMPILER_TYPE} == "gcc" -LDADD+= -lstdc++ -.else -LDADD+= -lc++ -.endif .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" From nobody Tue May 2 18:04:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9nyp04YZz49FJv; Tue, 2 May 2023 18:04: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 4Q9nyn6jKzz3rM6; Tue, 2 May 2023 18:04:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683050657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=STaYSLhFCSEcbLNOy0rml/rmf+8FVlYNkbGZq5V7dTE=; b=uTs2i81wZ3dx9gPMkAKhRFmOMupXZsKVy/E0Euqdze8sGvZZmZpLZPU23cIJlvsGe3w2D7 bA0ZCkB04Etekj98QJA1DV4m6JIDiCjJr/9PbWehNqEfBRp1NU2wXH2HNUHOXhpGKN9Zd6 66bPrvswehbaQC8g6zHbHYJs8ZZS8S8H77P7Wp0KyRyzZ/yKNUugVWSuqQaG7pSOE2lPxR NsQR1ngA/4j9vynSxxqel+0uq0kAGI2TLz8jR+/Kv9PIbUEKH3mgsvGxa+f5Iu5j4fLFp7 5CPnopUtGfkOSI4coJGkwtbL/UXrN2j5bJEBqSLa03xFwltMUIyEfH5mGXBBpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683050657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=STaYSLhFCSEcbLNOy0rml/rmf+8FVlYNkbGZq5V7dTE=; b=aifJi0sOvxDEm16pxOpx1VP3YyUy1yveEU3ZTOxIhceW/DszArOSeVsly5F2ViAWX/8NVb cpClDskkQ3XlkLF3Lbm6Zydax8eBEOSYl6PGp4K1nwXPmEb3ddFBCEqD+RAsdQAGJNI92I nc8SvEp0TGr2BhCUDqz7ysbpeUeNCOeoG1KvIKGrRTqqHGgIwXJXXiuvXKWUxSEVoi/C3c M0+tHtFYLHQ/qyPc+NKUl1Eo+RuVImrFiI1HFc6I1LA6h+5ya204aVTXlf9gEYB7Odocy9 m6GFaQuuLS0al6zsalCWNvyas+WRQGX0hhOtqD0P/zNkfCXsJYVQjY8QlSnJWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683050657; a=rsa-sha256; cv=none; b=DJiMWwoaNtAD+0lIX3mrWKql6mk1wZWwkeIOVKrfzLSZoyfqTnHZRCx6gxTj4IjyJqpP3Y KF/lNXQx5nmvZAg91DaaytHvKp5lVupPtEAUKLKJnXhLRoAFI5/8H+xWtbZfy3Fe70D5cm JjS3EVmz9OWhhHxVUAoUITN2mymvbwzdrUCj2T4AdikGJ7xkc8YZeLCL2Hu0iLbfwiaRXU ipvBClhE0U9u2D1JijiKJFGtHiJSpz6JZFki9OP430iTNqTaUBNk+8MA5bBd61UoEeM7u5 Ud2u9OQE0CCbrOqzXKasGHedhMdMaZQtxIcZLpaGjh9Esgf8NFQgqfWtuAVcnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9nyn5nG7zy3p; Tue, 2 May 2023 18:04:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342I4H6p043879; Tue, 2 May 2023 18:04:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342I4H4m043878; Tue, 2 May 2023 18:04:17 GMT (envelope-from git) Date: Tue, 2 May 2023 18:04:17 GMT Message-Id: <202305021804.342I4H4m043878@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: f5d39047b094 - main - riscv: remove unused string from swtch.S List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f5d39047b094d5164b85ae7e2a6a9a8342269815 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=f5d39047b094d5164b85ae7e2a6a9a8342269815 commit f5d39047b094d5164b85ae7e2a6a9a8342269815 Author: Mitchell Horne AuthorDate: 2023-01-23 17:11:16 +0000 Commit: Mitchell Horne CommitDate: 2023-05-02 18:01:00 +0000 riscv: remove unused string from swtch.S MFC after: 3 days Sponsored by: The FreeBSD Foundation --- sys/riscv/riscv/swtch.S | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/riscv/riscv/swtch.S b/sys/riscv/riscv/swtch.S index 2176d2a181be..d2e23784c994 100644 --- a/sys/riscv/riscv/swtch.S +++ b/sys/riscv/riscv/swtch.S @@ -369,8 +369,6 @@ ENTRY(cpu_switch) #endif ret -.Lcpu_switch_panic_str: - .asciz "cpu_switch: %p\0" END(cpu_switch) /* From nobody Tue May 2 18:04:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9nyq14cWz49FZg; Tue, 2 May 2023 18:04: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 4Q9nyq0GN0z3rRl; Tue, 2 May 2023 18:04:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683050659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eAIcZZ2rze2Ft59DOmrSsBMpEf0++WjTTRI0r39CfCg=; b=bHpVu8qZa2yYOTYE3nYvdNsS1wKAwxjSUCWhAoQA5ulnaVfCQLBDbSG+YXd5Ahla+KICPm Lba4FXvgdGOcRVm5HA6kwAqA7JPGzts9f/Ibo8Lw35dJb2nIAj1VXzqKP9VqI7/sfCLBod 1L9AqbBiZKcwaSWRMvkbOU4gaAKqQT6xLbUhjyizaPNi2zxZ/8zkdWc4RQ6lYMhAKpHTCn eFtLxZALDWT7xkPQl3TMTZ3nyLFztLJfpZSxAR7KATiWY5vC47Xjb3+6gLzFO/k8qhBK0g /0tfK9+nQNrXCieD7MhdQFAJrl0iRk9/C1r5EoM6TLx071DqWGYcottMY28qkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683050659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eAIcZZ2rze2Ft59DOmrSsBMpEf0++WjTTRI0r39CfCg=; b=cydBkOkAq20hFPG68SQ/Pg1XtgLG9fpGESq9zsV3VrZaqXdVvTglyIvJ+neg/4/itUbrWz ooIyxQ8dr/P9IWb5xcGDktUBxyjY+9OVLJKqMHx+01RtVPwmmtZFEvAtwLzaLoCTvq1N6A WPGjM7L0kamh3OECerjxud4pEGWKrPBxpxps+EXrZBSBzjKHA6am4NnuvXcPP5fyAtR1x+ 6WjtcBJPkPcTHc8vtoyoZRWSgz34bXYHGmlQKQdB5HtRb2zLbqtlLR+lSym1awZTrMYQnz 1SFtpRJXbJRawF/MJ1GfOqXcqq183BaIfKxObVO/domjfUsS1QAPPGhwlK6ocA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683050659; a=rsa-sha256; cv=none; b=oP83tQw0Etp/FQytdwgHPMkGgBdtfWvg1I1BS2fTbBae07JMvYETz3emxLreA2/G3nJIh1 LS/QahK8m+Npx1ejqU9b5YpjnGbgcaq72z79CWUdEmuthgGSERGZqJxpSVdnTSXvPt3tCu WJZ7U37CMyCvHNnCB76lmVahKpGafs846BScLod1W/TzrR3951XnCMCSGiBEOQoukHRA8x 1tO7dQ3JHaABKFjfRwmRc16YUA+B42TzmXppK8EYQcm4yS97Cv+9mjWQzAVTo97ZsIyLYf zVqzIyiRfgHagt1AUyCzQTeLhz8CTvHtdwMso6iQ75RhqBBPu4rZFdD76nu3RA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9nyp6RnQzxvx; Tue, 2 May 2023 18:04:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342I4I0r043898; Tue, 2 May 2023 18:04:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342I4I4o043897; Tue, 2 May 2023 18:04:18 GMT (envelope-from git) Date: Tue, 2 May 2023 18:04:18 GMT Message-Id: <202305021804.342I4I4o043897@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: c32b6c742f36 - main - riscv: retire the FPE kernel option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c32b6c742f36225ca0a9d2e7a704f959875e37b3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=c32b6c742f36225ca0a9d2e7a704f959875e37b3 commit c32b6c742f36225ca0a9d2e7a704f959875e37b3 Author: Mitchell Horne AuthorDate: 2023-04-25 17:51:35 +0000 Commit: Mitchell Horne CommitDate: 2023-05-02 18:01:31 +0000 riscv: retire the FPE kernel option We always build the kernel floating point support. Now that the riscv64sf userspace variant has been removed the option is required for correct operation. Reviewed by: jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39851 --- sys/conf/kern.mk | 7 +++---- sys/conf/options.riscv | 1 - sys/riscv/conf/GENERIC | 1 - sys/riscv/conf/NOTES | 1 - sys/riscv/riscv/exec_machdep.c | 15 +-------------- sys/riscv/riscv/identcpu.c | 2 -- sys/riscv/riscv/machdep.c | 5 +---- sys/riscv/riscv/swtch.S | 14 +------------- sys/riscv/riscv/trap.c | 4 ---- 9 files changed, 6 insertions(+), 44 deletions(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 1a1251f670e1..245f81e6ed71 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -153,10 +153,9 @@ INLINE_LIMIT?= 8000 # # For RISC-V we specify the soft-float ABI (lp64) to avoid the use of floating -# point registers within the kernel. However, for kernels supporting hardware -# float (FPE), we have to include that in the march so we can have limited -# floating point support in context switching needed for that. This is different -# than userland where we use a hard-float ABI (lp64d). +# point registers within the kernel. However, we include the F and D extensions +# in -march so we can have limited floating point support in context switching +# code. This is different than userland where we use a hard-float ABI (lp64d). # # We also specify the "medium" code model, which generates code suitable for a # 2GiB addressing range located at any offset, allowing modules to be located diff --git a/sys/conf/options.riscv b/sys/conf/options.riscv index 9e48f73fba33..964a2f07173c 100644 --- a/sys/conf/options.riscv +++ b/sys/conf/options.riscv @@ -1,5 +1,4 @@ # $FreeBSD$ RISCV opt_global.h # For cpu RISCV to work -FPE opt_global.h INTRNG opt_global.h diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index 49e3f07c0f96..04645ec9bf90 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -72,7 +72,6 @@ options MAC # TrustedBSD MAC Framework options KDTRACE_FRAME # Ensure frames are compiled in options KDTRACE_HOOKS # Kernel DTrace hooks options DDB_CTF # Kernel ELF linker loads CTF data -options FPE # Floating-point extension support options RACCT # Resource accounting framework options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default options RCTL # Resource limits diff --git a/sys/riscv/conf/NOTES b/sys/riscv/conf/NOTES index f36e6283433d..d3ff441a95d6 100644 --- a/sys/riscv/conf/NOTES +++ b/sys/riscv/conf/NOTES @@ -16,7 +16,6 @@ options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options KDTRACE_FRAME # Ensure frames are compiled in options KDTRACE_HOOKS # Kernel DTrace hooks options DDB_CTF # Kernel ELF linker loads CTF data -options FPE # Floating-point extension support options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default # RISC-V SBI console diff --git a/sys/riscv/riscv/exec_machdep.c b/sys/riscv/riscv/exec_machdep.c index ab79c0384eb3..e61bce628602 100644 --- a/sys/riscv/riscv/exec_machdep.c +++ b/sys/riscv/riscv/exec_machdep.c @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -70,10 +71,6 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef FPE -#include -#endif - static void get_fpcontext(struct thread *td, mcontext_t *mcp); static void set_fpcontext(struct thread *td, mcontext_t *mcp); @@ -123,7 +120,6 @@ set_regs(struct thread *td, struct reg *regs) int fill_fpregs(struct thread *td, struct fpreg *regs) { -#ifdef FPE struct pcb *pcb; pcb = td->td_pcb; @@ -139,7 +135,6 @@ fill_fpregs(struct thread *td, struct fpreg *regs) memcpy(regs->fp_x, pcb->pcb_x, sizeof(regs->fp_x)); regs->fp_fcsr = pcb->pcb_fcsr; } else -#endif memset(regs, 0, sizeof(*regs)); return (0); @@ -148,7 +143,6 @@ fill_fpregs(struct thread *td, struct fpreg *regs) int set_fpregs(struct thread *td, struct fpreg *regs) { -#ifdef FPE struct trapframe *frame; struct pcb *pcb; @@ -160,7 +154,6 @@ set_fpregs(struct thread *td, struct fpreg *regs) pcb->pcb_fpflags |= PCB_FP_STARTED; frame->tf_sstatus &= ~SSTATUS_FS_MASK; frame->tf_sstatus |= SSTATUS_FS_CLEAN; -#endif return (0); } @@ -274,7 +267,6 @@ set_mcontext(struct thread *td, mcontext_t *mcp) static void get_fpcontext(struct thread *td, mcontext_t *mcp) { -#ifdef FPE struct pcb *curpcb; critical_enter(); @@ -300,20 +292,16 @@ get_fpcontext(struct thread *td, mcontext_t *mcp) } critical_exit(); -#endif } static void set_fpcontext(struct thread *td, mcontext_t *mcp) { -#ifdef FPE struct pcb *curpcb; -#endif td->td_frame->tf_sstatus &= ~SSTATUS_FS_MASK; td->td_frame->tf_sstatus |= SSTATUS_FS_OFF; -#ifdef FPE critical_enter(); if ((mcp->mc_flags & _MC_FP_VALID) != 0) { @@ -327,7 +315,6 @@ set_fpcontext(struct thread *td, mcontext_t *mcp) } critical_exit(); -#endif } int diff --git a/sys/riscv/riscv/identcpu.c b/sys/riscv/riscv/identcpu.c index 5f10ec6358ae..c57a22c1b51a 100644 --- a/sys/riscv/riscv/identcpu.c +++ b/sys/riscv/riscv/identcpu.c @@ -203,10 +203,8 @@ parse_riscv_isa(char *isa, int len, u_long *hwcapp) switch(isa[i]) { case 'a': case 'c': -#ifdef FPE case 'd': case 'f': -#endif case 'i': case 'm': hwcap |= HWCAP_ISA_BIT(isa[i]); diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c index 0821a29d11c1..6b8dcb647162 100644 --- a/sys/riscv/riscv/machdep.c +++ b/sys/riscv/riscv/machdep.c @@ -81,6 +81,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -92,10 +93,6 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef FPE -#include -#endif - #ifdef FDT #include #include diff --git a/sys/riscv/riscv/swtch.S b/sys/riscv/riscv/swtch.S index d2e23784c994..5b878ae2fb30 100644 --- a/sys/riscv/riscv/swtch.S +++ b/sys/riscv/riscv/swtch.S @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); -#ifdef FPE .macro __fpe_state_save p /* * Enable FPE usage in supervisor mode, @@ -204,8 +203,7 @@ ENTRY(fpe_state_clear) ret END(fpe_state_clear) -#endif /* FPE */ - + /* * void cpu_throw(struct thread *old __unused, struct thread *new) */ @@ -240,7 +238,6 @@ ENTRY(cpu_throw) ld s10, (PCB_S + 10 * 8)(x13) ld s11, (PCB_S + 11 * 8)(x13) -#ifdef FPE /* Is FPE enabled for new thread? */ ld t0, TD_FRAME(a0) ld t1, (TF_SSTATUS)(t0) @@ -251,8 +248,6 @@ ENTRY(cpu_throw) /* Restore registers. */ __fpe_state_load x13 1: -#endif - ret END(cpu_throw) @@ -292,7 +287,6 @@ ENTRY(cpu_switch) sd s10, (PCB_S + 10 * 8)(x13) sd s11, (PCB_S + 11 * 8)(x13) -#ifdef FPE /* * Is FPE enabled and is it in dirty state * for the old thread? @@ -313,7 +307,6 @@ ENTRY(cpu_switch) __fpe_state_save x13 1: -#endif /* Activate the new thread's pmap */ mv s0, a0 @@ -355,7 +348,6 @@ ENTRY(cpu_switch) ld s10, (PCB_S + 10 * 8)(x13) ld s11, (PCB_S + 11 * 8)(x13) -#ifdef FPE /* Is FPE enabled for new thread? */ ld t0, TD_FRAME(a1) ld t1, (TF_SSTATUS)(t0) @@ -366,8 +358,6 @@ ENTRY(cpu_switch) /* Restore registers. */ __fpe_state_load x13 1: -#endif - ret END(cpu_switch) @@ -466,8 +456,6 @@ ENTRY(savectx) sd s10, (PCB_S + 10 * 8)(a0) sd s11, (PCB_S + 11 * 8)(a0) -#ifdef FPE __fpe_state_save a0 -#endif ret END(savectx) diff --git a/sys/riscv/riscv/trap.c b/sys/riscv/riscv/trap.c index 39e0fbb1d5bd..11ecfa702054 100644 --- a/sys/riscv/riscv/trap.c +++ b/sys/riscv/riscv/trap.c @@ -57,9 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef FPE #include -#endif #include #include #include @@ -395,7 +393,6 @@ do_trap_user(struct trapframe *frame) ecall_handler(); break; case SCAUSE_ILLEGAL_INSTRUCTION: -#ifdef FPE if ((pcb->pcb_fpflags & PCB_FP_STARTED) == 0) { /* * May be a FPE trap. Enable FPE usage @@ -407,7 +404,6 @@ do_trap_user(struct trapframe *frame) pcb->pcb_fpflags |= PCB_FP_STARTED; break; } -#endif call_trapsignal(td, SIGILL, ILL_ILLTRP, (void *)frame->tf_sepc, exception); userret(td, frame); From nobody Tue May 2 18:46:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9pvt1wvMz49HTm; Tue, 2 May 2023 18:46: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 4Q9pvt1FkCz3yYj; Tue, 2 May 2023 18:46:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683053210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZNcBB8r6halXyRF4oVBC8qQMQgB8JOtc7eluHfnNt/Q=; b=P7WLpxqEpy2t2zIKYgUfb4Z/BhfczzmNnIWPUvf1+YTzPBcysOa/oG1o9cGk2nHTgVwMgS BMSXMcqv5zg+xkoUfnD2MP/ww6R3vu7ZQ1+USBzDznaYsPzP10z/KXGWPPo0xGp77c1iCO tn7YkV7WjjzkAY89QIQ6PESPYC4GMsTosJkZcYiTmgkrfW0sF1OR+2SILCbVEa64Bdfa9c yrIaz4o4D/W45z/8+VpCfJ2t8Kdv2vQQNDbuv+IR54fMKpEiJMow2SoRoZUu8TsJUqmQgf yQpA+jOYT9dFk/TDQK5PJnsWto6yPDnHA3HDUO5PhkTEF18iAPZJ7Rg9wgtO/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683053210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZNcBB8r6halXyRF4oVBC8qQMQgB8JOtc7eluHfnNt/Q=; b=UPBgUfitH/ytnOAh81ekqXAY7H8UH0Xy3vAYAYcKDCL0MPuR4O7G9vCF1/U6Kqe2bKdVWD 4YyWzxB+3Ta+u3Al87kOiKc4Gu4jG/IVb5z+TQ0kVnWKukT63IDF1jhn/t45z11DHwgFnt vezlalDfgYQ+6uXe+3hC0lnnqmmRULG0s6rVV3FUhvUgAcAOKDBo7ahWSP/TI58X5QzwYg tAbr8PKg5JqHqQD5ybyMvPt5GFeeOwzRrijxtIW8CMs57N4jmyn0oDH7+Z5Nm3T8kucjNY 4AwZqWFR/T2PWQilZV1WOylWyk8kHEejB2MXbobhC5ZTSflYsz7vTUkIWGN99g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683053210; a=rsa-sha256; cv=none; b=MV8OSMnbxE7up9RGNp5owsM2pyHkMfNh7b+JMiGxXWn9rAUxJ1IV1GaHXtLezgvw5V+aZQ mwCHCv7I9MOv4qrJJD8H8Gp9z6mrcUwUFCVqieiEXmCFR3QaG0zAAdDNSJaJS3yqLCl7ut AzezK9BtZHCdX161MmzXDsPcULz3STpbwH97fQZW3MZlTEZkwDnlx0oiEpTnUu9MM7TtVd jd99hnTTazhBvZIFZo5TbBEi+LKT0k7Eo24Q7esSK/DTR2SsPwBHP5oKqalYjqdMqpnvcI QW94zAbZVklutykP5VI1MbohzrJc46O+Ir7lA+tsrEPfoT5k4y7t++q92wzSnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9pvt0HzXzytb; Tue, 2 May 2023 18:46:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342IkntK009174; Tue, 2 May 2023 18:46:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342IknjH009173; Tue, 2 May 2023 18:46:49 GMT (envelope-from git) Date: Tue, 2 May 2023 18:46:49 GMT Message-Id: <202305021846.342IknjH009173@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: f766d1d5a7c6 - main - IfAPI: Add if_maddr_empty() to check for any maddrs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f766d1d5a7c65d001c443e3fd21694645d58b8b2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=f766d1d5a7c65d001c443e3fd21694645d58b8b2 commit f766d1d5a7c65d001c443e3fd21694645d58b8b2 Author: Justin Hibbits AuthorDate: 2023-04-10 18:20:00 +0000 Commit: Justin Hibbits CommitDate: 2023-05-02 18:34:47 +0000 IfAPI: Add if_maddr_empty() to check for any maddrs if_llmaddr_count() only counts link-level multicast addresses. hv_netvsc(4) needs to know if there are any multicast addresses. Since hv_netvsc(4) is the only instance where this would be used, make it a simple boolean. If others need a if_maddr_count(), that can be added in the future. Reviewed by: melifaro Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D39493 --- sys/net/if.c | 7 +++++++ sys/net/if_var.h | 1 + 2 files changed, 8 insertions(+) diff --git a/sys/net/if.c b/sys/net/if.c index b53a361c2ba3..af9758a39324 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -4685,6 +4685,13 @@ if_llmaddr_count(if_t ifp) return (count); } +bool +if_maddr_empty(if_t ifp) +{ + + return (CK_STAILQ_EMPTY(&ifp->if_multiaddrs)); +} + u_int if_foreach_llmaddr(if_t ifp, iflladdr_cb_t cb, void *cb_arg) { diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 98d65be2ef81..f87472509863 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -657,6 +657,7 @@ u_int if_foreach_lladdr(if_t, iflladdr_cb_t, void *); u_int if_foreach_llmaddr(if_t, iflladdr_cb_t, void *); u_int if_lladdr_count(if_t); u_int if_llmaddr_count(if_t); +bool if_maddr_empty(if_t); int if_getamcount(const if_t ifp); struct ifaddr * if_getifaddr(const if_t ifp); From nobody Tue May 2 18:46:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9pvv1yq7z49Hbt; Tue, 2 May 2023 18:46: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 4Q9pvv1bgsz3ymK; Tue, 2 May 2023 18:46:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683053211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eItw+htrPBm9A/xF+X2Wxs9QITq5O/ldrBEeYH3Q9tE=; b=ioq4wmAUXDYImCIu1/aidZzpLdheyRMXKYRYB5gXGVi42n3HtnwBhj0xk5id6ZBmspm06m F7uaz91YlaZlJgZYPlmZbhogSPs/oMmGldLGkglzbPVnWLxhHkckhEn6XV1zIxV8XJIhTF 1R6So/q1xBf3NobDmClsHHEmio8aHli+H9RIMpGz9H1C7ggVpj8UygnSzFwE9JACFjm+in ZmYj31G3PTs14u8aPxPqqGCnmYcgqbxMPe1YF+2k9BcvfWmn9XUEnfChE7twpy9Q1fIFrm SGSPXCN04ltMtuj3fc8zI2MmbJ0XGKFgwTyT8mTPX3HSLLmFVJWpL6pWU4VK2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683053211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eItw+htrPBm9A/xF+X2Wxs9QITq5O/ldrBEeYH3Q9tE=; b=oEiBf2semITFqFH2igDD29SMGAWnmek7rQXzx1ylrTfSGitEvnvlUPozY9UO87kPfVCBmK iSyeqNZc8aojJjfcVaWjpLc2u15I4z4aH5FIjELQMPlsUnOI7/4Ys9cQWhopyyKoTX6D8c WPspNYOSLje/28c/Vk3vDXex7L+ywsiLgI2emyQPLslSAeRwwuVpvm6Sjvayjjh/w/XcYh /Btc1MpAh/YNoBwizKjZSeo52Bq3DKQPgyLfrQePc/3Pk+k0De5zm9VCy+u9iKazE/J/Pk 6JLOawGHHT9WThQdBD9uSQvTAXgj5Wf+bv98vyzRakCzTyHd26taXBpgntKO3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683053211; a=rsa-sha256; cv=none; b=Q0tjrePwWNkqKDwYd7gn8q+6h3RqjfiBvLJujW8rZ7JI1rx8r+Nbfku3j3wsgnZAFh4Rf2 zZ4S03AdVLCt9sHQ+w1qminCiJFQtbF+Nhff1VzVm2M2Qq+0y6yy9suNs6utvG8op65T4c nu5QJZBYYaOtT1HrsXw2la0WwCbU4V+on0JoWsnth+GTuBFsFduSwkMisVrf4T6BRcLNli jfsGHxo/XKOODSmz+dtvI84L4T8QD6Tr+9Ez99JOo6n4V9YheCyboYwHK64B0nr6MsoJ5P iPooXe8nDEaBIS5IEDw8JLopqET4RJAq2JKDEWmEMaanmDWxO6xAlb7M4pr61w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9pvv0gJ7zyr4; Tue, 2 May 2023 18:46:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342Ikpw6009194; Tue, 2 May 2023 18:46:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342IkpjX009193; Tue, 2 May 2023 18:46:51 GMT (envelope-from git) Date: Tue, 2 May 2023 18:46:51 GMT Message-Id: <202305021846.342IkpjX009193@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: 4db5958a0691 - main - Mechanically convert if_hn(4) to IfAPI List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4db5958a0691755dbf232801d2f58f4bec0aeeb5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=4db5958a0691755dbf232801d2f58f4bec0aeeb5 commit 4db5958a0691755dbf232801d2f58f4bec0aeeb5 Author: Justin Hibbits AuthorDate: 2022-09-26 14:34:28 +0000 Commit: Justin Hibbits CommitDate: 2023-05-02 18:34:47 +0000 Mechanically convert if_hn(4) to IfAPI Reviewed by: zlei Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D37855 --- sys/dev/hyperv/netvsc/if_hn.c | 663 +++++++++++++++++++++------------------ sys/dev/hyperv/netvsc/if_hnvar.h | 10 +- 2 files changed, 355 insertions(+), 318 deletions(-) diff --git a/sys/dev/hyperv/netvsc/if_hn.c b/sys/dev/hyperv/netvsc/if_hn.c index bd64d64963de..5d7002b8f65f 100644 --- a/sys/dev/hyperv/netvsc/if_hn.c +++ b/sys/dev/hyperv/netvsc/if_hn.c @@ -158,7 +158,7 @@ __FBSDID("$FreeBSD$"); #define HN_LRO_LENLIM_MULTIRX_DEF (12 * ETHERMTU) #define HN_LRO_LENLIM_DEF (25 * ETHERMTU) /* YYY 2*MTU is a bit rough, but should be good enough. */ -#define HN_LRO_LENLIM_MIN(ifp) (2 * (ifp)->if_mtu) +#define HN_LRO_LENLIM_MIN(ifp) (2 * if_getmtu(ifp)) #define HN_LRO_ACKCNT_DEF 1 @@ -247,7 +247,7 @@ struct hn_rxinfo { struct hn_rxvf_setarg { struct hn_rx_ring *rxr; - struct ifnet *vf_ifp; + if_t vf_ifp; }; #define HN_RXINFO_VLAN 0x0001 @@ -270,29 +270,29 @@ static void hn_chan_callback(struct vmbus_channel *, void *); static void hn_init(void *); -static int hn_ioctl(struct ifnet *, u_long, caddr_t); +static int hn_ioctl(if_t, u_long, caddr_t); #ifdef HN_IFSTART_SUPPORT -static void hn_start(struct ifnet *); +static void hn_start(if_t); #endif -static int hn_transmit(struct ifnet *, struct mbuf *); -static void hn_xmit_qflush(struct ifnet *); -static int hn_ifmedia_upd(struct ifnet *); -static void hn_ifmedia_sts(struct ifnet *, +static int hn_transmit(if_t, struct mbuf *); +static void hn_xmit_qflush(if_t); +static int hn_ifmedia_upd(if_t); +static void hn_ifmedia_sts(if_t, struct ifmediareq *); -static void hn_ifnet_event(void *, struct ifnet *, int); -static void hn_ifaddr_event(void *, struct ifnet *); -static void hn_ifnet_attevent(void *, struct ifnet *); -static void hn_ifnet_detevent(void *, struct ifnet *); -static void hn_ifnet_lnkevent(void *, struct ifnet *, int); +static void hn_ifnet_event(void *, if_t, int); +static void hn_ifaddr_event(void *, if_t); +static void hn_ifnet_attevent(void *, if_t); +static void hn_ifnet_detevent(void *, if_t); +static void hn_ifnet_lnkevent(void *, if_t, int); static bool hn_ismyvf(const struct hn_softc *, - const struct ifnet *); + const if_t); static void hn_rxvf_change(struct hn_softc *, - struct ifnet *, bool); -static void hn_rxvf_set(struct hn_softc *, struct ifnet *); + if_t, bool); +static void hn_rxvf_set(struct hn_softc *, if_t); static void hn_rxvf_set_task(void *, int); -static void hn_xpnt_vf_input(struct ifnet *, struct mbuf *); +static void hn_xpnt_vf_input(if_t, struct mbuf *); static int hn_xpnt_vf_iocsetflags(struct hn_softc *); static int hn_xpnt_vf_iocsetcaps(struct hn_softc *, struct ifreq *); @@ -416,9 +416,9 @@ static void hn_destroy_tx_data(struct hn_softc *); static void hn_txdesc_dmamap_destroy(struct hn_txdesc *); static void hn_txdesc_gc(struct hn_tx_ring *, struct hn_txdesc *); -static int hn_encap(struct ifnet *, struct hn_tx_ring *, +static int hn_encap(if_t, struct hn_tx_ring *, struct hn_txdesc *, struct mbuf **); -static int hn_txpkt(struct ifnet *, struct hn_tx_ring *, +static int hn_txpkt(if_t, struct hn_tx_ring *, struct hn_txdesc *); static void hn_set_chim_size(struct hn_softc *, int); static void hn_set_tso_maxsize(struct hn_softc *, int, int); @@ -426,7 +426,7 @@ static bool hn_tx_ring_pending(struct hn_tx_ring *); static void hn_tx_ring_qflush(struct hn_tx_ring *); static void hn_resume_tx(struct hn_softc *, int); static void hn_set_txagg(struct hn_softc *); -static void *hn_try_txagg(struct ifnet *, +static void *hn_try_txagg(if_t, struct hn_tx_ring *, struct hn_txdesc *, int); static int hn_get_txswq_depth(const struct hn_tx_ring *); @@ -617,7 +617,7 @@ static struct taskqueue **hn_tx_taskque;/* shared TX taskqueues */ static struct rmlock hn_vfmap_lock; static int hn_vfmap_size; -static struct ifnet **hn_vfmap; +static if_t *hn_vfmap; #ifndef RSS static const uint8_t @@ -923,7 +923,7 @@ hn_set_rxfilter(struct hn_softc *sc, uint32_t filter) static int hn_rxfilter_config(struct hn_softc *sc) { - struct ifnet *ifp = sc->hn_ifp; + if_t ifp = sc->hn_ifp; uint32_t filter; HN_LOCK_ASSERT(sc); @@ -933,15 +933,15 @@ hn_rxfilter_config(struct hn_softc *sc) * its RX filter is configured, so stick the synthetic device in * the promiscous mode. */ - if ((ifp->if_flags & IFF_PROMISC) || (sc->hn_flags & HN_FLAG_RXVF)) { + if ((if_getflags(ifp) & IFF_PROMISC) || (sc->hn_flags & HN_FLAG_RXVF)) { filter = NDIS_PACKET_TYPE_PROMISCUOUS; } else { filter = NDIS_PACKET_TYPE_DIRECTED; - if (ifp->if_flags & IFF_BROADCAST) + if (if_getflags(ifp) & IFF_BROADCAST) filter |= NDIS_PACKET_TYPE_BROADCAST; /* TODO: support multicast list */ - if ((ifp->if_flags & IFF_ALLMULTI) || - !CK_STAILQ_EMPTY(&ifp->if_multiaddrs)) + if ((if_getflags(ifp) & IFF_ALLMULTI) || + !if_maddr_empty(ifp)) filter |= NDIS_PACKET_TYPE_ALL_MULTICAST; } return (hn_set_rxfilter(sc, filter)); @@ -1098,16 +1098,16 @@ hn_rss_ind_fixup(struct hn_softc *sc) } static int -hn_ifmedia_upd(struct ifnet *ifp __unused) +hn_ifmedia_upd(if_t ifp __unused) { return EOPNOTSUPP; } static void -hn_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) +hn_ifmedia_sts(if_t ifp, struct ifmediareq *ifmr) { - struct hn_softc *sc = ifp->if_softc; + struct hn_softc *sc = if_getsoftc(ifp); ifmr->ifm_status = IFM_AVALID; ifmr->ifm_active = IFM_ETHER; @@ -1129,7 +1129,7 @@ hn_rxvf_set_task(void *xarg, int pending __unused) } static void -hn_rxvf_set(struct hn_softc *sc, struct ifnet *vf_ifp) +hn_rxvf_set(struct hn_softc *sc, if_t vf_ifp) { struct hn_rx_ring *rxr; struct hn_rxvf_setarg arg; @@ -1154,40 +1154,40 @@ hn_rxvf_set(struct hn_softc *sc, struct ifnet *vf_ifp) } static bool -hn_ismyvf(const struct hn_softc *sc, const struct ifnet *ifp) +hn_ismyvf(const struct hn_softc *sc, const if_t ifp) { - const struct ifnet *hn_ifp; + if_t hn_ifp; hn_ifp = sc->hn_ifp; if (ifp == hn_ifp) return (false); - if (ifp->if_alloctype != IFT_ETHER) + if (if_getalloctype(ifp) != IFT_ETHER) return (false); /* Ignore lagg/vlan interfaces */ - if (strcmp(ifp->if_dname, "lagg") == 0 || - strcmp(ifp->if_dname, "vlan") == 0) + if (strcmp(if_getdname(ifp), "lagg") == 0 || + strcmp(if_getdname(ifp), "vlan") == 0) return (false); /* - * During detach events ifp->if_addr might be NULL. + * During detach events if_getifaddr(ifp) might be NULL. * Make sure the bcmp() below doesn't panic on that: */ - if (ifp->if_addr == NULL || hn_ifp->if_addr == NULL) + if (if_getifaddr(ifp) == NULL || if_getifaddr(hn_ifp) == NULL) return (false); - if (bcmp(IF_LLADDR(ifp), IF_LLADDR(hn_ifp), ETHER_ADDR_LEN) != 0) + if (bcmp(if_getlladdr(ifp), if_getlladdr(hn_ifp), ETHER_ADDR_LEN) != 0) return (false); return (true); } static void -hn_rxvf_change(struct hn_softc *sc, struct ifnet *ifp, bool rxvf) +hn_rxvf_change(struct hn_softc *sc, if_t ifp, bool rxvf) { - struct ifnet *hn_ifp; + if_t hn_ifp; HN_LOCK(sc); @@ -1209,7 +1209,7 @@ hn_rxvf_change(struct hn_softc *sc, struct ifnet *ifp, bool rxvf) goto out; sc->hn_flags &= ~HN_FLAG_RXVF; - if (hn_ifp->if_drv_flags & IFF_DRV_RUNNING) + if (if_getdrvflags(hn_ifp) & IFF_DRV_RUNNING) hn_rxfilter_config(sc); else hn_set_rxfilter(sc, NDIS_PACKET_TYPE_NONE); @@ -1231,19 +1231,19 @@ hn_rxvf_change(struct hn_softc *sc, struct ifnet *ifp, bool rxvf) hn_resume_mgmt(sc); } - devctl_notify("HYPERV_NIC_VF", hn_ifp->if_xname, + devctl_notify("HYPERV_NIC_VF", if_name(hn_ifp), rxvf ? "VF_UP" : "VF_DOWN", NULL); if (bootverbose) { if_printf(hn_ifp, "datapath is switched %s %s\n", - rxvf ? "to" : "from", ifp->if_xname); + rxvf ? "to" : "from", if_name(ifp)); } out: HN_UNLOCK(sc); } static void -hn_ifnet_event(void *arg, struct ifnet *ifp, int event) +hn_ifnet_event(void *arg, if_t ifp, int event) { if (event != IFNET_EVENT_UP && event != IFNET_EVENT_DOWN) @@ -1252,16 +1252,16 @@ hn_ifnet_event(void *arg, struct ifnet *ifp, int event) } static void -hn_ifaddr_event(void *arg, struct ifnet *ifp) +hn_ifaddr_event(void *arg, if_t ifp) { - hn_rxvf_change(arg, ifp, ifp->if_flags & IFF_UP); + hn_rxvf_change(arg, ifp, if_getflags(ifp) & IFF_UP); } static int hn_xpnt_vf_iocsetcaps(struct hn_softc *sc, struct ifreq *ifr) { - struct ifnet *ifp, *vf_ifp; + if_t ifp, vf_ifp; uint64_t tmp; int error; @@ -1273,9 +1273,9 @@ hn_xpnt_vf_iocsetcaps(struct hn_softc *sc, struct ifreq *ifr) * Fix up requested capabilities w/ supported capabilities, * since the supported capabilities could have been changed. */ - ifr->ifr_reqcap &= ifp->if_capabilities; + ifr->ifr_reqcap &= if_getcapabilities(ifp); /* Pass SIOCSIFCAP to VF. */ - error = vf_ifp->if_ioctl(vf_ifp, SIOCSIFCAP, (caddr_t)ifr); + error = ifhwioctl(SIOCSIFCAP, vf_ifp, (caddr_t)ifr, curthread); /* * NOTE: @@ -1286,31 +1286,31 @@ hn_xpnt_vf_iocsetcaps(struct hn_softc *sc, struct ifreq *ifr) /* * Merge VF's enabled capabilities. */ - ifp->if_capenable = vf_ifp->if_capenable & ifp->if_capabilities; + if_setcapenable(ifp, if_getcapenable(vf_ifp) & if_getcapabilities(ifp)); - tmp = vf_ifp->if_hwassist & HN_CSUM_IP_HWASSIST(sc); - if (ifp->if_capenable & IFCAP_TXCSUM) - ifp->if_hwassist |= tmp; + tmp = if_gethwassist(vf_ifp) & HN_CSUM_IP_HWASSIST(sc); + if (if_getcapenable(ifp) & IFCAP_TXCSUM) + if_sethwassistbits(ifp, tmp, 0); else - ifp->if_hwassist &= ~tmp; + if_sethwassistbits(ifp, 0, tmp); - tmp = vf_ifp->if_hwassist & HN_CSUM_IP6_HWASSIST(sc); - if (ifp->if_capenable & IFCAP_TXCSUM_IPV6) - ifp->if_hwassist |= tmp; + tmp = if_gethwassist(vf_ifp) & HN_CSUM_IP6_HWASSIST(sc); + if (if_getcapenable(ifp) & IFCAP_TXCSUM_IPV6) + if_sethwassistbits(ifp, tmp, 0); else - ifp->if_hwassist &= ~tmp; + if_sethwassistbits(ifp, 0, tmp); - tmp = vf_ifp->if_hwassist & CSUM_IP_TSO; - if (ifp->if_capenable & IFCAP_TSO4) - ifp->if_hwassist |= tmp; + tmp = if_gethwassist(vf_ifp) & CSUM_IP_TSO; + if (if_getcapenable(ifp) & IFCAP_TSO4) + if_sethwassistbits(ifp, tmp, 0); else - ifp->if_hwassist &= ~tmp; + if_sethwassistbits(ifp, 0, tmp); - tmp = vf_ifp->if_hwassist & CSUM_IP6_TSO; - if (ifp->if_capenable & IFCAP_TSO6) - ifp->if_hwassist |= tmp; + tmp = if_gethwassist(vf_ifp) & CSUM_IP6_TSO; + if (if_getcapenable(ifp) & IFCAP_TSO6) + if_sethwassistbits(ifp, tmp, 0); else - ifp->if_hwassist &= ~tmp; + if_sethwassistbits(ifp, 0, tmp); return (error); } @@ -1318,48 +1318,48 @@ hn_xpnt_vf_iocsetcaps(struct hn_softc *sc, struct ifreq *ifr) static int hn_xpnt_vf_iocsetflags(struct hn_softc *sc) { - struct ifnet *vf_ifp; + if_t vf_ifp; struct ifreq ifr; HN_LOCK_ASSERT(sc); vf_ifp = sc->hn_vf_ifp; memset(&ifr, 0, sizeof(ifr)); - strlcpy(ifr.ifr_name, vf_ifp->if_xname, sizeof(ifr.ifr_name)); - ifr.ifr_flags = vf_ifp->if_flags & 0xffff; - ifr.ifr_flagshigh = vf_ifp->if_flags >> 16; - return (vf_ifp->if_ioctl(vf_ifp, SIOCSIFFLAGS, (caddr_t)&ifr)); + strlcpy(ifr.ifr_name, if_name(vf_ifp), sizeof(ifr.ifr_name)); + ifr.ifr_flags = if_getflags(vf_ifp) & 0xffff; + ifr.ifr_flagshigh = if_getflags(vf_ifp) >> 16; + return (ifhwioctl(SIOCSIFFLAGS, vf_ifp, (caddr_t)&ifr, curthread)); } static void hn_xpnt_vf_saveifflags(struct hn_softc *sc) { - struct ifnet *ifp = sc->hn_ifp; + if_t ifp = sc->hn_ifp; int allmulti = 0; HN_LOCK_ASSERT(sc); /* XXX vlan(4) style mcast addr maintenance */ - if (!CK_STAILQ_EMPTY(&ifp->if_multiaddrs)) + if (!if_maddr_empty(ifp)) allmulti = IFF_ALLMULTI; /* Always set the VF's if_flags */ - sc->hn_vf_ifp->if_flags = ifp->if_flags | allmulti; + if_setflags(sc->hn_vf_ifp, if_getflags(ifp) | allmulti); } static void -hn_xpnt_vf_input(struct ifnet *vf_ifp, struct mbuf *m) +hn_xpnt_vf_input(if_t vf_ifp, struct mbuf *m) { struct rm_priotracker pt; - struct ifnet *hn_ifp = NULL; + if_t hn_ifp = NULL; struct mbuf *mn; /* * XXX racy, if hn(4) ever detached. */ rm_rlock(&hn_vfmap_lock, &pt); - if (vf_ifp->if_index < hn_vfmap_size) - hn_ifp = hn_vfmap[vf_ifp->if_index]; + if (if_getindex(vf_ifp) < hn_vfmap_size) + hn_ifp = hn_vfmap[if_getindex(vf_ifp)]; rm_runlock(&hn_vfmap_lock, &pt); if (hn_ifp != NULL) { @@ -1372,7 +1372,7 @@ hn_xpnt_vf_input(struct ifnet *vf_ifp, struct mbuf *m) /* * Update VF stats. */ - if ((vf_ifp->if_capenable & IFCAP_HWSTATS) == 0) { + if ((if_getcapenable(vf_ifp) & IFCAP_HWSTATS) == 0) { if_inc_counter(vf_ifp, IFCOUNTER_IBYTES, mn->m_pkthdr.len); } @@ -1394,7 +1394,7 @@ hn_xpnt_vf_input(struct ifnet *vf_ifp, struct mbuf *m) /* * Go through hn(4)'s if_input. */ - hn_ifp->if_input(hn_ifp, m); + if_input(hn_ifp, m); } else { /* * In the middle of the transition; free this @@ -1412,12 +1412,12 @@ hn_xpnt_vf_input(struct ifnet *vf_ifp, struct mbuf *m) static void hn_mtu_change_fixup(struct hn_softc *sc) { - struct ifnet *ifp; + if_t ifp; HN_LOCK_ASSERT(sc); ifp = sc->hn_ifp; - hn_set_tso_maxsize(sc, hn_tso_maxlen, ifp->if_mtu); + hn_set_tso_maxsize(sc, hn_tso_maxlen, if_getmtu(ifp)); if (sc->hn_rx_ring[0].hn_lro.lro_length_lim < HN_LRO_LENLIM_MIN(ifp)) hn_set_lro_lenlim(sc, HN_LRO_LENLIM_MIN(ifp)); } @@ -1483,7 +1483,7 @@ hn_rss_mbuf_hash(struct hn_softc *sc, uint32_t mbuf_hash) static void hn_vf_rss_fixup(struct hn_softc *sc, bool reconf) { - struct ifnet *ifp, *vf_ifp; + if_t ifp, vf_ifp; struct ifrsshash ifrh; struct ifrsskey ifrk; int error; @@ -1491,7 +1491,7 @@ hn_vf_rss_fixup(struct hn_softc *sc, bool reconf) HN_LOCK_ASSERT(sc); KASSERT(sc->hn_flags & HN_FLAG_SYNTH_ATTACHED, - ("%s: synthetic parts are not attached", sc->hn_ifp->if_xname)); + ("%s: synthetic parts are not attached", if_name(sc->hn_ifp))); if (sc->hn_rx_ring_inuse == 1) { /* No RSS on synthetic parts; done. */ @@ -1510,21 +1510,21 @@ hn_vf_rss_fixup(struct hn_softc *sc, bool reconf) * supported. */ memset(&ifrk, 0, sizeof(ifrk)); - strlcpy(ifrk.ifrk_name, vf_ifp->if_xname, sizeof(ifrk.ifrk_name)); - error = vf_ifp->if_ioctl(vf_ifp, SIOCGIFRSSKEY, (caddr_t)&ifrk); + strlcpy(ifrk.ifrk_name, if_name(vf_ifp), sizeof(ifrk.ifrk_name)); + error = ifhwioctl(SIOCGIFRSSKEY, vf_ifp, (caddr_t)&ifrk, curthread); if (error) { if_printf(ifp, "%s SIOCGIFRSSKEY failed: %d\n", - vf_ifp->if_xname, error); + if_name(vf_ifp), error); goto done; } if (ifrk.ifrk_func != RSS_FUNC_TOEPLITZ) { if_printf(ifp, "%s RSS function %u is not Toeplitz\n", - vf_ifp->if_xname, ifrk.ifrk_func); + if_name(vf_ifp), ifrk.ifrk_func); goto done; } if (ifrk.ifrk_keylen != NDIS_HASH_KEYSIZE_TOEPLITZ) { if_printf(ifp, "%s invalid RSS Toeplitz key length %d\n", - vf_ifp->if_xname, ifrk.ifrk_keylen); + if_name(vf_ifp), ifrk.ifrk_keylen); goto done; } @@ -1532,16 +1532,16 @@ hn_vf_rss_fixup(struct hn_softc *sc, bool reconf) * Extract VF's RSS hash. Only Toeplitz is supported. */ memset(&ifrh, 0, sizeof(ifrh)); - strlcpy(ifrh.ifrh_name, vf_ifp->if_xname, sizeof(ifrh.ifrh_name)); - error = vf_ifp->if_ioctl(vf_ifp, SIOCGIFRSSHASH, (caddr_t)&ifrh); + strlcpy(ifrh.ifrh_name, if_name(vf_ifp), sizeof(ifrh.ifrh_name)); + error = ifhwioctl(SIOCGIFRSSHASH, vf_ifp, (caddr_t)&ifrh, curthread); if (error) { if_printf(ifp, "%s SIOCGRSSHASH failed: %d\n", - vf_ifp->if_xname, error); + if_name(vf_ifp), error); goto done; } if (ifrh.ifrh_func != RSS_FUNC_TOEPLITZ) { if_printf(ifp, "%s RSS function %u is not Toeplitz\n", - vf_ifp->if_xname, ifrh.ifrh_func); + if_name(vf_ifp), ifrh.ifrh_func); goto done; } @@ -1549,7 +1549,7 @@ hn_vf_rss_fixup(struct hn_softc *sc, bool reconf) if ((ifrh.ifrh_types & my_types) == 0) { /* This disables RSS; ignore it then */ if_printf(ifp, "%s intersection of RSS types failed. " - "VF %#x, mine %#x\n", vf_ifp->if_xname, + "VF %#x, mine %#x\n", if_name(vf_ifp), ifrh.ifrh_types, my_types); goto done; } @@ -1650,7 +1650,7 @@ hn_vf_rss_restore(struct hn_softc *sc) HN_LOCK_ASSERT(sc); KASSERT(sc->hn_flags & HN_FLAG_SYNTH_ATTACHED, - ("%s: synthetic parts are not attached", sc->hn_ifp->if_xname)); + ("%s: synthetic parts are not attached", if_name(sc->hn_ifp))); if (sc->hn_rx_ring_inuse == 1) goto done; @@ -1677,7 +1677,7 @@ done: static void hn_xpnt_vf_setready(struct hn_softc *sc) { - struct ifnet *ifp, *vf_ifp; + if_t ifp, vf_ifp; struct ifreq ifr; HN_LOCK_ASSERT(sc); @@ -1692,10 +1692,10 @@ hn_xpnt_vf_setready(struct hn_softc *sc) /* * Save information for restoration. */ - sc->hn_saved_caps = ifp->if_capabilities; - sc->hn_saved_tsomax = ifp->if_hw_tsomax; - sc->hn_saved_tsosegcnt = ifp->if_hw_tsomaxsegcount; - sc->hn_saved_tsosegsz = ifp->if_hw_tsomaxsegsize; + sc->hn_saved_caps = if_getcapabilities(ifp); + sc->hn_saved_tsomax = if_gethwtsomax(ifp); + sc->hn_saved_tsosegcnt = if_gethwtsomaxsegcount(ifp); + sc->hn_saved_tsosegsz = if_gethwtsomaxsegsize(ifp); /* * Intersect supported/enabled capabilities. @@ -1703,41 +1703,41 @@ hn_xpnt_vf_setready(struct hn_softc *sc) * NOTE: * if_hwassist is not changed here. */ - ifp->if_capabilities &= vf_ifp->if_capabilities; - ifp->if_capenable &= ifp->if_capabilities; + if_setcapabilitiesbit(ifp, 0, if_getcapabilities(vf_ifp)); + if_setcapenablebit(ifp, 0, if_getcapabilities(ifp)); /* * Fix TSO settings. */ - if (ifp->if_hw_tsomax > vf_ifp->if_hw_tsomax) - ifp->if_hw_tsomax = vf_ifp->if_hw_tsomax; - if (ifp->if_hw_tsomaxsegcount > vf_ifp->if_hw_tsomaxsegcount) - ifp->if_hw_tsomaxsegcount = vf_ifp->if_hw_tsomaxsegcount; - if (ifp->if_hw_tsomaxsegsize > vf_ifp->if_hw_tsomaxsegsize) - ifp->if_hw_tsomaxsegsize = vf_ifp->if_hw_tsomaxsegsize; + if (if_gethwtsomax(ifp) > if_gethwtsomax(vf_ifp)) + if_sethwtsomax(ifp, if_gethwtsomax(vf_ifp)); + if (if_gethwtsomaxsegcount(ifp) > if_gethwtsomaxsegcount(vf_ifp)) + if_sethwtsomaxsegcount(ifp, if_gethwtsomaxsegcount(vf_ifp)); + if (if_gethwtsomaxsegsize(ifp) > if_gethwtsomaxsegsize(vf_ifp)) + if_sethwtsomaxsegsize(ifp, if_gethwtsomaxsegsize(vf_ifp)); /* * Change VF's enabled capabilities. */ memset(&ifr, 0, sizeof(ifr)); - strlcpy(ifr.ifr_name, vf_ifp->if_xname, sizeof(ifr.ifr_name)); - ifr.ifr_reqcap = ifp->if_capenable; + strlcpy(ifr.ifr_name, if_name(vf_ifp), sizeof(ifr.ifr_name)); + ifr.ifr_reqcap = if_getcapenable(ifp); hn_xpnt_vf_iocsetcaps(sc, &ifr); - if (ifp->if_mtu != ETHERMTU) { + if (if_getmtu(ifp) != ETHERMTU) { int error; /* * Change VF's MTU. */ memset(&ifr, 0, sizeof(ifr)); - strlcpy(ifr.ifr_name, vf_ifp->if_xname, sizeof(ifr.ifr_name)); - ifr.ifr_mtu = ifp->if_mtu; - error = vf_ifp->if_ioctl(vf_ifp, SIOCSIFMTU, (caddr_t)&ifr); + strlcpy(ifr.ifr_name, if_name(vf_ifp), sizeof(ifr.ifr_name)); + ifr.ifr_mtu = if_getmtu(ifp); + error = ifhwioctl(SIOCSIFMTU, vf_ifp, (caddr_t)&ifr, curthread); if (error) { if_printf(ifp, "%s SIOCSIFMTU %u failed\n", - vf_ifp->if_xname, ifp->if_mtu); - if (ifp->if_mtu > ETHERMTU) { + if_name(vf_ifp), if_getmtu(ifp)); + if (if_getmtu(ifp) > ETHERMTU) { if_printf(ifp, "change MTU to %d\n", ETHERMTU); /* @@ -1746,7 +1746,7 @@ hn_xpnt_vf_setready(struct hn_softc *sc) * failure of the adjustment will cause us * infinite headache. */ - ifp->if_mtu = ETHERMTU; + if_setmtu(ifp, ETHERMTU); hn_mtu_change_fixup(sc); } } @@ -1815,22 +1815,22 @@ hn_xpnt_vf_init(struct hn_softc *sc) HN_LOCK_ASSERT(sc); KASSERT((sc->hn_xvf_flags & HN_XVFFLAG_ENABLED) == 0, - ("%s: transparent VF was enabled", sc->hn_ifp->if_xname)); + ("%s: transparent VF was enabled", if_name(sc->hn_ifp))); if (bootverbose) { if_printf(sc->hn_ifp, "try bringing up %s\n", - sc->hn_vf_ifp->if_xname); + if_name(sc->hn_vf_ifp)); } /* * Bring the VF up. */ hn_xpnt_vf_saveifflags(sc); - sc->hn_vf_ifp->if_flags |= IFF_UP; + if_setflagbits(sc->hn_ifp, IFF_UP, 0); error = hn_xpnt_vf_iocsetflags(sc); if (error) { if_printf(sc->hn_ifp, "bringing up %s failed: %d\n", - sc->hn_vf_ifp->if_xname, error); + if_name(sc->hn_vf_ifp), error); return; } @@ -1870,13 +1870,13 @@ hn_xpnt_vf_init_taskfunc(void *xsc, int pending __unused) hn_xpnt_vf_setready(sc); } - if (sc->hn_ifp->if_drv_flags & IFF_DRV_RUNNING) { + if (if_getdrvflags(sc->hn_ifp) & IFF_DRV_RUNNING) { /* * Delayed VF initialization. */ if (bootverbose) { if_printf(sc->hn_ifp, "delayed initialize %s\n", - sc->hn_vf_ifp->if_xname); + if_name(sc->hn_vf_ifp)); } hn_xpnt_vf_init(sc); } @@ -1885,7 +1885,7 @@ done: } static void -hn_ifnet_attevent(void *xsc, struct ifnet *ifp) +hn_ifnet_attevent(void *xsc, if_t ifp) { struct hn_softc *sc = xsc; @@ -1899,47 +1899,48 @@ hn_ifnet_attevent(void *xsc, struct ifnet *ifp) if (sc->hn_vf_ifp != NULL) { if_printf(sc->hn_ifp, "%s was attached as VF\n", - sc->hn_vf_ifp->if_xname); + if_name(sc->hn_vf_ifp)); goto done; } - if (hn_xpnt_vf && ifp->if_start != NULL) { + if (hn_xpnt_vf && if_getstartfn(ifp) != NULL) { /* * ifnet.if_start is _not_ supported by transparent * mode VF; mainly due to the IFF_DRV_OACTIVE flag. */ if_printf(sc->hn_ifp, "%s uses if_start, which is unsupported " - "in transparent VF mode.\n", ifp->if_xname); + "in transparent VF mode.\n", if_name(sc->hn_vf_ifp)); + goto done; } rm_wlock(&hn_vfmap_lock); - if (ifp->if_index >= hn_vfmap_size) { - struct ifnet **newmap; + if (if_getindex(ifp) >= hn_vfmap_size) { + if_t *newmap; int newsize; - newsize = ifp->if_index + HN_VFMAP_SIZE_DEF; - newmap = malloc(sizeof(struct ifnet *) * newsize, M_DEVBUF, + newsize = if_getindex(ifp) + HN_VFMAP_SIZE_DEF; + newmap = malloc(sizeof(if_t) * newsize, M_DEVBUF, M_WAITOK | M_ZERO); memcpy(newmap, hn_vfmap, - sizeof(struct ifnet *) * hn_vfmap_size); + sizeof(if_t) * hn_vfmap_size); free(hn_vfmap, M_DEVBUF); hn_vfmap = newmap; hn_vfmap_size = newsize; } - KASSERT(hn_vfmap[ifp->if_index] == NULL, + KASSERT(hn_vfmap[if_getindex(ifp)] == NULL, ("%s: ifindex %d was mapped to %s", - ifp->if_xname, ifp->if_index, hn_vfmap[ifp->if_index]->if_xname)); - hn_vfmap[ifp->if_index] = sc->hn_ifp; + if_name(ifp), if_getindex(ifp), if_name(hn_vfmap[if_getindex(ifp)]))); + hn_vfmap[if_getindex(ifp)] = sc->hn_ifp; rm_wunlock(&hn_vfmap_lock); /* NOTE: hn_vf_lock for hn_transmit()/hn_qflush() */ rm_wlock(&sc->hn_vf_lock); KASSERT((sc->hn_xvf_flags & HN_XVFFLAG_ENABLED) == 0, - ("%s: transparent VF was enabled", sc->hn_ifp->if_xname)); + ("%s: transparent VF was enabled", if_name(sc->hn_ifp))); sc->hn_vf_ifp = ifp; rm_wunlock(&sc->hn_vf_lock); @@ -1950,8 +1951,8 @@ hn_ifnet_attevent(void *xsc, struct ifnet *ifp) * Install if_input for vf_ifp, which does vf_ifp -> hn_ifp. * Save vf_ifp's current if_input for later restoration. */ - sc->hn_vf_input = ifp->if_input; - ifp->if_input = hn_xpnt_vf_input; + sc->hn_vf_input = if_getinputfn(ifp); + if_setinputfn(ifp, hn_xpnt_vf_input); /* * Stop link status management; use the VF's. @@ -1972,7 +1973,7 @@ done: } static void -hn_ifnet_detevent(void *xsc, struct ifnet *ifp) +hn_ifnet_detevent(void *xsc, if_t ifp) { struct hn_softc *sc = xsc; @@ -2001,8 +2002,8 @@ hn_ifnet_detevent(void *xsc, struct ifnet *ifp) HN_LOCK(sc); KASSERT(sc->hn_vf_input != NULL, ("%s VF input is not saved", - sc->hn_ifp->if_xname)); - ifp->if_input = sc->hn_vf_input; + if_name(sc->hn_ifp))); + if_setinputfn(ifp, sc->hn_vf_input); sc->hn_vf_input = NULL; if ((sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) && @@ -2013,7 +2014,7 @@ hn_ifnet_detevent(void *xsc, struct ifnet *ifp) /* * The VF was ready; restore some settings. */ - sc->hn_ifp->if_capabilities = sc->hn_saved_caps; + if_setcapabilities(ifp, sc->hn_saved_caps); /* * NOTE: * There is _no_ need to fixup if_capenable and @@ -2022,10 +2023,10 @@ hn_ifnet_detevent(void *xsc, struct ifnet *ifp) * if_capabilites and the synthetic device's * if_capabilites. */ - sc->hn_ifp->if_hw_tsomax = sc->hn_saved_tsomax; - sc->hn_ifp->if_hw_tsomaxsegcount = - sc->hn_saved_tsosegcnt; - sc->hn_ifp->if_hw_tsomaxsegsize = sc->hn_saved_tsosegsz; + if_sethwtsomax(ifp, sc->hn_saved_tsomax); + if_sethwtsomaxsegcount(sc->hn_ifp, + sc->hn_saved_tsosegcnt); + if_sethwtsomaxsegsize(ifp, sc->hn_saved_tsosegsz); } if (sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) { @@ -2047,14 +2048,14 @@ hn_ifnet_detevent(void *xsc, struct ifnet *ifp) rm_wlock(&hn_vfmap_lock); - KASSERT(ifp->if_index < hn_vfmap_size, - ("ifindex %d, vfmapsize %d", ifp->if_index, hn_vfmap_size)); - if (hn_vfmap[ifp->if_index] != NULL) { - KASSERT(hn_vfmap[ifp->if_index] == sc->hn_ifp, + KASSERT(if_getindex(ifp) < hn_vfmap_size, + ("ifindex %d, vfmapsize %d", if_getindex(ifp), hn_vfmap_size)); + if (hn_vfmap[if_getindex(ifp)] != NULL) { + KASSERT(hn_vfmap[if_getindex(ifp)] == sc->hn_ifp, ("%s: ifindex %d was mapped to %s", - ifp->if_xname, ifp->if_index, - hn_vfmap[ifp->if_index]->if_xname)); - hn_vfmap[ifp->if_index] = NULL; + if_name(ifp), if_getindex(ifp), + if_name(hn_vfmap[if_getindex(ifp)]))); + hn_vfmap[if_getindex(ifp)] = NULL; } rm_wunlock(&hn_vfmap_lock); @@ -2063,7 +2064,7 @@ done: } static void -hn_ifnet_lnkevent(void *xsc, struct ifnet *ifp, int link_state) +hn_ifnet_lnkevent(void *xsc, if_t ifp, int link_state) { struct hn_softc *sc = xsc; @@ -2071,6 +2072,42 @@ hn_ifnet_lnkevent(void *xsc, struct ifnet *ifp, int link_state) if_link_state_change(sc->hn_ifp, link_state); } +static int +hn_tsomax_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct hn_softc *sc = arg1; + unsigned int tsomax; + int error; + + tsomax = if_gethwtsomax(sc->hn_ifp); + error = sysctl_handle_int(oidp, &tsomax, 0, req); + return error; +} + +static int +hn_tsomaxsegcnt_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct hn_softc *sc = arg1; + unsigned int tsomaxsegcnt; + int error; + + tsomaxsegcnt = if_gethwtsomaxsegcount(sc->hn_ifp); + error = sysctl_handle_int(oidp, &tsomaxsegcnt, 0, req); + return error; +} + +static int +hn_tsomaxsegsz_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct hn_softc *sc = arg1; + unsigned int tsomaxsegsz; + int error; + + tsomaxsegsz = if_gethwtsomaxsegsize(sc->hn_ifp); + error = sysctl_handle_int(oidp, &tsomaxsegsz, 0, req); + return error; +} + static int hn_probe(device_t dev) { @@ -2089,7 +2126,7 @@ hn_attach(device_t dev) struct sysctl_oid_list *child; struct sysctl_ctx_list *ctx; uint8_t eaddr[ETHER_ADDR_LEN]; - struct ifnet *ifp = NULL; + if_t ifp = NULL; int error, ring_cnt, tx_ring_cnt; uint32_t mtu; @@ -2156,7 +2193,7 @@ hn_attach(device_t dev) * ether_ifattach(). */ ifp = sc->hn_ifp = if_alloc(IFT_ETHER); - ifp->if_softc = sc; + if_setsoftc(ifp, sc); if_initname(ifp, device_get_name(dev), device_get_unit(dev)); /* @@ -2281,14 +2318,15 @@ hn_attach(device_t dev) SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "hwassist", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, hn_hwassist_sysctl, "A", "hwassist"); - SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tso_max", - CTLFLAG_RD, &ifp->if_hw_tsomax, 0, "max TSO size"); - SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tso_maxsegcnt", - CTLFLAG_RD, &ifp->if_hw_tsomaxsegcount, 0, - "max # of TSO segments"); - SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tso_maxsegsz", - CTLFLAG_RD, &ifp->if_hw_tsomaxsegsize, 0, - "max size of TSO segment"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "tso_max", + CTLTYPE_UINT | CTLFLAG_RD, sc, 0, hn_tsomax_sysctl, + "IU", "max TSO size"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "tso_maxsegcnt", + CTLTYPE_UINT | CTLFLAG_RD, sc, 0, hn_tsomaxsegcnt_sysctl, + "IU", "max # of TSO segments"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "tso_maxsegsz", + CTLTYPE_UINT | CTLFLAG_RD, sc, 0, hn_tsomaxsegsz_sysctl, + "IU", "max size of TSO segment"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "rxfilter", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, hn_rxfilter_sysctl, "A", "rxfilter"); @@ -2370,60 +2408,59 @@ hn_attach(device_t dev) * Setup the ifnet for this interface. */ - ifp->if_baudrate = IF_Gbps(10); - ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; - ifp->if_ioctl = hn_ioctl; - ifp->if_init = hn_init; + if_setbaudrate(ifp, IF_Gbps(10)); + if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); + if_setioctlfn(ifp, hn_ioctl); + if_setinitfn(ifp, hn_init); #ifdef HN_IFSTART_SUPPORT if (hn_use_if_start) { int qdepth = hn_get_txswq_depth(&sc->hn_tx_ring[0]); - ifp->if_start = hn_start; - IFQ_SET_MAXLEN(&ifp->if_snd, qdepth); - ifp->if_snd.ifq_drv_maxlen = qdepth - 1; - IFQ_SET_READY(&ifp->if_snd); + if_setstartfn(ifp, hn_start); + if_setsendqlen(ifp, qdepth); + if_setsendqready(ifp); } else #endif { - ifp->if_transmit = hn_transmit; - ifp->if_qflush = hn_xmit_qflush; + if_settransmitfn(ifp, hn_transmit); + if_setqflushfn(ifp, hn_xmit_qflush); } - ifp->if_capabilities |= IFCAP_RXCSUM | IFCAP_LRO | IFCAP_LINKSTATE; + if_setcapabilitiesbit(ifp, IFCAP_RXCSUM | IFCAP_LRO | IFCAP_LINKSTATE, 0); #ifdef foo /* We can't diff IPv6 packets from IPv4 packets on RX path. */ - ifp->if_capabilities |= IFCAP_RXCSUM_IPV6; + if_setcapabilitiesbit(ifp, IFCAP_RXCSUM_IPV6, 0); #endif if (sc->hn_caps & HN_CAP_VLAN) { /* XXX not sure about VLAN_MTU. */ - ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU; + if_setcapabilitiesbit(ifp, IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_MTU, 0); } - ifp->if_hwassist = sc->hn_tx_ring[0].hn_csum_assist; - if (ifp->if_hwassist & HN_CSUM_IP_MASK) - ifp->if_capabilities |= IFCAP_TXCSUM; - if (ifp->if_hwassist & HN_CSUM_IP6_MASK) - ifp->if_capabilities |= IFCAP_TXCSUM_IPV6; + if_sethwassist(ifp, sc->hn_tx_ring[0].hn_csum_assist); + if (if_gethwassist(ifp) & HN_CSUM_IP_MASK) + if_setcapabilitiesbit(ifp, IFCAP_TXCSUM, 0); + if (if_gethwassist(ifp) & HN_CSUM_IP6_MASK) + if_setcapabilitiesbit(ifp, IFCAP_TXCSUM_IPV6, 0); if (sc->hn_caps & HN_CAP_TSO4) { - ifp->if_capabilities |= IFCAP_TSO4; - ifp->if_hwassist |= CSUM_IP_TSO; + if_setcapabilitiesbit(ifp, IFCAP_TSO4, 0); + if_sethwassistbits(ifp, CSUM_IP_TSO, 0); } if (sc->hn_caps & HN_CAP_TSO6) { - ifp->if_capabilities |= IFCAP_TSO6; - ifp->if_hwassist |= CSUM_IP6_TSO; + if_setcapabilitiesbit(ifp, IFCAP_TSO6, 0); + if_sethwassistbits(ifp, CSUM_IP6_TSO, 0); } /* Enable all available capabilities by default. */ - ifp->if_capenable = ifp->if_capabilities; + if_setcapenable(ifp, if_getcapabilities(ifp)); /* * Disable IPv6 TSO and TXCSUM by default, they still can * be enabled through SIOCSIFCAP. */ - ifp->if_capenable &= ~(IFCAP_TXCSUM_IPV6 | IFCAP_TSO6); - ifp->if_hwassist &= ~(HN_CSUM_IP6_MASK | CSUM_IP6_TSO); + if_setcapenablebit(ifp, 0, (IFCAP_TXCSUM_IPV6 | IFCAP_TSO6)); + if_sethwassistbits(ifp, 0, (HN_CSUM_IP6_MASK | CSUM_IP6_TSO)); - if (ifp->if_capabilities & (IFCAP_TSO6 | IFCAP_TSO4)) { + if (if_getcapabilities(ifp) & (IFCAP_TSO6 | IFCAP_TSO4)) { /* * Lock hn_set_tso_maxsize() to simplify its * internal logic. @@ -2431,23 +2468,23 @@ hn_attach(device_t dev) HN_LOCK(sc); hn_set_tso_maxsize(sc, hn_tso_maxlen, ETHERMTU); HN_UNLOCK(sc); - ifp->if_hw_tsomaxsegcount = HN_TX_DATA_SEGCNT_MAX; - ifp->if_hw_tsomaxsegsize = PAGE_SIZE; + if_sethwtsomaxsegcount(ifp, HN_TX_DATA_SEGCNT_MAX); + if_sethwtsomaxsegsize(ifp, PAGE_SIZE); } *** 816 LINES SKIPPED *** From nobody Tue May 2 18:46:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9pvw3Fmrz49HYR; Tue, 2 May 2023 18:46: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 4Q9pvw2hLnz401W; Tue, 2 May 2023 18:46:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683053212; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NIp2k+MN+GrEOCseRXyVsNzj7b0Wm9kgW59CMOCQv2U=; b=Ddaa7nXy5zcCkjjPy8Jm3z9nFy4CCV2Bfl2Jak+6q+D3pmepWrZ8pkF2uXWJPCZKNrn/BO 4i0i2REasjbYCeKvl41JHE/td562KI/Da62AdiHvMAaRnVyA5T43aCSRO4w1GHXTtTVf04 QiNbGG+vtT7OtcvwbrSsLzWascgX7MW6krmY2s1rvVvpE0Gjy56UakeTBesk9yBG6H4M1t IalzyceDaKXgx92QrQ/hIaig1WAy4vnsn83IdehCThi1JhmigQXcS8g45khFZ9ugG7XiJi RgNgnats0kEzPWtnoLrMexvX4cH4QmqJCObH24aIsmlfPZZ8TdgqZADId5PBpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683053212; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NIp2k+MN+GrEOCseRXyVsNzj7b0Wm9kgW59CMOCQv2U=; b=w0aHGEhEX/toiaFD6IjBcUMTRQStO2X6cDjQYjl79XxCXtNSkGWXxPDQ9hhpe2faX8S4CG VCmLMm/gL8mnhSTggsiWKnglglNUhvRqY7QBwY3CINDIFTxRuRoRw83pffB4nhx5iWRT27 ID3QN4akYWelJKa9IxPXqogG4hUrI2RcMNBSs3lrA8USZdlH2dgu1hfdqQk5sAhVWa6Skz ieV2jvIkK3F7FPtidtEyCRMDlU3Qw9YUpUT3T2o1KpFxF2EhHTp6yUh6I+2PgpoD+WOrc6 DI+6QwkULMQqnLsNIWk0Z/ZOLNTdZqTfjpdm+D852pK7jFcv4B2fRnZh8VSCjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683053212; a=rsa-sha256; cv=none; b=AqasgkFKpX46IFg1GaPbE+oTX4Rm512FO1GPRHEhk1QqTt/l25/SZ2uGcOv+0oTCs2GkKN 3yRDh7hD9uMlO8Cz/iml35H+BJwCfJHNXBxmQO2DVhjEEcDEnrpAPxYG65gKvGOfkxHvh4 fDLZMXmWmQ7/RCQt6aTOl1eOuRZdZqJ0ULu0A9DIYRWyIiWVIxLj1EWDlrjux8PnKbwvma 2Ohs8KrDKjP/nJ6VveLmL982D1SiesFtG82LcjkejSYogZBsdcYGztsPmisG8mDte/5FJC lhPPgVqcHw1iScKLUYO+Cw0hc8C1ScrCgOSZ+aO20hxt1xBeI20fuNKsK1Xlpg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9pvw1dNFzyr5; Tue, 2 May 2023 18:46:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342Ikq74009219; Tue, 2 May 2023 18:46:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342Ikqan009218; Tue, 2 May 2023 18:46:52 GMT (envelope-from git) Date: Tue, 2 May 2023 18:46:52 GMT Message-Id: <202305021846.342Ikqan009218@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: 0785c323f31c - main - Convert nfs bootp/diskless to use IfAPI List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0785c323f31cd7c4039139bc8fb1f994dfe6cba6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=0785c323f31cd7c4039139bc8fb1f994dfe6cba6 commit 0785c323f31cd7c4039139bc8fb1f994dfe6cba6 Author: Justin Hibbits AuthorDate: 2023-02-07 19:37:03 +0000 Commit: Justin Hibbits CommitDate: 2023-05-02 18:35:58 +0000 Convert nfs bootp/diskless to use IfAPI Use the new IfAPI interface and address iterators so the nfs driver doesn't need direct access to the interface structures. Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D38962 --- sys/nfs/bootp_subr.c | 100 +++++++++++++++++++++++++------------------------ sys/nfs/nfs_diskless.c | 59 +++++++++++++++++------------ 2 files changed, 86 insertions(+), 73 deletions(-) diff --git a/sys/nfs/bootp_subr.c b/sys/nfs/bootp_subr.c index 62fcb06fbc5d..d10139756447 100644 --- a/sys/nfs/bootp_subr.c +++ b/sys/nfs/bootp_subr.c @@ -137,7 +137,7 @@ struct bootpc_ifcontext { } _req; #define ireq _req._ifreq #define iareq _req._in_alias_req - struct ifnet *ifp; + if_t ifp; struct sockaddr_dl *sdl; struct sockaddr_in myaddr; struct sockaddr_in netmask; @@ -263,7 +263,6 @@ static void bootpc_tag_helper(struct bootpc_tagcontext *tctx, unsigned char *start, int len, int tag); #ifdef BOOTP_DEBUG -void bootpboot_p_if(struct ifnet *ifp, struct ifaddr *ifa); void bootpboot_p_iflist(void); #endif @@ -295,38 +294,35 @@ static __inline int bootpc_ifctx_isfailed(struct bootpc_ifcontext *ifctx); */ #ifdef BOOTP_DEBUG -void -bootpboot_p_if(struct ifnet *ifp, struct ifaddr *ifa) +static u_int +bootpboot_p_ifa(void *ifp, struct ifaddr *ifa, u_int count __unused) { printf("%s flags %x, addr ", - ifp->if_xname, ifp->if_flags); + if_name(ifp), if_getflags(ifp)); print_sin_addr((struct sockaddr_in *) ifa->ifa_addr); printf(", broadcast "); print_sin_addr((struct sockaddr_in *) ifa->ifa_dstaddr); printf(", netmask "); print_sin_addr((struct sockaddr_in *) ifa->ifa_netmask); printf("\n"); + + return (0); } void bootpboot_p_iflist(void) { - struct ifnet *ifp; - struct ifaddr *ifa; + struct epoch_tracker et; + struct if_iter iter; + if_t ifp; printf("Interface list:\n"); - IFNET_RLOCK(); - for (ifp = CK_STAILQ_FIRST(&V_ifnet); - ifp != NULL; - ifp = CK_STAILQ_NEXT(ifp, if_link)) { - for (ifa = CK_STAILQ_FIRST(&ifp->if_addrhead); - ifa != NULL; - ifa = CK_STAILQ_NEXT(ifa, ifa_link)) - if (ifa->ifa_addr->sa_family == AF_INET) - bootpboot_p_if(ifp, ifa); - } - IFNET_RUNLOCK(); + NET_EPOCH_ENTER(et); + for (ifp = if_iter_start(&iter); ifp != NULL; ifp = if_iter_next(&iter)) + if_foreach_addr_type(ifp, AF_INET, bootpboot_p_ifa, ifp); + if_iter_finish(&iter); + NET_EPOCH_EXIT(et); } #endif /* defined(BOOTP_DEBUG) */ @@ -1498,14 +1494,31 @@ bootpc_decode_reply(struct nfsv3_diskless *nd, struct bootpc_ifcontext *ifctx, } } +static u_int +bootpc_init_ifa_cb(void *arg, struct ifaddr *ifa, u_int count) +{ + struct sockaddr_dl *sdl = (struct sockaddr_dl *)ifa->ifa_addr; + + if (count != 0) + return (0); + + if (sdl->sdl_type != IFT_ETHER) + return (0); + + *(struct sockaddr_dl **)arg = sdl; + + return (1); +} + void bootpc_init(void) { + struct epoch_tracker et; struct bootpc_ifcontext *ifctx = NULL; /* Interface BOOTP contexts */ struct bootpc_globalcontext *gctx; /* Global BOOTP context */ - struct ifnet *ifp; struct sockaddr_dl *sdl; - struct ifaddr *ifa; + struct if_iter iter; + if_t ifp; int error; #ifndef BOOTP_WIRED_TO int ifcnt; @@ -1573,22 +1586,15 @@ bootpc_init(void) * attaches and wins the race, it won't be eligible for bootp. */ ifcnt = 0; - IFNET_RLOCK(); - CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { - if ((ifp->if_flags & - (IFF_LOOPBACK | IFF_POINTOPOINT | IFF_BROADCAST)) != + NET_EPOCH_ENTER(et); + for (if_t ifp = if_iter_start(&iter); ifp != NULL; ifp = if_iter_next(&iter)) { + if ((if_getflags(ifp) & + (IFF_LOOPBACK | IFF_POINTOPOINT | IFF_BROADCAST)) == IFF_BROADCAST) - continue; - switch (ifp->if_alloctype) { - case IFT_ETHER: - break; - default: - continue; - } - ifcnt++; + ifcnt++; } - - IFNET_RUNLOCK(); + if_iter_finish(&iter); + NET_EPOCH_EXIT(et); if (ifcnt == 0) { printf("WARNING: BOOTP found no eligible network interfaces, skipping!\n"); goto out; @@ -1600,37 +1606,32 @@ bootpc_init(void) retry: ifctx = STAILQ_FIRST(&gctx->interfaces); - IFNET_RLOCK(); - CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { + NET_EPOCH_ENTER(et); + for (ifp = if_iter_start(&iter); ifp != NULL; ifp = if_iter_next(&iter)) { if (ifctx == NULL) break; #ifdef BOOTP_WIRED_TO - if (strcmp(ifp->if_xname, __XSTRING(BOOTP_WIRED_TO)) != 0) + if (strcmp(if_name(ifp), __XSTRING(BOOTP_WIRED_TO)) != 0) continue; #else - if ((ifp->if_flags & + if ((if_getflags(ifp) & (IFF_LOOPBACK | IFF_POINTOPOINT | IFF_BROADCAST)) != IFF_BROADCAST) - continue; - switch (ifp->if_alloctype) { + break; + switch (if_getalloctype(ifp)) { case IFT_ETHER: break; default: continue; } #endif - strlcpy(ifctx->ireq.ifr_name, ifp->if_xname, + strlcpy(ifctx->ireq.ifr_name, if_name(ifp), sizeof(ifctx->ireq.ifr_name)); ifctx->ifp = ifp; /* Get HW address */ sdl = NULL; - CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) - if (ifa->ifa_addr->sa_family == AF_LINK) { - sdl = (struct sockaddr_dl *)ifa->ifa_addr; - if (sdl->sdl_type == IFT_ETHER) - break; - } + if_foreach_addr_type(ifp, AF_LINK, bootpc_init_ifa_cb, &sdl); if (sdl == NULL) panic("bootpc: Unable to find HW address for %s", ifctx->ireq.ifr_name); @@ -1638,7 +1639,8 @@ retry: ifctx = STAILQ_NEXT(ifctx, next); } - IFNET_RUNLOCK(); + if_iter_finish(&iter); + NET_EPOCH_EXIT(et); CURVNET_RESTORE(); if (STAILQ_EMPTY(&gctx->interfaces) || @@ -1702,7 +1704,7 @@ retry: if (gctx->gotrootpath != 0) { struct epoch_tracker et; - kern_setenv("boot.netif.name", ifctx->ifp->if_xname); + kern_setenv("boot.netif.name", if_name(ifctx->ifp)); NET_EPOCH_ENTER(et); bootpc_add_default_route(ifctx); diff --git a/sys/nfs/nfs_diskless.c b/sys/nfs/nfs_diskless.c index 6df01e56f9b2..8f21861ab27e 100644 --- a/sys/nfs/nfs_diskless.c +++ b/sys/nfs/nfs_diskless.c @@ -146,6 +146,19 @@ nfs_parse_options(const char *envopts, struct nfs_args *nd) free(opts, M_TEMP); } +static u_int +nfs_setup_diskless_ifa_cb(void *arg, struct sockaddr_dl *sdl, u_int count) +{ + struct sockaddr_dl *ourdl = arg; + + if ((sdl->sdl_type == ourdl->sdl_type) && + (sdl->sdl_alen == ourdl->sdl_alen) && + !bcmp(LLADDR(sdl), LLADDR(ourdl), sdl->sdl_alen)) + return (1); + + return (0); +} + /* * Populate the essential fields in the nfsv3_diskless structure. * @@ -166,16 +179,18 @@ nfs_parse_options(const char *envopts, struct nfs_args *nd) void nfs_setup_diskless(void) { + struct epoch_tracker et; + struct if_iter iter; struct nfs_diskless *nd = &nfs_diskless; struct nfsv3_diskless *nd3 = &nfsv3_diskless; - struct ifnet *ifp; - struct ifaddr *ifa; - struct sockaddr_dl *sdl, ourdl; + if_t ifp; + struct sockaddr_dl ourdl; struct sockaddr_in myaddr, netmask; char *cp; int cnt, fhlen, is_nfsv3; uint32_t len; time_t timeout_at; + u_int count; if (nfs_diskless_valid != 0) return; @@ -219,29 +234,25 @@ nfs_setup_diskless(void) printf("nfs_diskless: no hardware address\n"); return; } - ifa = NULL; timeout_at = time_uptime + NFS_IFACE_TIMEOUT_SECS; retry: CURVNET_SET(TD_TO_VNET(curthread)); - IFNET_RLOCK(); - CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) { - CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { - if (ifa->ifa_addr->sa_family == AF_LINK) { - sdl = (struct sockaddr_dl *)ifa->ifa_addr; - if ((sdl->sdl_type == ourdl.sdl_type) && - (sdl->sdl_alen == ourdl.sdl_alen) && - !bcmp(LLADDR(sdl), - LLADDR(&ourdl), - sdl->sdl_alen)) { - IFNET_RUNLOCK(); - CURVNET_RESTORE(); - goto match_done; - } - } - } + NET_EPOCH_ENTER(et); + + for (ifp = if_iter_start(&iter); ifp != NULL; ifp = if_iter_next(&iter)) { + count = if_foreach_lladdr(ifp, nfs_setup_diskless_ifa_cb, &ourdl); + + if (count > 0) + break; + } - IFNET_RUNLOCK(); + if_iter_finish(&iter); + NET_EPOCH_EXIT(et); CURVNET_RESTORE(); + if (cnt > 0) { + goto match_done; + } + if (time_uptime < timeout_at) { pause("nfssdl", hz / 5); goto retry; @@ -249,9 +260,9 @@ retry: printf("nfs_diskless: no interface\n"); return; /* no matching interface */ match_done: - kern_setenv("boot.netif.name", ifp->if_xname); + kern_setenv("boot.netif.name", if_name(ifp)); if (is_nfsv3 != 0) { - strlcpy(nd3->myif.ifra_name, ifp->if_xname, + strlcpy(nd3->myif.ifra_name, if_name(ifp), sizeof(nd3->myif.ifra_name)); /* set up gateway */ @@ -290,7 +301,7 @@ match_done: nfs_diskless_valid = 3; } else { - strlcpy(nd->myif.ifra_name, ifp->if_xname, + strlcpy(nd->myif.ifra_name, if_name(ifp), sizeof(nd->myif.ifra_name)); /* set up gateway */ From nobody Tue May 2 19:04:37 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9qJV6VhBz49J2S; Tue, 2 May 2023 19:04:42 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) (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 4Q9qJV3vRxz42LM; Tue, 2 May 2023 19:04:42 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-x732.google.com with SMTP id af79cd13be357-7515631b965so1040020185a.0; Tue, 02 May 2023 12:04:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683054281; x=1685646281; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=BsHH1zJ7xeW03Z6DhPQB3WLk+FbPP2Hzs9pNgV+oXvE=; b=UMkeIKpKLIEBA+lCVBafydlq1m7v8oxrhzVkQtjywDTsV0lV90rIPIbfago6jOlAX2 L03r6vCxnCElpt4qUvRpCOEWPIyKFQBvxHN+Hclu17t8xHMvqdEjiaBRuweFggL8FUoE Jr2QcQUgigzHKoG/zJa0iuA84N/wIRQBOVI6k6iZyq166N4nJoQWY9A/QOiANd3PIPLN ByoVW3ws1hyxatcp7zaQc6ljzBqPmUhu6RoNtMng7IxY74ABNOk0UdtxAzVmdG9vJ1+f KEKUJ5/K7p5uUR5URSdBvkdVA3mbgtaIZAbmZh+jK3Kpz6V8Kyle1l7eytyUz7wNBeYj RjvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683054281; x=1685646281; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BsHH1zJ7xeW03Z6DhPQB3WLk+FbPP2Hzs9pNgV+oXvE=; b=I8LiQF5lXZV4pBd9CC8BkddfTUJQ9erRuEsx0AIYJhwS7i00DnA08kxkX15+UtYxil zmfNjTGYJGYzfp6RzibPmxwe6Q+Hy9mA4JUis18dTQ7p6XbXEJBJaMyjwFvf/OTTu5qc bv4POBtcX91oK/fG+fkQmogkxbPPkNVqEEDXg6tfzOc6cSCTbRES2cFLVF/zSymo51oM gSD4HonBIGV0JxTCkKKT2+fBdjr+8GjWO8O6MjrBPIVGhpyrbzbZZue4nEyz/ccMJUC+ M0dHqS8TK7FUECjMDXOGUq+LjcJ8OvfIlmtl2/r1EtDj0ypj2P0pgbUMKIsSPWALeC4o cBng== X-Gm-Message-State: AC+VfDznlqUNxrRy2fDdSdx6/v2lY1xdLmInvwe/n3QAzGyytzQ09LVX 6m9nYflQsxajyinQqjosUrpXuq4RcCg= X-Google-Smtp-Source: ACHHUZ6N7o8QEmjeoAuguI/Lg8f4HgXHZ/LleXw3c2JmxAYqlD0b+0AakcooPixvFz6d0UU0SXp8fA== X-Received: by 2002:ad4:5f4b:0:b0:61b:65f4:2a15 with SMTP id p11-20020ad45f4b000000b0061b65f42a15mr5455286qvg.12.1683054281054; Tue, 02 May 2023 12:04:41 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id or16-20020a05620a619000b0074abe1e1457sm9889640qkn.76.2023.05.02.12.04.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 May 2023 12:04:40 -0700 (PDT) Date: Tue, 2 May 2023 15:04:37 -0400 From: Mark Johnston To: Dmitry Chagin Cc: Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: a1d71cebc05c - main - fstatat(2): restore AT_EMPTY_PATH handling Message-ID: References: <202305021512.342FCpbN056202@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4Q9qJV3vRxz42LM X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Tue, May 02, 2023 at 08:00:01PM +0300, Dmitry Chagin wrote: > On Tue, May 02, 2023 at 03:12:51PM +0000, Konstantin Belousov wrote: > > The branch main has been updated by kib: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=a1d71cebc05ccfeedf95f2db3e94b17270167888 > > > > commit a1d71cebc05ccfeedf95f2db3e94b17270167888 > > Author: Konstantin Belousov > > AuthorDate: 2023-05-02 15:11:39 +0000 > > Commit: Konstantin Belousov > > CommitDate: 2023-05-02 15:11:39 +0000 > > > > fstatat(2): restore AT_EMPTY_PATH handling > > > > Fixes: cb858340dcbf214cc4c4d78dbb741620d7b3a252 > > Reported by: markj > > Sponsored by: The FreeBSD Foundation > > --- > > sys/kern/vfs_syscalls.c | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c > > index 5c0a291e3b0b..d68af4ea4d51 100644 > > --- a/sys/kern/vfs_syscalls.c > > +++ b/sys/kern/vfs_syscalls.c > > @@ -2438,8 +2438,12 @@ kern_statat(struct thread *td, int flag, int fd, const char *path, > > AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH) | LOCKSHARED | LOCKLEAF | > > AUDITVNODE1, pathseg, path, fd, &cap_fstat_rights); > > > > - if ((error = namei(&nd)) != 0) > > + if ((error = namei(&nd)) != 0) { > > + if (error == ENOTDIR && > > + (nd.ni_resflags & NIRES_EMPTYPATH) != 0) > > + error = kern_fstat(td, fd, sbp); > > return (error); > > + } > > cache_fplookup_dirfd() doesnt set the NIRES_EMPTYPATH flag It doesn't, but for an AT_EMPTY_PATH lookup it aborts the lookup and returns ENOTDIR to namei(), which sets NIRES_EMPTYPATH before passing the error up. > > error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED); > > NDFREE_PNBUF(&nd); > > vput(nd.ni_vp); > From nobody Tue May 2 19:20:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9qg60MyRz49Jmt; Tue, 2 May 2023 19:20:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9qg573J4z44TX; Tue, 2 May 2023 19:20:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683055250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UZXfZmiHaGGufjhNR9twFLvWoOQY7oN3F2xn+x26RI4=; b=Okg8azxJ6fwv8DW6Mn72Dzw3oFDXIhT0m2rNLdVnv9inGQpNi9vlvnsuaiF0G2ltNEBI1r d0LtVYqOKuW0z2ZpL78fUjv9jKbwvRmyyTfDQ5+wrkLLLE38tzJBXppTu6VC/PukQVUw1p BBSvxh+UcrBrUX8dfC/8DPwKj9Wfgol/5W7I5SuRI4eKY/U7u9hE8NFUsMVIh148aPMuyN +eXAcF0cVD0+Dq9dsY+DL5tz8Mu09HVkT+ak8Rs/g62BhjfM76AzJ24/HL8/KCMT0iu98Y daOyeExrjvN6KVncy9sDI9Si9249Oy0YhUm1GWXJVSV7rv+5L6Mvn+wPixO/bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683055250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UZXfZmiHaGGufjhNR9twFLvWoOQY7oN3F2xn+x26RI4=; b=Shrlkg2edjoarWzNln00YW2k0qkBR4W/F/EJ4/1aAFmdDUk6rlnFDrvPv9PWCUUn53wPFB Qi3JuUKTwlpnvmt3dK6U9ke5GjIQG5iI54sXqCD2GMziixhl0Hjqwla63WQr0EfXCG9SMO cYDAIBYwWOnklk3oAhYmumGAoZ+nOHjLUVGw3Cjw7lI44DdnYa4FEQ13V1s8LoHkwE05qE QG8n/jt/4k9sBgV2+ASEYp+2W5zsp3qLX2qAxfByxAkFhkS/ZzjjucF97lcAsQCLCEW46X VHvaVTtA9mRCnTSHfCtRGh4cNg58qgxROdX1jCHfFWcz/WQ998v8lQiHiTsUUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683055250; a=rsa-sha256; cv=none; b=fXjEbgwesrhAUtvAo23b+pULSVsSJuBjFy9lcgmzF1cMUkVcENxjOrKqBZELd7CNQ8vlsa v8rtXBH259ZcwwJz4PS88jOO6gC8mTTh4h6YB/PqVtIFtPC22tfYJzfZnB0z5PmPfuDZMR gydPs2TuDKqlybgiEHdNDcHsxButhxWwvoeAorJgAl0nMpWIDHy9/I86CYrjmrhw8BdhW7 5eWfiV5B038i3No7s/+GWrce1Jbv0ANzOu3Top0oLbd9NyybsxaLbIAMnhoTedm73DAJSb JHM2V+NEz6sO8e4UVlOu7eA8cuex0VwDY6tJKgcehhypt7q8ohCitA4bY2Qknw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9qg56653z10tG; Tue, 2 May 2023 19:20:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342JKnWA069639; Tue, 2 May 2023 19:20:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342JKnS4069638; Tue, 2 May 2023 19:20:49 GMT (envelope-from git) Date: Tue, 2 May 2023 19:20:49 GMT Message-Id: <202305021920.342JKnS4069638@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 0ebc92bf3db1 - main - vmrun.sh: mention new edk2 package List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0ebc92bf3db1685fbcd023e42b683f4b10464095 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0ebc92bf3db1685fbcd023e42b683f4b10464095 commit 0ebc92bf3db1685fbcd023e42b683f4b10464095 Author: Christos Margiolis AuthorDate: 2023-05-02 19:19:08 +0000 Commit: Mark Johnston CommitDate: 2023-05-02 19:19:09 +0000 vmrun.sh: mention new edk2 package uefi-edk2-bhyve no longer exists. Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39937 --- share/examples/bhyve/vmrun.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/examples/bhyve/vmrun.sh b/share/examples/bhyve/vmrun.sh index 1ef310b07e92..3ab16b58afb4 100755 --- a/share/examples/bhyve/vmrun.sh +++ b/share/examples/bhyve/vmrun.sh @@ -249,7 +249,7 @@ fi if [ ${efi_mode} -gt 0 ]; then if [ ! -f ${efi_firmware} ]; then echo "Error: EFI Firmware ${efi_firmware} doesn't exist." \ - "Try: pkg install uefi-edk2-bhyve" + "Try: pkg install edk2-bhyve" exit 1 fi fi From nobody Tue May 2 19:26:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9qp450QKz49KRj; Tue, 2 May 2023 19:26:52 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Received: from heemeyer.club (heemeyer.club [195.93.173.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9qp40vFyz45xs; Tue, 2 May 2023 19:26:51 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Authentication-Results: mx1.freebsd.org; none Received: from heemeyer.club (localhost [127.0.0.1]) by heemeyer.club (8.17.1/8.16.1) with ESMTP id 342JQn8N013027; Tue, 2 May 2023 22:26:49 +0300 (MSK) (envelope-from dchagin@heemeyer.club) Received: (from dchagin@localhost) by heemeyer.club (8.17.1/8.16.1/Submit) id 342JQnaw013026; Tue, 2 May 2023 22:26:49 +0300 (MSK) (envelope-from dchagin) Date: Tue, 2 May 2023 22:26:49 +0300 From: Dmitry Chagin To: Mark Johnston Cc: Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: a1d71cebc05c - main - fstatat(2): restore AT_EMPTY_PATH handling Message-ID: References: <202305021512.342FCpbN056202@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4Q9qp40vFyz45xs X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:61400, ipnet:195.93.173.0/24, country:RU] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Tue, May 02, 2023 at 03:04:37PM -0400, Mark Johnston wrote: > On Tue, May 02, 2023 at 08:00:01PM +0300, Dmitry Chagin wrote: > > On Tue, May 02, 2023 at 03:12:51PM +0000, Konstantin Belousov wrote: > > > The branch main has been updated by kib: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=a1d71cebc05ccfeedf95f2db3e94b17270167888 > > > > > > commit a1d71cebc05ccfeedf95f2db3e94b17270167888 > > > Author: Konstantin Belousov > > > AuthorDate: 2023-05-02 15:11:39 +0000 > > > Commit: Konstantin Belousov > > > CommitDate: 2023-05-02 15:11:39 +0000 > > > > > > fstatat(2): restore AT_EMPTY_PATH handling > > > > > > Fixes: cb858340dcbf214cc4c4d78dbb741620d7b3a252 > > > Reported by: markj > > > Sponsored by: The FreeBSD Foundation > > > --- > > > sys/kern/vfs_syscalls.c | 6 +++++- > > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > > > diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c > > > index 5c0a291e3b0b..d68af4ea4d51 100644 > > > --- a/sys/kern/vfs_syscalls.c > > > +++ b/sys/kern/vfs_syscalls.c > > > @@ -2438,8 +2438,12 @@ kern_statat(struct thread *td, int flag, int fd, const char *path, > > > AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH) | LOCKSHARED | LOCKLEAF | > > > AUDITVNODE1, pathseg, path, fd, &cap_fstat_rights); > > > > > > - if ((error = namei(&nd)) != 0) > > > + if ((error = namei(&nd)) != 0) { > > > + if (error == ENOTDIR && > > > + (nd.ni_resflags & NIRES_EMPTYPATH) != 0) > > > + error = kern_fstat(td, fd, sbp); > > > return (error); > > > + } > > > > cache_fplookup_dirfd() doesnt set the NIRES_EMPTYPATH flag > > It doesn't, but for an AT_EMPTY_PATH lookup it aborts the lookup and > returns ENOTDIR to namei(), which sets NIRES_EMPTYPATH before passing > the error up. > it call cache_fpl_handled_error() which is set status to CACHE_FPL_STATUS_HADLED, namei() simply return error in that path > > > error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED); > > > NDFREE_PNBUF(&nd); > > > vput(nd.ni_vp); > > From nobody Tue May 2 20:01:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9rZG0xfYz49Lvb; Tue, 2 May 2023 20:01:42 +0000 (UTC) (envelope-from mjguzik@gmail.com) 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 4Q9rZF6Plyz49LJ; Tue, 2 May 2023 20:01:41 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ot1-x330.google.com with SMTP id 46e09a7af769-6a5f602a8f7so3105890a34.1; Tue, 02 May 2023 13:01:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683057701; x=1685649701; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=yFuDDd06LpxUrx8g3W+vRpHtVpySvJzkfErEWSvwpA0=; b=LOmOtyINgaI6Vx1Ks8Xpa23Y2CBAHK33NepHmjI8npaBmKHDwxJMNnxODWfmxhRQxu djuIOZJT0Pxv+YOTdz58/9lrTYEXoku9VNDEqJOevzT1sdbr74mLnCbGAK+ihoS8PA3P 0YwLQ4mG9KSiUAhf7sDK/VLK/QokYpMlSSxyOCqGQu6V349OQCSyO02OBlyJrcyvMfdE 8oDs2l2lE5cRU3VdZkiaR3+yzjag1MBTFNsB1z1TFQjstI5osSQiqLsvuPdYxYrmKdCc TZ86JIiLNKbGt65vr50xps8A4p1ZgyC2hdohlaTGyT66ct1T0NJAPMjItAv8SIDdR2Ek ExWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683057701; x=1685649701; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yFuDDd06LpxUrx8g3W+vRpHtVpySvJzkfErEWSvwpA0=; b=HeRC4h9Jwec5ePVlJ0ezNcf3EiuoVI3U2yrC86/7Kdt9kClHoHPaONm+IZD+7fniid EIQD9BXaPNifqGulv89YPKLAw1xJ3BUlGWKm+UUJfagMVX+jx83EMnUwyu8vl5V5//6H 6ejygQ/6RHR2E182UpTx4lsc5Z05PB+P48Bm1cJ7byWqolP/fkIKI4HwsySNfsQz2hpD /qXEo7O0FKsGmxrz3+9lmXmEjWXLPPRC9kYBvcDsOXh2bwUMCMBcAWP80nqcj+sAOiPv B1rLoKUAs1DtT01kPUDe60zXlvPipQhxhoI6izoX0jq8BuVD1VdwHCqlwS/Em73Sdlzi Avpw== X-Gm-Message-State: AC+VfDxZI5NwpE8KQQHYWEq2a8H9TKK41jaz/KS/YnFZDUmdRt3ZDWnG 6f0Fm7gx6wE2lJZK10Ax9rjW/oX4EUYRRW+cFP+Zuuby X-Google-Smtp-Source: ACHHUZ7iFazPlot0hVO6Jim7FOpTqJh+QOWgMMLIvZMnxFLEigvlqlEbsiQet+3AKL9u3vg3acdDBEPsvapGLyn0Mt8= X-Received: by 2002:a9d:65c1:0:b0:6a5:f682:44c2 with SMTP id z1-20020a9d65c1000000b006a5f68244c2mr8528101oth.14.1683057700724; Tue, 02 May 2023 13:01:40 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Received: by 2002:ac9:799a:0:b0:4d4:94b:7266 with HTTP; Tue, 2 May 2023 13:01:40 -0700 (PDT) In-Reply-To: References: <202305021512.342FCpbN056202@gitrepo.freebsd.org> From: Mateusz Guzik Date: Tue, 2 May 2023 22:01:40 +0200 Message-ID: Subject: Re: git: a1d71cebc05c - main - fstatat(2): restore AT_EMPTY_PATH handling To: Dmitry Chagin Cc: Mark Johnston , Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4Q9rZF6Plyz49LJ X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N right, this should do it diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index e4977392349f..b583eed5e249 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -4435,6 +4435,7 @@ cache_fplookup_dirfd(struct cache_fpl *fpl, struct vnode **vpp) if ((*vpp)->v_type != VDIR) { if (!((cnp->cn_flags & EMPTYPATH) != 0 && cnp->cn_pnbuf[0] == '\0')) { cache_fpl_smr_exit(fpl); + ndp->ni_resflags |= NIRES_EMPTYPATH; return (cache_fpl_handled_error(fpl, ENOTDIR)); } } On 5/2/23, Dmitry Chagin wrote: > On Tue, May 02, 2023 at 03:04:37PM -0400, Mark Johnston wrote: >> On Tue, May 02, 2023 at 08:00:01PM +0300, Dmitry Chagin wrote: >> > On Tue, May 02, 2023 at 03:12:51PM +0000, Konstantin Belousov wrote: >> > > The branch main has been updated by kib: >> > > >> > > URL: >> > > https://cgit.FreeBSD.org/src/commit/?id=a1d71cebc05ccfeedf95f2db3e94b17270167888 >> > > >> > > commit a1d71cebc05ccfeedf95f2db3e94b17270167888 >> > > Author: Konstantin Belousov >> > > AuthorDate: 2023-05-02 15:11:39 +0000 >> > > Commit: Konstantin Belousov >> > > CommitDate: 2023-05-02 15:11:39 +0000 >> > > >> > > fstatat(2): restore AT_EMPTY_PATH handling >> > > >> > > Fixes: cb858340dcbf214cc4c4d78dbb741620d7b3a252 >> > > Reported by: markj >> > > Sponsored by: The FreeBSD Foundation >> > > --- >> > > sys/kern/vfs_syscalls.c | 6 +++++- >> > > 1 file changed, 5 insertions(+), 1 deletion(-) >> > > >> > > diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c >> > > index 5c0a291e3b0b..d68af4ea4d51 100644 >> > > --- a/sys/kern/vfs_syscalls.c >> > > +++ b/sys/kern/vfs_syscalls.c >> > > @@ -2438,8 +2438,12 @@ kern_statat(struct thread *td, int flag, int >> > > fd, const char *path, >> > > AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH) | LOCKSHARED | LOCKLEAF | >> > > AUDITVNODE1, pathseg, path, fd, &cap_fstat_rights); >> > > >> > > - if ((error = namei(&nd)) != 0) >> > > + if ((error = namei(&nd)) != 0) { >> > > + if (error == ENOTDIR && >> > > + (nd.ni_resflags & NIRES_EMPTYPATH) != 0) >> > > + error = kern_fstat(td, fd, sbp); >> > > return (error); >> > > + } >> > >> > cache_fplookup_dirfd() doesnt set the NIRES_EMPTYPATH flag >> >> It doesn't, but for an AT_EMPTY_PATH lookup it aborts the lookup and >> returns ENOTDIR to namei(), which sets NIRES_EMPTYPATH before passing >> the error up. >> > > it call cache_fpl_handled_error() which is set status to > CACHE_FPL_STATUS_HADLED, namei() simply return error in that path > > >> > > error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED); >> > > NDFREE_PNBUF(&nd); >> > > vput(nd.ni_vp); >> > > -- Mateusz Guzik From nobody Tue May 2 21:08:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9t3F5jxXz48B03; Tue, 2 May 2023 21:08:25 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-oo1-xc2f.google.com (mail-oo1-xc2f.google.com [IPv6:2607:f8b0:4864:20::c2f]) (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 4Q9t3F1rpbz4MJy; Tue, 2 May 2023 21:08:25 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20221208 header.b=rYEKU4Sc; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2607:f8b0:4864:20::c2f as permitted sender) smtp.mailfrom=mjguzik@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-54c96cef24aso1276031eaf.1; Tue, 02 May 2023 14:08:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683061704; x=1685653704; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=trTjSvSeLSB76/ik+DWUYGo7z6kAG/sOCNlB8rBHz+w=; b=rYEKU4Sc0jZjPr+FO1f7cKrgaZCrLDhoh7B13JBnKd6UpgUg9KA8xnopOrDd3z+6Am 19Pq4V7ZYPyXotJJLLgMqDlfC6LfwSu6LfNq7ztgoB/VzSZIR20t3+AL0Fiz3EJ5xyZW mSH7cKkTFKWiG3b2wavJkckTydUaXHbKTRi8y0aveNAO53HVjRrgr4+vdJEIhcBxeowz 11ZS0YAAS3i15OTTYKJ0Emp37jAKSYc1dd1mGpLc2JkX3mOGutgUhO6y2JbLNjHAfdNf zXfBdxe6lEC7N/pLj2Vc1HuHByxrxtdRyTcWpHfdJxAee4GkhMYV7hNNxNvQmB3E7MOE KfaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683061704; x=1685653704; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=trTjSvSeLSB76/ik+DWUYGo7z6kAG/sOCNlB8rBHz+w=; b=G3/jlahACO/jgT20Vm//r3WqoD40GeWQweLDGW8oh10Lxb1T0xd7+Hwhd2CwJ2vVaX xRnmO3dvrz52bC7Q2jzugMxmh4qlM36aE4ges8tpBHFViGTnOzAeIfoQJfML/FYtSa5j OVUAiCJd9UOOM3ntyyyQmpW+PXqmEYGbANygh0+mWKltRDjCEAos+O584Mg73TkjGAJl XhHyFgdyLI1qSI7b+VupKlmW8pctuK8KNOGXAxutM5jzLg4oIH9kmUSgbaS0MDoavn0E skWxixTHCtP1a7b9YZMeye5xiEbwftcD94rJvgZmoqFxunVnJOyUg7Ky1NI6aoLU1w+B fOYg== X-Gm-Message-State: AC+VfDzAJSDq5a40dN8cl4E4qPOPFIkw5sOY10+dejfe3p/c5dKz6ghA uyd9IiI5UE+mgqKdk9PV8jNDD3RilXgqwPzQxjFU/M+U X-Google-Smtp-Source: ACHHUZ6/PoomMzr5WBRS+3U+Y2f+p0QCq7Dol9axmESQUY9Sy7yOxM3/Hn9i5yFwvn3gk0eK9UcLcNtRdU4t5xj2XC4= X-Received: by 2002:a05:6820:1995:b0:547:7c75:4b23 with SMTP id bp21-20020a056820199500b005477c754b23mr8429902oob.4.1683061704220; Tue, 02 May 2023 14:08:24 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Received: by 2002:ac9:799a:0:b0:4d4:94b:7266 with HTTP; Tue, 2 May 2023 14:08:23 -0700 (PDT) In-Reply-To: References: <202305021512.342FCpbN056202@gitrepo.freebsd.org> From: Mateusz Guzik Date: Tue, 2 May 2023 23:08:23 +0200 Message-ID: Subject: Re: git: a1d71cebc05c - main - fstatat(2): restore AT_EMPTY_PATH handling To: Dmitry Chagin Cc: Mark Johnston , Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [-3.91 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.91)[-0.908]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20221208]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::c2f:from]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ARC_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; FREEMAIL_FROM(0.00)[gmail.com]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-Rspamd-Queue-Id: 4Q9t3F1rpbz4MJy X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N On 5/2/23, Mateusz Guzik wrote: > right, this should do it > > diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c > index e4977392349f..b583eed5e249 100644 > --- a/sys/kern/vfs_cache.c > +++ b/sys/kern/vfs_cache.c > @@ -4435,6 +4435,7 @@ cache_fplookup_dirfd(struct cache_fpl *fpl, > struct vnode **vpp) > if ((*vpp)->v_type != VDIR) { > if (!((cnp->cn_flags & EMPTYPATH) != 0 && > cnp->cn_pnbuf[0] == '\0')) { > cache_fpl_smr_exit(fpl); > + ndp->ni_resflags |= NIRES_EMPTYPATH; > return (cache_fpl_handled_error(fpl, ENOTDIR)); > } > } > on another look it already works fine as is, I miseed the ! in the condition ;) #include #include int main(void) { struct stat sb; int fd; fd = open("/etc/fstab", O_RDONLY); fstatat(fd, "", &sb, AT_EMPTY_PATH); } openat(AT_FDCWD,"/etc/fstab",O_RDONLY,00) = 3 (0x3) fstatat(3,"",{ mode=-rw-r--r-- ,inode=370100,size=145,blksize=4096 },AT_EMPTY_PATH) = 0 (0x0) dtrace -n 'vfs:fplookup:: /execname == "a.out"/ { @[stack(), arg1, arg2] = count(); }' [snip] kernel`kern_statat+0xec kernel`sys_fstatat+0x27 kernel`amd64_syscall+0x109 kernel`0xffffffff809726bb 4980 3 1 as in handled in cache_fplookup_emptypath > > On 5/2/23, Dmitry Chagin wrote: >> On Tue, May 02, 2023 at 03:04:37PM -0400, Mark Johnston wrote: >>> On Tue, May 02, 2023 at 08:00:01PM +0300, Dmitry Chagin wrote: >>> > On Tue, May 02, 2023 at 03:12:51PM +0000, Konstantin Belousov wrote: >>> > > The branch main has been updated by kib: >>> > > >>> > > URL: >>> > > https://cgit.FreeBSD.org/src/commit/?id=a1d71cebc05ccfeedf95f2db3e94b17270167888 >>> > > >>> > > commit a1d71cebc05ccfeedf95f2db3e94b17270167888 >>> > > Author: Konstantin Belousov >>> > > AuthorDate: 2023-05-02 15:11:39 +0000 >>> > > Commit: Konstantin Belousov >>> > > CommitDate: 2023-05-02 15:11:39 +0000 >>> > > >>> > > fstatat(2): restore AT_EMPTY_PATH handling >>> > > >>> > > Fixes: cb858340dcbf214cc4c4d78dbb741620d7b3a252 >>> > > Reported by: markj >>> > > Sponsored by: The FreeBSD Foundation >>> > > --- >>> > > sys/kern/vfs_syscalls.c | 6 +++++- >>> > > 1 file changed, 5 insertions(+), 1 deletion(-) >>> > > >>> > > diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c >>> > > index 5c0a291e3b0b..d68af4ea4d51 100644 >>> > > --- a/sys/kern/vfs_syscalls.c >>> > > +++ b/sys/kern/vfs_syscalls.c >>> > > @@ -2438,8 +2438,12 @@ kern_statat(struct thread *td, int flag, int >>> > > fd, const char *path, >>> > > AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH) | LOCKSHARED | LOCKLEAF | >>> > > AUDITVNODE1, pathseg, path, fd, &cap_fstat_rights); >>> > > >>> > > - if ((error = namei(&nd)) != 0) >>> > > + if ((error = namei(&nd)) != 0) { >>> > > + if (error == ENOTDIR && >>> > > + (nd.ni_resflags & NIRES_EMPTYPATH) != 0) >>> > > + error = kern_fstat(td, fd, sbp); >>> > > return (error); >>> > > + } >>> > >>> > cache_fplookup_dirfd() doesnt set the NIRES_EMPTYPATH flag >>> >>> It doesn't, but for an AT_EMPTY_PATH lookup it aborts the lookup and >>> returns ENOTDIR to namei(), which sets NIRES_EMPTYPATH before passing >>> the error up. >>> >> >> it call cache_fpl_handled_error() which is set status to >> CACHE_FPL_STATUS_HADLED, namei() simply return error in that path >> >> >>> > > error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED); >>> > > NDFREE_PNBUF(&nd); >>> > > vput(nd.ni_vp); >>> > >> > > > -- > Mateusz Guzik > -- Mateusz Guzik From nobody Tue May 2 21:52:36 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9v2G4XP3z48D2B; Tue, 2 May 2023 21:52:38 +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 4Q9v2G3nkkz3Fqv; Tue, 2 May 2023 21:52:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683064358; h=from:from:reply-to:subject: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=nHsl5WWkMOPFYxOJYkmLicBzrpCy4AZ7mWrejKuum40=; b=nguE25A969u+ekwDIsWd/b6IBJmb6jOnsihv/aAx8K0k7hmIg7cl/z7BfCNDT1m0jJB83j 5+vnmyv9bB6kJNf/0G6FW6KrRvDXcuHZ3cgzyy2Mr9et0dkrLKc4mEPwizwYlGAZF1Bvk5 I4NQ3k7o6JmuicOsAfQI79K/3rsXsqOruD9R2idqGoEtb2KfGfMpAAXMQDWU8AIQBrZ5W2 bju0IknQastYnj0qjiy29WPSnupEkGfOl6uloNpt35XNESM1oMzCEZKSxQOj133+/54JxI 7CXciBX8DA+Xqpj+941YGhO42R4ZFv2EId37wxQUgDSOidVF+HZ5OtxfDIPm1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683064358; h=from:from:reply-to:subject: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=nHsl5WWkMOPFYxOJYkmLicBzrpCy4AZ7mWrejKuum40=; b=iq7dNr8cXWOcKqsTs1MuWtp2OWwjkiDtv2g/ahtMbjAENeAP/Xhv96342hKc/h/hmh3kUi 6EVHGgZsde0ZYELKkZjhxsGZ0M5Ph8Q/Rsi+FVyWhJzT2TqFvlIYhzqCmB7b1Sw6glnFwT REcUyZpCZ8bCZegQrAkAwtV/EgFY9ICbgdLJMnd/66yX6hn7VQmxsQCMhQlGQ/sROnYc/Y KI1vdpnjMpQWUd4qjYS7xsdsfMEZ4G6/Wn9pVAv5+qo51xp/EYyhmU68317XxuzHd622n4 Ocx9G+JcO+FmAiXDjA/UivIGTwob9DL+Sy+udT0iPhhGFKccjC6rEYpa42L7aA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683064358; a=rsa-sha256; cv=none; b=ySqsY50RadA5MKkNkKpjpVCqfboZoUaW9+NM/a6D2is4UuHaevDiGlZocH7lHWH+a6Mvy2 koJSWrw9p5h74Gc9mxGtt6dGST00SbGD6ss+qO5EFYcflxijNU7vgzf7F2DpUzNakRU95K +8Kb24XOQgm8nEUA86Xvmdeatz6h3WEQo98rmyLJXLq9iZ4jKrpiPXIiHstRSASz5NcjXq 7mz4ikLws+aEJpsiYYQNEAp5WNYCAu1Qe4bS8WsONgocxrZVLpswYqkrfmTBemA3sZZ86v bYf5OmKhZJGlho7d+WIE+5EbS2kMbUpFF4NK6BtP5glGjauK2BxRje8Z0YgtDA== Received: from [IPV6:2601:648:8680:16b0:56:ddb:b895:f1c1] (unknown [IPv6:2601:648:8680:16b0:56:ddb:b895:f1c1]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q9v2F6z93zQK9; Tue, 2 May 2023 21:52:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <50e84672-585d-627a-27fd-8a9257024cd5@FreeBSD.org> Date: Tue, 2 May 2023 14:52:36 -0700 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: git: d713e0891ff9 - main - MFV: less v632. Content-Language: en-US To: Xin LI , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202305020345.3423jB5J014057@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202305020345.3423jB5J014057@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On 5/1/23 8:45 PM, Xin LI wrote: > The branch main has been updated by delphij: > > URL: https://cgit.FreeBSD.org/src/commit/?id=d713e0891ff9ab8246245c3206851d486ecfdd37 > > commit d713e0891ff9ab8246245c3206851d486ecfdd37 > Merge: 83d5725005c5 159d764c1668 > Author: Xin LI > AuthorDate: 2023-05-02 03:43:57 +0000 > Commit: Xin LI > CommitDate: 2023-05-02 03:43:57 +0000 > > MFV: less v632. > > MFC after: 2 weeks Thanks! -- John Baldwin From nobody Tue May 2 22:02:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9vFw3fB5z48Dbb; Tue, 2 May 2023 22:02:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9vFw2plrz3HNk; Tue, 2 May 2023 22:02:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683064964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=izC/I80zna/RrNWiagEVS5TxbXgWLoqQdQmXIVo1cXc=; b=QRS+MIb++eX/d68kyMWqcGc/ALg+BI4oy9Kaol667ojhMXp9IlG/EX3QtAvWvnBJ9nln44 EhjJ5NloCEC5IyAgapPciURWIlAdY0Z9rOj1N0lgCHDVfnnUPT7YPYZVQMKcLm90MfDe3T vKlf38ZRg59B0THh5Wd3veso/OcfWbRnf7pfotG/IfhCtLdAL3em0iZcPaDhdrAFyYUA0k Rh/8a3hqRs4P69Z/bGD7dmJY8qBfUlWewIl9COxUPWTinWauR7IplRw1tOrcDlTTajC1D6 ysm6XJZLyj+9QSjnAHI7NKTWx74p4BN/hX64jKhJwK/R6Qvc5lKzM6lOdVVJag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683064964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=izC/I80zna/RrNWiagEVS5TxbXgWLoqQdQmXIVo1cXc=; b=KvymfM95V5pgWzQlNbTbxFow3qyjOJn0gkbFlFrDOGmZA6w9OA1Pu3LXy5aFGlgrtUQby5 z5ivtfY3iy0u4vPvjOlbu+mi7Iq75V+SVyH4weqU9teg7te+i8KQapvxHS4Ffgi9Y6DIri O4RRw2n4rjpibjRSuKOpOiA144MgFYHnmQkWNyq0kzWQzBI8x/nVUSz/PwY6yB7IYyN3FB bP1M09a1hbhTsBgntFC/vcTmrDy2+y1OGRiW0KfrSb55NfE3U8fZORD++yE7GAIxBjiWpF n9NUAtjQg5FFByOYVZ7I/YooN2Rqo3B7G47kJBTavV/FMKcar85m66/cglC1bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683064964; a=rsa-sha256; cv=none; b=ZuGPqAiK+SyL5WyUTVHJRMoXve2XdVFGrfei+s1EmYSvhrNtw+ZGvySMcts7XtCVPfmh51 g0+Q8wCdgK4Dst0GlaCgsSE/wOiyv44eFK0ZnGV9UbGs2uphetv6kmWbEDFnbChj+p1TAp p25SG6JFF6YOE0DUGaDzy0ko23PHtuxm60UltHLnlvKUW2NzyPmvdJqjiaDCOZqW8FJewL d0wO7h0NB+rOs+YQ5/snnGy6BOzjFXhuSISrKI2Fj2fAA3Ri30yHmKvlgLRtNazTWQfNug kyWBChO39htLMNrBYTGEwL54qjxS60SolwjQNCyyiruF5g3rqLP1Ajr6UniqMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9vFw1skBz14fs; Tue, 2 May 2023 22:02:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 342M2ieO040001; Tue, 2 May 2023 22:02:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 342M2ixQ040000; Tue, 2 May 2023 22:02:44 GMT (envelope-from git) Date: Tue, 2 May 2023 22:02:44 GMT Message-Id: <202305022202.342M2ixQ040000@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: ec1e83782d9d - main - rtld: don't add extraneous -L directory when MK_TOOLCHAIN == no List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ec1e83782d9d13b427f7e935e9477e8120ec6c31 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ec1e83782d9d13b427f7e935e9477e8120ec6c31 commit ec1e83782d9d13b427f7e935e9477e8120ec6c31 Author: Ed Maste AuthorDate: 2023-05-02 19:57:20 +0000 Commit: Ed Maste CommitDate: 2023-05-02 22:01:43 +0000 rtld: don't add extraneous -L directory when MK_TOOLCHAIN == no rtld's Makefile used to add -L${LIBDIR} to LDFLAGS when MK_TOOLCHAIN was no. This was done as part of a change to fix building rtld with MK_TOOLCHAIN == no (although I'm not sure this part was necessary). In any case as of 5f2e84015da7 libc_pic.a is built independent of the MK_TOOLCHAIN setting and the main part of the workaround has already been removed. Remove the rest now. This reverts commit c0f5aeb0329d71e6b02379133c0c9c0145c9afea. Reviewed by: jrtc27 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39938 --- libexec/rtld-elf/Makefile | 3 --- 1 file changed, 3 deletions(-) diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index 1f3df176992a..a132c756723f 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -57,9 +57,6 @@ CFLAGS+= -fpic -DPIC $(DEBUG) LDFLAGS+= -shared -Wl,-Bsymbolic -Wl,-z,defs -nostdlib -e ${RTLD_ENTRY} # Pull in the dependencies that we use from libc .include "rtld-libc/Makefile.inc" -.if ${MK_TOOLCHAIN} == "no" -LDFLAGS+= -L${LIBCDIR} -.endif VERSION_DEF= ${LIBCSRCDIR}/Versions.def SYMBOL_MAPS= ${RTLD_ELF_DIR}/Symbol.map From nobody Wed May 3 00:29:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yW81z8Zz48NVZ; Wed, 3 May 2023 00:29:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9yW81RpPz3lKq; Wed, 3 May 2023 00:29:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gmbn/7BYd6mu8BG8C3WrIc7Fo9A0qn9/lxeNQxZt0FM=; b=mslaGhzm4gq0vkcI4Gi3Lgt1ttNyOjAySE0pj2oB5EmAW44IquKgwMat+uLytIvVbF9xw5 Ly4NAe0We743gjfhTwclSkQYMXnKLroykVfxBZwCzynVy7s1xiwweBnWSwvaPB1WvF/DJI X3oKoqKQ8kY1XagdRkoZXOZkAKPTZgLYB0a1Dsm1dskZp1ImIhzDQJRxDdkDcUxt/wxowR Y11nso/WK8YuAo2iQsBebuOWVVtWpZClGuWMWovkLKxFTYSsqgVx2RwuB4C6Oc7HvJF/Cu ZGDSkd8jCGNrd9894RMEvjTOsc2DNZiW6CxxUd/QZVmMd8WB0QrMYmjoeWpdMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gmbn/7BYd6mu8BG8C3WrIc7Fo9A0qn9/lxeNQxZt0FM=; b=k9wNIS2NcqRoY5+y//PlVRQB5Og4u9qUEVqVe3gtcWhnNZ/gCfNnGF14CUAzTUbt2eaVVy m+TAb8TppS58+dG1alzgOTcA21Z1cJC4S+xvb4MGrgNn/PfzQktcriCr84OhCDceWiriF8 6oXA7BTtDSQZKSHbEY+j3kOxQit7pKygsV3hh/R1aOxwQFQZjrKmUBRMzzZe0cjmOzqY8t BxYqMVVhP9Tw1qFBlJINmdbI14O/lKRo00oUt6rVUibtdwSbcVzVCnsE+NXkreUPoyM+zM f1ORMH16HHuD2LZYg72zZHul5J3G2icEuR18vaR+fqQA41E4UK8aM8PdVNr3jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073764; a=rsa-sha256; cv=none; b=TuWDs4YLVgn/mxFTzepo7btqyzq9VttOP51AFvB23HYPd/uwK6tkVzpgEYm1+jKSAplBVa Z2V5eOnfEvlnKYzibczR7VXqgW5ULz1+pkm8PYvNtfY3wH319UG/9AwUT5kfEt9Krz483N psfwyTDPOSm2mu2I52S8PRA+hy1W56uPN60G89CSSfCpMxnXeHuGooQD4sNrPW2CSz5xCv xQY/56L06qv0bOiBYVsNArum6oCcEgdQOjUe5IA3Yszum2XFwLDTZc/Ymk2WW740iqMKgW u/f3W+f5gHH7vQS3KCOGXiRgkoNMAky56/sFTgdyFyz8fXTaNw/JZtEfP7wGEA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yW80WNBz189C; Wed, 3 May 2023 00:29:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430TOjn071688; Wed, 3 May 2023 00:29:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430TNZt071687; Wed, 3 May 2023 00:29:23 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:23 GMT Message-Id: <202305030029.3430TNZt071687@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: d854d8122288 - stable/13 - ncurses: Backport a few fixes for GCC warnings from version 6.2-20210220. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d854d8122288dfa6b0245774ee37b02541c9b989 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d854d8122288dfa6b0245774ee37b02541c9b989 commit d854d8122288dfa6b0245774ee37b02541c9b989 Author: John Baldwin AuthorDate: 2023-05-02 23:38:54 +0000 Commit: John Baldwin CommitDate: 2023-05-02 23:38:54 +0000 ncurses: Backport a few fixes for GCC warnings from version 6.2-20210220. This is a direct commit to stable/13. --- contrib/ncurses/ncurses/base/lib_screen.c | 2 +- contrib/ncurses/ncurses/tinfo/lib_tparm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/ncurses/ncurses/base/lib_screen.c b/contrib/ncurses/ncurses/base/lib_screen.c index 164356dc41de..f46e17447127 100644 --- a/contrib/ncurses/ncurses/base/lib_screen.c +++ b/contrib/ncurses/ncurses/base/lib_screen.c @@ -67,7 +67,7 @@ MODULE_ID("$Id: lib_screen.c,v 1.97 2020/02/02 23:34:34 tom Exp $") * format. It happens to be unused in the file 5.22 database (2015/03/07). */ static const char my_magic[] = -{'\210', '\210', '\210', '\210'}; +{'\210', '\210', '\210', '\210', 0}; #if NCURSES_EXT_PUTWIN typedef enum { diff --git a/contrib/ncurses/ncurses/tinfo/lib_tparm.c b/contrib/ncurses/ncurses/tinfo/lib_tparm.c index 400cd31996f8..7a53dff3addd 100644 --- a/contrib/ncurses/ncurses/tinfo/lib_tparm.c +++ b/contrib/ncurses/ncurses/tinfo/lib_tparm.c @@ -341,7 +341,7 @@ parse_format(const char *s, char *format, int *len) * may be cases that we cannot see the explicit parameter numbers. */ NCURSES_EXPORT(int) -_nc_tparm_analyze(const char *string, char *p_is_s[NUM_PARM], int *popcount) +_nc_tparm_analyze(const char *string, char **p_is_s, int *popcount) { size_t len2; int i; From nobody Wed May 3 00:29:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yW93Vrfz48NVb; Wed, 3 May 2023 00:29:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9yW92r6lz3lXw; Wed, 3 May 2023 00:29:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073765; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jW7rRZbDKipxUwNV92zzefObIqD+Yul024lvRsl9sOY=; b=aMKDVDFOSd0ov57c5B8dJPSnRDme05rrhNWYBqf7/Mmc3hcybaLqz/3KReLBy62x08ohIS 905hBqa5GTvTO4AU0dhSXvJkbMzVgFLylFvHuZwi7p+h1Y/Qa0vLla7RROBNHpZh82HntU B6dgi3KoX+8/bOYerr0uOVvbEvBw6MnltmZdhPI7U77eaaiza3uT0GnS78d3/N41sf/dHX hF50BBJoW/A+mfkHoUwMTIgCVfoopvk46jdquTNWkKcLlrlbgWUyD0aQ1l0mzADtOy5VLV 6BviPjrFG6FDG3I23ZX596jdh6Jj5alz2ivfBJPtMKlTv4uqIdEPh9cQZDt0uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073765; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jW7rRZbDKipxUwNV92zzefObIqD+Yul024lvRsl9sOY=; b=evjUSSq/X4GOCBLOnWC911lygUDFiv2qqOfK6YkQf2h43pq3EM49/Ai7OG02Yy2kLtwQ9L ILF3qnM2nHBa106koY+/2Z9oUjw4jg9QGXTYgWLZO08MfqBfqqXd+jQ1dfg9Jmvuc4s7OB KSorG+u2ttnnuPz6uInQtdPVsFpSthoeE+1z5rcU25RULibHmbeJ4J1mn8DK7V/3dEI3Bp iT8ZgYYlaWwRMpvpFpjptjVyzogp14XFRMoq/OqiAwFFCd0dMbmQFhg7pfoHumm4ogsvXs gyWgcLnvOMD/xWvjaisG8nP/UA1r374o60K4jnpKE4jaEH68vmx3aold6e7TvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073765; a=rsa-sha256; cv=none; b=eFfuGOMdYjKOZlZZ/7DVIjmdznJZVa5vmsr+dHqKGlkXhrsUXQKKAXEb7yJmsjSwJQf5sI UiOzx2Z7CzUCszqfSzkbI0aHjqBPQKXkoqgvG9bpzG6itfNe8nPwBGh7zREG1xuT/zP0OG oXClHfB3ExMlOWNXuQUOHL29BtyPsceuvrZs199rUTJcD8YQksEN+pMJSP5rTi59MHo4cc sibYENH3VTHGn4J3y73w7m+18Kr/QwFiuB3xvDp1oMjvTAg1ua1/RFDIBW0JMlUc/V1V55 1wLut/9BOxVBejt/34nxMM3JcNjOr9+j9pXJnc7DLPWFOFwgsrqvC4xLQBe0Kg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yW91q1Tz182c; Wed, 3 May 2023 00:29:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430TPwQ071723; Wed, 3 May 2023 00:29:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430TP8C071722; Wed, 3 May 2023 00:29:25 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:25 GMT Message-Id: <202305030029.3430TP8C071722@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 3c8aec53a93f - stable/13 - libirdma: Drop clang-specific -ferror-limit. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3c8aec53a93f9d5d21a47ae8be5c52a37059fe4d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3c8aec53a93f9d5d21a47ae8be5c52a37059fe4d commit 3c8aec53a93f9d5d21a47ae8be5c52a37059fe4d Author: John Baldwin AuthorDate: 2022-10-03 23:10:42 +0000 Commit: John Baldwin CommitDate: 2023-05-02 23:39:52 +0000 libirdma: Drop clang-specific -ferror-limit. This could use -fmax-errors on GCC, but tweaking the error limit is unusual in the tree anyway. Just remove it. Reviewed by: erj, imp, emaste Differential Revision: https://reviews.freebsd.org/D36808 (cherry picked from commit c3a3d1fd6c7007e7088936e14fd9b4944b3a3054) --- lib/ofed/libirdma/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/ofed/libirdma/Makefile b/lib/ofed/libirdma/Makefile index 1280b8a6d7bc..368bd536c587 100644 --- a/lib/ofed/libirdma/Makefile +++ b/lib/ofed/libirdma/Makefile @@ -18,6 +18,5 @@ irdma_uk.c \ LIBADD= ibverbs pthread CFLAGS+= -I${_spath} -I${SRCTOP}/contrib/ofed/libibverbs VERSION_MAP= ${_spath}/libirdma.map -CFLAGS+= -ferror-limit=1000 .include From nobody Wed May 3 00:29:26 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWB3wmgz48N7F; Wed, 3 May 2023 00:29:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9yWB3P57z3lNZ; Wed, 3 May 2023 00:29:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ih4twoVq2tpR60SiDlDVdHedC7pDZKJdsxoJyovuVUM=; b=xoIg/LmHv3Mnca4GS7kMmLfu2evBwEmJ1XPopPaYAZr8KCGdIAb6EJFzoOaTHTnWtGGkMo OMBofgWEpMQiXLPUdMcTqL4vtBOhw9GVwSHKgRZ5vOeA4oaGGFg3WA2VoWmBiGWMReJULE gV6OjyxC4JNOE1IdOMhiLQ87EC0L3Eo5RKEwMiG+6sgyQCIBEpfN3ZBtxTPQoEX2mcwD3D P/5c47r2XagSxorcmpSZk91fJh3H7oYTGbGThb+aa7kRF9BmbeNspgBAYD+6OJJSkcnwOO HmHU4ELU4jybMn29tYjtRlYky4CXfiLP2BHsKFOlOUm3KmmkloUJfp7zoZR6Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ih4twoVq2tpR60SiDlDVdHedC7pDZKJdsxoJyovuVUM=; b=utELGyAXeIwCVvlWiG1P2swZs69SD3lk22G276q1p5Tc8Rdk4H5pVtMLQqMSAl3hbQZqtd jeo0KPQnZf5yTfBYbWazWYULbv8lED0YAzRzMa7wvHzpfz0K3SEoY3RJlsZsDiSrl05uu8 xz5WBw9xb0S/HIpHhoY7OcW9U8HQIiKskKI7i1H0R4E8+KULzIRwsldwHoONP30P4sIQbD qftcmd0mQH6xqy+5LEzFpsG6o+THu3ob6Pea/bFA0fbGBqpg4FMDuPhE8IjS0kBAy8Ovt2 Y4eaRxdYmR0K4SUGNPeEoQY7ZxSJb99/TMzPGuRT4V2QmXlTU+yyEQOk6fUQqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073766; a=rsa-sha256; cv=none; b=sRTKKij24hsVvF5kkzz3wovc5/E/y19Czn8fdTEwmDjiw2VhqTtLRUvHOPoL+MPtQ29JO4 yr5FkDNzbDLGhmjGk2wJCYXNIbTK1n/SIVPIQzbLmEZmMsCoy/87kBo3LANmGdKinA+Aaq 9UUrah94+z1YDmVTXsjaKZm5H2iXEgs1Y6Jo61pIfCe2jKOMtpKKb4BskN8kCTgZ7vYYtt RyOn44ZqPorgpNJxVYyfafeoNJwDSgVqjVknlCTl0Z52aX88IexdzAc8sGa7pWTvorxY/X 59nB4tNu6DYAxg4ICvqnzMipanrOqqaVoQ/lzAzi19FhjBRzUEz/mmvLt6FFMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWB2SQ7z189D; Wed, 3 May 2023 00:29:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430TQkr071742; Wed, 3 May 2023 00:29:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430TQYi071741; Wed, 3 May 2023 00:29:26 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:26 GMT Message-Id: <202305030029.3430TQYi071741@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 773bb4c45cac - stable/13 - Use __freebsd_kprintf__ with GCC 12+ similar to clang. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 773bb4c45cacfb2bd654cf3896f7875c5ee3f62c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=773bb4c45cacfb2bd654cf3896f7875c5ee3f62c commit 773bb4c45cacfb2bd654cf3896f7875c5ee3f62c Author: John Baldwin AuthorDate: 2022-11-22 16:36:12 +0000 Commit: John Baldwin CommitDate: 2023-05-02 23:41:50 +0000 Use __freebsd_kprintf__ with GCC 12+ similar to clang. (cherry picked from commit 5115511ed4941684bc82b8a3c4b95e9a8931b940) --- share/mk/bsd.sys.mk | 3 ++- sys/conf/kern.mk | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index cb4399610d0e..ad359727c32f 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -238,7 +238,8 @@ CWARNFLAGS+= -Wno-system-headers .endif # gcc # How to handle FreeBSD custom printf format specifiers. -.if ${COMPILER_TYPE} == "clang" +.if ${COMPILER_TYPE} == "clang" || \ + (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 120100) FORMAT_EXTENSIONS= -D__printf__=__freebsd_kprintf__ .else FORMAT_EXTENSIONS= -fformat-extensions diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 87e788666efb..53eb49c95c4b 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -101,7 +101,8 @@ CWARNFLAGS+= -Wno-format-zero-length # to be disabled. WARNING: format checking is disabled in this case. .if ${MK_FORMAT_EXTENSIONS} == "no" FORMAT_EXTENSIONS= -Wno-format -.elif ${COMPILER_TYPE} == "clang" +.elif ${COMPILER_TYPE} == "clang" || \ + (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 120100) FORMAT_EXTENSIONS= -D__printf__=__freebsd_kprintf__ .else FORMAT_EXTENSIONS= -fformat-extensions From nobody Wed May 3 00:29:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWD02bKz48N7K; Wed, 3 May 2023 00:29: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 4Q9yWC4SCYz3lZ2; Wed, 3 May 2023 00:29:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J6JEf9hzIQ4EFXWXg3VY6MQvdA+BQIo6J9IP4+JAmzw=; b=j7xAsoYNyMY18uikj9ekymgpqn0E7ag86m0VW9Re3WE7tWRjFOEpoNQ5g8e6sUPVtJlns9 orCLhgnHUOwZPHwmwbJa2kufjNSBiCmGuZaQCy9ttS6xToDICYs9EMURpWG7nxcOG4ga2V 5x0KCBWy3fFzeWMM1bUk+v/G1mPK9f1edBQCbdDM/gwjm+8ECIgJVLn39hfCxqewaU/zng LqMvTkBjC+3SCF5Z+f7I4qUjtgbe6+akRtTv84wQzM2tNRZ+LDrtT6dtcJJuwAc45s0mcS yDR1YYKaaAiuJevc2eViJXb/KA81pWfwPA7yPLvtU1taHMBysM3X6E14AGN7NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J6JEf9hzIQ4EFXWXg3VY6MQvdA+BQIo6J9IP4+JAmzw=; b=LYiYu7SdkY9xYijr6v9A3oSeL5wzGGkJKII1z3g/8k9rlRfx4jZ3RZ3z+Y34T6W2QsgSIx RYfF3MabTeHYgHzGqV/ZG2asjGVbRXSHVja6BdP4VkbJ20rQRI2ELJG12g5nVrdAw+682/ ite04dXUu3Eps1YmNlG1XxPswFWFjhnI2oPReGeQwEse2B/Tu5yiK7rzuk9626FyMbqaTl Nc8sJnuhxQeuYwV/kmh7+j7IfNjZeSGAwVcYlYbte0Tkz+FKGsnsGQWGxWjyHtcW+2Qj5K PfeycFHcy64S3B5GsmNNOhqgkjzEQ/otOfzJvnOFWFHXlv7bromRdTi5DKk6IA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073767; a=rsa-sha256; cv=none; b=NFY8IFwKtohIBsbuVUd0vXa2d8O/KO8pPcQSRU1zVGDGEn4+9/ErIdvEYnnBdZL8CU5FhD tawJMQvpL3EdBA3IENUfQQmsZ2R6rzN8hsushYLin5RyxlakO8666WHdfJ2D1kCkfWvegP jpnckl12psYO3Cm1afZltygzgy3I50bM9zkiEhB83g6Bq1cdy/PXPeBP4Xk3nuBsUVQ7KA /segjcmq6jVmo/HpY+hGXWpsdx1MWuplN/qeLZnPe22RzmY06XTVkUr8DUUIFfPXxwoaD0 EtEXPlX+SK7PzhWA8Qqec18uBd6DHvoFX0+JKcUHpDwZ7w9uusVegWgQskLp4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWC3NYyz189F; Wed, 3 May 2023 00:29:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430TRXU071764; Wed, 3 May 2023 00:29:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430TRee071763; Wed, 3 May 2023 00:29:27 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:27 GMT Message-Id: <202305030029.3430TRee071763@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 80a1e92e4f54 - stable/13 - Silence GCC warnings when using libc++ headers. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 80a1e92e4f5408b08e441dcbe811a83f9584241b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=80a1e92e4f5408b08e441dcbe811a83f9584241b commit 80a1e92e4f5408b08e441dcbe811a83f9584241b Author: John Baldwin AuthorDate: 2022-11-30 22:50:35 +0000 Commit: John Baldwin CommitDate: 2023-05-02 23:42:17 +0000 Silence GCC warnings when using libc++ headers. GCC 12 raises warnings about literal operator suffixes not preceded by '_' in libc++ headers such as as it doesn't recognize libc++ headers being an implementation of the standard. GCC 12 also warns about clang-specific pragmas in . Disabling these warnings globally for all C++ code is not ideal, but is a better option than patching libc++ headers to ignore these warnings. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D37530 (cherry picked from commit 442295c1fe84b4dc3e4834acdbf4ede75affe3c4) --- share/mk/bsd.sys.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index ad359727c32f..4a75e17ed2b6 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -227,6 +227,14 @@ CWARNFLAGS+= -Wno-error=overflow .endif .endif +# GCC 12.1.0 +.if ${COMPILER_VERSION} >= 120100 +# These warnings are raised by headers in libc++ so are disabled +# globally for all C++ +CXXWARNFLAGS+= -Wno-literal-suffix \ + -Wno-error=unknown-pragmas +.endif + # GCC produces false positives for functions that switch on an # enum (GCC bug 87950) CWARNFLAGS+= -Wno-return-type From nobody Wed May 3 00:29:28 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWD56XQz48NSG; Wed, 3 May 2023 00:29: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 4Q9yWD4bwqz3lTw; Wed, 3 May 2023 00:29:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kHiAFwyqRw/puvcNMgyyG5i8uSoRWokJLwNZf9hflAM=; b=Z6Sm7rrhjx7P13oKkqNrqLYGxPTxYLYDA2cl+GOwRwDSFPD7dG2xMdgCBbog7dLwxC6Q2h 1OcqueRsngXaJZxpZ49EMU/ikmoIBdhpoXdl3xRWcPJyO1VdjyiiVhNjrM2Vc8q9YQFPuu xZ03W7cfK3Bnr8k4y5teQIr+KxTH/Vxn4Hr2BUHHWJRtdniVuKjSRTVZjxB24buOYlEuVW EO1FMjCstG+ngWOYUOGT6tpZzQpzS63u4acth+XbtZJJ3GXGc+Wuui5cZR0AE44GOclatY MQJXaJpQACIAPB5Ydy7kvxuw7n99E1EvvR+3lBdQkULyBAyhZImLd79qSWtNDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kHiAFwyqRw/puvcNMgyyG5i8uSoRWokJLwNZf9hflAM=; b=NBW6ppZRyQ3IhEW8DCOBBHC0xupFgzlm10ZQGvB0N9ACklJRT73fU55M2DcGQtjOVP+5Zo aupewbfKzz/0RRh4rJhhdY+BTvoWLOIDOJXRbPxMSUuibcpVEt3A3+6G60fv4tHOZqe3if fTBboUGCKorrW+cbyp1kN1RtJ2KEffXiSOt9NgvBDJIh/L0TsPxrKukw+zy2qcxef922pH MAvDwkPRxllc1KQq0A5CzEG9Z6hNjpPU4XmTqSeOZGAkuYYuzxfZV5/q5wmkiyn40trbWx 2t3XCxi7gBxXZXIxvEZBxiRQpy7MU0FJkqpcCbSwOTHUSnEQ5i2TE2OPrKJDYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073768; a=rsa-sha256; cv=none; b=jLd88PRc7zfXkSRxX7nVPJBmw9zkGeoB9XVtvMwSxaQSsSgs06Bt885curnV2LBdcHVQVq 1z1ibLHhEcfQc6piKHSYsUSz225AmZY1eXSQd0cQva6LTgoSIeutx4dPfuyvfKap4X2N72 nJaNsM7uCihWgpQyPA9nCCXIsxxzoRPtof7vKSPiYvCZlqLafSRgu9Gipaew1o5C2QLjZa l5wHxJs8uhg/OcZXhm1JImvk4aoioTaPYRvCqsBaa9EOUqN07jBSw7jnkN5y/kQ43vjWiV Oc1RnA7ob5vJl6vgJKPAkNdeg17KuTnsKR69qsViy37RpEOe6Oisn+Sec9M6Uw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWD3jQfz18LG; Wed, 3 May 2023 00:29:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430TSAe071790; Wed, 3 May 2023 00:29:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430TSGx071789; Wed, 3 May 2023 00:29:28 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:28 GMT Message-Id: <202305030029.3430TSGx071789@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 42ed407622aa - stable/13 - libefivar: Fix a buffer overread. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 42ed407622aa53f9794b9d3d378c725945d27623 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=42ed407622aa53f9794b9d3d378c725945d27623 commit 42ed407622aa53f9794b9d3d378c725945d27623 Author: John Baldwin AuthorDate: 2022-10-03 23:10:44 +0000 Commit: John Baldwin CommitDate: 2023-05-02 23:46:37 +0000 libefivar: Fix a buffer overread. DevPathToTextUsbWWID allocates a separate copy of the SerialNumber string to append a null terminator if the original string is not null terminated. However, by using AllocateCopyPool, it tries to copy 'Length + 1' words from the existing string containing 'Length' characters into the target string. Split the copy out to only copy 'Length' characters instead. Reviewed by: imp, emaste Reported by: GCC 12 -Wstringop-overread Differential Revision: https://reviews.freebsd.org/D36826 (cherry picked from commit d30a1689f5b37e78ea189232a8b94a7011dc0dc8) --- lib/libefivar/efivar-dp-format.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/libefivar/efivar-dp-format.c b/lib/libefivar/efivar-dp-format.c index 14f6adc2fd98..c6bb0f9dba7d 100644 --- a/lib/libefivar/efivar-dp-format.c +++ b/lib/libefivar/efivar-dp-format.c @@ -1008,9 +1008,10 @@ DevPathToTextUsbWWID ( // // In case no NULL terminator in SerialNumber, create a new one with NULL terminator // - NewStr = AllocateCopyPool ((Length + 1) * sizeof (CHAR16), SerialNumberStr); + NewStr = AllocatePool ((Length + 1) * sizeof (CHAR16)); ASSERT (NewStr != NULL); - NewStr [Length] = 0; + CopyMem (NewStr, SerialNumberStr, Length * sizeof (CHAR16)); + NewStr[Length] = 0; SerialNumberStr = NewStr; } From nobody Wed May 3 00:29:29 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWF6c6bz48N7w; Wed, 3 May 2023 00: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 4Q9yWF5vr5z3ltS; Wed, 3 May 2023 00: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=1683073769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5T4F+MvNPSrCSMh0saTtqFR+pgs84TNTjy8h8r1zdAw=; b=ASL4200d8jStZq8MUIL+5GJWRPyIJFRnFSrgAu2HhflJAQpDjp0phzM4N/gldmxTzwisCA UVp4ScTTud6OyF095h8ZBNtoaSZYRf4lGYEq3dj62L6a8FaRIFohYV7wGBAsN+34P9ZPLY 29ggf6HWbVm9vDDyykANvI+vU2PIoJ91Ie6AcJBJKF3W3Svb3YMyhiRAjWBCbcZ8F9kE7y 71AADH5/0UdwqS9cBIDJFWPPtJ8ryDG7201FNKtBY8Y0faFJ5qrXe79utFaxr5TTJxY2Pa s1aMTHgh4FqWIFuzeo99yNFI1IvcmpBVE7eP0UNz28NBw0kfhuTPCBxMcFU3HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5T4F+MvNPSrCSMh0saTtqFR+pgs84TNTjy8h8r1zdAw=; b=kF0hRpSgi7KDQcaaXL6xPOAibB4OZ/CZzEoXjNatwjAMlc2mzo2EpST9pyc7XBxg48ruM+ Fk30zBBh8Dgu84c0GRZf4oQ17PwX+hc4ZZtLJDGi2qxmzPMNJEy2ekHWW80VzGCzk+sVSH 4SHp0vDbqVlP5O6nNBiEQDrDiC6CQPMt4fRnUSQWxRDAdvoih9wxhFYL38Qh5M1HMJymEU hDlXdPcRGrKQ/zp6IjGTim8ySjTNioJ/a9ReCw2szclPSHcLUnfRndrUS40yqsWJoWo4Vv fZb9mQ7nbganfuriXjSZnG5LrdwwVX5PWOReAcTKPFqQSXUd5katvj0pn53BUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073769; a=rsa-sha256; cv=none; b=jkb2gT29cUPAOiCeV7yGZLrB9ckCHGT/h6W3kB2RvxMwqLh4foxyOOh3PwKc4yOcYeAFG5 zWG4zHdfx0sA+JhQtkOd9SiZEoMA7I0yx2sCsIL+PNVmbQ9Fe42gakYShdcxvy0yQcYcyA 3H6reirvw5Eo1UEyY+uvcrsZNl7PHpX5nH9Cxoi3nMjSYBaOl5cXLEmG4ZBrVWcPhBllD9 uGeW1xvqO+RMc8jfJ1Vyc+I4pniAkln+M5+MdVXtLL2pF9bP1F/3WhzhBGxipq8f7TABpc fTUSdnrFLJLQ7QkuKg3mTG2WbIZbx3ZZ168BCMQwS9G1fB538QzJfJqFmOtSQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWF4t3rz189G; Wed, 3 May 2023 00:29:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430TTTn071809; Wed, 3 May 2023 00:29:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430TTpu071808; Wed, 3 May 2023 00:29:29 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:29 GMT Message-Id: <202305030029.3430TTpu071808@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 11a98ef22a4f - stable/13 - Explicitly set CXXSTD to c++11 for old C++ code using std::auto_ptr<>. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 11a98ef22a4f212747507cd0014e7dfb2d8db11f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=11a98ef22a4f212747507cd0014e7dfb2d8db11f commit 11a98ef22a4f212747507cd0014e7dfb2d8db11f Author: John Baldwin AuthorDate: 2022-11-30 22:56:19 +0000 Commit: John Baldwin CommitDate: 2023-05-02 23:47:59 +0000 Explicitly set CXXSTD to c++11 for old C++ code using std::auto_ptr<>. GCC 12 defaults to C++17 which removes (not just deprecates) std::auto_ptr<>. Trying to use CXXSTD of c++03 doesn't work with libc++ headers, but c++11 does. Reviewed by: brooks, imp, emaste Differential Revision: https://reviews.freebsd.org/D37531 (cherry picked from commit 42fb28cef42e883d808c9efadd44016563248817) --- lib/atf/Makefile.inc | 3 +++ lib/liblutok/Makefile | 1 + libexec/atf/atf-check/Makefile | 1 + usr.bin/kyua/Makefile | 1 + 4 files changed, 6 insertions(+) diff --git a/lib/atf/Makefile.inc b/lib/atf/Makefile.inc index 392bbb23b236..5904a859a15c 100644 --- a/lib/atf/Makefile.inc +++ b/lib/atf/Makefile.inc @@ -28,3 +28,6 @@ CFLAGS+= -DHAVE_CONFIG_H WARNS?= 3 + +# Permit use of auto_ptr for compilers defaulting to C++17 or later +CXXSTD= c++11 diff --git a/lib/liblutok/Makefile b/lib/liblutok/Makefile index dccbcaf773e4..0071d7b55070 100644 --- a/lib/liblutok/Makefile +++ b/lib/liblutok/Makefile @@ -22,5 +22,6 @@ SHLIB_MAJOR= 0 # lutok uses auto_ptr CFLAGS+= -Wno-deprecated-declarations +CXXSTD= c++11 .include diff --git a/libexec/atf/atf-check/Makefile b/libexec/atf/atf-check/Makefile index 6711d1744430..1a87a14f354d 100644 --- a/libexec/atf/atf-check/Makefile +++ b/libexec/atf/atf-check/Makefile @@ -41,6 +41,7 @@ CFLAGS+= -DATF_SHELL='"/bin/sh"' # Silence warnings about usage of deprecated std::auto_ptr CXXWARNFLAGS+= -Wno-deprecated-declarations +CXXSTD= c++11 LIBADD= atf_cxx diff --git a/usr.bin/kyua/Makefile b/usr.bin/kyua/Makefile index 966927709a06..e23899afd1e5 100644 --- a/usr.bin/kyua/Makefile +++ b/usr.bin/kyua/Makefile @@ -37,6 +37,7 @@ CFLAGS+= -I${SRCTOP}/contrib/lutok/include CFLAGS+= -I${SRCTOP}/contrib/sqlite3 # kyua uses auto_ptr CFLAGS+= -Wno-deprecated-declarations +CXXSTD= c++11 CFLAGS+= -DHAVE_CONFIG_H # We compile the kyua libraries as part of the main executable as this saves From nobody Wed May 3 00:29:30 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWH0BpHz48NSJ; Wed, 3 May 2023 00:29: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 4Q9yWG6hdQz3ls4; Wed, 3 May 2023 00: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=1683073770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JTj1voRKJkyKeEFLb1lxJDxn/dXQX2rBulykRTwlkKE=; b=t6WXvnCyalrTd4i/paLkp/F935iiiJyGTb+TFo9zK+6BGMurpmPgbMmrZJQRKbUYq6If4T OipA+LzSZXSsO3Sn415cvEkSycfSCPmt/dWZ9oMqjhiqo+iSgvn7Hk9vg+qVRh4UpgXsjv 1mCAsO2ZL3E216IYhKyb6SLWUAxEoRgbo0yqo+WtIpW9d04MheQS53drlQ6dho9UEdybhC ei1wlHIDJMRNios24U4zxn70OE7t9mB2xejmvMDg0WhLu+vhvHDyQJmrWaByqi3BmhB8iR mvcPB9XVzTUl22hgT0X8tR5/gquChRMg8lL+DP1JqOP9G8GcPlWdhQXsNReGYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JTj1voRKJkyKeEFLb1lxJDxn/dXQX2rBulykRTwlkKE=; b=t1XniuFv/ayr54PkPF4EpVgi3PDUWnR1GFQOQVCp7LUm1dKUoTjkYVh4I/XCU7SQnU8PCB gAfCHKj/5QAdHV0zky9KHyvfs3X5PK/fVJOhPMGIFivLZ6z1K4s8zmmvXwpV1tSphvCTDQ 258SLdcKKhnN/w8GFrKYvMlwJdwsFo0PAPXG8SnnDXdj/T22JsdqEmyxgB8PiY45yCCdXI c9S/OOjCzaOn3y6dEoP3DI2AgD9qZkY+TOjEOf3Oyy6iO4SVTr528YyT2+ywv1nriUnC1u 4dmYYPrbMhg2/+YQfhziPuVeSdmQX4zpl24AnwILVWlUo2UUf/ljawTqsbjwNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073770; a=rsa-sha256; cv=none; b=TMQACsDMIO9y5nfLwVLJ4sqsatYetLNAKoiZJa5WzPA/853ky4VI1GsqNvaXr2WBDpXEz2 N+rJm0pJWvNUP8oRrvQUtUTlY4xDz80wOzxEMf6bSSxOKr5EDcTw+Rjr6BaA0io7aMcpEn 9+cEcCPdYPqSI9pWuuaAXRkza4KKlF0IDpXZUiCVlYPEQBwP3RZbKm/QRWNlOsMZG8j9dh bbof0jSOilGsaI/PZxFWLODZgsUKnAWFz6b/bln15k8AWXX5x3HD9VGVdWbn/3X3jcyFHi 4AvWEdeE7tfqIrZCtryWRaC+CjnOnCw8D02SArN/SEP+c2kpuM4GzjGWVr3hnA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWG5pLXz18J7; Wed, 3 May 2023 00:29:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430TU04071829; Wed, 3 May 2023 00:29:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430TUnh071828; Wed, 3 May 2023 00:29:30 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:30 GMT Message-Id: <202305030029.3430TUnh071828@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 83a2c663b979 - stable/13 - bsd.sys.mk: Add NO_WDANGLING_POINTER helper variable. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 83a2c663b97947047f10537f76bc30f35af2c0c8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=83a2c663b97947047f10537f76bc30f35af2c0c8 commit 83a2c663b97947047f10537f76bc30f35af2c0c8 Author: John Baldwin AuthorDate: 2022-12-05 00:26:48 +0000 Commit: John Baldwin CommitDate: 2023-05-02 23:58:18 +0000 bsd.sys.mk: Add NO_WDANGLING_POINTER helper variable. This variable expands to -Wno-dangling-pointer on GCC 12+. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D37532 (cherry picked from commit ad96424e31a8c8c87fac8077fd4304c6fb133e25) --- share/mk/bsd.sys.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 4a75e17ed2b6..21aba9f010e0 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -135,6 +135,7 @@ NO_WARRAY_PARAMETER= -Wno-array-parameter .endif .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 120100 NO_WUSE_AFTER_FREE= -Wno-use-after-free +NO_WDANGLING_POINTER= -Wno-dangling-pointer .endif .endif # WARNS From nobody Wed May 3 00:29:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWJ2q5sz48NDy; Wed, 3 May 2023 00:29:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9yWJ1NLjz3lsl; Wed, 3 May 2023 00:29:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KGCnPvphISDwuYkwSdSe2Qj8CJnUQ56ZuRZyZPJOoeU=; b=CY9/lyPDi/Scwxe9zW5eBG6CFZfWn1DuDuLGOSAJent9A31G+iKAQMHZMWZ2lLb47jylg4 k+T6CiEzu2+IuIyLM6fllv0MwfRkUr4+KzXOsrVwu5C0ztZjzsbkNsX4ggDqIZZK4ldKWs ChMflVhA6kO52NELgfvedx5n2OFe8Ge80Cu/AvqjGbcQlB+zILOPqr1bV30lFlCRKgb/Eg lCnQC/C1UqieDvw5RayuaKIFSaNepEPb/CPLc3fJnQctfOUkYOLguiR8IU/XlnYHfMq6QU OegGlCvSTcCwTnnOqEoxDihJZWRUF+BHV7RlqF1mW+5rBCILZO5rD85mN8C8Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KGCnPvphISDwuYkwSdSe2Qj8CJnUQ56ZuRZyZPJOoeU=; b=oAYX9ehqE9j1iLUTXcivcawiefW/bCTqFuXi3D1Of++Yam/fpt0w2KNsq4DxgDPqUNxuq3 K/3i+jgtHXkapEADQQ56eLEGmp8kbJ334YIXWp/B59TdPm4xr9chOOshBNrx+lAKg6beSU 0NInHLSI4o79p9U4v/uYPB+CZD4ufaa/rM+Df6wtRqIF2B+JvonqR4Rj3iPNza1L2QfN0t 0D4fJ/wu8/AygXAOcHBfLdi6jrfInGFWxpyUstntZfLmXHQfqCPHfQx4ZNh7FIzi3poSpi wlsFkXTeXOkeeCiRwojDZGKvE4VrceTpXxHIvptmpsRESOh9x7dpI1lOCYtLSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073772; a=rsa-sha256; cv=none; b=Vm4Q2QAJWRd4op6Ly777Htf3t2mKOes7JppfVrSe07gkE8/Yt81LFxV2DhjZ+0DaavaNeY zCyTcDJ2JpdT4I1QO9UPsocZ9Y4H1ygL+F3rYKiep7YLK5TjmwyEMmH85U2PP4dhYDkS/L xczij7KXV4t/h7FY1tloc3mXWk4qUmvPo+AoKdn5eXykojVKzIh7B0vIODqQFE6FZh38e7 ibhP1X/FcBMu1eR1gDvOpXKezpV892254S7yuC9sU6WcCdL9CeP15STnAL9K9/2K4zXLkG MUbrD9GkBIjTN516m+BLNA37jV4+vN0GyLO5cz+1/RGwtZYALySoXoQlCe03Kg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWH6kV5z18Fg; Wed, 3 May 2023 00:29:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430TVxK071848; Wed, 3 May 2023 00:29:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430TVKC071847; Wed, 3 May 2023 00:29:31 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:31 GMT Message-Id: <202305030029.3430TVKC071847@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 7b9e74754674 - stable/13 - libsa: Disable -Wdangling-pointer for zfs.c. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7b9e74754674be7afa1059f4ca66d6c6723efdc9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7b9e74754674be7afa1059f4ca66d6c6723efdc9 commit 7b9e74754674be7afa1059f4ca66d6c6723efdc9 Author: John Baldwin AuthorDate: 2022-12-05 00:27:22 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:03:01 +0000 libsa: Disable -Wdangling-pointer for zfs.c. GCC 12 warns about a dangling pointer to 'objid' in zfs_bootenv_initial(). However, this appears to be a false positive as the pointer to 'objid' is only passed to zfs_lookup_dataset() but not saved anywhere that outlives the lifetime of the zfs_bootenv_initial() function. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D37533 (cherry picked from commit 0163de282e3195a1845f75b486adb3e1e7580199) --- stand/libsa/zfs/Makefile.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stand/libsa/zfs/Makefile.inc b/stand/libsa/zfs/Makefile.inc index f0d8129be9e1..4eb89fb80b2c 100644 --- a/stand/libsa/zfs/Makefile.inc +++ b/stand/libsa/zfs/Makefile.inc @@ -42,3 +42,5 @@ CFLAGS+= -I${SYSDIR}/contrib/openzfs/include/os/freebsd/zfs CFLAGS.zfs.c+= -I${SYSDIR}/cddl/contrib/opensolaris/common/lz4 CFLAGS+= -Wformat -Wall + +CWARNFLAGS.zfs.c+= ${NO_WDANGLING_POINTER} From nobody Wed May 3 00:29:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWK1xr1z48N7S; Wed, 3 May 2023 00:29: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 4Q9yWK1C6mz3lt8; Wed, 3 May 2023 00:29:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073773; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o9lOq/nejJIRsPzB/NzJ/LyCGf2D+pUBSfe/szsfTiU=; b=RM1HwJ/cCkfBWQox5mNCnI5ZXnInAe0zIF+Pg6dJDI5HWLfItvXCzpL3kVVkILMqRambGw wXn0wFb2AksBAFCOBjw4diS6RBAQYkgRdEYTzCuU0JST0K2XfnizbQTi2fNe+JQMVBB3s+ vfiRMREh50k4PQjom+jSbi2rjw4a20DQ3I8Xwc3AMR7/PH3sBb0aQaqNXOzxCOiMB8Vx6T tyFrkiCoCOyFukC0EaX/R/Nz1TDi5b3c6m27gxIv9aQ4ydo+u3nTxnObXJBjsBwhvy+Ciq pBMJtRWF6AMufVjErRNqJpAmVnqq9tP1OhvsTpNJZd2bzMnFNqZ8jOiB8orioQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073773; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o9lOq/nejJIRsPzB/NzJ/LyCGf2D+pUBSfe/szsfTiU=; b=LJVTZh6+cGBuN9FhpcTzVOJkai5SxhwIxLpqmVWuYgR0KFCVk8LhZaHvIBA+e89MunkW4Y yEAfFMxyBnWthDth5vXK/D/6ZOfZse9eawFbUDDVWxlHSKGhCFGnjiMWYk3xWAwr8JEx2v mUO05XFycKdullFqLGuAqQ3BG21rNQ09T9AuWibxhhPdX5fkTVr4yerlLcQNf3APBRf+He +Se99SfvjtOqwH+UNXm9IgrxjNXF3nuUyHTzQZwTo8snYJ2urLXTrixzFwQuxs81nyWmas AujPzZRww4eHuAskSo6eI4zHaYqW6ijY5zKNs0xDH46QYoxYaUS5pHRPVLqnHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073773; a=rsa-sha256; cv=none; b=bUrwIpZ1ovwvND8Vex5gUV9gkY/0VBmDhBsD3NX4Zg31VM9AEuUBkCdVCD/mkUgj+e1SNA xkOgdGmXLfaSG1/3BH1vzL7nGEPUd1P8V4WUpAkTKUDAV997wET2YIPI6gy66hoDxSJbm5 vThYVNMN1e7U3qjYT8PCyLC9JfY9FM+apoMe1gWywFu7b5a+TZFDI90ORPjfRAt5YjiduW 1sG/k+Qbni+n8NfUhhEwqPrkyHnOkRpHx7btMShhR7xOSwI0bDFBBNhGDhTZE+/6TIv5VT MZDyJaOCllCcom5b0KyIQGl6MfjzNmIDQ3xDeQLQIA2mHvhllOHZV2WnEDGN/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 4Q9yWK0JQLz189H; Wed, 3 May 2023 00:29:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430TWPG071869; Wed, 3 May 2023 00:29:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430TWp9071868; Wed, 3 May 2023 00:29:32 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:32 GMT Message-Id: <202305030029.3430TWp9071868@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: a7b1263ef066 - stable/13 - rpcgen: Don't free() a pointer after realloc(). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a7b1263ef066bf149fa9bef9e4fdac5cc1446964 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a7b1263ef066bf149fa9bef9e4fdac5cc1446964 commit a7b1263ef066bf149fa9bef9e4fdac5cc1446964 Author: John Baldwin AuthorDate: 2022-12-05 00:31:35 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:03:11 +0000 rpcgen: Don't free() a pointer after realloc(). A successful realloc() already frees the old pointer. Reported by: GCC -Wuse-after-free Reviewed by: brooks, imp, emaste Differential Revision: https://reviews.freebsd.org/D37540 (cherry picked from commit f0b58b190107416e813c5db875034c6cfcede523) --- usr.bin/rpcgen/rpc_main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.bin/rpcgen/rpc_main.c b/usr.bin/rpcgen/rpc_main.c index 698017c969f2..1a2cae928472 100644 --- a/usr.bin/rpcgen/rpc_main.c +++ b/usr.bin/rpcgen/rpc_main.c @@ -925,7 +925,6 @@ moreargs(void) warnx("unable to allocate arglist"); crash(); } - free(arglist); arglist = newarglist; } From nobody Wed May 3 00:29:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWL2fsvz48Nb3; Wed, 3 May 2023 00:29: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 4Q9yWL28fFz3m2F; Wed, 3 May 2023 00:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6iLftERr7CUwieWxMB0AZ3wusDMtKmlqRaJwg0jqaUQ=; b=ShoCovvthUhcv1VpO1hZVmCFNHzwDGF8E9LmKyIOEYBg3TQxh0vGX7eV5HtXgc9XiRc/Kk QmtyujPJqIBRDVrpuLcXw4O9ip82KPPGdX1os3O4VUqlRB35PthLTw23iUI0H4h9YILATc Ey02/t6en5sAM5fWuW2f3Agi6lBbsjpy+LKdKjfBSLmgdXjIP+/tAnBDZaiJoizCWivJDj F99hrO42IqyLZZTWL2TdAgTVOgshKNFIb47D/xMOmzmtG3MUChniOlZAD6t6Q7oaQwTgSi UnCTKHAA94r3LwGN4IhRGYEmmpH2sbha3A0ktEVLbcuGr5QA6xR6cFfVY2y30Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6iLftERr7CUwieWxMB0AZ3wusDMtKmlqRaJwg0jqaUQ=; b=W6dco3qEO800PEwnCJyAfx9KjojESifJFVf91igrHQY7zLrhktg99A3pfgPUIZfIC5Krip spYBG8JvMOQXFsw3Ib5S5wggeRfJj7t1AAOAttXuHvz+fmeyZA4dg9u1rcDmWiwWpc3f9E 7QYINjC+srMj6LNRlk57bgeVRPbBt9XNAOHsSmVx27WRgIOG+YFNqdwMEwgySEg/4kNiav yZPRK7VidAp+Mr/nz53oLaUkr58XpeD9lwlLFRV/9EqaeX7vS1Ij/7HT/B4FQKtzzWXoer p5gTMlRThKcm+5y7qMHNMZMw/FlYnZ6tQ5X0n4ugcw7WdqNf6qeX/GNIqoBjFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073774; a=rsa-sha256; cv=none; b=L1UtMEQ8eG7Ca24Eldc/xBJmKBSOvXssNP8vD/4rSbsjxivwHMcggP1+fYgmzETiRnQPPo me6uYM4fwSJtsyOlczHd03Z0yh222oI31jMZ/RZ2kWUmoGIe69CNgAHif45RTmK3MEGx+9 a01urRdxuVXpaJmGPxseaMc4rWR3++Re1+Uaed5GQtDRzi4EoMcYNejDSDY+zlzBYGdOHb zAIH02hUKIWpHSZCO1hQtIrN9sgWeQ7wCVmzMfgvP5UVU42IzrgF9TIHXZ5/yw5f0dHy7z 2jWW1P+yPyu+hxXyCJOGExMNopa7xTJvhNBPDqq5dcsq54sX1ejTiujN+y6Kbg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWL1Dr9z18J8; Wed, 3 May 2023 00:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430TYCZ071894; Wed, 3 May 2023 00:29:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430TYJb071893; Wed, 3 May 2023 00:29:34 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:34 GMT Message-Id: <202305030029.3430TYJb071893@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: c2c7a43fb5cf - stable/13 - rpcgen: Unindent a line not guarded by if (mtflag). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c2c7a43fb5cf6f1711a94ef9e928defe6075503a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c2c7a43fb5cf6f1711a94ef9e928defe6075503a commit c2c7a43fb5cf6f1711a94ef9e928defe6075503a Author: John Baldwin AuthorDate: 2022-12-05 00:32:03 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:03:19 +0000 rpcgen: Unindent a line not guarded by if (mtflag). mtflag is used to add pthread mutex locking around operations to make them thread-safe. Setting the state to _SERVED is not conditional on locking. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D37541 (cherry picked from commit 4fa1e855be60f2c95005edb295fdc36cc163ff6b) --- usr.bin/rpcgen/rpc_svcout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/rpcgen/rpc_svcout.c b/usr.bin/rpcgen/rpc_svcout.c index 3c6d0824f11a..06951940ff4e 100644 --- a/usr.bin/rpcgen/rpc_svcout.c +++ b/usr.bin/rpcgen/rpc_svcout.c @@ -619,7 +619,7 @@ print_return(const char *space) if (timerflag) { if (mtflag) f_print(fout, "%spthread_mutex_lock(&_svcstate_lock);\n", space); - f_print(fout, "%s_rpcsvcstate = _SERVED;\n", space); + f_print(fout, "%s_rpcsvcstate = _SERVED;\n", space); if (mtflag) f_print(fout, "%spthread_mutex_unlock(&_svcstate_lock);\n", space); } From nobody Wed May 3 00:29:35 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWM5MYfz48NWY; Wed, 3 May 2023 00:29:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9yWM36z7z3mC6; Wed, 3 May 2023 00:29:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UIirj+e1NQgiID2cw6Izoujtt+obmd0i81LaH2IGuSU=; b=hwwfiMb0YleFeYcSzzwn9jkXMP/9X7eI/mgb/ab2InK0RhycwEO9K3+m9GESf7LAa3lwtE ioQGBnrc1k6ZMphaQylGXYTounUECqHA3yEwlKuPgmwxO+W0y+7i9CMQDJ7CA5cOmLVaHb waHPrH/e/hDDy35W8vLa6VV+o4DbfMYPKixByr5JyTm0NOhj6qiBbP1fKKatjkh8cA43NS AQTqw848/00hNa5Mvaj4eWWOQvhvytrMTlPMHRFuzNq3KEhfAM+FtitUDB2yjOQP1WfxyS cZ8WmTaNkBod3whBexTsJ1wTeTwKbeaDzzck7XksgRE9Z/5SHYXM+8OWCfVlRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UIirj+e1NQgiID2cw6Izoujtt+obmd0i81LaH2IGuSU=; b=k7l9IDM07YIfGEXqo+XuLXN3hO/+S+UcNVrouQ9eTBBvNF06ZGoO4vB6RcJBbrxfGix2f3 oNYFpvDxfa7fvUur665y6gVVmO0nKJByFyg/Oh+R9KEdFLHJkfjyHAjMC08PrOspOCbOVU GOIhSnZVUStIL7pFrGG08UBFRCDpSyzWM3LRt1eHOh9uc6ttTnIVV3yZKsnAfu9eCoR+rK SJAev79K5qPgIMhMrMYGMU+PSG1bXqifjQVqcADzhrJXqFEzHiCUAqrxjgpEjA4Hdbdky7 c+WAbtoYg8gw0R6lF6YrxzLvmYg1fCCZuCEz+zFIIGglpZf1PZybkOjLflqWgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073775; a=rsa-sha256; cv=none; b=JG+SBtsavstGF+jkL9BXOhgP94yDWCUlC/knAoM4TpTWQ34x5lBrv0P5FcpmFCR4qmNbWQ LBd98w+kAHtNIPSEC2WD2Oa6EKzGSVZjxPtaM4Qk+NrgUITuruwzdDhqnNg9E5nPWz9E6f h/S/UhldBqsb0/BzsopOB448Zr1uLOtKqXVuJeK0RHJ1rVDtUyGsIpcgCko475hcbgoFRq 8zh+gETIKtNmT6BvRnamra7Xmj1rNMNaXeuCDnMrgEliIQ41dckwB7FTU8KTNwaEv4Fcb4 MsStdWlYi98awS0mOWzZWR8zNdhSFqL6j5cu6U3MG4g6deGL2BD4MnsZCL+yPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWM2BMCz18TQ; Wed, 3 May 2023 00:29:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430TZ5D071917; Wed, 3 May 2023 00:29:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430TZF5071916; Wed, 3 May 2023 00:29:35 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:35 GMT Message-Id: <202305030029.3430TZF5071916@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: cb4303995e98 - stable/13 - bsd.sys.mk: Add NO_WZERO_LENGTH_BOUNDS helper variable. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cb4303995e987597b95a8af30931236a38e88aab Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=cb4303995e987597b95a8af30931236a38e88aab commit cb4303995e987597b95a8af30931236a38e88aab Author: John Baldwin AuthorDate: 2022-12-05 00:29:55 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:04:41 +0000 bsd.sys.mk: Add NO_WZERO_LENGTH_BOUNDS helper variable. This variable expands to -Wno-zero-length-bounds on GCC 10+. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D37537 (cherry picked from commit 9134d9265c54a02257292c32b2144c401a86678f) --- share/mk/bsd.sys.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 21aba9f010e0..b2851cbb8fbc 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -130,6 +130,9 @@ NO_WBITWISE_INSTEAD_OF_LOGICAL= -Wno-bitwise-instead-of-logical .if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 150000 NO_WDEPRECATED_NON_PROTOTYPE=-Wno-deprecated-non-prototype .endif +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 100100 +NO_WZERO_LENGTH_BOUNDS= -Wno-zero-length-bounds +.endif .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 110100 NO_WARRAY_PARAMETER= -Wno-array-parameter .endif From nobody Wed May 3 00:29:36 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWN4hdsz48NFQ; Wed, 3 May 2023 00:29: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 4Q9yWN45Zqz3m96; Wed, 3 May 2023 00:29:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d3hfhld2ld/EDoE5djMOOznbcmtYuXla2Ete8PQxnmg=; b=ImibpGF3MUEjOobFkcj/N7IDwmWcPX3EwSZBwaUZrWQqauuY/XCewtYLCSGmcfZd8DoQqr y80fzElzsGibsuQGk6aEb7d9EC7WpUd5twzNwi8ETN0T5Aaz9Syabg6wuRXjH5W3hVppZc CHGIylH1To/CWTQNFNhuGjGQxCClNsViBaNHtca6zHHP/bLuL8nR49+kxK4GSxOcx9iNik bkp3L2hkYT3vq1Y37Xz5+r1QTD/l0hVxhk40sHAQipyC0GEolJ7mOS5C36x/2GCPteCway 7uWchrNDEhd9NAPwssZVBVQQ0/gSYc7I8EGpjiGjON5dJ0lfAN1quBv4BgnQfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d3hfhld2ld/EDoE5djMOOznbcmtYuXla2Ete8PQxnmg=; b=Qo5GZZAHqfMb20/zjnuPwfglQlbXhHV+ecGVVqE8qiS3BaADhoTj8eFhB7BIOn092lWkBE 5sS1wRjQkF62Y2juVCzXxi97XbKXPZdRCntAhCXog6ZWth+XP6N9dUB5+OTnPxZZ4X4CB9 3jkdgsFxYUmDHM2m0cHixtTvWoSkLUlGiIk1SB9i2t7FVpt0Jhgzq8JpE0CQVh2qJhCxZq DRzOHy4bUPq6ygJ5ZVJNoLnTjgJA8S/kCINoDT7zX87dmGrHv7Y53eOty5UHi2Ut4eNP31 SNv7ugVWNCvEkWYA87zsJIphU4WC/z5TJlZeLyuhKj1fIbRyakTa2NwWhyCo3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073776; a=rsa-sha256; cv=none; b=ace/E3xcAP/1Vbm7u2UkuYkJ77rv+X8vS4NPCM/XOWqcBS50kfY5nEYLIzJKx/y3GS+lEG y9pEYGpz8MLZmJuUfqNZv0UuhN8NkGg2s3a989Oogj3QfiyvfEMPppAVeq6H96fP4/3Jm5 1GwvwsW4b5v50fJbC1qmt6BOcGJNzQOq2FCoknt1i66Gdg4HpqdTBXJc26BvYXA2l4R1Gd eNlgt7HG4vEoUmlvohfuJF7tobA3mX6BcJgtEpQ35dWq42pyuDPzKBAh7Tk/z/Nt0863Wf 3PApitnxleMvmhMcNJMd5NhRY86Xur8g2pHjUTro+F+0M/NCCmcBlItuNDfmRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWN39S4z18LH; Wed, 3 May 2023 00:29:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430Ta8o071939; Wed, 3 May 2023 00:29:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430TaqQ071938; Wed, 3 May 2023 00:29:36 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:36 GMT Message-Id: <202305030029.3430TaqQ071938@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 0345952b9e44 - stable/13 - fwcontrol: Disable -Wzero-length-bounds warnings. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0345952b9e4410ff1aec898c1a1f09c2b0fef7c6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0345952b9e4410ff1aec898c1a1f09c2b0fef7c6 commit 0345952b9e4410ff1aec898c1a1f09c2b0fef7c6 Author: John Baldwin AuthorDate: 2022-12-05 00:30:20 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:04:46 +0000 fwcontrol: Disable -Wzero-length-bounds warnings. firewire.h includes zero length arrays in unions that trigger this warning. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D37538 (cherry picked from commit aa9ce62be54fd9a022b770d36fb1e4f24bfcd223) --- usr.sbin/fwcontrol/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.sbin/fwcontrol/Makefile b/usr.sbin/fwcontrol/Makefile index ec0e67f67d20..4eb8611e8026 100644 --- a/usr.sbin/fwcontrol/Makefile +++ b/usr.sbin/fwcontrol/Makefile @@ -9,5 +9,6 @@ WARNS?= 3 SDIR= ${SRCTOP}/sys CFLAGS+=-I${.CURDIR} -I${SDIR} +CWARNFLAGS+= ${NO_WZERO_LENGTH_BOUNDS} .include From nobody Wed May 3 00:29:37 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWP5KXkz48N33; Wed, 3 May 2023 00:29: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 4Q9yWP4qPjz3mD2; Wed, 3 May 2023 00:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073777; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0oBrBDBRfuc0Siu6Z3uCeM7q9WHANXc/jnUc/C+Ixh0=; b=fbg6fm9iljQ6ychDVNYYTExvfmo0n4iHOwkDiU5+kO0wBHmBnTF+mvUHqC6FpYKwgABeXb Vo4FVIJHax96RtIcbs3tQvgNAgUMnA3C7v9tMFK75wfGDczOoqe6g1OWxGR4qx+z5QSW9e Kh7abnvoifsGoqomWMbaS6ZJWV2cnWvFgp9cTOG1yI1qCTbF/f0zqUaxbKomgje8OeUP59 Nb1jfurHw8uxKfBwvU4l1I2dJujSyOja4+0i2okT7tTas2c1lqWhoNmk7BZTuQ9JCrB5yu sh/79AQbhp+Sfe8dDfQcf31YQqMHoumU7Cm1h+E9ocIgUd44IFKLYZx6WZ2J1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073777; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0oBrBDBRfuc0Siu6Z3uCeM7q9WHANXc/jnUc/C+Ixh0=; b=vioKFhi6dRwxfHUPDneTdxV8R/KYlmZzlZ6rM6B64XrBSvVi0XgXdHNnH4u1J9FA+G66Yz AGlFmd43KzqoHnDfVEhFyqjviD8kadidnltNMzpM7fAWLbfLXZUHrwIraQsS85G495pcDb 4stcpF9hc+D6k7Vt1oOFeOQ4Suz+IeQkJhWQGdgjuN1sixJ6EXU7TudcEmsaQRmoRFs+Pt JHtPVnysRbDbsJb0Ff4cxdtCZ0rauH8Nvlu0h3HFkYQe4ZonTtPWtVQkKoXksR9gfcdABM sGEALLlqmjL+SwxI3rONlEH/6RYyO1UEXtzXE4KadaPyt6yvb4/p5tN7cdU1vw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073777; a=rsa-sha256; cv=none; b=hLeOe9k8b2w2R5hzEJu5Sjz41LSbLEN97hyAxkHnSu275uhPRnLfw3zdPf4MTcs/y+rHb6 kfUY+FNMtjKv7cmP+14vLZa1GN6Lg51KTXUya5LIG1VGYMUKhsLmOZrcSNvHn0oGwahVAl ziMvTFZgzTFEPojCTEWJ/rd1i4zHHiskXBCM+u8yi7IY6kpcxikAb+mRSFtknawIaoUj7M 5pZDTzaDEtLHdi0Dqj5v7ekbzwGlICm0SVkgiJRnuZeU0VpLaVjWe5RdZd8ew4xY1pLOHi qcuaRVaJ//SRvV9xYS0nyR3CYtN0SAZOhqTe4EvKi/YeHIy4DbrdnaQuHc8yMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWP3wzyz182d; Wed, 3 May 2023 00:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430TbKC071958; Wed, 3 May 2023 00:29:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430TbNe071957; Wed, 3 May 2023 00:29:37 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:37 GMT Message-Id: <202305030029.3430TbNe071957@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 50367e285d40 - stable/13 - pw: Don't return a pointer to an on-stack buffer from grp_set_passwd. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 50367e285d40a8d94192f1e799de21f32c8136a6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=50367e285d40a8d94192f1e799de21f32c8136a6 commit 50367e285d40a8d94192f1e799de21f32c8136a6 Author: John Baldwin AuthorDate: 2022-12-05 00:28:22 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:05:05 +0000 pw: Don't return a pointer to an on-stack buffer from grp_set_passwd. Make 'line' static to move it to .bss instead as that pattern is used elsewhere in pw(8) (e.g. the static buffer in pw_pwcrypt). Reported by: GCC -Wdangling-pointer Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D37534 (cherry picked from commit 1055bedbed42dc176468b45b4f167a752ed8868f) --- usr.sbin/pw/pw_group.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/pw/pw_group.c b/usr.sbin/pw/pw_group.c index 1f5979a5dd03..838bafa3e8ba 100644 --- a/usr.sbin/pw/pw_group.c +++ b/usr.sbin/pw/pw_group.c @@ -55,7 +55,8 @@ grp_set_passwd(struct group *grp, bool update, int fd, bool precrypted) int b; int istty; struct termios t, n; - char *p, line[256]; + static char line[256]; + char *p; if (fd == -1) return; From nobody Wed May 3 00:29:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWR1Z5Fz48N34; Wed, 3 May 2023 00:29: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 4Q9yWQ685Vz3mDS; Wed, 3 May 2023 00:29:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i6TZATO//Hy76SNIO26kIvOXoRxgqYDuK9c9XixY5gc=; b=bXmTEE/VGobXAWRc+GGCIuj/dbJyz1TGzFLDz1VM9BReOuZhTkhcMWTn1ngIzjaReF79xQ P4IYnwR41m/hN7PEnqcgn1H7X6h3IrVYHI10hRIbSf2rUezFW7FWUpgsXYKr0SK1B8co1J lRdP0SthsHAjNAjllJGrwrMKL3xCFvbS82qji+7ObR0y8jDpqb5R5gTZIcB110VFkzGCt6 F0KmeL4uPF09flm57/PM0xGwCdk1CGPD8vjWeaTVg9vN5WPMMmpEFT8WyqjjwqAaeMTVUg YfmhObI4rdVy2EYrrbRO3DTnlP87PPK/NohQvK5Q02WlM3CkKeXUU9q9d7rm4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i6TZATO//Hy76SNIO26kIvOXoRxgqYDuK9c9XixY5gc=; b=ZhZ6afkD5Cz7q5bXZlm4Sj8dyscb49JwlxvAprQK6JnJP/vz1m8Mz+zPGv4NnCvGdDz53Z vFLJ1/cHlZONQ/ZzA2aBWKFgTsiblNHXDkHv+gy8BnlDsJHX0mBXfXpIGjo8+wTHEBsYVH 0KvfeNa1elmJEBDvH2qX3KLSPMI+h3JOwRbtVhueUa4lmXukTxfhWz3wQjN7jZmOsfiddr sVFB2IwOhandbCNGPdiiZd88AJvppdyLxilGU9a+DWRHFeQGS88E3HIsm+WeOE1pzxTNKz vquLahC8ttlvE3SYkAQ3R2D9Gom3RrbU8q57VABen4eM942O2/HYGEXv3wuWtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073778; a=rsa-sha256; cv=none; b=i3hQ9f5RqOOvQv/Z9vs43gIoKYgp5Zg4cNLD6CDx2g7Vq0mNptSV33w9Rli0AYhUTP6J5W SsfeJDhOu/MqiN5he0LIhhonLXkn6zhKwZ2hcaeXWkNkaQx8ZMda3eVsRuIjmSLm0DDP68 eZ5tTJYyLZ5S7piIfAAGds4lOQkFe13heSHPEwfV308L3Oc3RbalhtpsWBTSFay6WPzxev lwkg6RgV9UJJwpwhFB0QJgtKvGK2RouMmDCTmfpp7VeMWmzBBPcA4ceGNaNmm4wYhVcPc5 oJeFDBJzydwJ58yh+OiCsMlyzsDFewV8YarrXjM1DsR3gs0w/WDQaubX/X+7PA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWQ5FLGz18LJ; Wed, 3 May 2023 00:29:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430TcuK071978; Wed, 3 May 2023 00:29:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430TcF0071977; Wed, 3 May 2023 00:29:38 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:38 GMT Message-Id: <202305030029.3430TcF0071977@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 0218596e9220 - stable/13 - acpica: Quiet a -Wdangling-pointer warning in AcpiUtInitStackPtrTrace. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0218596e92204dd3890cd9d1f3fc8fdffb1e770a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0218596e92204dd3890cd9d1f3fc8fdffb1e770a commit 0218596e92204dd3890cd9d1f3fc8fdffb1e770a Author: John Baldwin AuthorDate: 2022-12-05 00:28:59 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:05:54 +0000 acpica: Quiet a -Wdangling-pointer warning in AcpiUtInitStackPtrTrace. This function intentionally saves a pointer to an on-stack variable in a global as a dubious way of reading the stack pointer. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D37535 (cherry picked from commit f4432625edd64df94ce7c2a085f256dbc4d2b215) --- usr.sbin/acpi/acpidb/Makefile | 4 ++++ usr.sbin/acpi/iasl/Makefile | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/usr.sbin/acpi/acpidb/Makefile b/usr.sbin/acpi/acpidb/Makefile index 5a6fceb2a4cb..ed28a26a67a7 100644 --- a/usr.sbin/acpi/acpidb/Makefile +++ b/usr.sbin/acpi/acpidb/Makefile @@ -90,3 +90,7 @@ LIBADD= pthread .if ${COMPILER_TYPE} == "clang" CWARNFLAGS+= -Wno-null-pointer-arithmetic .endif + +# AcpiUtInitStackPtrTrace intentionally leaks a pointer to an +# on-stack variable. +CWARNFLAGS.utdebug.c+= ${NO_WDANGLING_POINTER} diff --git a/usr.sbin/acpi/iasl/Makefile b/usr.sbin/acpi/iasl/Makefile index 1807156475b1..6b0e77d08de8 100644 --- a/usr.sbin/acpi/iasl/Makefile +++ b/usr.sbin/acpi/iasl/Makefile @@ -147,4 +147,8 @@ prparserparse.c prparserparse.h: prparser.y prparser.y.h: prparserparse.h .NOMETA ln -f ${.ALLSRC} ${.TARGET} +# AcpiUtInitStackPtrTrace intentionally leaks a pointer to an +# on-stack variable. +CWARNFLAGS.utdebug.c+= ${NO_WDANGLING_POINTER} + .include From nobody Wed May 3 00:29:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWS0ZG2z48Nh5; Wed, 3 May 2023 00:29: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 4Q9yWR74ZRz3mGn; Wed, 3 May 2023 00:29:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073780; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=78ERe93ui4A/H3aEZzZwgH7+//3A9NZn9mlfG8gdImo=; b=VO0FGSC4UU3phDplvBEBlODB8E6HaOaD6QugXYWqrZD6boxaPYQy2D9W4WNxpziGTm7foO BEJYK8GvTWxvCgs67JAVs+gBxi5M12NNc7+/Gt9xQOYwqhjclc2DG2Yk2wHi/LnG6S8jH7 zAuaHqcPwvbNWl2q3JivtJjTCgrcl3pgfbCbsweaEXuJTJrZWso3vtS2tNnjVGRHz6lLao hgaUxuva7qI/WXMeXm7xXsCcdh47XF/f4ZCnJelETtiTV0i/6S6m3NZdR+88LfivIF95YL 8ZOJRlbbJnmUKk8IPXWSGltnYb7cw7wwmyC0IrZBtL3CEW3VG94wJvwvoDzJeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073780; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=78ERe93ui4A/H3aEZzZwgH7+//3A9NZn9mlfG8gdImo=; b=g8rr+Li0oHVoak4i5/ZDo7bd0KYsXgD+XIFgBHkZqS9P+M5ioElPIA9Rm48J89lqbHTfW4 hrsQ7EtcVsgIZIGoyEqBqekz0/4EQPsKHuwydoLydLywI1aXiO9FpI+jQ0iRU1/Rk9ojFW yfAuK7HQQLwur3lIJcbtdCY47Fxjv85M9TD3FRqcRvYnwyMDpHoswgNI/vg8PD9aHR1X8l 77Bmy3xD74orOtWmBQxOU2UyqurGFewfH8i/3yOhyI8JnQB+UVysKwL1cha9ua09gnEYd3 4eAQeir5yIhXy+Nof1e7TbVQpxxIpnAv4YTkMXkbtnfRfUbtY3sA6yfQhvs9ng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073780; a=rsa-sha256; cv=none; b=VDIC0RzLtaETVTbvXL1E1kR0dF+DQk03M8aVgjcuC6QOJZxNXU/iOgW+kW7rrUoI4+D3Vc LYG4cflhTbDJSIOZSK3JVRPzAq95zzzM5nVN761x+Ivo87QXOnRzy37TYaT/gddqAl0JC8 e6/BSLdGOj1IvaQ4I2LH/FqJjvUoR/NElZbVYQlQ5gcibhtsEiCgQJ90kibuBPBzMiuQLM ysFhKkyOoDcY5L7a2fgNbShmS2ws3ZAkf5wrV13wtTX651RFk0fYQ36P4p7YHzDkCS/2mY Lvzx+tttaHyLSMbPY5ob4cg+2hfLLIC9teRkJHUbY0qapPZIWj8f2MtbFtR7NQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWR67bCz18Fh; Wed, 3 May 2023 00:29:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430TdE4072004; Wed, 3 May 2023 00:29:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430TdhM072003; Wed, 3 May 2023 00:29:39 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:39 GMT Message-Id: <202305030029.3430TdhM072003@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 2c63333240f2 - stable/13 - bhyve: Accept a variable-length string name for qemu_fwcfg_add_file. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2c63333240f259ec57d748e9b4b3520b35b15f24 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2c63333240f259ec57d748e9b4b3520b35b15f24 commit 2c63333240f259ec57d748e9b4b3520b35b15f24 Author: John Baldwin AuthorDate: 2023-03-22 19:34:34 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:06:52 +0000 bhyve: Accept a variable-length string name for qemu_fwcfg_add_file. It is illegal (UB?) to pass a shorter array to a function argument that takes a fixed-length array. Do a runtime check for names that are too long via strlen() instead. Reviewed by: markj Reported by: GCC -Wstringop-overread Differential Revision: https://reviews.freebsd.org/D39211 (cherry picked from commit 61482760a0ca198a9310d450133e9ac792b67955) --- usr.sbin/bhyve/qemu_fwcfg.c | 6 ++++-- usr.sbin/bhyve/qemu_fwcfg.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bhyve/qemu_fwcfg.c b/usr.sbin/bhyve/qemu_fwcfg.c index 2c5324dffdaa..95e713f9df4e 100644 --- a/usr.sbin/bhyve/qemu_fwcfg.c +++ b/usr.sbin/bhyve/qemu_fwcfg.c @@ -296,9 +296,11 @@ qemu_fwcfg_register_port(const char *const name, const int port, const int size, } int -qemu_fwcfg_add_file(const uint8_t name[QEMU_FWCFG_MAX_NAME], - const uint32_t size, void *const data) +qemu_fwcfg_add_file(const char *name, const uint32_t size, void *const data) { + if (strlen(name) >= QEMU_FWCFG_MAX_NAME) + return (EINVAL); + /* * QEMU specifies count as big endian. * Convert it to host endian to work with it. diff --git a/usr.sbin/bhyve/qemu_fwcfg.h b/usr.sbin/bhyve/qemu_fwcfg.h index f59087250816..f3846d64085a 100644 --- a/usr.sbin/bhyve/qemu_fwcfg.h +++ b/usr.sbin/bhyve/qemu_fwcfg.h @@ -18,6 +18,6 @@ struct qemu_fwcfg_item { uint8_t *data; }; -int qemu_fwcfg_add_file(const uint8_t name[QEMU_FWCFG_MAX_NAME], +int qemu_fwcfg_add_file(const char *name, const uint32_t size, void *const data); int qemu_fwcfg_init(struct vmctx *const ctx); From nobody Wed May 3 00:29:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWT1VYmz48NWk; Wed, 3 May 2023 00:29: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 4Q9yWT0sgpz3mSf; Wed, 3 May 2023 00:29:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c6rNaDsVhRM30KJtThIORhW3S0cBYb4TU+1msIXwd4Y=; b=sc1t9pbMFfWail2I1VP3Nfe6uWoHUMf7v6Lf/tsdn7uV7MQz27DpMyO9XWvW9vY6dGOgcS mhcp+MdGpbJQfMex+ikrQ3+q/eDzdHQ/BELSoW5aodq+cPiuMe6p8Ckwjyt0pTCIj7dL8A ryg0d605VtSRv+0hXlKAIuu74f5+B/cvJ0sTx8B0FumH4BSiEfBw1bSD4v1Qq25Em+OP0t xig/jb3YZ2hKy+xNAZp5jM36jkO9tgSz64rKjEGy3kX0fVIWkFWES/eSD5xff4TO81z2xz qp+WUQ8Mk+XG2kZpDYjtwlP1+AKNKPkOBqzL1BRbs5ZWzR5BeSpOmHlhQdfGOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c6rNaDsVhRM30KJtThIORhW3S0cBYb4TU+1msIXwd4Y=; b=njRHjx1uYamdX/IXwyl/2LegqeIY5c7oBwJxImrN6Nu2FESKOIZhRFj767VqtBBALbTdHx YyYtD1Z+yZMI8WQ5M+5+jrn48f6LKfAmy/0BQmvImsOEzsoKPtFHUuCOOWIMR5yJzyGld1 rriDijnKHYoCWRPbhEppAIddi652dX119RBCc6StDtejC2dPNfxHSi5+izRKfdI0PX2cKf jVFiQIETgx8JAO24MsXalKYYITqEZXJpVsqpWkm5hRxJJoM2wRiwBWr9wJ2MnwhnXMsPf/ lGV7K66KSG7t77oytGbmEgldRkpxSIq4XTp14c9ZnMMl8KjWAe87O+8lRquXuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073781; a=rsa-sha256; cv=none; b=MDss7Onji9fgxsvdMIUl7K8+02CazaLfmiF445M1Hf/UH68DVT2HcySrUHicCARCC1J0te gLvjnOsbZs509ZixWp5mngJRoBQvxyweEeLXDnQMH4GSQrq5+mKgIKZnojAZAB7DGuo28V 7D40QNeKzeCR9GpikfG87hjh77Gc9m2GvPYhqvkoufTYQK5QIgZmLfSiM4GWwaBbaxDzZ2 uqCPrW9kE8pPKrdBC1sHAxmwf06evl4fWRNAKrL3gi8xhr/4lBgdqrpvQpsPB27EfLdJOV LXuz63FMNV8AZBlb0paqY38886lu8ADwiGjDb3HeZpVi2YtJPoPjfp2fD8j3rQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWS73Cjz18TG; Wed, 3 May 2023 00:29:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430Te0a072023; Wed, 3 May 2023 00:29:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430TeNY072022; Wed, 3 May 2023 00:29:40 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:40 GMT Message-Id: <202305030029.3430TeNY072022@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: f89431787317 - stable/13 - bhyve: Don't return -ENOMEM from qemu_fwcfg_add_file. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f89431787317fc75a1a7b3b7ea48ad78e9e0e33f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f89431787317fc75a1a7b3b7ea48ad78e9e0e33f commit f89431787317fc75a1a7b3b7ea48ad78e9e0e33f Author: John Baldwin AuthorDate: 2023-03-22 19:34:56 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:07:05 +0000 bhyve: Don't return -ENOMEM from qemu_fwcfg_add_file. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D39212 (cherry picked from commit 7bf44831ca05c67169fd90408b514573ddbbcf9d) --- usr.sbin/bhyve/qemu_fwcfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/qemu_fwcfg.c b/usr.sbin/bhyve/qemu_fwcfg.c index 95e713f9df4e..af819dc4a952 100644 --- a/usr.sbin/bhyve/qemu_fwcfg.c +++ b/usr.sbin/bhyve/qemu_fwcfg.c @@ -335,7 +335,7 @@ qemu_fwcfg_add_file(const char *name, const uint32_t size, void *const data) warnx( "%s: Unable to allocate a new qemu fwcfg files directory (count %d)", __func__, count); - return (-ENOMEM); + return (ENOMEM); } /* copy files below file_index to new directory */ From nobody Wed May 3 00:29:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWV3Xx9z48N39; Wed, 3 May 2023 00:29: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 4Q9yWV1cCzz3mbR; Wed, 3 May 2023 00:29:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=onx0WRj+/JabNNwQHqaCs7Wu+YaPJHzk7XaBGirKmI8=; b=oY9aUbW4oES2kUjeoAOWthrJjSaVPUEw1ArVYOG8EXEE9OCLDpVCFPIIz3Ro0LPDtbHoNN 8PnzkH5GClCYC4FbcMXJoy6E6YfPtNs2uUpdedHndThilCNiPALTCzLyM1gPVO5ny7LdQB huP/h3q7R+ZH53X6qzGVGnRXjF8azqlJWlnpHKdPFiO8OzoQmfwPZskTkO2M5SFi9GlezD uhpP5J6ubJ8VLhq20AmDC4wOOPLiyiWUcm7l0maboFt1fdOJxfebkO4PO+jhW0cmVioZCk 6ZsNKgha+UARY7655N/BV21+duH+LzlND+h9ShuxsBDoATKVl74y1CwEEtuOqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=onx0WRj+/JabNNwQHqaCs7Wu+YaPJHzk7XaBGirKmI8=; b=Axx9NIGggTR4USLRkJSUIXm+RDvh+ECrnVNHxq2Scn9/m8b9I4wLplq6ySaM24+K2MAMPf UQKwEr9AyxkLeiAhB1IrSyF67wAHIX1F2R2BXikDMWIBo5ZNOw2T6MJDuuoQWD65++n9lN Cit3MhbRFn3nhVJt/uSmQWW9OMqSd/JaUTql+p5Cxm5VuP/KN4c6aisaYnz/7WBm/Cxx8o +wAD6CzRiMyB0hGNcR3pmCLGYqpCsTucpJA+34PzvXCPAt112A11cOIWrSc2+xeMaM2VSQ ntDnqs7L6AAppRuxmKNFs3OKbWu0vMi8qllUWgy5bFxWle+QPNfwQoMOYZQ8XQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073782; a=rsa-sha256; cv=none; b=hXQ/T5jD+okza6Ne/XyMQWPFq+oFy26mPeUDB47BjXp8brMqNyxGtTKUzk8Gh0vqqKAyjb 2DII1z3AK2fv6OthvWlGobiaxkaWiVthIQuxXFdxvEuX1en6LCM88OfD650DRPv7WE7ze5 5/6ZQBNtWvSrGqUgbm2tqevLH5A103q5KsXbD8EHOdntD0585a7R2hY1w4p9tZYTPuJXdR b/pwt9qbA77ioZ4Ad5koHRCQr8A+sNNmnoxbI7NOSHVzv2N7LijOJaNpxI5kHoAK9PkG+g +/4WOm338NvReFTq/qNN7t46IQ6WxiYo3inmJM00ElzNJT50VvA6hZEFTKXCIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWV0k73z18TH; Wed, 3 May 2023 00:29:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430TgC4072042; Wed, 3 May 2023 00:29:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430Tg54072041; Wed, 3 May 2023 00:29:42 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:42 GMT Message-Id: <202305030029.3430Tg54072041@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 063ba7151b3e - stable/13 - Move NO_WUNUSED_BUT_SET_VARIABLE clang helper to the right place. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 063ba7151b3ea4073e2f0d9033b4c485e43754df Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=063ba7151b3ea4073e2f0d9033b4c485e43754df commit 063ba7151b3ea4073e2f0d9033b4c485e43754df Author: John Baldwin AuthorDate: 2022-03-14 21:05:25 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:11:26 +0000 Move NO_WUNUSED_BUT_SET_VARIABLE clang helper to the right place. Reviewed by: imp, dim, emaste Sponsored by: University of Cambridge, Google, Inc. Differential Revision: https://reviews.freebsd.org/D34537 (cherry picked from commit 2814ba8ef17aa647fa52092106731bcf76a2392d) --- sys/conf/kern.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 53eb49c95c4b..bed235cf1afe 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -28,6 +28,9 @@ NO_WTAUTOLOGICAL_POINTER_COMPARE= -Wno-tautological-pointer-compare .if ${COMPILER_VERSION} >= 100000 NO_WMISLEADING_INDENTATION= -Wno-misleading-indentation .endif +.if ${COMPILER_VERSION} >= 130000 +NO_WUNUSED_BUT_SET_VARIABLE= -Wno-unused-but-set-variable +.endif .if ${COMPILER_VERSION} >= 140000 NO_WBITWISE_INSTEAD_OF_LOGICAL= -Wno-bitwise-instead-of-logical .endif From nobody Wed May 3 00:29:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWW3wRDz48NSY; Wed, 3 May 2023 00:29: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 4Q9yWW2z3Mz3mbk; Wed, 3 May 2023 00:29:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EwX/TjT+uKf8r4mlwq6eNsZXUXY7idB0Km8Ya9KSgtQ=; b=pvBZ0VdHXhtY/xhsLv8ah4GOoDsd0SXZtE2oK0+zHCG9ExXDRLF8/COwr8+DeMuK1GHYAs 87Hg8nkUPxJqWDMu4uvH+wlWMLF24rgnU3l5iSkERlHAwIxVxaga6mtt0NzgPISoI4bT9Q 7JXQvoJSqJv7Xe/eoiGsgyw+/BBw4XBnq+4f7J/2sVtn0QlYYMRYXUiOyd03Qe5+t8iuGP BmVb9+5ZUX+Rj6mGf9KEBmgXqX75qNa1BCENYb3Wmnx1aE6lSgWKlqdk0OLMbxd5Wd42lg CHb/OCJQby0HeREz2meRP21oZcwz6Z6Pq2hFdnghWI29iZYSwDPWQKRE5iwyGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EwX/TjT+uKf8r4mlwq6eNsZXUXY7idB0Km8Ya9KSgtQ=; b=TT0uP4NqhFYurGr6rWhdkfyKKTWZSJ1Bg+DO7Q16TJdYNNua/YtNiPfaY07TsLeQltZtSD eT5kvA4ZM4tAjhyRrJovpQ0Mf6wty/cEoo0KVINCi66EZ0zjQ22JMgu8sWUL2PiOjdNpTN IbDpIDZ2qSBWZPm+Yo9rwe0YpNydfgbkyEG3BhV32aSwgMsATCdFBbNV6leb1euGFKcL5T dYPfW0/el7ETdJczCFsodbBo3W7itEALvLtF+TcCwYcq9pqXtn3pGtOHQK8GEpcUs9YFoN 6HBmBIRLvi48GLGRrfOD8bSyJ8r199DG+PbxAB7pIb4QTfCvCnTx2zJVu7OuGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073783; a=rsa-sha256; cv=none; b=KslJhHhjLhTMjNppucYs2pOpVn/flj8hGpyODyiGiHd+NhQs4KNT2zEzq7WjLwie5kLJCC yZgCYzpSMATLUCW9h7clu2QHxVyS3inqRKafk2sjsxDTiEzrSgoNNnGoMr2fwUxRv5NHEm uZMukHpPkkh0VzDULp+/SheAObsIX/K3ETEdLFGJ3APtydtX/7SVwsmzsbjIDV056uqJHX L0E5WdW/IwB+tSCc8HOD6g0DME2ry4OuRJWz0KA1N4hb0eMB8p9OTRVKWJM3zv+HqoaDd6 VJ5m26PfQ7Uvbvo8VzI/b8Ty+VvQbxhpV8PXimOt+/9rGMXnvMcyKgjJBvtYmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWW246Hz18TJ; Wed, 3 May 2023 00:29:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430Th0Q072061; Wed, 3 May 2023 00:29:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430Thgr072060; Wed, 3 May 2023 00:29:43 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:43 GMT Message-Id: <202305030029.3430Thgr072060@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: ff01fd164655 - stable/13 - Disable errors for -Wnonnull for the kernel for GCC 12. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ff01fd164655b1ec9d0455c6a42ec5218a30b368 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ff01fd164655b1ec9d0455c6a42ec5218a30b368 commit ff01fd164655b1ec9d0455c6a42ec5218a30b368 Author: John Baldwin AuthorDate: 2022-12-21 18:46:06 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:11:57 +0000 Disable errors for -Wnonnull for the kernel for GCC 12. The USB code and some other places raise false positives when a NULL pointer is passed to an inlined function along with a separate length and the compiler can't determine that the separate length of 0 prevents the use of the NULL pointer. Differential Revision: https://reviews.freebsd.org/D37627 (cherry picked from commit 488c498b099e3f48db4048833d2b0d03d7bed3e1) --- sys/conf/kern.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index bed235cf1afe..5d902b340c2b 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -90,6 +90,9 @@ CWARNEXTRA+= -Wno-error=packed-not-aligned .if ${COMPILER_VERSION} >= 90100 CWARNEXTRA+= -Wno-address-of-packed-member \ -Wno-error=alloca-larger-than= +.if ${COMPILER_VERSION} >= 120100 +CWARNEXTRA+= -Wno-error=nonnull +.endif .endif # GCC produces false positives for functions that switch on an From nobody Wed May 3 00:29:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWX4RQcz48NSZ; Wed, 3 May 2023 00:29: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 4Q9yWX41YDz3mYf; Wed, 3 May 2023 00:29:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QanEIgiWnMCpwZFxFFmgd05PMnp/JCF5WrWiyQsJ8dA=; b=Dpa7B35CcNiWGfCKdSS3rYST/26Sn7JLlaHQtfDb0IZtYMvLwAjQjcsYGFKq4FVfkdkhwt LNbB+s8twKhOdCyWatxjceoX5lhMiIdUGHAzmaIGJKeqEmjL4Y1/JGx2Bgs7rWIH0cj/0D 0km3iqGyqmoFcHyEPw0Actm4U8A7SNflUHQGf4mfWkL0NeC4ZMC84aGKUgfHi+A1KerBCx bu4L2zzK94i6yq+R77NjlnHIYbjrRPOqMZRggdkNqUmf4CkHpBJXMuCdx8aFeO/LBGtY/e UCiAiJfI+HoorJ49r1IfP7FQknxqefSt63B+m08PVCqX3gTsZjhlDhnwV9K+XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QanEIgiWnMCpwZFxFFmgd05PMnp/JCF5WrWiyQsJ8dA=; b=TS2SObuYVk9aqJaiuVcoKzHceEXfx+2zIr3vjXLPBU0SXeEqlQLCWjAvPHCHsOhivBLsVK aVKAl0fy08d8zxAnfpdDf3l64ExbqiG2014oAYot6ZzPTJuyBSGbe5Iw3EpcNwE09o4nI3 vOhUV4RDOFettw5FYvXpiEWPPvXOuUhgd6G6IgvfoHDD3hWJh6/U2lSED0BXurwWYhxJA5 MWBYVuskjl9UiVFyxSELfQuY9SjKOm4qe8vIR0EKRluaKy78lGxE6HV9mSQX33FSgCFvYg XShwfnuOgmhhkhp9USuInfS+F16Fj5qErLeZlMMTp7VnWwTkQX2QySQw17CrWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073784; a=rsa-sha256; cv=none; b=BDhDj4TycjYCBwFtE33HyoJxKMIF9gvm8jyZ6Z9wJIXbZlQnFXFRboVe6bPbSmyIonL48S IswTgBpx+2nmr36ejnWz1rYCvG1TLCWzKPTa5X25vbu2HyviU21VMGqdVSG47Yy/ycG/ek jsYpu5RADFblqR8tNN1Ds31HiSPXcWT5JEw5BXrDYJvLTVH+sTQoIOltAisjVZ+op/VC6N +ZX+iMLC1upjqAFqhdrVNkNzRxVSrqpUSv5yG1ImA+d6LkvFXB3YuwZ5j6HLsrGsh4haBH zsE9OgCYVEPkDUqjsmZ78K+WUoypHa9NRQpml+7Y4t7DD2ghfccK9h7S3Jvyow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWX2zV5z17Zn; Wed, 3 May 2023 00:29:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430TiRt072087; Wed, 3 May 2023 00:29:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430Ti2e072086; Wed, 3 May 2023 00:29:44 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:44 GMT Message-Id: <202305030029.3430Ti2e072086@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 256b5d40e550 - stable/13 - mrsas: Don't leak a stack pointer value in the softc. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 256b5d40e5502323dddffd5a8db2ab431e9eea61 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=256b5d40e5502323dddffd5a8db2ab431e9eea61 commit 256b5d40e5502323dddffd5a8db2ab431e9eea61 Author: John Baldwin AuthorDate: 2022-12-21 18:45:26 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:12:37 +0000 mrsas: Don't leak a stack pointer value in the softc. mrsas_issue_blocked_cmd stores a pointer to an on-stack variable in its softc so that the driver can call wakeup() on the correct pointer. Once the loop around tsleep() has finished however, the pointer is no longer needed and any further use would be invalid. Clear sc->chan to NULL after the loop. Reported by: GCC -Wdangling-pointer Differential Revision: https://reviews.freebsd.org/D37628 (cherry picked from commit 9f0c0e6eede6aedb60e12888fc9751c40b364dc9) --- sys/dev/mrsas/mrsas.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/mrsas/mrsas.c b/sys/dev/mrsas/mrsas.c index 73c2ae2b0e2b..669147a89bcb 100644 --- a/sys/dev/mrsas/mrsas.c +++ b/sys/dev/mrsas/mrsas.c @@ -4012,6 +4012,7 @@ mrsas_issue_blocked_cmd(struct mrsas_softc *sc, struct mrsas_mfi_cmd *cmd) } } } + sc->chan = NULL; if (cmd->cmd_status == 0xFF) { device_printf(sc->mrsas_dev, "DCMD timed out after %d " From nobody Wed May 3 00:29:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWY4yQGz48N8M; Wed, 3 May 2023 00:29: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 4Q9yWY4M1wz3mZB; Wed, 3 May 2023 00:29:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073785; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lfIHvyeBqNEa3gkRNVzHDy7QO8FqKC8/iBRkhhvPhRc=; b=lKkbYZFumTjjZIsqGgK+e7zxJXOYAL8r6IxgzKpRTnyoYQfGpAc+hNnrsb11y0Y4elisP/ Au9hjLa4Q9I8wj9XhvAfiWdiwfrRl0QEKZziUsAziQsyo4+njUx12lMQYlJgpt5Q7MgjJT W2zA+3dtqBiouzzyHOWNFN4sIXDKK3XhplFaBiBl3Lm6Z8GJhtbDhXpc+JBKgSL7ziiEGk 3duDQ0tJZ2o5OfqeLJpN6PfLMOfJxmpIXTu7aWu9XLGWwD11RSkWKYNjE7dGhHMjEBs4lx f6Cjym7mwlUBF4Ie/24ZLO31+B+qvghi2ErvuNYcZMraXUE2tcZFphuVBdpVog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073785; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lfIHvyeBqNEa3gkRNVzHDy7QO8FqKC8/iBRkhhvPhRc=; b=XZWD2kRmnAoG9A37sw4TgqBMQ9RlXiYEbtgO9cHV+9Zo/zZyV0VyuYx+3BB170ZRsazJcJ 8OwGp48um6XelluUYXbzSGvQlQEYrNdq4TpX1IWjh+nVzuDyMmhZ3lXFiV0L9UwUNa/0Su X7vd5pubVrBjVBadx7tIlYgIoZ4hwR9JJ4caa/IP4qX7LnwvIxsUwBwKlXPlWtlAJrUxZ/ XTXjdG/EXogoUOjvOq6CHxc6mZWlDn/j4qXKJPTsCASF6jcMQbXiMmPKcDFOH4AoL1DSBO e0kU0Fi4M2WuYkZYklPXQ9wFysGlPWquuLRZ8/2YcBYCahj44JdsMsGAztaxhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073785; a=rsa-sha256; cv=none; b=QL29YbS3mzc6vEO1bQJbz7zwCbVsgg9kv4hGtndMPTQbJtQIrau4tn4jt82KWGoC31+VeA 9mMIzbs2aiA0ZrH6nEywkZzuZyB7rTcFLzCIGgT4JGjlYWCnt3hvKck+/GTCHJZvYs48Cf 2N/EjzdD4Ea4YF/AKMMlCwo8NRzxtWJTDNxdy8b4wCZXRFP1Or/5txMGeIyUJ0+dR25idI cde2N7S4emUC2QUNxTYKcAIrkASSmdWkAk1XzkGjemeACRF8A8HWNzKXOkuRNBtS+R0Hx8 oGjxgJmYK4omxf4RlZ8hcsR5BZiNwN3HqD8/k7v5NXsCi7bVva/q/iZ2g82isg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWY3SWnz18TK; Wed, 3 May 2023 00:29:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430Tjoj072115; Wed, 3 May 2023 00:29:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430TjEL072114; Wed, 3 May 2023 00:29:45 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:45 GMT Message-Id: <202305030029.3430TjEL072114@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 64313140e531 - stable/13 - iee80211_hwmp: Don't dereference NULL ni in debug printf. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 64313140e531622eaa5e858e8d22c663efb83d19 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=64313140e531622eaa5e858e8d22c663efb83d19 commit 64313140e531622eaa5e858e8d22c663efb83d19 Author: John Baldwin AuthorDate: 2022-12-21 18:45:45 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:12:50 +0000 iee80211_hwmp: Don't dereference NULL ni in debug printf. In this call to IEEE80211_NOTE, ni is always NULL due to the assignment a few lines earlier at the start of the function. If debug traces are enabled, then this will pass an invalid pointer as the 'mac' pointer to ieee80211_note_mac. Use IEEE80211_DPRINTF which doesn't take a 'ni' argument instead. Reported by: GCC -Wstringop-overread Reviewed by: bz, emaste Differential Revision: https://reviews.freebsd.org/D37626 (cherry picked from commit 95d146592f5ee3fa998496713f28475e65996ff9) --- sys/net80211/ieee80211_hwmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net80211/ieee80211_hwmp.c b/sys/net80211/ieee80211_hwmp.c index 77ba218ccd50..ad3de543664f 100644 --- a/sys/net80211/ieee80211_hwmp.c +++ b/sys/net80211/ieee80211_hwmp.c @@ -1928,8 +1928,8 @@ hwmp_discover(struct ieee80211vap *vap, if (rt == NULL) { rt = ieee80211_mesh_rt_add(vap, dest); if (rt == NULL) { - IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, - ni, "unable to add discovery path to %6D", + IEEE80211_DPRINTF(vap, IEEE80211_MSG_HWMP, + "unable to add discovery path to %6D", dest, ":"); vap->iv_stats.is_mesh_rtaddfailed++; goto done; From nobody Wed May 3 00:29:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWb2Y6Xz48NhK; Wed, 3 May 2023 00:29: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 4Q9yWZ5MrPz3n2C; Wed, 3 May 2023 00:29:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=brzcot2mjI4vSxCgtFBR0DPTwCP38GGubo2uGBX9fo4=; b=F9j9u/C++koTfJpQ7pLh1UFL08TGj6FSmI20fdoP9ANGI4jjkZCz43VjXZ9nAnmUGEJb1t Y7uCSiv4gt06O5fIwdo0ZIX0WqSUInAvP3NGo3JzemDOU3uBoQWyw2y0IuXT6BtsexYVQn r2kUzhgUdStxqTxaw2MHYhaGssW1MaONQbRdYgA0a5mJ7XYR4E56SSYo8f7dCO7HpGPm9x k21zB8K0UZSAtXx/p5IpaE855yKtyasZqoaQIejZI9u2xbSlCNX7bOyY7XGTlAKfn/IDc2 31fiPsOvNlLkhTXp/5LR2GJs+vbRY6+Ws+sKoJNazHRRPNpJUDUMdD+0y6haRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=brzcot2mjI4vSxCgtFBR0DPTwCP38GGubo2uGBX9fo4=; b=b4RAKKR9zuys4RXSK74CYfTXa2DIy1GHdRXHX49MHVjnY2SoT85P1paSqXEMsnrgMpIMEp F3zFdta3KiISCFfebaacaUWsRUlfjHt907fSs9Ic4ki5hCD1fhZ8dR6tRIF5cqDZxcH4+t /uAu1g4cltJ3H6V39ITUIkClW/MPrPPzixrlU6dcwYvCoEMbiq4+wWrX5dONBQ5IhTN+Gq IWk6Kb4eENWFuaChAbUkPsq8NyVte3s0c/OU284jwCzh0F/XaQF6BS7f51BsP7I4A0B4TD yWp817svdhrSDBi9Kc2lw36tiFDYiHpl2BXJDr3sQdKJ2HI9DRBidJQTtMwLFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073786; a=rsa-sha256; cv=none; b=k73/FSciO5aOie3+XOzxpzXt0P+joj/RnX/NBi67NbBJTozFqWt3Gc8CJ7NDtpSIaC0Tkm DPky3ROwOjpCSmhTLSkpQLPvw5b3i7p81EkHYHTvowXmO5FT+TREp9RbKsWBux8uUjIORc 0nqzV1jIUxlcgVTrVvLjbvBPCT7Fyd0JD0Zk/EwtluKupde950amSvij2711Vd/x+Els3s SxGIS0D/LEvW32tpW5INFeAbOCnGHw88DDHfOr3mYnmrKwa+NQv0udEvMVusAv270Sny/L SJqWXZQFUNMtTWUFNlsExw5kfMhqY2IdAYgDpctM/SjD7JUh3wTlMjaeuKfORQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWZ4Nb6z18Wr; Wed, 3 May 2023 00:29:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430Tko6072134; Wed, 3 May 2023 00:29:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430Tklh072133; Wed, 3 May 2023 00:29:46 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:46 GMT Message-Id: <202305030029.3430Tklh072133@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: ea3bb92cc3e1 - stable/13 - Disable -Wdangling-pointer for the kernel for GCC 12. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ea3bb92cc3e196f45bd4612250494587a44a63fd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ea3bb92cc3e196f45bd4612250494587a44a63fd commit ea3bb92cc3e196f45bd4612250494587a44a63fd Author: John Baldwin AuthorDate: 2022-12-21 18:46:26 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:13:09 +0000 Disable -Wdangling-pointer for the kernel for GCC 12. Some of the warnings raised in the kernel seem to be outright bugs in the compiler (e.g. the cases in ata_xpt.c and scsi_xpt.c). Other cases are not fatal and it didn't seem to find any legitimate bugs in the kernel. Differential Revision: https://reviews.freebsd.org/D37629 (cherry picked from commit 2637ed558baacdab7a8cf789dca713bde5843e43) --- sys/conf/kern.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 5d902b340c2b..b50c82b7d913 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -91,7 +91,8 @@ CWARNEXTRA+= -Wno-error=packed-not-aligned CWARNEXTRA+= -Wno-address-of-packed-member \ -Wno-error=alloca-larger-than= .if ${COMPILER_VERSION} >= 120100 -CWARNEXTRA+= -Wno-error=nonnull +CWARNEXTRA+= -Wno-error=nonnull \ + -Wno-dangling-pointer .endif .endif From nobody Wed May 3 00:29:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWc1hyNz48NkZ; Wed, 3 May 2023 00:29: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 4Q9yWb62Yfz3mls; Wed, 3 May 2023 00:29:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ES0fILC/cBYyXXXjPQkWxJr8SOJdZEOSj0lHm7jiEkI=; b=j3hDqCOar4/UoZllOAHgwTvBrxVYEwxd6QEaR8lGmpNjsYBjV4/5f1Shg8wtCMs1XRjVlf WPtZKldP0bISbwb24/1HkMS+AjQ4u3cOub56RuDtWLu0pBkZw0vwNENHqdC5agKOly59tn xa/3FhaqXaTejzW03f3e0s1E2TamoUJnTYZlT8OObeQvNp0Khu4FgmnLHd1hzTM4Deb40H iCvoivttzebWImWKycAJ88FK48CsUSAyGyr2PYoEm1mzxzXPlU4+RdMwFiIRzAtHmX9BG5 6HtFySvhfUQwkLs7sOw+ChZIc27x1FePBA2uOu86/i8K5HyrAMyZfNK5bSXPqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ES0fILC/cBYyXXXjPQkWxJr8SOJdZEOSj0lHm7jiEkI=; b=iw8jCsw5vThS52rDQYgFxZyH5rcuhEjA9BiXOTNDXt30q9dYjnPQDJ8uEa6ziQMDzlSC4s 9hcAtbCkf/ei2lPYF2VU88AKIx1L5weXCE0CJ6RiIStIuWeU5LH1ebT9qpm2QB5WFCAhc9 mKEXhDwh3/hSuj2g4+K+cK5PodDuuyjnWkSfxG9oMGs522NLspZDzTv4OwOeiASSyS3mr2 WhTsBKEULrWcq+EpH2JqE3jDwRicaNp9Qhy3sNFlmHTpey9ZrGrBOXa7W7MmZDJikaINkZ T+VatTs0feTR+Ad1SnE7wUuj8C4TBcjjto3lyGGeHh9sre4+tPgrwiE8c6fL3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073787; a=rsa-sha256; cv=none; b=Vwzwl6adMuZj1n5Yuz+m6poZLK2HkEKhWh6n/j/gOhCPs4eA4aNyZcEf/aWc/3jZjr2Had JUtzxtI+n7/Feb5nM3n8TzR0iuOwpvPmr5zcbBhVRx3lnoWyZlMPxYZGbI/Ffn1EoqXNq+ SNGpzmkJQCN1Z9ff8XEyT4Hz9X9kw9LvzBpWgIeVPNshADquTR63qrjzKnwZ3LrOnulQmy XY0ZhK8Yj7z2Y/cWgqktFQWEq37tDTJW+DDmeKrAS5VojCUB02+v1uU989jRqdAMuSDlHI yHB+U0wnq8ugS6/QxXr9fSTzbz/6yFjouEcc9QMrbbAtUZARFxsYk0oiN2+wxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWb5425z189K; Wed, 3 May 2023 00:29:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430Tle4072157; Wed, 3 May 2023 00:29:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430Tl49072156; Wed, 3 May 2023 00:29:47 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:47 GMT Message-Id: <202305030029.3430Tl49072156@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 0f8e9a76f304 - stable/13 - Disable -Wzero-length-bounds for the kernel for GCC 12. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0f8e9a76f3045855d099bb9fa89684016822f242 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0f8e9a76f3045855d099bb9fa89684016822f242 commit 0f8e9a76f3045855d099bb9fa89684016822f242 Author: John Baldwin AuthorDate: 2022-12-21 18:47:08 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:13:25 +0000 Disable -Wzero-length-bounds for the kernel for GCC 12. The mlx5 driver and some other OFED bits use a somewhat dubious pattern of: struct foo { uint64_t arg[0]; /* Real members of a struct */ }; The code then treats 'arg' as if it were really a kind of union such that foo.arg[N] functions similarly to (uint64_t *)foo[N]. This uses of foo.arg[N] then trigger this warning. No real bugs were found by this warning though, so just turn it off globally. Reviewed by: hselasky, kib Differential Revision: https://reviews.freebsd.org/D37630 (cherry picked from commit 1aa6d44decb33ce3eab0efe5336b75fa2dfa3733) --- sys/conf/kern.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index b50c82b7d913..281c49c7c850 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -92,7 +92,8 @@ CWARNEXTRA+= -Wno-address-of-packed-member \ -Wno-error=alloca-larger-than= .if ${COMPILER_VERSION} >= 120100 CWARNEXTRA+= -Wno-error=nonnull \ - -Wno-dangling-pointer + -Wno-dangling-pointer \ + -Wno-zero-length-bounds .endif .endif From nobody Wed May 3 00:29:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWd1097z48N3L; Wed, 3 May 2023 00:29: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 4Q9yWd06ZHz3n4p; Wed, 3 May 2023 00:29:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ClTU+qtubo8tIPY2aUOGEvGgJQ1SM30/nzzHIIPJpU8=; b=IBXoek1GSfBHCZJDOVBvz7QG6sngi4Q04zcLYERTSVfabZ66Gqp3+8dt6ip4SXwZ/xnOpe xvxxh2yVXBmwEy50Nw5WbnlRCbOH+dLBZn2q/dBEbpw1O1V7XiHSLtyckXrfVCI6hrLpyT pjVIoyYgd3/9DdLyDEoLI/2hrdsJ0rEIQ8XOYg4u4t73720O0ef+vNBGocJjHzAgr5lGJo puK5aD5bQp46BEDjtCwpIZ5e0u7FyKGg3hxq7TDiooT2SiqZXhXQ7YCLdhRzllaO1Q6geZ E4ScYGgRihg0NXm0S97+hGlMuLzRWIKdsPMq+iAk6wsUJqkZofzy4iiJpg+2rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ClTU+qtubo8tIPY2aUOGEvGgJQ1SM30/nzzHIIPJpU8=; b=iwu2GZYrvYAIrbUOspPFb4xcotBLiGhCrsK7ZB9R6YCmL3GQ74L0M9MqmwG+f2cKKLLSgA SQ9ea8NIreS7/298MQasBr3AgSFYCige6KW9RK42pTEfLl/Za27x97VYZjkBIxmpzTD58e maExHLbhc+ks2ZHE4Joklmsa34zC682XNSL7nb/0e9ftnJeyfpmc86RVnLtOK2Nmyr5M2Q jjM6y5k5CsrE0P9H1sAk7xFNDjA4bNERKwBlT3u9H66UlSDxG0DRiqQ0E51UMByjGKO/Hc uqxTacmxcjpH3EVMagxIAiMQoYT8cKTBGCfL5rVTsyk4GgFPuiiQBV4IwW3eAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073789; a=rsa-sha256; cv=none; b=NJyYNNlvnIaokzGozWNuLt8kkyjpFmYe8kvxKePeJE12i/b+MRiHDfQZUwLP9DiyNTVaMg YcILUZFepJU5DJBqpN4FdvzfNRrP2EiX/M2+FA0QqiG898HiwduhYrTZvrzZmkqxvyA3k8 otoc56zVAMsB1wUPX2ALZ0LxHRnsfRFHV2blUs8yaLxsIWg4xzKlJ1aD2gsdVYl+hv7XH+ yWB6vmLpwb3S4KUj9Ro0sYe1/yK83Ix98oHVs4vgvbV0kEBrZbVfBLAl3srZChzaY64EmL 4x0LZoTEMMNzgkcjl0gaq/L1wb0ErYEP+/ARe+oyPstlxkaic6yImrgKTzUXdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWc6FZ1z18TR; Wed, 3 May 2023 00:29:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430TmQL072178; Wed, 3 May 2023 00:29:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430Tmon072177; Wed, 3 May 2023 00:29:48 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:48 GMT Message-Id: <202305030029.3430Tmon072177@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: ca1b2ea863bd - stable/13 - ath: Fix mismatches in array bounds. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ca1b2ea863bd1242dcddd149b9a752c81cb4c480 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ca1b2ea863bd1242dcddd149b9a752c81cb4c480 commit ca1b2ea863bd1242dcddd149b9a752c81cb4c480 Author: John Baldwin AuthorDate: 2022-12-07 20:30:42 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:17:32 +0000 ath: Fix mismatches in array bounds. Reported by: GCC -Warray-parameter Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D37542 (cherry picked from commit c1ebd4c98fb8feab6931a536390739fc115e1805) --- sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h | 2 +- sys/dev/ath/ath_hal/ar5212/ar5212.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h index 49e887353e52..da74b4031860 100644 --- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h +++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h @@ -1411,7 +1411,7 @@ extern void ar9300_iq_calibration(struct ath_hal *ah, u_int8_t num_chains); extern void ar9300_temp_comp_cal_collect(struct ath_hal *ah); extern void ar9300_temp_comp_calibration(struct ath_hal *ah, u_int8_t num_chains); extern int16_t ar9300_get_min_cca_pwr(struct ath_hal *ah); -extern void ar9300_upload_noise_floor(struct ath_hal *ah, int is2G, int16_t nfarray[]); +extern void ar9300_upload_noise_floor(struct ath_hal *ah, int is2G, int16_t nfarray[HAL_NUM_NF_READINGS]); extern HAL_BOOL ar9300_set_tx_power_limit(struct ath_hal *ah, u_int32_t limit, u_int16_t extra_txpow, u_int16_t tpc_in_db); diff --git a/sys/dev/ath/ath_hal/ar5212/ar5212.h b/sys/dev/ath/ath_hal/ar5212/ar5212.h index f80f88c5df85..b90cba09b384 100644 --- a/sys/dev/ath/ath_hal/ar5212/ar5212.h +++ b/sys/dev/ath/ath_hal/ar5212/ar5212.h @@ -572,7 +572,7 @@ extern HAL_BOOL ar5212ResetCalValid(struct ath_hal *ah, const struct ieee80211_channel *); extern int16_t ar5212GetNoiseFloor(struct ath_hal *ah); extern void ar5212InitNfCalHistBuffer(struct ath_hal *); -extern int16_t ar5212GetNfHistMid(const int16_t calData[]); +extern int16_t ar5212GetNfHistMid(const int16_t calData[AR512_NF_CAL_HIST_MAX]); extern void ar5212SetSpurMitigation(struct ath_hal *, const struct ieee80211_channel *); extern HAL_BOOL ar5212SetAntennaSwitchInternal(struct ath_hal *ah, From nobody Wed May 3 00:29:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWf1zckz48NSs; Wed, 3 May 2023 00:29: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 4Q9yWf101zz3n7Y; Wed, 3 May 2023 00:29:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073790; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=djVKPK97w65+BnG/v8gdcsy65mOaDyBzZs1wfmYUkbQ=; b=BUHka6MHKdXYSGa2O7jqYDZ4y4TUHp3J4h9y/tB4HIh59M0Um1cMjXTVH3xF6b7rXkfA6L UMPBree9ptmN422jegZiFiT+fxkCTJ9YOQJp2rcauBAmulpaXEgOCpoio9RFtB9SGexFiM Vwcw7jxzE6uRYSL8y7OR87NAkthHf3YqxadVCyjORw/qtN1F/Xolrmd8a8hP9U1+0+Mmvk 2qvRGNfP6qp0CUvc4Qetsj/ZwcBC5asXChkp2EMiC6KSEXvmlypDMvx62OkDPRwWnr0PQ9 Z8WjN6/NFkh773GZZMQYq6ChbdrblAZp2oa4ESbZq6taSVftuXupMwzua2QWiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073790; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=djVKPK97w65+BnG/v8gdcsy65mOaDyBzZs1wfmYUkbQ=; b=sDf1xDkRI/8LIdcZA6OjK/W79Pta79dXRk0e2J6+1E4hznHx0BRzViG53O3XfADiGbySBu FuuXdeyLZSCVTEnx9f9mv9nvO/WNcLHHwrxghLGt6KgaAZzVPcZxcIPkC0xTMeYapO7qcz s+6cHuM6KYt9+pLvE+0lvi3sF4LX35jo0CTMMWXLIYx8ZcuhST8dF2fkuOunX+UmQnyyfE YL6K6weE50zCWCiadg0IWWCZifZXEgNi7DzFCRPl5ymO2XeBa73otUNTsYTKHt74jb5UwJ dzI2yuKxNnVY9WQe1uWLfY8IO0pCNfz6QMvFkb3rWJeJjWTxFBIi7JOuxxJ1og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073790; a=rsa-sha256; cv=none; b=CgkUv9NgSC9CtQT+2Y7bqdJLR8PqdfKAWORz1dhcKk1Mibo+OGRHG2BjaQkkW4Hzg4XINZ STGPLbYR/4kF4z8WhwdU8dl42ER8LVGQ4ggt1bPf+7X1ftaliUqcoVal8wM/AttnrH4ZHa 1ld/FBcjjfCp1skGVvGMq9V1xEykmWM7iaGVbwdBd4S512eNEVM5dDKqijKheS+mWyi3qz FvOiz2xCv9+Ys+wEeTHXieWS3wWSd0I3fQv7kY0Ou/HXUDDfj4+FYsy+sNbzxFS87Qpbk3 gK/qCpxYBrqWJv51mF3WKAFl/IsuVVA5dX1dpwguTBG4N4lfy5HT1a29rdvJKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWf05Tnz18TS; Wed, 3 May 2023 00:29:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430Tnkv072197; Wed, 3 May 2023 00:29:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430TnW8072196; Wed, 3 May 2023 00:29:49 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:49 GMT Message-Id: <202305030029.3430TnW8072196@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: c79901ba3d52 - stable/13 - iwi: Remove write-only status variable. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c79901ba3d52f0cebfd5b89d619587e5ebbff201 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c79901ba3d52f0cebfd5b89d619587e5ebbff201 commit c79901ba3d52f0cebfd5b89d619587e5ebbff201 Author: John Baldwin AuthorDate: 2022-04-06 23:45:27 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:18:05 +0000 iwi: Remove write-only status variable. Skip over unused field from asresp frame header. (cherry picked from commit 99f65e9198c89e96f935986300b8ee3605d1349f) --- sys/dev/iwi/if_iwi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/iwi/if_iwi.c b/sys/dev/iwi/if_iwi.c index 360020e01b19..0a65d4d635c2 100644 --- a/sys/dev/iwi/if_iwi.c +++ b/sys/dev/iwi/if_iwi.c @@ -1310,7 +1310,7 @@ iwi_checkforqos(struct ieee80211vap *vap, #define SUBTYPE(wh) ((wh)->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) const uint8_t *frm, *efrm, *wme; struct ieee80211_node *ni; - uint16_t capinfo, status, associd; + uint16_t capinfo, associd; /* NB: +8 for capinfo, status, associd, and first ie */ if (!(sizeof(*wh)+8 < len && len < IEEE80211_MAX_LEN) || @@ -1330,7 +1330,7 @@ iwi_checkforqos(struct ieee80211vap *vap, capinfo = le16toh(*(const uint16_t *)frm); frm += 2; - status = le16toh(*(const uint16_t *)frm); + /* status */ frm += 2; associd = le16toh(*(const uint16_t *)frm); frm += 2; From nobody Wed May 3 00:29:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWg4lDNz48NSx; Wed, 3 May 2023 00:29: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 4Q9yWg1z59z3n84; Wed, 3 May 2023 00:29:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cMfSCVVwQ1Zt/KzvY0840McRLv9cfLiNJACK+N1IkT0=; b=vIVwQ4DawJBPR6IEp7nNIJznW1zM8SjvNveRSo8o9iLeJAzE2db/6GxZ4+nMzh6n7oZAq6 6+wDtYuXHDPwcft+LvctySDK4WNGcL7U9QxOphlL9VKcQKDmfPk8sE3vJU4JpFtVytv8Th /dok4OaiHjY2RTH08dcfmeLzMgv4YFiSvD+XlPjVaxiRv0wFr11Ag7lndXaniZ1bxWB8eq oXjyrcSFOlXK85FAEHhHKlpQETuEUVRoiQ4QF+vQnzBSFmIyuA103cGr2nA8H7QBGSzAtm zfQaPjdRuk2/5cFh4gLlxS87M5Plmu8qwniAZZj1f1R0wHnC833eHgGafbQPiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073791; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cMfSCVVwQ1Zt/KzvY0840McRLv9cfLiNJACK+N1IkT0=; b=PpHb0k4AEtqmaNeBI35hgWUeJb1DvcdEQnD1N5vyuKAHyYE9eKBgZ3/v6x3VLRiTlLTy7w 3QW6xeUdlLIsoVlr15ay14OwCzVmJCZaAUDiS4u+MAJUCAdbp0qIIh+/sM/joWhMzIt2Df vercCGHJhz2h1pL7tPYD6zz5s1w8Cdb5TE+u2Q0QhxWB83/NdCB5wVy30OGO3mYHm8Q7Mq EeVnOdCXHFpgmxNhZS3B84zmHo9OS1RWjdHaCJ7QNEYFKaMITrPlgjgtZhE33ujIQq7fWX Ql2Beq43wRnp9jCkaSK8novPUM84Qq6JsLW7dYGwvSKZG7u1xNTyyY1wOCUuOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073791; a=rsa-sha256; cv=none; b=cqpZ8lr40k8Zkd+hOY2F857CkKdO3Nkf1M+NttKa4fwldO88t6BecrPxcsrbjUgWkKvt0J DfPi/NRCyGonyJUt7Ly4fqHJ9jIpOt2m9iCaqn+pCLr1znQtiUorUzCLbBwaLanEsCauRO 6Ze4rpDBx/ojoVXzPgJv+wrE7qrmgnWM0shdScLd3E3kSKjnkaFpJKvipt63xlB+u116fq OnLA+0Tsu8nLjmZ38ELwNqUrLDr0lTWN6ly6I4cWjDSrnY83nGTIyjVwEIAYbyNv/yUguE Xc/euGJH8/cfFseeSObvnsclb/GbN0fNMYrIunQt6398X51QnkmPeWxMngMxoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWg0mWkz18Ws; Wed, 3 May 2023 00:29:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430TpEp072225; Wed, 3 May 2023 00:29:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430TpxH072224; Wed, 3 May 2023 00:29:51 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:51 GMT Message-Id: <202305030029.3430TpxH072224@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 861585daa86a - stable/13 - iwi: Fix mismatch in array bounds. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 861585daa86ae17538728bee612ce3582f8775a6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=861585daa86ae17538728bee612ce3582f8775a6 commit 861585daa86ae17538728bee612ce3582f8775a6 Author: John Baldwin AuthorDate: 2022-12-07 20:31:01 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:18:22 +0000 iwi: Fix mismatch in array bounds. Reported by: GCC -Warray-parameter Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D37543 (cherry picked from commit f322a6cef0b142bd65c3750139ea1801513b864a) --- sys/dev/iwi/if_iwi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iwi/if_iwi.c b/sys/dev/iwi/if_iwi.c index 0a65d4d635c2..c270550d1bba 100644 --- a/sys/dev/iwi/if_iwi.c +++ b/sys/dev/iwi/if_iwi.c @@ -173,7 +173,7 @@ static void iwi_rx_intr(struct iwi_softc *); static void iwi_tx_intr(struct iwi_softc *, struct iwi_tx_ring *); static void iwi_intr(void *); static int iwi_cmd(struct iwi_softc *, uint8_t, void *, uint8_t); -static void iwi_write_ibssnode(struct iwi_softc *, const u_int8_t [], int); +static void iwi_write_ibssnode(struct iwi_softc *, const u_int8_t [IEEE80211_ADDR_LEN], int); static int iwi_tx_start(struct iwi_softc *, struct mbuf *, struct ieee80211_node *, int); static int iwi_raw_xmit(struct ieee80211_node *, struct mbuf *, From nobody Wed May 3 00:29:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWh5Jt9z48NX4; Wed, 3 May 2023 00:29: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 4Q9yWh36J7z3nHG; Wed, 3 May 2023 00:29:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=goTNZr7H099EO4DOOMmJHpIoW1zEFGyHJNIwBhuKyjY=; b=l7+XVhXjIegZSG17y9NNt4SQxavv/lRk2wmP7H7q3O3auvo3ehxP6oib4fegapn2ecDvig 5nFBZrlo/jtDJhQbNCdLjJsno5lSFTr8LBKTwAzMWyqu1/k1b7xoNF1goHLdbrrRpftb+X 5prlM0gFhDaCHoOomJtlt76EwtodRvMRrmOy2ccCWa8MDn4WWieIFN13lJRpASLjbMrQpU oSZgZsnDem9u8XT6VNfB5Z1JLdLM8nNh4KX/a3VH0+Gu8VKgDgY0rpjcetEp0LCrMLWCcM Csz1l56QAPXFVoRac3df8vOBeigdFW7bgsnIkRnRDBjTKi6kCzzS8zmEgtc1RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=goTNZr7H099EO4DOOMmJHpIoW1zEFGyHJNIwBhuKyjY=; b=QaQ5AarHuqXj9JeJCQbV6DAKlWSOWn/4yEICNETbNDetXxnKtygi/xrY1xlLNOMevJm0RV 4c1HFVpQX6QerSJO+7IU899LPpWkstYujHNG4znOFK1jd8LszX3VbCuadcC+RgzikYGaod jXUFrLOsSzvp+ayDGP6DcbPf1iA4PlGJC6nGmBCXB0os6JvDOr4NaARRHlpoBtewzJC7p1 eTdQ3Y5tvxVwY9EefOffHOefTqfGSWsVfXYw4YxXyuK8RYhK8o8lCq3ShVFJSJMxAQB4ig bBc1MXklX5S6EHnbRMP9X1iJJIkcsnGPG27Mh1rStr8Ncw8k9d953ss0BXRp6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073792; a=rsa-sha256; cv=none; b=hyhxyGhGHOR6d2vIwDQHSOQU7MajxyssYRixwkFIrkWN8WnSrTZAjUjqkmEI2G1TxxJF2y Ua2wN2lrlIF/iZTT/Ocm1qnsxWuBVQAiCxNYlLNOQrvbiqEypKE/Al0CDoQI7iJIytOJX5 zgGqxeIYHT1hD+tmahOO+ZMYBN9ldxbN2XHqSOSKGaJLWQSgCG8SmmENWwqZ5RIQ32Cl1l Wx/cseSaFeYwr+gp7KcDaBDjehHtBPCedoyh/bLG3ufoBAidBys2/9dXIuKT7iFWfLi+bw gVDMnn+N7axZBqp4nK/sjVQsuUjL9T4Skn8TJKPCVrgSKJ4qV7dYe41WJ8yf8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWh1yKsz18Wt; Wed, 3 May 2023 00:29:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430TqjZ072247; Wed, 3 May 2023 00:29:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430TqYo072246; Wed, 3 May 2023 00:29:52 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:52 GMT Message-Id: <202305030029.3430TqYo072246@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 4f58d7654381 - stable/13 - malo: Fix mismatch in array bounds. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4f58d7654381a6e9b8b71b8ac154de20e19f9b10 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4f58d7654381a6e9b8b71b8ac154de20e19f9b10 commit 4f58d7654381a6e9b8b71b8ac154de20e19f9b10 Author: John Baldwin AuthorDate: 2022-12-07 20:31:16 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:18:37 +0000 malo: Fix mismatch in array bounds. Reported by: GCC -Warray-parameter Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D37544 (cherry picked from commit 8b45e0c180114e1059767d0920ad6e6bfdeb37ce) --- sys/dev/malo/if_malohal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/malo/if_malohal.h b/sys/dev/malo/if_malohal.h index 8322f18ef739..6a68a41afea9 100644 --- a/sys/dev/malo/if_malohal.h +++ b/sys/dev/malo/if_malohal.h @@ -223,7 +223,7 @@ int malo_hal_setmaxtxpwr(struct malo_hal *, uint16_t); int malo_hal_settxpower(struct malo_hal *, const struct malo_hal_channel *); int malo_hal_setpromisc(struct malo_hal *, int); int malo_hal_setassocid(struct malo_hal *, - const uint8_t[], uint16_t); + const uint8_t[IEEE80211_ADDR_LEN], uint16_t); void malo_hal_txstart(struct malo_hal *, int); void malo_hal_getisr(struct malo_hal *, uint32_t *); void malo_hal_cmddone(struct malo_hal *); From nobody Wed May 3 00:29:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWj4v8Jz48NXB; Wed, 3 May 2023 00:29: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 4Q9yWj3llFz3nCN; Wed, 3 May 2023 00:29:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WFUF2BnIK7ZCOPbG1WjsPBNKwi0Kw4GPYfZdjk6Wrc0=; b=Rnw3KSSJqlU0+3kI5eIKRrbi1YjRwL4/Cz9hWhtWyCyoxtjFYvbTBBGsJuDi/09mEKbwUF lIYpdjcPGMMFYifcVt+wxQsQpBLeL1R6wVzywEBPPS0H2lTngJgxaMnuyjX93Ecsgq0RDP WxZT42njm3g9spvJtOIA51u2T19IQQytSVHb3yoPjaNs33dIMmdOnCDuSLrVvpnsqVWlB7 LImwk+Naoh4vxl1P42XGH90fEZWMP1Ew7EFeOGkuJfz0yLmXNHE/o/JEw3nvvhTnLN6Uef 5DR3N1uIJpKq+I13rNvdrfAvojdyI0Oljj/Umh08DCdxzY7b4cWF8DHLJLeJGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WFUF2BnIK7ZCOPbG1WjsPBNKwi0Kw4GPYfZdjk6Wrc0=; b=bkBl2W/vDXIxWBiCuyUrJMqivrbyH3ALvRAXJUuH7Fb/TNZb87W648vGwdOgWlSR7Bbj3X I0z/T/zF81SMG/+MOKgN0dNfwY6Jv7DsDa0oMZwKynYsKghPqX/UbEPEXE99GM8U9ugeDw qnmoXc3cP8T8qLCrWlOrdJXKC/ld2EAooJ+kEZ+Peu/6QUYNPG+fJ1xs3Gugy7Mj9Knof7 1PmKYbI4DgLBb+8zJ9vvfqzuI3vM2cgdMyGjP+7/m7qYsh5fIlKM23bI8y9tH/rUdqNZgn 3+7O0HFx2E2fDVmD/A62bxtpQ2PqCnsjUepvovH31MCkkW3ww/hgicloa/YFDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073793; a=rsa-sha256; cv=none; b=f/Ovp1z4xznbRcDzohtWlFEaa5O3trylU6TyALV/PyrzWKHsI0hrnT1onN+UdfCkcslJli 8F+q3Fd0Nex5/P0CWEPslVNr2VUvhoQvKt08GRd8P1D7aLj6UyxXjcERqyUTWR88r25GoV xLVnNEMk0ScJjTwg7JIWg0X1WePY7a47+S74AwFkht0oD+KiWVjh+MH6nbUVd3G9c88Ox6 1IiF2uiUkZIyyFUzQhNzzHmG+4+7ouPffRZmAwG9Eu25IlaxhjQaYeSFc9bvD51tVAwDOy Rjm+wu8lyaU+O2R8EYplvnR35MQ72KG0ZvNoLiyVn1N7XJ3c37rxsG8R7W6s1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWj2jcWz18TT; Wed, 3 May 2023 00:29:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430Tr4A072271; Wed, 3 May 2023 00:29:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430TrD0072270; Wed, 3 May 2023 00:29:53 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:53 GMT Message-Id: <202305030029.3430TrD0072270@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: b7c11b67cbc5 - stable/13 - ocs: Remove unused variable. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b7c11b67cbc53972dcb1ad492af2de738242ff37 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b7c11b67cbc53972dcb1ad492af2de738242ff37 commit b7c11b67cbc53972dcb1ad492af2de738242ff37 Author: John Baldwin AuthorDate: 2022-04-08 00:01:27 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:18:53 +0000 ocs: Remove unused variable. (cherry picked from commit afda855350685d994f3fa5702079ce782563ee8f) --- sys/dev/ocs_fc/ocs_xport.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/dev/ocs_fc/ocs_xport.c b/sys/dev/ocs_fc/ocs_xport.c index 6170413a3d89..810c508d3010 100644 --- a/sys/dev/ocs_fc/ocs_xport.c +++ b/sys/dev/ocs_fc/ocs_xport.c @@ -197,7 +197,6 @@ ocs_xport_attach(ocs_xport_t *xport) /* booleans used for cleanup if initialization fails */ uint8_t io_pool_created = FALSE; uint8_t node_pool_created = FALSE; - uint8_t rq_threads_created = FALSE; ocs_list_init(&ocs->domain_list, ocs_domain_t, link); @@ -279,7 +278,6 @@ ocs_xport_attach(ocs_xport_t *xport) ocs_log_err(ocs, "failure creating RQ threads\n"); goto ocs_xport_attach_cleanup; } - rq_threads_created = TRUE; return 0; From nobody Wed May 3 00:29:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWk5Kz6z48NYb; Wed, 3 May 2023 00:29: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 4Q9yWk4P88z3n4S; Wed, 3 May 2023 00:29:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=euwNBibl5bSZ/CnRljWqizlKjjlqaZzkTIzkWKXlkT0=; b=twB5KMpC2IrpRoDJ01gCCssM1ISrigFfFBYs6HCKYx9aXQEwmNwPckB2wotPKTGUIRI1wL Fibc1448epubMG1HikbJ+RfouHnUkPXPA8aAyScXWwLi8D7qcMSVisA8z1mhqRI63gNntH P7iNdgQ6slX1t9uU+1xmtQLk0XxZabCVDZD7Kj+heIQiPywEkO7sg+dORM45biIEdiBbtE 4DfK/0MeqbUXWLL5d7z3wYdnAp0t+gurjlaNOS2VFTBbme4llruWN3Ey2R+IY9STPtRptW T/MCfq+P2RMod5g3eS8C8qvG5FFNGOubF/WL9CHhKjZtdSSoW9Zxz1tV9ONxDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=euwNBibl5bSZ/CnRljWqizlKjjlqaZzkTIzkWKXlkT0=; b=vo51thooUCZTEjfSKt69ufgN/PIVqXB9zbm/FCUUx45D473DIEueQ7pgLbO/b0l06fvmgZ h/WWyxD1ugn1zbW1i4YPx6QKIynjgxx/GrfUT6CwGA6HklTYFBr3NPD2T/ilPphPvLUZcB deXTNnuTmYZDUmEHjPbI8KotgLFy8W0O0aXF+6T+NaHK8qFXb9bTaGepEaMSMl6Xa7t0+C K8OOXkd7E+B7Zlm5l60aX/mXFu2cHJbAu9LgQGcbH0ahXWNTtX6U6VriFSNXsZvYLRDtpX u480gVSzjSk8LVV/mR4AOFvwU1iWX+PcPWpPCkERQ79F/+1Gm6/5TWVhs3UYYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073794; a=rsa-sha256; cv=none; b=W9t0DXEK+ZADC27zryRLp1wPXYgbyhSBHhgJ9iqPffkTCUocD38AgwIzXMPuAiOK+GNtsH EqZrYye+dsV2UmeDz7zRXTeQEhEvhu9s//VPaGkvQ3H08LO1nvgl2FzERD6p9oZmNHfL4N j7bxfWah5TyOptAcpEwh39Wnth1IDwpN3qQekvCEhznxjPWgVoF9Ek9t9Kgf1hqhcR9QdJ KsmBW9D6fzq58krojplZaKKHJKYd5OlWIRNMHshJdzG5Ge+woFCRDhr78tYbKOFpL1hOMm t2bwe3rvds4uBSFOyqD6BJLoPlv3uCunty1RpgqA0QX4Gi2UiWD7yz8nZ+eQ2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWk3M3Dz18Wv; Wed, 3 May 2023 00:29:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430Tse3072291; Wed, 3 May 2023 00:29:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430Tsbu072290; Wed, 3 May 2023 00:29:54 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:54 GMT Message-Id: <202305030029.3430Tsbu072290@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 5c64fbe7651c - stable/13 - ocs: Fix mismatch in array bounds. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5c64fbe7651ceb3a3f20c1bd76fb22cf635b8605 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=5c64fbe7651ceb3a3f20c1bd76fb22cf635b8605 commit 5c64fbe7651ceb3a3f20c1bd76fb22cf635b8605 Author: John Baldwin AuthorDate: 2022-12-07 20:31:33 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:19:01 +0000 ocs: Fix mismatch in array bounds. Reported by: GCC -Warray-parameter Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D37545 (cherry picked from commit fb4a86164dc5ded5b42b7511d3bf48ae11ec891e) --- sys/dev/ocs_fc/sli4.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ocs_fc/sli4.h b/sys/dev/ocs_fc/sli4.h index c8bb9ab5c015..902235c410f7 100644 --- a/sys/dev/ocs_fc/sli4.h +++ b/sys/dev/ocs_fc/sli4.h @@ -3675,7 +3675,7 @@ typedef struct { } sli4_cmd_rq_cfg_t; extern int32_t sli_cmd_reg_fcfi(sli4_t *, void *, size_t, uint16_t, sli4_cmd_rq_cfg_t rq_cfg[SLI4_CMD_REG_FCFI_NUM_RQ_CFG], uint16_t); -extern int32_t sli_cmd_reg_fcfi_mrq(sli4_t *, void *, size_t, uint8_t, uint16_t, uint16_t, uint8_t, uint8_t , uint16_t, sli4_cmd_rq_cfg_t *); +extern int32_t sli_cmd_reg_fcfi_mrq(sli4_t *, void *, size_t, uint8_t, uint16_t, uint16_t, uint8_t, uint8_t , uint16_t, sli4_cmd_rq_cfg_t rq_cfg[SLI4_CMD_REG_FCFI_NUM_RQ_CFG]); extern int32_t sli_cmd_reg_rpi(sli4_t *, void *, size_t, uint32_t, uint16_t, uint16_t, ocs_dma_t *, uint8_t, uint8_t); extern int32_t sli_cmd_reg_vfi(sli4_t *, void *, size_t, ocs_domain_t *); From nobody Wed May 3 00:29:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWl69pDz48Nf2; Wed, 3 May 2023 00:29:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9yWl5ZvHz3nJq; Wed, 3 May 2023 00:29:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WFXBG049ncBSfLwgHkmMwWyjC5sOQnhZPtZHh08UBrE=; b=btGv3RIyxhhh1OlmsUa5wxAbUiVPohKmIpXFgxkeJCnQFRgxRtppY1lIayIDtZClaKTl+4 kkhHg0lJHRw3DVtvR2kedYULVm+Cqn3eoPGpbDEzsmFg/p3A/oTz/6sCKbXZ174thLdThp qk/Go7/2tsr4TH4U6zfZqPdkvD3xBCnTqST0cESgS8Vl5iEmc0FaIb7RXNiOQmtk0S5FLW 0dSe+szKw6o0wh28ddpscpcPxjoNzjm2ilG5otdXPIFdU5N9ea6UC2ZNMljyElDA97iLNq BZWVV/sHhWERc2F8AZ9famgj8bxuGbt0D3uHOicdyOg3lfnteJbNVGdFOQVcBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WFXBG049ncBSfLwgHkmMwWyjC5sOQnhZPtZHh08UBrE=; b=egyTTWEfLDvSBd8dS5ZRIw7nIxEIRqARPvObiDIYfF8QDZNtHEVHIJ8Dqng/+5sJvtrXY3 yCgv2/+rMBv7+I4C4CORY9EHdsLoa8VodBWUchd6iNslFUdXDi9EoeW0wV7eAqTLuUd4FN LZT8osbu3pybMysz9gcAL86bCCCVsGE8iCDSkRmY3UrM6mbBKgBYhpJ3qljEoAsC8UT0cA bvKP9H65L1owR1O5XefqySitFqNgHd03NGXjhp6KMByw5N1ijIFPxoEwxwf93LmW37UT6u Hi89j03+vyY5+ehSIotdsyy0dj5fhQZ9LI3Vhw9XvURUEYyi9NZdfHSHIaGwXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073795; a=rsa-sha256; cv=none; b=IktfXdTAgn11b5zKfL5y7cuqiqw0OSxEnB5nhhkcaU24MMFDeGOWY15e+TrhngZxmWA8EQ c4insNsQ4swBbRDPqqoDg7EK4yOMnVf2sLYIet/O5irW0txJK8YJKcjnjGh957BOOzn7/i fXMq+AI0rQa8/tUkR3p2uuKTtrQqV54E12xChXOmfW4QUOpyaTX4Zd2XHero7whpn73cj+ aj48+8etK/ncPXXmMHy678GKNnYHc8tjq021xDGpF3Pdxd0uYYHFTp/3EAVdo4pIze6/VL uaxbbixXIGmV+Z6XIZnv30rlo7fiY+U5KHw5vVXpRr+nOEHXYNMASlyY3mR+xQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWl4Q0Lz18Ww; Wed, 3 May 2023 00:29:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430TtNI072310; Wed, 3 May 2023 00:29:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430TtqZ072309; Wed, 3 May 2023 00:29:55 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:55 GMT Message-Id: <202305030029.3430TtqZ072309@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: a5cc1f650ca3 - stable/13 - sys: Stop enabling -Wnested-externs. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a5cc1f650ca30144badf10fbd5c37f0fe7d7c36b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a5cc1f650ca30144badf10fbd5c37f0fe7d7c36b commit a5cc1f650ca30144badf10fbd5c37f0fe7d7c36b Author: John Baldwin AuthorDate: 2023-03-22 19:35:09 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:19:51 +0000 sys: Stop enabling -Wnested-externs. clang doesn't implement this warning, so violations are only caught by GCC. It is also no longer a common practice to use this as it was in the original BSD code, so the need for the warning is not as important as when it was used to do cleanups 20 years ago. A recent commit (c3179891f897d840f578a5139839fcacb587c96d) triggers this warning on GCC, but that commit uses nested externs purposefully. Reviewed by: markj, emaste Differential Revision: https://reviews.freebsd.org/D39214 (cherry picked from commit 4ffeb3b88ed228e72e13abe1be888c77c6ede95d) --- sys/conf/kern.mk | 2 +- sys/conf/kern.pre.mk | 1 - sys/conf/kmod.mk | 3 +-- sys/modules/pms/Makefile | 1 - 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 281c49c7c850..d37d80793929 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -3,7 +3,7 @@ # # Warning flags for compiling the kernel and components of the kernel: # -CWARNFLAGS?= -Wall -Wnested-externs -Wstrict-prototypes \ +CWARNFLAGS?= -Wall -Wstrict-prototypes \ -Wmissing-prototypes -Wpointer-arith -Wcast-qual \ -Wundef -Wno-pointer-sign ${FORMAT_EXTENSIONS} \ -Wmissing-include-dirs -fdiagnostics-show-option \ diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index a12aff2c2816..3105d2c32c8f 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -246,7 +246,6 @@ CDDL_CFLAGS= \ -Wno-duplicate-decl-specifier \ -Wno-missing-braces \ -Wno-missing-prototypes \ - -Wno-nested-externs \ -Wno-parentheses \ -Wno-pointer-arith \ -Wno-strict-prototypes \ diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index 134b150af1d9..a952e3190dec 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -550,8 +550,7 @@ OPENZFS_CFLAGS= \ -I${SYSDIR}/cddl/compat/opensolaris \ -I${SYSDIR}/cddl/contrib/opensolaris/uts/common \ -include ${ZINCDIR}/os/freebsd/spl/sys/ccompile.h -OPENZFS_CWARNFLAGS= \ - -Wno-nested-externs +OPENZFS_CWARNFLAGS= .include .include diff --git a/sys/modules/pms/Makefile b/sys/modules/pms/Makefile index 4dc00b75ff6f..3219b3e0e4a3 100644 --- a/sys/modules/pms/Makefile +++ b/sys/modules/pms/Makefile @@ -22,7 +22,6 @@ CFLAGS+=-fms-extensions CFLAGS+=-Wredundant-decls CFLAGS+=-Wunused-variable -CFLAGS+=-Wnested-externs CFLAGS+=-Woverflow CFLAGS+=-Wmissing-prototypes CFLAGS+=-Wparentheses From nobody Wed May 3 00:29:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWn1schz48NXF; Wed, 3 May 2023 00:29:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9yWm6RDlz3nWp; Wed, 3 May 2023 00:29:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C/TSHjB2I6mqy/JUubElbBSa8+797ZCyywPhzeIKnVI=; b=yhecbUEOtClNSagV/76UNqxcmx8UUo7TJG6NnjPNqi3E0y4QMq1AAED7hquQmc6l+jbNLN w8Yq2LG2SDhMYR3XqfWStAyhbKX6NnFKgMVNUS6vacJjFKwa62idRS5ShjzLBqD46L25Ct 9r9xTbZyO3cHecmttmGhJfCGHM/FpkGZkCeY2KuIG5qWdHUQZtZFYqSo5Qo/GJVrPubLIk kcB9KQvT4iam6UsydQ3l32B5UeSh5yjQZAqBMpTLcP9zvBS6NJOm4XzVqmA7wgXtXRTCQf 0ejJhT3XcTH8ShgOSAX213JjahYpYBYGgq++fqGrqhydD9Cn25Fb9FMGGqjKfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C/TSHjB2I6mqy/JUubElbBSa8+797ZCyywPhzeIKnVI=; b=JrUdkgp+/c3kdtm3iCm7Sk6mhKZjDy2OP8RW5WXv4YZFnnV2BSN8QDFiqV+geC6OEFHFyx hyLX2L34KEuP+C/ADEXNTBl89G0X1EHOTY2oXoYmyDlpHBc2WZq2UKzDipfsUK021B0MZo VHaUJ5kUxSTR5kaSF0z5mXfMlAeisXxtBJ9Y8UP5CqXwPsgDiAuWk7s8gj6rDbls1JRfyg E2VhfK6uvbSX1EztaHtkPn1VDIs2hUNb2JGnQMb1cVlD0OBeSSOrfbEQce90sc5jD6hzrs XKsdKi67dUV/U6EILJ/6lE9zMtFmMyU4N3XL80spHvrpc1DJiu14X0pXVkqW9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073796; a=rsa-sha256; cv=none; b=hB6snqABQtvZUjC+hu4H+A7rX+fzjDgDRuzgUTGR5fMq04D1hlfol8eBCtdXQzbhKL+3IF Tyiv4yye7n4gf+n+JekbnpWr/xVgukJGPd/Z21yCzGx2BF/rdmdES4lE+gHf/4psT/cF8+ JlthW/S8az4uPgodezn2Y9GVwi7C7CB3jTBZVHh4EC62EyV/t/YLX+fW76EiwK6oVIFsKK 4/XC7R1RvOdvRLfa1B8mxGsoyHlJ3jMB9Go/6fTAeL0iJI7jj0Ua6Lw53GmF51NJoCsHR6 QBWzmjLFqOY1luM1haINzqN0NxNvmN5qf9u6gyOv79Nxye29xQ4pyPyprIlYIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWm5SMyz18J9; Wed, 3 May 2023 00:29:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430Tun4072335; Wed, 3 May 2023 00:29:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430TuCH072334; Wed, 3 May 2023 00:29:56 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:56 GMT Message-Id: <202305030029.3430TuCH072334@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 65413a38270f - stable/13 - net80211: Fix mismatches in array bounds. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 65413a38270f074d1d3e4562718e95050dfd8452 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=65413a38270f074d1d3e4562718e95050dfd8452 commit 65413a38270f074d1d3e4562718e95050dfd8452 Author: John Baldwin AuthorDate: 2022-12-07 20:31:53 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:21:13 +0000 net80211: Fix mismatches in array bounds. Reported by: GCC -Warray-parameter Reviewed by: imp, emaste (earlier version) Differential Revision: https://reviews.freebsd.org/D37546 (cherry picked from commit 1f078120955947c85c54a8c088782ea5e4451eb5) --- sys/net80211/ieee80211_node.h | 2 +- sys/net80211/ieee80211_proto.h | 4 ++-- sys/net80211/ieee80211_scan.c | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sys/net80211/ieee80211_node.h b/sys/net80211/ieee80211_node.h index 0e885440687c..5782d513de08 100644 --- a/sys/net80211/ieee80211_node.h +++ b/sys/net80211/ieee80211_node.h @@ -435,7 +435,7 @@ struct ieee80211_node * ieee80211_find_rxnode_withkey_debug( const struct ieee80211_frame_min *, uint16_t keyix, const char *func, int line); struct ieee80211_node *ieee80211_find_txnode_debug(struct ieee80211vap *, - const uint8_t *, + const uint8_t macaddr[IEEE80211_ADDR_LEN], const char *func, int line); #define ieee80211_free_node(ni) \ ieee80211_free_node_debug(ni, __func__, __LINE__) diff --git a/sys/net80211/ieee80211_proto.h b/sys/net80211/ieee80211_proto.h index 4b324caa694b..e9b5157716d4 100644 --- a/sys/net80211/ieee80211_proto.h +++ b/sys/net80211/ieee80211_proto.h @@ -459,8 +459,8 @@ void ieee80211_notify_cac(struct ieee80211com *, enum ieee80211_notify_cac_event); void ieee80211_notify_node_deauth(struct ieee80211_node *); void ieee80211_notify_node_auth(struct ieee80211_node *); -void ieee80211_notify_country(struct ieee80211vap *, const uint8_t [], - const uint8_t cc[2]); +void ieee80211_notify_country(struct ieee80211vap *, + const uint8_t [IEEE80211_ADDR_LEN], const uint8_t cc[2]); void ieee80211_notify_radio(struct ieee80211com *, int); void ieee80211_notify_ifnet_change(struct ieee80211vap *); #endif /* _NET80211_IEEE80211_PROTO_H_ */ diff --git a/sys/net80211/ieee80211_scan.c b/sys/net80211/ieee80211_scan.c index 1e07aacfc201..50b3151063fa 100644 --- a/sys/net80211/ieee80211_scan.c +++ b/sys/net80211/ieee80211_scan.c @@ -607,7 +607,8 @@ ieee80211_scan_timeout(struct ieee80211com *ic) * Mark a scan cache entry after a successful associate. */ void -ieee80211_scan_assoc_success(struct ieee80211vap *vap, const uint8_t mac[]) +ieee80211_scan_assoc_success(struct ieee80211vap *vap, + const uint8_t mac[IEEE80211_ADDR_LEN]) { struct ieee80211_scan_state *ss = vap->iv_ic->ic_scan; @@ -623,7 +624,7 @@ ieee80211_scan_assoc_success(struct ieee80211vap *vap, const uint8_t mac[]) */ void ieee80211_scan_assoc_fail(struct ieee80211vap *vap, - const uint8_t mac[], int reason) + const uint8_t mac[IEEE80211_ADDR_LEN], int reason) { struct ieee80211_scan_state *ss = vap->iv_ic->ic_scan; From nobody Wed May 3 00:29:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWp17TRz48NT6; Wed, 3 May 2023 00:29: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 4Q9yWp09rsz3nX7; Wed, 3 May 2023 00:29:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1DVhakeYBqzUbKYD4ziig62VqqSJi8JglmPO2lrwukY=; b=Y42wWhtQjhRErWPVKQUoyFt1NkbwHgQNHBnWaWnuH8XTTSZTCorloH9Tgmtyt6oNwBu84U eQdz4RQoIKGeLQE+oKw/nLF4i0s+cZ7G9D2kozMH+Wi7qBANdFMrjbhJBNbJuqmyYkgASm QhbbiJEO++5Xkp+N7ZlZZn/F4OO7dkZDNd9mkHHnr32AQFTug8kImO9Oa3Q8VR18HP/lFZ 9YWkW3dNWpY8Q82nYTKSjQDLdrpu+9pwTECJOnY1+zzsrsHpx0ddTMYJ2fV4Ad2QebnED+ wLYOc8A7RHRIrEjzpUmmQwHDNZ8uFqJq+aMXG6MAXo6M7m5I+6QvMTa/ZgodGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1DVhakeYBqzUbKYD4ziig62VqqSJi8JglmPO2lrwukY=; b=N/pE8/O2/A2OMfVVVEQYP19VgZjMnh2YLj2IsnUDehKnCZM8jrcT5ewfNua/eFv7gjoZQD Y83QxSD+0c1UWnaOoINzgJvT1fkVHXFYYB26tGWjkg4nMsndFZBeWVS5TXVCz/WaOxOX8t gQ9GkG8RbGjYRG2/Q1jL87RvCr6Ohh8Z3HJLguNdbF9KMFEVyU11U5WCjDq42tSyLM26DX gtK3Ve7SaQ+6jpJVeI+DYWXhVwhrE+4MfiSyBd5Ms6nULwMB1J5z+e35vOeeeLiRZ88oYg Gm3AIcNRzPiXWr6MEqxyrdw/nCv1fvyypmgx0TLU/Yq6ex+Un+71L5+YEKkhuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073798; a=rsa-sha256; cv=none; b=cZhKnx7BD7jaNDDCGzPClmGbf+4icuhDx0W7U8OFOA5eJwFUGOLfyjx7DFmAAG6/wlDldN J63sZJB6hhkSzkUoqbnqSrj3O72s1MWNKtINrtsONgMiiEtxWnvAvAQvmDBmrjP1avkJDB r3zWpK/3DJbbrbcZHOHiq95Z6Yl2R9hdNh8819MZXDOedOKgtyevADZHUni5paROEky3Zp t3/WhYRQRcccAkXm9sD9zUTkcNV8S4px1JMi4NTM6NPPkCxzJpA5PSweilzindynsT1cwD QlXaKc7+DUbGdb+uVMX7SHfKB1OI/3IMDnnIfScnc3qP8k+ePr202fq3S9NnsA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWn6K3gz182f; Wed, 3 May 2023 00:29:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430TviH072355; Wed, 3 May 2023 00:29:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430Tv68072354; Wed, 3 May 2023 00:29:57 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:57 GMT Message-Id: <202305030029.3430Tv68072354@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: da0afdcc61e2 - stable/13 - mlx5: Fix mismatch in array bounds. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: da0afdcc61e2e020db40fcfc103c3f633fe7d393 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=da0afdcc61e2e020db40fcfc103c3f633fe7d393 commit da0afdcc61e2e020db40fcfc103c3f633fe7d393 Author: John Baldwin AuthorDate: 2022-12-07 20:32:54 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:22:29 +0000 mlx5: Fix mismatch in array bounds. Reported by: GCC -Warray-parameter Reviewed by: hselasky, imp, emaste (earlier version) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D37549 (cherry picked from commit 47cc457bd6c16352b47d3fb1288f745482a082af) --- sys/dev/mlx5/vport.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/mlx5/vport.h b/sys/dev/mlx5/vport.h index c8eabd1051d4..844ae92602cd 100644 --- a/sys/dev/mlx5/vport.h +++ b/sys/dev/mlx5/vport.h @@ -84,7 +84,7 @@ int mlx5_modify_nic_vport_promisc(struct mlx5_core_dev *mdev, int mlx5_query_nic_vport_mac_address(struct mlx5_core_dev *mdev, u16 vport, u8 *addr); int mlx5_modify_nic_vport_mac_address(struct mlx5_core_dev *dev, - u16 vport, u8 mac[ETH_ALEN]); + u16 vport, u8 *addr); int mlx5_set_nic_vport_current_mac(struct mlx5_core_dev *mdev, int vport, bool other_vport, u8 *addr); int mlx5_query_nic_vport_min_inline(struct mlx5_core_dev *mdev, From nobody Wed May 3 00:29:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWq2Jg8z48NXL; Wed, 3 May 2023 00:29: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 4Q9yWq1PxNz3ngZ; Wed, 3 May 2023 00:29:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QpAkV+Zf2fF/CCyw18V/acjBlhjxJzyZkEWhyx+2hWk=; b=jncBUe1+C17Fphd4LHNftI3hQRHBwn/91IskCG07UwLxZUQhCHQ3beCVIE6I6croO7wf29 dYlI9VD/YVUUEHD0P5erVkgXlJFYeqrAKR3nZYroczdjVjU1lynSsMKCJIaFMZ6maqXRp8 dDkVZlMCCPGwfoaUColWatLaLXraJF2qKmFStFec24v/KOsSGtEKs804yR8/POk47y/dNz Gz+59BJeBxg35zQv+y9WsdkiOKYhiDFV7sNpaHarcPU5kA8jHIJtdNQxGyjc5RpB7HrS1f q9/bAPhoj38hwtWZsw8NJcC6oUufQszIKFzGaZ7pms7pKj+e3WZ0E7w7CIU4pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QpAkV+Zf2fF/CCyw18V/acjBlhjxJzyZkEWhyx+2hWk=; b=uktvvsFdmI7yRwwz52fGYAOBzvYiWk46N53gUU9BeXaCUBJFnxmcnZZoE5MP83jFFc1ol0 3Bu9wjCszyiAxe9tOHP2TGz0hf1JPFocoyfRROdCjiFh2tjvkdXnEGhduRlOxCcLRSG11s ZdJRVDLONVhWkjZldyNsdH3Hex24b8hXY5FBQ/8O6JWw86N/yiHoKajUe9fjKhZTWI6KSB sGcUpuauFgVP4CaLVMNY65+WvxCOkfW9zMXprM2GUlnXpADnr1E4AdUh5Y1xCR/ouGdIIA aOlcqB8u60Xwx9123Nvg1uqss0whX7PqQdzo9u9ObEbBfCPZDPu8WGy9UBaMmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073799; a=rsa-sha256; cv=none; b=shVhiWw/iXnfIS6aWWFBm4YM2bI1186TMNp039+XsCpVSN5Ke4fCueddtABfn8FYODqo1R PUAyurxc1eTd1UZSu3C3S+TBg6nv2Yydns0Go8MbhoOlZ81dOV8FcgTCA3EWQQd/UhTEL7 mltH/+x/2enQyFqzHjM7BD3YjIzPCR1UsPUR2d8BQXi2Ajl4sXp7zgPalO4bxntHdVUlEz LHajqAX2hWOLo8r6C1LT9GXvv5lRI8/NJe5mkL5FZv+6uaiT3QShavImrDyITGnW57Hsgx qmO9J/Djbez/USCyvBgI73nePHyi4Q3+mGmxEx+1Vhl6Zl+LlzNGMz34EmctMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWq0SCBz189L; Wed, 3 May 2023 00:29:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430Tw98072374; Wed, 3 May 2023 00:29:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430Twv4072373; Wed, 3 May 2023 00:29:58 GMT (envelope-from git) Date: Wed, 3 May 2023 00:29:58 GMT Message-Id: <202305030029.3430Twv4072373@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 22cb9d3f17c4 - stable/13 - aesni: Remove misleading array bounds for aesni_decryt_ecb. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 22cb9d3f17c4706573ba847599faaa66b2a5f247 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=22cb9d3f17c4706573ba847599faaa66b2a5f247 commit 22cb9d3f17c4706573ba847599faaa66b2a5f247 Author: John Baldwin AuthorDate: 2022-12-07 20:32:19 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:22:55 +0000 aesni: Remove misleading array bounds for aesni_decryt_ecb. All the other functions used pointers for from/to instead of fixed-size array parameters. More importantly, this function can accept pointers to buffers of multiple blocks, not just a single block. Reported by: GCC -Warray-parameter Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D37547 (cherry picked from commit d256a06fe8bda8120a3e22434c53fdef076001d3) --- sys/crypto/aesni/aesni_wrap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/crypto/aesni/aesni_wrap.c b/sys/crypto/aesni/aesni_wrap.c index 4d2a45b7e4c4..cca69d3d5c96 100644 --- a/sys/crypto/aesni/aesni_wrap.c +++ b/sys/crypto/aesni/aesni_wrap.c @@ -147,7 +147,7 @@ aesni_encrypt_ecb(int rounds, const void *key_schedule, size_t len, void aesni_decrypt_ecb(int rounds, const void *key_schedule, size_t len, - const uint8_t from[AES_BLOCK_LEN], uint8_t to[AES_BLOCK_LEN]) + const uint8_t *from, uint8_t *to) { __m128i tot; __m128i tout[8]; From nobody Wed May 3 00:30:00 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWr2trXz48Nhm; Wed, 3 May 2023 00:30: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 4Q9yWr2N6Zz3nPw; Wed, 3 May 2023 00:30:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xa1TnHUWs2vZLhCgtrZd0kMqLAxgktnVo9UmOaNo7t8=; b=u1aSGHUbdVON3HrPZvhvJj0UYSRcoN0NM5a5Pjl87MMWKEEtAKW3TcpukYnZiYzh8fWr9i VDKvupQ3nxakhDB+8hvumE1KHaj+fjW4IuRmh5wYsY9UjeQgYqiWfF3rUS96/dYrEnFCnR B1bdI21h+ZI7SDrKbzgo/NTBKkv8LuxtWtnFWa34P+IqQZAI0G3AenWTlfz4fIqDTOTCEl 5DTJEE9Y1xl4HU1b1xdxio0fJzusI7lRZsrqMBTsR9X1tq4kGKjySEK07I9ZyWlziZO6QK sQiAjrc11ce4DLWcL9knrNZRXCAqfId7b3GFoq3aZi63EJFyRkOL+taquTy0CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xa1TnHUWs2vZLhCgtrZd0kMqLAxgktnVo9UmOaNo7t8=; b=Di/jQuJTPVVE54iqXx0DVeGoB79T7OVwrQvyAncXQIeaI3nUBh5+RRnHeF4wtdTE6LzscQ A6E2fq+Yym6yaSCUuHwJvzCGYBQilAQRNiaZj3l19g2GCGsNH3mgr3TbRdLlhUub5NjMOI 702VBruk0TS5MXxRhNtY6F/pYgCYx4Jsf/RQtHrybnxAkZu0ObNbeJU41LV1u0oWuf/dAg Symnk3IlLM7zvabq34uCiEKn2OG+9vz/45F6IUVpauXu5MuINLcLIWajpjlySPNsybs9y0 mrjNISu+bdfv56dGum3f8ZonKNSSmNBaAVT5MsV5UTr9C/ZK1KdQoDSnh0Q6Sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073800; a=rsa-sha256; cv=none; b=txwOB51CG6s+VEYof69HFYo/0UJmHychnFs9ntk9A2qKHsE7Xquaeq9uv9+h9UNMrBumNl 2GxwCIm4ENr6Vx5yIxi9TDD9aXCzlz9masIWpJd3JVylTU8FhEITMcRijStWfPQL5aMrkG cwW3ddRqxzG4LV090ochaTBZj63mpQ8fV65U/S/QYv1lN91UEs3HHgQ3/hWv6WXHzV8Yjt r/5OMpX+BB9lhFICYWkK0aMuTQFYRoVXfU0kCrgArCWKQqysAGE2xYP1+os9JcUx5nFwj/ ds0zMlippleOCUkIWkfvifSPGi4B4872Xa7g8lwKOECseKDp26wE6W0k9WZjNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWr1RLKz18LK; Wed, 3 May 2023 00:30:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430U0lU072403; Wed, 3 May 2023 00:30:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430U0pY072402; Wed, 3 May 2023 00:30:00 GMT (envelope-from git) Date: Wed, 3 May 2023 00:30:00 GMT Message-Id: <202305030030.3430U0pY072402@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: afc2b44c748d - stable/13 - ipfilter: Fix mismatch in array bounds. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: afc2b44c748df289b1f030a85cea0ec54f13be76 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=afc2b44c748df289b1f030a85cea0ec54f13be76 commit afc2b44c748df289b1f030a85cea0ec54f13be76 Author: John Baldwin AuthorDate: 2022-12-07 20:32:38 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:23:27 +0000 ipfilter: Fix mismatch in array bounds. Reported by: GCC -Warray-parameter Reviewed by: imp, cy, emaste Differential Revision: https://reviews.freebsd.org/D37548 (cherry picked from commit 415ccf51122eab7b55978a1db00b484a06ffc84b) --- sys/netpfil/ipfilter/netinet/radix_ipf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/ipfilter/netinet/radix_ipf.c b/sys/netpfil/ipfilter/netinet/radix_ipf.c index 0ab4431c21ca..5db7f761ac06 100644 --- a/sys/netpfil/ipfilter/netinet/radix_ipf.c +++ b/sys/netpfil/ipfilter/netinet/radix_ipf.c @@ -318,7 +318,7 @@ ipf_rx_attach_mask(ipf_rdx_node_t *node, ipf_rdx_mask_t *mask) /* by the netmask. */ /* ------------------------------------------------------------------------ */ static ipf_rdx_node_t * -ipf_rx_insert(ipf_rdx_head_t *head, ipf_rdx_node_t *nodes, int *dup) +ipf_rx_insert(ipf_rdx_head_t *head, ipf_rdx_node_t nodes[2], int *dup) { ipf_rdx_mask_t **pmask; ipf_rdx_node_t *node; From nobody Wed May 3 00:30:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWs649Bz48NYx; Wed, 3 May 2023 00:30: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 4Q9yWs38Qtz3nlr; Wed, 3 May 2023 00:30:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j580rw/oJMzyneQhO28EvEwdYRyRxJgXkEAbh5w35A8=; b=Mi/vEdnHJSMFE9rudrWC46qmEt3I3l5n4Cclt1CXu06ijhUNzhfsunABqFxdCbcOIKE4FX vzhBLWjroXwoVRKszaqq7nmUZCKWsj4f8v+jLk31V68Y1UOswhirHSjwmbl+0gcYgUFuXJ OGC9jly6TYHsOCyZqFSPVywYlGTFSefqj+8gQsh/efkjUaB7leZhM07hLA9PuEaHR8lKTM VN0v8NjWrRJSrwdUIQStOpIlJHoRN/MBAFGCUelLPvtxEDqWjUpTzxLotHb3N1HwwKDYdH +gLftmINTTS6/KUazE0nsRjQdxMCB0MlnX+e2aDR73QSmJNw6wiJWYnUYXvStQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j580rw/oJMzyneQhO28EvEwdYRyRxJgXkEAbh5w35A8=; b=t5/Kv2Ve7S0z3VgozlTXUsMx0QveftRctoulmHK48TjuCztQmP1R6syAHuK/oeQq1QAxsc mYhCxt37YiMy5O+kmIGn6j5R2mA+PctRmHupu6GykLXkIRj7lhDvnR/nnzw+2l3G2oWwIV wzW+YA6U13ojXPpcdxUZo2nkiVpzRyZPfK7RM4D+DsIKOFMRY0I0S/RQ60K5z+lQ0MNb6b XUGNrBUXOC4ES9DBJrQHwpMQWPEOQLHUb8cL/KfpwhE1h2sZkNt8nhFOzMA2Ve6eW6EJJ2 oah/gFylLpuD0Oh0ig26GSCDw1Tuh1su/eUq22C3qmu7RaBxN9Crchk2R6QF7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073801; a=rsa-sha256; cv=none; b=xDyKecinhDBwoGKeiigyfUUFJ63uIyTh/ojqCmIe8Q+NBO/oAAL9a3F+YXXrmHZFSVFQlV sZzkiTryYQmq7bO0UxiRyehl49e7QEbSHEPGcaAA1oxC/vW2sjsYsUmUheOUGFdxVqa8G4 /esVxGN7hCtl2KDzkKnV7NGZOIFv5Qi29m1uxeQ0/i97I8JH9jc7Z6l18wtEaZ00Mk8KCz 2mVbG1UhGaFjlaU4F2OWZA1K3sg+GR9hno2Vqdz/VBFSZr2m+kH5tVIsERIexXSNRR30p4 uWVbqQah3aTtk1Xp2y8d4eGRs1XfmhiD7yv7kQUoRHstD+YQMRsPa3wVZlNxVA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWs1y6Bz182h; Wed, 3 May 2023 00:30:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430U1VA074163; Wed, 3 May 2023 00:30:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430U1QW074161; Wed, 3 May 2023 00:30:01 GMT (envelope-from git) Date: Wed, 3 May 2023 00:30:01 GMT Message-Id: <202305030030.3430U1QW074161@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 1ef1b088c8c8 - stable/13 - rtwn: Fix mismatches in array bounds. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1ef1b088c8c8b3809e8ba808781f77c7258e6936 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1ef1b088c8c8b3809e8ba808781f77c7258e6936 commit 1ef1b088c8c8b3809e8ba808781f77c7258e6936 Author: John Baldwin AuthorDate: 2022-12-07 20:33:21 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:24:05 +0000 rtwn: Fix mismatches in array bounds. Reported by: GCC -Warray-parameter Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D37550 (cherry picked from commit 8bc615f5919f027cdf09825764276ab41a38375e) --- sys/dev/rtwn/rtl8188e/r88e.h | 4 +++- sys/dev/rtwn/rtl8192c/r92c.h | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/dev/rtwn/rtl8188e/r88e.h b/sys/dev/rtwn/rtl8188e/r88e.h index b6cd6053d015..cbf1161f7078 100644 --- a/sys/dev/rtwn/rtl8188e/r88e.h +++ b/sys/dev/rtwn/rtl8188e/r88e.h @@ -21,6 +21,8 @@ #ifndef RTL8188E_H #define RTL8188E_H +#include + /* * Global definitions. */ @@ -46,7 +48,7 @@ uint8_t r88e_temp_read(struct rtwn_softc *); /* r88e_chan.c */ void r88e_get_txpower(struct rtwn_softc *, int, - struct ieee80211_channel *, uint8_t[]); + struct ieee80211_channel *, uint8_t[RTWN_RIDX_COUNT]); void r88e_set_bw20(struct rtwn_softc *, uint8_t); void r88e_set_gain(struct rtwn_softc *, uint8_t); diff --git a/sys/dev/rtwn/rtl8192c/r92c.h b/sys/dev/rtwn/rtl8192c/r92c.h index 4d4307c786a4..925ce7a0adb4 100644 --- a/sys/dev/rtwn/rtl8192c/r92c.h +++ b/sys/dev/rtwn/rtl8192c/r92c.h @@ -21,6 +21,8 @@ #ifndef RTL8192C_H #define RTL8192C_H +#include + /* * Global definitions. */ @@ -54,9 +56,9 @@ uint8_t r92c_temp_read(struct rtwn_softc *); /* r92c_chan.c */ void r92c_get_txpower(struct rtwn_softc *, int, - struct ieee80211_channel *, uint8_t[]); + struct ieee80211_channel *, uint8_t[RTWN_RIDX_COUNT]); void r92c_write_txpower(struct rtwn_softc *, int, - uint8_t power[]); + uint8_t power[RTWN_RIDX_COUNT]); void r92c_set_bw20(struct rtwn_softc *, uint8_t); void r92c_set_chan(struct rtwn_softc *, struct ieee80211_channel *); void r92c_set_gain(struct rtwn_softc *, uint8_t); From nobody Wed May 3 00:30:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWt4X5nz48NZ0; Wed, 3 May 2023 00:30:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9yWt3C8Tz3nfJ; Wed, 3 May 2023 00:30:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QIfwUL3NX6SNDJX9lLzffiyl1m6QCExVyQd1ojBcLnU=; b=ZtmIo3tUJuvzxuNtBuCA41qm27gJ/1jVJ4EdeRBlrw6WsItNqFnSBkzq41nPac+LdcJrVQ h5omAzIkA7LWY5Zy3f/04yBM4EI2miifpZWY0s9YhchtpXcdVqyjEzBPFRWYV0W6KAIIbd jHN9ghHP1MfKqZzHAA97ovXUU2aKOiOYv+vN9emF9xjuZB0nQQXG4YaMX7fibo3KeAQinE fGLkuuHBmjUcF5GMzs/eiTAALdjZPaBKzSIydrHmtOTF2EtPDEaKzusIGWSeo5M7Sdk52T VUWEzZSrt+U6VN0r3hCI+Do/OvNo2eN+CQ+grced/0UHk0uDQlLWeU10bQyg9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073802; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QIfwUL3NX6SNDJX9lLzffiyl1m6QCExVyQd1ojBcLnU=; b=jAE3wyEbLu6f+iZayMFsNQop9UHm5z5KL6alfGR7VhJNxzVk3LcFQueS/WU+ZP58AZZfvI 7YtMdPWmYL78pTaWDYNyS+0m6AMAQqjxwlobRJ193eu/fEL7Fm8s0jWbyMBNBhxyUGJN1j 6wDDTdapADiFGzWAx50shscELGWGolzLck0YUbHo+KsvuOpPXsD2hw+QXSRxguQRLFX6Cn yzB8vRx20Y2I/JrODHoB9drIrSgWwd5n8ixFoA2ijZbe4XAkE9U3W4e1f07J3pV7HZJgp9 ZC5nzxwR6gGXVR29g3oJ5o/gNHF7jcI4FuE1iZVc7Vcg+fUS6pqO0iG2WFxFlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073802; a=rsa-sha256; cv=none; b=WxFLI1KIeaWMskzjQW1g12wUuF2q73zxIF34YGyr2lPpS/eMEb+kqavhmvOoGCCrTbtKP6 H0JyBAsT6ObO/8lT32l2y5gndJAtpU+3b9qzbhfCNK8R10qLQIzfRX3tNRjY7UbrF2od6b 8DQaOHYYox89vs6lEZUz2Vk1OK3jiDvPYZsFKVv5qifZebdPqRbEbaP7a8QBbn34Y0hmYm tzB4vu1pUgCOxqpGCWEogZ9sIWVP4SWmwgICgznrZYztohukIxe8X8LveykK2yx3odXJt0 RJPyN0Q9BQes5JcIhaNrMj0O6VPcznaCqov1VmRS/j/PWo03lyTupQ5S73n+iQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWt2HPyz18X0; Wed, 3 May 2023 00:30:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430U2gc074426; Wed, 3 May 2023 00:30:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430U2lJ074424; Wed, 3 May 2023 00:30:02 GMT (envelope-from git) Date: Wed, 3 May 2023 00:30:02 GMT Message-Id: <202305030030.3430U2lJ074424@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: e2b66bdb6874 - stable/13 - if_rsu: Fix mismatches in array bounds. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e2b66bdb6874604b8045e31817bb9a4009a25a89 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e2b66bdb6874604b8045e31817bb9a4009a25a89 commit e2b66bdb6874604b8045e31817bb9a4009a25a89 Author: John Baldwin AuthorDate: 2022-12-07 20:33:41 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:24:47 +0000 if_rsu: Fix mismatches in array bounds. Reported by: GCC -Warray-parameter Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D37551 (cherry picked from commit 183783d34a6b453137f39eac8a7b42b338c9af60) --- sys/dev/usb/wlan/if_rsu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/dev/usb/wlan/if_rsu.c b/sys/dev/usb/wlan/if_rsu.c index 747e3532cde4..a3a28b0c4cde 100644 --- a/sys/dev/usb/wlan/if_rsu.c +++ b/sys/dev/usb/wlan/if_rsu.c @@ -163,9 +163,10 @@ static usb_callback_t rsu_bulk_rx_callback; static usb_error_t rsu_do_request(struct rsu_softc *, struct usb_device_request *, void *); static struct ieee80211vap * - rsu_vap_create(struct ieee80211com *, const char name[], - int, enum ieee80211_opmode, int, const uint8_t bssid[], - const uint8_t mac[]); + rsu_vap_create(struct ieee80211com *, const char name[IFNAMSIZ], + int, enum ieee80211_opmode, int, + const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t mac[IEEE80211_ADDR_LEN]); static void rsu_vap_delete(struct ieee80211vap *); static void rsu_scan_start(struct ieee80211com *); static void rsu_scan_end(struct ieee80211com *); From nobody Wed May 3 00:30:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWv4k79z48NcJ; Wed, 3 May 2023 00:30: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 4Q9yWv3vcQz3nqJ; Wed, 3 May 2023 00:30:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4GBSMAvPBMHdy/APSNYRuOPuyWuxGlvkrKGzhpiRCsE=; b=w/h+3FZyXHe9+4vnqaiaphB4JtksM3oeE7WnpvvJtnSswA7P/oMNCJ5q6HFOFE33j7PqQm blLLRH8aqWqz9fjFHIl5NKl1WZuSv0/We8yxSjiBOuGWWB2Ncze80IDCKcDNyGRPTuf2eZ UQwK21vVOmof4f0I4OFlKz05Nwwb50D3KxDkUA4TlKNQWGyUdXjO8SG8j4mYCDpW8amkb/ t9zPALesu4/P/8jEVi+VNMNkONUYmx1q8AiiaYVzN5OZbtLBpcHxNK0KcZl/Ou2j4hB6fB OrM/hprHVd01e5D0qrTbZiczFW8SeONQWY/qDRl+1o5evpShTaMWF05rp5Yfww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4GBSMAvPBMHdy/APSNYRuOPuyWuxGlvkrKGzhpiRCsE=; b=U8WveOX640yS4ikoRCP+wcZw8bEYIAzQn+cBZz8uUYXaTPfrQlOpLiDMN04iLM+v/V2kMi Qp9CoFfew9r3OjXH2JrRK05QYPAJQSmLYRkH1BjmPJ1sdHK8XvwlUhgWj12vNKiqa1EsNW g6LrM+NNMgLbs1uTpjuiZ3kFEMQaIudr/fCQb0Sivoi/5XHlJ0s2wpHkzBzedrdOC7iPuX Iztce4GL/pSGbtlo29CLJrCIEe1pM8WjQmbQeQoQ/6mAzMNUxX1DD71uPBg7KvhoUHxg2s XUP64Aec6UC06aVZO7GG01Z36i2gPk490rI/PteG12RsCf04pa+3WQZFPS6iTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073803; a=rsa-sha256; cv=none; b=k6MuQ4wbL3Gm+kQLX6qAuRyf0Xjb3L7968BnuUiW/dSByODZc49UHYbKt0Doz8Z0ABNRFD NZ42XmdTd83xImsZl0n6EVgoqllkeGFO4pa32qNDkyE6zaq1glDqsMN1mf2VIrCm2anVRR 84d3BAeIASvKiaxaE3ERkK4z210CpArVd9uC6F0zXKH1aHqI5aXACR8vO9bQGDSlEGr6Db kQHElJCKT+7UfjERvlkfJyTgKOZHr/8VBdV9XuVPLKLQI2draKiS1fBAW0ieTWge3EDiHj KM5HEMhgpopY1jD86KO/mBU5M5KR73VkHs2GC83DMXAeJGIfySXU9KIU/oYI2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWv2yR0z18JB; Wed, 3 May 2023 00:30:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430U3wB074679; Wed, 3 May 2023 00:30:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430U3sc074677; Wed, 3 May 2023 00:30:03 GMT (envelope-from git) Date: Wed, 3 May 2023 00:30:03 GMT Message-Id: <202305030030.3430U3sc074677@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 6ddbd237cc80 - stable/13 - atp: Fix mismatch in array bounds. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6ddbd237cc8055037162ed4a0ef47779ad553b0c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6ddbd237cc8055037162ed4a0ef47779ad553b0c commit 6ddbd237cc8055037162ed4a0ef47779ad553b0c Author: John Baldwin AuthorDate: 2022-12-07 20:33:56 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:25:11 +0000 atp: Fix mismatch in array bounds. Reported by: GCC -Warray-parameter Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D37552 (cherry picked from commit 4eda35b6360762b4a256c33321a917d4b3a5d625) --- sys/dev/usb/input/atp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/input/atp.c b/sys/dev/usb/input/atp.c index 8f0c6c36626a..d16e1aae5a23 100644 --- a/sys/dev/usb/input/atp.c +++ b/sys/dev/usb/input/atp.c @@ -1635,7 +1635,8 @@ fg_update_strokes(struct atp_softc *sc, fg_pspan *pspans_x, * Return true if any movement is detected. */ static boolean_t -wsp_update_strokes(struct atp_softc *sc, wsp_finger_t *fingers, u_int n_fingers) +wsp_update_strokes(struct atp_softc *sc, wsp_finger_t fingers[WSP_MAX_FINGERS], + u_int n_fingers) { boolean_t movement = false; atp_stroke_t *strokep_next; From nobody Wed May 3 00:30:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWw5V3lz48NcM; Wed, 3 May 2023 00:30: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 4Q9yWw4mvTz3p47; Wed, 3 May 2023 00:30:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J4SN+9VwQIBDqbWLlYQB+ab2r1lgN6QBj3x2EXcbuFk=; b=GstPrKTqvnnGp+ziLz9MzQ5VtojTtN9zjNrwiWmLLBPjNabEw6lIyWCjjWmNoUz7+R4IS5 X+ETOSLH0X7eUiTOyi+WRID7ZEBRfb253BL+MgOf7gbHRsIz6vT3xlWM9v3EXA+LdTyshl QxFhRC+fpt/5ZETziXUaG/bEG8yvvyy806fT63sXxwc48T9/nZjbIoO0I0xBcz6QHViZxE vBYvxSfB6KkL+wFWreZC/BtdJyko7FzjWIx/XhghxAiVUBC1l2atC8kvB2C7A2aOc9XoxZ q4SBayiY7WSrWeRJJ8Zu3wn+sokmSfhEFF3bv05Z5w77tTnU4C9QyCSXAo08jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J4SN+9VwQIBDqbWLlYQB+ab2r1lgN6QBj3x2EXcbuFk=; b=b9G5xaxK6sgbf8X+N/4kl+lMcNp0EfrKGYtDGtUvbJsBiIaW65JpovBUutTtzNTUpneDze TXZIO2iUUtbLyNM0ueAGNMvQANqtJ134PT8mSuRgft6fXkl2twiE9TmkhBomtCOvr6lLan BD6PB14BXgeLagMJrxmCHgk+uB2gbIVw/+t6j9V038OU3JY0qoH316uz/Xm4k4OFZHaiHa fySY/E0efvgshX7z+4MRHc0iES2CCACfA98MdNU6ZOjhLcY0lObZ4IBL+iyV0lLJJwIxti yz3iex+QgIa+SEMSAcUHIFvCjq37l5MXe6pxhBmG9W5J310hCPPuSqiVVhXUxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073804; a=rsa-sha256; cv=none; b=EXvOjii5+6M4qii9d5wMqGjXql0JKtOlRU1ll3XmWv5Gaw39rIj1mtZa7oP2+0PJZ5uwBp Yu000ijMb1vl6i7LY0hOkk3xTzPdylH4v1l/UoCjNkNLTl/h/tMo4oW9I1zfR+Vcdg5jZL IRotiImFQPupxYao0tdI5DWyFPiJNlBYyiQnt0FPOnFs4ErAKiRVSdgTWWktrK02YRzbny GWnCFH+4etVQDu1lDgrN0x2ZV14/humGPQqpGnX65bGTShrST+b8ek3+gGPUKKGdx1bL1d QkmowlAP40MndD2fQT2yfAQa5seC+Kt/VdP+r7Y7FVPVquwwnPipN5JBxwJVBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWw3WyHz18X1; Wed, 3 May 2023 00:30:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430U4kp074933; Wed, 3 May 2023 00:30:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430U4Mf074930; Wed, 3 May 2023 00:30:04 GMT (envelope-from git) Date: Wed, 3 May 2023 00:30:04 GMT Message-Id: <202305030030.3430U4Mf074930@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 58b9432c405b - stable/13 - zfs: Fix build with GCC 12. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 58b9432c405b6542cf33e1b57ff87365180b4da7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=58b9432c405b6542cf33e1b57ff87365180b4da7 commit 58b9432c405b6542cf33e1b57ff87365180b4da7 Author: John Baldwin AuthorDate: 2022-12-21 18:49:23 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:25:48 +0000 zfs: Fix build with GCC 12. Silence -Winfinite-recursion for ldo.c in lua and -Wstringop-overread for nvpair.c. Reviewed by: mm Differential Revision: https://reviews.freebsd.org/D37631 (cherry picked from commit 2e08e4b75ea1080c224a33baf62199d893dc322d) --- sys/conf/files | 4 ++-- sys/conf/kern.mk | 2 ++ sys/modules/zfs/Makefile | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 5546925bccd8..7c90279a261f 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -177,7 +177,7 @@ contrib/openzfs/module/lua/lcompat.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/lua/lcorolib.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/lua/lctype.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/lua/ldebug.c optional zfs compile-with "${ZFS_C}" -contrib/openzfs/module/lua/ldo.c optional zfs compile-with "${ZFS_C}" +contrib/openzfs/module/lua/ldo.c optional zfs compile-with "${ZFS_C} ${NO_WINFINTE_RECURSION}" contrib/openzfs/module/lua/lfunc.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/lua/lgc.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/lua/llex.c optional zfs compile-with "${ZFS_C}" @@ -196,7 +196,7 @@ contrib/openzfs/module/lua/lzio.c optional zfs compile-with "${ZFS_C}" # zfs nvpair support contrib/openzfs/module/nvpair/fnvpair.c optional zfs compile-with "${ZFS_C}" -contrib/openzfs/module/nvpair/nvpair.c optional zfs compile-with "${ZFS_RPC_C}" +contrib/openzfs/module/nvpair/nvpair.c optional zfs compile-with "${ZFS_RPC_C} ${NO_WSTRINGOP_OVERREAD}" contrib/openzfs/module/nvpair/nvpair_alloc_fixed.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/nvpair/nvpair_alloc_spl.c optional zfs compile-with "${ZFS_C}" diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index d37d80793929..47f4b5c48243 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -94,6 +94,8 @@ CWARNEXTRA+= -Wno-address-of-packed-member \ CWARNEXTRA+= -Wno-error=nonnull \ -Wno-dangling-pointer \ -Wno-zero-length-bounds +NO_WINFINTE_RECURSION= -Wno-infinite-recursion +NO_WSTRINGOP_OVERREAD= -Wno-stringop-overread .endif .endif diff --git a/sys/modules/zfs/Makefile b/sys/modules/zfs/Makefile index 6321db2381d8..9259a5f7e182 100644 --- a/sys/modules/zfs/Makefile +++ b/sys/modules/zfs/Makefile @@ -292,10 +292,11 @@ CFLAGS.gcc+= -Wno-pointer-to-int-cast CFLAGS.lapi.c= -Wno-cast-qual CFLAGS.lcompat.c= -Wno-cast-qual +CFLAGS.ldo.c= ${NO_WINFINTE_RECURSION} CFLAGS.lobject.c= -Wno-cast-qual CFLAGS.ltable.c= -Wno-cast-qual CFLAGS.lvm.c= -Wno-cast-qual -CFLAGS.nvpair.c= -Wno-cast-qual -DHAVE_RPC_TYPES +CFLAGS.nvpair.c= -Wno-cast-qual -DHAVE_RPC_TYPES ${NO_WSTRINGOP_OVERREAD} CFLAGS.spl_string.c= -Wno-cast-qual CFLAGS.spl_vm.c= -Wno-cast-qual CFLAGS.spl_zlib.c= -Wno-cast-qual From nobody Wed May 3 00:30:05 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWx6VcSz48NTT; Wed, 3 May 2023 00:30: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 4Q9yWx4pDJz3p01; Wed, 3 May 2023 00:30:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5DhhBiW9/4gWFtnegYY9hj5jZG4PFyMCoRwz/BXLM4c=; b=V4aMehMaVGdpkOHWWcOY1E/Ghgjp+TPI63jo12XN5yf61fKZhP4+B0O6OVv9+TWYR1MF1B JPGZxxUhITtz6LgPz2kFpUxAtyqmnTZX5xz28zBPvBunUjo5Xyf5JxkURl3Bq8dE6jzYxR yp1lF+WWn2jC0Ttqr5tkZZGseWs64jQLwlULLHyeIN7tOJtD7jttxHUtWUa5CUgPMwAkd1 zshx3dLoiInY9erQx98OaKz2aST5tANR0Ozwcc+195dY3upEAJpetc7OqVnIZsI92DOlMO eh0E+1SR8EgTn61swp7M9btHnXJUitcPQP7RNtjrz95aohT8VM9D8DBfhOnMIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5DhhBiW9/4gWFtnegYY9hj5jZG4PFyMCoRwz/BXLM4c=; b=idy2bxHRzJRqY0p9Mw7wGU4tHo93CQAeCdJVvCAGhHD1gJuQHLIg7AWFe9bBTjyncWAxi6 1/XfdYHc1Hg7zoPQxM6O8slR8U8QUNx7hVk3m+BtnjbwI2dYCxkulsXiZ/Aj6wAz+1rYDW pqp50BMLDPQCTd+hFu8VJCytTurP+OjM4tJl9QnPL9uUKYS6q2pSydvB/kzDNsGRe5ApGk A59pyj9GVIjDJgpnq2T34FEAwuO5ugrd6MgqC/2oJiXP8cPjLHFjZjgptqeRLTYUMn/1k1 1LifW6OrPfLusjJVO9+K9maZ50q8x7jMkuDJYPtWgb7CxZhvfVg2cZYK/VgGOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073805; a=rsa-sha256; cv=none; b=Nn+Z8DzPbS5UCNYTUYKahFG4DX8ZuxLSXz/mG6FklWlVi1jfwXVH/nFWJ5l0shE9JnPGZz 8U7hgIJhTdsta339/MVfocVBXvvg+3N+FpP0Bp9qcgW/mv8osF+XGShb88CHpknxdf2KUg +24u9CPFmCcYy2O5g/49WCnpBCcrL3M6oRPhqzL68weMQ48GtQJkQNti0RwLOZcBotqMSo yjgw87bH49b4kXWgX1olpBWuo8t4DkYD187ymccVCkz3c3sOkM0h6C4/HUVhGYkAH+L1tS Qb8KHRWqgvMvAEpRexCAdTx4A0r9MOI5JPMFRkc+6TpfNSjfkQSqqRT9uo5W3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWx3wC6z182j; Wed, 3 May 2023 00:30:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430U5gh075188; Wed, 3 May 2023 00:30:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430U5qd075186; Wed, 3 May 2023 00:30:05 GMT (envelope-from git) Date: Wed, 3 May 2023 00:30:05 GMT Message-Id: <202305030030.3430U5qd075186@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: ed3d14a5b0d0 - stable/13 - Fix spelling of NO_WINFINITE_RECURSION. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ed3d14a5b0d06ef856ad66627e8c8ebce4b73830 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ed3d14a5b0d06ef856ad66627e8c8ebce4b73830 commit ed3d14a5b0d06ef856ad66627e8c8ebce4b73830 Author: John Baldwin AuthorDate: 2022-12-21 22:45:29 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:25:58 +0000 Fix spelling of NO_WINFINITE_RECURSION. Reported by: dim Fixes: 2e08e4b75ea1 zfs: Fix build with GCC 12. (cherry picked from commit 3266131908914b3a359571dae75194fe6d330c1d) --- sys/conf/files | 2 +- sys/conf/kern.mk | 2 +- sys/modules/zfs/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 7c90279a261f..928289668166 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -177,7 +177,7 @@ contrib/openzfs/module/lua/lcompat.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/lua/lcorolib.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/lua/lctype.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/lua/ldebug.c optional zfs compile-with "${ZFS_C}" -contrib/openzfs/module/lua/ldo.c optional zfs compile-with "${ZFS_C} ${NO_WINFINTE_RECURSION}" +contrib/openzfs/module/lua/ldo.c optional zfs compile-with "${ZFS_C} ${NO_WINFINITE_RECURSION}" contrib/openzfs/module/lua/lfunc.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/lua/lgc.c optional zfs compile-with "${ZFS_C}" contrib/openzfs/module/lua/llex.c optional zfs compile-with "${ZFS_C}" diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 47f4b5c48243..25c6ad8d87ac 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -94,7 +94,7 @@ CWARNEXTRA+= -Wno-address-of-packed-member \ CWARNEXTRA+= -Wno-error=nonnull \ -Wno-dangling-pointer \ -Wno-zero-length-bounds -NO_WINFINTE_RECURSION= -Wno-infinite-recursion +NO_WINFINITE_RECURSION= -Wno-infinite-recursion NO_WSTRINGOP_OVERREAD= -Wno-stringop-overread .endif .endif diff --git a/sys/modules/zfs/Makefile b/sys/modules/zfs/Makefile index 9259a5f7e182..0cfc336aacb1 100644 --- a/sys/modules/zfs/Makefile +++ b/sys/modules/zfs/Makefile @@ -292,7 +292,7 @@ CFLAGS.gcc+= -Wno-pointer-to-int-cast CFLAGS.lapi.c= -Wno-cast-qual CFLAGS.lcompat.c= -Wno-cast-qual -CFLAGS.ldo.c= ${NO_WINFINTE_RECURSION} +CFLAGS.ldo.c= ${NO_WINFINITE_RECURSION} CFLAGS.lobject.c= -Wno-cast-qual CFLAGS.ltable.c= -Wno-cast-qual CFLAGS.lvm.c= -Wno-cast-qual From nobody Wed May 3 00:30:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yWy6lTNz48NZ3; Wed, 3 May 2023 00:30: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 4Q9yWy5WCwz3p22; Wed, 3 May 2023 00:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vSWyOMz3MKm/04eWzEmdLeLXOpzDu8aFfFifN72aeGc=; b=GD0SCXYk8vmytYn7YSNFWQIBrCTbNmfesDwMWMkwXmZ97aGKUmkGVSSeX1NvbMR2V7EF9o yGo1Z4kwdpNAW07h9uPGFZR8W5O21vSSP33BYH32k3FjQBfmLIdx/Sjik+ytfNfPbuW/dm YgiDk040XxlOKwGH845Zo0wyeA+NppvCtOUEgdSoco7kha32brFypGtwmrg1EC6FTHwDfC R91sNmDGb+njXVfNkPqLRQMdTt5ovreR7ST9WCK95vaPnCXeQGCCWvMK/NSgts07mCUVUt qjGxkgSrJD60kcI59Mui9Y8iJK0qY3B+bdi0FGWsMUztOyK/oCYMZ+v/MelERQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vSWyOMz3MKm/04eWzEmdLeLXOpzDu8aFfFifN72aeGc=; b=blVRyChqFfpJLtH3yh/jY73waMUBgESFokCCCRQvMCtXkSIdNegYQr6hQEe6TPvyXyDeOx aR1ivKWMfXv0D6suB6JsdWSO4DSENuVHzvfyp8dg/zNL04JS4OMFQazkvUAu+HeTgACwaN K45a8lUJJr/QVDIWly668MMGvOP7ViOVq+JP0K5mxaJP43i6vQs9LfB0ZtvFMN+pXHAsS4 WhDz11Ufwcy8jGm6JXkUahTsDetZCe0pi4ENs6Dj5S4z9p4iIT39Y/RnOac1OXBbTW0iwz 9GwKLfuIIiopDfrH9xoApU38VB4PXG5L8fMaO7A2Y7DCJnihAH4DdYZAGm/c0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073806; a=rsa-sha256; cv=none; b=II2UBEMiVQsRnQErPoiePb/2L+v/tE3WGpT3QcfE2LkJ2Kj5bEwqpZNR8rhzmXf7FInkzc J3NxCT5eTVfmD87ixf81iAG5Z4h+2OMET9SurIwY2dgBaK39PK9zoXI+4B0QetRZ2/Mnjn 7ekU+7MH/sHA2pK6v98ehaP2QkdV+wQ6slQXyh4hibb0EMUFv6fBvwsjYRBsMTw3MQ8+DR UCt6WUUCzSSx03dy8n2rSYOeswhv4l3/f4K+5dBugVvAX/PT9CWWC85b706AhptzzFhNgS PGO3MpTunp+lmEQTrxAAPkc2ArC6rTrYLMoUfaqC42E5L7ykjLAQZ9vHQilwZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9yWy4Qlcz18Fk; Wed, 3 May 2023 00:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3430U6hN075443; Wed, 3 May 2023 00:30:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3430U61Y075441; Wed, 3 May 2023 00:30:06 GMT (envelope-from git) Date: Wed, 3 May 2023 00:30:06 GMT Message-Id: <202305030030.3430U61Y075441@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 677407f69c39 - stable/13 - sys: Retire OPENZFS_CWARNFLAGS now that it is empty. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 677407f69c39092c1113d5c3e401ad3e2446357f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=677407f69c39092c1113d5c3e401ad3e2446357f commit 677407f69c39092c1113d5c3e401ad3e2446357f Author: John Baldwin AuthorDate: 2023-03-22 19:35:30 +0000 Commit: John Baldwin CommitDate: 2023-05-03 00:28:46 +0000 sys: Retire OPENZFS_CWARNFLAGS now that it is empty. Reviewed by: markj, emaste Differential Revision: https://reviews.freebsd.org/D39217 (cherry picked from commit dddb1aec4d54ba949201f4a2e3146cfab4a5870f) --- sys/conf/kmod.mk | 1 - sys/modules/dtrace/dtaudit/Makefile | 1 - sys/modules/dtrace/dtmalloc/Makefile | 1 - sys/modules/dtrace/dtnfscl/Makefile | 1 - sys/modules/dtrace/dtrace/Makefile | 1 - sys/modules/dtrace/fasttrap/Makefile | 1 - sys/modules/dtrace/fbt/Makefile | 1 - sys/modules/dtrace/profile/Makefile | 1 - sys/modules/dtrace/prototype/Makefile | 1 - sys/modules/dtrace/sdt/Makefile | 2 +- sys/modules/dtrace/systrace/Makefile | 1 - sys/modules/dtrace/systrace_freebsd32/Makefile | 1 - sys/modules/dtrace/systrace_linux/Makefile | 1 - sys/modules/dtrace/systrace_linux32/Makefile | 1 - sys/modules/opensolaris/Makefile | 1 - sys/modules/zfs/Makefile | 2 -- 16 files changed, 1 insertion(+), 17 deletions(-) diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index a952e3190dec..a06f6a2555d9 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -550,7 +550,6 @@ OPENZFS_CFLAGS= \ -I${SYSDIR}/cddl/compat/opensolaris \ -I${SYSDIR}/cddl/contrib/opensolaris/uts/common \ -include ${ZINCDIR}/os/freebsd/spl/sys/ccompile.h -OPENZFS_CWARNFLAGS= .include .include diff --git a/sys/modules/dtrace/dtaudit/Makefile b/sys/modules/dtrace/dtaudit/Makefile index 3571bcbb7ea2..72cdf03f4bc3 100644 --- a/sys/modules/dtrace/dtaudit/Makefile +++ b/sys/modules/dtrace/dtaudit/Makefile @@ -13,4 +13,3 @@ CFLAGS+= ${OPENZFS_CFLAGS} .include CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h -CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/dtmalloc/Makefile b/sys/modules/dtrace/dtmalloc/Makefile index ffde4f811ee8..910f8f360e80 100644 --- a/sys/modules/dtrace/dtmalloc/Makefile +++ b/sys/modules/dtrace/dtmalloc/Makefile @@ -13,4 +13,3 @@ CFLAGS+= ${OPENZFS_CFLAGS} .include CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h -CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/dtnfscl/Makefile b/sys/modules/dtrace/dtnfscl/Makefile index d28641e51ec8..6184ad183fc6 100644 --- a/sys/modules/dtrace/dtnfscl/Makefile +++ b/sys/modules/dtrace/dtnfscl/Makefile @@ -13,4 +13,3 @@ CFLAGS+= ${OPENZFS_CFLAGS} .include CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h -CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/dtrace/Makefile b/sys/modules/dtrace/dtrace/Makefile index 712e10331a38..0bd81bb39db0 100644 --- a/sys/modules/dtrace/dtrace/Makefile +++ b/sys/modules/dtrace/dtrace/Makefile @@ -57,7 +57,6 @@ dtrace_asm.o: assym.inc CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h CFLAGS.dtrace_asm.S+= -D_SYS_ERRNO_H_ -D_SYS_PARAM_H_ -DLOCORE -CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} CWARNFLAGS+= -Wno-parentheses CWARNFLAGS+= -Wno-cast-qual CWARNFLAGS+= -Wno-unused diff --git a/sys/modules/dtrace/fasttrap/Makefile b/sys/modules/dtrace/fasttrap/Makefile index 0eecfcb11aab..1be1b97736ea 100644 --- a/sys/modules/dtrace/fasttrap/Makefile +++ b/sys/modules/dtrace/fasttrap/Makefile @@ -26,6 +26,5 @@ SRCS+= u8_textprep.c CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h -CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} CWARNFLAGS+= -Wno-cast-qual CWARNFLAGS+= -Wno-unused diff --git a/sys/modules/dtrace/fbt/Makefile b/sys/modules/dtrace/fbt/Makefile index 360d92000776..288c8cafa817 100644 --- a/sys/modules/dtrace/fbt/Makefile +++ b/sys/modules/dtrace/fbt/Makefile @@ -23,4 +23,3 @@ CFLAGS+= -I${SYSDIR}/cddl/dev/fbt .include CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h -CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/profile/Makefile b/sys/modules/dtrace/profile/Makefile index b3eec9a19f23..aa36f9a2dfba 100644 --- a/sys/modules/dtrace/profile/Makefile +++ b/sys/modules/dtrace/profile/Makefile @@ -13,4 +13,3 @@ CFLAGS+= ${OPENZFS_CFLAGS} .include CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h -CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/prototype/Makefile b/sys/modules/dtrace/prototype/Makefile index 189d6c2df2a2..476c567a4dc0 100644 --- a/sys/modules/dtrace/prototype/Makefile +++ b/sys/modules/dtrace/prototype/Makefile @@ -13,4 +13,3 @@ CFLAGS+= ${OPENZFS_CFLAGS} .include CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h -CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/sdt/Makefile b/sys/modules/dtrace/sdt/Makefile index a025848e3a60..d672b3c9aab9 100644 --- a/sys/modules/dtrace/sdt/Makefile +++ b/sys/modules/dtrace/sdt/Makefile @@ -11,5 +11,5 @@ SRCS+= vnode_if.h CFLAGS+= ${OPENZFS_CFLAGS} .include + CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h -CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/systrace/Makefile b/sys/modules/dtrace/systrace/Makefile index 2250a7418193..3e122f70da25 100644 --- a/sys/modules/dtrace/systrace/Makefile +++ b/sys/modules/dtrace/systrace/Makefile @@ -13,4 +13,3 @@ CFLAGS+= ${OPENZFS_CFLAGS} .include CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h -CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/systrace_freebsd32/Makefile b/sys/modules/dtrace/systrace_freebsd32/Makefile index 3b77bc4c6d0e..4661633f9a62 100644 --- a/sys/modules/dtrace/systrace_freebsd32/Makefile +++ b/sys/modules/dtrace/systrace_freebsd32/Makefile @@ -14,4 +14,3 @@ CFLAGS+= -DFREEBSD32_SYSTRACE .include CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h -CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/systrace_linux/Makefile b/sys/modules/dtrace/systrace_linux/Makefile index 56f422dfb9e5..7dbd88ffb5f0 100644 --- a/sys/modules/dtrace/systrace_linux/Makefile +++ b/sys/modules/dtrace/systrace_linux/Makefile @@ -15,4 +15,3 @@ CFLAGS+= -DLINUX_SYSTRACE .include CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h -CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/dtrace/systrace_linux32/Makefile b/sys/modules/dtrace/systrace_linux32/Makefile index febd4a0c1bab..81aa1b7de9df 100644 --- a/sys/modules/dtrace/systrace_linux32/Makefile +++ b/sys/modules/dtrace/systrace_linux32/Makefile @@ -15,4 +15,3 @@ CFLAGS+= -DLINUX32_SYSTRACE .include CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h -CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/opensolaris/Makefile b/sys/modules/opensolaris/Makefile index 7010485b0ee7..f5d6f7f4639c 100644 --- a/sys/modules/opensolaris/Makefile +++ b/sys/modules/opensolaris/Makefile @@ -34,4 +34,3 @@ IGNORE_PRAGMA= 1 .include CFLAGS+= -include ${SYSDIR}/cddl/compat/opensolaris/sys/debug_compat.h -CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} diff --git a/sys/modules/zfs/Makefile b/sys/modules/zfs/Makefile index 0cfc336aacb1..a75c1986bb13 100644 --- a/sys/modules/zfs/Makefile +++ b/sys/modules/zfs/Makefile @@ -286,8 +286,6 @@ CFLAGS+= -include ${SRCTOP}/sys/cddl/compat/opensolaris/sys/debug_compat.h CFLAGS+= -include ${INCDIR}/os/freebsd/spl/sys/ccompile.h CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/static_ccompile.h -CWARNFLAGS+= ${OPENZFS_CWARNFLAGS} - CFLAGS.gcc+= -Wno-pointer-to-int-cast CFLAGS.lapi.c= -Wno-cast-qual From nobody Wed May 3 00:31:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9yZ10hb8z48P8K; Wed, 3 May 2023 00:31:53 +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 4Q9yZ049Spz3s5C; Wed, 3 May 2023 00:31:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073912; h=from:from:reply-to:subject: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=zPQ8sJj8bgrEhF47UDbU5l/hqqfl8ceTLN+rUAHF074=; b=bbj7MSwVlo/RmvQGnXg2zHu5jG6PlGoC1Zn7p9A1fGoTmpEXc720SQFv4sKlPRjG2ClzHA ZyhRqpEWglfzjkrDKNSo2vtuz3EsZpBbtU6uxD3kKwlTR2XEopc3s6Rd1CVLlza0G5y5hH IpSrwAkOXKbFbTMGpqI3V7S/IYB6m/NUUttSfbVX83UDkVqjblmv0mQLP+G9RHp3wz+czE AGCdVtUntP1pxovYnZf3QY7BUqC4SNHLxPk7xevhbYbvWU7C0ZXniX9siAumpPdenco8Xo xs3zjdw00JlL8oG1WlfZGT7Jr9RFDW2l7E8sW2yYL0tN28d6j/HHbadYxddJow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073912; h=from:from:reply-to:subject: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=zPQ8sJj8bgrEhF47UDbU5l/hqqfl8ceTLN+rUAHF074=; b=C4NqD0F7iSKgOXbq4XYJJFihMWIjRlhnKOGqwbGuzhsVSu5LlGeilfxmnggY612b6TfLvf Z3hYdB6qrgEI1o9F+F6riEHGH31YN6Nk3/2kqtTwasrSWm7tPRB5aUTnHshTzrxfdDXV6f vlelSSc0th/kpSYJ133n32bCPnWoftQzyxDoYOsVylzF26ppVLKQIrkJoGOaC/5MCpoGvH JPheN6oLQThUSGXfDxlmmB+ALAEndZ+Dgi5FfX7V40840GMu73g2aHgskWrbCntl2dQS+1 OJkQ8fs6WX5/SfH07fMucccvnMJ8m7qR/cExD/ayEEs21bjyeKY82nrVOp+Osw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073912; a=rsa-sha256; cv=none; b=Ig7FwaRkLp7nOkxLPLJNCGf+WE+J5W0z2Kwvh4yxZSODE7Wo28DQ5JfUs4pBo3KBS7zxAa r+zhwMeusgvQ9NVjOtTLZuv0e82I91BfooTt/dGVrnUV+L5E+IPZWJeQEv0TVb9o4KDid5 a/Qkaj1x/JuA6eHRAEkyxE7zKvSeE+gvUZf9IN4qL5boLagnRoeurKM3BsBfQxhgqB+TIu BEMGCorbRrmb7wb9AOjyfkGhnQ0fOW3Jypt+OZwJK4NZe7E+VZNkY3PZiUcxChlUzrLZUg kLDR8mF4gx+fHvJSKUTwlLWF+MrRc3g5oPvk1LBvMgYvC1tpCSv2+1VUcq+Vww== Received: from [IPV6:2601:648:8680:16b0:983b:b6c4:574a:73ff] (unknown [IPv6:2601:648:8680:16b0:983b:b6c4:574a:73ff]) (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 4Q9yZ004cKzSqW; Wed, 3 May 2023 00:31:51 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <2696e636-4a6c-ab92-55e6-e65904477b1d@FreeBSD.org> Date: Tue, 2 May 2023 17:31:49 -0700 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: git: d854d8122288 - stable/13 - ncurses: Backport a few fixes for GCC warnings from version 6.2-20210220. Content-Language: en-US From: John Baldwin To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org References: <202305030029.3430TNZt071687@gitrepo.freebsd.org> In-Reply-To: <202305030029.3430TNZt071687@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On 5/2/23 5:29 PM, John Baldwin wrote: > The branch stable/13 has been updated by jhb: > > URL: https://cgit.FreeBSD.org/src/commit/?id=d854d8122288dfa6b0245774ee37b02541c9b989 > > commit d854d8122288dfa6b0245774ee37b02541c9b989 > Author: John Baldwin > AuthorDate: 2023-05-02 23:38:54 +0000 > Commit: John Baldwin > CommitDate: 2023-05-02 23:38:54 +0000 > > ncurses: Backport a few fixes for GCC warnings from version 6.2-20210220. > > This is a direct commit to stable/13. I didn't backport 6.2-20210220 as I wasn't sure what all would be required to do that in lib/ncurses. It was also done after splitting out tinfo in main. -- John Baldwin From nobody Wed May 3 00:33:07 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9ybV498mz48NtX; Wed, 3 May 2023 00:33:10 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q9ybV3G1Pz3tdH; Wed, 3 May 2023 00:33:09 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073990; h=from:from:reply-to:subject: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=7zoPep3GI9sdM/enIGaliJ/AdqWd6cxcm0kWwiuX87o=; b=FkDvTmFos5iC/deLW9YB4phxewYrxx8z8OCzTQtWTeJeCPUy2NCMP/hn0YgKDeYNNJISjz eEtABOATBkvVbh6M3BhzyCErrEt7cKiL0vJPOJFUKJ396A/geolceiruDmZbRHhqmC0jcj vjGSrrcorG01X+o5T1PzkHloVbN+ahFMe72isewL4/yMGPNiXcoSzhE7o3v6EfoD80IBim RWwjNG4MbyMCtym2zC9Vx/3r1wkf7aU3vPfe6CZUzD0k3v3amdSvIKEUdZO2R6NRJHDQWD r2szEm2MqEvZGjpgw9CsokDGH/Cqze+6a0+nm1+NthamzNt2T+35V506feB33Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683073990; h=from:from:reply-to:subject: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=7zoPep3GI9sdM/enIGaliJ/AdqWd6cxcm0kWwiuX87o=; b=t1Ct88hPZURORMFSC8DkaYQhLFC77qWsd7i6iM2rUG57X5M4viPMHOA4fd+Mr3cEcv9LmK ueb3aeZaUrIqg+7SeI7UTXq0pHwP21hy9qUz4vjq4njDdJ7sKJGbQrOhKbNbEwkgfuILVo dk2+0e7I5tWg+F0vuAKuOJIR/dEhIHKjkGJ2/nORstIO8569JBV9voGoBsPj47QDEKnRvi VtmSC5bXNesskfLL6KfTSYMktk6Ablms7RKm7ErgcCbC5AbKTEedcxPm/cSpCmZD//G8+k kilN4vTDLIIUN6s2KY5wV1GH0GDzJQTn/aLEMEL1bnPOZyXOW2MdLba+yhiMFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683073990; a=rsa-sha256; cv=none; b=iZDvQxBiigyQh6pYz6wqbxSx1W7AMaAhAHQIiGYp8M664Ih2BEev/bmPZywaO6bWglraqZ ryS7VQIwdn+AJBzSL8PlehEWpZMXbfJabvQg9Qf1IrHUgr0lgi3jD4gWlX2Ksd6CjFMNsR XRYICtawMTJLZtL9cI8dVvJSAnC2amdunV4LK9BPXWIY6YFpTJoF0Kq28gs5FoUhvrgRck LQQVeNoBzNMZCR/PjvOLn5K21nnCgkVajC7ev8Vl3/tujLRAf90SzMBS65HnjMuPMXyDDn FwwDhG9bSW/u4gCQ10hyR62c6Unpv18i7qFKDIb/2WRRp2HNr2nWEdF5nwKcyw== Received: from [IPV6:2601:648:8680:16b0:983b:b6c4:574a:73ff] (unknown [IPv6:2601:648:8680:16b0:983b:b6c4:574a:73ff]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q9ybS2B0HzSpG; Wed, 3 May 2023 00:33:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <46542d67-5355-5507-e9a6-6dc8a945e71f@FreeBSD.org> Date: Tue, 2 May 2023 17:33:07 -0700 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: git: 58b9432c405b - stable/13 - zfs: Fix build with GCC 12. Content-Language: en-US From: John Baldwin To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org References: <202305030030.3430U4Mf074930@gitrepo.freebsd.org> In-Reply-To: <202305030030.3430U4Mf074930@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On 5/2/23 5:30 PM, John Baldwin wrote: > The branch stable/13 has been updated by jhb: > > URL: https://cgit.FreeBSD.org/src/commit/?id=58b9432c405b6542cf33e1b57ff87365180b4da7 > > commit 58b9432c405b6542cf33e1b57ff87365180b4da7 > Author: John Baldwin > AuthorDate: 2022-12-21 18:49:23 +0000 > Commit: John Baldwin > CommitDate: 2023-05-03 00:25:48 +0000 > > zfs: Fix build with GCC 12. > > Silence -Winfinite-recursion for ldo.c in lua and -Wstringop-overread > for nvpair.c. > > Reviewed by: mm > Differential Revision: https://reviews.freebsd.org/D37631 > > (cherry picked from commit 2e08e4b75ea1080c224a33baf62199d893dc322d) After this commit I can build world + GENERIC with amd64-gcc12. -- John Baldwin From nobody Wed May 3 01:19:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q9zcY5B9yz48h2Q for ; Wed, 3 May 2023 01:19: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 4Q9zcY4j8kz433J; Wed, 3 May 2023 01:19:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683076749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eYT2SB2NLyBEW+zOIEhBcSZmeAqbtsAHfX13QWmCcZ0=; b=CuCgg8UQrNp+pEJOdEdkupj4EjFFDHsLe7ijQpAiIM7hcZjXeavWT0qqxBAsElI7w2kV4P enY1ynvAyrgAHLZEDQ9KgOR8KxwfCqDfazqK6Fq3oXpE+/B+fbIpw6RR89wYhC67l/2xw+ /iqNjT4vFzFzFWjPgdwbuaK7hEX6frelEfLgmtODatH7BSJUzcxm/esFsYPOBCVLhEPEuk gb0OChC6gbljcla42Imax4+5TokuZCm8k0s8dkQZ6t0/5sHh8DdOwldhuqieBmqrFxfmg+ WDi63dI3Me607eR1cy7DIGVvsjFErdUNLnri76Ay1AkWh2Imy6xuGKPtvzOqeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683076749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eYT2SB2NLyBEW+zOIEhBcSZmeAqbtsAHfX13QWmCcZ0=; b=x0fQZYSUUR42T2bMpohmO2b4faCC7Onb8JOyW3u0NSmxfwd5Z/qm710DJXGZIVkVcJ1eTL +PcMHZ14vPBu00d9JWonszivT6T25x8rieHlhFoz6vL8R+EmuoTHYvpwDlg6tQUFKTOm+t X1BZh/K46sgJq0jnEsogTQjyEJdadPGBKwMgbkXHjHfUr5yx+qSnwugN5s7JLsAVHUAtAL RS+TKrM9oP6G3QYqemNAYmfzIT+bt4eOVuz3H02EnDZ2lv1bK0PDqG5j+rwSWZKteIXS2W 7xz4Lg05wA7HYRh3VqnW0KZBzjkl0Ekiy1R5JrcDllUs5u6pC5Y5bYbVt3Wh3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683076749; a=rsa-sha256; cv=none; b=k4J5qOEFddYD+o4VYf++KuNitw3IQK1C/R7Xd68lxvzxR4+30sFKLXRKRQCTLpAR0r8Oye WgXqlI1ZSthx7tC4LmIfz6DAh0z/VUDv8zs2FbpdjirjM8QquiTY3wzoclaR64OxHrARxa 9f/q2iUVHFmenl8fLympN5pDG7WG3qyL8TPQHRhdlFMj89meINdfA+ixJwdD6+bg4bsiR1 jdnOeaZD2arSF69It6pKfHOeqLxDBcrvuxhtNWmf1+P6KfhVaCvNWh1GKoABErrzHhvsED 7tP7UbDlz0mK2cu+T/aIVFzhgDsZdG+imjiRmBuKB9OSungL9YZzLgCqRGF6BQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q9zcY3Sv8z19TJ; Wed, 3 May 2023 01:19:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3431J9Ge055225; Wed, 3 May 2023 01:19:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3431J99a055224; Wed, 3 May 2023 01:19:09 GMT (envelope-from git) Date: Wed, 3 May 2023 01:19:09 GMT Message-Id: <202305030119.3431J99a055224@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Enji Cooper Subject: git: 39b40917b459 - Create tag vendor/openssl/3.0.8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/tags/vendor/openssl/3.0.8 X-Git-Reftype: annotated tag X-Git-Commit: 39b40917b459a120fd8163644a1599165f795212 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The annotated tag vendor/openssl/3.0.8 has been created by ngie: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/openssl/3.0.8 tag vendor/openssl/3.0.8 Tagger: Enji Cooper TaggerDate: 2023-05-03 01:14:57 +0000 Vendor import of OpenSSL 3.0.8 commit e4520c8bd1d300a7a338d0ed4af171a2d0e583ef Author: Enji Cooper AuthorDate: 2023-03-01 04:21:31 +0000 Commit: Enji Cooper CommitDate: 2023-03-06 20:41:29 +0000 openssl: Vendor import of OpenSSL-3.0.8 Summary: Release notes can be found at https://www.openssl.org/news/openssl-3.0-notes.html . Obtained from: https://www.openssl.org/source/openssl-3.0.8.tar.gz Differential Revision: https://reviews.freebsd.org/D38835 Test Plan: ``` $ git status On branch vendor/openssl-3.0 nothing to commit, working tree clean $ (cd ..; fetch http://www.openssl.org/source/openssl-${OSSLVER}.tar.gz http://www.openssl.org/source/openssl-${OSSLVER}.tar.gz.asc) openssl-3.0.8.tar.gz 14 MB 4507 kBps 04s openssl-3.0.8.tar.gz.asc 833 B 10 MBps 00s $ set | egrep '(XLIST|OSSLVER)=' OSSLVER=3.0.8 XLIST=FREEBSD-Xlist $ gpg --list-keys /home/ngie/.gnupg/pubring.kbx ----------------------------- pub rsa4096 2014-10-04 [SC] 7953AC1FBC3DC8B3B292393ED5E9E43F7DF9EE8C uid [ unknown] Richard Levitte uid [ unknown] Richard Levitte uid [ unknown] Richard Levitte sub rsa4096 2014-10-04 [E] $ gpg --verify openssl-${OSSLVER}.tar.gz.asc openssl-${OSSLVER}.tar.gz gpg: Signature made Tue Feb 7 05:43:55 2023 PST gpg: using RSA key 7953AC1FBC3DC8B3B292393ED5E9E43F7DF9EE8C gpg: Good signature from "Richard Levitte " [unknown] gpg: aka "Richard Levitte " [unknown] gpg: aka "Richard Levitte " [unknown] gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: 7953 AC1F BC3D C8B3 B292 393E D5E9 E43F 7DF9 EE8C $ (cd vendor.checkout/; git status; find . -type f -or -type l | cut -c 3- | sort > ../old) On branch vendor/openssl-3.0 nothing to commit, working tree clean $ tar -x -X $XLIST -f ../openssl-${OSSLVER}.tar.gz -C .. $ rsync --exclude FREEBSD.* --delete -avzz ../openssl-${OSSLVER}/* . $ cat .git gitdir: /home/ngie/git/freebsd-src/.git/worktrees/vendor.checkout $ diff -arq ../openssl-3.0.8 . Only in .: .git Only in .: FREEBSD-Xlist Only in .: FREEBSD-upgrade $ git status FREEBSD* On branch vendor/openssl-3.0 nothing to commit, working tree clean $ ``` Reviewers: emaste, jkim Subscribers: imp, andrew, dab Differential Revision: https://reviews.freebsd.org/D38835 From nobody Wed May 3 04:15:35 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QB3X815TWz48rpf; Wed, 3 May 2023 04:15:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QB3X80ZFvz4H65; Wed, 3 May 2023 04:15:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683087336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x3wXr9vPjSQaFp4zQGWPW9EkHHsyhnF3IYfpLnimaJY=; b=N38CykCFr1RQ0qgqNKKQIgG5udWrdp7OYC0PIq3ffMowTVtZRwwmHs4wbf4z6LOBENZXdS gsd6Bu6owqdSDIhkMFpOGH8BieJiiQzMN6A4qjrnSYYG6iJGKgQG+dnnzaEHyVdIVXt5g3 xQCvGKKA+W/vvhMelo113HblnGjwRoquKiVNhV9uUm2wV5WX/2FoJc8PtYyx9kUGdEzkeH 4ENsDy5s84mzM7e30es4sdcPJX9bJIMYsk4L31dk+N99eZORBF8gYQels41/w7LGDUDtZl HpfTQsId3/GASR17ODaWPLKWUzX5sxliNG36JLBgqw40oBGPmwx0kvpzRp19hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683087336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x3wXr9vPjSQaFp4zQGWPW9EkHHsyhnF3IYfpLnimaJY=; b=agzDxBVi86zWV0/52HMhJnO/wAyw7Tu1/dt9lieVztXPqHYVgBMdtuKxijk45Qo6eZJfMl STIVlVO2ZWbYT1Kiy5Fy8ZaSEw4qMrpxBt/CGwc3lJvkWvMwHl0ZGM0Rk7iv4mkbb9+a/J a5iLb1vOFSu/lo56AIJjsZ4r8nPuTbcBe4NilJm/qoMiNBrutuyga8rPb1xCQpMyxTpNYn hlEGfEZIEpDy4piM2A7yLeaqB0NY/uL4jV1RjhdrIMjAGyrB6YUea4tSa94WL/xoReusVP gcwFgfWpsO8sjzPABzUIRsTIFPvZdK/v5e7F4r7cVwwXm+pIF18EUBDc/7ShWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683087336; a=rsa-sha256; cv=none; b=R5jLTa/Z7/JRUq5KJ74pSfZ05eqKgp+QayaY/XUKvazNhdGuUMZ6gvCvDl2FNSULurIgxG 181jJ4ds3jzkpVehVkq5n894IcSznuuJRdINeV/7kmYO/aawX/9ZLqdRvpqXWlzSfdvc90 qVyWGoW4hZD10Yzblx35YCpp0+OlZlG8YzKC+SZYv9lMQnUsex76uAR+B/aUXetkoMhCKz 9SWS/MNwNj3qCtFevAxIJeyK7Q02ADVPXeqcfeT+2I6QbIlg9/6kvGMYEBu+TtzskG4Hky 2dLL4S+L9eJKx6/r1j+aHkInKBlv35qJrcNWsXcIEv36pW7ZWZiDUq4NAHVDqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QB3X76krHzGgq; Wed, 3 May 2023 04:15:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3434FZeg053395; Wed, 3 May 2023 04:15:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3434FZ0U053394; Wed, 3 May 2023 04:15:35 GMT (envelope-from git) Date: Wed, 3 May 2023 04:15:35 GMT Message-Id: <202305030415.3434FZ0U053394@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: f78cc42f10cb - main - riscv: Add pass(4) to GENERIC kernel List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f78cc42f10cbfb5811276bc6827732ca32eb5485 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=f78cc42f10cbfb5811276bc6827732ca32eb5485 commit f78cc42f10cbfb5811276bc6827732ca32eb5485 Author: Jessica Clarke AuthorDate: 2023-05-03 04:14:57 +0000 Commit: Jessica Clarke CommitDate: 2023-05-03 04:14:57 +0000 riscv: Add pass(4) to GENERIC kernel Whilst we don't have ahci(4) currently, we do have umass(4), and need pass(4) for smartctl(8) to be able to talk to such devices. Reported by: David Gilbert MFC after: 1 week --- sys/riscv/conf/GENERIC | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index 04645ec9bf90..9465b2712b2e 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -101,6 +101,9 @@ device vtnet # VirtIO Ethernet device device virtio_blk # VirtIO Block device device virtio_mmio # VirtIO MMIO bus +# ATA/SCSI peripherals +device pass # Passthrough device (direct ATA/SCSI access) + # NVM Express (NVMe) support device nvme # base NVMe driver options NVME_USE_NVD=0 # prefer the cam(4) based nda(4) driver From nobody Wed May 3 06:46:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QB6tM32nlz490v8; Wed, 3 May 2023 06:46:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QB6tK554Dz4RWQ; Wed, 3 May 2023 06:46:33 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.17.1/8.17.1) with ESMTPS id 3436kPoJ052568 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 3 May 2023 09:46:28 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 3436kPoJ052568 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 3436kPEN052567; Wed, 3 May 2023 09:46:25 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 3 May 2023 09:46:25 +0300 From: Konstantin Belousov To: Kyle Evans Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 5844bd058aed - main - jobc: rework detection of orphaned groups. Message-ID: References: <202101100241.10A2fvtm057663@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home X-Spamd-Result: default: False [-1.17 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_SPAM_SHORT(0.83)[0.833]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; R_DKIM_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_SOFTFAIL(0.00)[~all:c]; HAS_XAW(0.00)[]; ARC_NA(0.00)[] X-Rspamd-Queue-Id: 4QB6tK554Dz4RWQ X-Spamd-Bar: - X-ThisMailContainsUnwantedMimeParts: N On Sun, Apr 30, 2023 at 11:01:44PM -0500, Kyle Evans wrote: > On Sat, Jan 9, 2021 at 8:43 PM Konstantin Belousov wrote: > > > > The branch main has been updated by kib: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=5844bd058aed6f3d0c8cbbddd6aa95993ece0189 > > > > commit 5844bd058aed6f3d0c8cbbddd6aa95993ece0189 > > Author: Konstantin Belousov > > AuthorDate: 2020-12-29 00:41:56 +0000 > > Commit: Konstantin Belousov > > CommitDate: 2021-01-10 02:41:20 +0000 > > > > jobc: rework detection of orphaned groups. > > > > Instead of trying to maintain pg_jobc counter on each process group > > update (and sometimes before), just calculate the counter when needed. > > Still, for the benefit of the signal delivery code, explicitly mark > > orphaned groups as such with the new process group flag. > > > > This way we prevent bugs in the corner cases where updates to the counter > > were missed due to complicated configuration of p_pptr/p_opptr/real_parent > > (debugger). > > > > Since we need to iterate over all children of the process on exit, this > > change mostly affects the process group entry and leave, where we need > > to iterate all process group members to detect orpaned status. > > > > Hi, > > I have a question about the locking here... > > > [... snip ...] > > @@ -678,43 +677,40 @@ jobc_reaper(struct proc *p) > > } > > > > static struct proc * > > -jobc_parent(struct proc *p) > > +jobc_parent(struct proc *p, struct proc *p_exiting) > > { > > struct proc *pp; > > > > - sx_assert(&proctree_lock, SX_LOCKED); > > + sx_assert(&proctree_lock, SA_LOCKED); > > > > pp = proc_realparent(p); > > - if (pp->p_pptr == NULL || > > + if (pp->p_pptr == NULL || pp == p_exiting || > > (pp->p_treeflag & P_TREE_GRPEXITED) == 0) > > return (pp); > > return (jobc_reaper(pp)); > > } > > > > -#ifdef INVARIANTS > > -static void > > -check_pgrp_jobc(struct pgrp *pgrp) > > +static int > > +pgrp_calc_jobc(struct pgrp *pgrp) > > { > > struct proc *q; > > int cnt; > > > > - sx_assert(&proctree_lock, SX_LOCKED); > > - PGRP_LOCK_ASSERT(pgrp, MA_NOTOWNED); > > +#ifdef INVARIANTS > > + if (!mtx_owned(&pgrp->pg_mtx)) > > + sx_assert(&proctree_lock, SA_LOCKED); > > +#endif > > > > cnt = 0; > > - PGRP_LOCK(pgrp); > > LIST_FOREACH(q, &pgrp->pg_members, p_pglist) { > > if ((q->p_treeflag & P_TREE_GRPEXITED) != 0 || > > q->p_pptr == NULL) > > continue; > > - if (isjobproc(jobc_parent(q), pgrp)) > > + if (isjobproc(jobc_parent(q, NULL), pgrp)) > > cnt++; > > } > > - KASSERT(pgrp->pg_jobc == cnt, ("pgrp %d %p pg_jobc %d cnt %d", > > - pgrp->pg_id, pgrp, pgrp->pg_jobc, cnt)); > > - PGRP_UNLOCK(pgrp); > > + return (cnt); > > } > > -#endif > > > > /* > > * Move p to a process group > > [... snip ...] > > So the proctree lock is sufficient for pgrp_calc_jobc() to provide a > stable answer needed for everything fixjobc_kill() uses it for... > > > @@ -934,35 +827,46 @@ fixjobc_kill(struct proc *p) > > p->p_treeflag |= P_TREE_GRPEXITED; > > > > /* > > - * Check p's parent to see whether p qualifies its own process > > - * group; if so, adjust count for p's process group. > > + * Check if exiting p orphans its own group. > > */ > > - if (isjobproc(jobc_parent(p), pgrp)) > > - pgadjustjobc(pgrp, false); > > + pgrp = p->p_pgrp; > > + if (isjobproc(jobc_parent(p, NULL), pgrp)) { > > + PGRP_LOCK(pgrp); > > + if (pgrp_calc_jobc(pgrp) == 0) > > + orphanpg(pgrp); > > + PGRP_UNLOCK(pgrp); > > + } > > > > /* > > * Check this process' children to see whether they qualify > > - * their process groups after reparenting to reaper. If so, > > - * adjust counts for children's process groups. > > + * their process groups after reparenting to reaper. > > */ > > LIST_FOREACH(q, &p->p_children, p_sibling) { > > - if ((q->p_treeflag & P_TREE_ORPHANED) != 0) > > - continue; > > - fixjobc_kill_q(p, q, true); > > + pgrp = q->p_pgrp; > > + PGRP_LOCK(pgrp); > > + if (pgrp_calc_jobc(pgrp) == 0) { > > + /* > > + * We want to handle exactly the children that > > + * has p as realparent. Then, when calculating > > + * jobc_parent for children, we should ignore > > + * P_TREE_GRPEXITED flag already set on p. > > + */ > > + if (jobc_parent(q, p) == p && isjobproc(p, pgrp)) > > + orphanpg(pgrp); > > + } else > > + pgrp->pg_flags &= ~PGRP_ORPHANED; > > + PGRP_UNLOCK(pgrp); > > } > > - LIST_FOREACH(q, &p->p_orphans, p_orphan) > > - fixjobc_kill_q(p, q, true); > > - LIST_FOREACH(q, &p->p_children, p_sibling) { > > - if ((q->p_treeflag & P_TREE_ORPHANED) != 0) > > - continue; > > - fixjobc_kill_q(p, q, false); > > + LIST_FOREACH(q, &p->p_orphans, p_orphan) { > > + pgrp = q->p_pgrp; > > + PGRP_LOCK(pgrp); > > + if (pgrp_calc_jobc(pgrp) == 0) { > > + if (isjobproc(p, pgrp)) > > + orphanpg(pgrp); > > + } else > > + pgrp->pg_flags &= ~PGRP_ORPHANED; > > + PGRP_UNLOCK(pgrp); > > } > > - LIST_FOREACH(q, &p->p_orphans, p_orphan) > > - fixjobc_kill_q(p, q, false); > > - > > -#ifdef INVARIANTS > > - check_pgrp_jobc(pgrp); > > -#endif > > } > > > > void > > ... and I would imagine the proctree lock is sufficient for > isjobproc/jobc_parent as well- is there any reason we can't/shouldn't > just use atomic(9) for operations with pgrp->pg_flags and push all of > the extra lock acquisitions into the orphanpg() cases? It seems like > we could avoid taking any pgrp lock in the common case and at least > mitigate that additional overhead from the exit() path. My reading is that you are proposing change pgrp locks into proctree_lock. Flag (PGRP_ORPHANED) needs to be consistent with the group membership, so it cannot be atomic, it would need to be under the same lock. If this works, I do not object, but I did not looked carefully. The most obvious problem could be that it is not easy to take sx proctree_lock in some places that only need pgrp mutex right now. From nobody Wed May 3 06:56:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QB75t49kKz490bB; Wed, 3 May 2023 06:56: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 4QB75t3fbqz4Snm; Wed, 3 May 2023 06:56:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683096994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PiGWZtwpcx+aBd3Er55B3Rw+uCqGItNZ+weJpZvuF4U=; b=kZ9h4fZm8FqPbYLbdjbIgX9ujUbDOXLCtYGgLf2JyygIR4z28J1EaDpx/JmxE6ymaRj7xD wl2NaLPOrpeaMnUbk2Mg+5Vhx1LxnEpFmrjSsQNvrOLROzHqSvuy5sdraHCqa0fnFm7YPj NboUaBDknn9JctdCruBtQGwGJn9AaMRR2YjlehkkIZWJuTTxzrh48iBh9cn0zLWbKHzT2E xGdPqXMe19x62HLeH+WbfWh0N/6WU0ggDju8qF4gAeU2u2X16cIMA3XDCfncciWGcchXyU VNghK9TLshIKxtj4wi8nXp6JvYH/DZh5+iJE0rKT4rC0he8Sdx2Qv8QoZA6CsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683096994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PiGWZtwpcx+aBd3Er55B3Rw+uCqGItNZ+weJpZvuF4U=; b=GI4l1nINeKbJ9mKv+/GtbAEq4REYsu5HFGSBLrPS67xX6+X/AyLagYXkEOw4HDQps7/guB cgBDrbudU4tWAETCd/Oh9nlv6G83iJV7UqqOLvmNhaseae8/jEUrMIy06pINMD/a82bvgH vUP5D4DB+6PSGJ4Fuk4ZhJSMW59YQS3sc1LE1KUpKaor0z9mf03plTMhOfsd6UtWxU30Jr Ky7jiETGPCUa6tEumqWRGDwjEm7LOTkXxd3T9WsSI379CoZ8hh9/1Zg5LBiZv9kAlOT94d 1ZN35VXsraOft94U0Ftn0qCKkxI3rt67oYXKkFqM7qexGAYtiabj+E+G1Nj/rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683096994; a=rsa-sha256; cv=none; b=fLnixRRE8w74xeskdy1Jg7dr4+1MsS9y0fINfsfPF+OXcC42dP+29DjmEtOmNyk+w7oNgT yaBzWHOgQBtyUrFbgCB/r5JCZhhTT6asemmkAfV5qhgBPXN3hsWiSPEd4OOvuuhyokIlif 6NRZTzhNHVhgMiENzWlM5UH0JChv3Xki2dizd8f3lcmg0Kf1AxLcCJwW9ctX9ubCDhhQWY eosnrozLUDgknzHfgHSXwFlxkvtofw15JpR/u+k3LAMW2NF5KPiR3hukoJMSv5kJ3zn5Zu GRRQmOrQxNWWS0yjuTaS43zayR7EwZLxRoETA5BQcgL4lcEyU6hce3rC/AEjrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QB75t2k57zLTm; Wed, 3 May 2023 06:56:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3436uYBm016473; Wed, 3 May 2023 06:56:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3436uYYp016472; Wed, 3 May 2023 06:56:34 GMT (envelope-from git) Date: Wed, 3 May 2023 06:56:34 GMT Message-Id: <202305030656.3436uYYp016472@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: cf0fc64bc2f9 - main - vfs: reduce audit branching in namei_setup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cf0fc64bc2f91bc00c78b316b51a0aaac8b53235 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=cf0fc64bc2f91bc00c78b316b51a0aaac8b53235 commit cf0fc64bc2f91bc00c78b316b51a0aaac8b53235 Author: Mateusz Guzik AuthorDate: 2023-05-03 06:56:10 +0000 Commit: Mateusz Guzik CommitDate: 2023-05-03 06:56:10 +0000 vfs: reduce audit branching in namei_setup --- sys/kern/vfs_lookup.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 66a8b267f346..a75ea4ca16d6 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -372,10 +372,12 @@ namei_setup(struct nameidata *ndp, struct vnode **dpp, struct pwd **pwdp) /* * If we are auditing the kernel pathname, save the user pathname. */ - if (cnp->cn_flags & AUDITVNODE1) - AUDIT_ARG_UPATH1_VP(td, ndp->ni_rootdir, *dpp, cnp->cn_pnbuf); - if (cnp->cn_flags & AUDITVNODE2) - AUDIT_ARG_UPATH2_VP(td, ndp->ni_rootdir, *dpp, cnp->cn_pnbuf); + if (AUDITING_TD(td)) { + if (cnp->cn_flags & AUDITVNODE1) + AUDIT_ARG_UPATH1_VP(td, ndp->ni_rootdir, *dpp, cnp->cn_pnbuf); + if (cnp->cn_flags & AUDITVNODE2) + AUDIT_ARG_UPATH2_VP(td, ndp->ni_rootdir, *dpp, cnp->cn_pnbuf); + } if (ndp->ni_startdir != NULL && !startdir_used) vrele(ndp->ni_startdir); if (error != 0) { From nobody Wed May 3 07:00:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QB7BS6TGvz491Nh for ; Wed, 3 May 2023 07:00: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 4QB7BS5yFnz4TRM; Wed, 3 May 2023 07:00:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683097232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=14FiWZ2fifrgFYR/gL/o7m9JOhL8U109/Iz5oMA3mvA=; b=UJZ2GZesNrKH/d3HxL3870oSha3KYKJ0p6l6EOpxMsUnSfEY+Ppmrh2DM4rXrwoewaY0tT R7W63jDdZ4495xY96ntdKx6pwtpz7JBIYVU1QsOrq+PDIrqq+5Uyjkj39TfISfZnkiwvza DEOljyUZV5yMfAumgjxWBf/Yz5wAGORggkuSt7mBSyxqttEu7xPgSaqEh88mPSD/0ni8iO N7yViKP2s734sxUsINbuBqoanocPjhk/FvUJQ7jFjpQWWkpavoxy7VqqObIledhYj1yq0F ONmPGrMgp/rUdqMz+jWzqyKr7eApEjZoqBr0Fq0xw0VsWre7v+yBJ3lonIuuRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683097232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=14FiWZ2fifrgFYR/gL/o7m9JOhL8U109/Iz5oMA3mvA=; b=g0g1X0pVTKS8oiAJ36i+5uK38qbBHYNseltjBL/u2qQ/KuNklFo2co0bSL/tW/4NOIeLg7 cZ427KF1yt6o6MtzElMzFuEof4kY9pKCilX46I9ay+n+sH5lBL6LOJpFhVM6G7fB8DHJwb OA4jU8OotJCzZ+J46MERbspde1UHjzOiWIXRdviEq55osVHNL2OCBZADYbGF4WhNCxQQvs ljaUAY5Mq47dVm6LXwYzTJV2v3sakLvsnRdDiAlE06WlqYbHVgJNwGS2c8oY9Tr01S2FRi 2vdtbuO1opyL2Vv5Ro8jZcA7VvD6wr6n6wkrQEhWA3vK7ewGeqlWa2aSh8PWow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683097232; a=rsa-sha256; cv=none; b=kzzSaK49Gflqiek3/k/WaPG87U5QI5NZSGQJIqdzr0PC00AxRwSVbJHnG2TFno3coypa1x SMPI45EPOUVZCgvF7iE6HL34gk15A931oYkLKnsoqjyB7frS1OMMzw+Dvyan32rp/WQVQI 3BH9dgiSHPJu9jjhwmgrX3SfdKQihGJycffVhHmDQLsbYGaS/cOsRc56f14h9jnAY3MzOv VsNVCUymutmNDVD7Z61DDoe3LXrnqA7JlfwfIbXkne9KnH4haennpJoEALFrm0U8KD1uqH lfbhWBJ04aBRsNDRtNC+H7n/ykYgMT6XIz1Gf5lsck1Apb6lGnbq2Svmr+yQcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QB7BS4lCczLFW; Wed, 3 May 2023 07:00:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34370Wkr026590; Wed, 3 May 2023 07:00:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34370Wuj026589; Wed, 3 May 2023 07:00:32 GMT (envelope-from git) Date: Wed, 3 May 2023 07:00:32 GMT Message-Id: <202305030700.34370Wuj026589@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: e2a92d726e18..d96e29576c89 - vendor/openzfs/master - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/vendor/openzfs/master X-Git-Reftype: branch X-Git-Commit: d96e29576c89e6e547cb82b477651d2b85ea0fed X-Git-Oldrev: e2a92d726e1849f646d137510796b11c26d45cae X-Git-Newrev: d96e29576c89e6e547cb82b477651d2b85ea0fed Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch vendor/openzfs/master has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=e2a92d726e18..d96e29576c89 012829df0c99 Wrap clang specific pragma d96e29576c89 Use correct block pointer in block cloning case. From nobody Wed May 3 07:22:37 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QB7gy101kz492Fq; Wed, 3 May 2023 07:22: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 4QB7gy0YJdz4WLl; Wed, 3 May 2023 07:22:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683098558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TyumgTl1u8//59moXrNFE3eUOekVzFTR9/KBi0vLAWA=; b=d5hB/t+u9kqEiZYeltbki2mC5U0/by9odW4Fr0bsQ7ehrYEv9V2hJxben6CYuibeEtYJSS o/xxezjcLBow4HbxLUHID7MShszxRLZG6pezcnO+CwhaqjZUMWQ6mUqgqOq3PKK2Ca7puG 6OO2OIglDH7/P4h8+v/J7H+zlih9xoTxcfaoI6JCCfsnWeJ50VAXVaq3ssXwbEMSVafhfu BhumpB9vIyKLRXVfmsGX7lUo88rfggynttb6yKjrPP9ZYZd/XP/KEFcDkJbfQfBewzRKpz S4caI/uyBsslvqaBI2wEDW2+04DbVrUcSLg6ZWl2nNfo8ttRc0iOuOEdf/PY5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683098558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TyumgTl1u8//59moXrNFE3eUOekVzFTR9/KBi0vLAWA=; b=YjbXW6Dk5y87Rk51zUdWiXINiCyaYHNcoGoteafBdw9um+dWUmTwvfRH4Tx/csCl2c8eTB hqAwupgQ0YzNFvrYuWvJ/08muOgRjM1tYjoxmy3gAvPvuI3r3fTly9J7KU8Jcyoo0P4JMy hY6ZrsQ7h8TLJ4zqIBF8KwGrW5fkj2CW9pnnFAxYpmE9v6uoBeY+5qzMReCMbX02ItiB8O Rssg9BR0+VowDEAaHypds5hjNzT8e1GrLMfr/uahyCLUqmL007UDAYImjiafWr0dLrcC4L Gk4MMJf2f473TcoAGfVebO3jnXEnavlIccP/04jQ2+hOf/5PARhhwDzIfiDKaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683098558; a=rsa-sha256; cv=none; b=mB7gyVCZX3Un/spU/9ShZSnx265x5fUMZ7lc6qQIJoWiWh4msqBQSVzPB+HIeCzsnmUSpk 2HoIsI/fkmQ7EhPA47ylEJ1VPPNZQQRa7w4tyzCmzkQNTdU5hCMR0Yw0B3OQJmwbDtYnvx j7gMn81gpcQf/lNl+A571OqSYbR2HuCiCliWQwaUJAG5PxPk49N93UJDNqTG/cqfCSz8AG Pn2zCQCQCrPZmgPvBxvk2gwcXSEvUhS9cBYdoFl7AjDX5iOJ3ghMwEzAlHpYW0+B3otCiv oFZjSFaKceRoL+RzeIcte0QM9sR5qLA0omlQj+e0e83tQQIZJiSdxMTq7KNTwg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QB7gx6kFZzM9r; Wed, 3 May 2023 07:22:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3437MbUO065378; Wed, 3 May 2023 07:22:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3437MbGj065377; Wed, 3 May 2023 07:22:37 GMT (envelope-from git) Date: Wed, 3 May 2023 07:22:37 GMT Message-Id: <202305030722.3437MbGj065377@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: f15b2e1afd57 - main - RELNOTES: Add fwget entry List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f15b2e1afd572c7a8ebc7e599e04eb1797fec6fc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=f15b2e1afd572c7a8ebc7e599e04eb1797fec6fc commit f15b2e1afd572c7a8ebc7e599e04eb1797fec6fc Author: Emmanuel Vadot AuthorDate: 2023-05-03 07:20:35 +0000 Commit: Emmanuel Vadot CommitDate: 2023-05-03 07:20:35 +0000 RELNOTES: Add fwget entry Sponsored by: Beckhoff Automation GmbH & Co. KG --- RELNOTES | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/RELNOTES b/RELNOTES index b13c0738f70b..6434375089a0 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,13 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +d198b8774d2c + Add a new "fwget" utility. + The goal of this utility is to inspect the system for peripherals + that needs firmware and install the appropriate packages for them. + For now only pci subsystem is supported and only firmwares for Intel + and AMD GPUs are known. + 896516e54a8c Add a new "syskrb5" mount option for Kerberized NFSv4.1/4.2 mounts. Without this patch, a Kerberized NFSv4.1/4.2 mount must provide From nobody Wed May 3 07:22:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QB7gz53rVz492Fw; Wed, 3 May 2023 07:22: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 4QB7gz1S0Hz4WP9; Wed, 3 May 2023 07:22:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683098559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DMowLg8BixizSzThJDKOHQ7S0RR48RZbRryUi/sk7DA=; b=PYp3Q/Pq3mW1tRQOgmjZRGUvdKFrOWVM6DT9btFqEF98rQSG2wNIKt3/JmjEChT51432R0 veUkgnxyzd3tekfP+tU3bykYwvuHlTg/VQ7lK78oEidua3uxM79dnCzsPaqJ81TRbT5QkO asbXlpFykjT3v6odsd02Ebvm08V+O0DwCzD5vZeItxn2pJnXebRkcZIe7bgk7yrveFORNE y259eYTvk/NKHIHoXIUQxoFC/7i8Aw+Fd5WxRJVlAcq6O3HYvRFlmrb/C3ztFxebxW0/b0 PtyAC2loKgcNJhgIozyM6cHUzzGSXTN3n7mMJ/vnHDLyxRZgXjp3bnzl8rpfhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683098559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DMowLg8BixizSzThJDKOHQ7S0RR48RZbRryUi/sk7DA=; b=QjtXZ/dpr9fjo6L5GoRqI3QCijC365g8qdEjF169pB3OCd54tlV+OOj891GUee4oIbeIAj hbbgrEW94Y9/FN8zOLE+94uThWGk6nkUuXjcmeOP5/YlKITj/EuBUAyxzZW7NaiznH/rTR O3aGlJ5znUbZcqNkm4q7K8ngW7gIslevx9G8qfF+xnE70svBLD/3VY6xdYjmnOueY+cBuU 57g7xCfOWp+pQGk4pZEHSALJbfZ8G5who9oR7+aRs1NCgv2IFiEJA+sQkAt1wn+LDpzuKz iXHBNnbJo/CKBmmajomh9+S9WAbjuUZABFM8azygj4BlR2hgBCXlcHL6rOKCLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683098559; a=rsa-sha256; cv=none; b=kd581ROZjYBWNKZTUOdibxCnpHGBCZFwN+gneP4BENaByTv2Q2Bkwd9gxorvx4clclzaJU 09jRlKaaNloFjdoDZ7BpEnA96U66saCZr/BniPhJURHU90rSUQZrUwNmQCtGfSyUp7dCd1 upGKgNp8ebTC0ynOmF0ols+UsStOTUb2PWrzypPKj9yJxaGacfntLRoQ82+SxEl6zKow8q UhWxmwTg7jZiDurF7h/j3sn1a5qnO0FLBeeZFz+y2PSurM1Hhb7kaOEqRpCDLoBB+esFat EhCylrfV83oqM9iy6APrzbew81RvGF5jBZOHfmCIYbCkeDcOtkr53JZ6vE6ycA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QB7gz0XQHzLR3; Wed, 3 May 2023 07:22:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3437MckX065397; Wed, 3 May 2023 07:22:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3437McYR065396; Wed, 3 May 2023 07:22:38 GMT (envelope-from git) Date: Wed, 3 May 2023 07:22:38 GMT Message-Id: <202305030722.3437McYR065396@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: 1d7355248b5c - main - RELNOTES: Document TI code removal from armv7 GENERIC kernel List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1d7355248b5cf3b0d09247c6c7c4ff2d40c39945 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=1d7355248b5cf3b0d09247c6c7c4ff2d40c39945 commit 1d7355248b5cf3b0d09247c6c7c4ff2d40c39945 Author: Emmanuel Vadot AuthorDate: 2023-05-03 07:21:58 +0000 Commit: Emmanuel Vadot CommitDate: 2023-05-03 07:21:58 +0000 RELNOTES: Document TI code removal from armv7 GENERIC kernel Suggested by: mhorne Sponsored by: Beckhoff Automation GmbH & Co. KG --- RELNOTES | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/RELNOTES b/RELNOTES index 6434375089a0..4d69e2bbc36d 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,12 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +3416e102c4e9 + Remove TI code from armv7 GENERIC kernel. + This code doesn't cope with newer DTS and hasn't in a long time so + support for TI armv7 platform (like BeagleBone and Pandaboard) is now + removed from GENERIC. + d198b8774d2c Add a new "fwget" utility. The goal of this utility is to inspect the system for peripherals From nobody Wed May 3 09:55:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBC402Xd2z4991B; Wed, 3 May 2023 09:55:12 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Received: from heemeyer.club (heemeyer.club [195.93.173.158]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QBC3z6N6Mz3KwT; Wed, 3 May 2023 09:55:11 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Authentication-Results: mx1.freebsd.org; none Received: from heemeyer.club (localhost [127.0.0.1]) by heemeyer.club (8.17.1/8.16.1) with ESMTP id 3439t8Zs093984; Wed, 3 May 2023 12:55:08 +0300 (MSK) (envelope-from dchagin@heemeyer.club) Received: (from dchagin@localhost) by heemeyer.club (8.17.1/8.16.1/Submit) id 3439t847093983; Wed, 3 May 2023 12:55:08 +0300 (MSK) (envelope-from dchagin) Date: Wed, 3 May 2023 12:55:08 +0300 From: Dmitry Chagin To: Mateusz Guzik Cc: Mark Johnston , Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: a1d71cebc05c - main - fstatat(2): restore AT_EMPTY_PATH handling Message-ID: References: <202305021512.342FCpbN056202@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4QBC3z6N6Mz3KwT X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:61400, ipnet:195.93.173.0/24, country:RU] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Tue, May 02, 2023 at 11:08:23PM +0200, Mateusz Guzik wrote: > On 5/2/23, Mateusz Guzik wrote: > > right, this should do it > > > > diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c > > index e4977392349f..b583eed5e249 100644 > > --- a/sys/kern/vfs_cache.c > > +++ b/sys/kern/vfs_cache.c > > @@ -4435,6 +4435,7 @@ cache_fplookup_dirfd(struct cache_fpl *fpl, > > struct vnode **vpp) > > if ((*vpp)->v_type != VDIR) { > > if (!((cnp->cn_flags & EMPTYPATH) != 0 && > > cnp->cn_pnbuf[0] == '\0')) { > > cache_fpl_smr_exit(fpl); > > + ndp->ni_resflags |= NIRES_EMPTYPATH; > > return (cache_fpl_handled_error(fpl, ENOTDIR)); > > } > > } > > > > on another look it already works fine as is, I miseed the ! in the condition ;) ugh, thanks, looks like it's time for me to sleep it off )) > > #include > #include > > int > main(void) > { > struct stat sb; > int fd; > > fd = open("/etc/fstab", O_RDONLY); > > fstatat(fd, "", &sb, AT_EMPTY_PATH); > } > > openat(AT_FDCWD,"/etc/fstab",O_RDONLY,00) = 3 (0x3) > fstatat(3,"",{ mode=-rw-r--r-- ,inode=370100,size=145,blksize=4096 > },AT_EMPTY_PATH) = 0 (0x0) > > dtrace -n 'vfs:fplookup:: /execname == "a.out"/ { @[stack(), arg1, > arg2] = count(); }' > [snip] > kernel`kern_statat+0xec > kernel`sys_fstatat+0x27 > kernel`amd64_syscall+0x109 > kernel`0xffffffff809726bb > 4980 3 1 > > as in handled in cache_fplookup_emptypath > > > > > On 5/2/23, Dmitry Chagin wrote: > >> On Tue, May 02, 2023 at 03:04:37PM -0400, Mark Johnston wrote: > >>> On Tue, May 02, 2023 at 08:00:01PM +0300, Dmitry Chagin wrote: > >>> > On Tue, May 02, 2023 at 03:12:51PM +0000, Konstantin Belousov wrote: > >>> > > The branch main has been updated by kib: > >>> > > > >>> > > URL: > >>> > > https://cgit.FreeBSD.org/src/commit/?id=a1d71cebc05ccfeedf95f2db3e94b17270167888 > >>> > > > >>> > > commit a1d71cebc05ccfeedf95f2db3e94b17270167888 > >>> > > Author: Konstantin Belousov > >>> > > AuthorDate: 2023-05-02 15:11:39 +0000 > >>> > > Commit: Konstantin Belousov > >>> > > CommitDate: 2023-05-02 15:11:39 +0000 > >>> > > > >>> > > fstatat(2): restore AT_EMPTY_PATH handling > >>> > > > >>> > > Fixes: cb858340dcbf214cc4c4d78dbb741620d7b3a252 > >>> > > Reported by: markj > >>> > > Sponsored by: The FreeBSD Foundation > >>> > > --- > >>> > > sys/kern/vfs_syscalls.c | 6 +++++- > >>> > > 1 file changed, 5 insertions(+), 1 deletion(-) > >>> > > > >>> > > diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c > >>> > > index 5c0a291e3b0b..d68af4ea4d51 100644 > >>> > > --- a/sys/kern/vfs_syscalls.c > >>> > > +++ b/sys/kern/vfs_syscalls.c > >>> > > @@ -2438,8 +2438,12 @@ kern_statat(struct thread *td, int flag, int > >>> > > fd, const char *path, > >>> > > AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH) | LOCKSHARED | LOCKLEAF | > >>> > > AUDITVNODE1, pathseg, path, fd, &cap_fstat_rights); > >>> > > > >>> > > - if ((error = namei(&nd)) != 0) > >>> > > + if ((error = namei(&nd)) != 0) { > >>> > > + if (error == ENOTDIR && > >>> > > + (nd.ni_resflags & NIRES_EMPTYPATH) != 0) > >>> > > + error = kern_fstat(td, fd, sbp); > >>> > > return (error); > >>> > > + } > >>> > > >>> > cache_fplookup_dirfd() doesnt set the NIRES_EMPTYPATH flag > >>> > >>> It doesn't, but for an AT_EMPTY_PATH lookup it aborts the lookup and > >>> returns ENOTDIR to namei(), which sets NIRES_EMPTYPATH before passing > >>> the error up. > >>> > >> > >> it call cache_fpl_handled_error() which is set status to > >> CACHE_FPL_STATUS_HADLED, namei() simply return error in that path > >> > >> > >>> > > error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED); > >>> > > NDFREE_PNBUF(&nd); > >>> > > vput(nd.ni_vp); > >>> > > >> > > > > > > -- > > Mateusz Guzik > > > > > -- > Mateusz Guzik From nobody Wed May 3 09:59:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBC8t20v4z499KM; Wed, 3 May 2023 09:59:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QBC8t1RV3z3Lst; Wed, 3 May 2023 09:59:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683107966; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IvZzap/NEmOMYAXRli817Ri1xH1cXCe4rpPe3eHr2sE=; b=FuahQTDC+iP+hcc1jeuxRGWfP0cnMntYqmmDBT4/S2i1LYScm+AvSRlP2xZTO2pLDGYbcq cG6QglW6fpst40kl/eDSZ1NjFM2fux2Gq0IZudo09DGEkTX7TF5U9f1Ic9EEjW6f+g4WpX /j5kX5ltsZzdPosBk4M+sr/M6+o25szSfGNu0Aferus3OpmtILUoAvQzF1CWJnQ4u2hCSs oCAujZWvO3+LP6pHGfz9AKnTSBKukafXwrYilU2rQugPm6NfaJ5Ubh4MESpKGSjvjXOQFc hmvE60G6P+zzXSZjNO3QJ7dp64nnPWiiHjKtl/hpz588eauI/s1/MtVsWhEa/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683107966; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IvZzap/NEmOMYAXRli817Ri1xH1cXCe4rpPe3eHr2sE=; b=ogbVubsroycfQYrhqChIIyERjQnHJLPJGUYtsCkLvXE8eyisVLB3ZZqpu4thObmnLcAczK aNUNTSr04j8lnyBvqrJy/DTJKtyzQM71TNP95rKO1rLciQeP5SbLCOSysT5VOhruj4RLCN 1w4u8+hZ157jhFIwcBfqGDQfl1HAouCc9LauxC6DvhiJBGo/qCaayEp/gqYfxmsOBXi26l 4MmV9GztIjHfSFJdvrXiWCKgH6DHAGFSfoHITCkPyLz36LWALsne7k6GbOOxW1vCOhVRsD KIfLfJWpaTFBastiLVdAG7swiIyoQ9kpc8fVVweZJ5OpczY5FKZBHb15RblbXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683107966; a=rsa-sha256; cv=none; b=DR8OEU5zXesaLigrpCslRv8rfNBEvgc8gr4oK5d6JeLyzCFDAI7ZXSnkIQMMpLMcUWOL9Y BnSsPJTyXWd5Jk/4z6iNZYhyUXs1uc14Vj9XNoH9n9Kilm2IswiL/gaZWbp/OYfZcizi3i wqru1HWzzd/t2cSmx+GPiAG8kKHsVqszn5HSVGuqiPtZVLBhwT+8ZuKgxN+KwsQlLmXjd0 VbYfJ6KHz9/FMNbiITQuEYqMTKroug9QcrOe9CgYMsHmkXvFIXCsMFWjOQcYgi7PtNLJ/5 B6zWvfRALKaUUUuhSG4TaghgxkB5UhNhthvH9s+V2w4yMpZM+KpbUMLRixl5QQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBC8t0SHPzQtv; Wed, 3 May 2023 09:59:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3439xPxX014201; Wed, 3 May 2023 09:59:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3439xPpw014200; Wed, 3 May 2023 09:59:25 GMT (envelope-from git) Date: Wed, 3 May 2023 09:59:25 GMT Message-Id: <202305030959.3439xPpw014200@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: 7b676698856e - main - pf: simplify structs with anonymous unions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7b676698856ec4604b2b93f4fa917767bfbfa66e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=7b676698856ec4604b2b93f4fa917767bfbfa66e commit 7b676698856ec4604b2b93f4fa917767bfbfa66e Author: Kristof Provost AuthorDate: 2023-05-03 06:02:43 +0000 Commit: Kristof Provost CommitDate: 2023-05-03 08:24:20 +0000 pf: simplify structs with anonymous unions Rather than playing preprocessor hacks use actual anonymous unions. No functional change. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/pfvar.h | 24 +++++++++--------------- sys/netpfil/pf/pf.h | 20 +++++--------------- sys/netpfil/pf/pf_table.c | 26 ++++++++++---------------- 3 files changed, 24 insertions(+), 46 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index c1550f2c30e6..412453f8dd25 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1704,32 +1704,26 @@ struct pfioc_state_kill { struct pfioc_states { int ps_len; union { - caddr_t psu_buf; - struct pfsync_state *psu_states; - } ps_u; -#define ps_buf ps_u.psu_buf -#define ps_states ps_u.psu_states + caddr_t ps_buf; + struct pfsync_state *ps_states; + }; }; struct pfioc_states_v2 { int ps_len; uint64_t ps_req_version; union { - caddr_t psu_buf; - struct pf_state_export *psu_states; - } ps_u; -#define ps_buf ps_u.psu_buf -#define ps_states ps_u.psu_states + caddr_t ps_buf; + struct pf_state_export *ps_states; + }; }; struct pfioc_src_nodes { int psn_len; union { - caddr_t psu_buf; - struct pf_src_node *psu_src_nodes; - } psn_u; -#define psn_buf psn_u.psu_buf -#define psn_src_nodes psn_u.psu_src_nodes + caddr_t psn_buf; + struct pf_src_node *psn_src_nodes; + }; }; struct pfioc_if { diff --git a/sys/netpfil/pf/pf.h b/sys/netpfil/pf/pf.h index f226232419f8..fc3ea6c9e1d3 100644 --- a/sys/netpfil/pf/pf.h +++ b/sys/netpfil/pf/pf.h @@ -233,11 +233,9 @@ struct pfi_kif_cmp { struct pfi_kif { char pfik_name[IFNAMSIZ]; union { - RB_ENTRY(pfi_kif) _pfik_tree; - LIST_ENTRY(pfi_kif) _pfik_list; - } _pfik_glue; -#define pfik_tree _pfik_glue._pfik_tree -#define pfik_list _pfik_glue._pfik_list + RB_ENTRY(pfi_kif) pfik_tree; + LIST_ENTRY(pfi_kif) pfik_list; + }; u_int64_t pfik_packets[2][2][2]; u_int64_t pfik_bytes[2][2][2]; u_int32_t pfik_tzero; @@ -275,12 +273,7 @@ struct pf_addr { u_int8_t addr8[16]; u_int16_t addr16[8]; u_int32_t addr32[4]; - } pfa; /* 128-bit address */ -#define v4 pfa.v4 -#define v6 pfa.v6 -#define addr8 pfa.addr8 -#define addr16 pfa.addr16 -#define addr32 pfa.addr32 + }; /* 128-bit address */ }; #define PFI_AFLAG_NETWORK 0x01 @@ -344,10 +337,7 @@ struct pf_poolhashkey { u_int8_t key8[16]; u_int16_t key16[8]; u_int32_t key32[4]; - } pfk; /* 128-bit hash key */ -#define key8 pfk.key8 -#define key16 pfk.key16 -#define key32 pfk.key32 + }; /* 128-bit hash key */ }; struct pf_mape_portset { diff --git a/sys/netpfil/pf/pf_table.c b/sys/netpfil/pf/pf_table.c index ea37b077c651..28d63b54c2d8 100644 --- a/sys/netpfil/pf/pf_table.c +++ b/sys/netpfil/pf/pf_table.c @@ -107,21 +107,15 @@ struct pfr_walktree { PFRW_COUNTERS } pfrw_op; union { - struct pfr_addr *pfrw1_addr; - struct pfr_astats *pfrw1_astats; - struct pfr_kentryworkq *pfrw1_workq; - struct pfr_kentry *pfrw1_kentry; - struct pfi_dynaddr *pfrw1_dyn; - } pfrw_1; + struct pfr_addr *pfrw_addr; + struct pfr_astats *pfrw_astats; + struct pfr_kentryworkq *pfrw_workq; + struct pfr_kentry *pfrw_kentry; + struct pfi_dynaddr *pfrw_dyn; + }; int pfrw_free; int pfrw_flags; }; -#define pfrw_addr pfrw_1.pfrw1_addr -#define pfrw_astats pfrw_1.pfrw1_astats -#define pfrw_workq pfrw_1.pfrw1_workq -#define pfrw_kentry pfrw_1.pfrw1_kentry -#define pfrw_dyn pfrw_1.pfrw1_dyn -#define pfrw_cnt pfrw_free #define senderr(e) do { rv = (e); goto _bad; } while (0) @@ -740,7 +734,7 @@ pfr_enqueue_addrs(struct pfr_ktable *kt, struct pfr_kentryworkq *workq, pfr_walktree, &w)) printf("pfr_enqueue_addrs: IPv6 walktree failed.\n"); if (naddr != NULL) - *naddr = w.pfrw_cnt; + *naddr = w.pfrw_free; } static void @@ -1068,7 +1062,7 @@ pfr_walktree(struct radix_node *rn, void *arg) /* FALLTHROUGH */ case PFRW_ENQUEUE: SLIST_INSERT_HEAD(w->pfrw_workq, ke, pfrke_workq); - w->pfrw_cnt++; + w->pfrw_free++; break; case PFRW_GET_ADDRS: if (w->pfrw_free-- > 0) { @@ -1089,7 +1083,7 @@ pfr_walktree(struct radix_node *rn, void *arg) case PFRW_POOL_GET: if (ke->pfrke_not) break; /* negative entries are ignored */ - if (!w->pfrw_cnt--) { + if (!w->pfrw_free--) { w->pfrw_kentry = ke; return (1); /* finish search */ } @@ -2347,7 +2341,7 @@ pfr_kentry_byidx(struct pfr_ktable *kt, int idx, int af) bzero(&w, sizeof(w)); w.pfrw_op = PFRW_POOL_GET; - w.pfrw_cnt = idx; + w.pfrw_free = idx; switch (af) { #ifdef INET From nobody Wed May 3 09:59:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBC8v4hWpz499ST; Wed, 3 May 2023 09:59:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QBC8v2G5wz3Ld1; Wed, 3 May 2023 09:59:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683107967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tJAEtJfshjJ3mL8saCMLUNDKH/7a9yOPUbQUPYDIxtQ=; b=Tku05NJGOVmjj/btgigXgSddDh+BpIxQMXJUIPYZ90sCu9cci6m8ujC/JZ6yNcCqxJHr4I dncLJQVfArPF6UJUUTdVOMd+Cw7czBNADId8BqJM57lz2hmT7JDWiBoZGs9cWEle2HZb2C aDLLB8blzaqGSpiqhGDXqdihZt5jL4ay6zjaCGZ7iZRWmaa5l4+s9ddVP0BZgxybZQA+Db RQ2UmQNynDGfXg1WwMhIpyn/yNVIcZANYL1o/iwOHRiNVgRh5SrUzCGAd7XgMqTRUATygZ CmtbmcHIHmklC12HU6qJXW2bcLaJbEuHZrPjIZ/D8Ev8xFyJjWkNjpn4zz5A0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683107967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tJAEtJfshjJ3mL8saCMLUNDKH/7a9yOPUbQUPYDIxtQ=; b=iJUSNF+JCHwqAsTEDUjczqBZw0iMM75J7kzNLqg9kwhrs1UUjPDIP284jszQuSQlDr+sLn L+bTjJQRRdJtkFiyCjehTXdLQbqmB7MmNWQ5V13mZAUS9YQFvHv17mqkVp3eb5DPO4gpJ7 6WmFDl0NtOyLkBwFZ5bH8s+uk6dCLZKgTRaplUrRiJjiY5cbcbEBfh2/UFMh29B+gfujSg wq7bZ6hSHXqNHhLO3keXrz0EbkIhbSctQxDt33u4oAyaXDfQToildNfN3Hn11eiPXdMPNZ Eo1DOgS9InqazoetHGjhajHmOqKzPeD50gf4Ms7Ry0WeD7d2FH9rVuj47yGwPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683107967; a=rsa-sha256; cv=none; b=VrVYgY4I6gSKO8+uvG+u1xy1sBrRKQE/EIHjQHsaGefaRjRJhlB0eqP7J462qKEAp3aYqB O3s6vHc+Z57q52qLz7GTXY9VlULcv3u2sFr3Es3M11xjWHQtrmn6xAtlygCU3eOeA4gStK SOiq5ZIxbCQ12Lg/ZRQLOKGxuzfdNNiKoC3EWqEVPa2wgkDfNXBTubKnUHiTIl/QT4BLwG YS1bwCnX1BU6HWHrNodvRyciPKmH63xh79zyE7XMQhP42ftsfK14eXMZMj4TWt1+T73OBf P+oVo2RXDpL6QDTueNkyy0P/Z4dUIJrcgtMz8J7xbf3ou7czCFTInYaY6EjpGw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBC8v13tDzQyG; Wed, 3 May 2023 09:59:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3439xRuJ014220; Wed, 3 May 2023 09:59:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3439xR8T014219; Wed, 3 May 2023 09:59:27 GMT (envelope-from git) Date: Wed, 3 May 2023 09:59:27 GMT Message-Id: <202305030959.3439xR8T014219@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: 16303d2ba6b0 - main - pf: improve source node error handling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 16303d2ba6b099afa8ec8f2e97deca2785caa082 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=16303d2ba6b099afa8ec8f2e97deca2785caa082 commit 16303d2ba6b099afa8ec8f2e97deca2785caa082 Author: Kajetan Staszkiewicz AuthorDate: 2023-05-03 08:31:05 +0000 Commit: Kristof Provost CommitDate: 2023-05-03 08:31:05 +0000 pf: improve source node error handling Functions manipulating source nodes can fail due to various reasons like memory allocation errors, hitting configured limits or lack of redirection targets. Ensure those errors are properly caught and propagated in the code. Increase the error counters not only when parsing the main ruleset but the NAT ruleset too. Cherry-picked from development of D39880 Reviewed by: kp Sponsored by: InnoGames GmbH Differential Revision: https://reviews.freebsd.org/D39940 --- sys/net/pfvar.h | 2 +- sys/netpfil/pf/pf.c | 50 ++++++++++++++++++++++++++++++-------------------- sys/netpfil/pf/pf_lb.c | 47 ++++++++++++++++++++++++++++------------------- 3 files changed, 59 insertions(+), 40 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 412453f8dd25..f72c3980438d 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2403,7 +2403,7 @@ int pf_step_out_of_keth_anchor(struct pf_keth_anchor_stackframe *, struct pf_keth_rule **, struct pf_keth_rule **, int *); -int pf_map_addr(u_int8_t, struct pf_krule *, +u_short pf_map_addr(u_int8_t, struct pf_krule *, struct pf_addr *, struct pf_addr *, struct pf_addr *, struct pf_ksrc_node **); struct pf_krule *pf_get_translation(struct pf_pdesc *, struct mbuf *, diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index e5f2a5ea57a0..ee17df0c866f 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -329,7 +329,7 @@ static struct pf_kstate *pf_find_state(struct pfi_kkif *, struct pf_state_key_cmp *, u_int); static int pf_src_connlimit(struct pf_kstate **); static void pf_overload_task(void *v, int pending); -static int pf_insert_src_node(struct pf_ksrc_node **, +static u_short pf_insert_src_node(struct pf_ksrc_node **, struct pf_krule *, struct pf_addr *, sa_family_t); static u_int pf_purge_expired_states(u_int, int); static void pf_purge_unlinked_rules(void); @@ -865,11 +865,12 @@ pf_free_src_node(struct pf_ksrc_node *sn) uma_zfree(V_pf_sources_z, sn); } -static int +static u_short pf_insert_src_node(struct pf_ksrc_node **sn, struct pf_krule *rule, struct pf_addr *src, sa_family_t af) { - struct pf_srchash *sh = NULL; + u_short reason = 0; + struct pf_srchash *sh = NULL; KASSERT((rule->rule_flag & PFRULE_SRCTRACK || rule->rpool.opts & PF_POOL_STICKYADDR), @@ -881,15 +882,19 @@ pf_insert_src_node(struct pf_ksrc_node **sn, struct pf_krule *rule, if (*sn == NULL) { PF_HASHROW_ASSERT(sh); - if (!rule->max_src_nodes || - counter_u64_fetch(rule->src_nodes) < rule->max_src_nodes) - (*sn) = uma_zalloc(V_pf_sources_z, M_NOWAIT | M_ZERO); - else - counter_u64_add(V_pf_status.lcounters[LCNT_SRCNODES], - 1); + if (rule->max_src_nodes && + counter_u64_fetch(rule->src_nodes) >= rule->max_src_nodes) { + counter_u64_add(V_pf_status.lcounters[LCNT_SRCNODES], 1); + PF_HASHROW_UNLOCK(sh); + reason = PFRES_SRCLIMIT; + goto done; + } + + (*sn) = uma_zalloc(V_pf_sources_z, M_NOWAIT | M_ZERO); if ((*sn) == NULL) { PF_HASHROW_UNLOCK(sh); - return (-1); + reason = PFRES_MEMORY; + goto done; } for (int i = 0; i < 2; i++) { @@ -899,7 +904,8 @@ pf_insert_src_node(struct pf_ksrc_node **sn, struct pf_krule *rule, if ((*sn)->bytes[i] == NULL || (*sn)->packets[i] == NULL) { pf_free_src_node(*sn); PF_HASHROW_UNLOCK(sh); - return (-1); + reason = PFRES_MEMORY; + goto done; } } @@ -926,10 +932,12 @@ pf_insert_src_node(struct pf_ksrc_node **sn, struct pf_krule *rule, (*sn)->states >= rule->max_src_states) { counter_u64_add(V_pf_status.lcounters[LCNT_SRCSTATES], 1); - return (-1); + reason = PFRES_SRCLIMIT; + goto done; } } - return (0); +done: + return (reason); } void @@ -4581,7 +4589,7 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, struct pf_ksrc_node *sn = NULL; struct tcphdr *th = &pd->hdr.tcp; u_int16_t mss = V_tcp_mssdflt; - u_short reason; + u_short reason, sn_reason; /* check maximums */ if (r->max_states && @@ -4593,14 +4601,15 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, /* src node for filter rule */ if ((r->rule_flag & PFRULE_SRCTRACK || r->rpool.opts & PF_POOL_STICKYADDR) && - pf_insert_src_node(&sn, r, pd->src, pd->af) != 0) { - REASON_SET(&reason, PFRES_SRCLIMIT); + (sn_reason = pf_insert_src_node(&sn, r, pd->src, pd->af)) != 0) { + REASON_SET(&reason, sn_reason); goto csfailed; } /* src node for translation rule */ if (nr != NULL && (nr->rpool.opts & PF_POOL_STICKYADDR) && - pf_insert_src_node(&nsn, nr, &sk->addr[pd->sidx], pd->af)) { - REASON_SET(&reason, PFRES_SRCLIMIT); + (sn_reason = pf_insert_src_node(&nsn, nr, &sk->addr[pd->sidx], + pd->af)) != 0 ) { + REASON_SET(&reason, sn_reason); goto csfailed; } s = pf_alloc_state(M_NOWAIT); @@ -4689,8 +4698,9 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, } if (r->rt) { - if (pf_map_addr(pd->af, r, pd->src, &s->rt_addr, NULL, &sn)) { - REASON_SET(&reason, PFRES_MAPFAILED); + /* pf_map_addr increases the reason counters */ + if ((reason = pf_map_addr(pd->af, r, pd->src, &s->rt_addr, NULL, + &sn)) != 0) { pf_src_tree_remove_state(s); s->timeout = PFTM_UNLINKED; STATE_DEC_COUNTERS(s); diff --git a/sys/netpfil/pf/pf_lb.c b/sys/netpfil/pf/pf_lb.c index ca8593a1c37d..a2f0224f842c 100644 --- a/sys/netpfil/pf/pf_lb.c +++ b/sys/netpfil/pf/pf_lb.c @@ -342,10 +342,11 @@ pf_get_mape_sport(sa_family_t af, u_int8_t proto, struct pf_krule *r, return (1); } -int +u_short pf_map_addr(sa_family_t af, struct pf_krule *r, struct pf_addr *saddr, struct pf_addr *naddr, struct pf_addr *init_addr, struct pf_ksrc_node **sn) { + u_short reason = 0; struct pf_kpool *rpool = &r->rpool; struct pf_addr *raddr = NULL, *rmask = NULL; struct pf_srchash *sh = NULL; @@ -364,8 +365,10 @@ pf_map_addr(sa_family_t af, struct pf_krule *r, struct pf_addr *saddr, /* If the supplied address is the same as the current one we've * been asked before, so tell the caller that there's no other * address to be had. */ - if (PF_AEQ(naddr, &(*sn)->raddr, af)) - return (1); + if (PF_AEQ(naddr, &(*sn)->raddr, af)) { + reason = PFRES_MAPFAILED; + goto done; + } PF_ACPY(naddr, &(*sn)->raddr, af); if (V_pf_status.debug >= PF_DEBUG_NOISY) { @@ -375,15 +378,15 @@ pf_map_addr(sa_family_t af, struct pf_krule *r, struct pf_addr *saddr, pf_print_host(naddr, 0, af); printf("\n"); } - return (0); + goto done; } mtx_lock(&rpool->mtx); /* Find the route using chosen algorithm. Store the found route in src_node if it was given or found. */ if (rpool->cur->addr.type == PF_ADDR_NOROUTE) { - mtx_unlock(&rpool->mtx); - return (1); + reason = PFRES_MAPFAILED; + goto done_pool_mtx; } if (rpool->cur->addr.type == PF_ADDR_DYNIFTL) { switch (af) { @@ -392,8 +395,8 @@ pf_map_addr(sa_family_t af, struct pf_krule *r, struct pf_addr *saddr, if (rpool->cur->addr.p.dyn->pfid_acnt4 < 1 && (rpool->opts & PF_POOL_TYPEMASK) != PF_POOL_ROUNDROBIN) { - mtx_unlock(&rpool->mtx); - return (1); + reason = PFRES_MAPFAILED; + goto done_pool_mtx; } raddr = &rpool->cur->addr.p.dyn->pfid_addr4; rmask = &rpool->cur->addr.p.dyn->pfid_mask4; @@ -404,8 +407,8 @@ pf_map_addr(sa_family_t af, struct pf_krule *r, struct pf_addr *saddr, if (rpool->cur->addr.p.dyn->pfid_acnt6 < 1 && (rpool->opts & PF_POOL_TYPEMASK) != PF_POOL_ROUNDROBIN) { - mtx_unlock(&rpool->mtx); - return (1); + reason = PFRES_MAPFAILED; + goto done_pool_mtx; } raddr = &rpool->cur->addr.p.dyn->pfid_addr6; rmask = &rpool->cur->addr.p.dyn->pfid_mask6; @@ -414,8 +417,8 @@ pf_map_addr(sa_family_t af, struct pf_krule *r, struct pf_addr *saddr, } } else if (rpool->cur->addr.type == PF_ADDR_TABLE) { if ((rpool->opts & PF_POOL_TYPEMASK) != PF_POOL_ROUNDROBIN) { - mtx_unlock(&rpool->mtx); - return (1); /* unsupported */ + reason = PFRES_MAPFAILED; + goto done_pool_mtx; /* unsupported */ } } else { raddr = &rpool->cur->addr.v.a.addr; @@ -503,8 +506,8 @@ pf_map_addr(sa_family_t af, struct pf_krule *r, struct pf_addr *saddr, /* table contains no address of type 'af' */ if (rpool->cur != acur) goto try_next; - mtx_unlock(&rpool->mtx); - return (1); + reason = PFRES_MAPFAILED; + goto done_pool_mtx; } } else if (rpool->cur->addr.type == PF_ADDR_DYNIFTL) { rpool->tblidx = -1; @@ -513,8 +516,8 @@ pf_map_addr(sa_family_t af, struct pf_krule *r, struct pf_addr *saddr, /* table contains no address of type 'af' */ if (rpool->cur != acur) goto try_next; - mtx_unlock(&rpool->mtx); - return (1); + reason = PFRES_MAPFAILED; + goto done_pool_mtx; } } else { raddr = &rpool->cur->addr.v.a.addr; @@ -533,8 +536,6 @@ pf_map_addr(sa_family_t af, struct pf_krule *r, struct pf_addr *saddr, if (*sn != NULL) PF_ACPY(&(*sn)->raddr, naddr, af); - mtx_unlock(&rpool->mtx); - if (V_pf_status.debug >= PF_DEBUG_NOISY && (rpool->opts & PF_POOL_TYPEMASK) != PF_POOL_NONE) { printf("pf_map_addr: selected address "); @@ -542,7 +543,15 @@ pf_map_addr(sa_family_t af, struct pf_krule *r, struct pf_addr *saddr, printf("\n"); } - return (0); +done_pool_mtx: + mtx_unlock(&rpool->mtx); + +done: + if (reason) { + counter_u64_add(V_pf_status.counters[reason], 1); + } + + return (reason); } struct pf_krule * From nobody Wed May 3 10:25:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBClb0vtlz49BlF; Wed, 3 May 2023 10:26: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 4QBClb0c6Fz3Npb; Wed, 3 May 2023 10:26:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683109563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z0inLDJVFF1fbJi4sDxdN/Xd+ZGfui/h/MGMh2wA0Ls=; b=hA85Mo6xLkfCS1Cdl30owlHMLbgk1pPuUYiAw+Wwuvda/Bl7ZGCAkOk1K301zEHAvXKugp 8ez/RAcywJhVtnZBpWb7+1c5SL0vsHYR04lYA4fF+F4NI2Uk9Y7daRNjbjkFrUr1zeK1SU xdspQqm3ty2VPlWOMmtJIpJddCiQrU97jGBJERDgZG3zwH6p7thgrURQX7RdT9qVnb9De0 YdlAOMBRxsxt6I8pSNG63nc4LKrF73hn3DQefGTsih20II/4yt1cr3bmGXBBPdF8vOtI/r BKbmoLs09zrEhUzJNJNMSANMNod/lZFcfmZi/A9Hlew1BDZILYNq1falTs/51A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683109563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z0inLDJVFF1fbJi4sDxdN/Xd+ZGfui/h/MGMh2wA0Ls=; b=bNx6ytIbIPeNZ0ZqIenT52N+eMb//u4cU2iHpkHWzqWEMWw3JczUqCtbqomcSWRIIn5zNE 4/JTzO6OXF1COOef+C/GJ43z2ulMzR0somzFiL/Ivd2FUdwxb4voC9NBmOEsH8csaFZL9N OJ2KLWwudp82+lfLe58b9VhASURFxQfG3aHsHU/7Sw4H4GNjyzMDvldmPBQbt0okpOvXeG yQKHis8y5iCczFak8ke8phYcT+RUrcbsax4+EFVVqK2LeIXUIZxr4+n/+iPdY3OD3m2J9h VM57et8rZDTA/u1AqB41kL95jK9/eC94oWQCYx0E97CzInpRc+B4irb1hcq4lA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683109563; a=rsa-sha256; cv=none; b=FuHly2Q+yAifyB7N3ikzRhyNukkeAs8hclBTWjPHahsXoAUCVXL08TlhYCQ73PC3FiLvnX 2R/DuriDIvm7Pff6ct84gZc10+LjGyc3hTVCpdArowOHgWrMMn0lNaJdlGvqL3mecsHll+ CPYndvJT2kURyLJPRecOJKwyXzM6Cg36GxUIsGcOXRPikPq83ImKmAg0OVCwoYlA/BRMhT CDtZ8getRdq0zBNdkr/GQYSNyvGg3HTAMJx8vdCYJbyKDQjLaDsgLJDvybkPmD/KcYxKWG uFQnCK5JR1K7P15DTBlg8ZQ7dEagHKCRgGLvlCFgsHP06tyt1kxrGtiBtAM9mg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBClZ6m1mzRRb; Wed, 3 May 2023 10:26:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343AQ2QX063823; Wed, 3 May 2023 10:26:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343APu5b063807; Wed, 3 May 2023 10:25:56 GMT (envelope-from git) Date: Wed, 3 May 2023 10:25:56 GMT Message-Id: <202305031025.343APu5b063807@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: d411c1d696ef - main - zfs: merge openzfs/zfs@d96e29576 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d411c1d696ef35d60f8c3564e5eef7aeafa2fece Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=d411c1d696ef35d60f8c3564e5eef7aeafa2fece commit d411c1d696ef35d60f8c3564e5eef7aeafa2fece Merge: 16303d2ba6b0 d96e29576c89 Author: Martin Matuska AuthorDate: 2023-05-03 10:04:55 +0000 Commit: Martin Matuska CommitDate: 2023-05-03 10:04:55 +0000 zfs: merge openzfs/zfs@d96e29576 Notable upstream pull request merges: #11680 Add support for zpool user properties #14145 Storage device expansion "silently" fails on degraded vdev #14405 Create zap for root vdev #14659 Allow MMP to bypass waiting for other threads #14674 Miscellaneous FreBSD compilation bugfixes #14692 Fix some signedness issues in arc_evict() #14702 Fix typo in check_clones() #14715 module: small fixes for FreeBSD/aarch64 #14716 Trim needless zeroes from checksum events #14719 vdev: expose zfs_vdev_max_ms_shift as a module parameter #14722 Fix "Detach spare vdev in case if resilvering does not happen" #14723 freebsd clone range fixes #14728 Fix BLAKE3 aarch64 assembly for FreeBSD and macOS #14735 Fix in check_filesystem() #14739 Fix data corruption when cloning embedded blocks #14758 Fix VERIFY(!zil_replaying(zilog, tx)) panic #14761 Revert "ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced()" #14774 FreeBSD .zfs fixups #14776 FreeBSD: make zfs_vfs_held() definition consistent with declaration #14779 powerpc64: Support ELFv2 asm on Big Endian #14788 FreeBSD: add missing vop_fplookup assignments #14789 PAM: support the authentication facility #14790 Revert "Fix data race between zil_commit() and zil_suspend()" #14795 Fix positive ABD size assertion in abd_verify() #14798 Mark TX_COMMIT transaction with TXG_NOTHROTTLE #14804 Correct ABD size for split block ZIOs #14806 Use correct block pointer in block cloning case. #14808 blake3: fix up bogus checksums in face of cpu migration Obtained from: OpenZFS OpenZFS commit: d96e29576c89e6e547cb82b477651d2b85ea0fed lib/libbe/be.c | 8 +- lib/libbe/be_access.c | 6 +- lib/libbe/be_info.c | 4 +- sys/contrib/openzfs/META | 2 +- sys/contrib/openzfs/cmd/zdb/zdb.c | 39 ++++++++- sys/contrib/openzfs/cmd/zfs/zfs_iter.c | 6 +- sys/contrib/openzfs/cmd/zfs/zfs_main.c | 47 ++++++---- sys/contrib/openzfs/cmd/zpool/zpool_main.c | 99 ++++++++++++++++------ sys/contrib/openzfs/config/kernel-acl.m4 | 34 ++++++-- .../openzfs/config/kernel-generic_fillattr.m4 | 33 ++++++-- sys/contrib/openzfs/config/kernel-inode-create.m4 | 41 +++++++-- sys/contrib/openzfs/config/kernel-inode-getattr.m4 | 63 ++++++++++---- .../openzfs/config/kernel-inode-permission.m4 | 35 ++++++-- sys/contrib/openzfs/config/kernel-inode-setattr.m4 | 87 +++++++++++++++++++ .../openzfs/config/kernel-is_owner_or_cap.m4 | 25 +++++- sys/contrib/openzfs/config/kernel-mkdir.m4 | 55 +++++++++--- sys/contrib/openzfs/config/kernel-mknod.m4 | 34 +++++++- sys/contrib/openzfs/config/kernel-rename.m4 | 56 ++++++++---- .../openzfs/config/kernel-setattr-prepare.m4 | 44 +++++++--- sys/contrib/openzfs/config/kernel-symlink.m4 | 33 ++++++-- sys/contrib/openzfs/config/kernel-tmpfile.m4 | 33 ++++++-- sys/contrib/openzfs/config/kernel-writepage_t.m4 | 26 ++++++ sys/contrib/openzfs/config/kernel-xattr-handler.m4 | 91 ++++++++++++-------- sys/contrib/openzfs/config/kernel.m4 | 8 +- .../openzfs/contrib/debian/control.modules.in | 4 +- .../contrib/dracut/90zfs/module-setup.sh.in | 3 + .../contrib/dracut/90zfs/zfs-env-bootfs.service.in | 15 +++- .../contrib/dracut/90zfs/zfs-generator.sh.in | 67 ++------------- .../openzfs/contrib/dracut/90zfs/zfs-lib.sh.in | 2 +- .../90zfs/zfs-nonroot-necessities.service.in | 20 +++++ .../dracut/90zfs/zfs-rollback-bootfs.service.in | 3 +- .../dracut/90zfs/zfs-snapshot-bootfs.service.in | 3 +- sys/contrib/openzfs/contrib/dracut/Makefile.am | 1 + sys/contrib/openzfs/contrib/initramfs/README.md | 25 +++++- sys/contrib/openzfs/contrib/initramfs/hooks/zfs.in | 3 + sys/contrib/openzfs/contrib/initramfs/scripts/zfs | 10 +++ .../openzfs/contrib/pam_zfs_key/pam_zfs_key.c | 67 +++++++++++---- sys/contrib/openzfs/include/libzfs.h | 26 ++++-- sys/contrib/openzfs/include/libzutil.h | 1 + .../include/os/freebsd/spl/sys/simd_aarch64.h | 6 +- .../openzfs/include/os/freebsd/spl/sys/types.h | 2 +- .../include/os/freebsd/zfs/sys/zfs_vnops_os.h | 10 +-- .../include/os/linux/kernel/linux/blkdev_compat.h | 2 +- .../include/os/linux/kernel/linux/vfs_compat.h | 21 ++++- .../include/os/linux/kernel/linux/xattr_compat.h | 17 +++- .../openzfs/include/os/linux/spl/sys/cred.h | 30 ++++--- .../openzfs/include/os/linux/spl/sys/isa_defs.h | 18 +++- .../openzfs/include/os/linux/spl/sys/types.h | 15 +++- .../openzfs/include/os/linux/zfs/sys/policy.h | 6 +- .../openzfs/include/os/linux/zfs/sys/trace_zil.h | 8 ++ .../include/os/linux/zfs/sys/zfs_vnops_os.h | 15 ++-- sys/contrib/openzfs/include/os/linux/zfs/sys/zpl.h | 13 ++- sys/contrib/openzfs/include/sys/dmu_objset.h | 7 ++ sys/contrib/openzfs/include/sys/dnode.h | 10 ++- sys/contrib/openzfs/include/sys/fs/zfs.h | 1 + sys/contrib/openzfs/include/sys/spa.h | 3 + sys/contrib/openzfs/include/sys/vdev_impl.h | 1 + sys/contrib/openzfs/include/sys/zfs_acl.h | 10 +-- sys/contrib/openzfs/include/zfeature_common.h | 1 + .../openzfs/lib/libspl/include/sys/isa_defs.h | 18 +++- sys/contrib/openzfs/lib/libzfs/libzfs.abi | 81 +++++++++++++++--- sys/contrib/openzfs/lib/libzfs/libzfs_changelist.c | 7 +- sys/contrib/openzfs/lib/libzfs/libzfs_crypto.c | 2 +- sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c | 18 ++-- sys/contrib/openzfs/lib/libzfs/libzfs_iter.c | 75 +++++++++++++--- sys/contrib/openzfs/lib/libzfs/libzfs_mount.c | 4 +- sys/contrib/openzfs/lib/libzfs/libzfs_pool.c | 1 + sys/contrib/openzfs/lib/libzfs/libzfs_sendrecv.c | 21 ++--- sys/contrib/openzfs/lib/libzfs/libzfs_util.c | 2 +- sys/contrib/openzfs/lib/libzutil/zutil_import.c | 5 +- sys/contrib/openzfs/man/man4/zfs.4 | 10 ++- sys/contrib/openzfs/man/man7/dracut.zfs.7 | 16 ++-- sys/contrib/openzfs/man/man7/zfsprops.7 | 12 ++- sys/contrib/openzfs/man/man7/zpool-features.7 | 16 ++++ sys/contrib/openzfs/man/man7/zpoolconcepts.7 | 64 +++++++------- sys/contrib/openzfs/module/Makefile.bsd | 10 +++ sys/contrib/openzfs/module/lua/ldo.c | 2 + sys/contrib/openzfs/module/lua/setjmp/setjmp.S | 2 + .../openzfs/module/lua/setjmp/setjmp_loongarch64.S | 82 ++++++++++++++++++ .../openzfs/module/os/freebsd/zfs/sysctl_os.c | 8 -- .../openzfs/module/os/freebsd/zfs/zfs_acl.c | 10 +-- .../openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 15 ++-- sys/contrib/openzfs/module/os/linux/spl/spl-cred.c | 12 +++ sys/contrib/openzfs/module/os/linux/zfs/policy.c | 13 +-- sys/contrib/openzfs/module/os/linux/zfs/zfs_acl.c | 36 ++++---- sys/contrib/openzfs/module/os/linux/zfs/zfs_dir.c | 4 +- .../openzfs/module/os/linux/zfs/zfs_ioctl_os.c | 4 + .../openzfs/module/os/linux/zfs/zfs_vfsops.c | 4 +- .../openzfs/module/os/linux/zfs/zfs_vnops_os.c | 35 ++++---- .../openzfs/module/os/linux/zfs/zfs_znode.c | 2 +- .../openzfs/module/os/linux/zfs/zpl_ctldir.c | 53 +++++++++--- sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c | 38 +++++++-- .../openzfs/module/os/linux/zfs/zpl_inode.c | 77 ++++++++++++----- .../openzfs/module/os/linux/zfs/zpl_xattr.c | 25 +++--- .../openzfs/module/zcommon/zfeature_common.c | 6 ++ sys/contrib/openzfs/module/zfs/arc.c | 8 +- sys/contrib/openzfs/module/zfs/dbuf.c | 3 +- sys/contrib/openzfs/module/zfs/mmp.c | 2 +- sys/contrib/openzfs/module/zfs/spa.c | 16 +++- sys/contrib/openzfs/module/zfs/spa_errlog.c | 12 +-- sys/contrib/openzfs/module/zfs/spa_misc.c | 29 ++++++- sys/contrib/openzfs/module/zfs/vdev.c | 50 +++++++++-- sys/contrib/openzfs/module/zfs/vdev_indirect.c | 7 +- sys/contrib/openzfs/module/zfs/vdev_label.c | 6 ++ sys/contrib/openzfs/module/zfs/vdev_queue.c | 3 + sys/contrib/openzfs/module/zfs/zfs_fm.c | 10 +-- sys/contrib/openzfs/module/zfs/zfs_replay.c | 14 +-- sys/contrib/openzfs/module/zfs/zfs_vnops.c | 4 +- sys/contrib/openzfs/module/zfs/zil.c | 9 +- sys/contrib/openzfs/tests/runfiles/common.run | 19 +++-- sys/contrib/openzfs/tests/runfiles/linux.run | 6 +- .../tests/test-runner/bin/test-runner.py.in | 34 ++++---- .../openzfs/tests/zfs-tests/tests/Makefile.am | 4 + .../functional/cli_root/zdb/zdb_encrypted.ksh | 4 +- .../functional/cli_root/zpool_get/vdev_get.cfg | 73 ++++++++++++++++ .../cli_root/zpool_get/vdev_get_001_pos.ksh | 62 ++++++++++++++ .../functional/cli_root/zpool_get/zpool_get.cfg | 1 + .../cli_root/zpool_set/vdev_set_001_pos.ksh | 52 ++++++++++++ .../tests/functional/rsend/send-c_volume.ksh | 9 +- .../tests/functional/vdev_zaps/vdev_zaps.kshlib | 13 +++ .../functional/vdev_zaps/vdev_zaps_001_pos.ksh | 3 +- .../functional/vdev_zaps/vdev_zaps_002_pos.ksh | 1 + .../functional/vdev_zaps/vdev_zaps_003_pos.ksh | 1 + .../functional/vdev_zaps/vdev_zaps_004_pos.ksh | 1 + .../functional/vdev_zaps/vdev_zaps_005_pos.ksh | 1 + .../functional/vdev_zaps/vdev_zaps_006_pos.ksh | 1 + .../functional/vdev_zaps/vdev_zaps_007_pos.ksh | 1 + .../functional/zvol/zvol_misc/zvol_misc_trim.ksh | 4 +- sys/modules/zfs/zfs_config.h | 64 ++++++++++++-- sys/modules/zfs/zfs_gitrev.h | 2 +- 130 files changed, 2034 insertions(+), 640 deletions(-) diff --cc lib/libbe/be.c index a5e053cb82df,000000000000..a27025684305 mode 100644,000000..100644 --- a/lib/libbe/be.c +++ b/lib/libbe/be.c @@@ -1,1309 -1,0 +1,1309 @@@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2017 Kyle J. Kneitinger + * + * 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 REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "be.h" +#include "be_impl.h" + +struct promote_entry { + char name[BE_MAXPATHLEN]; + SLIST_ENTRY(promote_entry) link; +}; + +struct be_destroy_data { + libbe_handle_t *lbh; + char target_name[BE_MAXPATHLEN]; + char *snapname; + SLIST_HEAD(, promote_entry) promotelist; +}; + +#if SOON +static int be_create_child_noent(libbe_handle_t *lbh, const char *active, + const char *child_path); +static int be_create_child_cloned(libbe_handle_t *lbh, const char *active); +#endif + +/* Arbitrary... should tune */ +#define BE_SNAP_SERIAL_MAX 1024 + +/* + * Iterator function for locating the rootfs amongst the children of the + * zfs_be_root set by loader(8). data is expected to be a libbe_handle_t *. + */ +static int +be_locate_rootfs(libbe_handle_t *lbh) +{ + struct statfs sfs; + struct mnttab entry; + zfs_handle_t *zfs; + + /* + * Check first if root is ZFS; if not, we'll bail on rootfs capture. + * Unfortunately needed because zfs_path_to_zhandle will emit to + * stderr if / isn't actually a ZFS filesystem, which we'd like + * to avoid. + */ + if (statfs("/", &sfs) == 0) { + statfs2mnttab(&sfs, &entry); + if (strcmp(entry.mnt_fstype, MNTTYPE_ZFS) != 0) + return (1); + } else + return (1); + zfs = zfs_path_to_zhandle(lbh->lzh, "/", ZFS_TYPE_FILESYSTEM); + if (zfs == NULL) + return (1); + + strlcpy(lbh->rootfs, zfs_get_name(zfs), sizeof(lbh->rootfs)); + zfs_close(zfs); + return (0); +} + +/* + * Initializes the libbe context to operate in the root boot environment + * dataset, for example, zroot/ROOT. + */ +libbe_handle_t * +libbe_init(const char *root) +{ + char altroot[MAXPATHLEN]; + libbe_handle_t *lbh; + char *poolname, *pos; + int pnamelen; + + lbh = NULL; + poolname = pos = NULL; + + if ((lbh = calloc(1, sizeof(libbe_handle_t))) == NULL) + goto err; + + if ((lbh->lzh = libzfs_init()) == NULL) + goto err; + + /* + * Grab rootfs, we'll work backwards from there if an optional BE root + * has not been passed in. + */ + if (be_locate_rootfs(lbh) != 0) { + if (root == NULL) + goto err; + *lbh->rootfs = '\0'; + } + if (root == NULL) { + /* Strip off the final slash from rootfs to get the be root */ + strlcpy(lbh->root, lbh->rootfs, sizeof(lbh->root)); + pos = strrchr(lbh->root, '/'); + if (pos == NULL) + goto err; + *pos = '\0'; + } else + strlcpy(lbh->root, root, sizeof(lbh->root)); + + if ((pos = strchr(lbh->root, '/')) == NULL) + goto err; + + pnamelen = pos - lbh->root; + poolname = malloc(pnamelen + 1); + if (poolname == NULL) + goto err; + + strlcpy(poolname, lbh->root, pnamelen + 1); + if ((lbh->active_phandle = zpool_open(lbh->lzh, poolname)) == NULL) + goto err; + free(poolname); + poolname = NULL; + + if (zpool_get_prop(lbh->active_phandle, ZPOOL_PROP_BOOTFS, lbh->bootfs, + sizeof(lbh->bootfs), NULL, true) != 0) + goto err; + + if (zpool_get_prop(lbh->active_phandle, ZPOOL_PROP_ALTROOT, + altroot, sizeof(altroot), NULL, true) == 0 && + strcmp(altroot, "-") != 0) + lbh->altroot_len = strlen(altroot); + + return (lbh); +err: + if (lbh != NULL) { + if (lbh->active_phandle != NULL) + zpool_close(lbh->active_phandle); + if (lbh->lzh != NULL) + libzfs_fini(lbh->lzh); + free(lbh); + } + free(poolname); + return (NULL); +} + + +/* + * Free memory allocated by libbe_init() + */ +void +libbe_close(libbe_handle_t *lbh) +{ + + if (lbh->active_phandle != NULL) + zpool_close(lbh->active_phandle); + libzfs_fini(lbh->lzh); + free(lbh); +} + +/* + * Proxy through to libzfs for the moment. + */ +void +be_nicenum(uint64_t num, char *buf, size_t buflen) +{ + + zfs_nicenum(num, buf, buflen); +} + +static bool +be_should_promote_clones(zfs_handle_t *zfs_hdl, struct be_destroy_data *bdd) +{ + char *atpos; + + if (zfs_get_type(zfs_hdl) != ZFS_TYPE_SNAPSHOT) + return (false); + + /* + * If we're deleting a snapshot, we need to make sure we only promote + * clones that are derived from one of the snapshots we're deleting, + * rather than that of a snapshot we're not touching. This keeps stuff + * in a consistent state, making sure that we don't error out unless + * we really need to. + */ + if (bdd->snapname == NULL) + return (true); + + atpos = strchr(zfs_get_name(zfs_hdl), '@'); + return (strcmp(atpos + 1, bdd->snapname) == 0); +} + +/* + * This is executed from be_promote_dependent_clones via zfs_iter_dependents, + * It checks if the dependent type is a snapshot then attempts to find any + * clones associated with it. Any clones not related to the destroy target are + * added to the promote list. + */ +static int +be_dependent_clone_cb(zfs_handle_t *zfs_hdl, void *data) +{ + int err; + bool found; + const char *name; + struct nvlist *nvl; + struct nvpair *nvp; + struct be_destroy_data *bdd; + struct promote_entry *entry, *newentry; + + nvp = NULL; + err = 0; + bdd = (struct be_destroy_data *)data; + + if (be_should_promote_clones(zfs_hdl, bdd) && + (nvl = zfs_get_clones_nvl(zfs_hdl)) != NULL) { + while ((nvp = nvlist_next_nvpair(nvl, nvp)) != NULL) { + name = nvpair_name(nvp); + + /* + * Skip if the clone is equal to, or a child of, the + * destroy target. + */ + if (strncmp(name, bdd->target_name, + strlen(bdd->target_name)) == 0 || + strstr(name, bdd->target_name) == name) { + continue; + } + + found = false; + SLIST_FOREACH(entry, &bdd->promotelist, link) { + if (strcmp(entry->name, name) == 0) { + found = true; + break; + } + } + + if (found) + continue; + + newentry = malloc(sizeof(struct promote_entry)); + if (newentry == NULL) { + err = ENOMEM; + break; + } + +#define BE_COPY_NAME(entry, src) \ + strlcpy((entry)->name, (src), sizeof((entry)->name)) + if (BE_COPY_NAME(newentry, name) >= + sizeof(newentry->name)) { + /* Shouldn't happen. */ + free(newentry); + err = ENAMETOOLONG; + break; + } +#undef BE_COPY_NAME + + /* + * We're building up a SLIST here to make sure both that + * we get the order right and so that we don't + * inadvertently observe the wrong state by promoting + * datasets while we're still walking the tree. The + * latter can lead to situations where we promote a BE + * then effectively demote it again. + */ + SLIST_INSERT_HEAD(&bdd->promotelist, newentry, link); + } + nvlist_free(nvl); + } + zfs_close(zfs_hdl); + return (err); +} + +/* + * This is called before a destroy, so that any datasets(environments) that are + * dependent on this one get promoted before destroying the target. + */ +static int +be_promote_dependent_clones(zfs_handle_t *zfs_hdl, struct be_destroy_data *bdd) +{ + int err; + zfs_handle_t *clone; + struct promote_entry *entry; + + snprintf(bdd->target_name, BE_MAXPATHLEN, "%s/", zfs_get_name(zfs_hdl)); - err = zfs_iter_dependents(zfs_hdl, 0, true, be_dependent_clone_cb, bdd); ++ err = zfs_iter_dependents(zfs_hdl, true, be_dependent_clone_cb, bdd); + + /* + * Drain the list and walk away from it if we're only deleting a + * snapshot. + */ + if (bdd->snapname != NULL && !SLIST_EMPTY(&bdd->promotelist)) + err = BE_ERR_HASCLONES; + while (!SLIST_EMPTY(&bdd->promotelist)) { + entry = SLIST_FIRST(&bdd->promotelist); + SLIST_REMOVE_HEAD(&bdd->promotelist, link); + +#define ZFS_GRAB_CLONE() \ + zfs_open(bdd->lbh->lzh, entry->name, ZFS_TYPE_FILESYSTEM) + /* + * Just skip this part on error, we still want to clean up the + * promotion list after the first error. We'll then preserve it + * all the way back. + */ + if (err == 0 && (clone = ZFS_GRAB_CLONE()) != NULL) { + err = zfs_promote(clone); + if (err != 0) + err = BE_ERR_DESTROYMNT; + zfs_close(clone); + } +#undef ZFS_GRAB_CLONE + free(entry); + } + + return (err); +} + +static int +be_destroy_cb(zfs_handle_t *zfs_hdl, void *data) +{ + char path[BE_MAXPATHLEN]; + struct be_destroy_data *bdd; + zfs_handle_t *snap; + int err; + + bdd = (struct be_destroy_data *)data; + if (bdd->snapname == NULL) { - err = zfs_iter_children(zfs_hdl, 0, be_destroy_cb, data); ++ err = zfs_iter_children(zfs_hdl, be_destroy_cb, data); + if (err != 0) + return (err); + return (zfs_destroy(zfs_hdl, false)); + } + /* If we're dealing with snapshots instead, delete that one alone */ - err = zfs_iter_filesystems(zfs_hdl, 0, be_destroy_cb, data); ++ err = zfs_iter_filesystems(zfs_hdl, be_destroy_cb, data); + if (err != 0) + return (err); + /* + * This part is intentionally glossing over any potential errors, + * because there's a lot less potential for errors when we're cleaning + * up snapshots rather than a full deep BE. The primary error case + * here being if the snapshot doesn't exist in the first place, which + * the caller will likely deem insignificant as long as it doesn't + * exist after the call. Thus, such a missing snapshot shouldn't jam + * up the destruction. + */ + snprintf(path, sizeof(path), "%s@%s", zfs_get_name(zfs_hdl), + bdd->snapname); + if (!zfs_dataset_exists(bdd->lbh->lzh, path, ZFS_TYPE_SNAPSHOT)) + return (0); + snap = zfs_open(bdd->lbh->lzh, path, ZFS_TYPE_SNAPSHOT); + if (snap != NULL) + zfs_destroy(snap, false); + return (0); +} + +#define BE_DESTROY_WANTORIGIN (BE_DESTROY_ORIGIN | BE_DESTROY_AUTOORIGIN) +/* + * Destroy the boot environment or snapshot specified by the name + * parameter. Options are or'd together with the possible values: + * BE_DESTROY_FORCE : forces operation on mounted datasets + * BE_DESTROY_ORIGIN: destroy the origin snapshot as well + */ +static int +be_destroy_internal(libbe_handle_t *lbh, const char *name, int options, + bool odestroyer) +{ + struct be_destroy_data bdd; + char origin[BE_MAXPATHLEN], path[BE_MAXPATHLEN]; + zfs_handle_t *fs; + char *snapdelim; + int err, force, mounted; + size_t rootlen; + + bdd.lbh = lbh; + bdd.snapname = NULL; + SLIST_INIT(&bdd.promotelist); + force = options & BE_DESTROY_FORCE; + *origin = '\0'; + + be_root_concat(lbh, name, path); + + if ((snapdelim = strchr(path, '@')) == NULL) { + if (!zfs_dataset_exists(lbh->lzh, path, ZFS_TYPE_FILESYSTEM)) + return (set_error(lbh, BE_ERR_NOENT)); + + if (strcmp(path, lbh->rootfs) == 0 || + strcmp(path, lbh->bootfs) == 0) + return (set_error(lbh, BE_ERR_DESTROYACT)); + + fs = zfs_open(lbh->lzh, path, ZFS_TYPE_FILESYSTEM); + if (fs == NULL) + return (set_error(lbh, BE_ERR_ZFSOPEN)); + + /* Don't destroy a mounted dataset unless force is specified */ + if ((mounted = zfs_is_mounted(fs, NULL)) != 0) { + if (force) { + zfs_unmount(fs, NULL, 0); + } else { + free(bdd.snapname); + return (set_error(lbh, BE_ERR_DESTROYMNT)); + } + } + } else { + /* + * If we're initially destroying a snapshot, origin options do + * not make sense. If we're destroying the origin snapshot of + * a BE, we want to maintain the options in case we need to + * fake success after failing to promote. + */ + if (!odestroyer) + options &= ~BE_DESTROY_WANTORIGIN; + if (!zfs_dataset_exists(lbh->lzh, path, ZFS_TYPE_SNAPSHOT)) + return (set_error(lbh, BE_ERR_NOENT)); + + bdd.snapname = strdup(snapdelim + 1); + if (bdd.snapname == NULL) + return (set_error(lbh, BE_ERR_NOMEM)); + *snapdelim = '\0'; + fs = zfs_open(lbh->lzh, path, ZFS_TYPE_DATASET); + if (fs == NULL) { + free(bdd.snapname); + return (set_error(lbh, BE_ERR_ZFSOPEN)); + } + } + + /* + * Whether we're destroying a BE or a single snapshot, we need to walk + * the tree of what we're going to destroy and promote everything in our + * path so that we can make it happen. + */ + if ((err = be_promote_dependent_clones(fs, &bdd)) != 0) { + free(bdd.snapname); + + /* + * If we're just destroying the origin of some other dataset + * we were invoked to destroy, then we just ignore + * BE_ERR_HASCLONES and return success unless the caller wanted + * to force the issue. + */ + if (odestroyer && err == BE_ERR_HASCLONES && + (options & BE_DESTROY_AUTOORIGIN) != 0) + return (0); + return (set_error(lbh, err)); + } + + /* + * This was deferred until after we promote all of the derivatives so + * that we grab the new origin after everything's settled down. + */ + if ((options & BE_DESTROY_WANTORIGIN) != 0 && + zfs_prop_get(fs, ZFS_PROP_ORIGIN, origin, sizeof(origin), + NULL, NULL, 0, 1) != 0 && + (options & BE_DESTROY_ORIGIN) != 0) + return (set_error(lbh, BE_ERR_NOORIGIN)); + + /* + * If the caller wants auto-origin destruction and the origin + * name matches one of our automatically created snapshot names + * (i.e. strftime("%F-%T") with a serial at the end), then + * we'll set the DESTROY_ORIGIN flag and nuke it + * be_is_auto_snapshot_name is exported from libbe(3) so that + * the caller can determine if it needs to warn about the origin + * not being destroyed or not. + */ + if ((options & BE_DESTROY_AUTOORIGIN) != 0 && *origin != '\0' && + be_is_auto_snapshot_name(lbh, origin)) + options |= BE_DESTROY_ORIGIN; + + err = be_destroy_cb(fs, &bdd); + zfs_close(fs); + free(bdd.snapname); + if (err != 0) { + /* Children are still present or the mount is referenced */ + if (err == EBUSY) + return (set_error(lbh, BE_ERR_DESTROYMNT)); + return (set_error(lbh, BE_ERR_UNKNOWN)); + } + + if ((options & BE_DESTROY_ORIGIN) == 0) + return (0); + + /* The origin can't possibly be shorter than the BE root */ + rootlen = strlen(lbh->root); + if (*origin == '\0' || strlen(origin) <= rootlen + 1) + return (set_error(lbh, BE_ERR_INVORIGIN)); + + /* + * We'll be chopping off the BE root and running this back through + * be_destroy, so that we properly handle the origin snapshot whether + * it be that of a deep BE or not. + */ + if (strncmp(origin, lbh->root, rootlen) != 0 || origin[rootlen] != '/') + return (0); + + return (be_destroy_internal(lbh, origin + rootlen + 1, + options & ~BE_DESTROY_ORIGIN, true)); +} + +int +be_destroy(libbe_handle_t *lbh, const char *name, int options) +{ + + /* + * The consumer must not set both BE_DESTROY_AUTOORIGIN and + * BE_DESTROY_ORIGIN. Internally, we'll set the latter from the former. + * The latter should imply that we must succeed at destroying the + * origin, or complain otherwise. + */ + if ((options & BE_DESTROY_WANTORIGIN) == BE_DESTROY_WANTORIGIN) + return (set_error(lbh, BE_ERR_UNKNOWN)); + return (be_destroy_internal(lbh, name, options, false)); +} + +static void +be_setup_snapshot_name(libbe_handle_t *lbh, char *buf, size_t buflen) +{ + time_t rawtime; + int len, serial; + + time(&rawtime); + len = strlen(buf); + len += strftime(buf + len, buflen - len, "@%F-%T", localtime(&rawtime)); + /* No room for serial... caller will do its best */ + if (buflen - len < 2) + return; + + for (serial = 0; serial < BE_SNAP_SERIAL_MAX; ++serial) { + snprintf(buf + len, buflen - len, "-%d", serial); + if (!zfs_dataset_exists(lbh->lzh, buf, ZFS_TYPE_SNAPSHOT)) + return; + } +} + +bool +be_is_auto_snapshot_name(libbe_handle_t *lbh __unused, const char *name) +{ + const char *snap; + int day, hour, minute, month, second, serial, year; + + if ((snap = strchr(name, '@')) == NULL) + return (false); + ++snap; + /* We'll grab the individual components and do some light validation. */ + if (sscanf(snap, "%d-%d-%d-%d:%d:%d-%d", &year, &month, &day, &hour, + &minute, &second, &serial) != 7) + return (false); + return (year >= 1970) && (month >= 1 && month <= 12) && + (day >= 1 && day <= 31) && (hour >= 0 && hour <= 23) && + (minute >= 0 && minute <= 59) && (second >= 0 && second <= 60) && + serial >= 0; +} + +int +be_snapshot(libbe_handle_t *lbh, const char *source, const char *snap_name, + bool recursive, char *result) +{ + char buf[BE_MAXPATHLEN]; + int err; + + be_root_concat(lbh, source, buf); + + if ((err = be_exists(lbh, buf)) != 0) + return (set_error(lbh, err)); + + if (snap_name != NULL) { + if (strlcat(buf, "@", sizeof(buf)) >= sizeof(buf)) + return (set_error(lbh, BE_ERR_INVALIDNAME)); + + if (strlcat(buf, snap_name, sizeof(buf)) >= sizeof(buf)) + return (set_error(lbh, BE_ERR_INVALIDNAME)); + + if (result != NULL) + snprintf(result, BE_MAXPATHLEN, "%s@%s", source, + snap_name); + } else { + be_setup_snapshot_name(lbh, buf, sizeof(buf)); + + if (result != NULL && strlcpy(result, strrchr(buf, '/') + 1, + sizeof(buf)) >= sizeof(buf)) + return (set_error(lbh, BE_ERR_INVALIDNAME)); + } + if ((err = zfs_snapshot(lbh->lzh, buf, recursive, NULL)) != 0) { + switch (err) { + case EZFS_INVALIDNAME: + return (set_error(lbh, BE_ERR_INVALIDNAME)); + + default: + /* + * The other errors that zfs_ioc_snapshot might return + * shouldn't happen if we've set things up properly, so + * we'll gloss over them and call it UNKNOWN as it will + * require further triage. + */ + if (errno == ENOTSUP) + return (set_error(lbh, BE_ERR_NOPOOL)); + return (set_error(lbh, BE_ERR_UNKNOWN)); + } + } + + return (BE_ERR_SUCCESS); +} + + +/* + * Create the boot environment specified by the name parameter + */ +int +be_create(libbe_handle_t *lbh, const char *name) +{ + int err; + + err = be_create_from_existing(lbh, name, be_active_path(lbh)); + + return (set_error(lbh, err)); +} + +static int +be_deep_clone_prop(int prop, void *cb) +{ + int err; + struct libbe_dccb *dccb; + zprop_source_t src; + char pval[BE_MAXPATHLEN]; + char source[BE_MAXPATHLEN]; + char *val; + + dccb = cb; + /* Skip some properties we don't want to touch */ + if (prop == ZFS_PROP_CANMOUNT) + return (ZPROP_CONT); + + /* Don't copy readonly properties */ + if (zfs_prop_readonly(prop)) + return (ZPROP_CONT); + + if ((err = zfs_prop_get(dccb->zhp, prop, (char *)&pval, + sizeof(pval), &src, (char *)&source, sizeof(source), false))) + /* Just continue if we fail to read a property */ + return (ZPROP_CONT); + + /* + * Only copy locally defined or received properties. This continues + * to avoid temporary/default/local properties intentionally without + * breaking received datasets. + */ + if (src != ZPROP_SRC_LOCAL && src != ZPROP_SRC_RECEIVED) + return (ZPROP_CONT); + + /* Augment mountpoint with altroot, if needed */ + val = pval; + if (prop == ZFS_PROP_MOUNTPOINT) + val = be_mountpoint_augmented(dccb->lbh, val); + + nvlist_add_string(dccb->props, zfs_prop_to_name(prop), val); + + return (ZPROP_CONT); +} + +/* + * Return the corresponding boot environment path for a given + * dataset path, the constructed path is placed in 'result'. + * + * example: say our new boot environment name is 'bootenv' and + * the dataset path is 'zroot/ROOT/default/data/set'. + * + * result should produce: 'zroot/ROOT/bootenv/data/set' + */ +static int +be_get_path(struct libbe_deep_clone *ldc, const char *dspath, char *result, int result_size) +{ + char *pos; + char *child_dataset; + + /* match the root path for the boot environments */ + pos = strstr(dspath, ldc->lbh->root); + + /* no match, different pools? */ + if (pos == NULL) + return (BE_ERR_BADPATH); + + /* root path of the new boot environment */ + snprintf(result, result_size, "%s/%s", ldc->lbh->root, ldc->bename); + + /* gets us to the parent dataset, the +1 consumes a trailing slash */ + pos += strlen(ldc->lbh->root) + 1; + + /* skip the parent dataset */ + if ((child_dataset = strchr(pos, '/')) != NULL) + strlcat(result, child_dataset, result_size); + + return (BE_ERR_SUCCESS); +} + +static int +be_clone_cb(zfs_handle_t *ds, void *data) +{ + int err; + char be_path[BE_MAXPATHLEN]; + char snap_path[BE_MAXPATHLEN]; + const char *dspath; + zfs_handle_t *snap_hdl; + nvlist_t *props; + struct libbe_deep_clone *ldc; + struct libbe_dccb dccb; + + ldc = (struct libbe_deep_clone *)data; + dspath = zfs_get_name(ds); + + snprintf(snap_path, sizeof(snap_path), "%s@%s", dspath, ldc->snapname); + + /* construct the boot environment path from the dataset we're cloning */ + if (be_get_path(ldc, dspath, be_path, sizeof(be_path)) != BE_ERR_SUCCESS) + return (BE_ERR_UNKNOWN); + + /* the dataset to be created (i.e. the boot environment) already exists */ + if (zfs_dataset_exists(ldc->lbh->lzh, be_path, ZFS_TYPE_DATASET)) + return (BE_ERR_EXISTS); + + /* no snapshot found for this dataset, silently skip it */ + if (!zfs_dataset_exists(ldc->lbh->lzh, snap_path, ZFS_TYPE_SNAPSHOT)) + return (0); + + if ((snap_hdl = + zfs_open(ldc->lbh->lzh, snap_path, ZFS_TYPE_SNAPSHOT)) == NULL) + return (BE_ERR_ZFSOPEN); + + nvlist_alloc(&props, NV_UNIQUE_NAME, KM_SLEEP); + nvlist_add_string(props, "canmount", "noauto"); + + dccb.lbh = ldc->lbh; + dccb.zhp = ds; + dccb.props = props; + if (zprop_iter(be_deep_clone_prop, &dccb, B_FALSE, B_FALSE, + ZFS_TYPE_FILESYSTEM) == ZPROP_INVAL) + return (-1); + + if ((err = zfs_clone(snap_hdl, be_path, props)) != 0) + return (BE_ERR_ZFSCLONE); + + nvlist_free(props); + zfs_close(snap_hdl); + + if (ldc->depth_limit == -1 || ldc->depth < ldc->depth_limit) { + ldc->depth++; - err = zfs_iter_filesystems(ds, 0, be_clone_cb, ldc); ++ err = zfs_iter_filesystems(ds, be_clone_cb, ldc); + ldc->depth--; + } + + return (err); +} + +/* + * Create a boot environment with a given name from a given snapshot. + * Snapshots can be in the format 'zroot/ROOT/default@snapshot' or + * 'default@snapshot'. In the latter case, 'default@snapshot' will be prepended + * with the root path that libbe was initailized with. +*/ +static int +be_clone(libbe_handle_t *lbh, const char *bename, const char *snapshot, int depth) +{ + int err; + char snap_path[BE_MAXPATHLEN]; + char *parentname, *snapname; *** 2351 LINES SKIPPED *** From nobody Wed May 3 10:41:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBD525Wt7z49C9r; Wed, 3 May 2023 10:41: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 4QBD524zMVz3PZ0; Wed, 3 May 2023 10:41:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683110470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1VMl2IL7xJhzduYtkenpFXS936VO0qBFijss3868g8M=; b=c4Veo9D7+xGrxp6IWyx0vuAq2N0HbFVli1sFYrPiIM1Q8ZNjbScd31KYc2smbkmEyyIlG2 HmOLT9ayzUPP0KtTgarvD5f94FeKy84lCldbl9+y/15dSW9o/GP0sF6ZIgCQjFM1TZGdk5 6tVf8lR4KSUIZORGnFr3pejvsjRW1DCJJbkJg4dBik3qDDnRaae5NafLOdsw/jWOhmCYer SopzytJOVaOtu8xlgG9P3BwkBlFBjEgMD2GYlXqlwSZ14H2cWEZL+FKQccjJS5rQwC/rv+ CF3GEEBc+KBUer48GyyllQ5LuJPxHtpUICC1/hHgdrz7vxv1pdAEMwN9eqtOKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683110470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1VMl2IL7xJhzduYtkenpFXS936VO0qBFijss3868g8M=; b=uY01ffaLT4wvvKM07G06g8LheHh6muljFpvlBKp/9B8DTU79iAxTAPqO7Zablt5JssGgc1 u9KTUAIcGjn7nHCxqFr5OP4JQmgssmXv0O0bc+dqvcqQ3GghGTiEZEXo7rv/M1FIyoSHgr 638v1S5O5gxZqG0C7OhuuXiKVcV5rbNlee3DspF+7Jt1t99Blw6hqcjck0r+rUgy3djBRk z7BVmG5Z8TUf+yWr973dvECpQRK0GvPc1zxP9KM3gatv5ABKddAvMLKpzhTLEVpY4pe0sH egxv2E/VclbU7FX2UF8LGA9XsNLZ6imDVApP11F0aiL0K50Gxh7H4Ps0yLHOAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683110470; a=rsa-sha256; cv=none; b=Xu3ERPgrYBfr0fd0wn8gsEHkU8sdO5Hb2VyJtRvZgB362EC2DHlagLyCFKtDs81eqPjLdE bC3dUl5JVLoNOgWlLCsFtZBkVVuaTb9DnLoY6QIF5cFzVMTbaPs02+oza6uS2omE7byMOl 511a/VdyZSPtyDjIj37p0iZkrDK0wO86E9DF0U/+X6edC0i7NzhmqxvESdndqq7DxLhhsN L/8hAaYUjRwI/miQ82rja13B4nJPkPUcl3+uuF1lEJhmdjmEp+My6I8gr+aujrg5iEB++/ fETeBmSIArC8SYEC2d74fBGGqw3OIt9yhQ5m8txDpW+JxvRp3JvzRjFYuZ/IzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBD5241xXzRXJ; Wed, 3 May 2023 10:41:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343AfAPX092454; Wed, 3 May 2023 10:41:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343AfAIk092453; Wed, 3 May 2023 10:41:10 GMT (envelope-from git) Date: Wed, 3 May 2023 10:41:10 GMT Message-Id: <202305031041.343AfAIk092453@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: a7e6ae2dc64b - stable/13 - Apply clang fix for assertion building emulators/rpcs3 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a7e6ae2dc64b313520adc6141e4cffb1fa962b66 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=a7e6ae2dc64b313520adc6141e4cffb1fa962b66 commit a7e6ae2dc64b313520adc6141e4cffb1fa962b66 Author: Dimitry Andric AuthorDate: 2023-04-28 14:08:42 +0000 Commit: Dimitry Andric CommitDate: 2023-05-03 08:18:46 +0000 Apply clang fix for assertion building emulators/rpcs3 Merge commit a5e1a93ea10f from llvm-project (by Mariya Podchishchaeva): [clang] Fix crash when handling nested immediate invocations Before this patch it was expected that if there was several immediate invocations they all belong to the same expression evaluation context. During parsing of non local variable initializer a new evaluation context is pushed, so code like this ``` namespace scope { struct channel { consteval channel(const char* name) noexcept { } }; consteval const char* make_channel_name(const char* name) { return name;} channel rsx_log(make_channel_name("rsx_log")); } ``` produced a nested immediate invocation whose subexpressions are attached to different expression evaluation contexts. The constructor call belongs to TU context and `make_channel_name` call to context of variable initializer. This patch removes this assumption and adds tracking of previously failed immediate invocations, so it is possible when handling an immediate invocation th check that its subexpressions from possibly another evaluation context contains errors and not produce duplicate diagnostics. Fixes https://github.com/llvm/llvm-project/issues/58207 Reviewed By: aaron.ballman, shafik Differential Revision: https://reviews.llvm.org/D146234 PR: 269489 MFC after: 3 days (cherry picked from commit 56f2446575c78d962b6dda5e3310bec078622f3d) --- .../llvm-project/clang/include/clang/Sema/Sema.h | 3 +++ contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp | 26 +++++++++++++++------- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/Sema/Sema.h b/contrib/llvm-project/clang/include/clang/Sema/Sema.h index 681a76dfa56a..53257a1bb028 100644 --- a/contrib/llvm-project/clang/include/clang/Sema/Sema.h +++ b/contrib/llvm-project/clang/include/clang/Sema/Sema.h @@ -1365,6 +1365,9 @@ public: /// A stack of expression evaluation contexts. SmallVector ExprEvalContexts; + // Set of failed immediate invocations to avoid double diagnosing. + llvm::SmallPtrSet FailedImmediateInvocations; + /// Emit a warning for all pending noderef expressions that we recorded. void WarnOnPendingNoDerefs(ExpressionEvaluationContextRecord &Rec); diff --git a/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp b/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp index 83081bbf0aa0..a8fe9a68c8cb 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp @@ -17529,6 +17529,7 @@ static void EvaluateAndDiagnoseImmediateInvocation( bool Result = CE->EvaluateAsConstantExpr( Eval, SemaRef.getASTContext(), ConstantExprKind::ImmediateInvocation); if (!Result || !Notes.empty()) { + SemaRef.FailedImmediateInvocations.insert(CE); Expr *InnerExpr = CE->getSubExpr()->IgnoreImplicit(); if (auto *FunctionalCast = dyn_cast(InnerExpr)) InnerExpr = FunctionalCast->getSubExpr(); @@ -17567,10 +17568,16 @@ static void RemoveNestedImmediateInvocation( [E](Sema::ImmediateInvocationCandidate Elem) { return Elem.getPointer() == E; }); - assert(It != IISet.rend() && - "ConstantExpr marked IsImmediateInvocation should " - "be present"); - It->setInt(1); // Mark as deleted + // It is possible that some subexpression of the current immediate + // invocation was handled from another expression evaluation context. Do + // not handle the current immediate invocation if some of its + // subexpressions failed before. + if (It == IISet.rend()) { + if (SemaRef.FailedImmediateInvocations.contains(E)) + CurrentII->setInt(1); + } else { + It->setInt(1); // Mark as deleted + } } ExprResult TransformConstantExpr(ConstantExpr *E) { if (!E->isImmediateInvocation()) @@ -17639,10 +17646,13 @@ HandleImmediateInvocations(Sema &SemaRef, SemaRef.RebuildingImmediateInvocation) return; - /// When we have more then 1 ImmediateInvocationCandidates we need to check - /// for nested ImmediateInvocationCandidates. when we have only 1 we only - /// need to remove ReferenceToConsteval in the immediate invocation. - if (Rec.ImmediateInvocationCandidates.size() > 1) { + /// When we have more than 1 ImmediateInvocationCandidates or previously + /// failed immediate invocations, we need to check for nested + /// ImmediateInvocationCandidates in order to avoid duplicate diagnostics. + /// Otherwise we only need to remove ReferenceToConsteval in the immediate + /// invocation. + if (Rec.ImmediateInvocationCandidates.size() > 1 || + !SemaRef.FailedImmediateInvocations.empty()) { /// Prevent sema calls during the tree transform from adding pointers that /// are already in the sets. From nobody Wed May 3 10:41:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBD5400tCz49C9t; Wed, 3 May 2023 10:41: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 4QBD536BZPz3PZG; Wed, 3 May 2023 10:41:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683110471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I1YRtQu3/teRW4eVVCyyfdY48wtEJdnBf4kykWiELHw=; b=EurN1iElF4gxiYYI7F/TjbmXiH0uuv51uWHTWb85oWW6MSvBkrMhJ4At9BXAfYxSztRKmS 3Kc4O/MkM/6wnEyHZGpq1QDesfvrjBk7zVC3/UsMcaRGU7UBjcWz4rzauBG/eSr7jL0Yao GbIhSKB/oYP6P6SSRyAAvaTq3jIqixeekQcWAkb5pXZlpSt0atkWRVYhWqVioKb8hoHb9S 3sCdmPJzJ/lc19aSr7L87HdUU54aRV6qxPyqzwuizk/cbYjmXwIjynNj4lLkvtfoSbVgCx M/wmvUyKZa4owitBUJRlXYIc6jVyYlsjBzWTePiEk/FZNRwwgrNZJfA7c54PzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683110471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I1YRtQu3/teRW4eVVCyyfdY48wtEJdnBf4kykWiELHw=; b=lRtKaHUHNcicAQdEC5rqSEri1ZK69nW2Be9N7imwbhrcKEkZoz3hcWMOgSawS/2OUgCEQe EUmqpBdZLmXrS4r0MCt8HcWxLvxEvqozZSJRH4K2AjTLaSdCMSVrcgCbuqSS8Cx3x3ag3E /TK32BxOy25xgI9ZOJu1saEXOF8tJbOzudI/1epjjNDi/wKw04aRBF1QzYKMTp9EPYGe27 63FY7HUTFaKdoxiIMBTuEocR1o6+lYoaRWuQ1aPMyr+BFcdn2SDPKgSgFdP/OJxgD8JDnK ddtgvUG0yJzy0DIRtC82BTPEVOBleDrp2VCkWQrm/U15yYf1+NyBhRmvoGW1Wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683110471; a=rsa-sha256; cv=none; b=teX0SLGsbMlaqkWih7nbBQXqbLI7UySvaRcc03ZSVNqLNlGfZgZjX9vHt66+QQ0f3sRXKg zymelANfPcGvdbVY5h/JM6VCvCaM7fZqqO6GLwnJgJEiC28ZW6K46UTn91h6FPGJ19wEn/ OP8gbX32wr9HmhHLEi3neOjrTRkbq7+nFs1NsKmM1ijoIjkr9UlHn3Kii5o1i4DDYchhAY 9xCBmCOur0feZPvqI1I/ammQNSBHEvrPSQGaLW3mxh7Bgmmbgl/O1xJ4qx82JgUzmv6nbx aYED37mm/gVMeHTIUwGcYrCQJN09PDG9rHdu/rKp8wP4A5nMvOKV16MhGOOA9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBD5350LlzRh1; Wed, 3 May 2023 10:41:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343AfBvV092475; Wed, 3 May 2023 10:41:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343AfBb9092474; Wed, 3 May 2023 10:41:11 GMT (envelope-from git) Date: Wed, 3 May 2023 10:41:11 GMT Message-Id: <202305031041.343AfBb9092474@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 387546f14b63 - stable/13 - zfs: make zfs_vfs_held() definition consistent with declaration List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 387546f14b638e07df72ef35589fb43d4309d294 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=387546f14b638e07df72ef35589fb43d4309d294 commit 387546f14b638e07df72ef35589fb43d4309d294 Author: Dimitry Andric AuthorDate: 2023-04-25 17:43:48 +0000 Commit: Dimitry Andric CommitDate: 2023-05-03 08:18:52 +0000 zfs: make zfs_vfs_held() definition consistent with declaration Noticed while attempting to change boolean_t into an actual bool: in include/sys/zfs_ioctl_impl.h, zfs_vfs_held() is declared to return a boolean_t, but in module/os/freebsd/zfs/zfs_ioctl_os.c it is defined to return an int. Make the definition match the declaration. Obtained from: https://github.com/openzfs/zfs/commit/62cc9d4f6 Reviewed by: jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D39753 (cherry picked from commit 64b5d74fffc8882d915e6e8de7e5fc893c606213) --- sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ioctl_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ioctl_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ioctl_os.c index 7f7e2b72c51a..effc11518c57 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ioctl_os.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ioctl_os.c @@ -59,7 +59,7 @@ zfs_vfs_ref(zfsvfs_t **zfvp) return (error); } -int +boolean_t zfs_vfs_held(zfsvfs_t *zfsvfs) { return (zfsvfs->z_vfs != NULL); From nobody Wed May 3 10:41:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBD553hYFz49CKD; Wed, 3 May 2023 10:41: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 4QBD550DHsz3Pyy; Wed, 3 May 2023 10:41:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683110473; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hRr/JT9yK4rbkic1zJbSeGzR/8djXlatW3LF+BisZOE=; b=wjBps/YTrxvzsFmg2kYdk5Hamv/gqMmGFtwZcrbJtImZrSlB013HPO4kXs1qZKJCymMX0d CJsqgrgUUysLwlC6hk5vn4MDxruOtBxQNy6MrAZbo2tKph4sLw4fltOJQUjzJThlDWk/SB 9O4Icz6BVcpbQdODt2Gsi0vWj9QhIU7sSp21BAnqZHpyp1gIVTxuqlTcHlPs1R4Dpbj1Ke 9Xi6fh0qmHmJMu6Zwx/DTBvDEKEyILMp9D1JvP4i0mSQVwWsnuZY/QdbwjR6OtamC38MmZ jePqMQhcldaaxUBJlkPcLBXuKEkpkeOSU4vkciLeK9E55b8+aNtfDKcAkbbJaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683110473; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hRr/JT9yK4rbkic1zJbSeGzR/8djXlatW3LF+BisZOE=; b=vrmrIGn7kePYDZSuadi5uc2y+sXSjY1JZoTQoaThv56RQkK8ZkXDMKH3a2PPAzHveJQALG KxnHMzRWJr9TGf8Juif68JzzZIslxbOVwTLQit4wS8Fdi5EWQRKV3pVqegcsmdyBB2jDlx y888zlPtbQOQE4mCuYutW7NfvwINOss9HIb/pSUGdf6rhp4tYSj6zH7JCHrcpa55saTTCa oJoVXwgngvdiI1E3tVHZzM1MCzAKgTczmJ3yr2rJqPHw/V2yUQ1RkgLVbP1F6qlfhSvaO1 iIbDswAoDC2QRyxhFhxOGQ3/DLunWBKsF993AHcOY8qTRW0Bbl8WZTXMaFfTeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683110473; a=rsa-sha256; cv=none; b=Ktv1dGk9erUwASmT5RlKmp+piCv9Ai4NATCJ7k+1bLhvz2SgRQXg4sbWh6FpZua/F8xc8F +GjXfImOZfHKKTkV3uT4mB9M1knHGyZP5udYQ2KE8zP4xQLuoatzywCRiDBr7xv0QKA7Cz mZBCkHtsy004b/0jyFgD5lqSBdm/4lKRE2oP31xs/46ARg+UkUb5CMgp9l6V49xAInaBaS duXonB0Q2r5a/T9EGGcMIBaGGY5m95bWdQ/y68oelcYdiC5RrnNwwD4mpqj/FTP29U6mbr hqeZIPRKqLNzTHY3jJNcZNe6hCiYXl1Od7ESfU7mQbS1a0SmgOtfXDEZtcOMCQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBD546QjRzRXK; Wed, 3 May 2023 10:41:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343AfCW4092494; Wed, 3 May 2023 10:41:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343AfCFN092493; Wed, 3 May 2023 10:41:12 GMT (envelope-from git) Date: Wed, 3 May 2023 10:41:12 GMT Message-Id: <202305031041.343AfCFN092493@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 35d8e035e22f - stable/13 - vm: fix a number of functions to match the expected prototypes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 35d8e035e22f4f79c28cdf713f7da94012a50b1b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=35d8e035e22f4f79c28cdf713f7da94012a50b1b commit 35d8e035e22f4f79c28cdf713f7da94012a50b1b Author: Dimitry Andric AuthorDate: 2023-04-25 17:52:26 +0000 Commit: Dimitry Andric CommitDate: 2023-05-03 09:32:57 +0000 vm: fix a number of functions to match the expected prototypes Noticed while attempting to make boolean_t unsigned: some vm-related function declarations and defintions were using boolean_t where they should have used int, and vice versa. MFC after: 1 week Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D39753 (cherry picked from commit f74be55e3045793a507d98127faf9aabd918e1ce) --- sys/vm/default_pager.c | 2 +- sys/vm/phys_pager.c | 2 +- sys/vm/sg_pager.c | 4 ++-- sys/vm/swap_pager.c | 2 +- sys/vm/vm_pager.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/vm/default_pager.c b/sys/vm/default_pager.c index d07a84f8c98e..b5b756741c73 100644 --- a/sys/vm/default_pager.c +++ b/sys/vm/default_pager.c @@ -54,7 +54,7 @@ static void default_pager_dealloc(vm_object_t); static int default_pager_getpages(vm_object_t, vm_page_t *, int, int *, int *); static void default_pager_putpages(vm_object_t, vm_page_t *, int, - boolean_t, int *); + int, int *); static boolean_t default_pager_haspage(vm_object_t, vm_pindex_t, int *, int *); diff --git a/sys/vm/phys_pager.c b/sys/vm/phys_pager.c index 6d7c5a4a7291..07ca6f0fc3de 100644 --- a/sys/vm/phys_pager.c +++ b/sys/vm/phys_pager.c @@ -269,7 +269,7 @@ phys_pager_populate(vm_object_t object, vm_pindex_t pidx, int fault_type, } static void -phys_pager_putpages(vm_object_t object, vm_page_t *m, int count, boolean_t sync, +phys_pager_putpages(vm_object_t object, vm_page_t *m, int count, int flags, int *rtvals) { diff --git a/sys/vm/sg_pager.c b/sys/vm/sg_pager.c index d7af2aed935a..bb2e8f39e219 100644 --- a/sys/vm/sg_pager.c +++ b/sys/vm/sg_pager.c @@ -56,7 +56,7 @@ static vm_object_t sg_pager_alloc(void *, vm_ooffset_t, vm_prot_t, static void sg_pager_dealloc(vm_object_t); static int sg_pager_getpages(vm_object_t, vm_page_t *, int, int *, int *); static void sg_pager_putpages(vm_object_t, vm_page_t *, int, - boolean_t, int *); + int, int *); static boolean_t sg_pager_haspage(vm_object_t, vm_pindex_t, int *, int *); @@ -211,7 +211,7 @@ sg_pager_getpages(vm_object_t object, vm_page_t *m, int count, int *rbehind, static void sg_pager_putpages(vm_object_t object, vm_page_t *m, int count, - boolean_t sync, int *rtvals) + int flags, int *rtvals) { panic("sg_pager_putpage called"); diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 372019affa46..1143fe935e72 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -426,7 +426,7 @@ static int swap_pager_getpages(vm_object_t, vm_page_t *, int, int *, int *); static int swap_pager_getpages_async(vm_object_t, vm_page_t *, int, int *, int *, pgo_getpages_iodone_t, void *); -static void swap_pager_putpages(vm_object_t, vm_page_t *, int, boolean_t, int *); +static void swap_pager_putpages(vm_object_t, vm_page_t *, int, int, int *); static boolean_t swap_pager_haspage(vm_object_t object, vm_pindex_t pindex, int *before, int *after); static void swap_pager_init(void); diff --git a/sys/vm/vm_pager.c b/sys/vm/vm_pager.c index cff8f5f9bdc3..ce7271f0dd57 100644 --- a/sys/vm/vm_pager.c +++ b/sys/vm/vm_pager.c @@ -129,7 +129,7 @@ dead_pager_putpages(vm_object_t object, vm_page_t *m, int count, rtvals[i] = VM_PAGER_AGAIN; } -static int +static boolean_t dead_pager_haspage(vm_object_t object, vm_pindex_t pindex, int *prev, int *next) { From nobody Wed May 3 10:41:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBD561X7tz49CPR; Wed, 3 May 2023 10:41: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 4QBD560gDfz3PvT; Wed, 3 May 2023 10:41:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683110474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AGnzuiN2auT8KI/uRva7BQiVLxSrMRUazGJ1luOHJQE=; b=tqPZ8UN8wz/ElGNHU4WHhd6JnW/c2Daeo9IULe0q0RwNootFz3DRBENssA6noPtxCMv039 xrAtAbnp1g2lTcBRNEwzuDQLo7KIJW2mIXxTd8yhSbLIt7t/EewlghP8g63AzwJTadzblN mG3VQcxVz1WPOfYJQEWMJ9c7qLxQcGy9oAK4UyiCq0GRrsISQBF29wWaYA+NL6psu8iMv4 J7kaWWNUW3pTTL38plEQIT//Nun135IHW2eX3q6iEHV8R/SbYPvRwSgBqUb14XVLhVs8sJ vjJTSOoiTSTkjZMqYJlPQrspyMkRCF7zqDHau8VJwFj3GN1MWbr3Sm0RE2kmYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683110474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AGnzuiN2auT8KI/uRva7BQiVLxSrMRUazGJ1luOHJQE=; b=r+D0Wwx8FnkAos04wurVjP2yIfB2lVaqF1RpSfAykgIi50k9TkYeD2mBHra0qyE9bADZbW MFkbTpb6gIzjSmE83orx+pYP32UvSbqeerEWpyVNeotg3yBGEuEVaER1J89US0WZWL3eJh 6OLCpjLucOwizo9JCTE+uiZ2NsjzXbT8eOD2cCN86rKSmu5vfZNVqp3BJSIqeEEr33Njgk kchYaZNbTo0Qpb43kJOVM/Al2DPYo1axaF/pbrdZ8ihNGIw7Heb4XxuLafDj1669tNKsux Rs3NHuwubzC/WvpLrAYXa6iuRoL/qdqsA2tCGYPmDDhYXmmb+JM1JkGrs3bMCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683110474; a=rsa-sha256; cv=none; b=hZ818powKIpJDBXw6CxHwG5UEt1o+wgkM/0qfs04mWwImNu6tChw1GK0N9mSVR3VtOPWWI cWwpQ2fjt0VFiAbzAYVevp7FT4PLVpZGODxrLzsEG5jczxTnGnhL7qX98Cpu00mYVAAaRR KTaciMkY9/2xTG2YVnCLRxob5JGCHgrxvVxfpO8Hw46GRPa8rH6pYlTfTv43XGMlg6uPtO 3QKMm0GtfE2V7sdLztRvGS3saoTJS/vb8jUgg/X9ymtNmb/UHXHBqXmH6VmQ/X1qlX7CNN REC6ryvJKM4DcQD01qn09UgkPz8JuIKqCDlyH6D1b8q1EVZIKyALAuNAfdRZjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBD556srlzS0F; Wed, 3 May 2023 10:41:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343AfDvH092514; Wed, 3 May 2023 10:41:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343AfDQw092513; Wed, 3 May 2023 10:41:13 GMT (envelope-from git) Date: Wed, 3 May 2023 10:41:13 GMT Message-Id: <202305031041.343AfDQw092513@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: f6d7ceb2baa3 - stable/13 - boolean_t: change to unsigned int to avoid signed bitfield warnings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f6d7ceb2baa3dba1503165e7482d370cb0e32d9a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=f6d7ceb2baa3dba1503165e7482d370cb0e32d9a commit f6d7ceb2baa3dba1503165e7482d370cb0e32d9a Author: Dimitry Andric AuthorDate: 2023-04-25 17:52:40 +0000 Commit: Dimitry Andric CommitDate: 2023-05-03 09:33:01 +0000 boolean_t: change to unsigned int to avoid signed bitfield warnings This is the final part, which actually makes boolean_t unsigned. Note that we do not change its size, nor do we try to change it directly to bool, since that results in a lot of regressions. Converting the remaining instances of boolean_t to plain C99 bool can now be done in a piecemeal fashion, after which boolean_t may hopefully be retired. MFC after: 1 week Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D39753 (cherry picked from commit 3029b0b0e9d68eb54e3bdd9e3e49e0f0d2d57835) --- sys/sys/types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/types.h b/sys/sys/types.h index 58abcf00cebb..4117ed60660d 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -271,7 +271,7 @@ typedef __vm_size_t vm_size_t; typedef __rman_res_t rman_res_t; #ifdef _KERNEL -typedef int boolean_t; +typedef unsigned int boolean_t; typedef struct _device *device_t; typedef __intfptr_t intfptr_t; From nobody Wed May 3 10:41:32 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBD5T2T2Kz49CWQ; Wed, 3 May 2023 10:41:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QBD5T1RVtz3R6c; Wed, 3 May 2023 10:41:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683110493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+oqnNuD2IUOqYlYYhqa2Y1IVl5XMeRsiyoPTMfLo7uI=; b=yq77suBcT0vCtLnO4qonUo6xztFHeOE6EZm2ef/I6YGk/pAnFm0n8gfqHVR8uuCiZOel4y eIezHcZqbLOllb6g7PU5VuPR/fusWvt8co3iNdQ9IVN9oe3N9JuuvL0OvOxIxvUxY6yPNx j+4VDORqx5w6iLgqxr9MRBiqhARghumaE9tajbbngeXWgenqSUbIu6ShKCjVzLs+NXIdYs oVVoigZ6bFFyoDFP3gx7L8XAIcXlQJWA95GWl6vxp+lBPL/zCiUAs5kEIGoKlTT/0pUzfh QYmYLqVoO2rH+Pk9eUGZr65QeB+548kHbnxMgYfMNIzEZYpZUDj8leokFXYmGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683110493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+oqnNuD2IUOqYlYYhqa2Y1IVl5XMeRsiyoPTMfLo7uI=; b=BxzYFTTfyjqzOCuI1YknjLYQM85DB9G5FuTcGNS/ul5lF/eeHB15/Oh1/jnVfZYLv4KZCg vCWwjWWB3N0/+0P+MUUKsEAmQidO/EWt+BSIt8mS/BvF25E2ZzbYRrfuJtZR5YCtq2iv3T xOmX8tmhNsVimtZL7LCahRtIBTFMr9rqhwlAQRtoQqX89zmm3FIDjK45F9RwXVQB5ebuqP araUBFROwEwPh1bQo0czPGbMGuzaBPvu5aJtBYUNpJB+5cVDS/0KyKy/KbT6p2sjCxppU8 dAZVjcsFhIcfbz+sspOifqfWSj9s1lZzU5R1VQY4UbfUHhlVMEpQu1D/2M9KsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683110493; a=rsa-sha256; cv=none; b=E2O+v54ylYgfQp1W8oOzJKwlWzo//fwia2AKrM02swooI3PCeM9FRr5J/9jTPzpTMyO7/5 G+TKfNWg3xKbP19OKTWG9foL9Ud+fokVF5ffaWEm7Gfv7NTRTXl71OQsUN7TNd5hmUWs2G Ihg1w2OgZxD4QxcK4stc/uPHB/R9NDDneR/muz3r2nEeVbzvmA4opPYmmN77c08oyzw1gO ADYNmfDRf4rd0ajsoZiUq10ULfx564Z1C7EHuFQYAY6BgnN+MQx5pPnNxFLIiNim+L1K9l JFc6DShtRmwFiQPIJASCSPlIIiZKaxVssLoUD34aTTiHJZbmK7AAh2OqUfeTNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBD5T0XS5zRFd; Wed, 3 May 2023 10:41:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343AfWDP092698; Wed, 3 May 2023 10:41:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343AfWki092697; Wed, 3 May 2023 10:41:32 GMT (envelope-from git) Date: Wed, 3 May 2023 10:41:32 GMT Message-Id: <202305031041.343AfWki092697@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 44f4aaee6be3 - stable/12 - Apply clang fix for assertion building emulators/rpcs3 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 44f4aaee6be33d7e2afe3ce0f0fb856e83da01d7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=44f4aaee6be33d7e2afe3ce0f0fb856e83da01d7 commit 44f4aaee6be33d7e2afe3ce0f0fb856e83da01d7 Author: Dimitry Andric AuthorDate: 2023-04-28 14:08:42 +0000 Commit: Dimitry Andric CommitDate: 2023-05-03 08:25:29 +0000 Apply clang fix for assertion building emulators/rpcs3 Merge commit a5e1a93ea10f from llvm-project (by Mariya Podchishchaeva): [clang] Fix crash when handling nested immediate invocations Before this patch it was expected that if there was several immediate invocations they all belong to the same expression evaluation context. During parsing of non local variable initializer a new evaluation context is pushed, so code like this ``` namespace scope { struct channel { consteval channel(const char* name) noexcept { } }; consteval const char* make_channel_name(const char* name) { return name;} channel rsx_log(make_channel_name("rsx_log")); } ``` produced a nested immediate invocation whose subexpressions are attached to different expression evaluation contexts. The constructor call belongs to TU context and `make_channel_name` call to context of variable initializer. This patch removes this assumption and adds tracking of previously failed immediate invocations, so it is possible when handling an immediate invocation th check that its subexpressions from possibly another evaluation context contains errors and not produce duplicate diagnostics. Fixes https://github.com/llvm/llvm-project/issues/58207 Reviewed By: aaron.ballman, shafik Differential Revision: https://reviews.llvm.org/D146234 PR: 269489 MFC after: 3 days (cherry picked from commit 56f2446575c78d962b6dda5e3310bec078622f3d) --- .../llvm-project/clang/include/clang/Sema/Sema.h | 3 +++ contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp | 26 +++++++++++++++------- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/Sema/Sema.h b/contrib/llvm-project/clang/include/clang/Sema/Sema.h index d8b2546b81a3..aaec49abfd5b 100644 --- a/contrib/llvm-project/clang/include/clang/Sema/Sema.h +++ b/contrib/llvm-project/clang/include/clang/Sema/Sema.h @@ -1314,6 +1314,9 @@ public: /// A stack of expression evaluation contexts. SmallVector ExprEvalContexts; + // Set of failed immediate invocations to avoid double diagnosing. + llvm::SmallPtrSet FailedImmediateInvocations; + /// Emit a warning for all pending noderef expressions that we recorded. void WarnOnPendingNoDerefs(ExpressionEvaluationContextRecord &Rec); diff --git a/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp b/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp index f04eb9199024..f84b3d9c468d 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp @@ -16642,6 +16642,7 @@ static void EvaluateAndDiagnoseImmediateInvocation( bool Result = CE->EvaluateAsConstantExpr( Eval, SemaRef.getASTContext(), ConstantExprKind::ImmediateInvocation); if (!Result || !Notes.empty()) { + SemaRef.FailedImmediateInvocations.insert(CE); Expr *InnerExpr = CE->getSubExpr()->IgnoreImplicit(); if (auto *FunctionalCast = dyn_cast(InnerExpr)) InnerExpr = FunctionalCast->getSubExpr(); @@ -16680,10 +16681,16 @@ static void RemoveNestedImmediateInvocation( [E](Sema::ImmediateInvocationCandidate Elem) { return Elem.getPointer() == E; }); - assert(It != IISet.rend() && - "ConstantExpr marked IsImmediateInvocation should " - "be present"); - It->setInt(1); // Mark as deleted + // It is possible that some subexpression of the current immediate + // invocation was handled from another expression evaluation context. Do + // not handle the current immediate invocation if some of its + // subexpressions failed before. + if (It == IISet.rend()) { + if (SemaRef.FailedImmediateInvocations.contains(E)) + CurrentII->setInt(1); + } else { + It->setInt(1); // Mark as deleted + } } ExprResult TransformConstantExpr(ConstantExpr *E) { if (!E->isImmediateInvocation()) @@ -16747,10 +16754,13 @@ HandleImmediateInvocations(Sema &SemaRef, SemaRef.RebuildingImmediateInvocation) return; - /// When we have more then 1 ImmediateInvocationCandidates we need to check - /// for nested ImmediateInvocationCandidates. when we have only 1 we only - /// need to remove ReferenceToConsteval in the immediate invocation. - if (Rec.ImmediateInvocationCandidates.size() > 1) { + /// When we have more than 1 ImmediateInvocationCandidates or previously + /// failed immediate invocations, we need to check for nested + /// ImmediateInvocationCandidates in order to avoid duplicate diagnostics. + /// Otherwise we only need to remove ReferenceToConsteval in the immediate + /// invocation. + if (Rec.ImmediateInvocationCandidates.size() > 1 || + !SemaRef.FailedImmediateInvocations.empty()) { /// Prevent sema calls during the tree transform from adding pointers that /// are already in the sets. From nobody Wed May 3 10:41:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBD5V49NBz49CTM; Wed, 3 May 2023 10:41:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QBD5V2Qqmz3R04; Wed, 3 May 2023 10:41:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683110494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OO7MgqiOXrC36Ulcmw+YWYRkCANRlFY8FnSTegc/Rjo=; b=l3yuHSc7SUatK5Dq+oqrh8QDXSaB5GG37TDC2vm4QSWGVrh2Fph8JiLXyE5zT5zfZUIUZV 3EX/gyg0kG8LoQC5rjEZuM9zbcr4YyDOFxg3wFWErnMN52exLOA4ck/0faSvvHZOc3ilYT HCMgBqIN8mMexAHLJ1W4KzkCuq0t5BiggTF/I9jVy20XCBFMgfFBpUqDHTJ4UMEu23YeAE AoJjcXjOI6pI/d6TBE7BFx636drQwmsiU/lBKsruhxj7yu85Nl8tcDin99Y8JC+WwUFdGJ i1GrKEmLe5o2l/N1JKCdbxtID7Yh/hOP3eFCOMHNwIh3G72WOpwVWX6tmvpU1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683110494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OO7MgqiOXrC36Ulcmw+YWYRkCANRlFY8FnSTegc/Rjo=; b=la7fNTeSIQdJnyjkOyDetA1Fhd0/7F0hUjaSnXIHWdx1pSTMk0SvhqZSGsNnTxfkTOPxBn yAQ0jsNjJ4EgTxHhIXP3vrMzvHyX9I4VgCF9UeX6Rn8Q7oSTE4a4Lb4ipYzlmS0BwWFXfq wvlqeRCHKPOYv5OPqYP/P5wHVQBNdvGYGpDNPTcDt4GjNefrMb7sOhPl0PtRm+I12AyEmq l+UTtRVPZKbKQkFA2ZVA0xedFTc56lBA100x8KbZKzfwCa+qWLPbbU4MK2IMBmvRdg0z8W wf4atyKKZBmZhzDLlPnUfy19lqrcbASF4XYSQSm2RaJbBNYykKYxHFo65hbvgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683110494; a=rsa-sha256; cv=none; b=Di/JvH1HZzU4m7uDps1ogvFpDQmgAruq2PMLL0BheuddC+VogHgTQ2ZGC1bjBqktDLwFAD iL/ZnWh3nG6dp6r1YyAknNwBwxRA/xHGvDDO3NEmMkqWXphZ+pznj3DR30WuQ6JeBJJ/Vv 81I6/HTiy0KFP8C8zARdofYQZif0k6nWFLLoNUyYIWWIk+7Z+vt6hX+uHn+4KFJpJLwAEV i0MBZlz9guiusxHlgEVvtH70ttvJFiAM6mbwFNTAyGNRf5eq3u0HJbvrm1gXIv0EY4UDnP 4HcR5oAyuX0qIOX9KBJVU8QwCVH9epVGdx0YUFKtga40fQBIdRlle0+uI1cJFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBD5V1VzGzRjl; Wed, 3 May 2023 10:41:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343AfYGK092717; Wed, 3 May 2023 10:41:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343AfY98092716; Wed, 3 May 2023 10:41:34 GMT (envelope-from git) Date: Wed, 3 May 2023 10:41:34 GMT Message-Id: <202305031041.343AfY98092716@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 3f527b4b8fd5 - stable/12 - vm: fix a number of functions to match the expected prototypes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 3f527b4b8fd5555e72d8cd3e388a28f0f7496e30 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=3f527b4b8fd5555e72d8cd3e388a28f0f7496e30 commit 3f527b4b8fd5555e72d8cd3e388a28f0f7496e30 Author: Dimitry Andric AuthorDate: 2023-04-25 17:52:26 +0000 Commit: Dimitry Andric CommitDate: 2023-05-03 09:36:32 +0000 vm: fix a number of functions to match the expected prototypes Noticed while attempting to make boolean_t unsigned: some vm-related function declarations and defintions were using boolean_t where they should have used int, and vice versa. MFC after: 1 week Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D39753 (cherry picked from commit f74be55e3045793a507d98127faf9aabd918e1ce) --- sys/vm/default_pager.c | 2 +- sys/vm/phys_pager.c | 2 +- sys/vm/sg_pager.c | 4 ++-- sys/vm/swap_pager.c | 2 +- sys/vm/vm_pager.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/vm/default_pager.c b/sys/vm/default_pager.c index 877e6441d596..b94279f0198b 100644 --- a/sys/vm/default_pager.c +++ b/sys/vm/default_pager.c @@ -53,7 +53,7 @@ static void default_pager_dealloc(vm_object_t); static int default_pager_getpages(vm_object_t, vm_page_t *, int, int *, int *); static void default_pager_putpages(vm_object_t, vm_page_t *, int, - boolean_t, int *); + int, int *); static boolean_t default_pager_haspage(vm_object_t, vm_pindex_t, int *, int *); diff --git a/sys/vm/phys_pager.c b/sys/vm/phys_pager.c index dfddbd81061b..5054a7d8e3f6 100644 --- a/sys/vm/phys_pager.c +++ b/sys/vm/phys_pager.c @@ -290,7 +290,7 @@ phys_pager_populate(vm_object_t object, vm_pindex_t pidx, int fault_type, } static void -phys_pager_putpages(vm_object_t object, vm_page_t *m, int count, boolean_t sync, +phys_pager_putpages(vm_object_t object, vm_page_t *m, int count, int flags, int *rtvals) { diff --git a/sys/vm/sg_pager.c b/sys/vm/sg_pager.c index a31c2bb8fd27..09e90dbf1f19 100644 --- a/sys/vm/sg_pager.c +++ b/sys/vm/sg_pager.c @@ -55,7 +55,7 @@ static vm_object_t sg_pager_alloc(void *, vm_ooffset_t, vm_prot_t, static void sg_pager_dealloc(vm_object_t); static int sg_pager_getpages(vm_object_t, vm_page_t *, int, int *, int *); static void sg_pager_putpages(vm_object_t, vm_page_t *, int, - boolean_t, int *); + int, int *); static boolean_t sg_pager_haspage(vm_object_t, vm_pindex_t, int *, int *); @@ -210,7 +210,7 @@ sg_pager_getpages(vm_object_t object, vm_page_t *m, int count, int *rbehind, static void sg_pager_putpages(vm_object_t object, vm_page_t *m, int count, - boolean_t sync, int *rtvals) + int flags, int *rtvals) { panic("sg_pager_putpage called"); diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 516be82c474f..d30c5a69ead1 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -369,7 +369,7 @@ static int swap_pager_getpages(vm_object_t, vm_page_t *, int, int *, int *); static int swap_pager_getpages_async(vm_object_t, vm_page_t *, int, int *, int *, pgo_getpages_iodone_t, void *); -static void swap_pager_putpages(vm_object_t, vm_page_t *, int, boolean_t, int *); +static void swap_pager_putpages(vm_object_t, vm_page_t *, int, int, int *); static boolean_t swap_pager_haspage(vm_object_t object, vm_pindex_t pindex, int *before, int *after); static void swap_pager_init(void); diff --git a/sys/vm/vm_pager.c b/sys/vm/vm_pager.c index 3864c9dfc1c4..fd39ddbcd728 100644 --- a/sys/vm/vm_pager.c +++ b/sys/vm/vm_pager.c @@ -123,7 +123,7 @@ dead_pager_putpages(vm_object_t object, vm_page_t *m, int count, rtvals[i] = VM_PAGER_AGAIN; } -static int +static boolean_t dead_pager_haspage(vm_object_t object, vm_pindex_t pindex, int *prev, int *next) { From nobody Wed May 3 10:41:35 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBD5W4GBQz49C6J; Wed, 3 May 2023 10:41: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 4QBD5W3MC5z3R7J; Wed, 3 May 2023 10:41:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683110495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zDH7tm1TQW/1zr5Ehv5qHKFO3iF2KMTkydT7cVAKwrU=; b=vYuqhyvGXIdcNzyaSZtR2zIJb15tL6/LqdWTAEIGpOzmABpr0xk8TdrS4mye3nC0mvzYon XDntBtTqdpTHwZL6E0APSfW/cmZog7yqM6DJOcxQJTY1WqkZtW71euo3MlaLGWA8B2AwRl E9v61ycKaxOZPr7ci5E+jzJdznGC04DZzR3jtZEkiBgBBg56gieJefoPVcBsolvaeKnSSQ 3Uj/JNPK5aRYHg4mNNvO78/ULt4tTJwXGX6C5nlzFFxQdmSS6Gxjor6GNNdOlsehrGfES7 EVyT+EHBxMZe49wwWDDdvg2+A+/YDwshskwBeHOhi9YxazhSw4yUiTdHxv+wow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683110495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zDH7tm1TQW/1zr5Ehv5qHKFO3iF2KMTkydT7cVAKwrU=; b=LaFLzlhRrUxysNZpY7bcJl9pmL60NDrEisxHd9BQVRQQ9M/gRFS8+xqwOvARG/IbgW1OMa l/CStq73Q8/sgxp3x/IDimLnuhCe1+nJhK+PP/wdJZo2yG6T31TFzSo281y5flsn/Z3m6A qPF6h9yrTQzSOvOT2zVGUkFzGeor0QwUhyA1hxSz+Sn0lJJuuYHw9PbR9EFQ2nXT6jjHZO lwV7khn86MRAOAwAfNLGS4/B6Cl71npcJDvIJw7kSkoahBpkyO1eoV5h/k3Gk7lllkNOGI lb6UAqVf3O/swLwN5yj7cAjOrTm7bvDfbf/t4n8+ZtB1h7C4Na9+XPMr5DpQzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683110495; a=rsa-sha256; cv=none; b=naC3WdLmU7TMhihPRNKSOM3+pV7y6yHICY9Cz0fBOe2a1xVVYIZ+dGFWPA+0GIk4T1IAn1 4JtBNnoh9FOopOHBwSDYnjJv1jMk0pE2mTxfZXi1wlw3GItjUb4bI7KFnfLDTMc/S6J+ce AtgZX22O+zFvNId3Emg94rcSzWuLKD5PlQvxi+3qiSZ30HaYAR6sfyXUAv3nkWMZMpTd+K iq5L71Ewf/J/oImOTidHZM1U5LSPwMtmTPDOY405FcfdFlqvhcnJQnH8nGBPuLPyNobqzH X4PHR7Cqtzs4w9FUdxq77iMJ7t2ZsAPXiKMbgyhPI1jGGHTTEpnKfszXTOO3PQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBD5W2R58zRXP; Wed, 3 May 2023 10:41:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343AfZ7Y092738; Wed, 3 May 2023 10:41:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343AfZSW092737; Wed, 3 May 2023 10:41:35 GMT (envelope-from git) Date: Wed, 3 May 2023 10:41:35 GMT Message-Id: <202305031041.343AfZSW092737@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: c3da468befd3 - stable/12 - boolean_t: change to unsigned int to avoid signed bitfield warnings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: c3da468befd3c3c4dd5d24cca9c9b2b98998d74c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=c3da468befd3c3c4dd5d24cca9c9b2b98998d74c commit c3da468befd3c3c4dd5d24cca9c9b2b98998d74c Author: Dimitry Andric AuthorDate: 2023-04-25 17:52:40 +0000 Commit: Dimitry Andric CommitDate: 2023-05-03 09:36:36 +0000 boolean_t: change to unsigned int to avoid signed bitfield warnings This is the final part, which actually makes boolean_t unsigned. Note that we do not change its size, nor do we try to change it directly to bool, since that results in a lot of regressions. Converting the remaining instances of boolean_t to plain C99 bool can now be done in a piecemeal fashion, after which boolean_t may hopefully be retired. MFC after: 1 week Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D39753 (cherry picked from commit 3029b0b0e9d68eb54e3bdd9e3e49e0f0d2d57835) --- sys/sys/types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/types.h b/sys/sys/types.h index 0b8887912509..72889f3d5a93 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -269,7 +269,7 @@ typedef __vm_size_t vm_size_t; typedef __rman_res_t rman_res_t; #ifdef _KERNEL -typedef int boolean_t; +typedef unsigned int boolean_t; typedef struct device *device_t; typedef __intfptr_t intfptr_t; From nobody Wed May 3 14:03:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBJZn0B1zz49NHf; Wed, 3 May 2023 14:03: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 4QBJZm6hdwz3xF1; Wed, 3 May 2023 14:03:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683122624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kd+dpIqXbyltQVLoS+vhhzpKUk28EAsLuowcTL2NkjI=; b=VoOj+d/V8ho26dv++Bj/qbijv0OSfWUSFD9Mk7KpQGuznpOEGIwV3xP2/7Z8184vALljfJ 0HRt4+dPqizwJu3YG/WjNG9aFeSEmt/cI2IOup7WMToUAv/WBaExTBkl8aD3lp5jawPIIA y2/MvjdQ7ztUC4T1DhYYzQXEoDzieYTWss1w+KGMCuzbG5f7xw7I8YLsWjGxlcCpk1IZEf gld+F5+q7YO/WaYR8f99pXJhE5aBnX0KRnqSNCeTTsMJZB4v90o6s0TZ43H2e3H/TqVsG6 yeGw37w6unI0F4iR8nYfenoSkc73t7YpPqNctlNUO1hHhX0GjbQpKg2avKpXeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683122624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kd+dpIqXbyltQVLoS+vhhzpKUk28EAsLuowcTL2NkjI=; b=oJ2rVPODjz/WxE6DwqRhvk5aHz8nZw0usp7JT0sS98mewn3JV2OKOaxfI1DxmfRqoD40VK ouJ0hjAATId7QewYl8bB+h8Si9aLqhp7ef3gs2OCNYio2MAH/3Mvt72tcE+WAfQBuxJqDd Q807BzvNe4htJ8qVe+/AcaN9Yd3aneJRGxtOwX9l/hQMbBTH2J+LR2gzni1tts3cEvivu7 u+ggrEmSUS0LyXMNK+DzNtlKHVZROCtFarKrf4s8hK0v+EXosmIehwUikLPBgfZgjNThg4 FhpoYYinHon3Q/acCWURH1HGw7PC+stKZDx7cMru3Hcm402hNi+JiueTl6S4Hg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683122624; a=rsa-sha256; cv=none; b=aCGcR06PGTR5jhaVePo5tNQpTsOF7Jn+hp2drqN+F9xNnT9mNLXTcEIGkCQoM8H2tEfj3w 4VW1ghPWXxpEax83qFgIQD2Xn1mczp5mEwSyh0d4RGD6eeSNxh3XwpU0sodh5w4QNbqpQL Qh9KO5N7cHLdJIeqBk1IlpeFpwtlapUU271WbxyNb9gZWAdpOj2LxFq3oCFWlfsZSFC4uj +GCz41lNlPV8YWEON1TDcpYLNVKnUPP4TmRQqm7rDs3TW8are1n3ADfjbJaGDM2ClDp2QX S0k05qHGWQgRWVbaOqInQqBn5+kS7oY47BB5OFj6lpR0bRxlnPjWKuRORW1kuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBJZm5mcFzXvL; Wed, 3 May 2023 14:03:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343E3ih8026297; Wed, 3 May 2023 14:03:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343E3iNN026296; Wed, 3 May 2023 14:03:44 GMT (envelope-from git) Date: Wed, 3 May 2023 14:03:44 GMT Message-Id: <202305031403.343E3iNN026296@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: 81f964e2ffb7 - main - authpf: do not sprintf to a null pointer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 81f964e2ffb7cd5d30df0a5c3877900cca4fdd07 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=81f964e2ffb7cd5d30df0a5c3877900cca4fdd07 commit 81f964e2ffb7cd5d30df0a5c3877900cca4fdd07 Author: Ed Maste AuthorDate: 2023-05-03 13:26:42 +0000 Commit: Ed Maste CommitDate: 2023-05-03 14:03:27 +0000 authpf: do not sprintf to a null pointer The fgetln loop will terminate with buf = NULL at EOF. Reported by: GCC Reviewed by: kp MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39947 --- contrib/pf/authpf/authpf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/contrib/pf/authpf/authpf.c b/contrib/pf/authpf/authpf.c index 4032efb27895..5ffa5b9cfe43 100644 --- a/contrib/pf/authpf/authpf.c +++ b/contrib/pf/authpf/authpf.c @@ -566,9 +566,8 @@ allowed_luser(struct passwd *pw) syslog(LOG_INFO, "denied access to %s: not listed in %s", pw->pw_name, PATH_ALLOWFILE); - /* reuse buf */ - sprintf(buf, "%s", "\n\nSorry, you are not allowed to use this facility!\n"); - fputs(buf, stdout); + fputs("\n\nSorry, you are not allowed to use this facility!\n", + stdout); } fflush(stdout); return (0); From nobody Wed May 3 14:33:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBKDb6QYBz49PN6; Wed, 3 May 2023 14:33: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 4QBKDb5fBlz40wW; Wed, 3 May 2023 14:33:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683124383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KKN77LXdtWtHLVkx4imlRAZQdznEPsb+PKe4k/ler/Q=; b=KEm+cqAFXmyRIdYjKM5rJ/LLYxXMtKePTOziyqSC9mlUHm5D+/OTGusk4pz8/jixCVJVyW nUP0mB5K93+BwPebXxKb6eRs0TV/W6o0dbmdl6BOd7hxLItpMm/p0rKsUJ+SMh3V9AF3nV HfZ/ti+UUfrNB8E8+XncTTRiOBeTVdUV+1sCP89WWELu/74nFYySegqvAlb5RUdrOCJMYp B94iy+TEUm+C4/sGIxIM3WNeGkNk192PYNkBN/TsqAmz+JOrf9tXkhITkV/7ZX6yRwZ/Ud hhWUV900G7GQkZDfIlUsSIxnFI8f7kjYsZlfmgbPtsh0rjy+yMVpDpYce/BjPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683124383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KKN77LXdtWtHLVkx4imlRAZQdznEPsb+PKe4k/ler/Q=; b=Ywl/FDp+nvuYpJi2skosnTDlTNwt7SgB/3xGbYOf/xpHv2wQTrAx0b8zRIfJLGIUSB/c/U RqctF23l11V6r5C/5nek4g80wtkE/7iHCK+Ns/WxVetkZIJVlv6og55fjpW4lE3rMqS2Lg vx0OJ/fs+NGs070X/B/Vxrzk3ZDQtjVoMj5PHlUXidXcfEOJacgS5prqMOOyUkNOUI+XBT +EtIPLIA0ZQ6n8kDOPkNMbYndHvqq9C0YnEjJZ+OgA20y+qG/X6lIDeiaAdx73q0z6YaZn Ya+IAzVafz5XWkmzI/QWv18urns5oDowTDML/Ro90SoJoAhDbsHxyUj802xcnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683124383; a=rsa-sha256; cv=none; b=FzJvq6lRTokifd+0HucLPiS3QTV/9xhAhRCaDEzdkS0YFqIzl3aVXNIWfAtFyMeOrlIihG O1PKDDOCNewjKGQmiHuRdl9SyDAQUp3curXWW5uMs+pPFzn1svBg+zFakBHVvTX7Jl/3h9 5wusn1JEXj1TaBAyPbJYQx7WFzjs80YaacCj4P5YtyHjtzqz2l0RFPvjT3efPyt/jGVCD3 Hh3sdPK0yIvPcM0MGHymUxtZi0x5mHv+Dq0Gp5AYFDRabLXHhrM+ndncgEcMHHwbZFiQN/ wAs3/2DyAY+a6YuC6NJRd3GSONLabU5UWVbtr1IhQZoZWfW1fABTRdA2Xv/xWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBKDb4jDlzYqC; Wed, 3 May 2023 14:33:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343EX3d3075273; Wed, 3 May 2023 14:33:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343EX3j9075272; Wed, 3 May 2023 14:33:03 GMT (envelope-from git) Date: Wed, 3 May 2023 14:33:03 GMT Message-Id: <202305031433.343EX3j9075272@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 22028f12f1ed - stable/12 - powerpc: fix another pmap related function to return the correct type List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 22028f12f1ed39cf556dc477f6b34989dc5e176d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=22028f12f1ed39cf556dc477f6b34989dc5e176d commit 22028f12f1ed39cf556dc477f6b34989dc5e176d Author: Dimitry Andric AuthorDate: 2023-05-03 14:31:11 +0000 Commit: Dimitry Andric CommitDate: 2023-05-03 14:31:11 +0000 powerpc: fix another pmap related function to return the correct type Missed one prototype while cherry-picking commit d14260188752. Fixes: e9e1f2a88e4b --- sys/powerpc/powerpc/pmap_dispatch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/powerpc/powerpc/pmap_dispatch.c b/sys/powerpc/powerpc/pmap_dispatch.c index 424162a50444..5b6b166e656b 100644 --- a/sys/powerpc/powerpc/pmap_dispatch.c +++ b/sys/powerpc/powerpc/pmap_dispatch.c @@ -224,7 +224,7 @@ pmap_is_referenced(vm_page_t m) return (MMU_IS_REFERENCED(mmu_obj, m)); } -boolean_t +int pmap_ts_referenced(vm_page_t m) { From nobody Wed May 3 15:34:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBLZz1nqXz48y7n; Wed, 3 May 2023 15:34: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 4QBLZz14Djz462Y; Wed, 3 May 2023 15:34:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683128043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nXLLHM7qGn5YRdjbLOmeaVWGLXRhZ8S1TRRvvq7VL4I=; b=j8A2SMPLqjQ20TbpF5roqP/MHV66XQOwGWpcaSBT8sK5m9odO/1qL6etpM8aGRS5KaFgUP I2ruQSe9YSskC85H0eFzu75rQgWXeWGgWgAeEsXKfM/PB+R108zcWv/RMUU8DFNOwq/SzB 1lQapGrfPUz7wf4j2o0jx8T4J2clrGgjyvpPD7fnprEOeQ5a5VOCz7dGYNggN4hD7bJoLp XXug2R+FeYiS+IXWcN0newvv3YTIC99C0cKP+Z3DiAswuRbIKcMYKpzLgVKbxgzRFaIBE3 q10bnK1MqSIr/cIkgUshVgTQyIRnmksdzYx1Wz35elJ5S7Wo9mXJBvapUCTNkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683128043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nXLLHM7qGn5YRdjbLOmeaVWGLXRhZ8S1TRRvvq7VL4I=; b=YTTuFRG6k37wmfOCU93gDz4mOYuNGltdx/VHlzg3yb4QKRrjez0dSaUY1Tet6rbnMJhLYk kAXBzEQUyH+cE7nSbX4yrzlIucbDVLSQ2qAA/drI0HzH1mgGgbDGXdttJjuMWd5WaeydJ1 gmpl6ymIq4uKSIHPkSiaza78TaoQR1HYkDUGsNQNMz10OTTvXOefiqNEHq5OdBv2T0cmED L1omGeeAtvHXzoOUApqA7GqoyD+H6rwLpHelbp85ghY7VglRxQSBj/ABBkwXiEcXx7U6Z6 d3VL66qqg750Dyef1Mqp8KGLOcVrmN8zSH1o320MxHHbsCzJD+Wu2L+RuvaYwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683128043; a=rsa-sha256; cv=none; b=xlkpyxXouXuBT6YAhYfZr771eERx866lnYV4TY+7QKoqVbUoFu2rE8Uzg5yRnFZe+78egU DZfYOse7nImYGBcd62c9MwtgDBPt2XkqLZAXBRX6+ajrStKGxzrXlf3wkU9ZPKIPJddvDl tOd2XLM656K74wkaZGco34jiSE2Xrt+CS+ak+OpAzDgbMdklOpgRuUCdqnjRubXgVy8XNr 7Svspe9diHd0vhXRPoFpYvuPL2AytBk2y00aTSliJYonJ4f7FgQ8Bi0iiYFvFB8NfA7ZhS L8th8xEZZyDBRmTamg+/Cfcg/5lPPjFZ0aEG+EopMg7oprbY4s1+pl1ovUDURw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBLZz07g2zbRw; Wed, 3 May 2023 15:34:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343FY2OI074325; Wed, 3 May 2023 15:34:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343FY2Zu074324; Wed, 3 May 2023 15:34:02 GMT (envelope-from git) Date: Wed, 3 May 2023 15:34:02 GMT Message-Id: <202305031534.343FY2Zu074324@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: d9ae4adff271 - main - sctp: improve shutdown(..., SHUT_WR) handling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d9ae4adff2715cfab4a941037ec15aa07108efa1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=d9ae4adff2715cfab4a941037ec15aa07108efa1 commit d9ae4adff2715cfab4a941037ec15aa07108efa1 Author: Michael Tuexen AuthorDate: 2023-05-03 15:30:50 +0000 Commit: Michael Tuexen CommitDate: 2023-05-03 15:33:49 +0000 sctp: improve shutdown(..., SHUT_WR) handling When shutdown(..., SHUT_WR) is called in the front states, send a SHUTDOWN chunk when a COOKIE ACK chunk is received and there is no outstanding data. MFC after: 1 week --- sys/netinet/sctp_input.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 26abf4953164..fc362d091a22 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -2782,16 +2782,13 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *cp SCTP_UNUSED, __LINE__); } sctp_stop_all_cookie_timers(stcb); + sctp_toss_old_cookies(stcb, asoc); /* process according to association state */ if (SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_ECHOED) { /* state change only needed when I am in right state */ SCTPDBG(SCTP_DEBUG_INPUT2, "moving to OPEN state\n"); SCTP_SET_STATE(stcb, SCTP_STATE_OPEN); sctp_start_net_timers(stcb); - if (asoc->state & SCTP_STATE_SHUTDOWN_PENDING) { - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, NULL); - } /* update RTO */ SCTP_STAT_INCR_COUNTER32(sctps_activeestab); SCTP_STAT_INCR_GAUGE32(sctps_currestab); @@ -2815,6 +2812,21 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *cp SCTP_UNUSED, } } + if ((asoc->state & SCTP_STATE_SHUTDOWN_PENDING) && + TAILQ_EMPTY(&asoc->send_queue) && + TAILQ_EMPTY(&asoc->sent_queue) && + (asoc->stream_queue_cnt == 0)) { + SCTP_STAT_DECR_GAUGE32(sctps_currestab); + SCTP_SET_STATE(stcb, SCTP_STATE_SHUTDOWN_SENT); + sctp_stop_timers_for_shutdown(stcb); + sctp_send_shutdown(stcb, net); + sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWN, + stcb->sctp_ep, stcb, net); + sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, + stcb->sctp_ep, stcb, NULL); + sctp_chunk_output(stcb->sctp_ep, stcb, SCTP_OUTPUT_FROM_T3, SCTP_SO_LOCKED); + } + if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) { /* * We don't need to do the asconf thing, nor hb or @@ -2850,8 +2862,6 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *cp SCTP_UNUSED, } } closed_socket: - /* Toss the cookie if I can */ - sctp_toss_old_cookies(stcb, asoc); /* Restart the timer if we have pending data */ TAILQ_FOREACH(chk, &asoc->sent_queue, sctp_next) { if (chk->whoTo != NULL) { From nobody Wed May 3 15:42:29 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBLmj50F8z48yfZ; Wed, 3 May 2023 15:42: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 4QBLmj4ZF3z46ws; Wed, 3 May 2023 15:42:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683128549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nTP4etru3nZ21JzPprHE4rCkoAMjOt7WaVByiVzema0=; b=NplyT7f0sc7VCkf3bIUobfUzE7y6oz+O9V8B81epIHYDygAX9oN7hpC7/XHAr1CdiwFtCh EHxa7OcSXOsl/O/mHuTpH+GD4DT/grRD2d1dWlic0mb8yK486Dzypz9xTyiJvUcU5B4f70 W9r6MFR8GjjvFCJgzq56RU/NrF28N4XuALgeB4CCLX7WiBL3XORK45buK0BpAoOPBt9Ca6 s81lPjPJtyjLj1GP9/ohFXYyll5+Bw1naHWduDXCbOpcVvOhrsb/dwJZd60jXI31WyrP61 XK5j5LXaQ5c2vJ+m28AZqSi5j793047eYFUHHHeFVyQaZ5M7jCw3R11AEzMYGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683128549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nTP4etru3nZ21JzPprHE4rCkoAMjOt7WaVByiVzema0=; b=NbHnqXlfLbp9uBrb0kzIvQMFJZKj/SXcFR+qzxMj3D5vYr06UH0gnYeQ8K/QL967qXOAk/ /4kKqWbgDB+dt1PvrGQtHvlKTlHh9tlsdiHITjvSlX/d7zMQD+MG4AT/AZIB83IF7OlWYL 8Wj9xB0GS/BJ6h4ZHi0IfcB/J6IDLPk9sQ4KaSPaVVZIdr2G63Hd8lTycr960HSOpMrp5V igdZ73+VujlDs4678mv75R6OCqISzuzcdCs8TLQmu9igauryVyDjtoK/5HoBJ1tqyNw61j laP8kolAtC2lMAoTJKDH0YtqYhT24Sp3QQd7rZMzuJ6NuPTnYRHcw0ZJJo0eGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683128549; a=rsa-sha256; cv=none; b=J/aBnR/IO18YEFzzQD7z+6cyTvYkE6XlRY6aHdUOf0gugXBzydQcXM72j22S3cA4+8d6XB 5sXITUz/52Q0Cb77NO1gYEQlvcvEqPG1QCzOQcZ8CYp+C773PPDeRqBMRZEHgkEXoJp36N l+n0AWFkOiFbblr7Lwq9d2l8n8DwOdvtArEb0bfMpqin1itrM3eWMEl3JUKinbhLVSeWYP hkQnqKNO8i4378LeqZQrQ3bJXMm45xAHwVwlDIwnCh6t/GzFFbM6yR4+gcot/I4skq6Z+u K6dXYn11rSpg8n+gklEeGgIiukUMMcXt/pnH7MJn5zZCKjAtpzzkyPhodO0rwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBLmj3d0lzbSs; Wed, 3 May 2023 15:42:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343FgTYj090590; Wed, 3 May 2023 15:42:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343FgTA5090589; Wed, 3 May 2023 15:42:29 GMT (envelope-from git) Date: Wed, 3 May 2023 15:42:29 GMT Message-Id: <202305031542.343FgTA5090589@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: fc2e2c950d97 - main - src.conf: add WITH_TOOLCHAIN description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fc2e2c950d97166ab32ca24134a37986ccaf94ab Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fc2e2c950d97166ab32ca24134a37986ccaf94ab commit fc2e2c950d97166ab32ca24134a37986ccaf94ab Author: Ed Maste AuthorDate: 2023-05-02 17:27:18 +0000 Commit: Ed Maste CommitDate: 2023-05-03 15:41:58 +0000 src.conf: add WITH_TOOLCHAIN description It is not used by the in-tree default configuration, but adding it allows downstream projects with different defaults to make use of Cirrus-CI (as the makeman test added in 85e8c2a03490 requires that there are no missing option descriptions). Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39936 --- tools/build/options/WITH_TOOLCHAIN | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/build/options/WITH_TOOLCHAIN b/tools/build/options/WITH_TOOLCHAIN new file mode 100644 index 000000000000..62624bf9e28b --- /dev/null +++ b/tools/build/options/WITH_TOOLCHAIN @@ -0,0 +1,2 @@ +Install programs used for software development such as +compilers, debuggers, linkers etc. From nobody Wed May 3 16:00:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBM9s1ghFz4900L; Wed, 3 May 2023 16:00: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 4QBM9s15s6z4C8n; Wed, 3 May 2023 16:00:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683129649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jsJEzC8HH53qkY3eyTwCS0lpwY9W0RNgdXlmYZ+4Mio=; b=cGbli2MqIPIKn19p3MaXPdd0uKyk12cm+TCnJ1LANPCNWmCHH2Qzh7iXSb1KPog9SFhH/Z BYRCKA7qkA1okjaeN6AgCXeGvZ7ZRMtPq+Bvdll8ekL7ypbbviWEM37cZ5BGuor3LjBGe7 jQyaRe8E7pFfRXL3ncPURgjLhOOnqFUMyR/xKI5OxGvCW1n6bP10JjaFFztgNS45Wh2EoO WviiTAl0h3KPmCC3OjzX3cYsn2ldSr9XQvbpacIcifhixBXh/7QVbP1Sr6tgXHzHzEnBJ+ MPuowiRxerE3XVN7dzOHqNuSdlTXovqHwC0au64t/aSFfEdR56Bv3dEDE+EDiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683129649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jsJEzC8HH53qkY3eyTwCS0lpwY9W0RNgdXlmYZ+4Mio=; b=ZJE+iGX4q7Zy+A7T1Vnm60F3bztsqg4b5w5e0E+uiME7X0ayYKf3E8NjWwjsWpRzKsUZj3 oKT7PQPOODhIqGu+Rz+OpmH2ShBrPTksyUNr5B9GtCyJTkxulY8p9xVN2xGy2pu76raAo4 S88xK2RyWoIBhiLPxkwyjYdoIxOSFEvpOX9a6Er403VWomKdezoZAN7/aYvV0OwstA+ofN qKXkTU5mCiYYitjR10HDc+LB1ZNOUN/U730dCQVuIVdr4iA0Hbu1Cz0lxLPRvqxReAW9Nf B3Z5QT6Ltmi/W5V9Bm0dP81CXCUQpL0EnoSwG35UpOHSIYde/SUIRMiveUlKlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683129649; a=rsa-sha256; cv=none; b=RIWoCIc3yKTK3pYPrRy7+KUyFu1toZCHMyG5qMI2xTuJE1bCZAqR3bW1ZaGWONvfIDTObm o256RKURHhXXEgH7dZjJsYuC+0rZzdJk87i3bh7Qq5ZkB/b/yIvxRgHcJNphySRlwiYmal +oX9/tG5cuGBnW+ZcfuPFch7HKiQrflUMdJ+nDbrHw8Rq3+iNT+KlMCqhf5JjGv8eX+kbi YcIrzEBUccgSXKZJ7EjfOfOFrSRBxAmU92SRfi8bdkJ+rch2HOYpOtr5iF/40aI40V9SkQ 3cv2DhnY6m4c66la3LEHd1slfU8CXhYL3GGp85PTgtnzKGuRlkRmUZG77sr6nw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBM9s09MPzcDT; Wed, 3 May 2023 16:00:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343G0m5q017166; Wed, 3 May 2023 16:00:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343G0m91017165; Wed, 3 May 2023 16:00:48 GMT (envelope-from git) Date: Wed, 3 May 2023 16:00:48 GMT Message-Id: <202305031600.343G0m91017165@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: e8f6e5b2d969 - main - unix: Fix locking in uipc_peeraddr() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e8f6e5b2d969fdf7e8f0a9a0a87eede357618fe9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e8f6e5b2d969fdf7e8f0a9a0a87eede357618fe9 commit e8f6e5b2d969fdf7e8f0a9a0a87eede357618fe9 Author: Mark Johnston AuthorDate: 2023-05-03 15:56:46 +0000 Commit: Mark Johnston CommitDate: 2023-05-03 15:56:46 +0000 unix: Fix locking in uipc_peeraddr() After the locking protocol changed in commit 75a67bf3d00d ("AF_UNIX: make unix socket locking finer grained"), uipc_peeraddr() was not updated accordingly. The link lock now only protects global socket lists. The PCB lock is used to protect the link between connected PCBs, so use that. Remove an old comment which appears to be noting that unp_conn is not set for connected SOCK_DGRAM sockets (in one direction anyway). Reviewed by: glebius MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D39855 --- sys/kern/uipc_usrreq.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 294ef807416c..bd7a2cca245f 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -885,15 +885,10 @@ uipc_peeraddr(struct socket *so, struct sockaddr **nam) KASSERT(unp != NULL, ("uipc_peeraddr: unp == NULL")); *nam = malloc(sizeof(struct sockaddr_un), M_SONAME, M_WAITOK); - UNP_LINK_RLOCK(); - /* - * XXX: It seems that this test always fails even when connection is - * established. So, this else clause is added as workaround to - * return PF_LOCAL sockaddr. - */ - unp2 = unp->unp_conn; + + UNP_PCB_LOCK(unp); + unp2 = unp_pcb_lock_peer(unp); if (unp2 != NULL) { - UNP_PCB_LOCK(unp2); if (unp2->unp_addr != NULL) sa = (struct sockaddr *) unp2->unp_addr; else @@ -904,7 +899,7 @@ uipc_peeraddr(struct socket *so, struct sockaddr **nam) sa = &sun_noname; bcopy(sa, *nam, sa->sa_len); } - UNP_LINK_RUNLOCK(); + UNP_PCB_UNLOCK(unp); return (0); } From nobody Wed May 3 18:32:05 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBQXP3MWvz497bf; Wed, 3 May 2023 18:32: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 4QBQXP2V6pz3KmQ; Wed, 3 May 2023 18:32:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683138725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l4ErhG72MgE52ZfqLDcCnWHfwXv3T+1i7hQ/oNEQqE8=; b=iVT787ws+4OnJrslfdASlT2gJIIPPkhrA2eig8Xst1eoGq0hyNkO+3v+d8t8NFLQbH5ctf xyG7k3OwGTv2zO0KELBiAvIs67O5QsOriUVVUKcChNT4iQfBgyklk/SiEkcE2NEBxX/5o9 oigbG6sfVwBju/CD5kNpRcaf/JXtHFotHWRPfxV1B9GOLXsIM//xCkXEjKo3RQrY7ydzOa ap4zjFEu514r3E7EfBOp7TB2FV00lm0RxItJpuFc9ogwxYEP6u6bVzLCyy4httIaOt+Elq twQol6glK4+VTGL+/BzunEHUbWxugyq8k4uo/1AfZrUhUUaCWMpLuxLo8ZC47Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683138725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l4ErhG72MgE52ZfqLDcCnWHfwXv3T+1i7hQ/oNEQqE8=; b=mdM5v3GyVovlNP06AKhfw+8obtVRrl/ILGv42XlV1mB3jw55hLKIO6gl7k6rqXHq9mmEFZ Mh1EAnOTkhPiCuPWWg/UO/jmmiLyyJC4BHQb2p49su8gYIyo35qbFYGAD2ALRJoY6rfWwm 4Bn4RHSA6Uhk3BiIU2Z7ZplV97c1IONmu3HeGvxp0/DrJB66ReDMYwk0FS8m+Pv4g6A0yY UzR4X5paD+UQ3jA08BDdWiUEsD1vnsenwnS8zKHYZa/q7FvACm5FkYOYOm4ThMjr5lLsiH mkUR2Lo5OzkB3sPniGitUcnXtbstYyoo62+RHQOC2dUXPILoMXrXgE2oSdfCjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683138725; a=rsa-sha256; cv=none; b=yUcF+N+GR26sp0LNGNDVkx6O1jswq6HgGgKoMayTXq18euRQWuWwQWWuClOWikgxoH84Jx yVSSRsiDC1ZpJOpSltnCQme1ch0fEQLbcJ0uZP8flAywMqdlu1rx+LjGrEi7ELIgIrsNbL uxEiNmHw9u7lRE6Ng3puzjuQlR+uBxFFrUy1hM3xdxnypW9gZhRDpsGVS/cFwweqtWLjYD 2J7YkKwnSbkDf9VfxxacZrGoOyukCDwmCj/2FGev0/HyLPGlAq8YcZPUFz5VjOLPnhVxZS vM2gnOyg+ZN7pt+QSfmOSflVEhOczA3pt0T+PlhwWieHkqIhT8Zo26E073EL3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBQXP1Ym9zggL; Wed, 3 May 2023 18:32:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343IW5sT069925; Wed, 3 May 2023 18:32:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343IW5hq069924; Wed, 3 May 2023 18:32:05 GMT (envelope-from git) Date: Wed, 3 May 2023 18:32:05 GMT Message-Id: <202305031832.343IW5hq069924@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 04ede3675e44 - main - sctp: only start shutdown guard timer when sending SHUTDOWN chunk List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 04ede3675e44847c3e9e4a9bd44509cdf42ed60a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=04ede3675e44847c3e9e4a9bd44509cdf42ed60a commit 04ede3675e44847c3e9e4a9bd44509cdf42ed60a Author: Michael Tuexen AuthorDate: 2023-05-03 18:28:46 +0000 Commit: Michael Tuexen CommitDate: 2023-05-03 18:28:46 +0000 sctp: only start shutdown guard timer when sending SHUTDOWN chunk The intention is to protect a malicious peer not following the shutdown procedures. MFC after: 1 week --- sys/netinet/sctp_input.c | 14 -------------- sys/netinet/sctp_output.c | 4 ---- sys/netinet/sctp_pcb.c | 1 - sys/netinet/sctp_usrreq.c | 6 +++--- 4 files changed, 3 insertions(+), 22 deletions(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index fc362d091a22..5a7ed6ffde90 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -1501,10 +1501,6 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, SCTP_STAT_INCR_COUNTER32(sctps_collisionestab); SCTP_SET_STATE(stcb, SCTP_STATE_OPEN); - if (asoc->state & SCTP_STATE_SHUTDOWN_PENDING) { - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, NULL); - } SCTP_STAT_INCR_GAUGE32(sctps_currestab); sctp_stop_all_cookie_timers(stcb); if (((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || @@ -1718,10 +1714,6 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, SCTP_STAT_INCR_COUNTER32(sctps_collisionestab); } SCTP_SET_STATE(stcb, SCTP_STATE_OPEN); - if (asoc->state & SCTP_STATE_SHUTDOWN_PENDING) { - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, NULL); - } sctp_stop_all_cookie_timers(stcb); sctp_toss_old_cookies(stcb, asoc); sctp_send_cookie_ack(stcb); @@ -1788,8 +1780,6 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, } if (asoc->state & SCTP_STATE_SHUTDOWN_PENDING) { SCTP_SET_STATE(stcb, SCTP_STATE_OPEN); - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, NULL); } else if (SCTP_GET_STATE(stcb) != SCTP_STATE_SHUTDOWN_SENT) { /* move to OPEN state, if not in SHUTDOWN_SENT */ @@ -2176,10 +2166,6 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset, /* update current state */ SCTPDBG(SCTP_DEBUG_INPUT2, "moving to OPEN state\n"); SCTP_SET_STATE(stcb, SCTP_STATE_OPEN); - if (asoc->state & SCTP_STATE_SHUTDOWN_PENDING) { - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, NULL); - } sctp_stop_all_cookie_timers(stcb); SCTP_STAT_INCR_COUNTER32(sctps_passiveestab); SCTP_STAT_INCR_GAUGE32(sctps_currestab); diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index 3b9a06b72d8a..fdea88002194 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -6768,8 +6768,6 @@ sctp_sendall_iterator(struct sctp_inpcb *inp, struct sctp_tcb *stcb, void *ptr, atomic_subtract_int(&stcb->asoc.refcnt, 1); goto no_chunk_output; } - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, - NULL); } } } @@ -13562,8 +13560,6 @@ dataless_eof: error = ECONNABORTED; goto out; } - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, - NULL); sctp_feature_off(inp, SCTP_PCB_FLAGS_NODELAY); } } diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 7567764bfd72..4e97dc4e7ad3 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -3461,7 +3461,6 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from) } else { /* mark into shutdown pending */ SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_SHUTDOWN_PENDING); - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, NULL); if ((*stcb->asoc.ss_functions.sctp_ss_is_user_msgs_incomplete) (stcb, &stcb->asoc)) { SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_PARTIAL_MSG_LEFT); } diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c index 6e17545c9a3b..917d301a85dc 100644 --- a/sys/netinet/sctp_usrreq.c +++ b/sys/netinet/sctp_usrreq.c @@ -736,7 +736,7 @@ sctp_disconnect(struct socket *so) stcb->sctp_ep, stcb, netp); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, NULL); - sctp_chunk_output(stcb->sctp_ep, stcb, SCTP_OUTPUT_FROM_T3, SCTP_SO_LOCKED); + sctp_chunk_output(stcb->sctp_ep, stcb, SCTP_OUTPUT_FROM_CLOSING, SCTP_SO_LOCKED); } } else { /* @@ -750,7 +750,6 @@ sctp_disconnect(struct socket *so) * and move to SHUTDOWN-PENDING */ SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_SHUTDOWN_PENDING); - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, NULL); if ((*asoc->ss_functions.sctp_ss_is_user_msgs_incomplete) (stcb, asoc)) { SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_PARTIAL_MSG_LEFT); } @@ -933,6 +932,8 @@ sctp_shutdown(struct socket *so) sctp_send_shutdown(stcb, netp); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWN, stcb->sctp_ep, stcb, netp); + sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, + stcb->sctp_ep, stcb, NULL); } else { /* * We still got (or just got) data to send, so set @@ -957,7 +958,6 @@ sctp_shutdown(struct socket *so) return (0); } } - sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, stcb->sctp_ep, stcb, NULL); /* * XXX: Why do this in the case where we have still data * queued? From nobody Wed May 3 19:20:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBRcg5N9Xz499tc; Wed, 3 May 2023 19:20: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 4QBRcg4k1Dz3jDQ; Wed, 3 May 2023 19:20:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683141651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KspyJSuFXY4dTKqgrjcZnMWKwKZDDQ+gi+HZlY02FxQ=; b=aTKUIPKaxurF7nE6vEt7HFCG8/0NC3mkCkl0FCPnK1+RyvJ8yelM/CiKN4ZYxE5hIBtsWy bFSEVxy2Y96Rk53R94JX6hMYhUZ4lFCkFhVxt1AjEsZqvwHw1PInX53W/F5BpP5y05z3UM zS9BptzTEIeOhQyMGHfogJN5q+sPYtlVsId3cw6K6gjNKbmQHGEeVEnSFaJfe+HCcdLZqs Hctgmg4DNiR+wyCNENKpGQSXi3u4OYcqLBF/ihwciWndW2cCV3RgD+rLitSfySfU8L9roj YV8Qpr2DylapKOsy3Cb6C9psT8i0hisV63rqglpxyh0O2oQEeM40laWCHQZWyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683141651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KspyJSuFXY4dTKqgrjcZnMWKwKZDDQ+gi+HZlY02FxQ=; b=ASecF+vxUhzzq9dvl6oRZyDOq/jE2aLXg2Q4CjwsLGwV/BBLIw98l5sHaMdHx0bOFgXlRv H+Rq/sPSuCzQEGthX0rcyL4qeECe2ipM8IO8ltb4crf+f51bX4aqewtVnoBLj6JsFv7eKW frbf4Jft1e025k9/VccFQCmoSFeSWIDCVmP3hi31Qho8mbieRQAyMwnvaaFIFIScafE60t zGo2hsbDSAb9UCrdy/hYz6bpzcMfdE2C9VS/JYdhIcYF24nHVWVqszRopNVTNsLAjnHMqH 0zHSsZQByYcSgJA3DYOVszoh7SdFxlIUksqQ52xrgV6PZkahB38YeMnT/gDeAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683141651; a=rsa-sha256; cv=none; b=mlZucbQmnnCDjUHay0VCoFIJYYIAQVHF8PM9ZzNIVFrEcBEFw6aL4oRBoE/mEuweYWA+k/ F9Pnjyj1pwzdafn31FG1/s5p8vRelpZotgrQG+r/Hes52LFpwI6tzFL45rD7TL/oV9lyk2 D0lDrmmV/0W5b0yegYaLPTT6FZ4nUVhpvq72oLEAQEQv6JPbxkqK60EejmU4wLn3XDfxGJ FR9c8jnAIhZB9LOB8e4blZSdvLsOYGkFVh58VvYFSnlDGJRtpHlrkZvLmj5HLiR8YCFvKC n1dtLwFDAMC3Ny+cYpBuP8JSiubp8rDJ9XeLa6igYgxX5zuf8Si7OgvVVIhCzg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBRcg3n97zj2H; Wed, 3 May 2023 19:20:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343JKpqU047175; Wed, 3 May 2023 19:20:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343JKpx8047174; Wed, 3 May 2023 19:20:51 GMT (envelope-from git) Date: Wed, 3 May 2023 19:20:51 GMT Message-Id: <202305031920.343JKpx8047174@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: 9f27341c336a - main - local.meta.sys.mk set BOOTSTRAPPING List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9f27341c336aa12f6c7163c17e646e76c813b689 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=9f27341c336aa12f6c7163c17e646e76c813b689 commit 9f27341c336aa12f6c7163c17e646e76c813b689 Author: Simon J. Gerraty AuthorDate: 2023-05-03 19:20:02 +0000 Commit: Simon J. Gerraty CommitDate: 2023-05-03 19:20:02 +0000 local.meta.sys.mk set BOOTSTRAPPING When building for host on non-FreeBSD some makefiles want to see BOOTSTRAPPING defined. With this libmd and hence nmtree build ok --- share/mk/local.meta.sys.mk | 5 +++++ targets/pseudo/host-tools/Makefile.depend.host | 14 +++----------- usr.sbin/nmtree/Makefile.depend.host | 13 +++++++++++++ 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/share/mk/local.meta.sys.mk b/share/mk/local.meta.sys.mk index bcf25e2e5cd4..9d66e7295a0a 100644 --- a/share/mk/local.meta.sys.mk +++ b/share/mk/local.meta.sys.mk @@ -181,4 +181,9 @@ $V?= ${${V:S,DEP_,,}} .endfor .endif +.if ${MACHINE} == "host" && ${.MAKE.OS} != "FreeBSD" +# some makefiles expect this +BOOTSTRAPPING= 0 +.endif + .endif diff --git a/targets/pseudo/host-tools/Makefile.depend.host b/targets/pseudo/host-tools/Makefile.depend.host index a4525705b64b..39324fc6d49d 100644 --- a/targets/pseudo/host-tools/Makefile.depend.host +++ b/targets/pseudo/host-tools/Makefile.depend.host @@ -4,21 +4,13 @@ DIRDEPS= \ usr.bin/file2c \ usr.bin/lex \ usr.bin/mkdep \ + usr.bin/mkimg \ usr.bin/rpcgen \ usr.bin/sed \ - usr.bin/xargs \ - usr.bin/yacc \ - usr.bin/mkimg \ usr.bin/tar \ + usr.bin/yacc \ usr.sbin/makefs \ - -# these need work -xDIRDEPS+= \ - bin/dd \ - bin/sh \ - usr.bin/lockf \ - usr.bin/stat \ - usr.sbin/mtree \ + usr.sbin/nmtree \ .include diff --git a/usr.sbin/nmtree/Makefile.depend.host b/usr.sbin/nmtree/Makefile.depend.host new file mode 100644 index 000000000000..3fd283542a53 --- /dev/null +++ b/usr.sbin/nmtree/Makefile.depend.host @@ -0,0 +1,13 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + lib/libmd \ + lib/libnetbsd \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif From nobody Wed May 3 20:32:27 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBTCH2Nr9z49DmK; Wed, 3 May 2023 20:32:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QBTCH1rk0z3rlg; Wed, 3 May 2023 20:32:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683145947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M1JfiFwEb60hssJvDkqGzkCOmRwkHERys1YTb4SscNc=; b=W1eJ7TTimH2fHcZHb/L72385zZeq7e7syquIRl2dVlgtGn2H4YM48GUrNQolWW9kzbH+PB DfaEfgA6mWmt6/3NkAhA3n1W6G5LAGt8+ERmviwxssyw1ch9Zxn1UYW/dgI9K2l/LiLJJ4 lZbCRIupANnvHrl2SXaWiKLg4i9Co4C6rpStkUcO6qoJ5JF5Xkbg7AGC7r9H/mTf4xd9lp E9ruATLDYPdWrXYWy99uwp3u0dlue/UQEp+SctW3RIvSdYodCHfJ/ndwy3yKPcaey9778D X86Fk/2s7vj+6ULVhUDuYnIKQWglXeNgyN6IAD/Mb0j3aP8cewzyLoPF2XxxAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683145947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M1JfiFwEb60hssJvDkqGzkCOmRwkHERys1YTb4SscNc=; b=TZqBcS+rJVK4m3kFsn+N68PbJY0qTpd6H36/qcQqP1jjQxEvi5OiIS3cLPPYwZjW1zu2BH XVdQpVaQs/5MID4arP+YjQ4T8/nzBgKZDRKnRfBiIGIbAVID1VO3lD0hNnd90/G8IXiA9T rf+SUjR5uZSsR8o8k2rBJjd6xzWx+Vbx90idqy8MQ3TQ5QZdjpzQsXws8+3mvUhcNZ8/bF yKdUxeI4GrWghqf1ALuzR2LwTc1FEbblib+Fs5DbX2+IRkm7ICXsvn+SpCj6we64rm1bFS JzhdDyViDgsinEZCdSDTEXCCmI6wS4i5aNmzZRU/d6jlyIa1TxYeSnoDnv2tGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683145947; a=rsa-sha256; cv=none; b=rdBhrhexB2dsrI7ir8Oo61YqRqPUcDZ8Y8Lm9ctQRynpqkogiWKPQbeOZMlqbortwbJXIh p04/z8/D7R98EUAHfTKlHrNBo/0rcurNY/kdVoX0EsLvFTpfhgrqov2RG64a8cpGKh3t+j tMtyzQlGJ7S2GGTZLxbyjeXMaKtkx96eml1p9Onntk3v6yX5nmtmecDSGlkRzH0uCYWs3R 5hn6A1zXuBSvRvyti0czWXa4Ybglw6hE+hWaxQw1mW1hfvtj+jDD5rAB7VbwRW1PPUx9M2 L3gbRqAz/IkatjK4VhMUul6MA9U+AyoCLiGAtFG/uTlsvoJ/NkIAGefHJKFGjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBTCH0x6yzkXj; Wed, 3 May 2023 20:32:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343KWRWE067699; Wed, 3 May 2023 20:32:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343KWRi9067698; Wed, 3 May 2023 20:32:27 GMT (envelope-from git) Date: Wed, 3 May 2023 20:32:27 GMT Message-Id: <202305032032.343KWRi9067698@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Chuck Silvers Subject: git: 406475581246 - main - fsck_ffs: fix the previous change that skipped pass 5 in some cases List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: chs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 406475581246360faa7af9891dc8ad2423284e18 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by chs: URL: https://cgit.FreeBSD.org/src/commit/?id=406475581246360faa7af9891dc8ad2423284e18 commit 406475581246360faa7af9891dc8ad2423284e18 Author: Chuck Silvers AuthorDate: 2023-05-03 20:21:19 +0000 Commit: Chuck Silvers CommitDate: 2023-05-03 20:31:32 +0000 fsck_ffs: fix the previous change that skipped pass 5 in some cases The previous change involved calling check_cgmagic() twice in a row for the same CG in order to differentiate when the CG was already ok vs. when the CG was rebuilt, but that doesn't work because the second call (which was supposed to rebuild the CG) returns 0 (indicating that the CG was not rebuilt) due to the prevfailcg check causing an early failure return. Fix this by moving the rebuild part of check_cgmagic() out into a separate function which is called by pass1() when it wants to rebuild a CG. Fixes: da86e7a20dc4a4b17e8d9e7630ed9b675cf71702 Reported by: pho Discussed with: mckusick Sponsored by: Netflix --- sbin/fsck_ffs/fsck.h | 3 ++- sbin/fsck_ffs/fsutil.c | 28 +++++++++++++--------------- sbin/fsck_ffs/gjournal.c | 2 +- sbin/fsck_ffs/inode.c | 2 +- sbin/fsck_ffs/main.c | 2 +- sbin/fsck_ffs/pass1.c | 12 +++++++++--- sbin/fsck_ffs/suj.c | 4 ++-- 7 files changed, 29 insertions(+), 24 deletions(-) diff --git a/sbin/fsck_ffs/fsck.h b/sbin/fsck_ffs/fsck.h index 95dccf0d672d..1c8b9169e590 100644 --- a/sbin/fsck_ffs/fsck.h +++ b/sbin/fsck_ffs/fsck.h @@ -466,7 +466,8 @@ void cgdirty(struct bufarea *); struct bufarea *cglookup(int cg); int changeino(ino_t dir, const char *name, ino_t newnum, int depth); void check_blkcnt(struct inode *ip); -int check_cgmagic(int cg, struct bufarea *cgbp, int requestrebuild); +int check_cgmagic(int cg, struct bufarea *cgbp); +void rebuild_cg(int cg, struct bufarea *cgbp); void check_dirdepth(struct inoinfo *inp); int chkrange(ufs2_daddr_t blk, int cnt); void ckfini(int markclean); diff --git a/sbin/fsck_ffs/fsutil.c b/sbin/fsck_ffs/fsutil.c index 1df52b7cfdc9..48810954ba94 100644 --- a/sbin/fsck_ffs/fsutil.c +++ b/sbin/fsck_ffs/fsutil.c @@ -989,9 +989,7 @@ blzero(int fd, ufs2_daddr_t blk, long size) * Verify cylinder group's magic number and other parameters. If the * test fails, offer an option to rebuild the whole cylinder group. * - * Return 1 if the cylinder group is good or if repair is requested - * and is completed successfully. Return 0 if it is bad or if a repair - * has been requested but is not completed successfully. + * Return 1 if the cylinder group is good or return 0 if it is bad. */ #undef CHK #define CHK(lhs, op, rhs, fmt) \ @@ -1003,7 +1001,7 @@ blzero(int fd, ufs2_daddr_t blk, long size) error = 1; \ } int -check_cgmagic(int cg, struct bufarea *cgbp, int request_rebuild) +check_cgmagic(int cg, struct bufarea *cgbp) { struct cg *cgp = cgbp->b_un.b_cg; uint32_t cghash, calchash; @@ -1077,15 +1075,16 @@ check_cgmagic(int cg, struct bufarea *cgbp, int request_rebuild) return (0); prevfailcg = cg; pfatal("CYLINDER GROUP %d: INTEGRITY CHECK FAILED", cg); - if (!request_rebuild) { - printf("\n"); - return (0); - } - if (!reply("REBUILD CYLINDER GROUP")) { - printf("YOU WILL NEED TO RERUN FSCK.\n"); - rerun = 1; - return (0); - } + printf("\n"); + return (0); +} + +void +rebuild_cg(int cg, struct bufarea *cgbp) +{ + struct cg *cgp = cgbp->b_un.b_cg; + long start; + /* * Zero out the cylinder group and then initialize critical fields. * Bit maps and summaries will be recalculated by later passes. @@ -1127,7 +1126,6 @@ check_cgmagic(int cg, struct bufarea *cgbp, int request_rebuild) } cgp->cg_ckhash = calculate_crc32c(~0L, (void *)cgp, sblock.fs_cgsize); cgdirty(cgbp); - return (1); } /* @@ -1191,7 +1189,7 @@ std_checkblkavail(ufs2_daddr_t blkno, long frags) cg = dtog(&sblock, blkno + j); cgbp = cglookup(cg); cgp = cgbp->b_un.b_cg; - if (!check_cgmagic(cg, cgbp, 0)) + if (!check_cgmagic(cg, cgbp)) return (-((cg + 1) * sblock.fs_fpg - sblock.fs_frag)); baseblk = dtogd(&sblock, blkno + j); for (k = 0; k < frags; k++) { diff --git a/sbin/fsck_ffs/gjournal.c b/sbin/fsck_ffs/gjournal.c index b65589b5bd08..cd2c9df878a8 100644 --- a/sbin/fsck_ffs/gjournal.c +++ b/sbin/fsck_ffs/gjournal.c @@ -97,7 +97,7 @@ gjournal_check(const char *filesys) } cgbp = cglookup(cg); cgp = cgbp->b_un.b_cg; - if (!check_cgmagic(cg, cgbp, 0)) { + if (!check_cgmagic(cg, cgbp)) { rerun = 1; ckfini(0); return; diff --git a/sbin/fsck_ffs/inode.c b/sbin/fsck_ffs/inode.c index 2d563f617a56..04891447254e 100644 --- a/sbin/fsck_ffs/inode.c +++ b/sbin/fsck_ffs/inode.c @@ -1394,7 +1394,7 @@ retry: cg = ino_to_cg(&sblock, ino); cgbp = cglookup(cg); cgp = cgbp->b_un.b_cg; - if (!check_cgmagic(cg, cgbp, 0)) { + if (!check_cgmagic(cg, cgbp)) { if (anyino == 0) return (0); request = (cg + 1) * sblock.fs_ipg; diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c index 2bd61dda7030..566fbe5ccd15 100644 --- a/sbin/fsck_ffs/main.c +++ b/sbin/fsck_ffs/main.c @@ -492,7 +492,7 @@ checkfilesys(char *filesys) snapflush(std_checkblkavail); if (cgheader_corrupt) { printf("PHASE 5 SKIPPED DUE TO CORRUPT CYLINDER GROUP " - "HEADER(S)\n"); + "HEADER(S)\n\n"); } else { pass5(); IOstats("Pass5"); diff --git a/sbin/fsck_ffs/pass1.c b/sbin/fsck_ffs/pass1.c index 55233e0bc4f4..e784fd29dc1c 100644 --- a/sbin/fsck_ffs/pass1.c +++ b/sbin/fsck_ffs/pass1.c @@ -100,11 +100,17 @@ pass1(void) cgbp = cglookup(c); cgp = cgbp->b_un.b_cg; rebuiltcg = 0; - if (!check_cgmagic(c, cgbp, 0)) { - if (!check_cgmagic(c, cgbp, 1)) + if (!check_cgmagic(c, cgbp)) { + if (!reply("REBUILD CYLINDER GROUP")) { cgheader_corrupt = 1; - else + if (!nflag) { + printf("YOU WILL NEED TO RERUN FSCK.\n"); + rerun = 1; + } + } else { + rebuild_cg(c, cgbp); rebuiltcg = 1; + } } if (!rebuiltcg && sblock.fs_magic == FS_UFS2_MAGIC) { inosused = cgp->cg_initediblk; diff --git a/sbin/fsck_ffs/suj.c b/sbin/fsck_ffs/suj.c index 40bbe340bfc6..9c8e1322b801 100644 --- a/sbin/fsck_ffs/suj.c +++ b/sbin/fsck_ffs/suj.c @@ -183,7 +183,7 @@ cg_lookup(int cgx) if (lastcg && lastcg->sc_cgx == cgx) return (lastcg); cgbp = cglookup(cgx); - if (!check_cgmagic(cgx, cgbp, 0)) + if (!check_cgmagic(cgx, cgbp)) err_suj("UNABLE TO REBUILD CYLINDER GROUP %d", cgx); hd = &cghash[HASH(cgx)]; LIST_FOREACH(sc, hd, sc_next) @@ -396,7 +396,7 @@ suj_checkblkavail(ufs2_daddr_t blkno, long frags) cg = dtog(&sblock, blkno); cgbp = cglookup(cg); cgp = cgbp->b_un.b_cg; - if (!check_cgmagic(cg, cgbp, 0)) + if (!check_cgmagic(cg, cgbp)) return (-((cg + 1) * sblock.fs_fpg - sblock.fs_frag)); baseblk = dtogd(&sblock, blkno); for (j = 0; j <= sblock.fs_frag - frags; j++) { From nobody Wed May 3 20:58:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBTnc4Bdqz49FmY; Wed, 3 May 2023 20:58: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 4QBTnc3jPKz3tf1; Wed, 3 May 2023 20:58:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683147524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UJb0eJ1kM//xx2XEtxb0chcONKhf5NThcmiR97jc06c=; b=w7gnCxi1xykVmAoFIB/kku/kJPzRbx6oIkERjiHvD7SfqAFiaf7sSSJSm5IwaiuNszWZ5l IfNVMaxMJ6nbrGA+luYs8MraPQClz8jLBGKHr4Fpl1c7Fhk5ykLIML3vq2Y+Rj+OV2ftB5 NT8s/ku9CoQSvqFWYP8uWvMx4Z4aezNjwnqRjTZ3by8v6nA/H4uISACAG5xRxUmjA6yNRi KAEJLRSAw0E9w+Ee47TCk6Falgjar61Eut8FEIyQhWFpi5HXMqpdzeByTDkun+qvo1p+KV NHxPaowTEb+7iFdKABaxZWMkdfaFQ99c4nMaxTURGmFsmzk7ngxkDVwcuKt40g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683147524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UJb0eJ1kM//xx2XEtxb0chcONKhf5NThcmiR97jc06c=; b=fGpFQQAK3LgKAGW8QtK0/+4NWbbS2q6Om726DZm2yz7PzLMcmz6tchOrymh4luCpzE0x30 aq/nvtjXtmtr3Zuof9wtE4U07OcshHPenJVaYV3dDZZmkua29/GDyNoRzOakLJYd7gCt4F TBf5ux0XqAg5g556e/3ViRd8mN+85A6pg7AmIjhJ1HGzOxuO8LcbJN2PGHnHsqQZDELxNs HP6xCEznqkp3ozx0PjrnQluFX6P5wdHi8Fa6J256/YHPpGJ7Z+zqBcP7zvM2S6pXMlH/Kl eG4DmnLOkzlXAJ3Jm9SGDqsquzohuWbOKEIEgJ7QHbvUVSdqxw7uT5SaBocT4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683147524; a=rsa-sha256; cv=none; b=BL/syyv8IYT1ShZckd+shHodIqLbs8e1b0V3wHcDWQESK5wElSXc0IH5/hw+JGWUoFCURD l5frO8OxaBmBtbVTKyORgFpAmD3wfcSrRxYOWWqaqqGTook7cI4XC03HymnMR1G5Ji/IwW 8gYDb6V8yHovvos9cor7RlITxirPyvMMYDv+GZDfEp0EQ7nw5fFUYUcfDYC5bM6recJx8d U9MhM1Eb57lZUlaGDE18oYwF3IQcj9P+uq5VKAFVOQhjgh3cj8WNGdJ4VWIyTOy9WHFaWB wy4JMTVhT56CrrOTQZLhgYu6uoj7fAGrIHMQj5Gq6qMO4n64zecOSWlM2SBLTw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBTnc2gmDzkxQ; Wed, 3 May 2023 20:58:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343KwiBZ002539; Wed, 3 May 2023 20:58:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343Kwisq002538; Wed, 3 May 2023 20:58:44 GMT (envelope-from git) Date: Wed, 3 May 2023 20:58:44 GMT Message-Id: <202305032058.343Kwisq002538@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: 4194bbb34c60 - main - release: Report disk image filename List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4194bbb34c60a5bf0fd0ba28f7bfa20b7842ba3f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4194bbb34c60a5bf0fd0ba28f7bfa20b7842ba3f commit 4194bbb34c60a5bf0fd0ba28f7bfa20b7842ba3f Author: Ed Maste AuthorDate: 2022-05-16 18:37:21 +0000 Commit: Ed Maste CommitDate: 2023-05-03 20:58:22 +0000 release: Report disk image filename For someone new to the release bits it's not always clear what files are being created. Report the disk image name explicitly. Reviewed by: gjb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39953 --- release/tools/vmimage.subr | 2 ++ 1 file changed, 2 insertions(+) diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index a65ec4f1a1f9..d7dc8ed992b5 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -318,6 +318,8 @@ vm_create_disk() { ${ROOTFSPART} \ -o ${VMIMAGE} + echo "Disk image ${VMIMAGE} created." + if [ ${ESP} = "yes" ]; then rm ${espfilename} fi From nobody Wed May 3 22:42:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBX510NPyz49LgM; Wed, 3 May 2023 22:42: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 4QBX506wM5z45qh; Wed, 3 May 2023 22:42:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683153733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PGp0UYuE0ERGOaAKBp0czhWE8j1qZOmbQuc4fq983u0=; b=pR5mRhUIxdsTvgqrlacGYVY+hFGoid/8mUa/nhng5OOK5NQbC16Y00sQ9UhVccCQq05KMR iaBY7t9Z6WW+2IZKEQcXDb1+XQvNlYoMjzk502wXZ9LXq6hJRU1nXkhK5wgp8ev1w/lumF beypjCKnXE4KB4CKMGmD5kg392dyAwqu0+QbySQnVVbEuWCfeQvx83RyAyzyEWXmCb2/Np ijdjop7z/L7/Lo8SwEmp9Tkn3ibsonv1UN/+0X3LevNdgO1GjLUhgXnjFrDsFYSB6q0Bud dMVv7esLvFhev5WQtAADrpnWYXWseD167LtG6hgNiIrDdtQSvko8c6TSKp6hJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683153733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PGp0UYuE0ERGOaAKBp0czhWE8j1qZOmbQuc4fq983u0=; b=UdF/H1GbxjsMyUxsJk29vh69LO0CtjgrKhG7XUx2qo7kWRFfEuOE/teXol313xA26/BIxa hJJ1JikGSGS7CDeS/YwGigEWCT9O9M92WwBsoyJbxsnS+BzhBuJvc6C3gblsGba6rtVfJj /0Y02bIC5yjUbcmBC+OPFDb/xcbNZNXMhAPy/Z9WUE80iAv/ImgZsDEBjkYX2m81SyAbDB bwF2pKWNcxtvWulncBqJ4TtM5CZ/YgqbLpyFy8c4Uk/OKu+YJ8jIXo6k0nRPQ9m1wiq3nB 3ZNg8mUiPIwOf5epNTkOHybyd0WeaCRtL0g4ivyBFETbqEmC68nCS+mNfnH/3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683153733; a=rsa-sha256; cv=none; b=w14m0gBEc2i55oKlDVBfy4uNCqJq2SQDEqECVVDCKVv/teskGgI8adh1BPrL+/mSAWBIBZ JJE+nbs6zwXbkrGmDK97iZPo/+XbJtIN52mDOiQFyFX3CAAx0IRNigUqfkuz+q3lFVGHRA hj4vb5TevrGxe8nnYn2Tk6mxCrnLmEH2sfC/0X3WL6A2eewJNJPFfdsDxsBEyWJmCujxR6 HOXuQ7iwSqX7OoFPCuWSk0cBDaoRe28f/0bUQWAyKAux4wE6jRRNzPVXyhPE13cHM2gDGj PMOO+Tt9VsqK8hgd6kuEJ86FahSWhlyW9B5xSBExtgiSNbc3gDWQ8mWFSECSzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBX50602rznjk; Wed, 3 May 2023 22:42:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 343MgCi1081953; Wed, 3 May 2023 22:42:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 343MgC2h081952; Wed, 3 May 2023 22:42:12 GMT (envelope-from git) Date: Wed, 3 May 2023 22:42:12 GMT Message-Id: <202305032242.343MgC2h081952@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 7dea7445ba44 - stable/13 - Cirrus-CI: update stable/13 CI image to 13.1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7dea7445ba4443190edca781bd6a293ea6e2c2ff Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7dea7445ba4443190edca781bd6a293ea6e2c2ff commit 7dea7445ba4443190edca781bd6a293ea6e2c2ff Author: Ed Maste AuthorDate: 2023-05-03 20:31:22 +0000 Commit: Ed Maste CommitDate: 2023-05-03 20:33:52 +0000 Cirrus-CI: update stable/13 CI image to 13.1 We want to ensure that stable/13 still builds on the oldest supported 13.x release, so not updating directly to 13.2. Sponsored by: The FreeBSD Foundation --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 824ffcda20ca..88d232403ed1 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -5,7 +5,7 @@ compute_engine_instance: # gcloud compute images list --project freebsd-org-cloud-dev --no-standard-images platform: freebsd image_project: freebsd-org-cloud-dev - image: freebsd-13-0-release-amd64 + image: freebsd-13-1-release-amd64 cpu: 8 memory: 8G disk: 40 From nobody Thu May 4 04:33:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBgtQ2skQz49dcS; Thu, 4 May 2023 04:33: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 4QBgtQ25sgz3M3s; Thu, 4 May 2023 04:33:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683174814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hG5s8eXnfbv20QdNb3l8UqrmuRLIn9HOeq4xCvtb2nc=; b=bILH67/2awrPiXar5SRl8Pm5MKpJRCaq2mtcQXalyTXA7gPLDPmOYIoJElXepTCPotehaL GFbVxJo+UkGF1G9MQNpHCyvqa8lMV19Zt8qlYJ4RttykFtvEo0d23kkrhvk1j1HGaP8h25 WZiwpb2QZxA5UpOEaMEzuxxyvaFZMM5UOiC/+nvj9qLoYkpjJiw087JKk+7w67hz+I8+vt v9HHAV1BYuEnbgTF91Tt69vznZQ6ztT08Symz0sroYwi2HS1/Y9xA7HUDG+2ZaJ1r2ShBI Qdre5U2Dr0JjKLAvead4MhUMT7VgbMnf2Awd7gjMRLoaUO+8HnnVfPo44gRhhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683174814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hG5s8eXnfbv20QdNb3l8UqrmuRLIn9HOeq4xCvtb2nc=; b=pVpoVDsA2jlLJe0g3nuvhRUAgmH/vOo8v+JlK5HoajGiZjPb3vxRrhLz7jp4BEp3Ud289z x4mvVYlPHqiba+Rr4wXCiK5HxVZF+uaOiwpFvvWA5LRntB9JkyFt9L8fZHtdqz/W8tt7Ot CWUZIR11l6PnyOwUsp7qLMJno5BVx3qflhInjXnQ6wZF1jNBd5+gU8b0BPEXIlaysj6qz9 tApxxrjvYtcieEsdcjulx2BX245o0mxYyVz0tfUnxJMWQTHYi28bEKBN6c4MAqDrPvpkvA JxJR8WsAN+4orf9hvq3q0PsuRXWfg64Sk7ueSgJlFEAT3pZG9PbcU2i2TPA6RA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683174814; a=rsa-sha256; cv=none; b=xE38whaJiZajXTZCrHn2N2bTvQ6FmmYVuBA5KnjNIGqIDWNX4G1XrHFlInwWVTKqRO5FJ1 GwJAibCBARr+GA77e8TpZstLgnleEmZ+YHZwTWuuigqDLQEmdctpBRpKrgmLiMnW02AWWd 0iHlGwmPjAoqPe22wa5fI43E8gyvM2lWBlAYdFcT/Ovx3w1/sZ9ugja8DntXUV5vOGRTP9 7THmGwxCJhVr/HBvfb3ug1y7gNopTYi5otZAn9UKw/biYIQF+139kpCITQI/RwvAVxw6BB mI+FNHmt+mcKe9j1I0GPcbjjTJmrX8V7kPsOWucDx8ki2lLvCoQpEPYqPf28Gw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBgtQ18Tvzxtb; Thu, 4 May 2023 04:33:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3444XYkM062144; Thu, 4 May 2023 04:33:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3444XY57062143; Thu, 4 May 2023 04:33:34 GMT (envelope-from git) Date: Thu, 4 May 2023 04:33:34 GMT Message-Id: <202305040433.3444XY57062143@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 5282ada06bbc - main - ObsoleteFiles: Complete 20201025: Remove cal data files List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5282ada06bbc6727b467d6f6530fa19114143c61 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=5282ada06bbc6727b467d6f6530fa19114143c61 commit 5282ada06bbc6727b467d6f6530fa19114143c61 Author: Li-Wen Hsu AuthorDate: 2023-05-04 04:28:52 +0000 Commit: Li-Wen Hsu CommitDate: 2023-05-04 04:28:52 +0000 ObsoleteFiles: Complete 20201025: Remove cal data files Fixes: d20d6550187a calendar: remove all datafiles except freebsd one MFC after: 3 days --- ObsoleteFiles.inc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 6e7c5205a2bf..ede2871455ae 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -6199,6 +6199,18 @@ OLD_FILES+=usr/share/calendar/uk_UA.KOI8-U/calendar.all OLD_FILES+=usr/share/calendar/uk_UA.KOI8-U/calendar.holiday OLD_FILES+=usr/share/calendar/uk_UA.KOI8-U/calendar.misc OLD_FILES+=usr/share/calendar/uk_UA.KOI8-U/calendar.orthodox +OLD_DIRS+=usr/share/calendar/de_AT.ISO_8859-15 +OLD_DIRS+=usr/share/calendar/de_DE.ISO8859-1 +OLD_FILES+=usr/share/calendar/de_DE.ISO8859-15 +OLD_DIRS+=usr/share/calendar/fr_FR.ISO8859-1 +OLD_FILES+=usr/share/calendar/fr_FR.ISO8859-15 +OLD_DIRS+=usr/share/calendar/hr_HR.ISO8859-2 +OLD_DIRS+=usr/share/calendar/hu_HU.ISO8859-2 +OLD_DIRS+=usr/share/calendar/pt_BR.ISO8859-1 +OLD_DIRS+=usr/share/calendar/pt_BR.UTF-8 +OLD_DIRS+=usr/share/calendar/ru_RU.KOI8-R +OLD_DIRS+=usr/share/calendar/ru_RU.UTF-8 +OLD_DIRS+=usr/share/calendar/uk_UA.KOI8-U # 20201004: logo files renamed to type-agnostic gfx-*.lua OLD_FILES+=boot/lua/logo-beastie.lua From nobody Thu May 4 05:42:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBjQ75nWxz49htP; Thu, 4 May 2023 05: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 4QBjQ74z3yz3pp6; Thu, 4 May 2023 05: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=1683178959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UnvXM8pIwWfcbLCSigw/TzlYtLLeSFJh+ozbMAB0Uk4=; b=YCA+ugn+BoHNxFl+l6DWfDrcKZRpXYFMaMPYOGOsm+/uOhUluuB/MZVu5jQHLhpUuY8B9J sV9ZcR9SmGrbt4Y8zwByeoPFicxhSPja2HKMdiydcMC69SScdoIoo76Np7OjARCb1v1ZB+ HswZIohQnAb8PcrwsewbkoLrBK/xW8n7OkK4fSup+E+Ibu1NEoy4XWJcSObBLBTU0lMo91 n1DvaTmYHg2mwjpT2xvC9p6jJXKEv7HBbpUCqncd6m6c1wU0R56Anjne0E5jcEktRm1owH 46sUNKXpKsszV5e5X5x5tGqeun8nYr8BVBUpM9uBc8y5GIeLE/U9lPWGzg1nfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683178959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UnvXM8pIwWfcbLCSigw/TzlYtLLeSFJh+ozbMAB0Uk4=; b=CiwjNUZZ7F0OIoHFk39D2Sb+JyDB98omX4Qr7i/dAiZocztGD2WVxtn8+7yJNWF2VPoc3r 0cc9rEdSxgyb7GpS/p+ZLLBbU2ZRGLH8gxBjIihN+UpjNiJTU/ZB86wMblGxmeBzErAFAo y8VzhzovUVtzKH1R3OqdVpcQXt6NJjrzvHfUCcwtgaFuwhOGha1TpofWpVgkr/5QOiSb5q geLqkOVwdqVBmGKt1NB3fEP0A/KkcoM6C0oOM3yRb9i/OfRNBMwo6rZHWUWoVADw5H3zUE YAxSQmhnEaqD1mQBxXd316fDUCt/dWzkpGOdZrCNhZyVymKdecHinJcLVMJT6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683178959; a=rsa-sha256; cv=none; b=rOv0PkLJBZ4BespeYJ2BEQYqzpqKYeBuIZ9ktiPz4MdErNpQiSL687GA5Qi/C+0paXDNbJ Eze6AnUOzWxS0j5HAd73VSX68oUMRwL69zRTJRMq7N1+DnUVUOLOVRIK6v5agRAc9BlRSE bbUUd0RsYoTnJ8KSyt0mM5BwduR3yDoPfjpPEuah6RnoRQZw2ZNJ18OcmcBqeUQBVV/Ekj LYSnHr2xng9+5dnKvysVXGpV8N9cYJlSLK5D08qm8OScarNo/Bt0zZSVgUjYVsQruZNucv GObD6/yAJ3bcCUj2xcIYVxNYBxYHqjxLQFSJtf7h2Vxf1TApqJMDyjFN+WYvOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBjQ742Mxz10md; Thu, 4 May 2023 05:42:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3445gdA9080191; Thu, 4 May 2023 05:42:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3445gdGU080190; Thu, 4 May 2023 05:42:39 GMT (envelope-from git) Date: Thu, 4 May 2023 05:42:39 GMT Message-Id: <202305040542.3445gdGU080190@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: f7398d2d0ab6 - stable/13 - logger(1): MFC: fix timestamps in case of long run List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f7398d2d0ab6b22d88296f7daff48ed3fe74aa56 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=f7398d2d0ab6b22d88296f7daff48ed3fe74aa56 commit f7398d2d0ab6b22d88296f7daff48ed3fe74aa56 Author: Eugene Grosbein AuthorDate: 2023-04-27 16:43:16 +0000 Commit: Eugene Grosbein CommitDate: 2023-05-04 05:41:55 +0000 logger(1): MFC: fix timestamps in case of long run An example: ( echo test; sleep 2; echo test2 ) | logger -h /var/run/log Before fix, logger assigned same timestamp to both records. Fixes: 65547fb33db901a9f352aacb0ed45ce68b0bd275 Reported by: Vadim Goncharov (cherry picked from commit 83fd35b3f3fa580d2b99874abd1f67ee61dcb659) --- usr.bin/logger/logger.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/usr.bin/logger/logger.c b/usr.bin/logger/logger.c index 1ce8d81db6f6..32fda60717d6 100644 --- a/usr.bin/logger/logger.c +++ b/usr.bin/logger/logger.c @@ -198,22 +198,23 @@ main(int argc, char *argv[]) if (host == NULL) cap_openlog(capsyslog, tag, logflags, 0); - (void )time(&now); - (void )ctime_r(&now, tbuf); - tbuf[19] = '\0'; - timestamp = tbuf + 4; - if (hostname == NULL) { hostname = hbuf; (void )gethostname(hbuf, MAXHOSTNAMELEN); *strchrnul(hostname, '.') = '\0'; } + timestamp = tbuf + 4; + /* log input line if appropriate */ if (argc > 0) { char *p, *endp; size_t len; + (void )time(&now); + (void )ctime_r(&now, tbuf); + tbuf[19] = '\0'; + for (p = buf, endp = buf + sizeof(buf) - 2; *argv;) { len = strlen(*argv); if (p + len > endp && p > buf) { @@ -235,9 +236,14 @@ main(int argc, char *argv[]) logmessage(pri, timestamp, hostname, tag, socks, nsock, buf); } else - while (fgets(buf, sizeof(buf), stdin) != NULL) + while (fgets(buf, sizeof(buf), stdin) != NULL) { + (void )time(&now); + (void )ctime_r(&now, tbuf); + tbuf[19] = '\0'; + logmessage(pri, timestamp, hostname, tag, socks, nsock, buf); + } exit(0); } From nobody Thu May 4 14:29:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBx5j11syz499RN; Thu, 4 May 2023 14:29: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 4QBx5j0Y7Lz3HDj; Thu, 4 May 2023 14:29:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683210553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2M3C+MU/LvFZfD2eIJTxPKWppRY/MnkCMZ/pqKt/1LU=; b=fDRjKlOoeijsUvGo2WmeWFcEiLsG+gkogQ68KMdwDiYWBd3FrXwyHR+ntQbAiHN4FyjVpU bWCy34rzSN5U/8O9pzNKo8NbWPG1RhgMSx4v18SG6P3YDQE6Bb1d9FtW4eIGumitGMkEJE +o3VO30TxwisKE15NP83UJ0B0koy+2/zp1z+/COEyqkqWWIsFxrHxb51sOm9RY95jSFkRR aPmQqi/arLA3thmeigdYkASKX8GzUr9RjMw1xmol83KeA56pCkvroSmBihrElz61fZOSmq 82y4x5EP7v3pqSMHtSL5lel+iGuBpPsafok1GF4WUvyvr/DcMLKsphvN8F1Xlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683210553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2M3C+MU/LvFZfD2eIJTxPKWppRY/MnkCMZ/pqKt/1LU=; b=Wo/b6mfjEvJh2zNoWjCAjSvNWP+VUWMlEfMnG5/lTcPm3loXNGKveeHSPU9UEuxoU1+OkL KDhnyZhEEHZuKnzkyzwR3YQqFhqLuzRscDGT7Zi+VdZiPEUSHawArYQMCgBRNdV0AwIsIy aY0yC8eNVPNyZoT2FrTt0nc6SWgLZVecZqehRLjGV00ye4/h0MeAozvAxh/XoJ5Yt8nglK RfpgPsKBido+3yXFwoGPFA7Uo/MBu0LpIW/hgWcjPc215yvbQL7pwJHBsXIHYWVXV/DsDo OOF7t0JNGynwKwwF68RXXPtUgJhJGaxbVEq8GhMv1k1pIDL6xtbv6afOYsXXPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683210553; a=rsa-sha256; cv=none; b=n3g+VYQYjyaApKTwAljayvlL3yw3GSihLuQ8zi59b/yHKfs4/3x3e1qIjS9ahX3EZ72Jhq YB5IJCOfwvg1jWE4xvhOx/P0gnfq5e5e3uR9WTu9LeYlw92IT+vfH6UtU/s1SqSJ+awHwh dYCRye0Vjp3K6wx6BUXGcMdLESeLIjqn6GNU/Axnp+j9KjmVJtBIV0X/IbvVbc8Z/ldh/k TzjGFrbxNBQBAPIagnfRgW8k8cNq9ieVcRtslUhrcJRDK2HYmEpAeYinLop4xm3pmW+LNv 4X0wdZXQ9YDgc7M1vg+jxxfNSy0vILD+WCf4U6lGhqKBbvlawarwQ+y9pGgqPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBx5h6l6mzG44; Thu, 4 May 2023 14:29:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344ETCw7036650; Thu, 4 May 2023 14:29:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344ETCoS036649; Thu, 4 May 2023 14:29:12 GMT (envelope-from git) Date: Thu, 4 May 2023 14:29:12 GMT Message-Id: <202305041429.344ETCoS036649@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: 5fd34912b4a5 - main - stand: Fix oversight in updating OpenZFS: Add com.klarasystems:vdev_zaps_v2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5fd34912b4a51f6ebe55d0d832fab4f3c60228e7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5fd34912b4a51f6ebe55d0d832fab4f3c60228e7 commit 5fd34912b4a51f6ebe55d0d832fab4f3c60228e7 Author: Warner Losh AuthorDate: 2023-05-04 14:25:46 +0000 Commit: Warner Losh CommitDate: 2023-05-04 14:25:46 +0000 stand: Fix oversight in updating OpenZFS: Add com.klarasystems:vdev_zaps_v2 com.klarasystems:vdev_zaps_v2 is a new feature that the last OpenZFS import brought in. It needs to be on the list of supported features, but that update didn't happen so I woke up to a mailbox with multiple complaints. CirrusCI test to boot twice with a zpool update inbetween coming later today. Sponsored by: Netflix --- stand/libsa/zfs/zfsimpl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c index 996245b92c45..fb8938c587cd 100644 --- a/stand/libsa/zfs/zfsimpl.c +++ b/stand/libsa/zfs/zfsimpl.c @@ -133,6 +133,7 @@ static const char *features_for_read[] = { "com.delphix:zpool_checkpoint", "com.intel:allocation_classes", "com.joyent:multi_vdev_crash_dump", + "com.klarasystems:vdev_zaps_v2", "org.freebsd:zstd_compress", "org.illumos:lz4_compress", "org.illumos:sha512", From nobody Thu May 4 15:06:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBxx50lTgz49CHl for ; Thu, 4 May 2023 15:06: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 4QBxx50H8cz3NJR; Thu, 4 May 2023 15:06:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683212809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=btn0QNfplql9pgEWbkxFySR1gpHMINoxU/82ZTkcI9s=; b=E69QtAgH65KQrxq7tDqZfZXgHhjORf/J6iNK38TsvYv1hoyHfT8Od8Aw1p/2kiBRfuBW8L nRSMBdj8Y3PUEzRyx05UF9tnv6rASddtx5qEzITtR+2Om+cSbWOWA7kFAhc54V2N7+WPtv RrKMRUDtd8RtvBtjaP/9Y9oMr2ZX5GKzYO/5ZiRP2jnlWk+Xv8lEeMtHNy4PbW6mh5aFDF +1S9dHaNRVmlxG8UmVgkFLpRgounjbqcX39MWl8VTUa6iMKJ033ttEOxgaKh4EFfMPIv/5 yZc56/22O1lABEaFfggAAKSnVev7SbmBP7j2iq+LBnptN6NjmK4hEwrmfcqFiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683212809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=btn0QNfplql9pgEWbkxFySR1gpHMINoxU/82ZTkcI9s=; b=uaqePHxt91KPDskWYtK7d/g1X0K9san0ORi9F50xBqAVBJGaMifXvxrou7sOGNJZYi1UV1 32JvGA7ho6Qye7lcfx9+8ODXlLtcSnEAcLy86gEfmNv6O/h6EuEEx6WKTLBBm0RpCaq9Kr rkO746GdVV8kDQBGEB66nV069BscPu7n0Zj95SDpoI23ji0s7mfEj2AB+0pZvTa2XKPhV5 bPky04nWJiq43GY4/6ZjMGTuX6Q1XuAlnk3fUlNLwfZTrTA80i61H+qEDKBa57XyKHVbEU d2cLmQ+S/JG68PI3hYjr4o1PbdsCLpTaBUSZFttu7EXA/yg9QqVTSlkTGXytRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683212809; a=rsa-sha256; cv=none; b=jns+09fLfT504zGB4FG/K8A344IZJMukwBeQv9u18kHJ+JPZV+IVe70FyjJ/B+4I5Njemd a2G2b9Wy7cfSVQGU76DPZVHZ9xZbJRLwqSR4/F4+4k/Bw0EzC2Bdnu0TlJbo5WVvklKbkY mMRZ7ZsEGclne7z/oP29nvFDIrOsP2T55vTTX6jeMgYTPB6irM9J4+MJRs5T7KrFW/2HjQ CpCvMiQuez0E0VJfpokQ8bSv/yuMzwqZVG/vRaS6OWQdU9qFd1QicnCJGgEF6UVU+Phq6q utogHiX/ZML8mydHR5DQlUG4HLHU3FFm8PtLbB6xW7sUToHdV6/MTG7++7qgrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBxx468xpzH5X; Thu, 4 May 2023 15:06:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344F6mMw004479; Thu, 4 May 2023 15:06:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344F6mHK004478; Thu, 4 May 2023 15:06:48 GMT (envelope-from git) Date: Thu, 4 May 2023 15:06:48 GMT Message-Id: <202305041506.344F6mHK004478@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Ed Maste Subject: git: 5eab6333fa27 - vendor/spleen - vendor branch created List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/vendor/spleen X-Git-Reftype: branch X-Git-Commit: 5eab6333fa27e2b6954c6927859d462a004e57bb X-Git-Oldrev: 0000000000000000000000000000000000000000 X-Git-Newrev: 5eab6333fa27e2b6954c6927859d462a004e57bb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch vendor/spleen has been created by emaste: URL: https://cgit.FreeBSD.org/src/log/?id=5eab6333fa27 f3d044c73b84 Vendor import of spleen font 1.6.0 5eab6333fa27 Vendor import of spleen font 1.9.3 From nobody Thu May 4 15:06:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBxx90g29z49CGB for ; Thu, 4 May 2023 15:06: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 4QBxx90CNBz3Ndy; Thu, 4 May 2023 15:06:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683212813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cQZFokKzNskPhWmeW2MCHa68ySlSgxLOONKWx0JRtsA=; b=VXcOgPQ6DOX3JA6OuCms4CT/HCfBJavdgzq09EnsFH97K4DfKHXYR5rH5MwIOU8YEGMcwI EEzqE8T5iakIKMlPHcJUHW1dj4lew2LpM86Ki+gRc4iNjwAxzKFL1NyVjjrks0Oo3CbdzZ Z5Se4MQOlWr9hmbgGcLiP+ydBTH5TxCgjnXyBjzX4XL1Tuyb286/RcAKYj95dyneSwcIZk nPrbFAxkO2cdiqvsodLwGDJJojYNtPAhP8NSujv5BsRnI34TAUUPx4Gk9FJQwwTzBtdig7 J0BZpzfnI6twyYu5Ty38YRqetaZJnXAAnKN1TowjdosXLJkk41Du1vdL/CgZog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683212813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cQZFokKzNskPhWmeW2MCHa68ySlSgxLOONKWx0JRtsA=; b=dphmf/4A/2bpg4jD7bh3hGBi/6G8+8uEnBrzoVWH3zjtotLI0/FXTA8yxEXniGVZNsZpYW 7Y4CP3xGR9I9en2tMh7kaHBS/syguQNNulV8Xq233ymgmgIAV8Wv+xIc0o4TteVxo0Jfd/ T6vyUM3kcOc2fsnFXndxZWsqD9s+DQSWlz9tYkQYcQnd8fsce2+RP9X4uUIuByesrDMlwP 2MniSM6Uj9w+h+HNE6becWAXqHalEl4JKRvIL2Erxc29Jq3Z7CY/LiJ01DA3TgElzMhCA+ cgGY4FDNhWff10rT0j1i9XdS6E8jqfldlxNaF9ZH90+ofMEcWLOPyR6H4zGcTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683212813; a=rsa-sha256; cv=none; b=R6Qfus4SrD+nR7jakdB1ZLGqOqvkcVy5VVP1m7YabBdWPS0yf4VR7xyb7pOQmh+f/U39UV 0/y/9CP7hh0Y/RWwqSLQgNi0C4yMmNtR0rYyxI7sTpngd6wvV7qmPPJ0yKmRmHiu/SkhqN dHp4S14T+7PIGTQJPMwNrSFfCNdti5Kd0HQpk3wmV95SRt7ng4W3KrFlKChl0euwLdv47i R89+2nZbL1vnIEArzBBn4DumzWzP5gPx+aZ9/Plt4DKc4DQpiNUMNWDOm75RnQrd6dKALC o1hKln+O9VR+3MYdUVTHtr704UZX9CYyKLE7zrBkpH6AcKyHG3fYsVfES3poaw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBxx86PdpzGkh; Thu, 4 May 2023 15:06:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344F6q3s004583; Thu, 4 May 2023 15:06:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344F6qeT004582; Thu, 4 May 2023 15:06:52 GMT (envelope-from git) Date: Thu, 4 May 2023 15:06:52 GMT Message-Id: <202305041506.344F6qeT004582@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Ed Maste Subject: git: 95fd77c32f17 - Create tag vendor/spleen/1.9.3 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/tags/vendor/spleen/1.9.3 X-Git-Reftype: annotated tag X-Git-Commit: 95fd77c32f1795b7ace00db538a41063a953514b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The annotated tag vendor/spleen/1.9.3 has been created by emaste: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/spleen/1.9.3 tag vendor/spleen/1.9.3 Tagger: Ed Maste TaggerDate: 2023-05-04 15:06:31 +0000 Tag spleen 1.9.3 commit 5eab6333fa27e2b6954c6927859d462a004e57bb Author: Ed Maste AuthorDate: 2023-05-04 15:05:42 +0000 Commit: Ed Maste CommitDate: 2023-05-04 15:05:42 +0000 Vendor import of spleen font 1.9.3 From nobody Thu May 4 15:06:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBxxD48JPz49CHr for ; Thu, 4 May 2023 15:06:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QBxxD3hkTz3P4R; Thu, 4 May 2023 15:06:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683212816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b/xZTVLwm33DU11RJvxCU+J3EpuvJBzO1xW8MZF+wr8=; b=iqkV18rHy71/wkTvqmyNjsYA63ym1/fSlF/tdybSpL0BBN1bYQB8ZHEX/5EtAudJCXXuAn KFdeFM/hVA9jH9g7UTkN8g6ePJ+R/7fzXb0sAD1xdxOeHmBep8bC+dGO5T9f7jGKkXntAx HXrYJjfa9YzU4uBzOm3yhAHXR+wsiv1WD2z1tZ1Hs+pBBCZfFO1oEOObfdhkuw1gWP/30i 7BRqmh9SiJ6m4XU2qRQv5Lb1CHQkKzI3OugMqIcX9COqJf5yuHyR0gFOGDuryWS9vpji9P 3ZmddpAb/A8MKWKLDvU8Hu0wfnwRY4LJs/R4O25sG3J4hDG3OZr0PsEPKgPR0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683212816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b/xZTVLwm33DU11RJvxCU+J3EpuvJBzO1xW8MZF+wr8=; b=HXJFWTPn2ocPsJgivHdavr0uvjge8OeeyNO7OiXd6HiYbIG/3EOL6WeqTFp2eiphFa3HiZ XKxKBsNtK8jb3yj7BShpzc7HEprB3LVTCZMXB68crm3g0S6L4Fmo7lquniQTp0w9W6HNh9 /4z9ZmtEdHWwJVpxroTOP3q76JW01N66kyHzBZxVFhrg/MnewAvOVQxRJKIFwXH0Xeg2bP DWfeyDLesIawvN6gXxNSgTdb9FTjPMqkEaurMzJ88GKMrotLccwoOSz+JiomTSwovf+wCz B+1CchCBapYIWPgZYJCxPFlRQxdOvg6HNoakNlpUJ9J5sosWL0VIfETlZwXVyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683212816; a=rsa-sha256; cv=none; b=O67Hy9t/4LSUg9QNNuztrEmh2RNYClX+K/1CFs4PLUWKDHrPi+mFftGSIjii6Vk3EHTKxk 8lGCZyOvQhwC9YIGScb8Kvvmg8QlWaAuRTAieMHUTeOQ3n/zHlF0BWHPqAGLto25k0/+EX bMImBpUrpI0ZdmQTbCQ3GCjd2EPK6NxUng5jfdKN/syIG9O150jqLJuJvSLYz3d/cOaQ1L whuPrZk9LZNonYx6oP7HWaKWAEL88ChJ1sX0+gHJfuzcZpuaC+Do22f8YCt0FE/IP3pS4W atyJNx8odg7+tLCWkITh95rczeamGWJ3syHU1phdx4JbkY0TFJkoYv9d9JcMjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBxxD2fvQzH5Y; Thu, 4 May 2023 15:06:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344F6uXr004669; Thu, 4 May 2023 15:06:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344F6usG004668; Thu, 4 May 2023 15:06:56 GMT (envelope-from git) Date: Thu, 4 May 2023 15:06:56 GMT Message-Id: <202305041506.344F6usG004668@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Ed Maste Subject: git: 3cddc8651e2f - Create tag vendor/spleen/1.6.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/tags/vendor/spleen/1.6.0 X-Git-Reftype: annotated tag X-Git-Commit: 3cddc8651e2f0bdf8fa48f0b337bb04e59cd737f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The annotated tag vendor/spleen/1.6.0 has been created by emaste: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/spleen/1.6.0 tag vendor/spleen/1.6.0 Tagger: Ed Maste TaggerDate: 2023-05-04 15:04:21 +0000 Tag spleen 1.6.0 commit f3d044c73b847c27ea751557b6c979b735a3771f Author: Ed Maste AuthorDate: 2023-05-04 14:38:22 +0000 Commit: Ed Maste CommitDate: 2023-05-04 14:39:10 +0000 Vendor import of spleen font 1.6.0 Obtained from: https://github.com/fcambus/spleen From nobody Thu May 4 15:40:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBygf15xCz49DbK; Thu, 4 May 2023 15:40:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QBygf0CWhz3QbN; Thu, 4 May 2023 15:40:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683214814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ETpyl8RyUHLbUY4aRoaa7FQlTylfQoWxObnFQAFxgvg=; b=X0zYxbzJUf3sQsBOWRNJC8vMeQo60clzoYPkI/dn64oZV/2CmtrProQ4HqMCJeQxWYpoG8 0b0yzHZXfbPBMj6JdkqMQm5sjSp4dTp9yKTCmz3r/dq61hxEyI+LOg+UeDyx/MWk2riDy3 kojfR7h+b+ngoWG1xwlTq5GV/JlywB5ypwBW0LS3nLfdn2Assy1nBmRsEaQChk5CNVTYPB rwo1TrbvOnj+8B/hzChqx5yjpth1od68sWS3zV3aJO6yqBmspGl31xw1JYXVAoi33+j1Vs qu0jrBpqQt77kEGFwPjhp2zmgInHQmHvWtnyQfpRtB5QQuRNwYZ+WRI/zD7L6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683214814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ETpyl8RyUHLbUY4aRoaa7FQlTylfQoWxObnFQAFxgvg=; b=l9IXu5gxRSaqPepiX28mNBn37eZZc1TIBlLU1j44YenJv2zTUH8P+jvgopNIi5+2AguHjI +vonAwu/HVJ2KvGeGo1fsLLlybmndVqqWSP6KcK35bN7O7mNp8KvpGLxIBp4riPCDWyHgE QCfdrUmguKgO1DvDd7vWCD4FiZHrFAXCqUi1IqquZdLRdwv46i5WoTMEjwxGUjux13mZFI CwOwNmQYwLD3TrXJ6affZ5IDK7O8nlbHD2JS5BGMbtTAJD7pLyqNjMc2I0ji3srJaTbMOr J7uWeuJ2/DghhN4Nfcc+v9B836J3CD2wHVT3cL+V05fzqQLx/asjlI7Gi0Qvng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683214814; a=rsa-sha256; cv=none; b=t+N5dbS7uAu5tVMEwm2nFW45bmoJjQNC5xSBrRxWNA1rSnwCi1n36eCNXyTGi5egs0YhvU tqecyA7qf+EVOkgsZ01rlggeR2brHenX1ypicD4i4Y8tjKXa01yjXhsax8eMF/JGYzPJhG thLPzzLpSQcrpW3TC8ucPiawTadoRSvQ0buCwVAZakXqYi7XSLg7HjPKHcnrpyy8GxG4X2 kM9OLrbgSYfn6fXi0x6bh3JlH+EaYd86Ecxsf8xqWLWux0FCwLGxz+oiO5qCMpwVC8+hmi //5XTPC10ZuOvryGkxbBSGT1WvOjq86BQOYW7WKQu//59lwYddhERFSZbkz+9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBygd6NC6zHch; Thu, 4 May 2023 15:40:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344FeD9C059260; Thu, 4 May 2023 15:40:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344FeDEj059249; Thu, 4 May 2023 15:40:13 GMT (envelope-from git) Date: Thu, 4 May 2023 15:40:13 GMT Message-Id: <202305041540.344FeDEj059249@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: e704f88f3d92 - main - amd64: initialize APs kpmap_store in init_secondary() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e704f88f3d924202e60e37c82dd50a5022c89dd4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e704f88f3d924202e60e37c82dd50a5022c89dd4 commit e704f88f3d924202e60e37c82dd50a5022c89dd4 Author: Konstantin Belousov AuthorDate: 2023-05-04 06:17:30 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-04 15:39:22 +0000 amd64: initialize APs kpmap_store in init_secondary() The APs pcpu area is zeroed in init_secondary() by pcpu_init(), so the early initialization in pmap_bootstrap() is nop. Fixes: 42f722e721cd010ae5759a4b0d3b7b93c2b9cad2ESC Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D39945 --- sys/amd64/amd64/mp_machdep.c | 2 ++ sys/amd64/amd64/pmap.c | 8 ++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 94589f736637..f6c3446e9981 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -215,6 +215,8 @@ init_secondary(void) /* See comment in pmap_bootstrap(). */ pc->pc_pcid_next = PMAP_PCID_KERN + 2; pc->pc_pcid_gen = 1; + pc->pc_kpmap_store.pm_pcid = PMAP_PCID_KERN; + pc->pc_kpmap_store.pm_gen = 1; pc->pc_smp_tlb_gen = 1; diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index a09920d62961..55086125fbb9 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -2036,13 +2036,9 @@ pmap_bootstrap(vm_paddr_t *firstaddr) if (pmap_pcid_enabled) { kernel_pmap->pm_pcidp = (void *)(uintptr_t) offsetof(struct pcpu, pc_kpmap_store); - for (i = 0; i < MAXCPU; i++) { - struct pmap_pcid *pcidp; - pcidp = zpcpu_get_cpu(kernel_pmap->pm_pcidp, i); - pcidp->pm_pcid = PMAP_PCID_KERN; - pcidp->pm_gen = 1; - } + PCPU_SET(kpmap_store.pm_pcid, PMAP_PCID_KERN); + PCPU_SET(kpmap_store.pm_gen, 1); /* * PMAP_PCID_KERN + 1 is used for initialization of From nobody Thu May 4 15:40:14 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBygg2ZNLz49F0l; Thu, 4 May 2023 15:40: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 4QBygg1qmxz3Qmj; Thu, 4 May 2023 15:40:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683214815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HcNDLYvz0xa55SOD73YiTKQ66JqErN5rerrbNfZyUIk=; b=gg1QkUCfibY9pnwL95r1fg8SxY6wpfNa0jvDW/oCG5pnHI/HaCcwjpsVNmv5bavPDb4sqA uqGGjLkhMUXB5EZmiisN2PfXYI5TCfF9sVmJCnF7TBOENlwsQKRWchQny2oxWCfPm5tB3G pgxVE56/cPxVsh0ddRJhX01PkO7jKTdh6+ve0rIS/v7Z1Yvjs4EqljA1IwRjls8sz5hgBW q9wS4fuH8fhFnWnaAwUaUBV5rrEaFFGL4NYg7pwvHW31tVqaoPYd71Nbul+LqlmGFpQRxF rk7xPLDZfiN8w1pjEDlhcUwKuk8Qnlt+fpgv6zUJk4CG1SXo6P6jJCPCQAUicQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683214815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HcNDLYvz0xa55SOD73YiTKQ66JqErN5rerrbNfZyUIk=; b=byAUtH3xUNPsS+/k9g4PsPbj6nN3/F/up+m/5TrncSDzB3IL3DwAdVcChej9/70dxBiTCB jZwYl/8tINRuBAUNnHHrqqrKwuTO7WhM6XH4UzEkzWxw3gWhyheC62Zzg803PyD+KS2JNa xgJS9m6WSZ6xE19qICn+GpaAOzwROEFhwGAV426tgKlhMEVwRiIsnTT+wmzuGfnq9Ad/50 VBFODqsD3wRWAvKpug8C0/p3oFnuOdRuyaaBm43pFXVaKsB/2iI24UAVA+DaK1jzXP3APx cuAXAJXNu8jG3HZUlH6bjYSxabmgnYNIRbKGbPZepbry7Z0DClge9cAj6bQlPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683214815; a=rsa-sha256; cv=none; b=ono3CcRNm3M5wk//QP/8EM1ktGKm+iKzvYLIbkFZfOPP0NUQdM2NOK2HMTLtihoevjDuVp FM67xXdAYi1d6z6eUB6Ex5vvOWGcoRAu2tm132FWkXDAMGR8lwnbL1MPRB2yHMQWUokByo +RlU1wozB2zYVt4NV2V5JAV/1ldxUuP1iArurqVe+7s6Mo0SxUVhmHyYsImxzu4dfE9aUO W5xUATwAEPBjEFZ4XT4GZyZh3rg4QtVCaVrCN82JbohjFJ+Z2Yt+Zzh93mY1EiCs6cQw9I OTnYmHHTSnhrxtuVT49iZYu/GQB5LO6VIlHAtZsmSrRg4jFPZgEvh3pVuUIyGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBygf6tQjzHhM; Thu, 4 May 2023 15:40:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344FeEP3059940; Thu, 4 May 2023 15:40:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344FeETu059928; Thu, 4 May 2023 15:40:14 GMT (envelope-from git) Date: Thu, 4 May 2023 15:40:14 GMT Message-Id: <202305041540.344FeETu059928@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: af1c6d3f3013 - main - amd64: do not leak pcpu pages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: af1c6d3f3013062370692c8e1e9c87bb138fbbd9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=af1c6d3f3013062370692c8e1e9c87bb138fbbd9 commit af1c6d3f3013062370692c8e1e9c87bb138fbbd9 Author: Konstantin Belousov AuthorDate: 2023-05-03 09:41:46 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-04 15:39:22 +0000 amd64: do not leak pcpu pages Do not preallocate pcpu area backing pages on early startup, only allocate enough of KVA for pcpu[MAXCPU] and the page for BSP. Other pages are allocated after we know the number of cpus and their assignments to the domains. PCPUs are not accessed until they are initialized, which happens on AP startup. Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D39945 --- sys/amd64/amd64/mp_machdep.c | 52 ++++++++++++++++++++------------------------ sys/amd64/amd64/pmap.c | 17 ++++++++++----- 2 files changed, 34 insertions(+), 35 deletions(-) diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index f6c3446e9981..5fdde0bb887d 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -290,29 +290,32 @@ init_secondary(void) init_secondary_tail(); } -/******************************************************************* - * local functions and data - */ - -#ifdef NUMA static void -mp_realloc_pcpu(int cpuid, int domain) +amd64_mp_alloc_pcpu(void) { vm_page_t m; - vm_offset_t oa, na; - - oa = (vm_offset_t)&__pcpu[cpuid]; - if (vm_phys_domain(pmap_kextract(oa)) == domain) - return; - m = vm_page_alloc_noobj_domain(domain, 0); - if (m == NULL) - return; - na = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m)); - pagecopy((void *)oa, (void *)na); - pmap_qenter((vm_offset_t)&__pcpu[cpuid], &m, 1); - /* XXX old pcpu page leaked. */ -} + int cpu; + + /* Allocate pcpu areas to the correct domain. */ + for (cpu = 1; cpu < mp_ncpus; cpu++) { +#ifdef NUMA + m = NULL; + if (vm_ndomains > 1) { + m = vm_page_alloc_noobj_domain( + acpi_pxm_get_cpu_locality(cpu_apic_ids[cpu]), 0); + } + if (m == NULL) #endif + m = vm_page_alloc_noobj(0); + if (m == NULL) + panic("cannot alloc pcpu page for cpu %d", cpu); + pmap_qenter((vm_offset_t)&__pcpu[cpu], &m, 1); + } +} + +/******************************************************************* + * local functions and data + */ /* * start each AP in our list @@ -330,6 +333,7 @@ start_all_aps(void) int apic_id, cpu, domain, i; u_char mpbiosreason; + amd64_mp_alloc_pcpu(); mtx_init(&ap_boot_mtx, "ap boot", NULL, MTX_SPIN); MPASS(bootMP_size <= PAGE_SIZE); @@ -403,16 +407,6 @@ start_all_aps(void) outb(CMOS_REG, BIOS_RESET); outb(CMOS_DATA, BIOS_WARM); /* 'warm-start' */ - /* Relocate pcpu areas to the correct domain. */ -#ifdef NUMA - if (vm_ndomains > 1) - for (cpu = 1; cpu < mp_ncpus; cpu++) { - apic_id = cpu_apic_ids[cpu]; - domain = acpi_pxm_get_cpu_locality(apic_id); - mp_realloc_pcpu(cpu, domain); - } -#endif - /* start each AP */ domain = 0; for (cpu = 1; cpu < mp_ncpus; cpu++) { diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 55086125fbb9..1009736472dc 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -1902,7 +1902,7 @@ pmap_bootstrap(vm_paddr_t *firstaddr) vm_offset_t va; pt_entry_t *pte, *pcpu_pte; struct region_descriptor r_gdt; - uint64_t cr4, pcpu_phys; + uint64_t cr4, pcpu0_phys; u_long res; int i; @@ -1917,7 +1917,7 @@ pmap_bootstrap(vm_paddr_t *firstaddr) */ create_pagetables(firstaddr); - pcpu_phys = allocpages(firstaddr, MAXCPU); + pcpu0_phys = allocpages(firstaddr, 1); /* * Add a physical memory segment (vm_phys_seg) corresponding to the @@ -1995,10 +1995,15 @@ pmap_bootstrap(vm_paddr_t *firstaddr) SYSMAP(struct pcpu *, pcpu_pte, __pcpu, MAXCPU); virtual_avail = va; - for (i = 0; i < MAXCPU; i++) { - pcpu_pte[i] = (pcpu_phys + ptoa(i)) | X86_PG_V | X86_PG_RW | - pg_g | pg_nx | X86_PG_M | X86_PG_A; - } + /* + * Map the BSP PCPU now, the rest of the PCPUs are mapped by + * amd64_mp_alloc_pcpu()/start_all_aps() when we know the + * number of CPUs and NUMA affinity. + */ + pcpu_pte[0] = pcpu0_phys | X86_PG_V | X86_PG_RW | pg_g | pg_nx | + X86_PG_M | X86_PG_A; + for (i = 1; i < MAXCPU; i++) + pcpu_pte[i] = 0; /* * Re-initialize PCPU area for BSP after switching. From nobody Thu May 4 15:40:15 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBygh23q7z49F3D; Thu, 4 May 2023 15:40:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QBygh1Pd9z3QnD; Thu, 4 May 2023 15:40:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683214816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MEIMDdDr0F/vqxzGXqF9wkW466NZKTn1fmTnXsz3dZ0=; b=E8S6CIQO3eo6mWd1knZn07MFwwLirtPpL8jcr7XeQAZkK+jV8uwGrL0GurVQY/ve75V1Vn Z5d3JuDNFkV4fghzMMYB5uD9/ILNOaYtbKPQqBst9EiDyBOjEwSO3FFhPDHcfJO8zoGgnf ZaialRK1Ap9nLo8Yjc6YRw0nEDDsKYiyvS+cnP2G3WWkBrU5tfk+ywCrSOOPXuWYE/3Io/ i46DUs76oXkIsAERzi76yHVsekU/eBveNs71HFEM0yuIj/fBHuDy2xCACptxD5j3B0m7ZM KFtJNYne0wpQOb9kpf4/c+s7mkImAK8b4fqv26kKpZ7DK9yGCSGG7hYLa4vAvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683214816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MEIMDdDr0F/vqxzGXqF9wkW466NZKTn1fmTnXsz3dZ0=; b=yeCzJGWaM/OBRvcm34LqhWEX5o6u4kl8th1QUuUT6rcUJ1X9EvItPzMPzmoQK8/8LQKpgN wvMmG8AhsK82DQawFdoXOqHBaQp6AfvcuUkShA1bq9NN6B5Ssbm3KarpCahYTGB+ygrstj 6mhP8uwB+9xmeCIp+0jGKGU5cHXkBl4C9TUcj64jRR+Bm3VH/TNI5mKrGN2jzl3flVTn+T Y2ypTamRETZ63pXfF7rxPH4O0QlJZVeaAU2FS2StmmlrR4qLMfHGRfRh19k/zsxQxJN7/0 JlxI66FuBvkWwah18dAMadiSc3kRR9ol6Hh27ti+Ik0+5Gpwp5riJYzyWyjLkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683214816; a=rsa-sha256; cv=none; b=HoLWRbnHeiBxiE6JIol/q4Zo6NPTsvnOtfOiQsUPOfHBpczM7LEHbupH9/XlU5j0zx/p1U 6no5w9Tdc+++W1aFz0OZGd49Arv0FSlVqf9FALSUUM/YEfAwM6iDpyhdGOdgzgmntwmmS0 6yH6azVhzM/Ux+1T8B/+rzX/Cy9Pgwy7AWRM4J9miQNtWgFHRIeRQOPZzriC+99ROHYDNL Nr/Iq247SY+PgTDc2owbnl9X0oKcURyp4YoFmM7T/47D1XvfYVP9tqVtoBCXAr/dllbu3k 8FFlDx+aNjX+Y2STosOvP7KvW/vWgJ0w/9xxECwJ7OsKQuYcauHAmLQ6gkK9Gw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBygh0KRDzHfd; Thu, 4 May 2023 15:40:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344FeF84060568; Thu, 4 May 2023 15:40:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344FeFST060566; Thu, 4 May 2023 15:40:15 GMT (envelope-from git) Date: Thu, 4 May 2023 15:40:15 GMT Message-Id: <202305041540.344FeFST060566@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: 3582acbad303 - main - amd64 mp_machdep.c: remove useless comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3582acbad303bb69895457a8a7dae0f485efe8ea Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3582acbad303bb69895457a8a7dae0f485efe8ea commit 3582acbad303bb69895457a8a7dae0f485efe8ea Author: Konstantin Belousov AuthorDate: 2023-05-04 06:24:03 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-04 15:39:22 +0000 amd64 mp_machdep.c: remove useless comment Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D39945 --- sys/amd64/amd64/mp_machdep.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 5fdde0bb887d..c6454485483d 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -313,10 +313,6 @@ amd64_mp_alloc_pcpu(void) } } -/******************************************************************* - * local functions and data - */ - /* * start each AP in our list */ From nobody Thu May 4 15:47:34 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QByr72fQRz49DwX; Thu, 4 May 2023 15:47:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QByr725Svz3hp4; Thu, 4 May 2023 15:47:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683215255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V/mCBEALQuG3Ho7ie9gb+DOXrDLmkz6GqJDU3uJ8Sj4=; b=aHKZ3JC94EiUCKz3SVGQ5+t3YQSALFjXjL3hGnDbqQAH6KPsIE59rkZmQPEygqcD+jjf2F TSKX5K5m78NGAKpX4SG0AE/M5Cj6NPhNKMHDaWrIH7ajKjHVcK2LbBox6zaAUI3UXORSD8 a7EwaB41EVZakVGPPQ754HK1p45ugyQlTVxQGf7tfczH3LZx4OBlAV9faxNZXB0jjzAcFW nkUM0QiISfuRg4MwQIjiyEuqxPY/vtnoHNy4Q6IA+IWQ3acaCCDSOEQPsC0xEKhZ4s+1ei bYeSpv5O6ou+s0qNWcr7lNdx9BCWBTnCBwJMu2G42xyksVpjLYz2QFe73iKoxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683215255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V/mCBEALQuG3Ho7ie9gb+DOXrDLmkz6GqJDU3uJ8Sj4=; b=ulJTfuvAgLWaUw9gBmgJzhimcl2GHZKsoqZWREf+ivWiOL/kuS/8mXjkKToPRBhDFBMRgL n9Q27JCmbMRvUtvouPJr6ARf+AIoHN6el8a3QPsG+07s60Jj319itNbTus/g86ZhuPSu0v sMXgr6xn3sta9y11newex9/NPia9rtRLeRvKdbbLl3d2F0i5YmsS1XRBnRYSfLlRCp4AwM NSM5u7J/S+Mk7j6/eJqrQi5D48zYaQhXaEQyl+XQuDVFMNjEpXh+yrIfF06W7bNwNkn3dM xooNzpLA1GJpfpsnCZ6bbbcyGFFp0UgSvvm9MC3D2jAWGcIuOH88/YvLYXY4Lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683215255; a=rsa-sha256; cv=none; b=I/Q8CNgBynK+R8W0bnQqP6JSk2oWVGWWv2FS//l6wGMMli7CHvuyKcvvFqrxg8J4G07W/j jcziaE0U/1ByDSCuEWdXDooiJlCwMIePdb6VgYh8FH+HP5AORCO6WnKy/vV/R+lWdxt303 Pp2m2JyW5gjFGZU90dC77dZYPr/YaJR33Cdp/hKoywBsXHPoRu+SWdX3SPbZ1eBg5zW+HR ZHZbELFs4Z+OuSxJedmoGKLq6WYs0bIPp/iPBljcmRjyySrAugDHJdrHSb9xbCp1Y5fLeP RaeLRrGklLKGS6GCfIqYncKg8WSq/RbDoipfATpDygHKcFDseW5r34jEhPokKw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QByr717RwzJ4x; Thu, 4 May 2023 15:47:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344FlZVY069792; Thu, 4 May 2023 15:47:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344FlYn2069791; Thu, 4 May 2023 15:47:34 GMT (envelope-from git) Date: Thu, 4 May 2023 15:47:34 GMT Message-Id: <202305041547.344FlYn2069791@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: 0d66206fff44 - main - Add 'contrib/spleen/' from commit '5eab6333fa27e2b6954c6927859d462a004e57bb' List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0d66206fff44f864ea8a4b220c3a53b4caa959a0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0d66206fff44f864ea8a4b220c3a53b4caa959a0 commit 0d66206fff44f864ea8a4b220c3a53b4caa959a0 Merge: 3582acbad303 5eab6333fa27 Author: Ed Maste AuthorDate: 2023-05-04 15:46:25 +0000 Commit: Ed Maste CommitDate: 2023-05-04 15:46:40 +0000 Add 'contrib/spleen/' from commit '5eab6333fa27e2b6954c6927859d462a004e57bb' git-subtree-dir: contrib/spleen git-subtree-mainline: 3582acbad303bb69895457a8a7dae0f485efe8ea git-subtree-split: 5eab6333fa27e2b6954c6927859d462a004e57bb Reviewed by: imp [earlier] Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20653 contrib/spleen/AUTHORS | 5 + contrib/spleen/ChangeLog | 264 + contrib/spleen/LICENSE | 24 + contrib/spleen/README.md | 236 + contrib/spleen/spleen-12x24.bdf | 26081 +++++++++++++++++ contrib/spleen/spleen-16x32.bdf | 32918 +++++++++++++++++++++ contrib/spleen/spleen-32x64.bdf | 59894 ++++++++++++++++++++++++++++++++++++++ contrib/spleen/spleen-5x8.bdf | 7121 +++++ contrib/spleen/spleen-6x12.bdf | 9009 ++++++ contrib/spleen/spleen-8x16.bdf | 20465 +++++++++++++ 10 files changed, 156017 insertions(+) diff --cc contrib/spleen/AUTHORS index 000000000000,1fdb3485e79a..1fdb3485e79a mode 000000,100644..100644 --- a/contrib/spleen/AUTHORS +++ b/contrib/spleen/AUTHORS diff --cc contrib/spleen/ChangeLog index 000000000000,2688c8a9dc50..2688c8a9dc50 mode 000000,100644..100644 --- a/contrib/spleen/ChangeLog +++ b/contrib/spleen/ChangeLog diff --cc contrib/spleen/LICENSE index 000000000000,7f639bf61a6d..7f639bf61a6d mode 000000,100644..100644 --- a/contrib/spleen/LICENSE +++ b/contrib/spleen/LICENSE diff --cc contrib/spleen/README.md index 000000000000,000000000000..629a13711038 new file mode 100644 --- /dev/null +++ b/contrib/spleen/README.md @@@ -1,0 -1,0 +1,236 @@@ ++``` ++ ++ :::::::::::::::::::: ++ ::: ::: ++ _____ _______ __. ________ ________ ________. ::: ++ _) _//__ __/ __ / |.\ __ /.\ __ /.\ _. | ::: ++ .\____ /.\ )/ / || )/ | )/ | \| | ::: ++ | )/ | __/| \ _____| _____| | |_ ::: ++ |____ |_____| |_____/____\\ |____\\ | |____/ ::: ++ - -- -- \_____| -H7--------------------------- `----' ----- ::: - - ++ ::: ::: ++ :::::::::::::::::::: ++ ++``` ++ ++# Spleen ++ ++Spleen is a monospaced bitmap font available in 6 sizes: ++ ++- 5x8 ++- 6x12 ++- 8x16 ++- 12x24 ++- 16x32 ++- 32x64 ++ ++Each size is provided in the Glyph Bitmap Distribution Format (BDF), and ++release tarballs contain the fonts in the following formats: `PCF`, `PSF` ++(for the Linux console), `OTB`, `OTF`, `.dfont` for macOS users, and `FON` ++for Windows users. ++ ++All font sizes contain all ISO/IEC 8859-1 characters (Basic Latin and Latin-1 ++Supplement Unicode block), Latin Extended-A characters, as well as Box Drawing, ++Block Elements, and Braille Patterns Unicode blocks, except for the 5x8 and the ++6x12 versions. ++ ++Due to character size constraints, the 5x8 version only contains printable ++ASCII characters, the Braille Patterns Unicode block, and light Box Drawing ++characters. Please also note that there is no OpenType version for this size. ++ ++As of Spleen 1.8.0, there is now a 6x12 version containing the same Unicode ++blocks as the 5x8 version and the Latin-1 Supplement Unicode block. ++ ++Spleen also has support for Powerline symbols out of the box. ++ ++The font name is a reference to Baudelaire. ++ ++## Screenshots ++ ++The following screenshots show Spleen 16x32 displaying code and prose. ++ ++![Spleen - Hello][1] ++ ++![Spleen - L'etranger][2] ++ ++ASCII characters for all sizes: ++ ++Spleen 5x8: ++ ++![Spleen - ASCII characters - 5x8][3] ++ ++Spleen 6x12: ++ ++![Spleen - ASCII characters - 6x12][4] ++ ++Spleen 8x16: ++ ++![Spleen - ASCII characters - 8x16][5] ++ ++Spleen 12x24: ++ ++![Spleen - ASCII characters - 12x24][6] ++ ++Spleen 16x32: ++![Spleen - ASCII characters - 16x32][7] ++ ++Spleen 32x64: ++![Spleen - ASCII characters - 32x64][8] ++ ++## XLFD font names ++ ++``` ++-misc-spleen-medium-r-normal--8-80-72-72-c-50-iso10646-1 ++-misc-spleen-medium-r-normal--12-120-72-72-c-60-iso10646-1 ++-misc-spleen-medium-r-normal--16-160-72-72-c-80-iso10646-1 ++-misc-spleen-medium-r-normal--24-240-72-72-c-120-iso10646-1 ++-misc-spleen-medium-r-normal--32-320-72-72-c-160-iso10646-1 ++-misc-spleen-medium-r-normal--64-640-72-72-c-320-iso10646-1 ++``` ++ ++## Packages ++ ++Spleen packages are available for: ++ ++- [OpenBSD][9] ++- [NetBSD][10] ++- [FreeBSD][11] ++- [Arch Linux][12] ++- [Void Linux][13] ++- [Nix][14] ++- [Debian][15] ++- [Ubuntu][16] ++- [MacPorts][17] ++ ++## Manual installation ++ ++### *BSD and Linux ++ ++Clone the repository, convert the files to the Portable Compiled Format ++(PCF) using **bdftopcf** and run **mkfontdir** in the directory. ++ ++Alternatively, release tarballs provide PCF files for each size. ++ ++### macOS ++ ++macOS users should use the `.dfont` files provided in the release tarballs. ++ ++### Windows ++ ++Windows users should use the `.fon` or `.otf` files provided in the release ++tarballs. ++ ++## Usage ++ ++### *BSD and Linux ++ ++Update the font path to include **Spleen**: ++ ++ xset +fp /usr/local/share/fonts/spleen/ ++ ++Update **.Xdefaults** and add one of the following directives: ++ ++ xterm*faceName: spleen:pixelsize=8:antialias=false ++ xterm*faceName: spleen:pixelsize=12:antialias=false ++ xterm*faceName: spleen:pixelsize=16:antialias=false ++ xterm*faceName: spleen:pixelsize=24:antialias=false ++ xterm*faceName: spleen:pixelsize=32:antialias=false ++ xterm*faceName: spleen:pixelsize=64:antialias=false ++ ++Launch **xterm**. ++ ++Ubuntu has bitmap fonts support disabled by default, instructions to enable ++it are available [here][18]. ++ ++### Linux console ++ ++Release tarballs provide PSF files for each size, `setfont` can be used ++to load and set the desired font. ++ ++### NetBSD console ++ ++NetBSD has .fnt files for each size which can be loaded using wsfontload(8). ++ ++For example, to load Spleen 16x32: ++ ++ wsfontload -N spleen-16x32 -w 16 -h 32 /usr/share/wscons/fonts/spleen-16x32.fnt ++ wsconsctl -dw font=spleen-16x32 ++ ++### FreeBSD console ++ ++The FreeBSD package contains .fnt files which can be loaded using ++vidcontrol(1). ++ ++For example, to load Spleen 16x32: ++ ++ vidcontrol -f /usr/local/share/fonts/spleen/spleen-16x32.fnt ++ ++### OpenType versions ++ ++Spleen release tarballs now contains OTF versions generated automatically ++from the BDF files, using [bdf2sfd][19]. Each font has a different name, ++allowing them to be installed alongside. ++ ++They should be used in the exact size specified below, with anti-aliasing ++disabled. ++ ++- Spleen 6x12: 9 Pt (12 pixels) ++- Spleen 8x16: 12 Pt (16 pixels) ++- Spleen 12x24: 18 Pt (24 pixels) ++- Spleen 16x32: 24 Pt (32 pixels) ++- Spleen 32x64: 48 Pt (64 pixels) ++ ++## License ++ ++Spleen is released under the BSD 2-Clause license. See `LICENSE` file for ++details. ++ ++## Author ++ ++Spleen is developed by Frederic Cambus. ++ ++- Site: https://www.cambus.net ++ ++## Resources ++ ++- [Spleen - Monospaced bitmap fonts][20] (2018) ++- [New console font Spleen made default][21] (2019) ++- [NetBSD, CTWM, and Spleen][22] (2021) ++ ++GitHub: https://github.com/fcambus/spleen ++ ++## Trivia ++ ++- Spleen is the default font for OpenBSD consoles since January 2019 ++- Spleen was imported in the NetBSD src tree in March 2019 ++- Spleen 12x24 was used in the Haiku [kernel debugger][23] (on high resolution ++ displays) from May 2021 to June 2022 ++- [msTERM][24], a Terminal program for MailStation devices uses Spleen 5x8 ++- [FBInk][25], a library to print text & images to an eInk Linux framebuffer ++ embeds Spleen 16x32 ++ ++[1]: https://www.cambus.net/content/2018/09/spleen-hello.png ++[2]: https://www.cambus.net/content/2018/09/spleen-etranger.png ++[3]: https://www.cambus.net/files/spleen/spleen-5x8.png ++[4]: https://www.cambus.net/files/spleen/spleen-6x12.png ++[5]: https://www.cambus.net/files/spleen/spleen-8x16.png ++[6]: https://www.cambus.net/files/spleen/spleen-12x24.png ++[7]: https://www.cambus.net/files/spleen/spleen-16x32.png ++[8]: https://www.cambus.net/files/spleen/spleen-32x64.png ++[9]: https://openports.pl/path/fonts/spleen ++[10]: https://pkgsrc.se/fonts/spleen ++[11]: https://www.freshports.org/x11-fonts/spleen/ ++[12]: https://aur.archlinux.org/packages/spleen-font/ ++[13]: https://github.com/void-linux/void-packages/tree/master/srcpkgs/font-spleen ++[14]: https://github.com/NixOS/nixpkgs/tree/master/pkgs/data/fonts/spleen ++[15]: https://packages.debian.org/search?keywords=spleen ++[16]: https://packages.ubuntu.com/search?keywords=spleen ++[17]: https://ports.macports.org/port/font-spleen/ ++[18]: https://wiki.ubuntu.com/Fonts#Enabling_Bitmapped_Fonts ++[19]: https://github.com/fcambus/bdf2sfd ++[20]: https://www.cambus.net/spleen-monospaced-bitmap-fonts/ ++[21]: https://undeadly.org/cgi?action=article;sid=20190110064857 ++[22]: https://www.cambus.net/netbsd-ctwm-and-spleen/ ++[23]: https://git.haiku-os.org/haiku/commit/?id=29a109bd6c01ce71bb61177ee9ff0417e74c1e18 ++[24]: https://github.com/jcs/msTERM ++[25]: https://github.com/NiLuJe/FBInk diff --cc contrib/spleen/spleen-12x24.bdf index 000000000000,081694e4c63d..081694e4c63d mode 000000,100644..100644 --- a/contrib/spleen/spleen-12x24.bdf +++ b/contrib/spleen/spleen-12x24.bdf diff --cc contrib/spleen/spleen-16x32.bdf index 000000000000,08f888ba87b8..08f888ba87b8 mode 000000,100644..100644 --- a/contrib/spleen/spleen-16x32.bdf +++ b/contrib/spleen/spleen-16x32.bdf diff --cc contrib/spleen/spleen-32x64.bdf index 000000000000,d67331a3206e..d67331a3206e mode 000000,100644..100644 --- a/contrib/spleen/spleen-32x64.bdf +++ b/contrib/spleen/spleen-32x64.bdf diff --cc contrib/spleen/spleen-5x8.bdf index 000000000000,4cf57171ce82..4cf57171ce82 mode 000000,100644..100644 --- a/contrib/spleen/spleen-5x8.bdf +++ b/contrib/spleen/spleen-5x8.bdf diff --cc contrib/spleen/spleen-6x12.bdf index 000000000000,1b1b95f370ad..1b1b95f370ad mode 000000,100644..100644 --- a/contrib/spleen/spleen-6x12.bdf +++ b/contrib/spleen/spleen-6x12.bdf diff --cc contrib/spleen/spleen-8x16.bdf index 000000000000,4509fb709e0e..4509fb709e0e mode 000000,100644..100644 --- a/contrib/spleen/spleen-8x16.bdf +++ b/contrib/spleen/spleen-8x16.bdf From nobody Thu May 4 15:51:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QByx00fjWz49F4s for ; Thu, 4 May 2023 15:51: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 4QBywz6nHGz3j92; Thu, 4 May 2023 15:51:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683215508; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dd2hlXJij4MsIFKppzc2G2R52vwskYcgjJQbZE0MRMA=; b=Ckqo/CJ2rIYI/Mdm/u/RmRfreaO1WmVQgEp9kxqYAz4zMLP4Zpk1RzIC5TWGWmcmFyTKf5 JaQxd96HXFNPsHOoU6PMDj6CIS1pkSem41TgkWsztF8ZWri/3woW/LuucGqljYuw5JJW1A 1ISnn2TXv0B8soRGOWczUdMf5B1C4WgAN5OU2XUd+geMbuGVGg+srSIlZJfbuMKtB5sVDe AMKVPv3oS6dqjnQe0HYowLJ/NgONoW3rK8/FoHK78+7PaBjWQremCIx97vMYqF3iSDDCdm sn91Q42If/FKyPflgsZPZ0/l8NoZOQBcMrIejskAjpr6sAVarecPBrkqjuYccg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683215507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dd2hlXJij4MsIFKppzc2G2R52vwskYcgjJQbZE0MRMA=; b=dM+bl6qOoZp932Y4OWl1u5LPZkFKIcMcCy5kuLHx6PhvePzC74EIMZTAG4RDc5wwbMQrR8 Ne37aGSmwfOMfhdwVcsHLsadZK0DQRZkMG/MKi8DGW0Wfx1lYxWp61E1mv4lGBTCUryhcz f7Rppgc8evZQ3XcvE3V/QlESxwkBfJXNoEahGbmRLWHBAS4ETt4ArWolDyGBMV2mmF1orK r63PW6XAX2pqh7seS9BLhWQVh/IEUe5mSf4aQaWAThexwxc2j9Fi1IQN5dxAzLS6HQNp4q QLXuEh96gEcbB8qqI9v8VX7pUZU2CxYWpBnx7hakW92VqElT4zN258pEqTBbew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683215507; a=rsa-sha256; cv=none; b=l8W/85zyv08RYh5z2gCKtFMdklG1AwB/RJxZRtAON4USXcqwyyPHQUxO695a04KxFNKQ24 YyiQTC9yj07jl0U6nmpVYxVwRrpiWeJGBfXRoIXr+ls/CyD59IiWs6ewdEqAjiRjehHpZ4 8NaJWODySrx17k3y7rnaxeF2RD9iMg+nRwFeyjnncRyu8cK8D5eNbiegSSxwQZeComVF+w koeeCOnBWOPvlxBVVA9Ps+HHyde67Ori6fl5lCk8IICBXBzrv4XyVHSP1VpwAOcD+il9dR 6Ws8EPELt1zpVI/83PnzitZha2FO+ZHxZFiFfQCYMIpUamgerF/p0D0bMXMvrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBywz5s4jzHgS; Thu, 4 May 2023 15:51:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344Fplwp083942; Thu, 4 May 2023 15:51:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344FplOC083941; Thu, 4 May 2023 15:51:47 GMT (envelope-from git) Date: Thu, 4 May 2023 15:51:47 GMT Message-Id: <202305041551.344FplOC083941@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Joseph Mingrone Subject: git: eef4ce96102a - Create tag vendor/libpcap/1.10.4 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrm X-Git-Repository: src X-Git-Refname: refs/tags/vendor/libpcap/1.10.4 X-Git-Reftype: annotated tag X-Git-Commit: eef4ce96102a30891c3fad94229606c23186546d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The annotated tag vendor/libpcap/1.10.4 has been created by jrm: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/libpcap/1.10.4 tag vendor/libpcap/1.10.4 Tagger: Joseph Mingrone TaggerDate: 2023-05-04 15:13:08 +0000 Tag libpcap 1.10.4. commit 6b96668d5b49eea57b7551349eca70928cc199ce Author: Joseph Mingrone AuthorDate: 2023-05-04 14:52:25 +0000 Commit: Joseph Mingrone CommitDate: 2023-05-04 14:57:30 +0000 Import libpcap 1.10.4 Reviewed by: emaste Sponsored by: The FreeBSD Foundation From nobody Thu May 4 15:51:47 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QByx00jSHz49FSP for ; Thu, 4 May 2023 15:51: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 4QBywz6dVwz3jHq; Thu, 4 May 2023 15:51:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683215507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YA7s+Zu1BhhUsBkjX2gWP9GG0iw7tvqMM62oB/RoZ3w=; b=N34ExEh+2068KZeZeSnpiHc4Ilx5dxyeD1wjIWsSYK6jIhO3ms/PhTFrkM1Tp5jJUDJPmG dJeb0T0VO4NiE1PGXeMkYpD4rrfWaUw+rlx4FkLQ/xudWOKEAhHQr5Em5T5+9OQvq/Qqu1 8Vjo0yWAW3yKNy3QOqKjg16Mb87nsF+elBxou75Z41Kc9LSRyoi6WGoNsGVl+0TFtI3YM2 Ro4YZvTjmY1I/ISV/mKHWGgYrCH5CXq+kXruELm3vTRIANciXpZCwXtMr0hxAyepHPmN4b Epugp/TyzYwFHBug0dAH6zKfZZMyN/KpJYNCybdxXE49/wvhauc0Rcm8eDXWvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683215507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YA7s+Zu1BhhUsBkjX2gWP9GG0iw7tvqMM62oB/RoZ3w=; b=Y7a11QwrYnbdxfePalpkEXrUzkhG+XOjw1QCsEkI9yln+mctAbPCJG7b1h3dug39RfEaUf tpZ0S0osUYC1zVAt9U0h7qcC6SOM78+A1LLm3sFotnFUvr1dJfq6QTaaOzB+LG4bPX0M2H Ci95HIFdxD7z/2/4sboQP1RdmN4fg5lvszwMGKSKrU/e70lxHppv4Vy11hrt4nXA5qzjGN JD6tprMgR5011RTuBvW2O6LtnNg8O3/cRmBApMYldhzceHjf8IBMlkMdyQc200QMAvqu7c 8WXcPZbKBhOYptXeC5VlT+w7/y4h70f9AmXqljvA5hS3ye52JjEv3BntVr8gaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683215507; a=rsa-sha256; cv=none; b=Qmgmp/YugeeRTRq/7r8O2a4n6/r1Q8+RmsGeGSY3VkLjNcV7niYWNxpaRPu3X2Z0bTC92p MZxekUpd97jL66rKwfZO4ivqleIS/BDiUNd6TG1iuMXF8rFldr2LKy4YtNRZKgIO5LJFVJ Kmx/1FnGwzDPH8Z1AGgtXZ3h5WY35m+kjWRyG5aPKUeax0YMWvUorVtZiw2neL8s8dIqrm sDnSPdFyZ71D4q5qwnhVZaZ5NUVpXNTE3Ri20+jJmuuO2o8Qua0LNINb9u2KFSrSKtKwbt M/Kksq32lraCBE4ayVZm9TEfKs/c7G2Z49siQfAbv4qGAc+EhVV5Xk1xlOZZ3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBywz5NkjzJ5T; Thu, 4 May 2023 15:51:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344Fpld3083923; Thu, 4 May 2023 15:51:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344Fplp2083922; Thu, 4 May 2023 15:51:47 GMT (envelope-from git) Date: Thu, 4 May 2023 15:51:47 GMT Message-Id: <202305041551.344Fplp2083922@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Joseph Mingrone Subject: git: 35af88c96350..6b96668d5b49 - vendor/libpcap - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrm X-Git-Repository: src X-Git-Refname: refs/heads/vendor/libpcap X-Git-Reftype: branch X-Git-Commit: 6b96668d5b49eea57b7551349eca70928cc199ce X-Git-Oldrev: 35af88c96350eb786f1198dfb6b29a171016e6bf X-Git-Newrev: 6b96668d5b49eea57b7551349eca70928cc199ce Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch vendor/libpcap has been updated by jrm: URL: https://cgit.FreeBSD.org/src/log/?id=35af88c96350..6b96668d5b49 6b96668d5b49 Import libpcap 1.10.4 From nobody Thu May 4 16:24:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QBzfB2l6nz49Gtg; Thu, 4 May 2023 16:24:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QBzfB2GkPz3qYN; Thu, 4 May 2023 16:24:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683217442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k0NFI4u9oOKFmb7O1IEKDWw/cObhSyBpTbaj2SUAdp8=; b=JA7QbGaNIS4X/ypL1Lr7LzCpsRUKQ3YK9e+6iJvrugc6pOEzNIHsLHFYLD5SmxmyYr5DhX 1afxdHL6t72OAQiP7K8qjUqTf1WBbdjabOW2Sb0a7D1A9QBWigGKJk1T/kszUdiXliErF2 fbj6aOvCKt01/0P/JYKrY6wm12dNMOBi3zgwMpeyon1dezajn0myG1JomUjQQSGTanXr+E mRVfh6ENnCiigTzsP7p618RZh+SoNskPuKfw0t2Jao6ReGmbmvHFRJxrtZeviuq0LWs+tz fbH4+oq1tE1aaGRfc/XA223JoAxtYmmVqC49wBu86gOveba55TsIfM79dtXyiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683217442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k0NFI4u9oOKFmb7O1IEKDWw/cObhSyBpTbaj2SUAdp8=; b=orjFHIciCD1q9Tahxux9BSSPzHZqA3kkkidkgYq9IAyheNDu+Ouv/qMfl5dTrUPfB2aAWV iYM7pGHLMt13q6u8PHrjHCoeFnD+9G5XEOYn94IYHsQn0jsAuPmV19rw/vBJjaV3g4ANpt 3Tx4WG/QjKLavAKWXR+tqh1SX7zy7wlIQLWNAdfMH6DTTOno0UmYafmzJH+ElihGambs4a q1BIEgIU4jHkX32ZFGhPL0qFqVKgesRytvVwUPNH545OWOhFy2vsAksHh+M4cebiSyRU4i 7OAbGZoIBQICApqO7UJeyFQmC6UznpQwgnzRiUJpO1VtK6ycDsBb6wGuJFKigA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683217442; a=rsa-sha256; cv=none; b=l3SYyTzmnkmt8WIIxtOyMsL/LIp5Om8ilFXfWXKSp0tLeavhCBltCD6viJVAC8C5ljvWxK n+tHVrChNtP6HJOqPoHc1BhsNGEVyix1TtSXwJcLUGTDO/C1zu3kmlDoA4e29k4Yo3faUR r+GrVgU+/LDcE64dn/nswIFOby2i8/QaUFgRERCgUVxjU+BCA/4xnLDHkLOIHZ/eDbpTm2 KDEBPRsmM6LKeZmamX82vAOYA7hZRL9XP5CcbOxtqPfSrIhhbgJEvV8xHUf7/EskO/ApCk CleFZuyX9/3mysCbuiNAcVpsI/hKCVK2OuG4iHa/L38QAVBI3VIQ9JL2Qe5VKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QBzfB1L7yzJdq; Thu, 4 May 2023 16:24:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344GO2u0035535; Thu, 4 May 2023 16:24:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344GO2VP035534; Thu, 4 May 2023 16:24:02 GMT (envelope-from git) Date: Thu, 4 May 2023 16:24:02 GMT Message-Id: <202305041624.344GO2VP035534@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: bf206a1db26e - main - pf: remove NULL check before uma_zfree() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bf206a1db26e44180466ea2258a2b82467ffb99e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=bf206a1db26e44180466ea2258a2b82467ffb99e commit bf206a1db26e44180466ea2258a2b82467ffb99e Author: Kristof Provost AuthorDate: 2023-05-04 15:20:02 +0000 Commit: Kristof Provost CommitDate: 2023-05-04 16:22:54 +0000 pf: remove NULL check before uma_zfree() uma_zfree() can be called on a NULL pointer. Simplify the pf code a little by removing the redundant checks. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/if_pfsync.c | 6 ++---- sys/netpfil/pf/pf.c | 18 ++++++------------ sys/netpfil/pf/pf_norm.c | 6 ++---- 3 files changed, 10 insertions(+), 20 deletions(-) diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c index 2bf1146ceda8..cf9a50a7020c 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -649,10 +649,8 @@ cleanup: error = ENOMEM; if (skw == sks) sks = NULL; - if (skw != NULL) - uma_zfree(V_pf_state_key_z, skw); - if (sks != NULL) - uma_zfree(V_pf_state_key_z, sks); + uma_zfree(V_pf_state_key_z, skw); + uma_zfree(V_pf_state_key_z, sks); cleanup_state: /* pf_state_insert() frees the state keys. */ if (st) { diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index ee17df0c866f..1424099b1e5a 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -4541,10 +4541,8 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, int direction, return (action); } } else { - if (sk != NULL) - uma_zfree(V_pf_state_key_z, sk); - if (nk != NULL) - uma_zfree(V_pf_state_key_z, nk); + uma_zfree(V_pf_state_key_z, sk); + uma_zfree(V_pf_state_key_z, nk); } /* copy back packet headers if we performed NAT operations */ @@ -4570,10 +4568,8 @@ cleanup: free(ri, M_PF_RULE_ITEM); } - if (sk != NULL) - uma_zfree(V_pf_state_key_z, sk); - if (nk != NULL) - uma_zfree(V_pf_state_key_z, nk); + uma_zfree(V_pf_state_key_z, sk); + uma_zfree(V_pf_state_key_z, nk); return (PF_DROP); } @@ -4812,10 +4808,8 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, return (PF_PASS); csfailed: - if (sk != NULL) - uma_zfree(V_pf_state_key_z, sk); - if (nk != NULL) - uma_zfree(V_pf_state_key_z, nk); + uma_zfree(V_pf_state_key_z, sk); + uma_zfree(V_pf_state_key_z, nk); if (sn != NULL) { PF_SRC_NODE_LOCK(sn); diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index c0dd3ba60113..8b267636751a 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -1576,10 +1576,8 @@ pf_normalize_tcp_init(struct mbuf *m, int off, struct pf_pdesc *pd, void pf_normalize_tcp_cleanup(struct pf_kstate *state) { - if (state->src.scrub) - uma_zfree(V_pf_state_scrub_z, state->src.scrub); - if (state->dst.scrub) - uma_zfree(V_pf_state_scrub_z, state->dst.scrub); + uma_zfree(V_pf_state_scrub_z, state->src.scrub); + uma_zfree(V_pf_state_scrub_z, state->dst.scrub); /* Someday... flush the TCP segment reassembly descriptors. */ } From nobody Thu May 4 16:45:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC06R6JQWz49HqX; Thu, 4 May 2023 16: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 4QC06R5bkjz401M; Thu, 4 May 2023 16: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=1683218703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PI13f4jpq3HveFkhIXkNJtTuOUwQd2vXgxsOrNvPgZg=; b=ZFtLQKj7V6MT9Qpvie+CQL6SXEo7xYmhqPTrZjjK3sLbAsQrmN0avaQQTmQllDrHhEMj4S M251V+qeiUB+g9hIE2NC3CkOwQ28WFMRDBNberYXNdU1oMMLL4rscyss0o9kPTqaNJlx6j K9dh6C7QOjKgtN/e5ybbPs/CWfaLhZi6iSSJo1o8DpjcDtOewJ/vj2Oa8RByvs16KBPVGM QIhmR/GxZaRDIFzjuTjctzqphP5oBtLRZ2bqu2R+JsSOFjsj93lrjqn0hjcf1Njk9TIixO A3IDLnuzPxsnK3EKHoeHwBIQN3ZXgMuxXRog+laM+Uh2G7SRALiwq3Fj2STpgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683218703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PI13f4jpq3HveFkhIXkNJtTuOUwQd2vXgxsOrNvPgZg=; b=r5j/VDRb3SaEeL+YgGsSbv8JF1bBxU4AOkQesEQ+fkpwJQ3PoJ/FB68cEmy84W0wx7rJ2X 9MBI2VeHMvLg9coRzZrC4AaODZ7ua1xVRdTEi/gQQKuocIv7xNICY7fsUEhDHmJqBTwl1d tzJCzJ5/ZyvltNneVKvaqS1cSkdAnCosUm+eLJie+g03EZrq5WWuMG153UXMwDXwk6BhAr kKzEzmTYM1Q44l2OHSzAugACJn5wCZd2KG0jKAZVvBQ47ZuYzLwZUT8L1J1Rag9vpYRmUv u82yfOKjv0XGwsSPvNDtUZB+onZLce1J0Ihs4KaH4OrNzAxwNSQ0a3/lz32SQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683218703; a=rsa-sha256; cv=none; b=CS9oCeNwam0onRQA6EV7j66s+ZPCArfAknFGOGBYuRjcCHEJoRWTw4P9AaZ9EuYCtwSgCx lsRNWBaq316Ifrf0RZ4Yo5ZLk2iULAKEEcLyep9fzFKDtBrCvLqepT10D/cqTQUJLbirAa Vm9yi3BnMLv8wFWeb5jaPQdta4J9ms7xFHyXnbyn3C0UbrdLvBu9PuPnnScUpKQ0ldfe4m uOeCNTmBXD/c/IppCQXtmODdIB6YoNPoxlMtQzXCOc46ziFwvA0SlFMDCDexlcLN6AG7rA /D9HRsupIt0j1dkvtkEEq/1U/bbm6epchQ5Sd1VXSPzivZf+6iBU5HU9PNiixg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC06R4gLXzKR4; Thu, 4 May 2023 16:45:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344Gj32l067955; Thu, 4 May 2023 16:45:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344Gj3sT067954; Thu, 4 May 2023 16:45:03 GMT (envelope-from git) Date: Thu, 4 May 2023 16:45:03 GMT Message-Id: <202305041645.344Gj3sT067954@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 63c903e874da - stable/13 - Cirrus-CI: set PKG_FORMAT via top level `env:` List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 63c903e874da4d8d4a81cba9d7bdfecfe0169598 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=63c903e874da4d8d4a81cba9d7bdfecfe0169598 commit 63c903e874da4d8d4a81cba9d7bdfecfe0169598 Author: Ed Maste AuthorDate: 2023-05-01 16:45:36 +0000 Commit: Ed Maste CommitDate: 2023-05-04 13:16:24 +0000 Cirrus-CI: set PKG_FORMAT via top level `env:` This ensures consistency among different CI scripts, including future ones for pkgbase work. Sponsored by: The FreeBSD Foundation (cherry picked from commit 75baf3765c686547e8e4a5510858f45c23ccdec3) --- .cirrus.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 88d232403ed1..81f049d7db46 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -12,6 +12,7 @@ compute_engine_instance: env: CIRRUS_CLONE_DEPTH: 1 + PKG_FORMAT: tar task: matrix: @@ -46,7 +47,7 @@ task: script: - su user -c "make -j$(sysctl -n hw.ncpu) CROSS_TOOLCHAIN=${TOOLCHAIN_PKG} WITHOUT_TOOLCHAIN=yes buildworld buildkernel" package_script: - - su user -c "make CROSS_TOOLCHAIN=${TOOLCHAIN_PKG} WITHOUT_TOOLCHAIN=yes PKG_FORMAT=tar packages" + - su user -c "make CROSS_TOOLCHAIN=${TOOLCHAIN_PKG} WITHOUT_TOOLCHAIN=yes packages" package_check_script: - su user -c "/usr/libexec/flua tools/pkgbase/metalog_reader.lua -c /usr/obj/$(pwd -P)/${TARGET}.${TARGET_ARCH}/worldstage/METALOG" test_script: From nobody Thu May 4 16:45:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC07W6SPPz49J7d; Thu, 4 May 2023 16:45: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 4QC07W5yMmz40bx; Thu, 4 May 2023 16:45:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683218759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P8cpJRK877nYthR9T7MLx84l3/jFWtQbTTWBr+R8Vx0=; b=u7mINTVd9qI0R9QKq4gVoFK5aXgDwIa5suxjIbOQPSXtUpeaVdXX/84llR+L5SP4klTNEh 98BIqvyckuxCbxiimKyobxtIlcMuayE6rVrNyEPbIzfkLIEi9FHbfvYc1y6VGn29gO5Fio sP9unMh8VFW5Kxcxqkvdazf0SPijrz/kYqRjv1VV4IYVaaXAKqnSLFUxt76SXp+Y41qrJY +4AZlQYr8XZ0cA9I3BDA2TLGpk1vDvppY0ww5DQj0MCVAIRJO/jVlH8UZ0LRKLpUilBW05 KoN5I6nu3J91N6V1dBZ/LAlbz5gdgldq2uixHQ99JVyL7Ei2F+tLrAVn4yIT6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683218759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P8cpJRK877nYthR9T7MLx84l3/jFWtQbTTWBr+R8Vx0=; b=YKvvRtTa7GoZrhZp6PGO47KmD67Xl+dOPvbKCEE0WZ1NBQElEpYW7gukgvOSbSTyx1PR+j 1gv2ybAb39KhEYn1L11A0yUlY0V/prmJumj8uBIvP835lHzKhEa2mDARgl7L9WRTAb15RC 1tF/kpF9X/Xob1PPzoOOdvVycgroKgH1W+5fdzObKzMaKO41Kq6g3vhSPbzNhF3Ukm1FcK cOzK825BzsR5YfdjAmsDP6vQJ5nEvmb7mV9P33DCYaXPtJWnceQpiEj1lHdTsxCHjQqNhY wkiFPUN2o1OT+W0kix6wHLequKKuW4DUKHs1ImUvPXCWZ5FU1rHuc0j2HrNZPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683218759; a=rsa-sha256; cv=none; b=MqjbIwMT0bw/apkJJMDcqNgZSKQ5jZAT01yu/afV9aH/3x1+IldohwpKCkATlPF16xkjw3 yLUGy/uam6ipj1yC8ukh04rrjPfWQI31qnwABwv77fMIKsPbzePYqOZC+55Nkh91KGVzgO FI5Xav3Fj5C5ykH8MJqb+N+4RySqHK8hdCLfe8RatiiqpY8i5HgqCgKnz3cRnxffmvFwvk 7HS4a4Xt/R19XTrs/YR6KBsPSwYwFLpdNRaZLZlPjSvcLU9jIr+yOsD5jzyxCh9RT+sT2k 6LAHPT2VMRgwqbbul6OTXcD9VsMbSGTlZ4TAD3pahWyXQAKf4UXq/cpFBDAqQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC07W51ZCzJrH; Thu, 4 May 2023 16:45:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344GjxOF068192; Thu, 4 May 2023 16:45:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344GjxNW068191; Thu, 4 May 2023 16:45:59 GMT (envelope-from git) Date: Thu, 4 May 2023 16:45:59 GMT Message-Id: <202305041645.344GjxNW068191@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: f6488428308e - stable/13 - pkgbase: hide duplicate METALOG directory warnings under verbose List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f6488428308edeb1fb8fc8aa0eb4e2744db78748 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f6488428308edeb1fb8fc8aa0eb4e2744db78748 commit f6488428308edeb1fb8fc8aa0eb4e2744db78748 Author: Ed Maste AuthorDate: 2023-05-01 17:25:18 +0000 Commit: Ed Maste CommitDate: 2023-05-04 16:45:50 +0000 pkgbase: hide duplicate METALOG directory warnings under verbose Creating directories multiple times is an inherent side effect of the way installation is done. Hide warnings from duplicate directory entries (with identical metadata) under metalog_reader's verbose mode. Duplicate file entries are always reported. They currently generate warnings but will be switched to errors once the few instances currently in the tree are fixed. PR: 244596, 271178 Reviewed by: kevans Sponsored By: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39898 (cherry picked from commit 2a3bd0870869819354b5ea65761d13e5e2987697) --- tools/pkgbase/metalog_reader.lua | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tools/pkgbase/metalog_reader.lua b/tools/pkgbase/metalog_reader.lua index 3e8cf8461914..9cc5fd727923 100644 --- a/tools/pkgbase/metalog_reader.lua +++ b/tools/pkgbase/metalog_reader.lua @@ -392,12 +392,18 @@ function Analysis_session(metalog, verbose, w_notagdirs) if #rows == 1 then goto continue end local iseq, offby = metalogrows_all_equal(rows) if iseq then -- repeated line, just a warning - warn[#warn+1] = 'warning: '..filename - .. ' ' .. rows[1].attrs.type - ..' repeated with same meta: line ' - ..table.concat( - table_map(rows, function(e) return e.linenum end), ',') - warn[#warn+1] = '\n' + local dupmsg = filename .. ' ' .. + rows[1].attrs.type .. + ' repeated with same meta: line ' .. + table.concat(table_map(rows, function(e) return e.linenum end), ',') + if rows[1].attrs.type == "dir" then + if verbose then + warn[#warn+1] = 'warning: ' .. dupmsg .. '\n' + end + else + -- XXX downgrade to warning until instances in the tree are fixed (PR271178) + warn[#warn+1] = 'error: ' .. dupmsg .. '\n' + end elseif not metalogrows_all_equal(rows, false, true) then -- same filename (possibly different tags), different metadata, an error errs[#errs+1] = 'error: '..filename From nobody Thu May 4 16:46:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC08c4m3fz49JCT; Thu, 4 May 2023 16:46: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 4QC08c4KBhz40tT; Thu, 4 May 2023 16:46:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683218816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RV/0RXiFNfxv22mfO8f79TPTtBuGvpA2nOk2zezs1U8=; b=a0vAEQeIGbKjsV+R6MB+kLKixcyoImniuWAR71e3A/EhS2ZKyJwvcbs3d1j6RSyhOmIj4f HvO06oZgy5xbZCy7SC3FA7k/ozTbZMo5epPgbnWTIH09uBtKw/5mEBnrLsee4E6rmyN3zg 0VCjSj/SrWClI5nm3VCyLTK5sX5OS5EIHGsymLJx89pJMpbzXaqz1p6jl7aO10LTK5+Aul iRZ91KUU4Tul2NoOClPLby+N+7KuTuQeAxq7e4EcU5CKS8ZYLIkSzEOrN5YxtueRIbA8Kd pbyAOoD7oBVoVuyMD3Uxm4etfss4oFBJ1DiL4G0PscmWNYjH4OWep8QomldzcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683218816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RV/0RXiFNfxv22mfO8f79TPTtBuGvpA2nOk2zezs1U8=; b=aFhzuSSGMH3coQ/QmMdOB9ZwfXbvPGikLa4dmtDmGTTIQr4o7w6q/jpxyF0WPgxwKVKfOG lTHWBlDcf8lktUM34shntmwkW7d1C8XFd2J8tEEIVTKA9S6jsIVoSM1FVTkNjN+Q6FBcIl ScBj2D1FrUJuG2QaJiV+UoL8JbQ7fZqNP8eXEO0Sp20HEz0rGBa55tRWLwT7NSa6ryd8Wc nMc0s0H2sZEMMigkawthx8UXZRgBZ4JYvAJUEvWgOaTR7Z9F1aCy/auBJVSRHxFn+FjXIi MGuDib2ZUF3McT6YvaUdiaMBhDZwYfHjln/3yn77meca+5Lmhj9Vhzfn9DyfYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683218816; a=rsa-sha256; cv=none; b=wqY95cWccOt3M/7w4EyBjFZPVm42NYaNq6O0QfqHGI7WWAthpBs+4WNIbrn3Npdw+saw7C 2xkgDE86xWgCMm85VzTe4J2HBdanAfP/iB1x9yWQ2w4/SWWUvZPsVwG61mMTihN52qU8aN lC2g74Zf2OF6mihD6P4wv3qpBpPrHtfJpBBVQMjjiPUmUJLNZoMAYS/YA0KZzvVw5lrlzW UwbFteVBfvHFGGCe3dZCKPLMsJKFrkRLXyjUOddd6IIpa6HNiCIdv5CVV6Mxmf2EPHeO0T y8RN89kZKmFYBsU3A489JbiTlchiE6tQw56XF5XcIDbJw07H0o+7xbpU+72/GA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC08c3MqYzKJ6; Thu, 4 May 2023 16:46:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344GkuVR068413; Thu, 4 May 2023 16:46:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344GkuIb068412; Thu, 4 May 2023 16:46:56 GMT (envelope-from git) Date: Thu, 4 May 2023 16:46:56 GMT Message-Id: <202305041646.344GkuIb068412@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: 42d088299cd4 - main - Update meta.sys.mk ensure DEP_* set at level 1+ List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 42d088299cd44287d6f532a6a93ac9c78ce74de7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=42d088299cd44287d6f532a6a93ac9c78ce74de7 commit 42d088299cd44287d6f532a6a93ac9c78ce74de7 Author: Simon J. Gerraty AuthorDate: 2023-05-04 16:46:47 +0000 Commit: Simon J. Gerraty CommitDate: 2023-05-04 16:46:47 +0000 Update meta.sys.mk ensure DEP_* set at level 1+ --- share/mk/meta.sys.mk | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/share/mk/meta.sys.mk b/share/mk/meta.sys.mk index 7a74ba2d5d21..f580f4962be8 100644 --- a/share/mk/meta.sys.mk +++ b/share/mk/meta.sys.mk @@ -1,4 +1,4 @@ -# $Id: meta.sys.mk,v 1.46 2023/04/18 18:43:00 sjg Exp $ +# $Id: meta.sys.mk,v 1.48 2023/05/04 16:41:10 sjg Exp $ # # @(#) Copyright (c) 2010-2021, Simon J. Gerraty @@ -188,7 +188,7 @@ META_NOECHO= : UPDATE_DEPENDFILE= NO .export UPDATE_DEPENDFILE .elif ${_filemon:T} == "filemon" && !exists(${_filemon}) -.warning ${.newline}ERROR: The filemon module (${_filemon}) is not loaded. +.error ${.newline}ERROR: The filemon module (${_filemon}) is not loaded. .endif .endif @@ -206,6 +206,15 @@ dirdeps: .endif .endif +.else # level > 0 + +# Makefile.depend* get read at level 1+ +# and often refer to DEP_MACHINE etc, +# so ensure DEP_* (for TARGET_SPEC_VARS anyway) are set +.for V in ${TARGET_SPEC_VARS} +DEP_$V = ${$V} +.endfor + .endif .else META_COOKIE_TOUCH= From nobody Thu May 4 18:29:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC2R83SJ0z49PDh; Thu, 4 May 2023 18:29: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 4QC2R82lKFz4GB9; Thu, 4 May 2023 18:29:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683224980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E98TVezeBIYYlRsfjyf3KuKYgdEf5GXXDw7z8yyjKk4=; b=mIWd+sPdjv+EhLgqYfoNSKmdl+LTNdwFAd6oFWybaK46B/7a0xLxcgIOE9xW0iGKvsEad5 oXWOX876TvWe9t3yB9iEp8rulOWLZufN1KW9S5Ijm/g2GeR8JZX+pSXo3nWKoa0GKlXMN9 RuZmV87MeTl7hHHJEDH7T7e3G6c0aEcpWMiUz3LjpiV2HyZdJUoeJ+W0+cH0yPHv1+kCzt FYtQlijpAgjcVrcVP4a8eXR/xyzAl5HSV96yjfPYED6nbY0nmWsMmQF7xbb6kPsHfps1lO zvj9erkBi1xqpKSzx4Y6hxvpAK0CxLUHiyEpJHQ10aWKoEh40dHX8ZbgIb8eAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683224980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E98TVezeBIYYlRsfjyf3KuKYgdEf5GXXDw7z8yyjKk4=; b=JAifULBhqyKIHkCsRPemFk2AD+K4uCvjxboGKbL5f0RkvYB0VubPY1sb+LLN+wTVCvYT2D KmHlOSYEg6S5D+A/paS86Zuy6eBXDacNvn7AdKC88Vs9NwgfKN+YTrLVd5/ZxccYY58cC0 yKcj66yOnUc4qz/7kx6HQspqeW9/hTFegKNjdxPYkHRXMkY9kYfOLucWppilXIQje1qUtI DkylvPbT709EWoi7KKD3hOFizDTkYGmk7MIf7ItRSFlkbvx9BpOMIYV2Cpx59if+s9fY+d qLtHAh1BbOj0AW5bDyKcwZQsEuMizcg+wUarhvLy1PirHkSwyBt8dBs9KIMMpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683224980; a=rsa-sha256; cv=none; b=JmB7YkMkC9iOfHWCFW33qS7fWARPqiOF86UAh+UixqbVYIX4GzfkRi8I9o3ZWTp2hX6Ae5 szhl1KquH0GZpW/sfEPmSTSxbdja4kCVi/2+lli2Xf60g9BBviRylbd2iG+mQAIbO77FTY e9Tr/QYcuv0ggIXMawH0r8i6lssDzMmA2n4Iqr1drgLGsyglAwnPtpRFFN60m6ZnDi832M g7s7Rbeg8tpbdEOh494twz1gcMRpVXRfc7QClOUMEFh9Tn/Q1DeDYUmgPQ0PSTacYwVUCD ZDOBA4RbohaTleaA5iIRCnIIcHB9Oho4E92j1L1f+5f3NedsIb2iZIdt5PlwsQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC2R81p1GzNJk; Thu, 4 May 2023 18:29:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344ITeEE033751; Thu, 4 May 2023 18:29:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344ITeJ3033750; Thu, 4 May 2023 18:29:40 GMT (envelope-from git) Date: Thu, 4 May 2023 18:29:40 GMT Message-Id: <202305041829.344ITeJ3033750@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: ba4d333364ea - main - dirdeps.mk for host* DEP_TARGET_SPEC is just DEP_MACHINE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ba4d333364ea7b4f8bccce3e5f35bd989b707c6a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=ba4d333364ea7b4f8bccce3e5f35bd989b707c6a commit ba4d333364ea7b4f8bccce3e5f35bd989b707c6a Author: Simon J. Gerraty AuthorDate: 2023-05-04 18:29:33 +0000 Commit: Simon J. Gerraty CommitDate: 2023-05-04 18:29:33 +0000 dirdeps.mk for host* DEP_TARGET_SPEC is just DEP_MACHINE This helps avoid ugly noise in dirdeps.cache on Linux. --- share/mk/dirdeps.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/share/mk/dirdeps.mk b/share/mk/dirdeps.mk index 6fedd00310e9..83b620044aa5 100644 --- a/share/mk/dirdeps.mk +++ b/share/mk/dirdeps.mk @@ -1,4 +1,4 @@ -# $Id: dirdeps.mk,v 1.157 2023/04/22 21:07:51 sjg Exp $ +# $Id: dirdeps.mk,v 1.158 2023/05/04 18:26:17 sjg Exp $ # SPDX-License-Identifier: BSD-2-Clause # @@ -333,6 +333,14 @@ DEP_${TARGET_SPEC_VARS:[$i]} := ${_tspec:[$i]} DEP_MACHINE := ${_DEP_TARGET_SPEC} .endif +# host is special +.if ${DEP_MACHINE:Mhost*} != "" +DEP_TARGET_SPEC = ${DEP_MACHINE} +.for v in ${TARGET_SPEC_VARS:O:u:NMACHINE} +.undef DEP_$v +.endfor +.endif + # reset each time through _build_all_dirs = _build_xtra_dirs = From nobody Thu May 4 18:52:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC2xw0y4Rz49QD5; Thu, 4 May 2023 18:52:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QC2xw0RD0z4JDf; Thu, 4 May 2023 18:52:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683226372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p9cn8eWZRrJTaHDNXtb63gm/wchZOd8HqBVXtZ2yWHU=; b=l+GQtT5sJykqVz4Vtv4pKG4soq3Cbn8Hg7P21sekpcEUV34fx+FfsXedekgQCCMAcceOpP MjTdQdoA2mERg+smSJrpQbjgcJeQQSLvova1czMoaTbfjr2h+lW86RDu/FldKEJa/KuNhP XHsuGiZtHF58o/+Y0nWuM+DoRITQfjS4SN6tvd5br25KFFOVWfILopleNVEN1KGwyrnwpw qMI6Jd1hEWKQZh6156sRBVmcgepJrGRxo7DVDV4zRwxZm7ATerfnL4dnYeTqneNBT2CxIp oZRFGgYKC28zMZ0E+TUsttv8uoU0jeHPUI7HVn7WJpIGG7NJ2VibbaWk07AUwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683226372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p9cn8eWZRrJTaHDNXtb63gm/wchZOd8HqBVXtZ2yWHU=; b=K/f8UrnRwl2VIf9DYqYTRA2Hv7yeO1JdUoh3K56ApXm5xZXsxb91C8D4Tx4L7ktknOtx9W tVO50zbiWv2d5qwfEe1DD78uUtT0+HLQzztmJ1QMT4GfjXf5Hm5rcwGUd4XM525J+NG68z d9OMzoI165WccALoOwRTirZR02vNRRlj1z2rslWkR8JF/0zoMsRl9oxT8bv3H/WRLPQMbw zDk/vYsLIaRtsrIjFPulQ/3U7zRPocWEJFoEwJBxN/Q6jo1PZE/uy36s9bdqhd7/CW7Qus /FnTVSuwbgO9OnAP96RMrNRkD/auiEfnlHlp5zjq9HYliqyDVE4m9HsP1uNggw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683226372; a=rsa-sha256; cv=none; b=wDkiB/e6BtUa23h7/Znx1ZHCtFX6IXOv7uHVMAR15mvGkUQv8G1DUAkxAPOr2FKmfnshFx bUmi8AOutuQW+S2JUrbruBVcaGV8Hel1O9W59saoYdXNYlJq4ilZThXWfjHliKBtNmAAP6 vQdH5+TTdDXx1jqGv8yigyatHW9GpNjGFBc4GEaeB4R319ubDhDiykumCBc8bdfphlU9yu 8dvqIHD/qZ71MmF5yzPwb6cK1EzAOADv+TxOmKGl4/lKwZQVoOJt/iC1NnmUJXCRQirFbV /NoMLt8b3zT3uD5r58iAE1taeNKrF/oCyO3QhGRUQAljkgxdODhUuylSaO2/Yg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC2xv6ZshzP5p; Thu, 4 May 2023 18:52:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344Iqp8T082005; Thu, 4 May 2023 18:52:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344IqpV7082004; Thu, 4 May 2023 18:52:51 GMT (envelope-from git) Date: Thu, 4 May 2023 18:52:51 GMT Message-Id: <202305041852.344IqpV7082004@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: 5903d9c00b75 - main - ncal: Error out if writing to stdout failed. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5903d9c00b75f17f09404d1001ee5aaae7603a61 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5903d9c00b75f17f09404d1001ee5aaae7603a61 commit 5903d9c00b75f17f09404d1001ee5aaae7603a61 Author: Dag-Erling Smørgrav AuthorDate: 2023-05-04 17:26:54 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-05-04 18:51:10 +0000 ncal: Error out if writing to stdout failed. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans, imp Differential Revision: https://reviews.freebsd.org/D39958 --- usr.bin/ncal/ncal.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/ncal/ncal.c b/usr.bin/ncal/ncal.c index 5a6c33ce759d..b4f025141f92 100644 --- a/usr.bin/ncal/ncal.c +++ b/usr.bin/ncal/ncal.c @@ -497,6 +497,8 @@ main(int argc, char *argv[]) monthrangeb(y, m, flag_julian_day, before, after); else monthranger(y, m, flag_julian_day, before, after); + if (ferror(stdout) != 0 || fflush(stdout) != 0) + err(1, "stdout"); return (0); } From nobody Thu May 4 18:52:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC2xx1dJ2z49Q5R; Thu, 4 May 2023 18:52: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 4QC2xx16rMz4J6C; Thu, 4 May 2023 18:52:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683226373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NyOWNAP1b2dQgxIvJP/QLSRp4lWQqbpwnnCKCpx7PSE=; b=PTkxqkeM1XZ+zjvSrDkoYBekXEyyx0TYpsUcu6BKGyGYVOAqNGQA+jlSG90pa7UjcOzG0A VD4273CcVZ3LbzVTwulSM2nMN2fhSRGo8vbBq6yy+xPIeuJGbKhjUujWwFgWIUNfmAc0Hi cHe8ixad0+rZ9jC+WDy4Yh3Rvx9f/cuohy66sK8tsNujQ9fqCT6WdWPDHANNd39nJFD7VB ZEYgTWe4NyqfDYDKrsqC9Hr+HXfwbj+M40hqnE6jQC8MuhAX6U5XG5lJ9xV3amJKv9CREm vJlaorgDW1v5arV8kFE2WHTA+dCmMyRTPrd4/Kj9ga0wjkAB39MET3iHWvzStA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683226373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NyOWNAP1b2dQgxIvJP/QLSRp4lWQqbpwnnCKCpx7PSE=; b=i+BanNKPuTBrC7SvXoNrTShCdv7esug3JtplY1cTF1FPbxk58nVMFMYbjhPGRyNeQ3XuUD iLfnp8gcpjrjEJY8VL0wvsLf9iZWk3LaV7jFO72huyCAnWLeYNRNsRx1j+XK+ToK237mpj 6aFXdwhcz89VfLxwwy6SYFBXp7IZq4Vj3apeY6ALhVot4Pdf0GuFg4bXHvB81kyfVV+Z1N Do31TCqDkxqseOH3Hm9Rk4nEXMPa/EQGkio9DFIHbUgigSMDAYVV4us0DLjFuSoqOiu+wZ 9eglL6E4P7wwc6mNXojCbNemDQmZa2/2V+clI7ZwzJUG/6tk8Q6CTeqa6F3pBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683226373; a=rsa-sha256; cv=none; b=Qru9fNrCzZXOdzT7tmWvMW21KmoUq3D7Y71nVVTlvny1R7l3ZtWE7NousoI+61cZ01SNsv IIsOHBcwUCbdNFuOlqWUAU/VTu7zvY516nIpMjFcMxTgyls3FQzrfIBrKWZrNU399lOF8z zNwgJzOXTAB4gMWQmw5lYzC8PL25SbwceoiwZYtMwhm7dVJkRJKO8gNtaFmR+w8hfHBVAH df9K4jPU+5HI4At6lHPsL8RJgQCcU8e0J6ZJOY9ZpkGG2DMTUsKpisrWqLetJrZpSKhoyx EhGiyUeCLVGl3HeDqxK6wruzk9kEHZc6LJWlKn6jh2z2dAb0g8jlkaY0MIMN8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC2xx0FBXzP5q; Thu, 4 May 2023 18:52:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344IqqRG082029; Thu, 4 May 2023 18:52:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344Iqq12082028; Thu, 4 May 2023 18:52:52 GMT (envelope-from git) Date: Thu, 4 May 2023 18:52:52 GMT Message-Id: <202305041852.344Iqq12082028@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: cb46f47c7969 - main - tsort: Error out if writing to stdout failed. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cb46f47c7969b619d1b2547d06a75ad5b375eda9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=cb46f47c7969b619d1b2547d06a75ad5b375eda9 commit cb46f47c7969b619d1b2547d06a75ad5b375eda9 Author: Dag-Erling Smørgrav AuthorDate: 2023-05-04 17:26:59 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-05-04 18:51:11 +0000 tsort: Error out if writing to stdout failed. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans, imp Differential Revision: https://reviews.freebsd.org/D39959 --- usr.bin/tsort/tsort.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/tsort/tsort.c b/usr.bin/tsort/tsort.c index 58492b26999c..b2dbe9beb799 100644 --- a/usr.bin/tsort/tsort.c +++ b/usr.bin/tsort/tsort.c @@ -183,6 +183,8 @@ main(int argc, char *argv[]) /* do the sort */ tsort(); + if (ferror(stdout) != 0 || fflush(stdout) != 0) + err(1, "stdout"); exit(0); } From nobody Thu May 4 18:59:29 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC35Y6XjBz49QMn; Thu, 4 May 2023 18:59: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 4QC35Y5qnDz4Kj2; Thu, 4 May 2023 18:59:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683226769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MQ0hVVh78RGszCM56nkkeCgE3sDFAPnse7kT8QrqIEU=; b=f9Ewpu/rZ1eVr0UsyD9hJmyK64gHgTKvbz5XbZNqO3UOqf2Y6Q6TXYrqd+TNyXVJ/ASADL mH1wIW9hQaTAMhVNfcuRYurct8U7zrPxpi7Gw2oanU35Hu/HK4JHCNs/728kGJzvi/2t4l AqnehVip81zsjhlzeDiZNnymyZ0+fCp2TTj8a2X/66vOyFnqfUmPTgGvluS1vluwRp7lcR dKr746ebYCuU59F5d6x2uqpRlzPFG/2oZuuqtDSTgKkt1iEp+TBJK+8KePI2cKTU0dy2f1 P2HuOb0tPDuexA8lLBEO7Qbhyo5Pk7ZLPDJ1IQsUBUZgirOy0VcRsT74l6B3Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683226769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MQ0hVVh78RGszCM56nkkeCgE3sDFAPnse7kT8QrqIEU=; b=v9imvS1yyaiDVwoiFuZlsfnO60FkemAxLIdnfbZh2uXXcHG3iAr7kujH6VaIFS2eXDY5CU q56JKJQdJUs7pabr3nEoW5/SHS1WduKRL1Zz+el4/PPH6Bl0MTULMBqXJPzSZCo04xZm5v VX2Bod9rYkeSCjhaNVwXqV85tmGAv3t4wSGUnfGayaFcczEJA8FhfQX/uBf4fMPnXGRkuT tZi674JZdzwsPOkG+nENFEklqgX8WRJ89Mhern4K9rROV4Z3h33bk0IApYbc++oAtd6wQr 1J8zbZRL5ZwjEByjT8LV12p2EKQt69/4Z5pC9rdga5C+vaC3RPzmi6u3eZhftw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683226769; a=rsa-sha256; cv=none; b=f2gkFrO0nVhTaXc96eLtoo7LSgOVh2qKAkkcvBgHMeD4fCi/Gd7x/X6CjlHx7poJvcST+E zPBN3QsOokxLaN7Fwk4a8zU7XlN8KTRc7ofUpJWZYhlUvWn4m450dkFneWEWa8w3qeDVFI SFFqukt/kswuASIDtqBIKfiTpOLdFPJ48M/NfLeUQLpL/+/AwZICAGcjavAq/lGE3/e0T3 ORf/SOauKDXlexchNoQQmdbFEfJ4BCJQTO89OWxm6YRh/61YyZTrjpipyUQRC7AINnejLM 3U5jYlDAjJuArQ7S+rQXh/Rk7gOm97x8fonb77kT2M8/hGfdkoGd7eblupGAVA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC35Y4pDdzNZX; Thu, 4 May 2023 18:59:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344IxTKd083378; Thu, 4 May 2023 18:59:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344IxTX9083377; Thu, 4 May 2023 18:59:29 GMT (envelope-from git) Date: Thu, 4 May 2023 18:59:29 GMT Message-Id: <202305041859.344IxTX9083377@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: e5e345a4b0aa - main - local.dirdeps.mk skip N_host_libs for non-FreeBSD host List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e5e345a4b0aa9ac50ed23f90851fc5c68e94e0fd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=e5e345a4b0aa9ac50ed23f90851fc5c68e94e0fd commit e5e345a4b0aa9ac50ed23f90851fc5c68e94e0fd Author: Simon J. Gerraty AuthorDate: 2023-05-04 18:58:39 +0000 Commit: Simon J. Gerraty CommitDate: 2023-05-04 18:58:39 +0000 local.dirdeps.mk skip N_host_libs for non-FreeBSD host The N_host_libs dance only makes sense if host is FreeBSD. Even then, if MK_host_egacy is yes we need libmd libnetbsd does not need libutil when using libegacy Sponsored by: Juniper Networks, Inc. --- lib/libnetbsd/Makefile.depend | 1 - lib/libnetbsd/Makefile.depend.options | 1 + share/mk/local.dirdeps.mk | 34 ++++++++++++++++---------- targets/pseudo/host-tools/Makefile.depend.host | 2 +- 4 files changed, 23 insertions(+), 15 deletions(-) diff --git a/lib/libnetbsd/Makefile.depend b/lib/libnetbsd/Makefile.depend index cf2961c09880..18be76b0cb6f 100644 --- a/lib/libnetbsd/Makefile.depend +++ b/lib/libnetbsd/Makefile.depend @@ -4,7 +4,6 @@ DIRDEPS = \ include \ include/xlocale \ - lib/libutil \ .include diff --git a/lib/libnetbsd/Makefile.depend.options b/lib/libnetbsd/Makefile.depend.options index 4dcc6c412671..95c6de3baf00 100644 --- a/lib/libnetbsd/Makefile.depend.options +++ b/lib/libnetbsd/Makefile.depend.options @@ -1,5 +1,6 @@ DIRDEPS_OPTIONS = host_egacy +DIRDEPS.host_egacy.no = lib/libutil DIRDEPS.host_egacy.yes = tools/build .include diff --git a/share/mk/local.dirdeps.mk b/share/mk/local.dirdeps.mk index d0ae1c0171cb..f2328d6cd99c 100644 --- a/share/mk/local.dirdeps.mk +++ b/share/mk/local.dirdeps.mk @@ -18,30 +18,38 @@ M_dep_qual_fixes += C;($m),[^/.,]*$$;\1; .endfor #.info M_dep_qual_fixes=${M_dep_qual_fixes} +# Some things we never want to build for host +DIRDEPS_FILTER.host = \ + Ninclude* \ + Nlib/csu* \ + Nlib/libc \ + Nlib/[mn]* \ + Ngnu/lib/lib[a-r]* \ + Nsecure/lib* \ + Nusr.bin/xinstall* \ + +.if ${.MAKE.OS} == "FreeBSD" +# Host libraries should mostly be excluded from the build so the +# host version in /usr/lib is used. +# Internal libraries need to be allowed to be built though +# since they are never installed. + # Cheat for including src.libnames.mk ____: # Pull in _INTERNALLIBS .include -# Host libraries should mostly be excluded from the build so the -# host version in /usr/lib is used. Internal libraries need to be -# allowed to be built though since they are never installed. _need_host_libs= .for lib in ${_INTERNALLIBS} _need_host_libs+= ${LIB${lib:tu}DIR:S,^${OBJTOP}/,,} .endfor +.if ${MK_host_egacy} == "yes" +_need_host_libs+= lib/libmd +.endif N_host_libs:= ${cd ${SRCTOP} && echo lib/lib*:L:sh:${_need_host_libs:${M_ListToSkip}}:${M_ListToSkip}} -DIRDEPS_FILTER.host = \ - ${N_host_libs} \ - Ninclude* \ - Nlib/csu* \ - Nlib/libc \ - Nlib/[mn]* \ - Ngnu/lib/lib[a-r]* \ - Nsecure/lib* \ - Nusr.bin/xinstall* \ - +DIRDEPS_FILTER.host+= ${N_host_libs} +.endif DIRDEPS_FILTER+= \ Nbin/cat.host \ diff --git a/targets/pseudo/host-tools/Makefile.depend.host b/targets/pseudo/host-tools/Makefile.depend.host index 39324fc6d49d..7ec04928d055 100644 --- a/targets/pseudo/host-tools/Makefile.depend.host +++ b/targets/pseudo/host-tools/Makefile.depend.host @@ -1,4 +1,5 @@ DIRDEPS= \ + sbin/md5 \ usr.bin/awk \ usr.bin/cap_mkdb \ usr.bin/file2c \ @@ -12,6 +13,5 @@ DIRDEPS= \ usr.sbin/makefs \ usr.sbin/nmtree \ - .include From nobody Thu May 4 19:04:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC3CC4GVPz49QdC; Thu, 4 May 2023 19:04:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QC3CC31jqz4LcT; Thu, 4 May 2023 19:04:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683227063; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kt4cl7wneicy/cw7X8c/zNo36S/07sczdlSFSBl1g4o=; b=haWv5LQ2mC6O2NY2K7GNMuy3UuGLMbRuvMbekcJu7Bi6caC8P27wVyDPc5ogoT3x8c8EI7 2ap1fb/ciXGrK7iDQYAkrKqBNHURk+7lsPU2iRsw1T0hj21uSro9XUVJjgnBJeobp/FLY8 gRI0bTpGOYKcksh43QNEH88s044SKUYnbUUjk/s8lKwI/mT5KBiVyQcEaIK8kmCiwjaDRI 6Ra4+nlpX5P8sv1z0VqbrpNQp1Hwlllx+eMnwQsFdWC81nrYcOuI8yQiDRDj7B78QwxgGB QKariVbx88BfjABCc1i8tdZh1K7vVus8TZX8/u0V8r+bs6uSJn0RXUSaB4a2jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683227063; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kt4cl7wneicy/cw7X8c/zNo36S/07sczdlSFSBl1g4o=; b=vRSIGsUwTubgOe/ceEoSHYYsTtzVsAc2FPPlVv2QS3wsuDFdKlaJIOdRE/S5V7sOh9I+3O aZsKxbYHk1mAx9ja1z4k/0/m/yf2axJyajUbmZ/M5mveCPb46bbu5fKN4XsjP5UYrOYbQz jHb2tsocezVR4ZPzWloS8l6K+MNcXePM4mAtvyVjj3LcSsl8tZH176xx718GA9MhY4uG3R iupwGiwGf3ajxL0poASlJ7+Houzk+Z6QLSDae1TSTauyi/9tmOQ/UPzH/vg72hMwMQIHqc lipOX1OKD9SkM+7ANHszhtUJGZO1OvPHHFZDwm2mQeUQSfrQPfePxHz5ZEb9pQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683227063; a=rsa-sha256; cv=none; b=X3OnK6PUCY8FOTAlBvBfa5KL83gSH9+0X3U9Lf0dStU6jPXlGssbDhbsbX49m8YkEROUIL UgOlDEhdz/7cWRy6biVkBANmrYwFFxCYjCeXwS6KjCCyhwXrqXehlSIWyuDtUraM4Xr3Kt QptMtH33dXKDVq7FV80TV9YASXS7Qzr3d8LslOjkT5ljfhfMvO26uMfp/PahzEdSPhcIE1 aKq4GlNMMENC3DFXi3o97qAnUi1PkViiyuAiSkZ9rKZI3lf8SyWujM50jMLb4tUSLBUwl5 GcWdruokNAQsnjWsXWgmGKsp6SSCIGOBIEehY+2qmi5S0MB88nMImSSVd25jtQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC3CC24QqzP8h; Thu, 4 May 2023 19:04:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344J4Nl6099826; Thu, 4 May 2023 19:04:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344J4Nwc099825; Thu, 4 May 2023 19:04:23 GMT (envelope-from git) Date: Thu, 4 May 2023 19:04:23 GMT Message-Id: <202305041904.344J4Nwc099825@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: b75d7e2cbe94 - main - md5 Makefile.depend.host List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b75d7e2cbe949583b3debef340f7e77b65ffb6b9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=b75d7e2cbe949583b3debef340f7e77b65ffb6b9 commit b75d7e2cbe949583b3debef340f7e77b65ffb6b9 Author: Simon J. Gerraty AuthorDate: 2023-05-04 19:03:34 +0000 Commit: Simon J. Gerraty CommitDate: 2023-05-04 19:03:34 +0000 md5 Makefile.depend.host --- sbin/md5/Makefile.depend.host | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sbin/md5/Makefile.depend.host b/sbin/md5/Makefile.depend.host new file mode 100644 index 000000000000..35734ab3bee3 --- /dev/null +++ b/sbin/md5/Makefile.depend.host @@ -0,0 +1,12 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + lib/libmd \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif From nobody Thu May 4 19:34:18 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC3sl1rskz49Rm2; Thu, 4 May 2023 19:34:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QC3sl1LQXz4PZ4; Thu, 4 May 2023 19:34:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0OO9Uh+shcU2NSSHOZigJyTPVDCgRRS/z6y889OtUwI=; b=HNwO0EdR79m+11KQHxaZQlt0Lr4ua9yqU8mkWtrIwbEz+ZSaQhH+6C1lUPzLOzCIO+uKao radKVd+LZwVsRWL8Ui9WYOnJIGJkUkFEV24QPAfp+MkwCzMZRk6r7YDG4wnem78MCmPC6h J2mfQEMfbmpRkZKTnr93S9nt99+W3fjBUdF0od57nX60rI+kzllFhh3SMc1gwfE2qumZS1 jGROnmdc6b5YmDZlOG2pAfLewwT+8neahbtmjfcLCQ3pp+1W7anrTISlnhMwoJEKodHTSD fSdVyQpboxQemhQciYpd7DNfJzaCZMTKn5KhItf5JFzrAm8tY+XOXFV9ReK31w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0OO9Uh+shcU2NSSHOZigJyTPVDCgRRS/z6y889OtUwI=; b=nB51LJ3dHVBrdkknXSinxtd+KxlFTmvXjndG1c8plLsvkmShNNnkCMRZO11HEfQqZ8UZgu 4qWrMyJr+YvV/I7l5bnAPDIhwTYVm/qHtdVLEEFwYxhWY8wj8hrlaisQKwjnNtSdSi9e5k lTmyRq9vihHCGiRXcckPMaRZwWlZrko+HHLt31n6omfq+6Mbd6vRucu5lsmbBR8Fvm27yM q2Ycppn3VMOoEk0SvbAIzB8ejmtDJNOkNO4w5zHocfIqihmrKKB7O0WhzUlJG0qqWNYwaJ Y2CghRHxCo5phbYe+S2AYW9b9YtjQNIDT/u3x4JkkVK+FASWDUW3ZcUZ4DRlxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683228859; a=rsa-sha256; cv=none; b=QTo/8UOC5qbVx8bAxeZ0EBSMj+c9shtAM2P7r6XYD2f3aiLZ+z7KnRdzWGqSx5RE1esdPQ aiso+Jtv8unqPb6kxYkVgRNi4D+znBmiVn/OC46YuzstmfJO6ZL9m9IzshyDyBv9GQac3N mLP+2fhPnd69+GJjkJfPy3OVSa7c/aev6lTS9+SSVBzt0qzejaxzNqiRYA6kIIucCRlRhD 7KxX+dn+ZIu3UF+EUUdbhd4Ozi7XnNcz8hGS6a9nW0CppKfE4hhA7KAvgJ2Az+k8O2okAe rCdtXeF9+NXX8rL6Wod9qjxiQueyFUedTcuf037ESKWj+FvaqBBpBzss/Kn7Ng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC3sl0Q2lzPwn; Thu, 4 May 2023 19:34:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344JYIOY049296; Thu, 4 May 2023 19:34:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344JYIK8049295; Thu, 4 May 2023 19:34:18 GMT (envelope-from git) Date: Thu, 4 May 2023 19:34:18 GMT Message-Id: <202305041934.344JYIK8049295@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: 407f675718aa - main - imgact_elf: Change header_supported to return bool instead of boolean_t. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 407f675718aaf3dfed4795746b41c946ced47209 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=407f675718aaf3dfed4795746b41c946ced47209 commit 407f675718aaf3dfed4795746b41c946ced47209 Author: John Baldwin AuthorDate: 2023-05-04 19:29:29 +0000 Commit: John Baldwin CommitDate: 2023-05-04 19:29:29 +0000 imgact_elf: Change header_supported to return bool instead of boolean_t. Reviewed by: imp, kib, emaste Differential Revision: https://reviews.freebsd.org/D39919 --- sys/amd64/amd64/elf_machdep.c | 10 +++++----- sys/arm/arm/elf_machdep.c | 8 ++++---- sys/arm64/arm64/elf32_machdep.c | 10 +++++----- sys/powerpc/powerpc/elf64_machdep.c | 8 ++++---- sys/sys/imgact_elf.h | 2 +- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/sys/amd64/amd64/elf_machdep.c b/sys/amd64/amd64/elf_machdep.c index 3dc606edc04d..afb30a1751b2 100644 --- a/sys/amd64/amd64/elf_machdep.c +++ b/sys/amd64/amd64/elf_machdep.c @@ -167,17 +167,17 @@ amd64_lower_shared_page(struct sysentvec *sv) } } -static boolean_t +static bool freebsd_brand_info_la57_img_compat(struct image_params *imgp, int32_t *osrel __unused, uint32_t *fctl0) { if ((imgp->proc->p_md.md_flags & P_MD_LA57) != 0) - return (TRUE); + return (true); if (fctl0 == NULL || (*fctl0 & NT_FREEBSD_FCTL_LA48) != 0) - return (FALSE); + return (false); if ((imgp->proc->p_md.md_flags & P_MD_LA48) != 0) - return (FALSE); - return (TRUE); + return (false); + return (true); } static Elf64_Brandinfo freebsd_brand_info_la48 = { diff --git a/sys/arm/arm/elf_machdep.c b/sys/arm/arm/elf_machdep.c index 724b3437458e..3580d399ff56 100644 --- a/sys/arm/arm/elf_machdep.c +++ b/sys/arm/arm/elf_machdep.c @@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$"); #include "opt_global.h" /* for OPT_KDTRACE_HOOKS */ #include "opt_stack.h" /* for OPT_STACK */ -static boolean_t elf32_arm_abi_supported(struct image_params *, int32_t *, +static bool elf32_arm_abi_supported(struct image_params *, int32_t *, uint32_t *); u_long elf_hwcap; @@ -125,7 +125,7 @@ SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST, (sysinit_cfunc_t) elf32_insert_brand_entry, &freebsd_brand_info); -static boolean_t +static bool elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused, uint32_t *fctl0 __unused) { @@ -138,9 +138,9 @@ elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused, if (bootverbose) uprintf("Attempting to execute non EABI binary (rev %d) image %s", EF_ARM_EABI_VERSION(hdr->e_flags), imgp->args->fname); - return (FALSE); + return (false); } - return (TRUE); + return (true); } void diff --git a/sys/arm64/arm64/elf32_machdep.c b/sys/arm64/arm64/elf32_machdep.c index 7b346ed81b2c..e57ae0e35fa1 100644 --- a/sys/arm64/arm64/elf32_machdep.c +++ b/sys/arm64/arm64/elf32_machdep.c @@ -74,7 +74,7 @@ static void freebsd32_setregs(struct thread *td, struct image_params *imgp, u_long stack); static void freebsd32_set_syscall_retval(struct thread *, int); -static boolean_t elf32_arm_abi_supported(struct image_params *, int32_t *, +static bool elf32_arm_abi_supported(struct image_params *, int32_t *, uint32_t *); extern void freebsd32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask); @@ -142,7 +142,7 @@ static Elf32_Brandinfo freebsd32_brand_info = { SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST, (sysinit_cfunc_t)elf32_insert_brand_entry, &freebsd32_brand_info); -static boolean_t +static bool elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused, uint32_t *fctl0 __unused) { @@ -151,7 +151,7 @@ elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused, /* Check if we support AArch32 */ if (ID_AA64PFR0_EL0_VAL(READ_SPECIALREG(id_aa64pfr0_el1)) != ID_AA64PFR0_EL0_64_32) - return (FALSE); + return (false); #define EF_ARM_EABI_FREEBSD_MIN EF_ARM_EABI_VER4 hdr = (const Elf32_Ehdr *)imgp->image_header; @@ -161,10 +161,10 @@ elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused, "(rev %d) image %s", EF_ARM_EABI_VERSION(hdr->e_flags), imgp->args->fname); - return (FALSE); + return (false); } - return (TRUE); + return (true); } static int diff --git a/sys/powerpc/powerpc/elf64_machdep.c b/sys/powerpc/powerpc/elf64_machdep.c index a247a2c51ad6..3d39ba40b898 100644 --- a/sys/powerpc/powerpc/elf64_machdep.c +++ b/sys/powerpc/powerpc/elf64_machdep.c @@ -149,9 +149,9 @@ struct sysentvec elf64_freebsd_sysvec_v2 = { .sv_regset_end = SET_LIMIT(__elfN(regset)), }; -static boolean_t ppc64_elfv1_header_match(struct image_params *params, +static bool ppc64_elfv1_header_match(struct image_params *params, int32_t *, uint32_t *); -static boolean_t ppc64_elfv2_header_match(struct image_params *params, +static bool ppc64_elfv2_header_match(struct image_params *params, int32_t *, uint32_t *); static Elf64_Brandinfo freebsd_brand_info_elfv1 = { @@ -227,7 +227,7 @@ ppc64_init_sysvecs(void *arg) } SYSINIT(elf64_sysvec, SI_SUB_EXEC, SI_ORDER_ANY, ppc64_init_sysvecs, NULL); -static boolean_t +static bool ppc64_elfv1_header_match(struct image_params *params, int32_t *osrel __unused, uint32_t *fctl0 __unused) { @@ -237,7 +237,7 @@ ppc64_elfv1_header_match(struct image_params *params, int32_t *osrel __unused, return (abi == 0 || abi == 1); } -static boolean_t +static bool ppc64_elfv2_header_match(struct image_params *params, int32_t *osrel __unused, uint32_t *fctl0 __unused) { diff --git a/sys/sys/imgact_elf.h b/sys/sys/imgact_elf.h index 6890df5c1500..21f52ccb6c05 100644 --- a/sys/sys/imgact_elf.h +++ b/sys/sys/imgact_elf.h @@ -89,7 +89,7 @@ typedef struct { const char *interp_newpath; int flags; Elf_Brandnote *brand_note; - boolean_t (*header_supported)(struct image_params *, + bool (*header_supported)(struct image_params *, int32_t *, uint32_t *); /* High 8 bits of flags is private to the ABI */ #define BI_CAN_EXEC_DYN 0x0001 From nobody Thu May 4 19:34:20 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC3sm3QyPz49S7q; Thu, 4 May 2023 19:34: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 4QC3sm23dZz4PjY; Thu, 4 May 2023 19:34:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ol4QPP5H4aq5ZgsgeX1802ymld7ywOX6cNHQbTA96ZM=; b=afLTqKaFUN0DYaMmaiyu5hkFXhIjP+5bWzOUwnxN/trTVaJ5I2uLjMk7jz02aGtPHzdzdB iFNpziZAZAhpeUInnmSSyYXphOUhudA96x5fYpcd5xWgdB9AZ1nw6YBeejBdDoK6Nbh13p lIAqMqaWZ14xOA7xZUn7uYBg7WKQVi7vY+JpTG0QmHCxaXlAe5W31lUV0p8oNmFCWlYeHe FJEQKpa8CWgiuCVhK3Bf5fZbilBtDLUeJrYd6egTi4WNzNDUGIYtiaio2sWXr2RugZXS4z Hl5e8zRzn15iZL2iK/oNAzbyvX5LU+WJi6dm6dcExjtvriDp+n+ksmJJzrCDtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ol4QPP5H4aq5ZgsgeX1802ymld7ywOX6cNHQbTA96ZM=; b=oD7dIlJC3vIScNIIXVxeLSEn9MBxoZpO1znfXNY5AUuAXH2yCGHSOrlmbyris7snlxJNp+ gk9j39kwjoVdpk1CiX3fW48MsPPM1NG9SR+tlnjI79ETR/QbTfgocIspMXUUOBo/bHMckj FWv5Zi4YD2T5OIpypvgd8mj+WlgxfNQT1n0wogx20ZJznUyu8RYUpYn1n3PDGcTZ1rVcxE b5nmGowhc4+alGkwE/dbfqQGi0syrxZNeqbHO/V2BHLBXS5P9KKxH4tiJAzD1ER9ROqt6x jjpx+HstTL6LJU6gQQfqUy2AhMZBWhQRQ9l7+jSkJgL5jiwLPW1EiB/UHoCHWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683228860; a=rsa-sha256; cv=none; b=OESl+hxBRl1DYJLfuOH4qqow7HQH1CcZ76hj6k7cWzm75iW9ULrNZ2jrUYZZJqzhabUDr/ s20dU0KOt/aHT+HwEsCf0ofPz7NPl6apg8+WDm8uYReNFPrXqnJvXBBM8VokU9vEB7ZxPW 9WQ0LZ6SXduz5LssWyWQkhe3UT4sO2Vf46DuijUfHEd9IM4o/ts6a0aEF3Kp5OX2qPDGep fG9HAGzNHT0WrUX4uWpo5JzV0xEnysuY1j3ir8ayzY7FfwRYqyMVew0FL29SXxrDpPkLDZ I5ocQu6iHMIPG1b3I5/75WA7j3cImCevDhwA2hTCLlm/HzSLfrqLXffnNw7Jeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC3sm18DCzPNF; Thu, 4 May 2023 19:34:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344JYKa5049315; Thu, 4 May 2023 19:34:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344JYKGP049314; Thu, 4 May 2023 19:34:20 GMT (envelope-from git) Date: Thu, 4 May 2023 19:34:20 GMT Message-Id: <202305041934.344JYKGP049314@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: 4961faaacc07 - main - pmap_{un}map_io_transient: Use bool instead of boolean_t. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4961faaacc07d5bc71f28131229b1184d0d5ca9f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4961faaacc07d5bc71f28131229b1184d0d5ca9f commit 4961faaacc07d5bc71f28131229b1184d0d5ca9f Author: John Baldwin AuthorDate: 2023-05-04 19:29:48 +0000 Commit: John Baldwin CommitDate: 2023-05-04 19:29:48 +0000 pmap_{un}map_io_transient: Use bool instead of boolean_t. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D39920 --- sys/amd64/amd64/pmap.c | 24 ++++++++++++------------ sys/amd64/amd64/uio_machdep.c | 12 ++++++------ sys/amd64/include/pmap.h | 4 ++-- sys/arm64/arm64/pmap.c | 22 +++++++++++----------- sys/arm64/arm64/uio_machdep.c | 12 ++++++------ sys/arm64/include/pmap.h | 4 ++-- sys/dev/cxgbe/cxgbei/icl_cxgbei.c | 12 ++++++------ sys/riscv/include/pmap.h | 4 ++-- sys/riscv/riscv/pmap.c | 22 +++++++++++----------- sys/riscv/riscv/uio_machdep.c | 12 ++++++------ 10 files changed, 64 insertions(+), 64 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 1009736472dc..273c768559e1 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -10365,19 +10365,19 @@ done: * \param vaddr On return contains the kernel virtual memory address * of the pages passed in the page parameter. * \param count Number of pages passed in. - * \param can_fault TRUE if the thread using the mapped pages can take - * page faults, FALSE otherwise. + * \param can_fault true if the thread using the mapped pages can take + * page faults, false otherwise. * - * \returns TRUE if the caller must call pmap_unmap_io_transient when - * finished or FALSE otherwise. + * \returns true if the caller must call pmap_unmap_io_transient when + * finished or false otherwise. * */ -boolean_t +bool pmap_map_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, - boolean_t can_fault) + bool can_fault) { vm_paddr_t paddr; - boolean_t needs_mapping; + bool needs_mapping; pt_entry_t *pte; int cache_bits, error __unused, i; @@ -10385,14 +10385,14 @@ pmap_map_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, * Allocate any KVA space that we need, this is done in a separate * loop to prevent calling vmem_alloc while pinned. */ - needs_mapping = FALSE; + needs_mapping = false; for (i = 0; i < count; i++) { paddr = VM_PAGE_TO_PHYS(page[i]); if (__predict_false(paddr >= dmaplimit)) { error = vmem_alloc(kernel_arena, PAGE_SIZE, M_BESTFIT | M_WAITOK, &vaddr[i]); KASSERT(error == 0, ("vmem_alloc failed: %d", error)); - needs_mapping = TRUE; + needs_mapping = true; } else { vaddr[i] = PHYS_TO_DMAP(paddr); } @@ -10400,7 +10400,7 @@ pmap_map_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, /* Exit early if everything is covered by the DMAP */ if (!needs_mapping) - return (FALSE); + return (false); /* * NB: The sequence of updating a page table followed by accesses @@ -10426,7 +10426,7 @@ pmap_map_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, } else { pte = vtopte(vaddr[i]); cache_bits = pmap_cache_bits(kernel_pmap, - page[i]->md.pat_mode, 0); + page[i]->md.pat_mode, false); pte_store(pte, paddr | X86_PG_RW | X86_PG_V | cache_bits); pmap_invlpg(kernel_pmap, vaddr[i]); @@ -10439,7 +10439,7 @@ pmap_map_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, void pmap_unmap_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, - boolean_t can_fault) + bool can_fault) { vm_paddr_t paddr; int i; diff --git a/sys/amd64/amd64/uio_machdep.c b/sys/amd64/amd64/uio_machdep.c index 786844dda7ce..97e5fdc0a05e 100644 --- a/sys/amd64/amd64/uio_machdep.c +++ b/sys/amd64/amd64/uio_machdep.c @@ -67,7 +67,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) size_t cnt; int error = 0; int save = 0; - boolean_t mapped; + bool mapped; KASSERT(uio->uio_rw == UIO_READ || uio->uio_rw == UIO_WRITE, ("uiomove_fromphys: mode")); @@ -75,7 +75,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) ("uiomove_fromphys proc")); save = td->td_pflags & TDP_DEADLKTREAT; td->td_pflags |= TDP_DEADLKTREAT; - mapped = FALSE; + mapped = false; while (n > 0 && uio->uio_resid) { iov = uio->uio_iov; cnt = iov->iov_len; @@ -90,7 +90,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) cnt = min(cnt, PAGE_SIZE - page_offset); if (uio->uio_segflg != UIO_NOCOPY) { mapped = pmap_map_io_transient( - &ma[offset >> PAGE_SHIFT], &vaddr, 1, TRUE); + &ma[offset >> PAGE_SHIFT], &vaddr, 1, true); cp = (char *)vaddr + page_offset; } switch (uio->uio_segflg) { @@ -114,8 +114,8 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) } if (__predict_false(mapped)) { pmap_unmap_io_transient(&ma[offset >> PAGE_SHIFT], - &vaddr, 1, TRUE); - mapped = FALSE; + &vaddr, 1, true); + mapped = false; } iov->iov_base = (char *)iov->iov_base + cnt; iov->iov_len -= cnt; @@ -127,7 +127,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) out: if (__predict_false(mapped)) pmap_unmap_io_transient(&ma[offset >> PAGE_SHIFT], &vaddr, 1, - TRUE); + true); if (save == 0) td->td_pflags &= ~TDP_DEADLKTREAT; return (error); diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index 1b3aeb248ebb..cf41855a7c59 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -481,8 +481,8 @@ void pmap_invalidate_cache_pages(vm_page_t *pages, int count); void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva); void pmap_force_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva); void pmap_get_mapping(pmap_t pmap, vm_offset_t va, uint64_t *ptr, int *num); -boolean_t pmap_map_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t); -void pmap_unmap_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t); +bool pmap_map_io_transient(vm_page_t *, vm_offset_t *, int, bool); +void pmap_unmap_io_transient(vm_page_t *, vm_offset_t *, int, bool); void pmap_map_delete(pmap_t, vm_offset_t, vm_offset_t); void pmap_pti_add_kva(vm_offset_t sva, vm_offset_t eva, bool exec); void pmap_pti_remove_kva(vm_offset_t sva, vm_offset_t eva); diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 1d1986b34f66..69073c5c56db 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -7619,33 +7619,33 @@ pmap_align_superpage(vm_object_t object, vm_ooffset_t offset, * \param vaddr On return contains the kernel virtual memory address * of the pages passed in the page parameter. * \param count Number of pages passed in. - * \param can_fault TRUE if the thread using the mapped pages can take - * page faults, FALSE otherwise. + * \param can_fault true if the thread using the mapped pages can take + * page faults, false otherwise. * - * \returns TRUE if the caller must call pmap_unmap_io_transient when - * finished or FALSE otherwise. + * \returns true if the caller must call pmap_unmap_io_transient when + * finished or false otherwise. * */ -boolean_t +bool pmap_map_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, - boolean_t can_fault) + bool can_fault) { vm_paddr_t paddr; - boolean_t needs_mapping; + bool needs_mapping; int error __diagused, i; /* * Allocate any KVA space that we need, this is done in a separate * loop to prevent calling vmem_alloc while pinned. */ - needs_mapping = FALSE; + needs_mapping = false; for (i = 0; i < count; i++) { paddr = VM_PAGE_TO_PHYS(page[i]); if (__predict_false(!PHYS_IN_DMAP(paddr))) { error = vmem_alloc(kernel_arena, PAGE_SIZE, M_BESTFIT | M_WAITOK, &vaddr[i]); KASSERT(error == 0, ("vmem_alloc failed: %d", error)); - needs_mapping = TRUE; + needs_mapping = true; } else { vaddr[i] = PHYS_TO_DMAP(paddr); } @@ -7653,7 +7653,7 @@ pmap_map_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, /* Exit early if everything is covered by the DMAP */ if (!needs_mapping) - return (FALSE); + return (false); if (!can_fault) sched_pin(); @@ -7670,7 +7670,7 @@ pmap_map_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, void pmap_unmap_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, - boolean_t can_fault) + bool can_fault) { vm_paddr_t paddr; int i; diff --git a/sys/arm64/arm64/uio_machdep.c b/sys/arm64/arm64/uio_machdep.c index 11ed239fa9dd..6e92046f614b 100644 --- a/sys/arm64/arm64/uio_machdep.c +++ b/sys/arm64/arm64/uio_machdep.c @@ -65,7 +65,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) size_t cnt; int error = 0; int save = 0; - boolean_t mapped; + bool mapped; KASSERT(uio->uio_rw == UIO_READ || uio->uio_rw == UIO_WRITE, ("uiomove_fromphys: mode")); @@ -73,7 +73,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) ("uiomove_fromphys proc")); save = td->td_pflags & TDP_DEADLKTREAT; td->td_pflags |= TDP_DEADLKTREAT; - mapped = FALSE; + mapped = false; while (n > 0 && uio->uio_resid) { iov = uio->uio_iov; cnt = iov->iov_len; @@ -88,7 +88,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) cnt = min(cnt, PAGE_SIZE - page_offset); if (uio->uio_segflg != UIO_NOCOPY) { mapped = pmap_map_io_transient( - &ma[offset >> PAGE_SHIFT], &vaddr, 1, TRUE); + &ma[offset >> PAGE_SHIFT], &vaddr, 1, true); cp = (char *)vaddr + page_offset; } switch (uio->uio_segflg) { @@ -112,8 +112,8 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) } if (__predict_false(mapped)) { pmap_unmap_io_transient(&ma[offset >> PAGE_SHIFT], - &vaddr, 1, TRUE); - mapped = FALSE; + &vaddr, 1, true); + mapped = false; } iov->iov_base = (char *)iov->iov_base + cnt; iov->iov_len -= cnt; @@ -126,7 +126,7 @@ out: if (__predict_false(mapped)) { panic("ARM64TODO: uiomove_fromphys"); pmap_unmap_io_transient(&ma[offset >> PAGE_SHIFT], &vaddr, 1, - TRUE); + true); } if (save == 0) td->td_pflags &= ~TDP_DEADLKTREAT; diff --git a/sys/arm64/include/pmap.h b/sys/arm64/include/pmap.h index ad77450f0233..b855a811d3c0 100644 --- a/sys/arm64/include/pmap.h +++ b/sys/arm64/include/pmap.h @@ -162,8 +162,8 @@ void *pmap_mapbios(vm_paddr_t, vm_size_t); void pmap_unmapdev(void *, vm_size_t); void pmap_unmapbios(void *, vm_size_t); -boolean_t pmap_map_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t); -void pmap_unmap_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t); +bool pmap_map_io_transient(vm_page_t *, vm_offset_t *, int, bool); +void pmap_unmap_io_transient(vm_page_t *, vm_offset_t *, int, bool); bool pmap_get_tables(pmap_t, vm_offset_t, pd_entry_t **, pd_entry_t **, pd_entry_t **, pt_entry_t **); diff --git a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c index 82201b358e91..a406634e96b8 100644 --- a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c @@ -625,7 +625,7 @@ icl_cxgbei_conn_pdu_append_bio(struct icl_conn *ic, struct icl_pdu *ip, struct mbuf *m, *m_tail; vm_offset_t vaddr; size_t page_offset, todo, mtodo; - boolean_t mapped; + bool mapped; int i; MPASS(icp->icp_signature == CXGBEI_PDU_SIGNATURE); @@ -712,7 +712,7 @@ icl_cxgbei_conn_pdu_append_bio(struct icl_conn *ic, struct icl_pdu *ip, todo = MIN(len, PAGE_SIZE - page_offset); mapped = pmap_map_io_transient(bp->bio_ma + i, &vaddr, 1, - FALSE); + false); do { mtodo = min(todo, M_SIZE(m) - m->m_len); @@ -727,7 +727,7 @@ icl_cxgbei_conn_pdu_append_bio(struct icl_conn *ic, struct icl_pdu *ip, if (__predict_false(mapped)) pmap_unmap_io_transient(bp->bio_ma + 1, &vaddr, 1, - FALSE); + false); page_offset = 0; len -= todo; @@ -813,7 +813,7 @@ icl_cxgbei_conn_pdu_get_bio(struct icl_conn *ic, struct icl_pdu *ip, struct icl_cxgbei_pdu *icp = ip_to_icp(ip); vm_offset_t vaddr; size_t page_offset, todo; - boolean_t mapped; + bool mapped; int i; if (icp->icp_flags & ICPF_RX_DDP) @@ -834,12 +834,12 @@ icl_cxgbei_conn_pdu_get_bio(struct icl_conn *ic, struct icl_pdu *ip, todo = MIN(len, PAGE_SIZE - page_offset); mapped = pmap_map_io_transient(bp->bio_ma + i, &vaddr, 1, - FALSE); + false); m_copydata(ip->ip_data_mbuf, pdu_off, todo, (char *)vaddr + page_offset); if (__predict_false(mapped)) pmap_unmap_io_transient(bp->bio_ma + 1, &vaddr, 1, - FALSE); + false); page_offset = 0; pdu_off += todo; diff --git a/sys/riscv/include/pmap.h b/sys/riscv/include/pmap.h index 88579e6448b5..5ca6dc411e7b 100644 --- a/sys/riscv/include/pmap.h +++ b/sys/riscv/include/pmap.h @@ -154,8 +154,8 @@ void *pmap_mapbios(vm_paddr_t, vm_size_t); void pmap_unmapdev(void *, vm_size_t); void pmap_unmapbios(void *, vm_size_t); -boolean_t pmap_map_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t); -void pmap_unmap_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t); +bool pmap_map_io_transient(vm_page_t *, vm_offset_t *, int, bool); +void pmap_unmap_io_transient(vm_page_t *, vm_offset_t *, int, bool); bool pmap_get_tables(pmap_t, vm_offset_t, pd_entry_t **, pd_entry_t **, pt_entry_t **); diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index 1b4eaa60a1f4..8d34dbc3637d 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -4736,33 +4736,33 @@ pmap_align_superpage(vm_object_t object, vm_ooffset_t offset, * \param vaddr On return contains the kernel virtual memory address * of the pages passed in the page parameter. * \param count Number of pages passed in. - * \param can_fault TRUE if the thread using the mapped pages can take - * page faults, FALSE otherwise. + * \param can_fault true if the thread using the mapped pages can take + * page faults, false otherwise. * - * \returns TRUE if the caller must call pmap_unmap_io_transient when - * finished or FALSE otherwise. + * \returns true if the caller must call pmap_unmap_io_transient when + * finished or false otherwise. * */ -boolean_t +bool pmap_map_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, - boolean_t can_fault) + bool can_fault) { vm_paddr_t paddr; - boolean_t needs_mapping; + bool needs_mapping; int error __diagused, i; /* * Allocate any KVA space that we need, this is done in a separate * loop to prevent calling vmem_alloc while pinned. */ - needs_mapping = FALSE; + needs_mapping = false; for (i = 0; i < count; i++) { paddr = VM_PAGE_TO_PHYS(page[i]); if (__predict_false(paddr >= DMAP_MAX_PHYSADDR)) { error = vmem_alloc(kernel_arena, PAGE_SIZE, M_BESTFIT | M_WAITOK, &vaddr[i]); KASSERT(error == 0, ("vmem_alloc failed: %d", error)); - needs_mapping = TRUE; + needs_mapping = true; } else { vaddr[i] = PHYS_TO_DMAP(paddr); } @@ -4770,7 +4770,7 @@ pmap_map_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, /* Exit early if everything is covered by the DMAP */ if (!needs_mapping) - return (FALSE); + return (false); if (!can_fault) sched_pin(); @@ -4787,7 +4787,7 @@ pmap_map_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, void pmap_unmap_io_transient(vm_page_t page[], vm_offset_t vaddr[], int count, - boolean_t can_fault) + bool can_fault) { vm_paddr_t paddr; int i; diff --git a/sys/riscv/riscv/uio_machdep.c b/sys/riscv/riscv/uio_machdep.c index e6f6d39f02be..108824d5b8b4 100644 --- a/sys/riscv/riscv/uio_machdep.c +++ b/sys/riscv/riscv/uio_machdep.c @@ -65,7 +65,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) size_t cnt; int error = 0; int save = 0; - boolean_t mapped; + bool mapped; KASSERT(uio->uio_rw == UIO_READ || uio->uio_rw == UIO_WRITE, ("uiomove_fromphys: mode")); @@ -73,7 +73,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) ("uiomove_fromphys proc")); save = td->td_pflags & TDP_DEADLKTREAT; td->td_pflags |= TDP_DEADLKTREAT; - mapped = FALSE; + mapped = false; while (n > 0 && uio->uio_resid) { iov = uio->uio_iov; cnt = iov->iov_len; @@ -88,7 +88,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) cnt = min(cnt, PAGE_SIZE - page_offset); if (uio->uio_segflg != UIO_NOCOPY) { mapped = pmap_map_io_transient( - &ma[offset >> PAGE_SHIFT], &vaddr, 1, TRUE); + &ma[offset >> PAGE_SHIFT], &vaddr, 1, true); cp = (char *)vaddr + page_offset; } switch (uio->uio_segflg) { @@ -112,8 +112,8 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) } if (__predict_false(mapped)) { pmap_unmap_io_transient(&ma[offset >> PAGE_SHIFT], - &vaddr, 1, TRUE); - mapped = FALSE; + &vaddr, 1, true); + mapped = false; } iov->iov_base = (char *)iov->iov_base + cnt; iov->iov_len -= cnt; @@ -126,7 +126,7 @@ out: if (__predict_false(mapped)) { panic("TODO 3"); pmap_unmap_io_transient(&ma[offset >> PAGE_SHIFT], &vaddr, 1, - TRUE); + true); } if (save == 0) td->td_pflags &= ~TDP_DEADLKTREAT; From nobody Thu May 4 19:34:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC3sn3pgkz49Rx8; Thu, 4 May 2023 19:34: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 4QC3sn37Syz4Pk5; Thu, 4 May 2023 19:34:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xgf6P4e/B/SDpIvk2R12LgQ+uv1RRPmBRhfxmZrMAVY=; b=XJpehHPNJDyLfRyBAgY2HeI93sEbp6f8OAB7SesYBmLYIcAiDnO/hcrjw5DN/VRzKyP5OE 2n8TsRDM4fSWuv/P0gbltCb7qqO+s/EJtWoce0H+dryFs3nJy9y3jSl2LcVTAYca8hkeNl c7thicVfPblZaoPwW5MFH4jXw3Lfpn1Fg7hd5k/4Ongi68Rk0DAQZ9yzFQXqbHrPRBJFxF x//tFNeEhQ3bDLhi14vAphtvixyplIfcbZU5ZeaKfF6EI80Rew5d7YBgt19wNS91N0VJYE /8TDuK/xGb3r7QXDRs4FvpsXwN2uhALORt1DTKZtGuL5ZEaKJfqvWUSUJ5ZzpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xgf6P4e/B/SDpIvk2R12LgQ+uv1RRPmBRhfxmZrMAVY=; b=xh1CwSluzMIQKidGBpAYWtKzTKPLS9r9vAJrjBP/vEzqKauWTW9wYKQKRVceUC7sifQE46 NkDRejGsgo3Dqbwnbkg81WOEbd0czLRw5meGb9PynJsqa763hQgFZz+wGcivK4LAbpnmTT 2TvsqtkINA/quqthkU9Yupz2OKdbcec2ZUkUjT82V06W1NLxG+ErIlLQaMLhQ0S5tsgbzk TCJQdkeEZROfdO1nlD4XK9PRasfMU7ZAeaSwZxX/VAuQEPEPLGsC4E3f2ZZ+1d7EWY0dzE t9mGwWaSTaWmeD6mDn5m8qfWMCHf8ayz1enFdqI4m3P3Y1O75or7Di2NMMjyfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683228861; a=rsa-sha256; cv=none; b=kXTA6aqtMpUWviVGHehrbDdnzU2up0RQCtq4aWoiYDpNeQYY0n68WC+APmefbYPoZvM087 uHBFZrdvBCYj+RjBTOTCLmnRo6ktrJDUVdhcIe1fUoXNktYh+mzVb4icxwJKuxPzXvHdcn bBVlMQDkWJeqqrIhk0WLUqdY433gxw/fbH2Bx4YGYoc9uc3DhgwZe36MvEJ01DPmOIpF1s XOlsCi1s5StBgq7pQahnHRpu5rEkROPCp6TlAEYiiAJL6yizI4C0PYFieOplBBURTAbrnr osZJyx+YBy91jwFoedfjciSX9YqZnEGN9A6sOakzwQwx7sD6khy+gxH7e5/Ifw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC3sn1wcFzPtf; Thu, 4 May 2023 19:34:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344JYLvH049338; Thu, 4 May 2023 19:34:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344JYLd0049337; Thu, 4 May 2023 19:34:21 GMT (envelope-from git) Date: Thu, 4 May 2023 19:34:21 GMT Message-Id: <202305041934.344JYLd0049337@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: 65c92e48c43a - main - acpi_button: Replace boolean_t with better types. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 65c92e48c43aca347b614d1e0a5c87c9df0ed8a8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=65c92e48c43aca347b614d1e0a5c87c9df0ed8a8 commit 65c92e48c43aca347b614d1e0a5c87c9df0ed8a8 Author: John Baldwin AuthorDate: 2023-05-04 19:32:09 +0000 Commit: John Baldwin CommitDate: 2023-05-04 19:32:09 +0000 acpi_button: Replace boolean_t with better types. - Use an enum for the button type (it is not really a boolean value). - Use bool for fixed. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D39922 --- sys/dev/acpica/acpi_button.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/dev/acpica/acpi_button.c b/sys/dev/acpica/acpi_button.c index 492f64e00f4d..f2c7041f809f 100644 --- a/sys/dev/acpica/acpi_button.c +++ b/sys/dev/acpica/acpi_button.c @@ -53,10 +53,8 @@ ACPI_MODULE_NAME("BUTTON") struct acpi_button_softc { device_t button_dev; ACPI_HANDLE button_handle; - boolean_t button_type; -#define ACPI_POWER_BUTTON 0 -#define ACPI_SLEEP_BUTTON 1 - boolean_t fixed; + enum { ACPI_POWER_BUTTON, ACPI_SLEEP_BUTTON } button_type; + bool fixed; #ifdef EVDEV_SUPPORT struct evdev_dev *button_evdev; #endif @@ -120,14 +118,14 @@ acpi_button_probe(device_t dev) } else if (strcmp(str, "ACPI_FPB") == 0) { device_set_desc(dev, "Power Button (fixed)"); sc->button_type = ACPI_POWER_BUTTON; - sc->fixed = 1; + sc->fixed = true; } else if (strcmp(str, "PNP0C0E") == 0) { device_set_desc(dev, "Sleep Button"); sc->button_type = ACPI_SLEEP_BUTTON; } else if (strcmp(str, "ACPI_FSB") == 0) { device_set_desc(dev, "Sleep Button (fixed)"); sc->button_type = ACPI_SLEEP_BUTTON; - sc->fixed = 1; + sc->fixed = true; } return (rv); From nobody Thu May 4 19:34:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC3sp4C1jz49RmC; Thu, 4 May 2023 19:34: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 4QC3sp3VMzz4PSY; Thu, 4 May 2023 19:34:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4wJ0Uo9vD4H6Pf40XpY27eZWm9kXVxy05imi4+zCQ9k=; b=qjxnbocEangaOSxtLIq7pNUoIAmJ/vlfu/6/vRrjpROHSZ4JS/DhjZSUgllNSA9PISdxM4 McN9fCAAK68EK0iT3jDi6NL+XD1KTBdCgem4Dtf+tiaYqOG0NGRmXkoqxio4ZLHDMKJjRV JmTeqCw6kv9kT1y8g6bwb0itnJudRnPTuHZVde9Xb2xcaNIShIFTOdfeqZLugiZJ7VAxW3 0RrVZWDu0YC1VD+NJaNeQevD8VQH/qlUvOF/dE1gpFTNhsUUU7cLFmd5zibbSz5oaqETcO l06gkDNW3F2sV0qmk8Dl2c+l0JqyE95fsjZhmarVnaMGK753/cYjNKVUafxcww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4wJ0Uo9vD4H6Pf40XpY27eZWm9kXVxy05imi4+zCQ9k=; b=yldO9/JSkUh8HREMxdxexYNrRw5Xn5zmiZAzf7S5iYddySQHyrX4G2u3njkULlMLqbiW5Y Gcf8FyhJgCyecu2vJXABf9TjrcJZb7t4T/uC4u8PPxVrjmKRlX10H/WNeogxny7g4reoWO PXnhgsNa7OVHLybErOAATYNp56oCf2+/Oi2cFQ11GL7zrf5EAxQlsGaIVJVh/Fz96emGQh R+71VK75o19RAiMsjgkS55XLEqx6qOqUZVPp020aJk2wXfv4472TU8V6e4aIPTY4s83iQo 2/8D9kjJdMqr99ZhCK4eN1YOTDfQ2MlnTW3zbEiDenzIMsqotKEITCfSA0aINQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683228862; a=rsa-sha256; cv=none; b=I5U1/z5mLGnE+PaaRiQwJPmiXC/Pn3fvaUKTTbY34eHE2i1SJQpo187SVg1NQRyq12ZKtp QNx8ihHMxExWS+NevmfCHBpDlmgTf3qy7Y+PmsQivXYX804YU6n4BCWJnILNP+3ETmq0Hj a8NsaRb0gBvBW38dLc9cdOKbGNXFnRtcdqUMU6Cvz9uUgZqG3IyTY/FgbSL4QHD64A1yrh w9ZwY2VgC5KTiH8nDcf7DeI9MekxNeAhs8MCRftO7fpG/L72KPxAQUKhqHURW7SWMSwXgE R/sV83WUHezSlLwJSLPO6ljjASB2RNhuTr0JMJjjtmtXMADclsvNFuUPl4af5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC3sp2bGPzPsT; Thu, 4 May 2023 19:34:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344JYM97049363; Thu, 4 May 2023 19:34:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344JYMNu049362; Thu, 4 May 2023 19:34:22 GMT (envelope-from git) Date: Thu, 4 May 2023 19:34:22 GMT Message-Id: <202305041934.344JYMNu049362@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: 463edaf441ac - main - al: Replace boolean_t with either al_bool or bool. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 463edaf441ac5e881d8202a5c1ffa4bfe4df4678 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=463edaf441ac5e881d8202a5c1ffa4bfe4df4678 commit 463edaf441ac5e881d8202a5c1ffa4bfe4df4678 Author: John Baldwin AuthorDate: 2023-05-04 19:32:40 +0000 Commit: John Baldwin CommitDate: 2023-05-04 19:32:40 +0000 al: Replace boolean_t with either al_bool or bool. Use al_bool for interfaces and structures defined in the OS-independent HAL in sys/contrib, and use plain bool for FreeBSD-specific APIs and structures in sys/dev/al_eth. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D39923 --- sys/dev/al_eth/al_eth.c | 32 ++++----- sys/dev/al_eth/al_eth.h | 38 +++++------ sys/dev/al_eth/al_init_eth_kr.c | 42 ++++++------ sys/dev/al_eth/al_init_eth_lm.c | 148 ++++++++++++++++++++-------------------- sys/dev/al_eth/al_init_eth_lm.h | 52 +++++++------- 5 files changed, 156 insertions(+), 156 deletions(-) diff --git a/sys/dev/al_eth/al_eth.c b/sys/dev/al_eth/al_eth.c index ec10313442b3..e3f9a14f4f2d 100644 --- a/sys/dev/al_eth/al_eth.c +++ b/sys/dev/al_eth/al_eth.c @@ -664,7 +664,7 @@ al_eth_mac_table_broadcast_add(struct al_eth_adapter *adapter, static void al_eth_mac_table_promiscuous_set(struct al_eth_adapter *adapter, - boolean_t promiscuous) + bool promiscuous) { struct al_eth_fwd_mac_table_entry entry = { { 0 } }; @@ -856,7 +856,7 @@ al_eth_board_params_init(struct al_eth_adapter *adapter) return (-1); } - adapter->phy_exist = params.phy_exist == TRUE; + adapter->phy_exist = params.phy_exist == true; adapter->phy_addr = params.phy_mdio_addr; adapter->an_en = params.autoneg_enable; adapter->lt_en = params.kr_lt_enable; @@ -904,7 +904,7 @@ al_eth_board_params_init(struct al_eth_adapter *adapter) switch (params.media_type) { case AL_ETH_BOARD_MEDIA_TYPE_RGMII: - if (params.sfp_plus_module_exist == TRUE) + if (params.sfp_plus_module_exist == true) /* Backward compatibility */ adapter->mac_mode = AL_ETH_MAC_MODE_SGMII; else @@ -921,12 +921,12 @@ al_eth_board_params_init(struct al_eth_adapter *adapter) adapter->use_lm = true; break; case AL_ETH_BOARD_MEDIA_TYPE_AUTO_DETECT: - adapter->sfp_detection_needed = TRUE; + adapter->sfp_detection_needed = true; adapter->auto_speed = false; adapter->use_lm = true; break; case AL_ETH_BOARD_MEDIA_TYPE_AUTO_DETECT_AUTO_SPEED: - adapter->sfp_detection_needed = TRUE; + adapter->sfp_detection_needed = true; adapter->auto_speed = true; adapter->mac_mode_set = false; adapter->use_lm = true; @@ -943,9 +943,9 @@ al_eth_board_params_init(struct al_eth_adapter *adapter) device_printf(adapter->dev, "Board info: phy exist %s. phy addr %d. mdio freq %u Khz. " "SFP connected %s. media %d\n", - params.phy_exist == TRUE ? "Yes" : "No", + params.phy_exist ? "Yes" : "No", params.phy_mdio_addr, adapter->mdio_freq, - params.sfp_plus_module_exist == TRUE ? "Yes" : "No", + params.sfp_plus_module_exist ? "Yes" : "No", params.media_type); } @@ -1299,7 +1299,7 @@ al_eth_xmit_mbuf(struct al_eth_ring *tx_ring, struct mbuf *m) bus_dma_segment_t segs[AL_ETH_PKT_MAX_BUFS + 1]; struct al_eth_pkt *hal_pkt; struct al_buf *al_buf; - boolean_t remap; + bool remap; /* Check if queue is ready */ if (unlikely(tx_ring->stall) != 0) { @@ -1333,7 +1333,7 @@ al_eth_xmit_mbuf(struct al_eth_ring *tx_ring, struct mbuf *m) return; } - remap = TRUE; + remap = true; /* Map packets for DMA */ retry: error = bus_dmamap_load_mbuf_sg(tx_ring->dma_buf_tag, tx_info->dma_map, @@ -1343,8 +1343,8 @@ retry: if (error == EFBIG) { /* Try it again? - one try */ - if (remap == TRUE) { - remap = FALSE; + if (remap == true) { + remap = false; m_new = m_defrag(m, M_NOWAIT); if (m_new == NULL) { device_printf(tx_ring->dev, @@ -1846,7 +1846,7 @@ al_eth_hw_init(struct al_eth_adapter *adapter) if ((adapter->mac_mode == AL_ETH_MAC_MODE_SGMII) || (adapter->mac_mode == AL_ETH_MAC_MODE_RGMII && - adapter->phy_exist == FALSE)) { + adapter->phy_exist == false)) { rc = al_eth_mac_link_config(&adapter->hal_adapter, adapter->link_config.force_1000_base_x, adapter->link_config.autoneg, @@ -1861,7 +1861,7 @@ al_eth_hw_init(struct al_eth_adapter *adapter) } rc = al_eth_mdio_config(&adapter->hal_adapter, - AL_ETH_MDIO_TYPE_CLAUSE_22, TRUE /* shared_mdio_if */, + AL_ETH_MDIO_TYPE_CLAUSE_22, AL_TRUE /* shared_mdio_if */, adapter->ref_clk_freq, adapter->mdio_freq); if (rc != 0) { device_printf(adapter->dev, "%s failed at mdio config!\n", @@ -2551,7 +2551,7 @@ al_eth_setup_rx_resources(struct al_eth_adapter *adapter, unsigned int qid) } else { device_printf_dbg(adapter->dev, "RX Soft LRO[%d] Initialized\n", qid); - rx_ring->lro_enabled = TRUE; + rx_ring->lro_enabled = true; rx_ring->lro.ifp = adapter->netdev; } } @@ -2971,9 +2971,9 @@ al_eth_config_rx_fwd(struct al_eth_adapter *adapter) entry.queue_sel_1 = AL_ETH_CTRL_TABLE_QUEUE_SEL_1_THASH_TABLE; entry.queue_sel_2 = AL_ETH_CTRL_TABLE_QUEUE_SEL_2_NO_PRIO; entry.udma_sel = AL_ETH_CTRL_TABLE_UDMA_SEL_MAC_TABLE; - entry.filter = FALSE; + entry.filter = false; - al_eth_ctrl_table_def_set(&adapter->hal_adapter, FALSE, &entry); + al_eth_ctrl_table_def_set(&adapter->hal_adapter, AL_FALSE, &entry); /* * By default set the mac table to forward all unicast packets to our diff --git a/sys/dev/al_eth/al_eth.h b/sys/dev/al_eth/al_eth.h index 1f8d4528b545..9579aca55685 100644 --- a/sys/dev/al_eth/al_eth.h +++ b/sys/dev/al_eth/al_eth.h @@ -177,8 +177,8 @@ struct al_eth_link_config { uint8_t flow_ctrl_supported; /* the following are not relevant to RGMII */ - boolean_t force_1000_base_x; - boolean_t autoneg; + bool force_1000_base_x; + bool autoneg; }; /* SFP detection event */ @@ -196,18 +196,18 @@ enum al_eth_sfp_detect_evt { /* SFP detection status */ struct al_eth_sfp_detect_stat { /* Status is valid (i.e. rest of fields are valid) */ - boolean_t valid; - boolean_t connected; + bool valid; + bool connected; uint8_t sfp_10g; uint8_t sfp_1g; uint8_t sfp_cable_tech; - boolean_t lt_en; - boolean_t an_en; + bool lt_en; + bool an_en; enum al_eth_mac_mode mac_mode; }; struct al_eth_retimer_params { - boolean_t exist; + bool exist; uint8_t bus_id; uint8_t i2c_addr; enum al_eth_retimer_channel channel; @@ -304,10 +304,10 @@ struct al_eth_adapter { struct al_eth_mac_stats mac_stats; enum al_eth_mac_mode mac_mode; - boolean_t mac_mode_set; /* Relevant only when 'auto_speed' is set */ + bool mac_mode_set; /* Relevant only when 'auto_speed' is set */ uint8_t mac_addr[ETHER_ADDR_LEN]; /* mdio and phy*/ - boolean_t phy_exist; + bool phy_exist; struct mii_bus *mdio_bus; struct phy_device *phydev; uint8_t phy_addr; @@ -328,28 +328,28 @@ struct al_eth_adapter { struct task link_status_task; uint32_t link_poll_interval; /* task interval in mSec */ - boolean_t serdes_init; + bool serdes_init; struct al_serdes_grp_obj serdes_obj; uint8_t serdes_grp; uint8_t serdes_lane; - boolean_t an_en; /* run kr auto-negotiation */ - boolean_t lt_en; /* run kr link-training */ + bool an_en; /* run kr auto-negotiation */ + bool lt_en; /* run kr link-training */ - boolean_t sfp_detection_needed; /* true if need to run sfp detection */ - boolean_t auto_speed; /* true if allowed to change SerDes speed configuration */ + bool sfp_detection_needed; /* true if need to run sfp detection */ + bool auto_speed; /* true if allowed to change SerDes speed configuration */ uint8_t i2c_adapter_id; /* identifier for the i2c adapter to use to access SFP+ module */ enum al_eth_ref_clk_freq ref_clk_freq; /* reference clock frequency */ unsigned int mdio_freq; /* MDIO frequency [Khz] */ - boolean_t up; + bool up; - boolean_t last_link; - boolean_t last_establish_failed; + bool last_link; + bool last_establish_failed; struct al_eth_lm_context lm_context; - boolean_t use_lm; + bool use_lm; - boolean_t dont_override_serdes; /* avoid overriding serdes parameters + bool dont_override_serdes; /* avoid overriding serdes parameters to preset static values */ struct mtx serdes_config_lock; struct mtx if_rx_lock; diff --git a/sys/dev/al_eth/al_init_eth_kr.c b/sys/dev/al_eth/al_init_eth_kr.c index fba6b6154a1f..db055adda8c0 100644 --- a/sys/dev/al_eth/al_init_eth_kr.c +++ b/sys/dev/al_eth/al_init_eth_kr.c @@ -131,9 +131,9 @@ al_eth_kr_an_run(struct al_eth_kr_data *kr_data, struct al_eth_an_adv *an_adv, struct al_eth_an_adv *an_partner_adv) { int rc; - boolean_t page_received = FALSE; - boolean_t an_completed = FALSE; - boolean_t error = FALSE; + al_bool page_received = AL_FALSE; + al_bool an_completed = AL_FALSE; + al_bool error = AL_FALSE; int timeout = AL_ETH_KR_AN_TIMEOUT; rc = al_eth_kr_an_init(kr_data->adapter, an_adv); @@ -144,7 +144,7 @@ al_eth_kr_an_run(struct al_eth_kr_data *kr_data, struct al_eth_an_adv *an_adv, } rc = al_eth_kr_an_start(kr_data->adapter, AL_ETH_AN__LT_LANE_0, - FALSE, TRUE); + AL_FALSE, AL_TRUE); if (rc != 0) { al_err("%s %s autonegotiation enable failed\n", kr_data->adapter->name, __func__); @@ -163,7 +163,7 @@ al_eth_kr_an_run(struct al_eth_kr_data *kr_data, struct al_eth_an_adv *an_adv, al_eth_kr_an_status_check(kr_data->adapter, &page_received, &an_completed, &error); - } while (page_received == FALSE); + } while (page_received == AL_FALSE); if (error != 0) { al_info("%s %s autonegotiation failed (status error)\n", @@ -273,7 +273,7 @@ al_eth_kr_lt_receiver_task_init(struct al_eth_kr_data *kr_data) sizeof(struct al_eth_kr_status_report_data)); } -static boolean_t +static bool al_eth_lp_coeff_up_change(struct al_eth_kr_data *kr_data, struct al_eth_kr_coef_up_data *lpcoeff) { @@ -281,12 +281,12 @@ al_eth_lp_coeff_up_change(struct al_eth_kr_data *kr_data, if (al_memcmp(last_lpcoeff, lpcoeff, sizeof(struct al_eth_kr_coef_up_data)) == 0) { - return (FALSE); + return (false); } al_memcpy(last_lpcoeff, lpcoeff, sizeof(struct al_eth_kr_coef_up_data)); - return (TRUE); + return (true); } /* @@ -361,17 +361,17 @@ al_eth_kr_lt_transmitter_task_init(struct al_eth_kr_data *kr_data) return (0); } -static boolean_t +static bool al_eth_kr_lt_all_not_updated(struct al_eth_kr_status_report_data *report) { if ((report->c_zero == C72_CSTATE_NOT_UPDATED) && (report->c_minus == C72_CSTATE_NOT_UPDATED) && (report->c_plus == C72_CSTATE_NOT_UPDATED)) { - return (TRUE); + return (true); } - return (FALSE); + return (false); } static void @@ -461,7 +461,7 @@ al_eth_kr_lt_transmitter_task_run(struct al_eth_kr_data *kr_data) /* Wait for not_updated for all coefficients from remote */ if (al_eth_kr_lt_all_not_updated(&report) != 0) { - ldcoeff.preset = TRUE; + ldcoeff.preset = AL_TRUE; nextstate = DO_PRESET; } break; @@ -474,7 +474,7 @@ al_eth_kr_lt_transmitter_task_run(struct al_eth_kr_data *kr_data) nextstate = DO_HOLD; else /* as long as the lp didn't response to the preset * we should continue sending it */ - ldcoeff.preset = TRUE; + ldcoeff.preset = AL_TRUE; break; case DO_HOLD: /* @@ -645,7 +645,7 @@ al_eth_kr_lt_transmitter_task_run(struct al_eth_kr_data *kr_data) * our receiver is ready for data. * no training will occur any more. */ - kr_data->status_report.receiver_ready = TRUE; + kr_data->status_report.receiver_ready = AL_TRUE; /* * in addition to the status we transmit, we also must tell our * local hardware state-machine that we are done, so the @@ -698,15 +698,15 @@ al_eth_kr_run_lt(struct al_eth_kr_data *kr_data) { unsigned int cnt; int ret = 0; - boolean_t page_received = FALSE; - boolean_t an_completed = FALSE; - boolean_t error = FALSE; - boolean_t training_failure = FALSE; + al_bool page_received = AL_FALSE; + al_bool an_completed = AL_FALSE; + al_bool error = AL_FALSE; + al_bool training_failure = AL_FALSE; al_eth_kr_lt_initialize(kr_data->adapter, AL_ETH_AN__LT_LANE_0); if (al_eth_kr_lt_frame_lock_wait(kr_data->adapter, AL_ETH_AN__LT_LANE_0, - AL_ETH_KR_FRAME_LOCK_TIMEOUT) == TRUE) { + AL_ETH_KR_FRAME_LOCK_TIMEOUT) == AL_TRUE) { /* * when locked, for the first time initialize the receiver and * transmitter tasks to prepare it for detecting coefficient @@ -768,7 +768,7 @@ al_eth_kr_run_lt(struct al_eth_kr_data *kr_data) al_eth_kr_lt_stop(kr_data->adapter, AL_ETH_AN__LT_LANE_0); cnt = AL_ETH_KR_LT_DONE_TIMEOUT; - while (an_completed == FALSE) { + while (an_completed == AL_FALSE) { al_eth_kr_an_status_check(kr_data->adapter, &page_received, &an_completed, &error); DELAY(1); @@ -806,7 +806,7 @@ int al_eth_an_lt_execute(struct al_hal_eth_adapter *adapter, * the link training progress will run rx equalization so need to make * sure rx parameters is not been override */ - rx_params.override = FALSE; + rx_params.override = AL_FALSE; kr_data.serdes_obj->rx_advanced_params_set( kr_data.serdes_obj, kr_data.lane, diff --git a/sys/dev/al_eth/al_init_eth_lm.c b/sys/dev/al_eth/al_init_eth_lm.c index 5caea40e3bf7..4b4ebe3628a7 100644 --- a/sys/dev/al_eth/al_init_eth_lm.c +++ b/sys/dev/al_eth/al_init_eth_lm.c @@ -206,18 +206,18 @@ static struct retimer_config_reg retimer_ds25_10g_mode[] = { static int al_eth_lm_retimer_boost_config(struct al_eth_lm_context *lm_context); static int al_eth_lm_retimer_ds25_full_config(struct al_eth_lm_context *lm_context); -static al_bool al_eth_lm_retimer_ds25_signal_detect( +static bool al_eth_lm_retimer_ds25_signal_detect( struct al_eth_lm_context *lm_context, uint32_t channel); static int al_eth_lm_retimer_ds25_cdr_reset(struct al_eth_lm_context *lm_context, uint32_t channel); -static al_bool al_eth_lm_retimer_ds25_cdr_lock( +static bool al_eth_lm_retimer_ds25_cdr_lock( struct al_eth_lm_context *lm_context, uint32_t channel); static int al_eth_lm_retimer_25g_rx_adaptation(struct al_eth_lm_context *lm_context); struct al_eth_lm_retimer { int (*config)(struct al_eth_lm_context *lm_context); int (*reset)(struct al_eth_lm_context *lm_context, uint32_t channel); - int (*signal_detect)(struct al_eth_lm_context *lm_context, uint32_t channel); - int (*cdr_lock)(struct al_eth_lm_context *lm_context, uint32_t channel); + bool (*signal_detect)(struct al_eth_lm_context *lm_context, uint32_t channel); + bool (*cdr_lock)(struct al_eth_lm_context *lm_context, uint32_t channel); int (*rx_adaptation)(struct al_eth_lm_context *lm_context); }; @@ -438,7 +438,7 @@ al_eth_module_detect(struct al_eth_lm_context *lm_context, } static struct al_serdes_adv_tx_params da_tx_params = { - .override = TRUE, + .override = AL_TRUE, .amp = 0x1, .total_driver_units = 0x13, .c_plus_1 = 0x2, @@ -448,7 +448,7 @@ static struct al_serdes_adv_tx_params da_tx_params = { }; static struct al_serdes_adv_rx_params da_rx_params = { - .override = TRUE, + .override = AL_TRUE, .dcgain = 0x4, .dfe_3db_freq = 0x4, .dfe_gain = 0x3, @@ -462,7 +462,7 @@ static struct al_serdes_adv_rx_params da_rx_params = { }; static struct al_serdes_adv_tx_params optic_tx_params = { - .override = TRUE, + .override = AL_TRUE, .amp = 0x1, .total_driver_units = 0x13, .c_plus_1 = 0x2, @@ -472,7 +472,7 @@ static struct al_serdes_adv_tx_params optic_tx_params = { }; static struct al_serdes_adv_rx_params optic_rx_params = { - .override = TRUE, + .override = AL_TRUE, .dcgain = 0x0, .dfe_3db_freq = 0x7, .dfe_gain = 0x0, @@ -495,7 +495,7 @@ al_eth_serdes_static_tx_params_set(struct al_eth_lm_context *lm_context) if (lm_context->serdes_tx_params_valid != 0) { lm_context->tx_param_dirty = 0; - lm_context->tx_params_override.override = TRUE; + lm_context->tx_params_override.override = AL_TRUE; if ((lm_context->serdes_obj->tx_advanced_params_set) == 0) { al_err("tx_advanced_params_set is not supported for this serdes group\n"); @@ -539,7 +539,7 @@ al_eth_serdes_static_rx_params_set(struct al_eth_lm_context *lm_context) if (lm_context->serdes_rx_params_valid != 0) { lm_context->rx_param_dirty = 0; - lm_context->rx_params_override.override = TRUE; + lm_context->rx_params_override.override = AL_TRUE; if ((lm_context->serdes_obj->rx_advanced_params_set) == 0) { al_err("rx_advanced_params_set is not supported for this serdes group\n"); @@ -583,7 +583,7 @@ al_eth_rx_equal_run(struct al_eth_lm_context *lm_context) int best_score = -1; int test_score = -1; - rx_params.override = FALSE; + rx_params.override = AL_FALSE; lm_context->serdes_obj->rx_advanced_params_set(lm_context->serdes_obj, lm_context->lane, &rx_params); @@ -647,7 +647,7 @@ al_eth_rx_equal_run(struct al_eth_lm_context *lm_context) } rx_params.precal_code_sel = 0; - rx_params.override = TRUE; + rx_params.override = AL_TRUE; lm_context->serdes_obj->rx_advanced_params_set( lm_context->serdes_obj, lm_context->lane, @@ -848,7 +848,7 @@ config_error: return rc; } -static al_bool al_eth_lm_retimer_ds25_signal_detect(struct al_eth_lm_context *lm_context, +static bool al_eth_lm_retimer_ds25_signal_detect(struct al_eth_lm_context *lm_context, uint32_t channel) { int rc = 0; @@ -868,17 +868,17 @@ static al_bool al_eth_lm_retimer_ds25_signal_detect(struct al_eth_lm_context *lm goto config_error; if (reg & LM_DS25_SIGNAL_DETECT_MASK) - return TRUE; + return true; - return FALSE; + return false; config_error: al_err("%s: failed to access to the retimer\n", __func__); - return FALSE; + return false; } -static al_bool al_eth_lm_retimer_ds25_cdr_lock(struct al_eth_lm_context *lm_context, +static bool al_eth_lm_retimer_ds25_cdr_lock(struct al_eth_lm_context *lm_context, uint32_t channel) { int rc = 0; @@ -898,23 +898,23 @@ static al_bool al_eth_lm_retimer_ds25_cdr_lock(struct al_eth_lm_context *lm_cont goto config_error; if (reg & LM_DS25_CDR_LOCK_MASK) - return TRUE; + return true; - return FALSE; + return false; config_error: al_err("%s: failed to access to the retimer\n", __func__); - return FALSE; + return false; } -static boolean_t al_eth_lm_wait_for_lock(struct al_eth_lm_context *lm_context, +static bool al_eth_lm_wait_for_lock(struct al_eth_lm_context *lm_context, uint32_t channel) { uint32_t timeout = AL_ETH_LM_RETIMER_WAIT_FOR_LOCK; - al_bool lock = AL_FALSE; + bool lock = false; - while ((timeout > 0) && (lock == FALSE)) { + while ((timeout > 0) && (!lock)) { al_msleep(10); timeout -= 10; @@ -930,16 +930,16 @@ static boolean_t al_eth_lm_wait_for_lock(struct al_eth_lm_context *lm_context, static void al_eth_lm_retimer_signal_lock_check(struct al_eth_lm_context *lm_context, uint32_t channel, - boolean_t *ready) + bool *ready) { - al_bool signal_detect = TRUE; - al_bool cdr_lock = TRUE; + bool signal_detect = true; + bool cdr_lock = true; if (retimer[lm_context->retimer_type].signal_detect) { if (!retimer[lm_context->retimer_type].signal_detect(lm_context, channel)) { lm_debug("no signal detected on retimer channel %d\n", channel); - signal_detect = AL_FALSE; + signal_detect = false; } else { if (retimer[lm_context->retimer_type].cdr_lock) { cdr_lock = retimer[lm_context->retimer_type].cdr_lock( @@ -961,13 +961,13 @@ static void al_eth_lm_retimer_signal_lock_check(struct al_eth_lm_context *lm_con al_info("%s: (channel %d) signal %d cdr lock %d\n", __func__, channel, signal_detect, (signal_detect) ? cdr_lock : 0); - *ready = ((cdr_lock == TRUE) && (signal_detect == TRUE)); + *ready = (cdr_lock && signal_detect); } static int al_eth_lm_retimer_ds25_full_config(struct al_eth_lm_context *lm_context) { int rc = 0; - al_bool ready; + bool ready; struct retimer_config_reg *config_tx; uint32_t config_tx_size; struct retimer_config_reg *config_rx; @@ -1006,7 +1006,7 @@ static int al_eth_lm_retimer_ds25_full_config(struct al_eth_lm_context *lm_conte if (lm_context->serdes_obj->type_get() == AL_SRDS_TYPE_25G) { lm_debug("%s: serdes 25G - perform tx and rx gearbox reset\n", __func__); - al_eth_gearbox_reset(lm_context->adapter, TRUE, TRUE); + al_eth_gearbox_reset(lm_context->adapter, AL_TRUE, AL_TRUE); DELAY(AL_ETH_LM_GEARBOX_RESET_DELAY); } @@ -1025,7 +1025,7 @@ static int al_eth_lm_retimer_ds25_full_config(struct al_eth_lm_context *lm_conte static int al_eth_lm_retimer_25g_rx_adaptation(struct al_eth_lm_context *lm_context) { int rc = 0; - al_bool ready; + bool ready; al_eth_lm_retimer_signal_lock_check(lm_context, lm_context->retimer_channel, &ready); @@ -1041,7 +1041,7 @@ static int al_eth_lm_retimer_25g_rx_adaptation(struct al_eth_lm_context *lm_cont return 0; } -static int al_eth_lm_check_for_link(struct al_eth_lm_context *lm_context, boolean_t *link_up) +static int al_eth_lm_check_for_link(struct al_eth_lm_context *lm_context, bool *link_up) { struct al_eth_link_status status; int ret = 0; @@ -1053,7 +1053,7 @@ static int al_eth_lm_check_for_link(struct al_eth_lm_context *lm_context, boolea lm_debug("%s: >>>> Link state DOWN ==> UP\n", __func__); al_eth_led_set(lm_context->adapter, AL_TRUE); lm_context->link_state = AL_ETH_LM_LINK_UP; - *link_up = AL_TRUE; + *link_up = true; return 0; } else if (status.local_fault) { @@ -1070,7 +1070,7 @@ static int al_eth_lm_check_for_link(struct al_eth_lm_context *lm_context, boolea ret = 0; } - *link_up = AL_FALSE; + *link_up = false; return ret; } @@ -1107,10 +1107,10 @@ al_eth_lm_init(struct al_eth_lm_context *lm_context, lm_context->get_random_byte = params->get_random_byte; /* eeprom_read must be provided if sfp_detection is true */ - al_assert((lm_context->sfp_detection == FALSE) || + al_assert((lm_context->sfp_detection == false) || (lm_context->i2c_read != NULL)); - al_assert((lm_context->retimer_exist == FALSE) || + al_assert((lm_context->retimer_exist == false) || (lm_context->i2c_write != NULL)); lm_context->local_adv.selector_field = 1; @@ -1122,8 +1122,8 @@ al_eth_lm_init(struct al_eth_lm_context *lm_context, lm_context->local_adv.fec_capability = params->kr_fec_enable; lm_context->mode = AL_ETH_LM_MODE_DISCONNECTED; - lm_context->serdes_tx_params_valid = FALSE; - lm_context->serdes_rx_params_valid = FALSE; + lm_context->serdes_tx_params_valid = false; + lm_context->serdes_rx_params_valid = false; lm_context->rx_param_dirty = 1; lm_context->tx_param_dirty = 1; @@ -1138,7 +1138,7 @@ al_eth_lm_init(struct al_eth_lm_context *lm_context, lm_context->led_config = params->led_config; - lm_context->retimer_configured = FALSE; + lm_context->retimer_configured = false; lm_context->link_state = AL_ETH_LM_LINK_DOWN; @@ -1147,7 +1147,7 @@ al_eth_lm_init(struct al_eth_lm_context *lm_context, int al_eth_lm_link_detection(struct al_eth_lm_context *lm_context, - boolean_t *link_fault, enum al_eth_lm_link_mode *old_mode, + bool *link_fault, enum al_eth_lm_link_mode *old_mode, enum al_eth_lm_link_mode *new_mode) { int err; @@ -1163,14 +1163,14 @@ al_eth_lm_link_detection(struct al_eth_lm_context *lm_context, * if the link wasn't up. */ if (lm_context->lm_pause != NULL) { - boolean_t lm_pause = lm_context->lm_pause(lm_context->i2c_context); - if (lm_pause == TRUE) { + bool lm_pause = lm_context->lm_pause(lm_context->i2c_context); + if (lm_pause == true) { *new_mode = AL_ETH_LM_MODE_DISCONNECTED; if (link_fault != NULL) { if (lm_context->link_state == AL_ETH_LM_LINK_UP) - *link_fault = FALSE; + *link_fault = false; else - *link_fault = TRUE; + *link_fault = true; } return 0; @@ -1181,7 +1181,7 @@ al_eth_lm_link_detection(struct al_eth_lm_context *lm_context, *new_mode = lm_context->mode; if (link_fault != NULL) - *link_fault = TRUE; + *link_fault = true; switch (lm_context->link_state) { case AL_ETH_LM_LINK_UP: @@ -1189,9 +1189,9 @@ al_eth_lm_link_detection(struct al_eth_lm_context *lm_context, if (status.link_up) { if (link_fault != NULL) - *link_fault = FALSE; + *link_fault = false; - al_eth_led_set(lm_context->adapter, TRUE); + al_eth_led_set(lm_context->adapter, AL_TRUE); return (0); } else if (status.local_fault) { @@ -1211,7 +1211,7 @@ al_eth_lm_link_detection(struct al_eth_lm_context *lm_context, lm_context->link_state = AL_ETH_LM_LINK_DOWN; break; - } else if (status.remote_fault == FALSE) { + } else if (status.remote_fault == AL_FALSE) { lm_debug("%s: >>>> Link state DOWN_RF ==> UP\n", __func__); lm_context->link_state = AL_ETH_LM_LINK_UP; } @@ -1221,7 +1221,7 @@ al_eth_lm_link_detection(struct al_eth_lm_context *lm_context, break; }; - al_eth_led_set(lm_context->adapter, FALSE); + al_eth_led_set(lm_context->adapter, AL_FALSE); if (lm_context->sfp_detection) { err = al_eth_module_detect(lm_context, new_mode); @@ -1244,7 +1244,7 @@ al_eth_lm_link_detection(struct al_eth_lm_context *lm_context, lm_context->rx_param_dirty = 1; lm_context->tx_param_dirty = 1; - lm_context->new_port = TRUE; + lm_context->new_port = true; if ((*new_mode != AL_ETH_LM_MODE_DISCONNECTED) && (lm_context->led_config)) { struct al_eth_lm_led_config_data data = {0}; @@ -1272,19 +1272,19 @@ al_eth_lm_link_detection(struct al_eth_lm_context *lm_context, } int -al_eth_lm_link_establish(struct al_eth_lm_context *lm_context, boolean_t *link_up) +al_eth_lm_link_establish(struct al_eth_lm_context *lm_context, bool *link_up) { - boolean_t signal_detected; + bool signal_detected; int ret = 0; switch (lm_context->link_state) { case AL_ETH_LM_LINK_UP: - *link_up = TRUE; + *link_up = true; lm_debug("%s: return link up\n", __func__); return (0); case AL_ETH_LM_LINK_DOWN_RF: - *link_up = FALSE; + *link_up = false; lm_debug("%s: return link down (DOWN_RF)\n", __func__); return (0); @@ -1297,9 +1297,9 @@ al_eth_lm_link_establish(struct al_eth_lm_context *lm_context, boolean_t *link_u * finished. in this case link will not be established until LM will be enable again. */ if (lm_context->lm_pause) { - boolean_t lm_pause = lm_context->lm_pause(lm_context->i2c_context); - if (lm_pause == TRUE) { - *link_up = FALSE; + bool lm_pause = lm_context->lm_pause(lm_context->i2c_context); + if (lm_pause == true) { + *link_up = false; return (0); } @@ -1316,11 +1316,11 @@ al_eth_lm_link_establish(struct al_eth_lm_context *lm_context, boolean_t *link_u if (retimer[lm_context->retimer_type].config(lm_context)) { al_info("%s: failed to configure the retimer\n", __func__); - *link_up = FALSE; + *link_up = false; return (1); } - lm_context->new_port = FALSE; + lm_context->new_port = false; DELAY(1000); } @@ -1331,7 +1331,7 @@ al_eth_lm_link_establish(struct al_eth_lm_context *lm_context, boolean_t *link_u if (ret != 0) { lm_debug("retimer rx is not ready\n"); - *link_up = FALSE; + *link_up = false; return (0); } @@ -1342,16 +1342,16 @@ al_eth_lm_link_establish(struct al_eth_lm_context *lm_context, boolean_t *link_u lm_context->serdes_obj, lm_context->lane); - if (signal_detected == FALSE) { + if (signal_detected == false) { /* if no signal detected there is nothing to do */ lm_debug("serdes signal is down\n"); - *link_up = AL_FALSE; + *link_up = false; return 0; } if (lm_context->serdes_obj->type_get() == AL_SRDS_TYPE_25G) { lm_debug("%s: serdes 25G - perform rx gearbox reset\n", __func__); - al_eth_gearbox_reset(lm_context->adapter, FALSE, TRUE); + al_eth_gearbox_reset(lm_context->adapter, AL_FALSE, AL_TRUE); DELAY(AL_ETH_LM_GEARBOX_RESET_DELAY); } @@ -1400,11 +1400,11 @@ al_eth_lm_link_establish(struct al_eth_lm_context *lm_context, boolean_t *link_u lm_context->serdes_obj->pma_hard_reset_lane( lm_context->serdes_obj, lm_context->lane, - TRUE); + AL_TRUE); lm_context->serdes_obj->pma_hard_reset_lane( lm_context->serdes_obj, lm_context->lane, - FALSE); + AL_FALSE); lm_context->link_training_failures = 0; } } @@ -1437,7 +1437,7 @@ al_eth_lm_link_establish(struct al_eth_lm_context *lm_context, boolean_t *link_u return (0); } - *link_up = FALSE; + *link_up = false; return (1); } @@ -1450,13 +1450,13 @@ al_eth_lm_static_parameters_override(struct al_eth_lm_context *lm_context, if (tx_params != NULL) { lm_context->tx_params_override = *tx_params; lm_context->tx_param_dirty = 1; - lm_context->serdes_tx_params_valid = TRUE; + lm_context->serdes_tx_params_valid = true; } if (rx_params != NULL) { lm_context->rx_params_override = *rx_params; lm_context->rx_param_dirty = 1; - lm_context->serdes_rx_params_valid = TRUE; + lm_context->serdes_rx_params_valid = true; } return (0); @@ -1464,13 +1464,13 @@ al_eth_lm_static_parameters_override(struct al_eth_lm_context *lm_context, int al_eth_lm_static_parameters_override_disable(struct al_eth_lm_context *lm_context, - boolean_t tx_params, boolean_t rx_params) + bool tx_params, bool rx_params) { - if (tx_params != 0) - lm_context->serdes_tx_params_valid = FALSE; - if (rx_params != 0) - lm_context->serdes_tx_params_valid = FALSE; + if (tx_params) + lm_context->serdes_tx_params_valid = false; + if (rx_params) + lm_context->serdes_tx_params_valid = false; return (0); } @@ -1526,7 +1526,7 @@ al_eth_lm_mode_convert_to_str(enum al_eth_lm_link_mode val) void al_eth_lm_debug_mode_set(struct al_eth_lm_context *lm_context, - boolean_t enable) + bool enable) { lm_context->debug = enable; diff --git a/sys/dev/al_eth/al_init_eth_lm.h b/sys/dev/al_eth/al_init_eth_lm.h index 9e2563f4f46f..15becd4c3679 100644 --- a/sys/dev/al_eth/al_init_eth_lm.h +++ b/sys/dev/al_eth/al_init_eth_lm.h @@ -140,11 +140,11 @@ struct al_eth_lm_context { uint32_t link_training_failures; - boolean_t tx_param_dirty; - boolean_t serdes_tx_params_valid; + bool tx_param_dirty; + bool serdes_tx_params_valid; struct al_serdes_adv_tx_params tx_params_override; - boolean_t rx_param_dirty; - boolean_t serdes_rx_params_valid; + bool rx_param_dirty; + bool serdes_rx_params_valid; struct al_serdes_adv_rx_params rx_params_override; struct al_eth_an_adv local_adv; @@ -152,20 +152,20 @@ struct al_eth_lm_context { enum al_eth_lm_link_mode mode; uint8_t da_len; - boolean_t debug; + bool debug; /* configurations */ - boolean_t sfp_detection; + bool sfp_detection; uint8_t sfp_bus_id; uint8_t sfp_i2c_addr; enum al_eth_lm_link_mode default_mode; uint8_t default_dac_len; - boolean_t link_training; - boolean_t rx_equal; - boolean_t static_values; + bool link_training; + bool rx_equal; + bool static_values; - boolean_t retimer_exist; + bool retimer_exist; enum al_eth_retimer_type retimer_type; uint8_t retimer_bus_id; uint8_t retimer_i2c_addr; @@ -183,16 +183,16 @@ struct al_eth_lm_context { uint32_t gpio_present; enum al_eth_retimer_channel retimer_tx_channel; - boolean_t retimer_configured; + bool retimer_configured; enum al_eth_lm_max_speed max_speed; - boolean_t sfp_detect_force_mode; + bool sfp_detect_force_mode; enum al_eth_lm_link_state link_state; - boolean_t new_port; + bool new_port; - boolean_t (*lm_pause)(void *handle); + bool (*lm_pause)(void *handle); void (*led_config)(void *handle, struct al_eth_lm_led_config_data *data); }; @@ -209,7 +209,7 @@ struct al_eth_lm_init_params { * set to true to perform sfp detection if the link is down. * when set to true, eeprom_read below should NOT be NULL. */ - boolean_t sfp_detection; + bool sfp_detection; /* i2c bus id of the SFP for this port */ uint8_t sfp_bus_id; /* i2c addr of the SFP for this port */ @@ -238,13 +238,13 @@ struct al_eth_lm_init_params { * - if rx_equal is set serdes equalization will be run to configure the rx parameters. * - if static_values is set, tx and rx values will be set based on static values. */ - boolean_t retimer_exist; - boolean_t link_training; - boolean_t rx_equal; - boolean_t static_values; + bool retimer_exist; + bool link_training; + bool rx_equal; + bool static_values; /* enable / disable fec capabilities in AN */ - boolean_t kr_fec_enable; + bool kr_fec_enable; /* * pointer to function that's read 1 byte from eeprom @@ -267,12 +267,12 @@ struct al_eth_lm_init_params { /* in case force mode is true - the default mode will be set regardless to * the SFP EEPROM content */ *** 45 LINES SKIPPED *** From nobody Thu May 4 19:34:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC3sq54Xqz49SB8; Thu, 4 May 2023 19:34:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QC3sq4gJpz4PpY; Thu, 4 May 2023 19:34:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zwugFHYNvaaymoP3Mg7Bl/qKt4Mq6ul87bfi9rUuWHQ=; b=AoNr7EFx+hrP/zQs5HwwvHgPYQY7+tmppJt6lG0pRE/cNWKL12cVmsIhstiGoYSWi/gSDN 8c+XJcH0LZWRLeFNxSmILYgJiVh6uzdGzOoLC8Hx58s7geNKd/8mJV3SksNiWihJJ2EqsO kcv1kpdThYAKSY/32hLWcbqYrpNSWv4ugcj1WZQr6FafwNMnjf4rHFT6AEl84JaV3PIc4X uwx2i1H41K2rQXro+yUwt4sL9gQWtUTwiDQe6udrsfRcG7wMDRqgw670DnJnsitzCla+pK rJfRyhfKbc0gTfQZgO061M/lh1KyAUQfa7Q0brqXxidxygPvqnasEOqiD8UEHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zwugFHYNvaaymoP3Mg7Bl/qKt4Mq6ul87bfi9rUuWHQ=; b=McUdzprWgLtaJ6ALVeMrMNAOuzbSb/V5XPez+eCoFl9JOhnYDXZqa9j15V9bywDNl00UEo AFZFn1Vt/e21VbRTJANRN3lZ5MvLXlJ88HYCunAeripZWDxopQxIDhPISXE2EdzLVtO7HS gJxoSlMmdrRfJpib7cW9koDgcGsu7AW1lNvrg5idZvxI17e4Cg2mkck/Z/TMl7ugBmzvYk jC6A8qLT7MfVVovfxDVPfcIY4bhmaMmfRAFophacjytaBuq1Wf+HTPOxqRb0koJawCldnD V7UNtI8t7gTN99iOmNf2EGb40fyIjb0gRw87KLN4fSlHJdQbW8ZLE+1+DkQVdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683228863; a=rsa-sha256; cv=none; b=lejF3N+E8/R16f/a/rLsfhB7zF7Wb0ytH+32jLKYCV4S49c+yaSv0CvymenyAzli6mTKR9 M0ZeEblIpUcAQ2Uadk6G29tggTZGxBOzMqG/mYBkVYWilDyAK19cJd9wFdaY/4i01AoPc5 9mVmiXyLzXikvlhMppPlOzacyNMDJL35J8NnwsTLudEMZMeeG5lxelsZAvRox3wHcnMI01 BsfwiQlHe50p2ztlln+4h+sYp1cAwo+WwUaKav27Z4j8tl7lPG6/BZRW/fQ2QrNdVqEUZD n3Q2IVux6CRsXbrbTIanFNZ6WaYBhgjzCQdfj3nC0XsbNEwY1qITVoZ13wg/eA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC3sq3W8vzPsV; Thu, 4 May 2023 19:34:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344JYNWm049385; Thu, 4 May 2023 19:34:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344JYNJO049384; Thu, 4 May 2023 19:34:23 GMT (envelope-from git) Date: Thu, 4 May 2023 19:34:23 GMT Message-Id: <202305041934.344JYNJO049384@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: 1efae8a24ffd - main - dpaa2: Replace boolean_t with bool. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1efae8a24ffd08e78decc4a95f134db620dc41ce Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1efae8a24ffd08e78decc4a95f134db620dc41ce commit 1efae8a24ffd08e78decc4a95f134db620dc41ce Author: John Baldwin AuthorDate: 2023-05-04 19:32:57 +0000 Commit: John Baldwin CommitDate: 2023-05-04 19:32:57 +0000 dpaa2: Replace boolean_t with bool. This was already using true/false rather than TRUE/FALSE. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D39924 --- sys/dev/dpaa2/dpaa2_ni.c | 2 +- sys/dev/dpaa2/dpaa2_ni.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/dpaa2/dpaa2_ni.c b/sys/dev/dpaa2/dpaa2_ni.c index e5b0fe59d14d..d4e4de216736 100644 --- a/sys/dev/dpaa2/dpaa2_ni.c +++ b/sys/dev/dpaa2/dpaa2_ni.c @@ -2776,7 +2776,7 @@ dpaa2_ni_transmit(if_t ifp, struct mbuf *m) struct dpaa2_ni_channel *chan; struct dpaa2_ni_tx_ring *tx; uint32_t fqid; - boolean_t found = false; + bool found = false; int chan_n = 0; if (__predict_false(!(if_getdrvflags(ifp) & IFF_DRV_RUNNING))) diff --git a/sys/dev/dpaa2/dpaa2_ni.h b/sys/dev/dpaa2/dpaa2_ni.h index 03528420d5d7..00215fdcefe5 100644 --- a/sys/dev/dpaa2/dpaa2_ni.h +++ b/sys/dev/dpaa2/dpaa2_ni.h @@ -552,7 +552,7 @@ struct dpaa2_ni_softc { struct mtx lock; device_t miibus; struct mii_data *mii; - boolean_t fixed_link; + bool fixed_link; struct ifmedia fixed_ifmedia; int media_status; From nobody Thu May 4 19:34:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC3ss0QS3z49SKQ; Thu, 4 May 2023 19:34: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 4QC3sr5K02z4Phs; Thu, 4 May 2023 19:34:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PVjdRZy2V8ZcSsRJWfQYEa0xM6Nvlct3KPVwboplec4=; b=q7DcKtNZXOft00YSi+nMPy9F1TvcmcERP7OGZT4qVVdzblMS3pWkc70p3Ms73iPseDby6A pwOpMEXYSwZrGCk8zdYlOsT1hwA0WfzczzNS9NtNhahM6ujUittVqF5NOjJqbGlKEmSS1k LK4tUgUcs+e/LU9dKuwBDqQ2abZxxpetj/roTVPlhK/paCK0+Cv1DR5DHyknk/WgRbDGZi OYYyjMpPZZksD6bldnNv4VipRSYgGlsWFGam5LzjENfSPKrA8NIIcr1LQupfIj8CvrtU8H kwe6Af6I9Bwg3apbTzE2t+HAAZC3ho35Ah0Hl6IuISBpN8ea8K1VHppRutHDAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PVjdRZy2V8ZcSsRJWfQYEa0xM6Nvlct3KPVwboplec4=; b=u3f/XIZlcXspfatmEZpXQH10YLUsh8wfiGvhyBb2TrCKjIr9WlIGNJobQ0iRntUFQeJ8zX nzAdOOoH1ZyPW+G8jlT+x2NTz2gC7yWWv7zsKbxmVaxzTBrHQ/YMkHG7dYKGIbxVjXMHRQ TlhjK1cjIdHJ7NkAPo49/RDoR8+f3tiqwZURbTOrUKX0fzcZJ/wdgAmDjxTnyOozJAOMoL Evevshq9ABlvsMelUF8k+PwDzNJQqNedbroruVgp7PLpQGJ9YPxJ7IsOHw7ps6AfnhnQcG H38ESrI4Vz4bOSurcHhnqAho63I18suOh+omRT96QhS4v7vbG2XEpsxLf4luOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683228864; a=rsa-sha256; cv=none; b=JawzurstNgBqgp6J0uabyyIfzQFdBRUhln68sTqBq2rFdalrIgJ2VrgGRS/2uTLsnmTGb7 BlSFfjp6HGMNl8eLwpcn/LYYiZ3v2FJx7x3Ab9OQT2krsZgvL86fLkLTxOZMsrlJEaXxjg HZYlAfGHWksKjQ8FUawvw3Jf1XFM0YR2FGPT4DzxmU8zzTiDm/NnM5OArtPmNDavtLZSNr 9NAc9YV4hPzSg9+PTQESKq5SDagXI2C8BXoM1mGYQHJFSw8/jiKBLE/cL+w434DjNwGjDx 0LAiXt6qX5bxhGtO5BpeNm5rlCBW1PKZIiAMbqDi3Dq0pm7CAOPpm9cTXGIDAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC3sr4PvKzPwp; Thu, 4 May 2023 19:34:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344JYOvO049407; Thu, 4 May 2023 19:34:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344JYOWm049406; Thu, 4 May 2023 19:34:24 GMT (envelope-from git) Date: Thu, 4 May 2023 19:34:24 GMT Message-Id: <202305041934.344JYOWm049406@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: 2fd903276ddb - main - dwc(4): Use bool rather than boolean_t. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2fd903276ddb5159dcea93f16e0bfe9a1fc9e491 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2fd903276ddb5159dcea93f16e0bfe9a1fc9e491 commit 2fd903276ddb5159dcea93f16e0bfe9a1fc9e491 Author: John Baldwin AuthorDate: 2023-05-04 19:33:20 +0000 Commit: John Baldwin CommitDate: 2023-05-04 19:33:20 +0000 dwc(4): Use bool rather than boolean_t. This was already using true/false rather than TRUE/FALSE. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D39925 --- sys/dev/dwc/if_dwcvar.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/dwc/if_dwcvar.h b/sys/dev/dwc/if_dwcvar.h index f4193b8222c9..96bcffc45a4d 100644 --- a/sys/dev/dwc/if_dwcvar.h +++ b/sys/dev/dwc/if_dwcvar.h @@ -70,9 +70,9 @@ struct dwc_softc { struct mtx mtx; void * intr_cookie; struct callout dwc_callout; - boolean_t link_is_up; - boolean_t is_attached; - boolean_t is_detaching; + bool link_is_up; + bool is_attached; + bool is_detaching; int tx_watchdog_count; int stats_harvest_count; int phy_mode; From nobody Thu May 4 19:34:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC3st0b3rz49SBD; Thu, 4 May 2023 19:34:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QC3ss65dVz4Pq6; Thu, 4 May 2023 19:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8EYAsSb7joJa/uihSeQ8gyB8vk/7j/5pfWkZJ1l1riQ=; b=TpSDDQtubfUcTxHbfmP5yDkOyQVOK7oXui/u7ix6c2j3aSafl1oGQgxv6SZT3UN0TTg66Q NGvQXzYUsNgxJ67i7eFm3QrVl51sVjD3e2hS4GXn1AO4wpbc4EOXRu6UHOY5xtfp5+XPpc 968YweeZblcObRyAJCAiVg59A8c/Q8WpGl8q+oZNxCdqR/qACfTOM3w9whYgYJOWiMHYBn bwX7vhtHOttYhJXpd2NLwcFKPBNFxt3mH1jm4LMT1gDfMTwRMkuIUPcjNb4wOcXQoQv4SR sumV+3xwrdLiaZrco2LfcPZnx75T2yK7wuM0JN3/g1UovPufHGZPLv4j9TAFHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8EYAsSb7joJa/uihSeQ8gyB8vk/7j/5pfWkZJ1l1riQ=; b=cHvoKSUEaMwZeSEOqQ5Tyut1aOkYzsVNZKue+gg16KPkyA7wEEppHKFzkufeai86X5cBoY 1rVvUXmIGeefguC/BffSXSIDdaBGAvdz0TsclKuCxR1ubpdzqYkuhwrMOeP7wi2dJrqQ70 k2kdkG2hpKvlYjtTgz3bm6Hgw4QsO90Y1Q25Tqf8WgD+N2DMQAuO1+uQcgHRrhexixwhCo 4l7Smn2NECs5ZoWcuCz49Vjokuj9y1Fs6o+R8r1NeHycuAPve4n70FXbxKGGF0TKP5fWZg fIsA1GBUoOfr7BaN0fObjua+XZldPcSZkmHdQhcdh7sxstr4Xl+RSeDFH2e2KQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683228865; a=rsa-sha256; cv=none; b=Ml6BNp4xTg1glazScXrHOL6f/rieo7GDqd3Qlhs8pzK5YKPrJMHb+KawawDChqeSNzY5zw rczudrtJG5wAYCRo0LdoYk6oysdu2dsydkBKtIV4YvYocRNh5ABr1keic9+1l41KvJjJ1d kBUdQItZkAkesflpMDY79/vuHLMWpjakyoxJ8r/hVNpQ37sZeZo/ebNykVZVkM+LEvt4z5 IsZ/H/xMMPCZQ4tsAriSlczWQ8Iqn0rt8cs+B2tghk4brTZ2oS7TpfxUCy7BGPU8LbqFKs MrnligKf+J8vCEEHuVS+4R0wGoZziMemtA41iB2UL6ULInwjdK1iSuKKFktoig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC3ss5B4JzPlW; Thu, 4 May 2023 19:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344JYPqo049426; Thu, 4 May 2023 19:34:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344JYP4p049425; Thu, 4 May 2023 19:34:25 GMT (envelope-from git) Date: Thu, 4 May 2023 19:34:25 GMT Message-Id: <202305041934.344JYP4p049425@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: afdb42987ca8 - main - ofw_cpu_early_foreach: Change callback to return bool instead of boolean_t. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: afdb42987ca82869eeaecf6dc25c2b6fb7b8370e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=afdb42987ca82869eeaecf6dc25c2b6fb7b8370e commit afdb42987ca82869eeaecf6dc25c2b6fb7b8370e Author: John Baldwin AuthorDate: 2023-05-04 19:33:39 +0000 Commit: John Baldwin CommitDate: 2023-05-04 19:33:39 +0000 ofw_cpu_early_foreach: Change callback to return bool instead of boolean_t. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D39926 --- sys/arm/annapurna/alpine/alpine_machdep_mp.c | 4 ++-- sys/arm/qemu/virt_mp.c | 2 +- sys/arm/qualcomm/ipq4018_mp.c | 2 +- sys/arm/qualcomm/qcom_cpu_kpssv2.h | 2 +- sys/arm/rockchip/rk32xx_mp.c | 2 +- sys/arm64/arm64/mp_machdep.c | 12 ++++++------ sys/dev/fdt/fdt_arm_platform.c | 2 +- sys/dev/ofw/ofw_cpu.h | 2 +- sys/riscv/riscv/mp_machdep.c | 18 +++++++++--------- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/sys/arm/annapurna/alpine/alpine_machdep_mp.c b/sys/arm/annapurna/alpine/alpine_machdep_mp.c index 7e6ea3479570..2a341540104d 100644 --- a/sys/arm/annapurna/alpine/alpine_machdep_mp.c +++ b/sys/arm/annapurna/alpine/alpine_machdep_mp.c @@ -80,9 +80,9 @@ extern void mpentry(void); static int platform_mp_get_core_cnt(void); static int alpine_get_cpu_resume_base(u_long *pbase, u_long *psize); static int alpine_get_nb_base(u_long *pbase, u_long *psize); -static boolean_t alpine_validate_cpu(u_int, phandle_t, u_int, pcell_t *); +static bool alpine_validate_cpu(u_int, phandle_t, u_int, pcell_t *); -static boolean_t +static bool alpine_validate_cpu(u_int id, phandle_t child, u_int addr_cell, pcell_t *reg) { return ofw_bus_node_is_compatible(child, "arm,cortex-a15"); diff --git a/sys/arm/qemu/virt_mp.c b/sys/arm/qemu/virt_mp.c index 12a957caa897..9b7c1c0bd23d 100644 --- a/sys/arm/qemu/virt_mp.c +++ b/sys/arm/qemu/virt_mp.c @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); static int running_cpus; -static boolean_t +static bool virt_start_ap(u_int id, phandle_t node, u_int addr_cells, pcell_t *reg) { int err; diff --git a/sys/arm/qualcomm/ipq4018_mp.c b/sys/arm/qualcomm/ipq4018_mp.c index a7ebb7d7d6c8..f8de5d6a9ccd 100644 --- a/sys/arm/qualcomm/ipq4018_mp.c +++ b/sys/arm/qualcomm/ipq4018_mp.c @@ -75,7 +75,7 @@ ipq4018_mp_setmaxid(platform_t plat) printf("SMP: ncpu=%d\n", ncpu); } -static boolean_t +static bool ipq4018_start_ap(u_int id, phandle_t node, u_int addr_cells, pcell_t *arg) { diff --git a/sys/arm/qualcomm/qcom_cpu_kpssv2.h b/sys/arm/qualcomm/qcom_cpu_kpssv2.h index 18e4affc208e..d84158088120 100644 --- a/sys/arm/qualcomm/qcom_cpu_kpssv2.h +++ b/sys/arm/qualcomm/qcom_cpu_kpssv2.h @@ -30,6 +30,6 @@ #ifndef __QCOM_CPU_KPSSV2_H__ #define __QCOM_CPU_KPSSV2_H__ -extern boolean_t qcom_cpu_kpssv2_regulator_start(u_int id, phandle_t node); +extern bool qcom_cpu_kpssv2_regulator_start(u_int id, phandle_t node); #endif /* __QCOM_CPU_KPSSV2_H__ */ diff --git a/sys/arm/rockchip/rk32xx_mp.c b/sys/arm/rockchip/rk32xx_mp.c index 089db173a0e9..fdb70cb0a6cd 100644 --- a/sys/arm/rockchip/rk32xx_mp.c +++ b/sys/arm/rockchip/rk32xx_mp.c @@ -119,7 +119,7 @@ rk32xx_mp_start_pmu(uint32_t mask) bus_space_unmap(fdtbus_bs_tag, pmu, PMU_SIZE); } -static boolean_t +static bool rk32xx_start_ap(u_int id, phandle_t node, u_int addr_cells, pcell_t *reg) { int rv; diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c index 5e4c035586a5..9a4997358f8a 100644 --- a/sys/arm64/arm64/mp_machdep.c +++ b/sys/arm64/arm64/mp_machdep.c @@ -687,7 +687,7 @@ populate_release_addr(phandle_t node, vm_paddr_t *release_addr) *release_addr = (((uintptr_t)buf[0] << 32) | buf[1]); } -static boolean_t +static bool start_cpu_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) { uint64_t target_cpu; @@ -716,11 +716,11 @@ start_cpu_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) if (!psci_present && cpuid != 0) { if (OF_getprop_alloc(node, "enable-method", (void **)&enable_method) <= 0) - return (FALSE); + return (false); if (strcmp(enable_method, "spin-table") != 0) { OF_prop_free(enable_method); - return (FALSE); + return (false); } OF_prop_free(enable_method); @@ -728,12 +728,12 @@ start_cpu_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) if (release_addr == 0) { printf("Failed to fetch release address for CPU %u", cpuid); - return (FALSE); + return (false); } } if (!start_cpu(cpuid, target_cpu, 0, release_addr)) - return (FALSE); + return (false); /* * Don't increment for the boot CPU, its CPU ID is reserved. @@ -748,7 +748,7 @@ start_cpu_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) cpuid_to_pcpu[cpuid]->pc_domain = domain; if (domain < MAXMEMDOM) CPU_SET(cpuid, &cpuset_domain[domain]); - return (TRUE); + return (true); } static void cpu_init_fdt(void) diff --git a/sys/dev/fdt/fdt_arm_platform.c b/sys/dev/fdt/fdt_arm_platform.c index bc761f6c231a..0b36a10138bf 100644 --- a/sys/dev/fdt/fdt_arm_platform.c +++ b/sys/dev/fdt/fdt_arm_platform.c @@ -73,7 +73,7 @@ fdt_platform_probe(platform_t plat) } #if defined(SMP) -static boolean_t +static bool fdt_platform_maxid(u_int id, phandle_t node, u_int addr_cells, pcell_t *reg) { diff --git a/sys/dev/ofw/ofw_cpu.h b/sys/dev/ofw/ofw_cpu.h index d96991946237..1c6d7e766040 100644 --- a/sys/dev/ofw/ofw_cpu.h +++ b/sys/dev/ofw/ofw_cpu.h @@ -31,7 +31,7 @@ #ifndef _DEV_OFW_OFW_CPU_H_ #define _DEV_OFW_OFW_CPU_H_ -typedef boolean_t (*ofw_cpu_foreach_cb)(u_int, phandle_t, u_int, pcell_t *); +typedef bool (*ofw_cpu_foreach_cb)(u_int, phandle_t, u_int, pcell_t *); int ofw_cpu_early_foreach(ofw_cpu_foreach_cb, boolean_t); #endif /* _DEV_OFW_OFW_CPU_H_ */ diff --git a/sys/riscv/riscv/mp_machdep.c b/sys/riscv/riscv/mp_machdep.c index e7e862d3772b..799f07036c00 100644 --- a/sys/riscv/riscv/mp_machdep.c +++ b/sys/riscv/riscv/mp_machdep.c @@ -403,7 +403,7 @@ cpu_mp_probe(void) } #ifdef FDT -static boolean_t +static bool cpu_check_mmu(u_int id __unused, phandle_t node, u_int addr_size __unused, pcell_t *reg __unused) { @@ -412,12 +412,12 @@ cpu_check_mmu(u_int id __unused, phandle_t node, u_int addr_size __unused, /* Check if this hart supports MMU. */ if (OF_getprop(node, "mmu-type", (void *)type, sizeof(type)) == -1 || strncmp(type, "riscv,none", 10) == 0) - return (0); + return (false); - return (1); + return (true); } -static boolean_t +static bool cpu_init_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) { struct pcpu *pcpup; @@ -428,7 +428,7 @@ cpu_init_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) int error; if (!cpu_check_mmu(id, node, addr_size, reg)) - return (0); + return (false); KASSERT(id < MAXCPU, ("Too many CPUs")); @@ -449,7 +449,7 @@ cpu_init_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) /* We are already running on this cpu */ if (hart == boot_hart) - return (1); + return (true); /* * Rotate the CPU IDs to put the boot CPU as CPU 0. @@ -462,7 +462,7 @@ cpu_init_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) /* Check if we are able to start this cpu */ if (cpuid > mp_maxid) - return (0); + return (false); /* * Depending on the SBI implementation, APs are waiting either in @@ -477,7 +477,7 @@ cpu_init_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) /* Send a warning to the user and continue. */ printf("AP %u (hart %lu) failed to start, error %d\n", cpuid, hart, error); - return (0); + return (false); } } @@ -503,7 +503,7 @@ cpu_init_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) CPU_SET(cpuid, &all_cpus); CPU_SET(hart, &all_harts); - return (1); + return (true); } #endif From nobody Thu May 4 19:34:26 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC3sv1rBFz49S8J; Thu, 4 May 2023 19:34:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QC3sv0Bhsz4Pll; Thu, 4 May 2023 19:34:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9AM3guibrDyAnZWW8hDvIJlQzfmQ1q2SGn2kpFfD18I=; b=KSapJPQBGuND4n283xVLvsE9cdvtO4jxxn32TXz4mF7ll5bSrcGeB7AuArVcFD5xuFFOpr JFVunzCnsdqYAgKo0BvKBwekMq8vF9gfWlxNMaigMdlP4ncFZU5NfEB22MPgplY9je3FuM IJIpCDdqrxzvk2oBi+HZg3NsVXzsa4aCjsHeH5dOt+iUGZ2eGrK6h4qE0lz5JLQ4rISbBy 0ecetHlhFj+YGrNgkW0Lfzq3hwA2x5iLg23XZigN7BGJWvK3JL3lUUUGFhqcXiBupdqLZH P+dc+ZVMfqVuAcfCf0a1O8RrwbfIrGSPnLDM5xgTYB52FOpVxoxpn2mb06mL9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683228867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9AM3guibrDyAnZWW8hDvIJlQzfmQ1q2SGn2kpFfD18I=; b=CqFYpl9JkFAQgDjcbgRG//LEdEX6qVucLv0OGD+CmpXOXdNb0qvNytO7hXBZhgGovJ3vWl Pr8aDEOcZYSBtKXf5G2bJ53fOmDF2IuWVvUeYLP6Os7IWNp5x/KW53VHIOmsOH5Synu12o 9l5FeKLjeUWke8hzdmKAOeg6NX40gZmAB7V/LWGa3Ki4Hfdth2C/kflN0Nhcb0ogJl7XRV UJobF5CdvzqOp6ZOOr3Ewg9Eddw3io+gezUlCV5h0oxKUaVAAsDrxcMSfa6ai5JtHhW529 zbkw0Avl+DR/7KEmmNlo3zh5HquUfyKzdHEJGvXE+asEzh8FdSOUXuW/zExU4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683228867; a=rsa-sha256; cv=none; b=vhj4wjKsVZ3ZReRsMrhOXWEKps9wDApF8LPIO0iKmiTdp6ILVLHgnxB3RHQoTNeclx+uv5 hZJdT1moDGr7DZrAGvn9wO0CO410x4501cHmm7DB0hqVNY20WDPbGweCsBKuXgeXpD4QOf QTTfvp9vqlQrWh7byrqwKDAdNsCIJQW38r7ZYMewqRKpfl7pchZZS5YQbqNMjscPBv0Msh GmMMIzX+6C+l6F/hK3kPdI5iwgB2q3eHBRrzGkcaSE49OxWsWe2P3QVLupgTy0jX2d2jKX xz0IM+K9a5ZkErt7Ni/YQdu1rn9SompxiURXxuy5Fb3s/mp15rt8iRm1KtlOXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC3st64xZzQ7y; Thu, 4 May 2023 19:34:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344JYQ8Z049445; Thu, 4 May 2023 19:34:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344JYQEJ049444; Thu, 4 May 2023 19:34:26 GMT (envelope-from git) Date: Thu, 4 May 2023 19:34:26 GMT Message-Id: <202305041934.344JYQEJ049444@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: 6cf4b46197ba - main - emac(4): Use bool rather than boolean_t. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6cf4b46197ba0e99342d72cd976e93b168e887ee Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6cf4b46197ba0e99342d72cd976e93b168e887ee commit 6cf4b46197ba0e99342d72cd976e93b168e887ee Author: John Baldwin AuthorDate: 2023-05-04 19:34:02 +0000 Commit: John Baldwin CommitDate: 2023-05-04 19:34:02 +0000 emac(4): Use bool rather than boolean_t. This was already using true/false rather than TRUE/FALSE. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D39927 --- sys/arm/allwinner/if_emac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/allwinner/if_emac.c b/sys/arm/allwinner/if_emac.c index 3db0c6e95bc0..4191f313a9d1 100644 --- a/sys/arm/allwinner/if_emac.c +++ b/sys/arm/allwinner/if_emac.c @@ -991,7 +991,7 @@ fail: return (error); } -static boolean_t +static bool emac_miibus_iowait(struct emac_softc *sc) { uint32_t timeout; From nobody Thu May 4 21:59:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC75X2RZgz49Zxm; Thu, 4 May 2023 21:59: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 4QC75X1wfbz3kMc; Thu, 4 May 2023 21:59:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683237584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tCaysB+CLVQg8Rd1aZl/wzpcHzTmuog3jtdwqAXN05k=; b=xSu9mFXO9BcR1Ulz8ByQB9XdmvmuCXtvwMCqSpzASJMznQzcifjLWw5y6Dn5Ulm7aN+9MJ iJPD9FjjasYFiczK9h46GD6RUwTR7ijYNLP0FHOWEdzdo78fPJ1dSl7sKqKUfZgW3FaCH8 ORlXwYgooOLS7K0b4w+RkOtEgOqp5ftZFZqe+iXeC0adpKtK3UlB9i9Jz+fE/35/2Fik/t YDV1le4Wo6h4QXa/Gpzy9FftLorZR6nyStueNujz6EcYQC5fx0LGORe+oXFr1CPXYILDjM WbLNGbKvLlHZ17Ge7cYezNvzA6pCe8NhWbcPX0VtZbNYCNs7THE/e+UVHBZTlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683237584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tCaysB+CLVQg8Rd1aZl/wzpcHzTmuog3jtdwqAXN05k=; b=etOgLoxyxTAfylLV+waEcVdqJh3HTwycsb6+BinkCoWkoEATpG+NPc0CoRgUkqpMs3oBOI uAfopjTMTzYVPlvPqMjtTPLkFMOgVaFYNMGHp73p/Wzt9yPOfqWBZym6BH84EvvTCOD0RH aD4ZsDYIM61rY1Q83orMbSFw3Q3tlHJjy92rwCjZlubfFVmoP3X5mhtdXVJe2lH1eyBZ4E +7FvbZaaRl9OWzBQ/tTyqo7l9lt0NFy+yIBar0XULe5OLVwNSbIJfLg7JcOWhrJP5tHH8i RMdEfMR3Ap3pFfOWa8kI+hLyHcIJbzGo9OhdwTkgEGs+e1Pab/rQ7dj8YLADhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683237584; a=rsa-sha256; cv=none; b=jZLfhrZfeNBzTOyObJI7kXmSqgRzWhDvJl/uzzmdLtXxwiUGD7KCVhnYKQ8EVscbeJYdGS jXmyNo/do7ShWyxT2bfdd07c0mzDv6YIJnm+Zi1N3jrmZO3RSGc/iayTJKUzE8hoSEUYvl f5B0NnBP5ukxkIcw59Hjvo2bhajYSNgBIYOWNtYUCreRYjfFjt4ftYksF55FOBaEQUc/5w vC9WWstE2/Q32oEiOK5z5IabiWi67uCJ0kWg2k27UDsaPYFi6ixE5jlnDdP1bqL5CEAVfl HUyU+W55L4AI4/tvtqQ2LH+EWrn2fZNUeNJUP3XipfpyFCv6of1bylUlO+2obA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC75X0zwLzTR8; Thu, 4 May 2023 21:59:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344LxijO081008; Thu, 4 May 2023 21:59:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344LxiCs081007; Thu, 4 May 2023 21:59:44 GMT (envelope-from git) Date: Thu, 4 May 2023 21:59:44 GMT Message-Id: <202305042159.344LxiCs081007@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: 8fb0f07c7a13 - main - wlan(4): Mention WiFi more prominently List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8fb0f07c7a1331beeecc0c0f6afec674671867b9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8fb0f07c7a1331beeecc0c0f6afec674671867b9 commit 8fb0f07c7a1331beeecc0c0f6afec674671867b9 Author: Tom Hukins AuthorDate: 2023-05-01 14:47:58 +0000 Commit: Warner Losh CommitDate: 2023-05-04 21:59:12 +0000 wlan(4): Mention WiFi more prominently WiFi is a commonly used term to describe wireless LANs. Adding this word will help readers better understand the contents of this manual page and will help find the page when searching, for example when running `man -k wifi`. Pull Request: https://github.com/freebsd/freebsd-src/pull/721 Reviewed by: imp --- share/man/man4/wlan.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/wlan.4 b/share/man/man4/wlan.4 index 7c12e8b1f7f9..5cb7c67735c2 100644 --- a/share/man/man4/wlan.4 +++ b/share/man/man4/wlan.4 @@ -25,12 +25,12 @@ .\" .\" $FreeBSD$ .\" -.Dd January 26, 2021 +.Dd May 5, 2023 .Dt WLAN 4 .Os .Sh NAME .Nm wlan -.Nd generic 802.11 link-layer support +.Nd generic WiFi 802.11 link-layer support .Sh SYNOPSIS .Cd "device wlan" .Sh DESCRIPTION From nobody Thu May 4 22:02:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC78F3ql3z49bDC for ; Thu, 4 May 2023 22:02:05 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QC78F2B9Hz3ktM for ; Thu, 4 May 2023 22:02:05 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-3f315735514so78923175e9.1 for ; Thu, 04 May 2023 15:02:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683237723; x=1685829723; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0KE1mIXyj78odeEBuXDGYQS7TGqS4ZyveuOm8LigVyA=; b=SyILRy5N44HAZYvtXHoLRafPt/B62C9mHZItLDDBQPCQRpL9WT9rKtCOvsJT4hsN38 Pl70KvEACHs61FTXh/UGoODs0pH0ul1sfdc69bYX1ARCmpwfiOiteCFogw+KYZP5alkw qT50UlTc1idRQ4afffTxlLiJVZSbJw4d84TlSsMYLNkxdS74nXWi6Gs4PUpMTdz1Wc/X No4H+EWvpFNGUXp7ju7Zv1SMftnNDrM/tKSPCBM7jH5/EbvtmEgu74lTooIxlLHS8Mv4 uSqf2eRdwCCMBIgFu+NryP4QkCNyHZrXsq1NxMSdGYC34iO7JtoO6kZGa1AvsfOkfL4f f5YA== X-Gm-Message-State: AC+VfDxqXxaqN1jd4BcZfDPGB/3piJ2sH6eJemcQBMyp4uCN8uA0oFND 0Z+Mm7dLuHGXnJlc9ulfLbQRJw== X-Google-Smtp-Source: ACHHUZ5h062l8EOXRp30KUQ4Z7p6FgJLWtgpBsv8qUb+hRJVut4F2haRoDS1Rb63IdadHL5aQDaT2g== X-Received: by 2002:a05:6000:12:b0:306:d43:4d8e with SMTP id h18-20020a056000001200b003060d434d8emr3722780wrx.29.1683237723180; Thu, 04 May 2023 15:02:03 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id f16-20020a5d6650000000b003062c0ef959sm312799wrw.69.2023.05.04.15.02.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 May 2023 15:02:02 -0700 (PDT) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.3\)) Subject: Re: git: 8fb0f07c7a13 - main - wlan(4): Mention WiFi more prominently From: Jessica Clarke In-Reply-To: <202305042159.344LxiCs081007@gitrepo.freebsd.org> Date: Thu, 4 May 2023 23:02:01 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <9622914B-E00E-4FF3-80A1-1FFA0A6C201C@freebsd.org> References: <202305042159.344LxiCs081007@gitrepo.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.3696.120.41.1.3) X-Rspamd-Queue-Id: 4QC78F2B9Hz3ktM X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 4 May 2023, at 22:59, Warner Losh wrote: >=20 > The branch main has been updated by imp: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D8fb0f07c7a1331beeecc0c0f6afec674= 671867b9 >=20 > commit 8fb0f07c7a1331beeecc0c0f6afec674671867b9 > Author: Tom Hukins > AuthorDate: 2023-05-01 14:47:58 +0000 > Commit: Warner Losh > CommitDate: 2023-05-04 21:59:12 +0000 >=20 > wlan(4): Mention WiFi more prominently >=20 > WiFi is a commonly used term to describe wireless LANs. Adding = this > word will help readers better understand the contents of this = manual > page and will help find the page when searching, for example when > running `man -k wifi`. >=20 > Pull Request: https://github.com/freebsd/freebsd-src/pull/721 > Reviewed by: imp Should we have MLINKS+=3Dwlan.4 wifi.4 like how we have MLINKS+=3Dfirewire.4 ieee1394.4 already? Jess > --- > share/man/man4/wlan.4 | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/share/man/man4/wlan.4 b/share/man/man4/wlan.4 > index 7c12e8b1f7f9..5cb7c67735c2 100644 > --- a/share/man/man4/wlan.4 > +++ b/share/man/man4/wlan.4 > @@ -25,12 +25,12 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd January 26, 2021 > +.Dd May 5, 2023 > .Dt WLAN 4 > .Os > .Sh NAME > .Nm wlan > -.Nd generic 802.11 link-layer support > +.Nd generic WiFi 802.11 link-layer support > .Sh SYNOPSIS > .Cd "device wlan" > .Sh DESCRIPTION From nobody Thu May 4 22:02:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC78d0gjvz49b45; Thu, 4 May 2023 22:02:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QC78c3Dy0z3lDp; Thu, 4 May 2023 22:02:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683237744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6/YM4V+Uw80wrbja9UDypW6pg0GUK3RuLya35MyOVY8=; b=WA/VwvMfJ801XWHY0wnWYlrwmcLYmZ8trqW53oP/kYfGlp7HTGsNuMlhkwa3HvEo4dLtHa qISS4ygZGqyCi5yUJvN1InN1skB+M1N578IrwPoNUXBtims/Ep7h3rxwvxsAmNFocVHcoe b5suNiD3p1DlqAhxE4b/xC2iXHG1KQyYOFugtc0CWn0TchdgPUD4HEuru50R0xmzRjE1RS j8xkRJ5xrWQe2lOv0FO9yNdF4beafC6m0EYRzA9yO0rv2a3T2cNsGyslGDDv8i5zQWmBzP Dz8jmAoSw+BtSpR6jLDiEHnWyGK7h08QaVim8NIKpT7+uSgLK7f9tRbbW4ItVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683237744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6/YM4V+Uw80wrbja9UDypW6pg0GUK3RuLya35MyOVY8=; b=BGi6b4SpwBay3XEO+SNa3NbNnHJEOha7zmBB1+67Jia9CScE4TXp2FPuCW1RkYHG3P3alQ 6T2nShgpwKY2+AE8mOZZdwOqUbJMXvYCQm4XDeypJaQ04HXQYXtzWQ0BHfFvzyy0/Jpwll xJxlettsGoMG+DT4h7/mKK7nrYnYLElHGvLWD8fCj+U+ai/msy9YnyIOVHSEaqNTJsKQr9 6eHbdzkWIc1ibQT0mOxskcEEQFWpY0n8NUM00WD2EuzCdiQ8t1wbPf90/fTikNf4DVq73R h4lINOCqSUO04CW9tGRYnhRxHbeehmCUsxxSEYcLi9SH/Lz6a/jbZ8ZR9FBRyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683237744; a=rsa-sha256; cv=none; b=qNzXH3wxX8JMEPxJQxK13VWg4DAKakJ8MozMLDlO5gMqjmMPFOxxWYKv96J8ZoV/qc0eyB fxgH/I7nAKAtwK8HHVGC1WqgQH42zLwj3cFeizUOgdXm+n1ADWMRTi6/9DAGZOkauiaWeo fDuoAIz/mia3fnEL9gnpVIyNqSljoLBPWyGE3OKiqcNC0BgtG6/sQXzC5VGnGTheMM4KvT z4TvhZEh+F+iWgkFNz1eEusEbJuFE+cULC2ymTOceCGXXKQw/dy/bG5/6onC5XQZ6mCuQc GGokiYsBfikLoCMdZDtHZaowqfcsMtoJL5m+iHW/buERJC2xrplGsmCYJJT1lQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC78c2HsQzV9j; Thu, 4 May 2023 22:02:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344M2O1N095271; Thu, 4 May 2023 22:02:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344M2OV6095270; Thu, 4 May 2023 22:02:24 GMT (envelope-from git) Date: Thu, 4 May 2023 22:02:24 GMT Message-Id: <202305042202.344M2OV6095270@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: 9affcf438beb - main - bluetooth/hccontrol: Fix unterminated command list List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9affcf438beb43e912e289d1b9f86692d73b0b0a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9affcf438beb43e912e289d1b9f86692d73b0b0a commit 9affcf438beb43e912e289d1b9f86692d73b0b0a Author: Brian Campbell AuthorDate: 2023-05-04 22:01:31 +0000 Commit: Warner Losh CommitDate: 2023-05-04 22:01:36 +0000 bluetooth/hccontrol: Fix unterminated command list Signed-off-by: Brian Campbell Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/730 --- usr.sbin/bluetooth/hccontrol/le.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr.sbin/bluetooth/hccontrol/le.c b/usr.sbin/bluetooth/hccontrol/le.c index 6f768619e9d3..c8ae335fcbe0 100644 --- a/usr.sbin/bluetooth/hccontrol/le.c +++ b/usr.sbin/bluetooth/hccontrol/le.c @@ -1365,4 +1365,7 @@ struct hci_command le_commands[] = { "Generate 64 bits of random data", &le_rand }, + { + NULL, + } }; From nobody Thu May 4 22:07:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC7G52cJjz49bdL; Thu, 4 May 2023 22:07: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 4QC7G52CDSz3lsy; Thu, 4 May 2023 22:07:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683238029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9/+o8Q9M9mvd14kfyJ5dCzP2XPKAqKJsnT/Zo4iqVYI=; b=cIYxlMHhlISlxnsJKRHACQTPXusQ4zMnRK/7q8eaOFJEd2TZMfqCQe8AurBtzXE4p7wqjX bizgLfxVt3WKWqKDsJuSp/wZ+XksTcu+13d4Bj5hs4aLnTIvOSycpOaJfZjVcWTSbgR/46 hiwHxZ/URX+fEzpBwuBf99/ibUMICGiJd0nctClT7PKZj1xHR6LVH3z6rxsP66xExLyhpb ykUjwSYY5YSYj1LhjWYR/b2uPCe+SB2DYC6bf+zl+X2oXP2NOEHFoBnKABV1WfOvgWdHEk VOQfwbfh5dugBSQx6AuNlUDnsK1tZsULNwAf9C9u648HZ8EeU2xCGGwGgERnhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683238029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9/+o8Q9M9mvd14kfyJ5dCzP2XPKAqKJsnT/Zo4iqVYI=; b=pej1FLG6uWzDf/xtj1cdn+tXhwDdoWsN+964Jpeuu7IxmhguI3IO22YFHo8rHSx8vaiRQF 525RDEOx755jBzuP0uIkysuIbRyxbshb82/5cMB9/ycPA7jX14lZpreM/IRTXrPg2czU/7 JHkdMbvS26RnwpEZulwphncuH19eKS7FiuVqNg0YRymNHA/kSzMcznX8aXBtOn8EfPTrU6 wc3ZLWZ/EfaaxVRAOynXyA/CoHy5FLaV/IoATZepozfK0g1WkBswRFu7ZfgHegRuE0YSD1 TyeQONP4RGXTJFg6MTbKrRBc/F4CAayGwXpMvOGyrh4UkPgCbv724n6qlt8p1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683238029; a=rsa-sha256; cv=none; b=jJD9wOILPLJhT1pRLusjazA4JH2uH0/WQ+Kgyp/hbTZYH9r8v8nCdDF53KWr2tSYhzPULu 1/JgeMmfoz585HAFrSAJBj6VDiOfxYHaRCIZdU9SjgGqmy8NLqNcLOsmwBY+F7IC1032sj AvD7/r9EJOIj1bAc9BG7k0AIdrIlgTMzK5qzoJ2zTYHIbL/60+SG04bDDwTXzpIdSmqAoc 3kBZrm7D5HHpQZhmbmG2fNeyXVgYT0iVgkcbGIM/1ZEtRf8USPrCaULlgt4oMKg4AWuLlE UIWDnkghCbFstY0TWpbpwITP/gelm5T1WPHUaTY1zOaXBD9jfB/kaD8PUdWKfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC7G51FHbzV29; Thu, 4 May 2023 22:07:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344M79sV097793; Thu, 4 May 2023 22:07:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344M799l097792; Thu, 4 May 2023 22:07:09 GMT (envelope-from git) Date: Thu, 4 May 2023 22:07:09 GMT Message-Id: <202305042207.344M799l097792@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: 560a7d2584c8 - main - mpr(4) & mps(4): refer to related utilities List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 560a7d2584c8356b710ac63c71543bf5cc565439 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=560a7d2584c8356b710ac63c71543bf5cc565439 commit 560a7d2584c8356b710ac63c71543bf5cc565439 Author: Tom Hukins AuthorDate: 2023-05-04 22:05:14 +0000 Commit: Warner Losh CommitDate: 2023-05-04 22:06:27 +0000 mpr(4) & mps(4): refer to related utilities Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/729 --- share/man/man4/mpr.4 | 1 + share/man/man4/mps.4 | 1 + 2 files changed, 2 insertions(+) diff --git a/share/man/man4/mpr.4 b/share/man/man4/mpr.4 index 4224571643d5..fc2ed791f2a4 100644 --- a/share/man/man4/mpr.4 +++ b/share/man/man4/mpr.4 @@ -392,6 +392,7 @@ The following levels are available: .Xr scsi 4 , .Xr targ 4 , .Xr loader.conf 5 , +.Xr mprutil 8 , .Xr sysctl 8 .Sh HISTORY The diff --git a/share/man/man4/mps.4 b/share/man/man4/mps.4 index 5661b376b1ea..a176ac04985a 100644 --- a/share/man/man4/mps.4 +++ b/share/man/man4/mps.4 @@ -364,6 +364,7 @@ The following levels are available: .Xr scsi 4 , .Xr targ 4 , .Xr loader.conf 5 , +.Xr mpsutil 8 , .Xr sysctl 8 .Sh HISTORY The From nobody Thu May 4 22:07:10 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC7G63bfCz49bgS; Thu, 4 May 2023 22:07: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 4QC7G636rVz3m00; Thu, 4 May 2023 22:07:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683238030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vaXXTBwjlOAaBNIIQ3sxD4ZC4qpJ0G4ngWS/gTSBOds=; b=jRnonqjtUvZjDicLxvYz90lCVPyhzGT3qp3sNpuSPXvAx8oSxI4NF38dT0wSaMY3lmgfT5 RefhO6k7Gh6WsglonGy2CCl5XSR3kf4FgHRdpqQNzJgSVN2N3O/9N3dcPaB+dUEhQoDtKe tONuSSqxLcQ+C7Q2e7AZY2FXrgJw5ZWZyK9V1skyvPH+38/ZvMliK5toY4j8S6tNcLosfX tbmoUkjKns1hi0VnQ871zfrHCjq/LACdRh42bQnGWrW+WiJt1oL8WLTiEHCcUfAESntYoG zaCC17AdCFLZXoD/loLMBkzRLfVbVNwyw35jjRCftugAC85Gt+xJ6lejkqgMIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683238030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vaXXTBwjlOAaBNIIQ3sxD4ZC4qpJ0G4ngWS/gTSBOds=; b=QvKA0S3mmYW/3+90tIK8Cupm/iq9/Z2hckpd3j1QFNl6vsmX6PA6F3h9o0lsEMyyxTHgFq b+0FcPN+cB/8j5+cmehq2yfSRm6uRkRvsHa6m+AqbjbAMvYNJTlXolMCaM5cXEAx73NEyO idGJcQMaB7ODDLk2g2QSlwpQ9fiYbriSmkffIWGO+Vmo+suTYhWfuV6y/fVbIJphLG9rlH x2qaSMBrJRS2DxUyDhFhmjyOWjnCnW5GEd1kbA0qlB1eIDOGbO9UJhl4wG0mcDuzDXHWK1 rvlX69COhhldn7gd4iB4LQsEE2INutI72eWWyObnheMMJKt2xReM0/2US5HGcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683238030; a=rsa-sha256; cv=none; b=I0sUrqEaEi2ObGZK1HgyoVOrQM8vDglN2uuBpTKb0QUZajXBJCkFMSJF22K9MlnOwFleru 0OduBhlHGL4cLX0sRVFfs0rmBJv0p9FZKMlEjG5AT8Da4yjEcfFCaYTSkhL8/00KUNTa6U guDHWO02h0mcwV1pYRaNNX3yfiSbwX2Jdl6Sdc/D3TmxsXBuhuonEyyDkhI/bdxDTthF4O OKJJj3ZED+DBQfzaw8pPquFTQU28IawyEP5lFygMP+2S+DyHkWEy4Z45qPl0EpLpbNPDoy RuW+aJweqaq2JhzRqQgHiQjaPK7S+tLR65PC8XMDKwXWFLl/sMmrP1KqgQUfRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC7G629S1zV9l; Thu, 4 May 2023 22:07:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344M7AXr097812; Thu, 4 May 2023 22:07:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344M7AuJ097811; Thu, 4 May 2023 22:07:10 GMT (envelope-from git) Date: Thu, 4 May 2023 22:07:10 GMT Message-Id: <202305042207.344M7AuJ097811@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: 910733a6f909 - main - mpsutil(8): Improve English usage List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 910733a6f909b0106d3e7db45813ae1f8eb9ea83 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=910733a6f909b0106d3e7db45813ae1f8eb9ea83 commit 910733a6f909b0106d3e7db45813ae1f8eb9ea83 Author: Tom Hukins AuthorDate: 2023-05-04 22:05:15 +0000 Commit: Warner Losh CommitDate: 2023-05-04 22:06:28 +0000 mpsutil(8): Improve English usage Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/729 --- usr.sbin/mpsutil/mpsutil.8 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/mpsutil/mpsutil.8 b/usr.sbin/mpsutil/mpsutil.8 index e7c2fda8f84e..959c60305065 100644 --- a/usr.sbin/mpsutil/mpsutil.8 +++ b/usr.sbin/mpsutil/mpsutil.8 @@ -85,11 +85,11 @@ The utility can be used to display or modify various parameters on LSI Fusion-MPS 3 controllers. .Pp -The +Both the .Nm mprutil -utility behave identically to -.Nm . -(same program) +and +.Nm +commands behave identically. .Pp Each invocation of .Nm From nobody Thu May 4 22:07:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC7G74b3vz49bjY; Thu, 4 May 2023 22:07: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 4QC7G73y7Cz3mL4; Thu, 4 May 2023 22:07:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683238031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rTk362sibIAAjTOi/d7aUp0p3yopPr3uM5Zp9JbLMNA=; b=YQPXRrdmrKQntkwqBjGVnP46x/sq7SXA13DBNCHmw8p7q6DvqbsDIeCfpEP3TZaaz4OTol bvRPhL0vag1WbrcaaifILJZ25zyUMdzvdJS4nJLsTNpFfFc84JvWNLw7v7noeL79wsI3L+ dE8nbsh1MqOz+ryMA57k5nGN//4yTcaMMLr6MM1fth0wpkJ8UZbW+GhuXmR6C3k8wWJGV/ EPnsrMXdaBLieCSJF5i5BcDRpRKQlHt4Q7o3yV4WZ1DoyoiM+Czp8cbensSCBoRaY7APps nyGKg3InOAkUBUpE8vMliEc5zIUreoTH/ia6aCvt4+Hy9R3NU7T8VIfTAb244Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683238031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rTk362sibIAAjTOi/d7aUp0p3yopPr3uM5Zp9JbLMNA=; b=lCXe736lWid8DumyQR6sgkTGk5yZQ9UpJTnKYcmEurfwPiDkzeCwVITwmHvQfcWFXflxMs srnTI1a0yN/Q5WKMNafWTiZ5R2JQVHb/lLhWGcanIZznZHV1ogRMYAy4RN+jzTAf/sboRC GbmgiTXjM6UnvVL9IiAGOLkO0BBLNBi2QdE0ZM/fddUhAR0fgF/jt+4wNEhb08WERFJV5V 7BGnZPzCE7VmQuGmQWxuCOIDvJTRrmd492r2yP452qWbGmpbHMjmXVQuIh9cJMY4LabB8k yUhKmijoUX5CInJUH0EI9z65V83Q9i0NzngtWANkUTelCPlz+hkCVcRYAwRgmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683238031; a=rsa-sha256; cv=none; b=UiXnZJjL6qJreuw/jhtYOAZY0YQGFuqdhan/aSpqgcKgME1laxprvD/mdnrxBbRQT4TNO9 qzNqpAJcACKn45EbpNIBgN7bp7pkzT7PXbnGjRvGB+f1rnfB+qE5IZ3+t0nm8Bi8zKXVMy zjyU8q/AD46qcrFnNCBBd/7YN+GWLjo+z9NEEwplLfmNBIxv2kQZPdFoqAMV0HfnvrqmB4 pLuM9oC7b3yhjX8Kk4wt41PJ/2xE+L4iSXtnSYik48whXA5gSab9R8DeRhE11sMRhGxRTh et9FxBEXzK8XwGDwCbf3Jrh7Ok/vPVZeUV2SS+bqnbB1J7cECL3xu1qHaUcxyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC7G733cNzTSK; Thu, 4 May 2023 22:07:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344M7Bwl097831; Thu, 4 May 2023 22:07:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344M7Bif097830; Thu, 4 May 2023 22:07:11 GMT (envelope-from git) Date: Thu, 4 May 2023 22:07:11 GMT Message-Id: <202305042207.344M7Bif097830@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: af32969ddbb5 - main - mpsutil(8): Remove a stray paragraph List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: af32969ddbb508b9e04801217cc6d081be24a9e8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=af32969ddbb508b9e04801217cc6d081be24a9e8 commit af32969ddbb508b9e04801217cc6d081be24a9e8 Author: Tom Hukins AuthorDate: 2023-05-04 22:05:15 +0000 Commit: Warner Losh CommitDate: 2023-05-04 22:06:28 +0000 mpsutil(8): Remove a stray paragraph Spotted by running `mandoc -Tlint usr.sbin/mpsutil/mpsutil.8`. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/729 --- usr.sbin/mpsutil/mpsutil.8 | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.sbin/mpsutil/mpsutil.8 b/usr.sbin/mpsutil/mpsutil.8 index 959c60305065..917e96a60e51 100644 --- a/usr.sbin/mpsutil/mpsutil.8 +++ b/usr.sbin/mpsutil/mpsutil.8 @@ -171,4 +171,3 @@ utility first appeared in .Fx 11.0 . .Sh TODO Flash operations (save/update) are not supported on big-endian architectures. -.Pp From nobody Thu May 4 22:21:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC7Z6398Lz49dBn; Thu, 4 May 2023 22:21:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QC7Z62k2Fz3nrY; Thu, 4 May 2023 22:21:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683238862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7LNh5Q3luaRVuy/UfbqHqOk4wmYhxP0gmKvkBH/H8Dw=; b=E0Z4K8O+jr0B4j2q+OJJ7Z7uzgu0v8JfyLc4jCbwOK0I4abgQODKa+mCPkem/cT9QTWeU7 0zSxvbwii0lSB2WOJKGg8+2UXjGcmrzizbNrU7Za8RguZSCQ9axuAIFSfOEhR5xF/3m1UK MdJLhxW00K31NTgIy6i+7Icst5k8810og4GgWAypcLWKBjMp51+u9/wHo4WzTZ/CnFCYLp NnW9bwpQYCb2D92hkXvNichNKkHxkHozUArxjq2fOZ3zUcbJm70xeLA/qD2lNvuB/VXGRi dDBRKggTiOfeZ2LTKwHF/JjO5gNGeNtBgio/4Jn+ZJ9Zl6VYVLvWF13i9hMvQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683238862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7LNh5Q3luaRVuy/UfbqHqOk4wmYhxP0gmKvkBH/H8Dw=; b=nyvwCNUOASDpBjHsu2mecrOLTbCELT7xfaIcjhLIfRom+XAlwnZDUocpDKgJp4k6GZqiZp TD37T5IckSa3003lcUpjnWGui1VNzajmnovys99ZT0R/sofiJ3o3RRpEoSjw8xdksxEXkH nvDpOHVjYzjdneCfZAE1Nts4Hfy69b+N8YSGgQwv0tBpi3HciB4tBL5gghrePtbgNrvsqs tbJb6mbllCNG9BFFjBLE28LVQdr+PKyIRo9r6d8LPZD/S7znAhBHy61ovXY0A06sEzkibS priKwoNsVxzs+JKA/zNM+1+5CDUHA0k+PmSdE5+2yk/P8Al9HbQNDCp2Q88Zuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683238862; a=rsa-sha256; cv=none; b=ZTUCojqXuI1mDPRFACiW7rAn+cNU1Vx4SqF88RSxdc00K5N+FgGdPBasVfVRL+8LcW/bpC 7xM9Z9hP813QqAAzMen0TO508NtSyved9CB7RqPwzRzck7Rdb2Ooia9KZitUaZuQqmfbZ8 ppydBmTshic0o+0/gx0Ou5p7p5AmSGib6lJCMf71mdiaaR4zYUR29R9u0h90/SjBepT+5E pR5CTwBSLhPcsxPsyRHY6sQoonR2hFZBS8tfENLHTGix35q1HekupE9Vix2n2Zt1L5Jfy8 zmLYhMbgFF6NMSu9M4Rb0NBVgT8azLoN2jZzfXmeXzu5Uv7z4FRViR/1nu0Icg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QC7Z61nRfzVW6; Thu, 4 May 2023 22:21:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 344ML2SK024675; Thu, 4 May 2023 22:21:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 344ML2jn024674; Thu, 4 May 2023 22:21:02 GMT (envelope-from git) Date: Thu, 4 May 2023 22:21:02 GMT Message-Id: <202305042221.344ML2jn024674@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: a1bae244b6ea - main - Add wifi(4) alias for wlan(4). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a1bae244b6ea6c53add245cd1373c6dd43fb7631 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a1bae244b6ea6c53add245cd1373c6dd43fb7631 commit a1bae244b6ea6c53add245cd1373c6dd43fb7631 Author: Warner Losh AuthorDate: 2023-05-04 22:19:16 +0000 Commit: Warner Losh CommitDate: 2023-05-04 22:20:56 +0000 Add wifi(4) alias for wlan(4). Suggested by: jrtc27 Sponsored by: Netflix --- share/man/man4/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 8ceda540093b..71d12055f4db 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -765,6 +765,7 @@ MLINKS+=vte.4 if_vte.4 MLINKS+=vtnet.4 if_vtnet.4 MLINKS+=watchdog.4 SW_WATCHDOG.4 MLINKS+=wg.4 if_wg.4 +MLINKS+=wlan.4 wifi.4 MLINKS+=${_wpi.4} ${_if_wpi.4} MLINKS+=xl.4 if_xl.4 From nobody Thu May 4 22:21:12 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QC7ZZ1C3Nz49d74 for ; Thu, 4 May 2023 22:21:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) (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 4QC7ZY2SPvz3pSv for ; Thu, 4 May 2023 22:21:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-50bc0ced1d9so1623730a12.0 for ; Thu, 04 May 2023 15:21:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1683238883; x=1685830883; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=LgP9Apom5KogsQiomRveDeOtoYvV2YrNMp2TSEBO/a0=; b=Ak0OerWLC3Uqr4ZzPmWUxXX+fxmBu/x4PXYOnGAdc75LHPMIYBT/JBM4fHjbXHaMXZ fjHY9qc1YdE6aoZIRId1HPbaBAb3YI0W4nR2lhUhuWKyb0/bfwB7yzYfsx+7Dp1X4NsX LzWQwFiOnFwHdFp0pBb60s6WfFVwoRGwNdb4rldl3V0kPgs+L+QrDRIPLKAQdRsEV3mn IKcL6kg6X4ITBl8HYLPTY/X31GmWHyGN3UF8BwqscjV82IERrfoGMzpRHhi7SMOGcHdQ vhKK1KvYW51irAbmW9pXrfAekH2jF4v2pIbOqqMYVGXBDQ3kT2TPCFWdNe9ozRLdwx77 zurg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683238883; x=1685830883; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LgP9Apom5KogsQiomRveDeOtoYvV2YrNMp2TSEBO/a0=; b=e/3BD4AiwBncw9dgU5XWn5SQ8P1JAjYMvb+oty3sdxpYYzlYNPDqr6f1JDpImKffVc DPOceS91KHL2/jIBC8ZzHRmvnhu4kULtW+uXVy75PD/q6rpbCok8JE9v0v8A7rIyf/o8 MajeST50jmEi+0hZqenRzML79sILfoZiPKYGrp8AKXDlic3YFYNL5RFm3hBU6bI/uLSX 6oEaRdfs2YWBTIFyGncxIcroqr16g9wliAHA85gXteMOl8EUbknTU5FQCN19BCGqwRwP 5aWaFOc/dLwRDcSWOSJ6qG9nWnumWKMl7BtfM8zPHFpn3xJ11ORTqky0ghKGAeSIV/T1 By0g== X-Gm-Message-State: AC+VfDy1OuLw8NHVQ9jYKmy7z+lghKbrzwgXi74L8iHhmGRcsIWTIzxI emj+knTjWi1zFtOZUY/+FxDB2SiRtShX88Tl20wmEmS/D/BG/ff1 X-Google-Smtp-Source: ACHHUZ7T5wZItN43Wjf9QKJfR3AT6hspwfT/BKihFOTeHSsJg/QteDFeSeuowB0uXUNerjOqkShs8oP4RtjV3/ukZYM= X-Received: by 2002:a17:907:3f05:b0:94f:450e:6a76 with SMTP id hq5-20020a1709073f0500b0094f450e6a76mr346280ejc.61.1683238883621; Thu, 04 May 2023 15:21:23 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202305042159.344LxiCs081007@gitrepo.freebsd.org> <9622914B-E00E-4FF3-80A1-1FFA0A6C201C@freebsd.org> In-Reply-To: <9622914B-E00E-4FF3-80A1-1FFA0A6C201C@freebsd.org> From: Warner Losh Date: Thu, 4 May 2023 16:21:12 -0600 Message-ID: Subject: Re: git: 8fb0f07c7a13 - main - wlan(4): Mention WiFi more prominently To: Jessica Clarke Cc: Warner Losh , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: multipart/alternative; boundary="000000000000bb104f05fae5973b" X-Rspamd-Queue-Id: 4QC7ZY2SPvz3pSv X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000bb104f05fae5973b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Yes, we should! Done. Warner On Thu, May 4, 2023 at 4:02=E2=80=AFPM Jessica Clarke = wrote: > On 4 May 2023, at 22:59, Warner Losh wrote: > > > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D8fb0f07c7a1331beeecc0c0f6afec67= 4671867b9 > > > > commit 8fb0f07c7a1331beeecc0c0f6afec674671867b9 > > Author: Tom Hukins > > AuthorDate: 2023-05-01 14:47:58 +0000 > > Commit: Warner Losh > > CommitDate: 2023-05-04 21:59:12 +0000 > > > > wlan(4): Mention WiFi more prominently > > > > WiFi is a commonly used term to describe wireless LANs. Adding this > > word will help readers better understand the contents of this manual > > page and will help find the page when searching, for example when > > running `man -k wifi`. > > > > Pull Request: https://github.com/freebsd/freebsd-src/pull/721 > > Reviewed by: imp > > Should we have > > MLINKS+=3Dwlan.4 wifi.4 > > like how we have > > MLINKS+=3Dfirewire.4 ieee1394.4 > > already? > > Jess > > > --- > > share/man/man4/wlan.4 | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/share/man/man4/wlan.4 b/share/man/man4/wlan.4 > > index 7c12e8b1f7f9..5cb7c67735c2 100644 > > --- a/share/man/man4/wlan.4 > > +++ b/share/man/man4/wlan.4 > > @@ -25,12 +25,12 @@ > > .\" > > .\" $FreeBSD$ > > .\" > > -.Dd January 26, 2021 > > +.Dd May 5, 2023 > > .Dt WLAN 4 > > .Os > > .Sh NAME > > .Nm wlan > > -.Nd generic 802.11 link-layer support > > +.Nd generic WiFi 802.11 link-layer support > > .Sh SYNOPSIS > > .Cd "device wlan" > > .Sh DESCRIPTION > > --000000000000bb104f05fae5973b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Yes, we should! Done.

Warner
<= /div>
O= n Thu, May 4, 2023 at 4:02=E2=80=AFPM Jessica Clarke <jrtc27@freebsd.org> wrote:
On 4 May 2023, at 22:59, Warner Losh = <imp@FreeBSD.org> wrote:
>
> The branch main has been updated by imp:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3D8fb0f07c7a1331beeecc0c0f6afec674671867b9<= /a>
>
> commit 8fb0f07c7a1331beeecc0c0f6afec674671867b9
> Author:=C2=A0 =C2=A0 =C2=A0Tom Hukins <tom@FreeBSD.org>
> AuthorDate: 2023-05-01 14:47:58 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh <imp@FreeBSD.org>
> CommitDate: 2023-05-04 21:59:12 +0000
>
>=C2=A0 =C2=A0 wlan(4): Mention WiFi more prominently
>
>=C2=A0 =C2=A0 WiFi is a commonly used term to describe wireless LANs.= =C2=A0 Adding this
>=C2=A0 =C2=A0 word will help readers better understand the contents of = this manual
>=C2=A0 =C2=A0 page and will help find the page when searching, for exam= ple when
>=C2=A0 =C2=A0 running `man -k wifi`.
>
>=C2=A0 =C2=A0 Pull Request:
https://github.com/fr= eebsd/freebsd-src/pull/721
>=C2=A0 =C2=A0 Reviewed by: imp

Should we have

=C2=A0 MLINKS+=3Dwlan.4 wifi.4

like how we have

=C2=A0 MLINKS+=3Dfirewire.4 ieee1394.4

already?

Jess

> ---
> share/man/man4/wlan.4 | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/share/man/man4/wlan.4 b/share/man/man4/wlan.4
> index 7c12e8b1f7f9..5cb7c67735c2 100644
> --- a/share/man/man4/wlan.4
> +++ b/share/man/man4/wlan.4
> @@ -25,12 +25,12 @@
> .\"
> .\" $FreeBSD$
> .\"
> -.Dd January 26, 2021
> +.Dd May 5, 2023
> .Dt WLAN 4
> .Os
> .Sh NAME
> .Nm wlan
> -.Nd generic 802.11 link-layer support
> +.Nd generic WiFi 802.11 link-layer support
> .Sh SYNOPSIS
> .Cd "device wlan"
> .Sh DESCRIPTION

--000000000000bb104f05fae5973b-- From nobody Fri May 5 00:24:20 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCBJP0hhXz4B0Y2; Fri, 5 May 2023 00:24: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 4QCBJP0GLMz47rt; Fri, 5 May 2023 00:24:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683246261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2+aPymbJdSsbrxIYofM56MWBtjhy4gCYmfEkYnnpDB4=; b=W9BerlQgD+DaR1HEsvP3OV9yGgU/ZE2gQNeEQZ380GAo7mAIOm4IeWM2uo0chdjd/71+jV 0MiefE/RLMUYdiHUNHKcnK2tTRYQkelDLuWKOJ5kt1iEcCIg07Iu8eH3eQiDS0QFJdJF4g 3wfV5mFM6ZJKEeWnou3PSFvwW/ta3LAZvJm+20YW+3GZZEpPlqFhIRvKvYj+XZauKOXjuV SRoTbZEBWcWuueuqgdFM6lmee8CFUjcaDSfHxo2qbD1BFW6JLaDYTHKvWpu0XthaCmseXO lC9ZcUaDC0cVa3g2nodlXO5IqYwzZ/Y1c88ZJo0nafuDAmBkDEE+fQZjn0W0Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683246261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2+aPymbJdSsbrxIYofM56MWBtjhy4gCYmfEkYnnpDB4=; b=dcV3W5K7jfCzoG43gd1zyh/h7r/jiXqSSa68p2OQb+AvYP3M1oOq2ZEgEljEJJN8Ji6za4 H1eZ7kwCiE6uiR1Ief0aQJyfw8BlNiUab6m2p7dFMJciogk4bqnBpzeu7K4+XJ+GU7P+Rq w2BcEtfc2iMrkBSWX/ZDwPT0E7SC6tFhPg/ckW8vJJUn4PHr5C8B1rfeDROB3soMpOriJG fYw6TG/E6TKVNH6UtxsbgarTtS/tDf2tzWxpW7EqLxPwhlbQu7ejqks9YvNMb/n7z10idJ 4eaicLD0h3ThSWAuoUNj7OqJpnEurpLzpowd2ZgGxTbBCoUz3IzGG2m7Ydigbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683246261; a=rsa-sha256; cv=none; b=OfC1yFzsLDqUB1MSk3QXtzcx1mR30frcmac7odNbx63KZGEk38jMwAZY6djDmkULqsHfKV SnT6qw6hL0UI8dR6jD/zCnBQm6XXbGUiC1jvbSSq3Kkp4ijXG/ECGNSwaX8GvXQgkdDM/D sIT69LAjNCL1Jj9CNwdsQXfRkNHTahT1jv8ZffsgfvZU9oU+qJyu8DKw5UcNqApvxLUPJ6 KKcsHwHJkc5XE/Z4gYUZmwbyv1h454qX+HoCyok5M/rGn/a9+KyKJ4klkpnHtIa3jBcTqK QdmZr9dCHD0YDLCgf9My4Hr6Ims6xDWcv4ieSsyNx+Qyrxo6sWJUI0TaMH0isA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCBJN6T2wzYT2; Fri, 5 May 2023 00:24:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3450OKln027571; Fri, 5 May 2023 00:24:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3450OKe1027570; Fri, 5 May 2023 00:24:20 GMT (envelope-from git) Date: Fri, 5 May 2023 00:24:20 GMT Message-Id: <202305050024.3450OKe1027570@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Graham Perrin Subject: git: 0167b5a79334 - main - sys/amd64/conf/FIRECRACKER: typo (compatiblity) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grahamperrin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0167b5a793349dc6f8aa600f69b56edcfb559d79 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by grahamperrin: URL: https://cgit.FreeBSD.org/src/commit/?id=0167b5a793349dc6f8aa600f69b56edcfb559d79 commit 0167b5a793349dc6f8aa600f69b56edcfb559d79 Author: Igor Ostapenko AuthorDate: 2023-05-04 19:44:21 +0000 Commit: Graham Perrin CommitDate: 2023-05-05 00:23:08 +0000 sys/amd64/conf/FIRECRACKER: typo (compatiblity) https://bugs.freebsd.org/269753 PR: 269753 Reported by: Igor Ostapenko Approved by: doc, src (delphij, imp, zlei) Differential revision: https://reviews.freebsd.org/D38741 --- sys/amd64/conf/FIRECRACKER | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/conf/FIRECRACKER b/sys/amd64/conf/FIRECRACKER index 4a9946f25991..ba00d674cf4e 100644 --- a/sys/amd64/conf/FIRECRACKER +++ b/sys/amd64/conf/FIRECRACKER @@ -173,7 +173,7 @@ envvar hw.broken_txfifo="1" # skip that; later in the boot process we have other timecounters. envvar machdep.disable_tsc_calibration="1" -# Provide bug-for-bug compatiblity with Linux in MP Table searching +# Provide bug-for-bug compatibility with Linux in MP Table searching # and parsing. Firecracker relies on these bugs. options MPTABLE_LINUX_BUG_COMPAT From nobody Fri May 5 00:24:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCBJQ2s6sz4B0Zq; Fri, 5 May 2023 00:24: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 4QCBJQ1QZlz47gS; Fri, 5 May 2023 00:24:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683246262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pkNQOQYDvc+I3H4l+cI/VI/WxqOLO1vjIrkRYpHyETE=; b=KMQlFGlYPwZNojteRtu8nLO2CVlRXWPGLFb6VheVneGE84mPCqr6qirY6zRqTvEhDOCmwU /bFFVJI8ujGSoX5fhZJXNQQJ5ArieePYJbidJMLwNSOWHPpKvV8RYZwJ8vKvOmz0XSQv0A IA0AU8C9kmyWlAkkX6fuTjcoaEqeaEPwHu91DTqnME7Q1C5hy/OeSSX/NB40ra7yBbPZVr MCnJYtG+ZDlNHP/9SaeIyDd5GOWsl25B2thEvsU9GwQiRzV06+NDFYrZ5SS+sLNJxG7U22 ppzr7Fc9Lv0nEWATM72bJu55bdJWQnn//CuqLJAV7y90nttAu7dJ3EdUn4Q44w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683246262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pkNQOQYDvc+I3H4l+cI/VI/WxqOLO1vjIrkRYpHyETE=; b=hfyvdIrfbOm4ZdxX8PqZsOxWL1tePLYwvw4F6hgZ6PLMzBtzZ9mUTinjJgl07+oHwI5BJt BULmWQN0qva5NpbVV6yIH76qSKLPyOSL6EPrkwhEOWsoN61zw1x0ZtE0bSodELu/ObLMnz VwkRVFXrYXTeCNLPDWf7zpSrL1PERrC2o0QJbOwpRwJcj3wx39zKaEPl2+F/WkuNck26eR 8m5l9+Yycw9fqbK220ROwLOoQLN+C9jjPBY8kYwAui024oqP7KXCu6jb5drovwXfcZLnkP OUFz+JkjQ0dwt42qqFQF6tlMY9+ZZRHK46xnXM5E80Xlob3aQF0Y0ksIbDJ4qQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683246262; a=rsa-sha256; cv=none; b=hyTs/LVyyo0Rgz92II2iLwtsvtFH+cps5cXjfKFWtYb60d2NCHdxMyR/O+Cf3GwKwpqDS+ Ai5yIr2RZd3Lq0V+FGmHLzBJ5rU8MBNSxJjjgGsfdEBpKGNmJ1KrUC+5utnKS30HFlsWOW NNc2cexQM4yN91+wpNk1XwTJPw6lU7TPIkbKy/JzxeSxuUpixpsxd0DJUXtXHQsGuAa1fO uoAxEonKRhyVamGVIT1qIuEsI2Lu6I/HpNoTknAogYZMExm5xgBb2HqSvTCiuBK1w7Jou6 gM0OIr8lFGAmE+CT803oXuQUTdCaej/TY30rp2kMyGa9b1w92S9OLJ3mNytpDQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCBJQ0WV2zYYq; Fri, 5 May 2023 00:24:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3450OLIQ027590; Fri, 5 May 2023 00:24:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3450OLOY027589; Fri, 5 May 2023 00:24:21 GMT (envelope-from git) Date: Fri, 5 May 2023 00:24:21 GMT Message-Id: <202305050024.3450OLOY027589@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Graham Perrin Subject: git: 74081dc2bcd2 - main - sys/netpfil/ipfw/ip_fw2.c: typo (Compatiblity) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grahamperrin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 74081dc2bcd2a59393db438cbab3efc1f401e9d9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by grahamperrin: URL: https://cgit.FreeBSD.org/src/commit/?id=74081dc2bcd2a59393db438cbab3efc1f401e9d9 commit 74081dc2bcd2a59393db438cbab3efc1f401e9d9 Author: Igor Ostapenko AuthorDate: 2023-05-05 00:01:33 +0000 Commit: Graham Perrin CommitDate: 2023-05-05 00:23:08 +0000 sys/netpfil/ipfw/ip_fw2.c: typo (Compatiblity) https://bugs.freebsd.org/269753 PR: 269753 Reported by: Igor Ostapenko Approved by: doc, src (delphij, imp, zlei) Differential revision: https://reviews.freebsd.org/D38741 --- sys/netpfil/ipfw/ip_fw2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/ipfw/ip_fw2.c b/sys/netpfil/ipfw/ip_fw2.c index 4b347b2d7d2d..019114dc1d37 100644 --- a/sys/netpfil/ipfw/ip_fw2.c +++ b/sys/netpfil/ipfw/ip_fw2.c @@ -2002,7 +2002,7 @@ do { \ >> 8) | (offset != 0)); } else { /* - * Compatiblity: historically bare + * Compatibility: historically bare * "frag" would match IPv6 fragments. */ match = (cmd->arg1 == 0x1 && From nobody Fri May 5 00:24:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCBJR3Dv4z4B0N1; Fri, 5 May 2023 00:24:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCBJR2PnWz47gw; Fri, 5 May 2023 00:24:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683246263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e2857yzabrY03PAoGHh0tVnTy+J9e15m/q34wOLAg6A=; b=iqqjYqJoBw6RihWYsfaY5OZMgTWOMODs8ldhjPqus2AcJKFmanPJi3D8rE2Pg14woRAaU9 NuQ6P1bH4uaeCyQ2qjNIg7RbRtlg8WFSo18Cuzark6iNgpI4lDA0ObZzBI2CZnIdKLjYGh kYmoiTXFC8FFunuI09bPmBUDhj6nACxGTMglPbG6X/EfZQl0ulVDI+LJsmkKT4LR+/5l/f dPXh9wQQQaS4iBApWMKaj3C1DY1SLo4nXaNjOvesgYzc4IzqI+jtZE+ZWarjbBxcKWQPPo bZ1kT0p+sa9BUSUTsBlAySPhj5FScW57qQ4lDg1whmRCOB4zwvTti6VNkgGiXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683246263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e2857yzabrY03PAoGHh0tVnTy+J9e15m/q34wOLAg6A=; b=nF0mnyhKerUpGYrroW0WlBeYk0BFhvB9Jbn8P7eb+L18qZ/urleTwzL+Bv9JsDMP9whC2d Egh35JNRL+g1iA5XPaGM4vnt84nv3xbVMHW8LXVxPML3I8h6bq8fohSTdtOmSGGvXUZxiS NLnaNq5lpt4uMM89aoBxFDiJwDlS9sKGiiokdErmxd1R8snKf8fZeZOHEbsZUE+OrDaTqh gRjzESEGrTzz5SDARiYZnXq4+Sv8THz0X+UAoO8IifPmrTWzpicS2VupNkYysVRtnJvNQi Nzruz0f+7Xa13V+3aOsRv+sHWNaA3rWmOzgxCQ2zmHMHg/kXOoFnH3n79mGyPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683246263; a=rsa-sha256; cv=none; b=aTTxNbTunHztyzCmg/PTGedmFDjiQ/Mibhjq75fzLgj2bRyxgIvYRsTypXCYyDGYodhck3 cp/NWkEsGhSzhLuNTLExIVzCCr080FFT68c9bXl+aUscRKEjiyKlHGPSiUdXmJdRm5ibuD 9fOBCG1fNEN9xiSC0BUqXx/WIrAndeH/5mpEDD3pgETYllg/K1eVxXO0o2oR+WinwImM+w gdnPCbdSuT2L4otiYOAROTn5XRrCV4rDHjSfrsTKuc3bVfkoUwZWIDEPIWYjiH+NqY7ZBs Ua1z8CpMCfmWsbLtdIebHz7QrtX4HloCQdcCPBriD/UezaKQMZMpXlCRX7/MHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCBJR1Rs2zYBS; Fri, 5 May 2023 00:24:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3450ONcx027609; Fri, 5 May 2023 00:24:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3450ONrI027608; Fri, 5 May 2023 00:24:23 GMT (envelope-from git) Date: Fri, 5 May 2023 00:24:23 GMT Message-Id: <202305050024.3450ONrI027608@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Graham Perrin Subject: git: 6f9f3b726b42 - main - sys/sys/_endian.h: typo (Compatiblity) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grahamperrin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6f9f3b726b42fcb834ada692222d76cbcdf64b95 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by grahamperrin: URL: https://cgit.FreeBSD.org/src/commit/?id=6f9f3b726b42fcb834ada692222d76cbcdf64b95 commit 6f9f3b726b42fcb834ada692222d76cbcdf64b95 Author: Igor Ostapenko AuthorDate: 2023-05-05 00:05:11 +0000 Commit: Graham Perrin CommitDate: 2023-05-05 00:23:09 +0000 sys/sys/_endian.h: typo (Compatiblity) https://bugs.freebsd.org/269753 PR: 269753 Reported by: Igor Ostapenko Approved by: doc, src (delphij, imp, zlei) Differential revision: https://reviews.freebsd.org/D38741 --- sys/sys/_endian.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/_endian.h b/sys/sys/_endian.h index 3b4460472eb6..8d1eb3f3f3df 100644 --- a/sys/sys/_endian.h +++ b/sys/sys/_endian.h @@ -38,7 +38,7 @@ #include /* visibility macros */ -/* BSD Compatiblity */ +/* BSD Compatibility */ #define _BYTE_ORDER __BYTE_ORDER__ /* From nobody Fri May 5 00:24:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCBJS3Q0mz4B0Vv; Fri, 5 May 2023 00:24:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCBJS2zCvz47yW; Fri, 5 May 2023 00:24:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683246264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CTY88DeV/DzqEOF3DeAKdpHsjcHeE7jB+ldal7LNsLU=; b=NA3JmUVjxgL54MQj/LSYEEkoxYVwbeSS+LCPcKj9G+o84XxUIOePo2nuHrO5E+LGhm9f9P D4oNM0bisGzql+6FwawfBFDf0sR7TkBM5JdtADWVHYJzQrd/0ixTEqCWNoLrzdxcel3KIq zKWNl+o9XjD5CZcxpja87u3W57IagiPPtI7khieviH/XfkLJx4/ehrFUXrnrQrT1YSPcjE /RpUHWPnjbLO2H2yzTEeAOAlaJE675J9rflRagl3L9OrxFx3I+4SrvMcRF8xgUTk57rpZn Wf/KEox1aIWTzH3U+291/5kC7b0xVkK/L3YF3+EJ17mkyDfdJEh7axq7cz7+rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683246264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CTY88DeV/DzqEOF3DeAKdpHsjcHeE7jB+ldal7LNsLU=; b=fDqcdVz1lIVaYVrKdgSDC9hQrREb9rXL2tmTp3Md+Fl5ZHsu9i6q6WLGdOMeAm8u93ZBAY 9OGCuSawMMZ9grXdiFb5eJ69LKJ8P30ZoQia6iC3uZW4BQXsWGaBVP4prEBhgULb5pbt6P FVdEiW5VfJnnEtMJCtUH6WPDJfGllZZ3G1QBUz4i4EjuGHFcJ4pvGbcdHPbdcOwYFhJyDU OZXTTOb8DnbFYXsynyN016ay7+Gi1DXHEyJBfkY3JqdcDmwUtfW9/KO0h6Z57BSa7KpSQb 293tqGf2zHhbIIyFxI2/+1uwpVP+ztMEqe9N9yjERnzwfM2Djmn6E7nyIASYsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683246264; a=rsa-sha256; cv=none; b=P7wjbbIYjojOBAM3o4TbiCRRiCYTdT98PpEWogodkmHW72zTdWplRiaX+qEVrd8rg+C+zx W9dOFRUeELQQGOIL/GKfwJFGnX8ea8eXtjjSWYemKOcqbLkKtI0INzceB1xt15Og8PKjfH ufDHkIHIUQ1DHO60N1KKDKK3tq88e0k8MG6611DL6n2vcEgpIdtErUX7cxZlByqkvVjRmk 8E+JPvW6iV7kcqmfM/smb+wn1WTWiKZcxqZn+sGj1O0yEklT1rKcVNBfx3IpDDcp3kxMKn xp6+rHoU195vkgv94YUZTenaioMduInjnLnP4xi1XwTF1EtRqx3+qpOpoqNsIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCBJS20DBzYDh; Fri, 5 May 2023 00:24:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3450OOQu027637; Fri, 5 May 2023 00:24:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3450OO3O027636; Fri, 5 May 2023 00:24:24 GMT (envelope-from git) Date: Fri, 5 May 2023 00:24:24 GMT Message-Id: <202305050024.3450OO3O027636@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Graham Perrin Subject: git: a1f2b76761df - main - sys/x86/x86/mptable.c: typo (compatiblity) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grahamperrin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a1f2b76761df83692a030479c4bd09953cf605b3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by grahamperrin: URL: https://cgit.FreeBSD.org/src/commit/?id=a1f2b76761df83692a030479c4bd09953cf605b3 commit a1f2b76761df83692a030479c4bd09953cf605b3 Author: Igor Ostapenko AuthorDate: 2023-05-05 00:08:26 +0000 Commit: Graham Perrin CommitDate: 2023-05-05 00:23:09 +0000 sys/x86/x86/mptable.c: typo (compatiblity) https://bugs.freebsd.org/269753 PR: 269753 Reported by: Igor Ostapenko Approved by: doc, src (delphij, imp, zlei) Differential revision: https://reviews.freebsd.org/D38741 --- sys/x86/x86/mptable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/x86/x86/mptable.c b/sys/x86/x86/mptable.c index 173ffaa09b45..7be9730a7d49 100644 --- a/sys/x86/x86/mptable.c +++ b/sys/x86/x86/mptable.c @@ -1264,7 +1264,7 @@ mptable_host_res_handler(ext_entry_ptr entry, void *arg) break; default: printf( - "MPTable: Unknown compatiblity address space range for bus %u: %d\n", + "MPTable: Unknown compatibility address space range for bus %u: %d\n", cbasm->bus_id, cbasm->predefined_range); return; } From nobody Fri May 5 00:30:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCBQx2vvLz4B1Bx; Fri, 5 May 2023 00:30: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 4QCBQx2QrKz4CHp; Fri, 5 May 2023 00:30:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683246601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AWDhRwAvzbLOH5/G7sKwE9TsbBKxDAULhwEkojiSD0w=; b=HFSR2S3OZi0eEGblISizuV/URx2MYiQPOREkM4UuLwUQ19MJ2zZRRYNQXTZjP/DYzV1ozv edgPa/7IMdk4gObyRy4K7XCPXYxdzDHpXCb7b+zsDuFRa3WqsQhy09PtfXuLGCf5Y26UrY hmFEpkOkwVz/YC/h2IxnBB6a9fC4ZvUKutjYuk7+DfVOADen4PT2cGlN7+WpNVWZoK/qx0 Zx8/Sz9oxSvWamyqU+8fcXDCpcl3s/UkAAK85vt1FHiNirY0nxEyUw8eXKEXDp4uD8DM6/ V9FUV1mKYwRZvxsTIz0bq9uesb9iQuPfCKYLdd2qarFU+xxop0KzhsnNWFIkuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683246601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AWDhRwAvzbLOH5/G7sKwE9TsbBKxDAULhwEkojiSD0w=; b=rKYyNFIOhJhRAzcVQhkBszc1LS3WSYOWkJ7fJoNAO5Z2Ov4Byo3oTJFW2pVFUPPZSCQGAU fEv/ycRvDIkOD7OK2nogqk/mQ9jqFRwzPhGoQZhHJ9CBg38e5lTsk7wPPV0886W9FWUgZX C9438LWwnKr8Omp8vE92yf2oV8JrS0XriexTg5LzQSMrVEZZcqjtr29tPoVXa3+EriA8o/ 7MO44nvJvIau9CfP35Lehcyml5gPpM/Kk8L4OnNMxWIsOL6vogRkPNQk/qci0WU7sIVodl xh2dMlpE44GJCfWxQsf7XAjPryLtaQp+PTfaU1hMMVukrB7KYhkhd4BQUC9T2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683246601; a=rsa-sha256; cv=none; b=f+EBfq8wceDlYrz/37+0BBmgqKt+YyHRS2T5lmTaolZXyD+9UjERHTE5WkUPTTWAZTIKwk TYp+a/gIdjRQlSIWQzL2cZ1w1sqBPhy6D2KxY8aKFtIo9j1qnH10bfToyBu52MWTeLfcZx bOIjtI4t8ku/BecJu90q6jn6HlfQipwTZBGOOwInRVkNaQg7D6TVqDlkkqq2Ucc+/R8/Id 0EQs7XREEobYNW0dvaxcan1OXBnGnjOx0yVi9y0Z06cAseR8sUGkymAeSLeuHzUnQCVox9 BrmaYkVIz/bhWsBdtWF3mt0TPJyoblxlJ+InfcWP5wXLHtNlKSEAbcw+kGFXHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCBQx1X7PzYT9; Fri, 5 May 2023 00:30:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3450U14k030246; Fri, 5 May 2023 00:30:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3450U12R030243; Fri, 5 May 2023 00:30:01 GMT (envelope-from git) Date: Fri, 5 May 2023 00:30:01 GMT Message-Id: <202305050030.3450U12R030243@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ravi Pokala Subject: git: 861fdb46300b - stable/13 - jedec_dimm(4): Add manufacturing year and week. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rpokala X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 861fdb46300bd16808ca443ecc222f10db02d53d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rpokala: URL: https://cgit.FreeBSD.org/src/commit/?id=861fdb46300bd16808ca443ecc222f10db02d53d commit 861fdb46300bd16808ca443ecc222f10db02d53d Author: Ravi Pokala AuthorDate: 2023-04-25 06:07:39 +0000 Commit: Ravi Pokala CommitDate: 2023-05-05 00:27:55 +0000 jedec_dimm(4): Add manufacturing year and week. DDR3 and DDR4 encode the week and year that the DIMM was manufactured, as a pair of two-digit binary-coded decimal values. Read the values, and report them as (uint8_t)s. Reviewed by: imp, jhb MFC after: 1 week Sponsored by: Panasas Differential Revision: https://reviews.freebsd.org/D39795 (cherry picked from commit de57e0ef5a15c75231191e643d4d1949ddbca92d) --- share/man/man4/jedec_dimm.4 | 10 ++- sys/dev/jedec_dimm/jedec_dimm.c | 131 +++++++++++++++++++++++++++++++++++++++- sys/dev/jedec_dimm/jedec_dimm.h | 6 +- 3 files changed, 144 insertions(+), 3 deletions(-) diff --git a/share/man/man4/jedec_dimm.4 b/share/man/man4/jedec_dimm.4 index ea4183fafc1a..6c13da1a450e 100644 --- a/share/man/man4/jedec_dimm.4 +++ b/share/man/man4/jedec_dimm.4 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 31, 2018 +.Dd April 25, 2023 .Dt JEDEC_DIMM 4 .Os .Sh NAME @@ -76,6 +76,10 @@ interface; all values are read-only: a string description of the DIMM, including TSOD and slotid info if present. .It Va dev.jedec_dimm.X.capacity the DIMM's memory capacity, in megabytes +.It Va dev.jedec_dimm.X.mfg_week +the week within the year in which the DIMM was manufactured +.It Va dev.jedec_dimm.X.mfg_year +the year in which the DIMM was manufactured .It Va dev.jedec_dimm.X.part the manufacturer's part number of the DIMM .It Va dev.jedec_dimm.X.serial @@ -144,6 +148,8 @@ dev.jedec_dimm.0.%location: addr=0xa0 dev.jedec_dimm.0.%parent: smbus0 dev.jedec_dimm.0.%pnpinfo: dev.jedec_dimm.0.capacity: 16384 +dev.jedec_dimm.0.mfg_week: 30 +dev.jedec_dimm.0.mfg_year: 17 dev.jedec_dimm.0.part: 36ASF2G72PZ-2G1A2 dev.jedec_dimm.0.serial: 0ea815de dev.jedec_dimm.0.slotid: A1 @@ -156,6 +162,8 @@ dev.jedec_dimm.6.%location: addr=0xa8 dev.jedec_dimm.6.%parent: smbus1 dev.jedec_dimm.6.%pnpinfo: dev.jedec_dimm.6.capacity: 8192 +dev.jedec_dimm.6.mfg_week: 13 +dev.jedec_dimm.6.mfg_year: 19 dev.jedec_dimm.6.part: VRA9MR8B2H1603 dev.jedec_dimm.6.serial: 0c4c46ad dev.jedec_dimm.6.temp: 43.1C diff --git a/sys/dev/jedec_dimm/jedec_dimm.c b/sys/dev/jedec_dimm/jedec_dimm.c index 884da8b51061..73ea10c5c5e1 100644 --- a/sys/dev/jedec_dimm/jedec_dimm.c +++ b/sys/dev/jedec_dimm/jedec_dimm.c @@ -4,7 +4,7 @@ * Authors: Ravi Pokala (rpokala@freebsd.org), Andriy Gapon (avg@FreeBSD.org) * * Copyright (c) 2016 Andriy Gapon - * Copyright (c) 2018 Panasas + * Copyright (c) 2018-2023 Panasas * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -56,6 +56,8 @@ struct jedec_dimm_softc { device_t smbus; uint8_t spd_addr; /* SMBus address of the SPD EEPROM. */ uint8_t tsod_addr; /* Address of the Thermal Sensor On DIMM */ + uint8_t mfg_year; + uint8_t mfg_week; uint32_t capacity_mb; char type_str[5]; char part_str[21]; /* 18 (DDR3) or 20 (DDR4) chars, plus terminator */ @@ -154,6 +156,9 @@ static int jedec_dimm_dump(struct jedec_dimm_softc *sc, enum dram_type type); static int jedec_dimm_field_to_str(struct jedec_dimm_softc *sc, char *dst, size_t dstsz, uint16_t offset, uint16_t len, bool ascii); +static int jedec_dimm_mfg_date(struct jedec_dimm_softc *sc, enum dram_type type, + uint8_t *year, uint8_t *week); + static int jedec_dimm_probe(device_t dev); static int jedec_dimm_readw_be(struct jedec_dimm_softc *sc, uint8_t reg, @@ -257,6 +262,11 @@ jedec_dimm_attach(device_t dev) goto out; } + rc = jedec_dimm_mfg_date(sc, type, &sc->mfg_year, &sc->mfg_week); + if (rc != 0) { + goto out; + } + rc = jedec_dimm_field_to_str(sc, sc->part_str, sizeof(sc->part_str), partnum_offset, partnum_len, true); if (rc != 0) { @@ -336,6 +346,14 @@ no_tsod: CTLFLAG_RD | CTLFLAG_MPSAFE, sc->serial_str, 0, "DIMM Serial Number"); + SYSCTL_ADD_U8(ctx, children, OID_AUTO, "mfg_year", + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, sc->mfg_year, + "DIMM manufacturing year (20xx)"); + + SYSCTL_ADD_U8(ctx, children, OID_AUTO, "mfg_week", + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, sc->mfg_week, + "DIMM manufacturing week"); + /* Create the temperature sysctl IFF the TSOD is present and valid */ if (tsod_present && (tsod_match != NULL)) { SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "temp", @@ -822,6 +840,117 @@ out: return (rc); } +/** + * Both DDR3 and DDR4 encode manufacturing date as a one-byte BCD-encoded + * year (offset from 2000) and a one-byte BCD-encoded week within that year. + * The SPD offsets are different between the two types. + * + * @author rpokala + * + * @param[in] sc + * Instance-specific context data + * + * @param[in] dram_type + * The locations of the manufacturing date depends on the type of the DIMM. + * + * @param[out] year + * The manufacturing year, offset from 2000 + * + * @param[out] week + * The manufacturing week within the year + */ +static int +jedec_dimm_mfg_date(struct jedec_dimm_softc *sc, enum dram_type type, + uint8_t *year, uint8_t *week) +{ + uint8_t year_bcd; + uint8_t week_bcd; + uint16_t year_offset; + uint16_t week_offset; + bool page_changed; + int rc; + + switch (type) { + case DRAM_TYPE_DDR3_SDRAM: + year_offset = SPD_OFFSET_DDR3_MOD_MFG_YEAR; + week_offset = SPD_OFFSET_DDR3_MOD_MFG_WEEK; + break; + case DRAM_TYPE_DDR4_SDRAM: + year_offset = SPD_OFFSET_DDR4_MOD_MFG_YEAR; + week_offset = SPD_OFFSET_DDR4_MOD_MFG_WEEK; + break; + default: + device_printf(sc->dev, "unsupported dram_type 0x%02x\n", type); + rc = EINVAL; + page_changed = false; + goto out; + } + + /* Change to the proper page. Offsets [0, 255] are in page0; offsets + * [256, 512] are in page1. + * + * *The page must be reset to page0 before returning.* + * + * For the page-change operation, only the DTI and LSA matter; the + * offset and write-value are ignored, so use just 0. + * + * Mercifully, JEDEC defined the fields such that all of the + * manufacturing-related ones are on the same page, so we don't need to + * worry about that complication. + */ + if (year_offset < JEDEC_SPD_PAGE_SIZE) { + page_changed = false; + } else if (year_offset < (2 * JEDEC_SPD_PAGE_SIZE)) { + page_changed = true; + rc = smbus_writeb(sc->smbus, + (JEDEC_DTI_PAGE | JEDEC_LSA_PAGE_SET1), 0, 0); + if (rc != 0) { + device_printf(sc->dev, + "unable to change page for offset 0x%04x: %d\n", + year_offset, rc); + } + /* Adjust the offset to account for the page change. */ + year_offset -= JEDEC_SPD_PAGE_SIZE; + week_offset -= JEDEC_SPD_PAGE_SIZE; + } else { + device_printf(sc->dev, "invalid offset 0x%04x\n", year_offset); + rc = EINVAL; + page_changed = false; + goto out; + } + + rc = smbus_readb(sc->smbus, sc->spd_addr, year_offset, &year_bcd); + if (rc != 0) { + device_printf(sc->dev, "failed to read mfg year: %d\n", rc); + goto out; + } + + rc = smbus_readb(sc->smbus, sc->spd_addr, week_offset, &week_bcd); + if (rc != 0) { + device_printf(sc->dev, "failed to read mfg week: %d\n", rc); + goto out; + } + + /* Convert from one-byte BCD to one-byte integer. */ + *year = (((year_bcd & 0xf0) >> 4) * 10) + (year_bcd & 0x0f); + *week = (((week_bcd & 0xf0) >> 4) * 10) + (week_bcd & 0x0f); + +out: + if (page_changed) { + int rc2; + /* Switch back to page0 before returning. */ + rc2 = smbus_writeb(sc->smbus, + (JEDEC_DTI_PAGE | JEDEC_LSA_PAGE_SET0), 0, 0); + if (rc2 != 0) { + device_printf(sc->dev, + "unable to restore page for offset 0x%04x: %d\n", + year_offset, rc2); + } + } + + return (rc); +} + /** * device_probe() method. Validate the address that was given as a hint, and * display an error if it's bogus. Make sure that we're dealing with one of the diff --git a/sys/dev/jedec_dimm/jedec_dimm.h b/sys/dev/jedec_dimm/jedec_dimm.h index 3b330251efc5..00a9b3d521b6 100644 --- a/sys/dev/jedec_dimm/jedec_dimm.h +++ b/sys/dev/jedec_dimm/jedec_dimm.h @@ -3,7 +3,7 @@ * * Authors: Ravi Pokala (rpokala@freebsd.org) * - * Copyright (c) 2018 Panasas + * Copyright (c) 2018-2023 Panasas * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -90,6 +90,8 @@ #define SPD_OFFSET_DDR3_SDRAM_WIDTH 7 #define SPD_OFFSET_DDR3_BUS_WIDTH 8 #define SPD_OFFSET_DDR3_TSOD_PRESENT 32 +#define SPD_OFFSET_DDR3_MOD_MFG_YEAR 120 +#define SPD_OFFSET_DDR3_MOD_MFG_WEEK 121 #define SPD_OFFSET_DDR3_SERIAL 122 #define SPD_LEN_DDR3_SERIAL 4 #define SPD_OFFSET_DDR3_PARTNUM 128 @@ -100,6 +102,8 @@ #define SPD_OFFSET_DDR4_SDRAM_WIDTH 12 #define SPD_OFFSET_DDR4_BUS_WIDTH 13 #define SPD_OFFSET_DDR4_TSOD_PRESENT 14 +#define SPD_OFFSET_DDR4_MOD_MFG_YEAR 323 +#define SPD_OFFSET_DDR4_MOD_MFG_WEEK 324 #define SPD_OFFSET_DDR4_SERIAL 325 #define SPD_LEN_DDR4_SERIAL 4 #define SPD_OFFSET_DDR4_PARTNUM 329 From nobody Fri May 5 00:30:02 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCBQy3XjYz4B1Mv; Fri, 5 May 2023 00:30:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCBQy2xS3z4BsT; Fri, 5 May 2023 00:30:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683246602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LUWeaDKLoYewqPMhuI4IWCuraONZtaY8nzSu6V9/57k=; b=do7ZpI/TGU2g7cSp3ipUSeMSTyqVFKNEwYbPgVlvq1y7leVwuxm5bQ6mRATXFr2MfJiM7F V1VPwmU9nfX1Fvdu70HSvVlLT72z5XuLgekJQUCd1SYxgHGCGnvBiRDEpyHY03PdP3Y79B /ycsAGGaXUE+FqxfQKjz6Jj5QnvWOAVourj0/fa/PS4J13g2Dp+YX0CMfp+Pr96jT893L4 jF73NrmHhFum3wd1yBu6Y3Y4+Oo+/vlG1e19IWQkQsgGFtDWbUMZ75fG0tjYsClOukwy5B ciozloimTXl5L/KJ+ono/eduEIRjgdhQ7QK1hTrSlsDAaU/rT1m83txqdGH7Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683246602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LUWeaDKLoYewqPMhuI4IWCuraONZtaY8nzSu6V9/57k=; b=hVFQZtlw4W+OUGYW0++NxxyJZwdDTjuHCcMw/Oz+mZ3Np6JEl1N2YB3B9HdDb/sUfTV50I Eo1g7x82xdG25NRtVnWi7yyASQB2PCwHk3HrMrnazPHBtF9ep4tw90liP1TG5ujhPNqlE/ qI3A4qrXbQN+Hne0niPPzYF1ptk6/lAQzNCvshVF5knQdwbpCx6xbZs/x+ikQgpG5eLFwD smUrl2Lhv5IUHY0f0o4fKYTpJI/zfXucTumW6JFvMfCluRQ5gxGhe53QL+plJYbmr3MTUA IreqyQdaMxE7gFyHG5481qr/MInpJ0XzRwwXI/754jaAx2bNoj1X0wwpb/5kqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683246602; a=rsa-sha256; cv=none; b=Ek1gOmhh8bWjJg2yopaMutEu7VDQHg/yZamYdDeehlqlZbfbhq0Bq0TtYpfLPH9fvTxjSY Dk54Y+zxEdJGF9TL/Fv2UJ/SPCxsTtoOQDvIX7+MCGmFhWfWLKVRm2pyHdzDi1CPPBN5cx GJLaZ2W+Km4nCBFOtj4Ychk/qXB4RnjsHWMovCdO29sFnCACQsNvEtqxggEaunDpBs3sxU doskkHMJryUhyf3/EkpBM0VTtXnOhf55UB3U3qyZLmIetgate1ieBHYgRYOByltvqrYlRS NpxiyTU7f3T4yCyZ7M9BasZLDZoVAu1hpLAhtdZbmCRoL7b6QGEPgU0GUujlmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCBQy21KgzYTB; Fri, 5 May 2023 00:30:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3450U2lk030501; Fri, 5 May 2023 00:30:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3450U2XO030498; Fri, 5 May 2023 00:30:02 GMT (envelope-from git) Date: Fri, 5 May 2023 00:30:02 GMT Message-Id: <202305050030.3450U2XO030498@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ravi Pokala Subject: git: fa63175685bf - stable/13 - jedec_dimm(4): Refactor offset adjustment and page0 reset List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rpokala X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fa63175685bf81e6b6ec2b1a6db95f8c57449939 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by rpokala: URL: https://cgit.FreeBSD.org/src/commit/?id=fa63175685bf81e6b6ec2b1a6db95f8c57449939 commit fa63175685bf81e6b6ec2b1a6db95f8c57449939 Author: Ravi Pokala AuthorDate: 2023-04-27 05:03:48 +0000 Commit: Ravi Pokala CommitDate: 2023-05-05 00:28:18 +0000 jedec_dimm(4): Refactor offset adjustment and page0 reset Offsets greater than 255 bytes reside on page1 of the SPD device. Accessing them requires switching to page1, and adjusting the absolute offset to be relative to the start of page1. After the access, the page must be set back to page0. These operations are performed in several places, so break them out into their own functions. Also, replace a pair of default cases, which should be impossible due to earlier checks, with __assert_unreachable(). Reviewed by: imp MFC after: 1 week Sponsored by: Panasas Differential Revision: https://reviews.freebsd.org/D39842 (cherry picked from commit 15d69c840d860a8c0decb063f768ad695427a0d4) --- sys/dev/jedec_dimm/jedec_dimm.c | 176 +++++++++++++++++++++++++++------------- 1 file changed, 121 insertions(+), 55 deletions(-) diff --git a/sys/dev/jedec_dimm/jedec_dimm.c b/sys/dev/jedec_dimm/jedec_dimm.c index 73ea10c5c5e1..240fbe230d9f 100644 --- a/sys/dev/jedec_dimm/jedec_dimm.c +++ b/sys/dev/jedec_dimm/jedec_dimm.c @@ -144,6 +144,9 @@ const struct jedec_dimm_tsod_dev { { 0x104a, 0x03, "ST Microelectronics TSOD" }, }; +static int jedec_dimm_adjust_offset(struct jedec_dimm_softc *sc, + uint16_t orig_offset, uint16_t *new_offset, bool *page_changed); + static int jedec_dimm_attach(device_t dev); static int jedec_dimm_capacity(struct jedec_dimm_softc *sc, enum dram_type type, @@ -164,11 +167,81 @@ static int jedec_dimm_probe(device_t dev); static int jedec_dimm_readw_be(struct jedec_dimm_softc *sc, uint8_t reg, uint16_t *val); +static int jedec_dimm_reset_page0(struct jedec_dimm_softc *sc); + static int jedec_dimm_temp_sysctl(SYSCTL_HANDLER_ARGS); static const char *jedec_dimm_tsod_match(uint16_t vid, uint16_t did); +/** + * The DDR4 SPD information is spread across two 256-byte pages, but the + * offsets in the spec are absolute, not per-page. If a given offset is on the + * second page, we need to change to that page and adjust the offset to be + * relative to that page. + * + * @author rpokala + * + * @param[in] sc + * Instance-specific context data + * + * @param[in] orig_offset + * The original value of the offset, before any adjustment is made. + * + * @param[out] new_offset + * The offset to actually read from, adjusted if needed. + * + * @param[out] page_changed + * Whether or not the page was actually changed, and the offset adjusted. + * *If 'true', caller must call reset_page0() before itself returning.* + */ +static int +jedec_dimm_adjust_offset(struct jedec_dimm_softc *sc, uint16_t orig_offset, + uint16_t *new_offset, bool *page_changed) +{ + int rc; + + /* Don't change the offset, or indicate that the page has been changed, + * until the page has actually been changed. + */ + *new_offset = orig_offset; + *page_changed = false; + + /* Change to the proper page. Offsets [0, 255] are in page0; offsets + * [256, 511] are in page1. + */ + if (orig_offset < JEDEC_SPD_PAGE_SIZE) { + /* Within page0; no adjustment or page-change required. */ + rc = 0; + goto out; + } else if (orig_offset >= (2 * JEDEC_SPD_PAGE_SIZE)) { + /* Outside of expected range. */ + rc = EINVAL; + device_printf(sc->dev, "invalid offset 0x%04x\n", orig_offset); + goto out; + } + + /* 'orig_offset' is in page1. Switch to that page, and adjust + * 'new_offset' accordingly if successful. + * + * For the page-change operation, only the DTI and LSA matter; the + * offset and write-value are ignored, so just use 0. + */ + rc = smbus_writeb(sc->smbus, (JEDEC_DTI_PAGE | JEDEC_LSA_PAGE_SET1), + 0, 0); + if (rc != 0) { + device_printf(sc->dev, + "unable to change page for offset 0x%04x: %d\n", + orig_offset, rc); + goto out; + } + *page_changed = true; + *new_offset = orig_offset - JEDEC_SPD_PAGE_SIZE; + +out: + return (rc); +} + /** * device_attach() method. Read the DRAM type, use that to determine the offsets * and lengths of the asset string fields. Calculate the capacity. If a TSOD is @@ -458,9 +531,7 @@ jedec_dimm_capacity(struct jedec_dimm_softc *sc, enum dram_type type, sdram_width_offset = SPD_OFFSET_DDR4_SDRAM_WIDTH; break; default: - device_printf(sc->dev, "unsupported dram_type 0x%02x\n", type); - rc = EINVAL; - goto out; + __assert_unreachable(); } rc = smbus_readb(sc->smbus, sc->spd_addr, bus_width_offset, @@ -673,14 +744,13 @@ jedec_dimm_dump(struct jedec_dimm_softc *sc, enum dram_type type) out: if (page_changed) { int rc2; - /* Switch back to page0 before returning. */ - rc2 = smbus_writeb(sc->smbus, - (JEDEC_DTI_PAGE | JEDEC_LSA_PAGE_SET0), 0, 0); - if (rc2 != 0) { - device_printf(sc->dev, "unable to restore page: %d\n", - rc2); + + rc2 = jedec_dimm_reset_page0(sc); + if ((rc2 != 0) && (rc == 0)) { + rc = rc2; } } + return (rc); } @@ -715,54 +785,29 @@ jedec_dimm_field_to_str(struct jedec_dimm_softc *sc, char *dst, size_t dstsz, uint16_t offset, uint16_t len, bool ascii) { uint8_t byte; + uint16_t new_offset; int i; int rc; bool page_changed; - /* Change to the proper page. Offsets [0, 255] are in page0; offsets - * [256, 512] are in page1. - * - * *The page must be reset to page0 before returning.* - * - * For the page-change operation, only the DTI and LSA matter; the - * offset and write-value are ignored, so use just 0. - * - * Mercifully, JEDEC defined the fields such that none of them cross - * pages, so we don't need to worry about that complication. - */ - if (offset < JEDEC_SPD_PAGE_SIZE) { - page_changed = false; - } else if (offset < (2 * JEDEC_SPD_PAGE_SIZE)) { - page_changed = true; - rc = smbus_writeb(sc->smbus, - (JEDEC_DTI_PAGE | JEDEC_LSA_PAGE_SET1), 0, 0); - if (rc != 0) { - device_printf(sc->dev, - "unable to change page for offset 0x%04x: %d\n", - offset, rc); - } - /* Adjust the offset to account for the page change. */ - offset -= JEDEC_SPD_PAGE_SIZE; - } else { - page_changed = false; - rc = EINVAL; - device_printf(sc->dev, "invalid offset 0x%04x\n", offset); + rc = jedec_dimm_adjust_offset(sc, offset, &new_offset, &page_changed); + if (rc != 0) { goto out; } /* Sanity-check (adjusted) offset and length; everything must be within * the same page. */ - if (offset >= JEDEC_SPD_PAGE_SIZE) { + if (new_offset >= JEDEC_SPD_PAGE_SIZE) { rc = EINVAL; - device_printf(sc->dev, "invalid offset 0x%04x\n", offset); + device_printf(sc->dev, "invalid offset 0x%04x\n", new_offset); goto out; } - if ((offset + len) >= JEDEC_SPD_PAGE_SIZE) { + if ((new_offset + len) >= JEDEC_SPD_PAGE_SIZE) { rc = EINVAL; device_printf(sc->dev, - "(offset + len) would cross page (0x%04x + 0x%04x)\n", - offset, len); + "(new_offset + len) would cross page (0x%04x + 0x%04x)\n", + new_offset, len); goto out; } @@ -793,11 +838,12 @@ jedec_dimm_field_to_str(struct jedec_dimm_softc *sc, char *dst, size_t dstsz, /* Read a byte at a time. */ for (i = 0; i < len; i++) { - rc = smbus_readb(sc->smbus, sc->spd_addr, (offset + i), &byte); + rc = smbus_readb(sc->smbus, sc->spd_addr, (new_offset + i), + &byte); if (rc != 0) { device_printf(sc->dev, "failed to read byte at 0x%02x: %d\n", - (offset + i), rc); + (new_offset + i), rc); goto out; } if (ascii) { @@ -827,13 +873,10 @@ jedec_dimm_field_to_str(struct jedec_dimm_softc *sc, char *dst, size_t dstsz, out: if (page_changed) { int rc2; - /* Switch back to page0 before returning. */ - rc2 = smbus_writeb(sc->smbus, - (JEDEC_DTI_PAGE | JEDEC_LSA_PAGE_SET0), 0, 0); - if (rc2 != 0) { - device_printf(sc->dev, - "unable to restore page for offset 0x%04x: %d\n", - offset, rc2); + + rc2 = jedec_dimm_reset_page0(sc); + if ((rc2 != 0) && (rc == 0)) { + rc = rc2; } } @@ -880,10 +923,7 @@ jedec_dimm_mfg_date(struct jedec_dimm_softc *sc, enum dram_type type, week_offset = SPD_OFFSET_DDR4_MOD_MFG_WEEK; break; default: - device_printf(sc->dev, "unsupported dram_type 0x%02x\n", type); - rc = EINVAL; - page_changed = false; - goto out; + __assert_unreachable(); } /* Change to the proper page. Offsets [0, 255] are in page0; offsets @@ -1041,6 +1081,32 @@ out: return (rc); } +/** + * Reset to the default condition of operating on page0. This must be called + * after a previous operation changed to page1. + * + * @author rpokala + * + * @param[in] sc + * Instance-specific context data + */ +static int +jedec_dimm_reset_page0(struct jedec_dimm_softc *sc) +{ + int rc; + + /* For the page-change operation, only the DTI and LSA matter; the + * offset and write-value are ignored, so just use 0. + */ + rc = smbus_writeb(sc->smbus, (JEDEC_DTI_PAGE | JEDEC_LSA_PAGE_SET0), + 0, 0); + if (rc != 0) { + device_printf(sc->dev, "unable to restore page: %d\n", rc); + } + + return (rc); +} + /** * Read the temperature data from the TSOD and convert it to the deciKelvin * value that the sysctl expects. From nobody Fri May 5 00:30:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCBRr29kMz4B19R; Fri, 5 May 2023 00:30: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 4QCBRr1grSz4CWg; Fri, 5 May 2023 00:30:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683246648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H+mdj6JACQVYK6UhVK11DZ+5M7XmriASaN3HbnGLeJc=; b=mQdSOLRaOtslvyVG7/2lluS/ecvzecTABm9aK9VaxR+BRLXNgK+h7oamof+Wxmjq4c8vOZ As7YhZ7VNIzybXdZBGasHdgrFSTEYjMbw9cS7N5JYYGYCxA4MxsGihiiaY7IJX3sMRmvde PwE+tBW54HPmrIXUJn2qBx52LXImamiw/CYxbLReYEHGZ0VTqSpJ5pbLDqAd+tnNXmnsup vuDR2/4ojXDBrReKxPQDYfX77YyI77fqWU4KEY35n3S0MW1DSETl98H19q9hxDshRS6Jyo INc+cPO46sGf1OJ+FaF6vSVpOiO3Q8Z3UXSbgBVK0ip5m55JNNiVw2nYn8c4Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683246648; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H+mdj6JACQVYK6UhVK11DZ+5M7XmriASaN3HbnGLeJc=; b=cHaCnVq72pOJjw3kTbu9wlBR7mQlrR4F+7HZB3iEk0I5HrgKgTwbfZfrPcCbsxur6W+tdh ZBTZM6ZmIRwd3LTSqrbncPxq+Ga9eC3UEl4woAPmK3SQa+tnPmYyZvITd7AuswHQtNEVap +M19q2yHnT5Td//5109QmFMnfdiUuiQB4amKfwS8POZrd7q9m7Nn06V8ubzKBsLoo7ONSf OYWZQh2Z5OEe6TzjkT3IFpKofIjrtsaQF+DxUr8Ix+y4ed5C2vYtx0qfoeG82K9DPP+BTG ig0JnRWzuG9zFkfCRHcNhH5tr3YLW3xE/VkOZf1xOX7hdx36vzkTFbr5hkEN5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683246648; a=rsa-sha256; cv=none; b=SPVfySJikex9TZz7K2GZuj4tQ7KvZBb4K023nQlSvWecAGuRR+TZ/6tla5iMl6dwaGmtT6 DTRJlF3siWlP/e1tmTGWoOBj/BPhBGkfQKDbRDaOzaneUSntH0q3IU7AElHBjKiWLAbLim EKqITluSAELt5C+mtVIlEpw5KhGxr6ugkTX2OnVFiGLSrkKlWj4YIxuEsTD+Lzng318Rf/ DnVyXOC0O4a3ZOFmbldZ9ANrVufIdl05K54MJipM48r77vveh/erFGBmUowPmjjadn7DgO LPsOio4nCTR/wa40N92p7e96Dt0Q/tui8ZAYAv2XEaYVf4WBb9iJ1dD4liM90g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCBRr0n2SzYPm; Fri, 5 May 2023 00:30:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3450Um8Z038037; Fri, 5 May 2023 00:30:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3450UmK0038036; Fri, 5 May 2023 00:30:48 GMT (envelope-from git) Date: Fri, 5 May 2023 00:30:48 GMT Message-Id: <202305050030.3450UmK0038036@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ravi Pokala Subject: git: a9ee57e46ff0 - stable/12 - jedec_dimm(4): Add manufacturing year and week. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rpokala X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: a9ee57e46ff09dbe2bd8b1c8258fb70b71a3d477 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by rpokala: URL: https://cgit.FreeBSD.org/src/commit/?id=a9ee57e46ff09dbe2bd8b1c8258fb70b71a3d477 commit a9ee57e46ff09dbe2bd8b1c8258fb70b71a3d477 Author: Ravi Pokala AuthorDate: 2023-04-25 06:07:39 +0000 Commit: Ravi Pokala CommitDate: 2023-05-05 00:30:19 +0000 jedec_dimm(4): Add manufacturing year and week. DDR3 and DDR4 encode the week and year that the DIMM was manufactured, as a pair of two-digit binary-coded decimal values. Read the values, and report them as (uint8_t)s. Reviewed by: imp, jhb MFC after: 1 week Sponsored by: Panasas Differential Revision: https://reviews.freebsd.org/D39795 (cherry picked from commit de57e0ef5a15c75231191e643d4d1949ddbca92d) --- share/man/man4/jedec_dimm.4 | 10 ++- sys/dev/jedec_dimm/jedec_dimm.c | 131 +++++++++++++++++++++++++++++++++++++++- sys/dev/jedec_dimm/jedec_dimm.h | 6 +- 3 files changed, 144 insertions(+), 3 deletions(-) diff --git a/share/man/man4/jedec_dimm.4 b/share/man/man4/jedec_dimm.4 index ea4183fafc1a..6c13da1a450e 100644 --- a/share/man/man4/jedec_dimm.4 +++ b/share/man/man4/jedec_dimm.4 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 31, 2018 +.Dd April 25, 2023 .Dt JEDEC_DIMM 4 .Os .Sh NAME @@ -76,6 +76,10 @@ interface; all values are read-only: a string description of the DIMM, including TSOD and slotid info if present. .It Va dev.jedec_dimm.X.capacity the DIMM's memory capacity, in megabytes +.It Va dev.jedec_dimm.X.mfg_week +the week within the year in which the DIMM was manufactured +.It Va dev.jedec_dimm.X.mfg_year +the year in which the DIMM was manufactured .It Va dev.jedec_dimm.X.part the manufacturer's part number of the DIMM .It Va dev.jedec_dimm.X.serial @@ -144,6 +148,8 @@ dev.jedec_dimm.0.%location: addr=0xa0 dev.jedec_dimm.0.%parent: smbus0 dev.jedec_dimm.0.%pnpinfo: dev.jedec_dimm.0.capacity: 16384 +dev.jedec_dimm.0.mfg_week: 30 +dev.jedec_dimm.0.mfg_year: 17 dev.jedec_dimm.0.part: 36ASF2G72PZ-2G1A2 dev.jedec_dimm.0.serial: 0ea815de dev.jedec_dimm.0.slotid: A1 @@ -156,6 +162,8 @@ dev.jedec_dimm.6.%location: addr=0xa8 dev.jedec_dimm.6.%parent: smbus1 dev.jedec_dimm.6.%pnpinfo: dev.jedec_dimm.6.capacity: 8192 +dev.jedec_dimm.6.mfg_week: 13 +dev.jedec_dimm.6.mfg_year: 19 dev.jedec_dimm.6.part: VRA9MR8B2H1603 dev.jedec_dimm.6.serial: 0c4c46ad dev.jedec_dimm.6.temp: 43.1C diff --git a/sys/dev/jedec_dimm/jedec_dimm.c b/sys/dev/jedec_dimm/jedec_dimm.c index e6d421e32ec7..b10b2a7bc8f5 100644 --- a/sys/dev/jedec_dimm/jedec_dimm.c +++ b/sys/dev/jedec_dimm/jedec_dimm.c @@ -4,7 +4,7 @@ * Authors: Ravi Pokala (rpokala@freebsd.org), Andriy Gapon (avg@FreeBSD.org) * * Copyright (c) 2016 Andriy Gapon - * Copyright (c) 2018 Panasas + * Copyright (c) 2018-2023 Panasas * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -56,6 +56,8 @@ struct jedec_dimm_softc { device_t smbus; uint8_t spd_addr; /* SMBus address of the SPD EEPROM. */ uint8_t tsod_addr; /* Address of the Thermal Sensor On DIMM */ + uint8_t mfg_year; + uint8_t mfg_week; uint32_t capacity_mb; char type_str[5]; char part_str[21]; /* 18 (DDR3) or 20 (DDR4) chars, plus terminator */ @@ -154,6 +156,9 @@ static int jedec_dimm_dump(struct jedec_dimm_softc *sc, enum dram_type type); static int jedec_dimm_field_to_str(struct jedec_dimm_softc *sc, char *dst, size_t dstsz, uint16_t offset, uint16_t len, bool ascii); +static int jedec_dimm_mfg_date(struct jedec_dimm_softc *sc, enum dram_type type, + uint8_t *year, uint8_t *week); + static int jedec_dimm_probe(device_t dev); static int jedec_dimm_readw_be(struct jedec_dimm_softc *sc, uint8_t reg, @@ -257,6 +262,11 @@ jedec_dimm_attach(device_t dev) goto out; } + rc = jedec_dimm_mfg_date(sc, type, &sc->mfg_year, &sc->mfg_week); + if (rc != 0) { + goto out; + } + rc = jedec_dimm_field_to_str(sc, sc->part_str, sizeof(sc->part_str), partnum_offset, partnum_len, true); if (rc != 0) { @@ -336,6 +346,14 @@ no_tsod: CTLFLAG_RD | CTLFLAG_MPSAFE, sc->serial_str, 0, "DIMM Serial Number"); + SYSCTL_ADD_U8(ctx, children, OID_AUTO, "mfg_year", + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, sc->mfg_year, + "DIMM manufacturing year (20xx)"); + + SYSCTL_ADD_U8(ctx, children, OID_AUTO, "mfg_week", + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, sc->mfg_week, + "DIMM manufacturing week"); + /* Create the temperature sysctl IFF the TSOD is present and valid */ if (tsod_present && (tsod_match != NULL)) { SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "temp", @@ -822,6 +840,117 @@ out: return (rc); } +/** + * Both DDR3 and DDR4 encode manufacturing date as a one-byte BCD-encoded + * year (offset from 2000) and a one-byte BCD-encoded week within that year. + * The SPD offsets are different between the two types. + * + * @author rpokala + * + * @param[in] sc + * Instance-specific context data + * + * @param[in] dram_type + * The locations of the manufacturing date depends on the type of the DIMM. + * + * @param[out] year + * The manufacturing year, offset from 2000 + * + * @param[out] week + * The manufacturing week within the year + */ +static int +jedec_dimm_mfg_date(struct jedec_dimm_softc *sc, enum dram_type type, + uint8_t *year, uint8_t *week) +{ + uint8_t year_bcd; + uint8_t week_bcd; + uint16_t year_offset; + uint16_t week_offset; + bool page_changed; + int rc; + + switch (type) { + case DRAM_TYPE_DDR3_SDRAM: + year_offset = SPD_OFFSET_DDR3_MOD_MFG_YEAR; + week_offset = SPD_OFFSET_DDR3_MOD_MFG_WEEK; + break; + case DRAM_TYPE_DDR4_SDRAM: + year_offset = SPD_OFFSET_DDR4_MOD_MFG_YEAR; + week_offset = SPD_OFFSET_DDR4_MOD_MFG_WEEK; + break; + default: + device_printf(sc->dev, "unsupported dram_type 0x%02x\n", type); + rc = EINVAL; + page_changed = false; + goto out; + } + + /* Change to the proper page. Offsets [0, 255] are in page0; offsets + * [256, 512] are in page1. + * + * *The page must be reset to page0 before returning.* + * + * For the page-change operation, only the DTI and LSA matter; the + * offset and write-value are ignored, so use just 0. + * + * Mercifully, JEDEC defined the fields such that all of the + * manufacturing-related ones are on the same page, so we don't need to + * worry about that complication. + */ + if (year_offset < JEDEC_SPD_PAGE_SIZE) { + page_changed = false; + } else if (year_offset < (2 * JEDEC_SPD_PAGE_SIZE)) { + page_changed = true; + rc = smbus_writeb(sc->smbus, + (JEDEC_DTI_PAGE | JEDEC_LSA_PAGE_SET1), 0, 0); + if (rc != 0) { + device_printf(sc->dev, + "unable to change page for offset 0x%04x: %d\n", + year_offset, rc); + } + /* Adjust the offset to account for the page change. */ + year_offset -= JEDEC_SPD_PAGE_SIZE; + week_offset -= JEDEC_SPD_PAGE_SIZE; + } else { + device_printf(sc->dev, "invalid offset 0x%04x\n", year_offset); + rc = EINVAL; + page_changed = false; + goto out; + } + + rc = smbus_readb(sc->smbus, sc->spd_addr, year_offset, &year_bcd); + if (rc != 0) { + device_printf(sc->dev, "failed to read mfg year: %d\n", rc); + goto out; + } + + rc = smbus_readb(sc->smbus, sc->spd_addr, week_offset, &week_bcd); + if (rc != 0) { + device_printf(sc->dev, "failed to read mfg week: %d\n", rc); + goto out; + } + + /* Convert from one-byte BCD to one-byte integer. */ + *year = (((year_bcd & 0xf0) >> 4) * 10) + (year_bcd & 0x0f); + *week = (((week_bcd & 0xf0) >> 4) * 10) + (week_bcd & 0x0f); + +out: + if (page_changed) { + int rc2; + /* Switch back to page0 before returning. */ + rc2 = smbus_writeb(sc->smbus, + (JEDEC_DTI_PAGE | JEDEC_LSA_PAGE_SET0), 0, 0); + if (rc2 != 0) { + device_printf(sc->dev, + "unable to restore page for offset 0x%04x: %d\n", + year_offset, rc2); + } + } + + return (rc); +} + /** * device_probe() method. Validate the address that was given as a hint, and * display an error if it's bogus. Make sure that we're dealing with one of the diff --git a/sys/dev/jedec_dimm/jedec_dimm.h b/sys/dev/jedec_dimm/jedec_dimm.h index 3b330251efc5..00a9b3d521b6 100644 --- a/sys/dev/jedec_dimm/jedec_dimm.h +++ b/sys/dev/jedec_dimm/jedec_dimm.h @@ -3,7 +3,7 @@ * * Authors: Ravi Pokala (rpokala@freebsd.org) * - * Copyright (c) 2018 Panasas + * Copyright (c) 2018-2023 Panasas * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -90,6 +90,8 @@ #define SPD_OFFSET_DDR3_SDRAM_WIDTH 7 #define SPD_OFFSET_DDR3_BUS_WIDTH 8 #define SPD_OFFSET_DDR3_TSOD_PRESENT 32 +#define SPD_OFFSET_DDR3_MOD_MFG_YEAR 120 +#define SPD_OFFSET_DDR3_MOD_MFG_WEEK 121 #define SPD_OFFSET_DDR3_SERIAL 122 #define SPD_LEN_DDR3_SERIAL 4 #define SPD_OFFSET_DDR3_PARTNUM 128 @@ -100,6 +102,8 @@ #define SPD_OFFSET_DDR4_SDRAM_WIDTH 12 #define SPD_OFFSET_DDR4_BUS_WIDTH 13 #define SPD_OFFSET_DDR4_TSOD_PRESENT 14 +#define SPD_OFFSET_DDR4_MOD_MFG_YEAR 323 +#define SPD_OFFSET_DDR4_MOD_MFG_WEEK 324 #define SPD_OFFSET_DDR4_SERIAL 325 #define SPD_LEN_DDR4_SERIAL 4 #define SPD_OFFSET_DDR4_PARTNUM 329 From nobody Fri May 5 00:30:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCBRs41ZTz4B1gn; Fri, 5 May 2023 00:30: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 4QCBRs3BWyz4Cqt; Fri, 5 May 2023 00:30:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683246649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x3iMWtfjIxfTo5SGcVoMC8wChnk8Ea04t1m7jP4qkrM=; b=NGJWJ8fIy6fjATK/25dEwsN1SpazOqCm2bKGmbdsZyKCuXb+Z1XreRe14CkBA1T94FhQsV zX4hOjg0DQYGVb6hva+od0IS2yXdxmSB59Q+4EQXyOXXGz0/SxINIlXv4hwl9FQPFyr8Hn R1mvLs15/0h/dlc3ThUwsVAYm/IAMvbZpUeF06Xvn8m0La/PeeN4+vZDowce8WVEOFfWo7 a3Y9jTIV7ZySe5HkTp3x1WWhlwuPqC68zY/P0WxkAgZdeaaMTTr5zBTUZr7J/Qs4WBOL+x IBGUZ1n/y2WHRfr3qgpiIUBtlCEsrRMPP0KugLR9VQY7IGyQcYpDKnZGStyJkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683246649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x3iMWtfjIxfTo5SGcVoMC8wChnk8Ea04t1m7jP4qkrM=; b=s/xkuHb6vJE0ZunCCVfW917TXeRW1JnqV62ZZLzLADyDN+QhFlTjYYPLvEJvMT5i1qNe2w PjUwby+13wd1AAoNvgfPJn0bDbgVSwZLYNhu9Zg9dQqbr/pdNskQ5vfbwQcch1NQFlkOrm tQghQOLcQGqv6JfrKjzv6dhRZsCX3BrnW8s3PTeutSybJoBwDB/Z5b+t0RHWFglV1IEKLO qmhqIAsynQG1rXlQdQ9HDKOx+Lf35mTHJPmDRCxj/KHDgv2kwte3l7VFEN7BD3RfWeUYSi ulCJkJPiaHoQcpg/ljXqmy0lm2u6T5H5/N1VKhugMaYuSLprBBJ761HM/QqSQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683246649; a=rsa-sha256; cv=none; b=KLILRr2Yg6raZ2qrNUkblkODePAwH+H7HlGavYcIBNoUw6AuJjAbiJ9spzDB/uluGK361O FXQW3qskdNbTgUNNqLJNXqgJtzZLaMRKWqsaVBqplxKVGaILlSKkcVwOWi6+2wXNCUshw5 F2PyjANk8hla+wyEMceswfjSyAH0KKa38Os4zDeAsKZfsgEbx7mgAgYxTE3MfHj77PUvc3 JHAPy4gXLWMS6jtYKhmDB5G+BSMmWm80lRMe3cJDeDN8x5wOX2P1pNMw+yMHMiB1N0BO9Z lZ8nBJLt2NdMDDg6tyS9ANA060LRY1nQ8WlZSgUvIYzM9giM+V+WZK1ejYD5hA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCBRs1lzpzXtq; Fri, 5 May 2023 00:30:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3450Unc0038061; Fri, 5 May 2023 00:30:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3450UnDW038060; Fri, 5 May 2023 00:30:49 GMT (envelope-from git) Date: Fri, 5 May 2023 00:30:49 GMT Message-Id: <202305050030.3450UnDW038060@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ravi Pokala Subject: git: d0049a46bd35 - stable/12 - jedec_dimm(4): Refactor offset adjustment and page0 reset List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rpokala X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: d0049a46bd35f63a6ac520ad6630fd2608aa3015 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by rpokala: URL: https://cgit.FreeBSD.org/src/commit/?id=d0049a46bd35f63a6ac520ad6630fd2608aa3015 commit d0049a46bd35f63a6ac520ad6630fd2608aa3015 Author: Ravi Pokala AuthorDate: 2023-04-27 05:03:48 +0000 Commit: Ravi Pokala CommitDate: 2023-05-05 00:30:29 +0000 jedec_dimm(4): Refactor offset adjustment and page0 reset Offsets greater than 255 bytes reside on page1 of the SPD device. Accessing them requires switching to page1, and adjusting the absolute offset to be relative to the start of page1. After the access, the page must be set back to page0. These operations are performed in several places, so break them out into their own functions. Also, replace a pair of default cases, which should be impossible due to earlier checks, with __assert_unreachable(). Reviewed by: imp MFC after: 1 week Sponsored by: Panasas Differential Revision: https://reviews.freebsd.org/D39842 (cherry picked from commit 15d69c840d860a8c0decb063f768ad695427a0d4) --- sys/dev/jedec_dimm/jedec_dimm.c | 176 +++++++++++++++++++++++++++------------- 1 file changed, 121 insertions(+), 55 deletions(-) diff --git a/sys/dev/jedec_dimm/jedec_dimm.c b/sys/dev/jedec_dimm/jedec_dimm.c index b10b2a7bc8f5..e742f8312e6d 100644 --- a/sys/dev/jedec_dimm/jedec_dimm.c +++ b/sys/dev/jedec_dimm/jedec_dimm.c @@ -144,6 +144,9 @@ const struct jedec_dimm_tsod_dev { { 0x104a, 0x03, "ST Microelectronics TSOD" }, }; +static int jedec_dimm_adjust_offset(struct jedec_dimm_softc *sc, + uint16_t orig_offset, uint16_t *new_offset, bool *page_changed); + static int jedec_dimm_attach(device_t dev); static int jedec_dimm_capacity(struct jedec_dimm_softc *sc, enum dram_type type, @@ -164,11 +167,81 @@ static int jedec_dimm_probe(device_t dev); static int jedec_dimm_readw_be(struct jedec_dimm_softc *sc, uint8_t reg, uint16_t *val); +static int jedec_dimm_reset_page0(struct jedec_dimm_softc *sc); + static int jedec_dimm_temp_sysctl(SYSCTL_HANDLER_ARGS); static const char *jedec_dimm_tsod_match(uint16_t vid, uint16_t did); +/** + * The DDR4 SPD information is spread across two 256-byte pages, but the + * offsets in the spec are absolute, not per-page. If a given offset is on the + * second page, we need to change to that page and adjust the offset to be + * relative to that page. + * + * @author rpokala + * + * @param[in] sc + * Instance-specific context data + * + * @param[in] orig_offset + * The original value of the offset, before any adjustment is made. + * + * @param[out] new_offset + * The offset to actually read from, adjusted if needed. + * + * @param[out] page_changed + * Whether or not the page was actually changed, and the offset adjusted. + * *If 'true', caller must call reset_page0() before itself returning.* + */ +static int +jedec_dimm_adjust_offset(struct jedec_dimm_softc *sc, uint16_t orig_offset, + uint16_t *new_offset, bool *page_changed) +{ + int rc; + + /* Don't change the offset, or indicate that the page has been changed, + * until the page has actually been changed. + */ + *new_offset = orig_offset; + *page_changed = false; + + /* Change to the proper page. Offsets [0, 255] are in page0; offsets + * [256, 511] are in page1. + */ + if (orig_offset < JEDEC_SPD_PAGE_SIZE) { + /* Within page0; no adjustment or page-change required. */ + rc = 0; + goto out; + } else if (orig_offset >= (2 * JEDEC_SPD_PAGE_SIZE)) { + /* Outside of expected range. */ + rc = EINVAL; + device_printf(sc->dev, "invalid offset 0x%04x\n", orig_offset); + goto out; + } + + /* 'orig_offset' is in page1. Switch to that page, and adjust + * 'new_offset' accordingly if successful. + * + * For the page-change operation, only the DTI and LSA matter; the + * offset and write-value are ignored, so just use 0. + */ + rc = smbus_writeb(sc->smbus, (JEDEC_DTI_PAGE | JEDEC_LSA_PAGE_SET1), + 0, 0); + if (rc != 0) { + device_printf(sc->dev, + "unable to change page for offset 0x%04x: %d\n", + orig_offset, rc); + goto out; + } + *page_changed = true; + *new_offset = orig_offset - JEDEC_SPD_PAGE_SIZE; + +out: + return (rc); +} + /** * device_attach() method. Read the DRAM type, use that to determine the offsets * and lengths of the asset string fields. Calculate the capacity. If a TSOD is @@ -458,9 +531,7 @@ jedec_dimm_capacity(struct jedec_dimm_softc *sc, enum dram_type type, sdram_width_offset = SPD_OFFSET_DDR4_SDRAM_WIDTH; break; default: - device_printf(sc->dev, "unsupported dram_type 0x%02x\n", type); - rc = EINVAL; - goto out; + __assert_unreachable(); } rc = smbus_readb(sc->smbus, sc->spd_addr, bus_width_offset, @@ -673,14 +744,13 @@ jedec_dimm_dump(struct jedec_dimm_softc *sc, enum dram_type type) out: if (page_changed) { int rc2; - /* Switch back to page0 before returning. */ - rc2 = smbus_writeb(sc->smbus, - (JEDEC_DTI_PAGE | JEDEC_LSA_PAGE_SET0), 0, 0); - if (rc2 != 0) { - device_printf(sc->dev, "unable to restore page: %d\n", - rc2); + + rc2 = jedec_dimm_reset_page0(sc); + if ((rc2 != 0) && (rc == 0)) { + rc = rc2; } } + return (rc); } @@ -715,54 +785,29 @@ jedec_dimm_field_to_str(struct jedec_dimm_softc *sc, char *dst, size_t dstsz, uint16_t offset, uint16_t len, bool ascii) { uint8_t byte; + uint16_t new_offset; int i; int rc; bool page_changed; - /* Change to the proper page. Offsets [0, 255] are in page0; offsets - * [256, 512] are in page1. - * - * *The page must be reset to page0 before returning.* - * - * For the page-change operation, only the DTI and LSA matter; the - * offset and write-value are ignored, so use just 0. - * - * Mercifully, JEDEC defined the fields such that none of them cross - * pages, so we don't need to worry about that complication. - */ - if (offset < JEDEC_SPD_PAGE_SIZE) { - page_changed = false; - } else if (offset < (2 * JEDEC_SPD_PAGE_SIZE)) { - page_changed = true; - rc = smbus_writeb(sc->smbus, - (JEDEC_DTI_PAGE | JEDEC_LSA_PAGE_SET1), 0, 0); - if (rc != 0) { - device_printf(sc->dev, - "unable to change page for offset 0x%04x: %d\n", - offset, rc); - } - /* Adjust the offset to account for the page change. */ - offset -= JEDEC_SPD_PAGE_SIZE; - } else { - page_changed = false; - rc = EINVAL; - device_printf(sc->dev, "invalid offset 0x%04x\n", offset); + rc = jedec_dimm_adjust_offset(sc, offset, &new_offset, &page_changed); + if (rc != 0) { goto out; } /* Sanity-check (adjusted) offset and length; everything must be within * the same page. */ - if (offset >= JEDEC_SPD_PAGE_SIZE) { + if (new_offset >= JEDEC_SPD_PAGE_SIZE) { rc = EINVAL; - device_printf(sc->dev, "invalid offset 0x%04x\n", offset); + device_printf(sc->dev, "invalid offset 0x%04x\n", new_offset); goto out; } - if ((offset + len) >= JEDEC_SPD_PAGE_SIZE) { + if ((new_offset + len) >= JEDEC_SPD_PAGE_SIZE) { rc = EINVAL; device_printf(sc->dev, - "(offset + len) would cross page (0x%04x + 0x%04x)\n", - offset, len); + "(new_offset + len) would cross page (0x%04x + 0x%04x)\n", + new_offset, len); goto out; } @@ -793,11 +838,12 @@ jedec_dimm_field_to_str(struct jedec_dimm_softc *sc, char *dst, size_t dstsz, /* Read a byte at a time. */ for (i = 0; i < len; i++) { - rc = smbus_readb(sc->smbus, sc->spd_addr, (offset + i), &byte); + rc = smbus_readb(sc->smbus, sc->spd_addr, (new_offset + i), + &byte); if (rc != 0) { device_printf(sc->dev, "failed to read byte at 0x%02x: %d\n", - (offset + i), rc); + (new_offset + i), rc); goto out; } if (ascii) { @@ -827,13 +873,10 @@ jedec_dimm_field_to_str(struct jedec_dimm_softc *sc, char *dst, size_t dstsz, out: if (page_changed) { int rc2; - /* Switch back to page0 before returning. */ - rc2 = smbus_writeb(sc->smbus, - (JEDEC_DTI_PAGE | JEDEC_LSA_PAGE_SET0), 0, 0); - if (rc2 != 0) { - device_printf(sc->dev, - "unable to restore page for offset 0x%04x: %d\n", - offset, rc2); + + rc2 = jedec_dimm_reset_page0(sc); + if ((rc2 != 0) && (rc == 0)) { + rc = rc2; } } @@ -880,10 +923,7 @@ jedec_dimm_mfg_date(struct jedec_dimm_softc *sc, enum dram_type type, week_offset = SPD_OFFSET_DDR4_MOD_MFG_WEEK; break; default: - device_printf(sc->dev, "unsupported dram_type 0x%02x\n", type); - rc = EINVAL; - page_changed = false; - goto out; + __assert_unreachable(); } /* Change to the proper page. Offsets [0, 255] are in page0; offsets @@ -1041,6 +1081,32 @@ out: return (rc); } +/** + * Reset to the default condition of operating on page0. This must be called + * after a previous operation changed to page1. + * + * @author rpokala + * + * @param[in] sc + * Instance-specific context data + */ +static int +jedec_dimm_reset_page0(struct jedec_dimm_softc *sc) +{ + int rc; + + /* For the page-change operation, only the DTI and LSA matter; the + * offset and write-value are ignored, so just use 0. + */ + rc = smbus_writeb(sc->smbus, (JEDEC_DTI_PAGE | JEDEC_LSA_PAGE_SET0), + 0, 0); + if (rc != 0) { + device_printf(sc->dev, "unable to restore page: %d\n", rc); + } + + return (rc); +} + /** * Read the temperature data from the TSOD and convert it to the deciKelvin * value that the sysctl expects. From nobody Fri May 5 01:19:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCCWj3r05z4B8Hw; Fri, 5 May 2023 01:19: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 4QCCWj2vYcz4L0j; Fri, 5 May 2023 01:19:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683249553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6gf1iLoFe8O73xLFTce9gTA5fnXyeHkdIyR/xne8BKA=; b=gVtIZiaiSydr3T0FM+PzWgt5spc+FhDyf1kYijpoeydWrjbkQ9c3q9O3JAQEsSTA7YKngt ADO2CNQYYqhO2dxgZhlPc2MX7H4qiBOys1GJK73fP8wRvm2FrgYJRMEUxPRcTt5QqJQZkB B81YXc09aSPHAG/uGhVcPJ6ar6fhZlzVFinftP7uT53a5kuiW3NA+8LuOYmuqhs5+CtUxg yM4XBEUx+LsB/uAK+1X8b5+8aeBQsrwwgtTJnRTCx7fw8brTi9RABousItiZNRytsabQMb hVybYgxreeTxaQ8nxlUUGSf8E9Icn/6mA33SxTuzeKdhrTK6v5ghcXVsJUb8XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683249553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6gf1iLoFe8O73xLFTce9gTA5fnXyeHkdIyR/xne8BKA=; b=gvNSWHYuT7i2qXVNjBzuPeLm3m1MH5Squn3uI7vQfibrSVnLQHG31VDuiXDspKaMenJ5jm hDpGMoQen3plbtF6/k1PphHQeln9RqygXEoYdE9Lpe6VzDvLDlY/oUKG8NcbI81E8Y0EoR ls5K8M7cLg8GNiz5lq/ZgZvJvNqzTScmgD005uWRf7YE4KYEOSru+wBmnoKewnhi+r6UZP Rj88LYhO/34H38i2tBuvp2xHl54khcd46WuIExRfkD09CFcXBK0w6gsubK9Ya5nN7nhQ5N Droh7RneQxs/F4adgOV7DJBb41aiOVe7uVjfpZiogd3g4HSKX22qs97vvPeYRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683249553; a=rsa-sha256; cv=none; b=cSPQODakoXibWA5DBuZZlleOl2El/ql55LyzZrXEknxJiCFkvJtk+x6b4CTeV3FRbKl5kP SGwU/NXCLdl0Cb0xPtrKDXqdZPkZT1VH4CZei77C6pbL4v/SJifmJ89spI0lcM4HkDrSuw Dz0IYeEeeGtGS7gXh5OLlYKvTdENxyU96VlKBZDHcZDIU58/k1rO3iUHv8BKBfRya8jHEb MkcXR9xTMeqd80D1MWOZWROgxgnTfl/sLtVTu1eKdXRGAx/VJGOGVXcbPgMz9hqqLKm9lS G/vBWmR8cR86OuMdUwyGcz7W8CRq2HRQn6+w8drQEIPSNPVa0f6sVjlcZTeQlA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCCWj1zYQzZBP; Fri, 5 May 2023 01:19:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3451JDdX010803; Fri, 5 May 2023 01:19:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3451JDQj010802; Fri, 5 May 2023 01:19:13 GMT (envelope-from git) Date: Fri, 5 May 2023 01:19:13 GMT Message-Id: <202305050119.3451JDQj010802@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: fa4651d7ea5b - main - build.7: remove reference to deprecated mergemaster List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa4651d7ea5bd7679e7ac5f17cd28581bb8db57f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fa4651d7ea5bd7679e7ac5f17cd28581bb8db57f commit fa4651d7ea5bd7679e7ac5f17cd28581bb8db57f Author: Ed Maste AuthorDate: 2023-03-03 13:54:22 +0000 Commit: Ed Maste CommitDate: 2023-05-05 01:14:06 +0000 build.7: remove reference to deprecated mergemaster Sponsored by: The FreeBSD Foundation --- share/man/man7/build.7 | 1 - 1 file changed, 1 deletion(-) diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index 4e499c81b45c..a2fb5ea77149 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -887,7 +887,6 @@ manpage first appeared in .Xr tests 7 , .Xr config 8 , .Xr etcupdate 8 , -.Xr mergemaster 8 , .Xr reboot 8 , .Xr shutdown 8 .Sh AUTHORS From nobody Fri May 5 04:39:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCHyT6Bkgz49VnC; Fri, 5 May 2023 04:39: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 4QCHyT4XC4z3q5S; Fri, 5 May 2023 04:39:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683261553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PRrQlKl5sJZAgaptLVotKT91ctYLiiicY5cVhmKU6M4=; b=XvQkp9wERWSO/EWf0YN16dCo2rQG/iL+O2s3r0uiUtBbVshC4hmEevUyUR9b29CMY0Ajnp QoOYCxkDjOe+k2v9iHGgTH0XpeJS93v1oh1UIqoxv0AE+mMCeTzi316ttVggJBKVFG5kOd d40B5oUiS/h23wp2RgB63xC4G2obwpw3yhXXdgPBUMhKxKhDlFa4f4/KQOpwxp0Nb8r3Ia E/dIzHGopP1rOeLcSkweW3ASE9gPQ6eJ36n/Rv4lePtXNVV0dyRIGJTfKUSmcgIV8/npky eV+WamVIRL6B9aKw5I/U44upsCfueRC2RmNooMW741mQJkIrt38vl4g5Lu5Wag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683261553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PRrQlKl5sJZAgaptLVotKT91ctYLiiicY5cVhmKU6M4=; b=c0fpRcQC87ZQtnrcEhZuCeke50OOjgq/hDOrpGrhsPAJimW4ERz5RE6sb95woX2O/iNfP0 V/21W3alUGfxpReaN0pe7riKb0+sipI+C3WAuT1lbEuITqmOQC61Vqj0C8J8sGvR9u9AI+ vzrzJViRYpc6plA6FUSTImIUfFE0B+MQgEEB6djZ77uTin8I9JKWFMOKlsHgHYnc9uLXNh aQEHYkb4FMbsgaC8HH9YzK0aDCCVuzfPQX8gL2wvjnjrR538V2kwrBDbukH6PhywuySq1l Dd4MO2H70xou5OF9EJsoAmS7ODLnJeuyildaCrLs84rG/ovbiyzkBG/6TBFRjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683261553; a=rsa-sha256; cv=none; b=VptVnbwfxbDSOgxtKUd+maAWuFYhZsBdgghzJuRoxttY2PRfDbowxENkgw+xeZUtZSsXuH gxY0onl3UltwZqP6+3HYlfRgjOE+2+DnRhE7R0Gz0LBgb8emImPMl1U8lnfef6TE7EpWVS wy41Nnl7vakSarqijSGJl0RV2y1X/2itwtjGdfOsaIOfhMaqY5E99pyPX4vPHo6kgjDHgZ KVJp+aqWqJJaomzWeFvalmNyK/sTPkWGi5YVbOG7mkvYDJ9D3WvutlsvAfOhQfb6jo9x/V zQiuNJcYf8k9VBkrN4gM3aS2IQmMZtjqnaqmm2WGivhLxQQYC0WF9EmZLRVqJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCHyT3FqzzgRZ; Fri, 5 May 2023 04:39:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3454dDxK041360; Fri, 5 May 2023 04:39:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3454dDvB041359; Fri, 5 May 2023 04:39:13 GMT (envelope-from git) Date: Fri, 5 May 2023 04:39:13 GMT Message-Id: <202305050439.3454dDvB041359@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: fff1551c0357 - main - ntpd: Support IPv6-only hosts List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fff1551c0357cc43f6138fecfad1d79d8d8baa15 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=fff1551c0357cc43f6138fecfad1d79d8d8baa15 commit fff1551c0357cc43f6138fecfad1d79d8d8baa15 Author: Mina Galic AuthorDate: 2023-05-05 04:33:18 +0000 Commit: Cy Schubert CommitDate: 2023-05-05 04:37:02 +0000 ntpd: Support IPv6-only hosts 0.pool.* returns only IPv4 addresses. 2.pool.* returns both, IPv6 and IPv4 addresses. conservatively extend our IPv4 only pool configuration by adding a second pool, which also returns IPv6 addresses. PR: 270536 Reported by: Lapo Luchini MFC after: 3 days Pull Request: https://github.com/freebsd/freebsd-src/pull/731 Differential Revision: https://reviews.freebsd.org/D39954 --- usr.sbin/ntp/ntpd/ntp.conf | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/usr.sbin/ntp/ntpd/ntp.conf b/usr.sbin/ntp/ntpd/ntp.conf index ae0a3d0e6cad..3a56ec9f599c 100644 --- a/usr.sbin/ntp/ntpd/ntp.conf +++ b/usr.sbin/ntp/ntpd/ntp.conf @@ -20,24 +20,27 @@ tos minclock 3 maxclock 6 # -# The following pool statement will give you a random set of NTP servers -# geographically close to you. A single pool statement adds multiple -# servers from the pool, according to the tos minclock/maxclock targets. +# The following pool statements will give you a random set of IPv4 and IPv6 +# NTP servers geographically close to you. A single pool statement adds +# multiple servers from the pool, according to the tos minclock/maxclock +# targets. # See http://www.pool.ntp.org/ for details. Note, pool.ntp.org encourages # users with a static IP and good upstream NTP servers to add a server -# to the pool. See http://www.pool.ntp.org/join.html if you are interested. +# to the pool. See http://www.pool.ntp.org/join.html if you are interested. # # The option `iburst' is used for faster initial synchronization. # pool 0.freebsd.pool.ntp.org iburst +pool 2.freebsd.pool.ntp.org iburst # # If you want to pick yourself which country's public NTP server -# you want to sync against, comment out the above pool, uncomment -# the next one, and replace CC with the country's abbreviation. -# Make sure that the hostname resolves to a proper IP address! +# you want to sync against, comment out the above pool statements, +# uncomment the next ones, and replace CC with the country's abbreviation. +# Make sure that the hostnames resolves to a proper IP address! # # pool 0.CC.pool.ntp.org iburst +# pool 2.CC.pool.ntp.org iburst # # To configure a specific server, such as an organization-wide local From nobody Fri May 5 04:42:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCJ2q3JSRz49W1m; Fri, 5 May 2023 04:42:59 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCJ2q02C9z3r9K; Fri, 5 May 2023 04:42:58 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4002a.ext.cloudfilter.net ([10.228.9.250]) by cmsmtp with ESMTP id uXnTpqVMpLAoIunHWp2Isy; Fri, 05 May 2023 04:42:58 +0000 Received: from spqr.komquats.com ([70.66.148.124]) by cmsmtp with ESMTPA id unHUpv7fXyAOeunHVpQnrW; Fri, 05 May 2023 04:42:58 +0000 X-Authority-Analysis: v=2.4 cv=e5oV9Il/ c=1 sm=1 tr=0 ts=64548952 a=Cwc3rblV8FOMdVN/wOAqyQ==:117 a=Cwc3rblV8FOMdVN/wOAqyQ==:17 a=kj9zAlcOel0A:10 a=P0xRbXHiH_UA:10 a=6I5d2MoRAAAA:8 a=NEAV23lmAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=xTW7z8BQHFCe7OKxZjIA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 40EA2B89; Thu, 4 May 2023 21:42:56 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 2CB06381; Thu, 4 May 2023 21:42:56 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Cy Schubert cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: fff1551c0357 - main - ntpd: Support IPv6-only hosts In-reply-to: <202305050439.3454dDvB041359@gitrepo.freebsd.org> References: <202305050439.3454dDvB041359@gitrepo.freebsd.org> Comments: In-reply-to Cy Schubert message dated "Fri, 05 May 2023 04:39:13 +0000." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 04 May 2023 21:42:56 -0700 Message-Id: <20230505044256.2CB06381@slippy.cwsent.com> X-CMAE-Envelope: MS4xfGpC5iqGjWaX/t7iolYDb2vV/7pdSre0wYsufvP6NRxiCMFp8we0dIn2iR2JF4SwOATez0kdUZwip9C/0osmOxiZeBAR+bipdu3qKirfTL4UDlAaH3KF DOJPRrfQiZCJOpHOETVF3WKVNxnx+X3rPHyQQ8NbmXvbgQTfzYEEmOkw/daQFh2zrMm+4ZaY4QETVHcC9c4FJXvSnO2hv8VZkmUTHSOxOwpcEnfupH4xt/JT JIxjkAGT0/1mCYS30dHw+ntSY7lMD9ne5L+pioUKBvTbfmA66CDL9wHmR7lv/YoWfk7aLq308wk2HfL7oMxIblkfslO3Z3NZNfcJHXvwwUY= X-Rspamd-Queue-Id: 4QCJ2q02C9z3r9K X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N In message <202305050439.3454dDvB041359@gitrepo.freebsd.org>, Cy Schubert write s: > The branch main has been updated by cy: > > URL: https://cgit.FreeBSD.org/src/commit/?id=fff1551c0357cc43f6138fecfad1d79d > 8d8baa15 > > commit fff1551c0357cc43f6138fecfad1d79d8d8baa15 > Author: Mina Galic > AuthorDate: 2023-05-05 04:33:18 +0000 > Commit: Cy Schubert > CommitDate: 2023-05-05 04:37:02 +0000 > > ntpd: Support IPv6-only hosts > > 0.pool.* returns only IPv4 addresses. > 2.pool.* returns both, IPv6 and IPv4 addresses. > > conservatively extend our IPv4 only pool configuration by adding a > second pool, which also returns IPv6 addresses. > > PR: 270536 > Reported by: Lapo Luchini > MFC after: 3 days > Pull Request: https://github.com/freebsd/freebsd-src/pull/731 > Differential Revision: https://reviews.freebsd.org/D39954 Reviewed by emaste and myself. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Fri May 5 06:38:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCLcb4cXnz49qQY; Fri, 5 May 2023 06:38:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCLcb3qWYz46x8; Fri, 5 May 2023 06:38:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683268735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NzvRajO3Np2xv27B6YH5nau/pwlFEVAzjzzqzcfWSv8=; b=sExWkEix/C7tTTUwUKnxoBsfvtUbmqy/x/DDc8x7XkC/Blvpdrh4MRQxTnFVTWE5qOpu/m MlMa8qPjiYZ5aXJaiRJfGZhS/Pk8iHsocgrGULpTZ28o3I5uHsZ92W007UdWwCGO8cIsxJ wjjzvEyyvZbjS9GXDhabc/ljaPQeP58eiV3DX4OHWLAOm7x2PtM388iG8/kbVKyuNQlAjp +p0QrFIX/n0y8MHua+A9rGv/AZzGaCaI4ApKPq/DnPdFOYrdwbTYT1AaaAi+xnfzVW2Z1n /95NND8mlcCMTfJi/AZItccPpuFRlR2pbhOBe0KK3r5Z/+/XzDuiWZ9sN4Drmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683268735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NzvRajO3Np2xv27B6YH5nau/pwlFEVAzjzzqzcfWSv8=; b=gm6SwG4eZzVJcNfBYOJUTgIE5e6PHB9Q8GnivjYCxzWR7fwD459/hh/C4Dtvltj1NaQww/ QMm43ebbJSNaPi/0uVPCpidMnyQTRsSljCerj4dYoQPkxx0CTJvnbGoEnoIZM/+qKtya76 t/ikyfQ7d6iwyjtsKUOnJZIa7kGgd/5M0UUkJV36O4FznQGVbHNsqvkbwOO5VUcWYTt3BC MarDNlNKequZ4+n+p49YZKB0zZAb7G2FrWsrXTlNwpf5DE3l+5cPoY4T73AiyzCq9PXhya atijXxoLabIRcPHcl/+8C49aHPUNaHvCd34Po8LhOOlawRVy42QtpryiZJhFfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683268735; a=rsa-sha256; cv=none; b=Ulg9j3uzOsNiEtibUQOh1yVqZieqE961LhjyOUrKzitQYzNRaaAv82NLPQRozzZ8poidb6 3bSZOKAK8x+kLkdHnX1WiaF/SlC5LuOJFFDgFZTq2iZWKu19GqPj5e0eXas3hZG7zSdEEl bWwQqrgnRErpJvfd751JrawFbl7tcp+x2pR6t0CoZi1lcKLyebpSaF+M5+4ioIdfO2ONQj 3vzQAtdBZjAGueuLuZ9kupTjbPQLnag66ns1G47Le6jLPbnf3Cfxbdx4g7CizF8Pqiali5 Lznu4VXoHTzn7ZtxeuczR+rUdgsilniAKh/RSdNnpmS+ek6AsZxdou9fCPgOPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCLcb2tFxzkV1; Fri, 5 May 2023 06:38:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3456ctx0039468; Fri, 5 May 2023 06:38:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3456ct0c039467; Fri, 5 May 2023 06:38:55 GMT (envelope-from git) Date: Fri, 5 May 2023 06:38:55 GMT Message-Id: <202305050638.3456ct0c039467@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 6ea02becc78c - stable/13 - vfs: Export get_next_dirent() as vn_dir_next_dirent() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6ea02becc78c1885ae13713a94e83a5160e63396 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6ea02becc78c1885ae13713a94e83a5160e63396 commit 6ea02becc78c1885ae13713a94e83a5160e63396 Author: Olivier Certner AuthorDate: 2023-04-23 07:47:58 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-05 06:20:58 +0000 vfs: Export get_next_dirent() as vn_dir_next_dirent() (cherry picked from commit 6bce3f23d0aa045d61c0ec8d27100eb186a33375) --- sys/kern/vfs_default.c | 73 +++----------------------------------------------- sys/kern/vfs_vnops.c | 62 ++++++++++++++++++++++++++++++++++++++++++ sys/sys/vnode.h | 3 +++ 3 files changed, 69 insertions(+), 69 deletions(-) diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index 6201426d582c..502a81d3036c 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -75,15 +75,9 @@ __FBSDID("$FreeBSD$"); static int vop_nolookup(struct vop_lookup_args *); static int vop_norename(struct vop_rename_args *); static int vop_nostrategy(struct vop_strategy_args *); -static int get_next_dirent(struct vnode *vp, struct dirent **dpp, - char *dirbuf, int dirbuflen, off_t *off, - char **cpos, int *len, int *eofflag, - struct thread *td); static int dirent_exists(struct vnode *vp, const char *dirname, struct thread *td); -#define DIRENT_MINSIZE (sizeof(struct dirent) - (MAXNAMLEN+1) + 4) - static int vop_stdis_text(struct vop_is_text_args *ap); static int vop_stdunset_text(struct vop_unset_text_args *ap); static int vop_stdadd_writecount(struct vop_add_writecount_args *ap); @@ -280,65 +274,6 @@ vop_nostrategy (struct vop_strategy_args *ap) return (EOPNOTSUPP); } -static int -get_next_dirent(struct vnode *vp, struct dirent **dpp, char *dirbuf, - int dirbuflen, off_t *off, char **cpos, int *len, - int *eofflag, struct thread *td) -{ - int error, reclen; - struct uio uio; - struct iovec iov; - struct dirent *dp; - - KASSERT(VOP_ISLOCKED(vp), ("vp %p is not locked", vp)); - KASSERT(vp->v_type == VDIR, ("vp %p is not a directory", vp)); - - if (*len == 0) { - iov.iov_base = dirbuf; - iov.iov_len = dirbuflen; - - uio.uio_iov = &iov; - uio.uio_iovcnt = 1; - uio.uio_offset = *off; - uio.uio_resid = dirbuflen; - uio.uio_segflg = UIO_SYSSPACE; - uio.uio_rw = UIO_READ; - uio.uio_td = td; - - *eofflag = 0; - -#ifdef MAC - error = mac_vnode_check_readdir(td->td_ucred, vp); - if (error == 0) -#endif - error = VOP_READDIR(vp, &uio, td->td_ucred, eofflag, - NULL, NULL); - if (error) - return (error); - - *off = uio.uio_offset; - - *cpos = dirbuf; - *len = (dirbuflen - uio.uio_resid); - - if (*len == 0) - return (ENOENT); - } - - dp = (struct dirent *)(*cpos); - reclen = dp->d_reclen; - *dpp = dp; - - /* check for malformed directory.. */ - if (reclen < DIRENT_MINSIZE) - return (EINVAL); - - *cpos += reclen; - *len -= reclen; - - return (0); -} - /* * Check if a named file exists in a given directory vnode. */ @@ -368,8 +303,8 @@ dirent_exists(struct vnode *vp, const char *dirname, struct thread *td) off = 0; len = 0; do { - error = get_next_dirent(vp, &dp, dirbuf, dirbuflen, &off, - &cpos, &len, &eofflag, td); + error = vn_dir_next_dirent(vp, &dp, dirbuf, dirbuflen, &off, + &cpos, &len, &eofflag, td); if (error) goto out; @@ -806,8 +741,8 @@ vop_stdvptocnp(struct vop_vptocnp_args *ap) len = 0; do { /* call VOP_READDIR of parent */ - error = get_next_dirent(*dvp, &dp, dirbuf, dirbuflen, &off, - &cpos, &len, &eofflag, td); + error = vn_dir_next_dirent(*dvp, &dp, dirbuf, dirbuflen, &off, + &cpos, &len, &eofflag, td); if (error) goto out; diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 215c9d1cc0cc..c35370d9d6b3 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -3594,6 +3595,67 @@ vn_fallocate(struct file *fp, off_t offset, off_t len, struct thread *td) return (error); } +#define DIRENT_MINSIZE (sizeof(struct dirent) - (MAXNAMLEN+1) + 4) + +int +vn_dir_next_dirent(struct vnode *vp, struct dirent **dpp, char *dirbuf, + int dirbuflen, off_t *off, char **cpos, int *len, + int *eofflag, struct thread *td) +{ + int error, reclen; + struct uio uio; + struct iovec iov; + struct dirent *dp; + + KASSERT(VOP_ISLOCKED(vp), ("vp %p is not locked", vp)); + KASSERT(vp->v_type == VDIR, ("vp %p is not a directory", vp)); + + if (*len == 0) { + iov.iov_base = dirbuf; + iov.iov_len = dirbuflen; + + uio.uio_iov = &iov; + uio.uio_iovcnt = 1; + uio.uio_offset = *off; + uio.uio_resid = dirbuflen; + uio.uio_segflg = UIO_SYSSPACE; + uio.uio_rw = UIO_READ; + uio.uio_td = td; + + *eofflag = 0; + +#ifdef MAC + error = mac_vnode_check_readdir(td->td_ucred, vp); + if (error == 0) +#endif + error = VOP_READDIR(vp, &uio, td->td_ucred, eofflag, + NULL, NULL); + if (error) + return (error); + + *off = uio.uio_offset; + + *cpos = dirbuf; + *len = (dirbuflen - uio.uio_resid); + + if (*len == 0) + return (ENOENT); + } + + dp = (struct dirent *)(*cpos); + reclen = dp->d_reclen; + *dpp = dp; + + /* check for malformed directory.. */ + if (reclen < DIRENT_MINSIZE) + return (EINVAL); + + *cpos += reclen; + *len -= reclen; + + return (0); +} + static u_long vn_lock_pair_pause_cnt; SYSCTL_ULONG(_debug, OID_AUTO, vn_lock_pair_pause, CTLFLAG_RD, &vn_lock_pair_pause_cnt, 0, diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 37cafdb0d5ae..d5d2776b2f5e 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -1096,6 +1096,9 @@ void vfs_hash_remove(struct vnode *vp); int vfs_kqfilter(struct vop_kqfilter_args *); struct dirent; +int vn_dir_next_dirent(struct vnode *vp, struct dirent **dpp, char *dirbuf, + int dirbuflen, off_t *off, char **cpos, int *len, + int *eofflag, struct thread *td); int vfs_read_dirent(struct vop_readdir_args *ap, struct dirent *dp, off_t off); int vfs_emptydir(struct vnode *vp); From nobody Fri May 5 06:38:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCLcc6Gslz49qNN; Fri, 5 May 2023 06:38:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCLcc4zS3z479y; Fri, 5 May 2023 06:38:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683268736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YjfbsWzIM4PcdObb7idMScXDrBKTOBC6BISB37N7Bic=; b=ehbXTZNBMsKJDEZ+vAKzrSJ25j2qPI2QBLPGwRxutkpV0qQBQdfPGLgnrwRqYvIYvuWCJC r+NGAoCCfyFkFQvC7H/ZlIL0UwY2VWWe+jnDfelfLWD2F6QC/bN2/LHjY1lSbtMN7RVZcl UcbBHpX9qhwDWI/yRgGZrLM0klCKHllGmyZv1FaGwKPoJmf4+z9YjYNJQGdCjG5QCnXyRh KB6c7foskeT3HK9AYAemnuAbL21QmTE65U4BKwCbIDN2dtQysbLkLYMjuwkMwt2C1Wnngh 9wYADhnFveyh8+PwZ97T3S5oOzFw24wZd3IAKnEMmxlJFRVmrj7Gl6r4XnHHWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683268736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YjfbsWzIM4PcdObb7idMScXDrBKTOBC6BISB37N7Bic=; b=T4dKlNqWHVbMcxSV80yAusqRk5hwCHs7arjQyd1/BLNSzxsOYuUuitXpE9OBAG0F2/OYCf 02V/Wr1z4kBYEAIVfn1Z5sbAsTJ5AkscdWxHMS9t7GfWABzx/92Pti/9DC/tccNewVJLxt LsfXpRnUuL3cj8DTKMmrSK6dpstPfuqM+zhuugBx716pe+mrN9C6Xqhbnbpofxghpecor4 CQ8U2dRJJJ/kysSaTgTVcbuoQoP4wrpWsVidP852Sx7NR6bnsrmL2UFUPofPG/pWFONff9 PM6DXcl0xjSBlVM5F1Hst2E6SkAppZJ/DRLifOPQw0brqNYNMiUmZFJa08kYFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683268736; a=rsa-sha256; cv=none; b=JZmw7vx0FdcKEt+H5o1CKrxXP3EdU0QVjTYuKiHAHu2/akfkm2S34SSWPupJ/pFbCue0YW XqTb/FiVjoS/6t+S2KcCH+eNAc+dfSKX7fQfq4TCCMi3xiABhlQFALY2RwmgkUj3oF4GZA LISW0pU+mi6eXWAbQkCRABnlgS2v5GggS7DkUsew/JLEwH7YTYBXxtzanCKb2/OZKf07mJ eAm8qlk2BqNKAeMus9IbIxcRiaAbo5xQROQ7aTf15hDDc3eTV2VZbf5/e4E4G+vac/yg0n 4x8J/xjdt/ApR6PlADOrCBXmN8rUPx+XyKUSn9hkpCRzU+jw/w396/cxBoWq2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCLcc437rzkRG; Fri, 5 May 2023 06:38:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3456cu6I039487; Fri, 5 May 2023 06:38:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3456cuo8039486; Fri, 5 May 2023 06:38:56 GMT (envelope-from git) Date: Fri, 5 May 2023 06:38:56 GMT Message-Id: <202305050638.3456cuo8039486@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 6dae49bb3b4d - stable/13 - vfs: vn_dir_next_dirent(): Simplify interface and harden List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6dae49bb3b4de1de5648485530558d4a868d9b61 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6dae49bb3b4de1de5648485530558d4a868d9b61 commit 6dae49bb3b4de1de5648485530558d4a868d9b61 Author: Olivier Certner AuthorDate: 2023-04-24 08:25:15 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-05 06:20:58 +0000 vfs: vn_dir_next_dirent(): Simplify interface and harden (cherry picked from commit 3d8450db4c603d18aa45422159170e133c95214d) --- sys/kern/vfs_default.c | 94 ++++++++++++++++------------- sys/kern/vfs_vnops.c | 156 ++++++++++++++++++++++++++++++++++++++++--------- sys/sys/dirent.h | 5 +- sys/sys/vnode.h | 6 +- 4 files changed, 188 insertions(+), 73 deletions(-) diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index 502a81d3036c..75738aba359b 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -275,49 +275,56 @@ vop_nostrategy (struct vop_strategy_args *ap) } /* - * Check if a named file exists in a given directory vnode. + * Check if a named file exists in a given directory vnode + * + * Returns 0 if the file exists, ENOENT if it doesn't, or errors returned by + * vn_dir_next_dirent(). */ static int dirent_exists(struct vnode *vp, const char *dirname, struct thread *td) { - char *dirbuf, *cpos; - int error, eofflag, dirbuflen, len, found; + char *dirbuf; + int error, eofflag; + size_t dirbuflen, len; off_t off; struct dirent *dp; struct vattr va; - KASSERT(VOP_ISLOCKED(vp), ("vp %p is not locked", vp)); + ASSERT_VOP_LOCKED(vp, "vnode not locked"); KASSERT(vp->v_type == VDIR, ("vp %p is not a directory", vp)); - found = 0; - error = VOP_GETATTR(vp, &va, td->td_ucred); - if (error) - return (found); + if (error != 0) + return (error); - dirbuflen = DEV_BSIZE; + dirbuflen = MAX(DEV_BSIZE, GENERIC_MAXDIRSIZ); if (dirbuflen < va.va_blocksize) dirbuflen = va.va_blocksize; - dirbuf = (char *)malloc(dirbuflen, M_TEMP, M_WAITOK); + dirbuf = malloc(dirbuflen, M_TEMP, M_WAITOK); - off = 0; len = 0; - do { - error = vn_dir_next_dirent(vp, &dp, dirbuf, dirbuflen, &off, - &cpos, &len, &eofflag, td); - if (error) + off = 0; + eofflag = 0; + + for (;;) { + error = vn_dir_next_dirent(vp, td, dirbuf, dirbuflen, + &dp, &len, &off, &eofflag); + if (error != 0) goto out; + if (len == 0) + break; + if (dp->d_type != DT_WHT && dp->d_fileno != 0 && - strcmp(dp->d_name, dirname) == 0) { - found = 1; + strcmp(dp->d_name, dirname) == 0) goto out; - } - } while (len > 0 || !eofflag); + } + + error = ENOENT; out: free(dirbuf, M_TEMP); - return (found); + return (error); } int @@ -670,27 +677,24 @@ vop_stdvptofh(struct vop_vptofh_args *ap) int vop_stdvptocnp(struct vop_vptocnp_args *ap) { - struct vnode *vp = ap->a_vp; - struct vnode **dvp = ap->a_vpp; - struct ucred *cred; + struct vnode *const vp = ap->a_vp; + struct vnode **const dvp = ap->a_vpp; char *buf = ap->a_buf; size_t *buflen = ap->a_buflen; - char *dirbuf, *cpos; - int i, error, eofflag, dirbuflen, flags, locked, len, covered; + char *dirbuf; + int i = *buflen; + int error = 0, covered = 0; + int eofflag, flags, locked; + size_t dirbuflen, len; off_t off; ino_t fileno; struct vattr va; struct nameidata nd; - struct thread *td; + struct thread *const td = curthread; + struct ucred *const cred = td->td_ucred; struct dirent *dp; struct vnode *mvp; - i = *buflen; - error = 0; - covered = 0; - td = curthread; - cred = td->td_ucred; - if (vp->v_type != VDIR) return (ENOENT); @@ -727,31 +731,38 @@ vop_stdvptocnp(struct vop_vptocnp_args *ap) fileno = va.va_fileid; - dirbuflen = DEV_BSIZE; + dirbuflen = MAX(DEV_BSIZE, GENERIC_MAXDIRSIZ); if (dirbuflen < va.va_blocksize) dirbuflen = va.va_blocksize; - dirbuf = (char *)malloc(dirbuflen, M_TEMP, M_WAITOK); + dirbuf = malloc(dirbuflen, M_TEMP, M_WAITOK); if ((*dvp)->v_type != VDIR) { error = ENOENT; goto out; } - off = 0; len = 0; - do { + off = 0; + eofflag = 0; + + for (;;) { /* call VOP_READDIR of parent */ - error = vn_dir_next_dirent(*dvp, &dp, dirbuf, dirbuflen, &off, - &cpos, &len, &eofflag, td); - if (error) + error = vn_dir_next_dirent(*dvp, td, + dirbuf, dirbuflen, &dp, &len, &off, &eofflag); + if (error != 0) + goto out; + + if (len == 0) { + error = ENOENT; goto out; + } if ((dp->d_type != DT_WHT) && (dp->d_fileno == fileno)) { if (covered) { VOP_UNLOCK(*dvp); vn_lock(mvp, LK_SHARED | LK_RETRY); - if (dirent_exists(mvp, dp->d_name, td)) { + if (dirent_exists(mvp, dp->d_name, td) == 0) { error = ENOENT; VOP_UNLOCK(mvp); vn_lock(*dvp, LK_SHARED | LK_RETRY); @@ -774,8 +785,7 @@ vop_stdvptocnp(struct vop_vptocnp_args *ap) } goto out; } - } while (len > 0 || !eofflag); - error = ENOENT; + } out: free(dirbuf, M_TEMP); diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index c35370d9d6b3..6206c521ba48 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -3597,20 +3597,112 @@ vn_fallocate(struct file *fp, off_t offset, off_t len, struct thread *td) #define DIRENT_MINSIZE (sizeof(struct dirent) - (MAXNAMLEN+1) + 4) +/* + * Keep this assert as long as sizeof(struct dirent) is used as the maximum + * entry size. + */ +_Static_assert(_GENERIC_MAXDIRSIZ == sizeof(struct dirent), + "'struct dirent' size must be a multiple of its alignment " + "(see _GENERIC_DIRLEN())"); + +/* + * Returns successive directory entries through some caller's provided buffer + * + * This function automatically refills the provided buffer with calls to + * VOP_READDIR() (after MAC permission checks). + * + * 'td' is used for credentials and passed to uiomove(). 'dirbuf' is the + * caller's buffer to fill and 'dirbuflen' its allocated size. 'dirbuf' must be + * properly aligned to access 'struct dirent' structures and 'dirbuflen' must + * be greater than GENERIC_MAXDIRSIZ to avoid VOP_READDIR() returning EINVAL + * (the latter is not a strong guarantee (yet); but EINVAL will always be + * returned if this requirement is not verified). '*dpp' points to the current + * directory entry in the buffer and '*len' contains the remaining valid bytes + * in 'dirbuf' after 'dpp' (including the pointed entry). + * + * At first call (or when restarting the read), '*len' must have been set to 0, + * '*off' to 0 (or any valid start offset) and '*eofflag' to 0. There are no + * more entries as soon as '*len' is 0 after a call that returned 0. Calling + * again this function after such a condition is considered an error and EINVAL + * will be returned. Other possible error codes are those of VOP_READDIR(), + * EINTEGRITY if the returned entries do not pass coherency tests, or EINVAL + * (bad call). All errors are unrecoverable, i.e., the state ('*len', '*off' + * and '*eofflag') must be re-initialized before a subsequent call. On error or + * at end of directory, '*dpp' is reset to NULL. + * + * '*len', '*off' and '*eofflag' are internal state the caller should not + * tamper with except as explained above. '*off' is the next directory offset + * to read from to refill the buffer. '*eofflag' is set to 0 or 1 by the last + * internal call to VOP_READDIR() that returned without error, indicating + * whether it reached the end of the directory, and to 2 by this function after + * all entries have been read. + */ int -vn_dir_next_dirent(struct vnode *vp, struct dirent **dpp, char *dirbuf, - int dirbuflen, off_t *off, char **cpos, int *len, - int *eofflag, struct thread *td) +vn_dir_next_dirent(struct vnode *vp, struct thread *td, + char *dirbuf, size_t dirbuflen, + struct dirent **dpp, size_t *len, off_t *off, int *eofflag) { - int error, reclen; + struct dirent *dp = NULL; + int reclen; + int error; struct uio uio; struct iovec iov; - struct dirent *dp; - KASSERT(VOP_ISLOCKED(vp), ("vp %p is not locked", vp)); - KASSERT(vp->v_type == VDIR, ("vp %p is not a directory", vp)); + ASSERT_VOP_LOCKED(vp, "vnode not locked"); + VNASSERT(vp->v_type == VDIR, vp, ("vnode is not a directory")); + MPASS2((uintptr_t)dirbuf < (uintptr_t)dirbuf + dirbuflen, + "Address space overflow"); + + if (__predict_false(dirbuflen < GENERIC_MAXDIRSIZ)) { + /* Don't take any chances in this case */ + error = EINVAL; + goto out; + } + + if (*len != 0) { + dp = *dpp; + + /* + * The caller continued to call us after an error (we set dp to + * NULL in a previous iteration). Bail out right now. + */ + if (__predict_false(dp == NULL)) + return (EINVAL); + + MPASS(*len <= dirbuflen); + MPASS2((uintptr_t)dirbuf <= (uintptr_t)dp && + (uintptr_t)dp + *len <= (uintptr_t)dirbuf + dirbuflen, + "Filled range not inside buffer"); + + reclen = dp->d_reclen; + if (reclen >= *len) { + /* End of buffer reached */ + *len = 0; + } else { + dp = (struct dirent *)((char *)dp + reclen); + *len -= reclen; + } + } if (*len == 0) { + dp = NULL; + + /* Have to refill. */ + switch (*eofflag) { + case 0: + break; + + case 1: + /* Nothing more to read. */ + *eofflag = 2; /* Remember the caller reached EOF. */ + goto success; + + default: + /* The caller didn't test for EOF. */ + error = EINVAL; + goto out; + } + iov.iov_base = dirbuf; iov.iov_len = dirbuflen; @@ -3622,40 +3714,50 @@ vn_dir_next_dirent(struct vnode *vp, struct dirent **dpp, char *dirbuf, uio.uio_rw = UIO_READ; uio.uio_td = td; - *eofflag = 0; - #ifdef MAC error = mac_vnode_check_readdir(td->td_ucred, vp); if (error == 0) #endif error = VOP_READDIR(vp, &uio, td->td_ucred, eofflag, - NULL, NULL); - if (error) - return (error); + NULL, NULL); + if (error != 0) + goto out; + *len = dirbuflen - uio.uio_resid; *off = uio.uio_offset; - *cpos = dirbuf; - *len = (dirbuflen - uio.uio_resid); - - if (*len == 0) - return (ENOENT); - } + if (*len == 0) { + /* Sanity check on INVARIANTS. */ + MPASS(*eofflag != 0); + *eofflag = 1; + goto success; + } - dp = (struct dirent *)(*cpos); - reclen = dp->d_reclen; - *dpp = dp; + /* + * Normalize the flag returned by VOP_READDIR(), since we use 2 + * as a sentinel value. + */ + if (*eofflag != 0) + *eofflag = 1; - /* check for malformed directory.. */ - if (reclen < DIRENT_MINSIZE) - return (EINVAL); + dp = (struct dirent *)dirbuf; + } - *cpos += reclen; - *len -= reclen; + if (__predict_false(*len < GENERIC_MINDIRSIZ || + dp->d_reclen < GENERIC_MINDIRSIZ)) { + error = EINTEGRITY; + dp = NULL; + goto out; + } - return (0); +success: + error = 0; +out: + *dpp = dp; + return (error); } + static u_long vn_lock_pair_pause_cnt; SYSCTL_ULONG(_debug, OID_AUTO, vn_lock_pair_pause, CTLFLAG_RD, &vn_lock_pair_pause_cnt, 0, diff --git a/sys/sys/dirent.h b/sys/sys/dirent.h index b3c5e00cd9ad..9087b01fa597 100644 --- a/sys/sys/dirent.h +++ b/sys/sys/dirent.h @@ -122,11 +122,14 @@ struct freebsd11_dirent { #define _GENERIC_DIRLEN(namlen) \ ((__offsetof(struct dirent, d_name) + (namlen) + 1 + 7) & ~7) #define _GENERIC_DIRSIZ(dp) _GENERIC_DIRLEN((dp)->d_namlen) +#define _GENERIC_MINDIRSIZ _GENERIC_DIRLEN(1) /* Name must not be empty */ +#define _GENERIC_MAXDIRSIZ _GENERIC_DIRLEN(MAXNAMLEN) #endif /* __BSD_VISIBLE */ #ifdef _KERNEL #define GENERIC_DIRSIZ(dp) _GENERIC_DIRSIZ(dp) - +#define GENERIC_MINDIRSIZ _GENERIC_MINDIRSIZ +#define GENERIC_MAXDIRSIZ _GENERIC_MAXDIRSIZ /* * Ensure that padding bytes are zeroed and that the name is NUL-terminated. */ diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index d5d2776b2f5e..7b15cb95f63f 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -1096,9 +1096,9 @@ void vfs_hash_remove(struct vnode *vp); int vfs_kqfilter(struct vop_kqfilter_args *); struct dirent; -int vn_dir_next_dirent(struct vnode *vp, struct dirent **dpp, char *dirbuf, - int dirbuflen, off_t *off, char **cpos, int *len, - int *eofflag, struct thread *td); +int vn_dir_next_dirent(struct vnode *vp, struct thread *td, + char *dirbuf, size_t dirbuflen, + struct dirent **dpp, size_t *len, off_t *off, int *eofflag); int vfs_read_dirent(struct vop_readdir_args *ap, struct dirent *dp, off_t off); int vfs_emptydir(struct vnode *vp); From nobody Fri May 5 06:38:57 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCLcd6J3kz49qL2; Fri, 5 May 2023 06:38:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCLcd5hk6z47BK; Fri, 5 May 2023 06:38:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683268737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fIyK6vrBXrfifZKNrOI0uLEL2UXyKhje5jyPfejge3U=; b=eX1APAE2CUQq3It59qsY0fUik9x49SkLJSAVcWezpn8ZloOE8wfzPhWE1XtT6wlHHlaUbT 0RvbvkLkliJyPG3QeUnza+5kf/Uxo+L8jbywKVrh35KM43bYNRTnd4YToVyjTrRQVVha0S DsZvUw9m86/lFyYq/5rAz8xfwJOcNjEt9s8X62Hvt4AlX6cPMrBaxLfMiNgBu+aT+jKNhi fI6OpPo8w3FLmWD32vlgpVKWa+GSvnjQTfVoploipyRnyTejPQt7S/hQUhWy5Rk0feXTSk JHLtdZKbeobLcmWu93ucCvSKj1ce8IP5qHmCjHO66oKvI2W+Pr6FakMT5EnwSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683268737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fIyK6vrBXrfifZKNrOI0uLEL2UXyKhje5jyPfejge3U=; b=iikOnIMhgzE3Keffo5gdLHNGE7cuzqbLPoulkYvpwNdL38AYv+LLT1CHy70Fl3rEba6E4h AARLq0VF6KhJW0tGAn7ouMDlSkuAU0VDbjEwHZ9UQOf4IeC3mWLpBCsN1fBWq4tWQcyHRi tTvSeCDVJjFWPnZh33ZurYktXPWrKwtf48IoIUuIWMAjE7grp5LvsynHavn9hoT/2O0KZ1 K7IGYbO4PVX5vdAkUNK1N7hfMAcSOJ72kQcB8xyt8wlbwKnB1x+vgdqGUulKwn4oWVYZkn y6zhae2xs9DG1QAgltXBUW1flIpbm8UlkmHpUQxYUFUjp2epLeflBQrZ/03dSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683268737; a=rsa-sha256; cv=none; b=Cl2HimlcE8ivKHxROsyIS3hP4+UDY0MdVPys2A1F+dyehMvf/J87o8628pw1VbkcZp8aaP PRMIM5QhupEdcAvX83u82jF2tNaSmHAxN/wItlITOc3+gaXHBXaQrWeYrD9peKsjZJb+wp RBv8dBL7N55cD6zCCVSqn6VjinmDYtV25Ey8d67C2cJ1QcBaORbt6laPHiobk+czTd5t2I LEIjlc6Aseqw5rI/esyVhcG+86lu/v25z6kEplIWYK07W1GuqtucGcV4OTkITuBb022sWo KEGcjMjx34nFDbNcgu7xqcrw7NSaUE9snZdVLbpSGVpqcUifHWO0s318lXE2/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 4QCLcd4mmNzklF; Fri, 5 May 2023 06:38:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3456cvZN039515; Fri, 5 May 2023 06:38:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3456cvNM039514; Fri, 5 May 2023 06:38:57 GMT (envelope-from git) Date: Fri, 5 May 2023 06:38:57 GMT Message-Id: <202305050638.3456cvNM039514@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 6a53a4ff6537 - stable/13 - vfs: Fix "emptydir" mount option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6a53a4ff653722488379cedf4326deabbfccd749 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6a53a4ff653722488379cedf4326deabbfccd749 commit 6a53a4ff653722488379cedf4326deabbfccd749 Author: Olivier Certner AuthorDate: 2023-04-22 16:07:07 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-05 06:20:58 +0000 vfs: Fix "emptydir" mount option PR: 270988 (cherry picked from commit 6450e7bbad0c68176f28b51773a3af5d6022c7dd) --- sys/kern/vfs_subr.c | 115 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 67 insertions(+), 48 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index ff5b4822316f..dbedc16f555b 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -6452,65 +6452,84 @@ filt_vfsvnode(struct knote *kn, long hint) int vfs_emptydir(struct vnode *vp) { - struct uio uio; - struct iovec iov; - struct dirent *dirent, *dp, *endp; - int error, eof; - - error = 0; - eof = 0; + struct thread *const td = curthread; + char *dirbuf; + size_t dirbuflen, len; + off_t off; + int eofflag, error; + struct dirent *dp; + struct vattr va; ASSERT_VOP_LOCKED(vp, "vfs_emptydir"); VNASSERT(vp->v_type == VDIR, vp, ("vp is not a directory")); - dirent = malloc(sizeof(struct dirent), M_TEMP, M_WAITOK); - iov.iov_base = dirent; - iov.iov_len = sizeof(struct dirent); - - uio.uio_iov = &iov; - uio.uio_iovcnt = 1; - uio.uio_offset = 0; - uio.uio_resid = sizeof(struct dirent); - uio.uio_segflg = UIO_SYSSPACE; - uio.uio_rw = UIO_READ; - uio.uio_td = curthread; - - while (eof == 0 && error == 0) { - error = VOP_READDIR(vp, &uio, curthread->td_ucred, &eof, - NULL, NULL); + error = VOP_GETATTR(vp, &va, td->td_ucred); + if (error != 0) + return (error); + + dirbuflen = max(DEV_BSIZE, GENERIC_MAXDIRSIZ); + if (dirbuflen < va.va_blocksize) + dirbuflen = va.va_blocksize; + dirbuf = malloc(dirbuflen, M_TEMP, M_WAITOK); + + len = 0; + off = 0; + eofflag = 0; + + for (;;) { + error = vn_dir_next_dirent(vp, td, dirbuf, dirbuflen, + &dp, &len, &off, &eofflag); if (error != 0) - break; - endp = (void *)((uint8_t *)dirent + - sizeof(struct dirent) - uio.uio_resid); - for (dp = dirent; dp < endp; - dp = (void *)((uint8_t *)dp + GENERIC_DIRSIZ(dp))) { - if (dp->d_type == DT_WHT) - continue; - if (dp->d_namlen == 0) - continue; - if (dp->d_type != DT_DIR && - dp->d_type != DT_UNKNOWN) { - error = ENOTEMPTY; - break; - } - if (dp->d_namlen > 2) { - error = ENOTEMPTY; - break; - } - if (dp->d_namlen == 1 && - dp->d_name[0] != '.') { + goto end; + + if (len == 0) { + /* EOF */ + error = 0; + goto end; + } + + /* + * Skip whiteouts. Unionfs operates on filesystems only and not + * on hierarchies, so these whiteouts would be shadowed on the + * system hierarchy but not for a union using the filesystem of + * their directories as the upper layer. Additionally, unionfs + * currently transparently exposes union-specific metadata of + * its upper layer, meaning that whiteouts can be seen through + * the union view in empty directories. Taking into account + * these whiteouts would then prevent mounting another + * filesystem on such effectively empty directories. + */ + if (dp->d_type == DT_WHT) + continue; + + /* + * Any file in the directory which is not '.' or '..' indicates + * the directory is not empty. + */ + switch (dp->d_namlen) { + case 2: + if (dp->d_name[1] != '.') { + /* Can't be '..' (nor '.') */ error = ENOTEMPTY; - break; + goto end; } - if (dp->d_namlen == 2 && - dp->d_name[1] != '.') { + /* FALLTHROUGH */ + case 1: + if (dp->d_name[0] != '.') { + /* Can't be '..' nor '.' */ error = ENOTEMPTY; - break; + goto end; } - uio.uio_resid = sizeof(struct dirent); + break; + + default: + error = ENOTEMPTY; + goto end; } } - free(dirent, M_TEMP); + +end: + free(dirbuf, M_TEMP); return (error); } From nobody Fri May 5 06:38:58 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCLcg0lZXz49qHy; Fri, 5 May 2023 06:38:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCLcf6Shcz47DK; Fri, 5 May 2023 06:38:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683268738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CuHvUdTyhD5d7C6q/YTYqTW5xD5cGv/ydCNH/RP5wQM=; b=VJUxCI+YqRpye502Xf3Y3sHPCAbvKL9+BR9y6PCjYIBPy9uysfeGNqtkRdISHt+lYGmesg cULeArJsL0ZrCc4CpxKgU2miSECRo0Y+WSderzXb0RafveZPRx+h+NSqgstuXxi1Tp9Vse 6WGojs0eSD8s8cB5eNT08Nco3DhqU3nJZSRf9WzZM27raQWoQeWv5MSPhZgbvm5+UtnHGi OjeQcOPOK4wmCrrlqGInp/0GfwGq5PeMM31gl3H570Qz4LLG+TANecOVJzs6nrSeLCde81 mejE5p5LZXWilbDIheVZkOSh/q6XoMDPV1EBaRDuL8g3HA5Urn0cMlePZVi8Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683268738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CuHvUdTyhD5d7C6q/YTYqTW5xD5cGv/ydCNH/RP5wQM=; b=VPPp6RaX+Yv7NIV5duLF2ormXHS7YUh8+Uj2ni4VjXMTvbrC3uRpTJCAQYKFYq2g1Uo96b O5A73BeggruCHIXIoVbaSsRRM+rhC0PZjbteusXhPsAqU/FKYBrLjuogG5i0dJxIIrzSRu fbwBgZnWM5sQdBNNbVEjdmwZ19QBKXMC9HQc9Fy6imSBEzA6NfnnDbGRyJz5XxwQ6AsiR1 ewH0OXoA7vVdJiXm2a2SCkDOKzIdLiGH/MY8nZNnyEA8DJ+oe+nGKUExYEBfLmFAv+3nQ4 YDuGA/UqtYoRSZqRQlBiopB6r1vvGGJBqBvdkQYD3QoTLF3KzkoI5f81bTgLew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683268738; a=rsa-sha256; cv=none; b=bdCGXoJVd8bPr3zMooHlp70JYsNkHUJjL3Y1HmOKF10TvxNlD5g0S09cMmRmUvwJY2uDsC M7qbmC0pavjppPqvqHqljAT4H4ra9RNOUEVmp/hVku62YzKSbAscyVXB8Y36TnHeHMN5A5 XT4kcXF06q5/MHw8WQFNBYCR73v+c6CH2Cmq3OkNMyBhIuJjGhj3I9k77A4VtxKFySJd91 kc9g4Weyj4qurejRVm1leOg9XlzoAoAb9eEz4w0VXHxwI0tLcPqtl/9nEEfh1yjxrP822Y 5S2dZZKF0kiBqE7w2BTXlibpzT5GXs0LFrlRb9a7IlMxHvRd1a5AfgjK7xscMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCLcf5YWtzkRH; Fri, 5 May 2023 06:38:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3456cwPQ039538; Fri, 5 May 2023 06:38:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3456cw28039535; Fri, 5 May 2023 06:38:58 GMT (envelope-from git) Date: Fri, 5 May 2023 06:38:58 GMT Message-Id: <202305050638.3456cw28039535@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 21cc0c6cad65 - stable/13 - vfs: vn_dir_next_dirent(): Adapt comments to style(9) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 21cc0c6cad6597ef696e72a8ded6fc34e977ce6f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=21cc0c6cad6597ef696e72a8ded6fc34e977ce6f commit 21cc0c6cad6597ef696e72a8ded6fc34e977ce6f Author: Olivier Certner AuthorDate: 2023-04-28 09:04:16 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-05 06:20:58 +0000 vfs: vn_dir_next_dirent(): Adapt comments to style(9) (cherry picked from commit c21d87a88c72804bc4fb86d7b0e8a846230e4ad0) --- sys/kern/vfs_vnops.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 6206c521ba48..8ad66be142b2 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -3606,33 +3606,33 @@ _Static_assert(_GENERIC_MAXDIRSIZ == sizeof(struct dirent), "(see _GENERIC_DIRLEN())"); /* - * Returns successive directory entries through some caller's provided buffer + * Returns successive directory entries through some caller's provided buffer. * * This function automatically refills the provided buffer with calls to * VOP_READDIR() (after MAC permission checks). * - * 'td' is used for credentials and passed to uiomove(). 'dirbuf' is the - * caller's buffer to fill and 'dirbuflen' its allocated size. 'dirbuf' must be - * properly aligned to access 'struct dirent' structures and 'dirbuflen' must - * be greater than GENERIC_MAXDIRSIZ to avoid VOP_READDIR() returning EINVAL - * (the latter is not a strong guarantee (yet); but EINVAL will always be - * returned if this requirement is not verified). '*dpp' points to the current - * directory entry in the buffer and '*len' contains the remaining valid bytes - * in 'dirbuf' after 'dpp' (including the pointed entry). + * 'td' is used for credentials and passed to uiomove(). 'dirbuf' is the + * caller's buffer to fill and 'dirbuflen' its allocated size. 'dirbuf' must + * be properly aligned to access 'struct dirent' structures and 'dirbuflen' + * must be greater than GENERIC_MAXDIRSIZ to avoid VOP_READDIR() returning + * EINVAL (the latter is not a strong guarantee (yet); but EINVAL will always + * be returned if this requirement is not verified). '*dpp' points to the + * current directory entry in the buffer and '*len' contains the remaining + * valid bytes in 'dirbuf' after 'dpp' (including the pointed entry). * * At first call (or when restarting the read), '*len' must have been set to 0, - * '*off' to 0 (or any valid start offset) and '*eofflag' to 0. There are no - * more entries as soon as '*len' is 0 after a call that returned 0. Calling + * '*off' to 0 (or any valid start offset) and '*eofflag' to 0. There are no + * more entries as soon as '*len' is 0 after a call that returned 0. Calling * again this function after such a condition is considered an error and EINVAL - * will be returned. Other possible error codes are those of VOP_READDIR(), + * will be returned. Other possible error codes are those of VOP_READDIR(), * EINTEGRITY if the returned entries do not pass coherency tests, or EINVAL - * (bad call). All errors are unrecoverable, i.e., the state ('*len', '*off' - * and '*eofflag') must be re-initialized before a subsequent call. On error or - * at end of directory, '*dpp' is reset to NULL. + * (bad call). All errors are unrecoverable, i.e., the state ('*len', '*off' + * and '*eofflag') must be re-initialized before a subsequent call. On error + * or at end of directory, '*dpp' is reset to NULL. * * '*len', '*off' and '*eofflag' are internal state the caller should not - * tamper with except as explained above. '*off' is the next directory offset - * to read from to refill the buffer. '*eofflag' is set to 0 or 1 by the last + * tamper with except as explained above. '*off' is the next directory offset + * to read from to refill the buffer. '*eofflag' is set to 0 or 1 by the last * internal call to VOP_READDIR() that returned without error, indicating * whether it reached the end of the directory, and to 2 by this function after * all entries have been read. @@ -3664,7 +3664,7 @@ vn_dir_next_dirent(struct vnode *vp, struct thread *td, /* * The caller continued to call us after an error (we set dp to - * NULL in a previous iteration). Bail out right now. + * NULL in a previous iteration). Bail out right now. */ if (__predict_false(dp == NULL)) return (EINVAL); From nobody Fri May 5 06:38:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCLch1qJ4z49qQj; Fri, 5 May 2023 06:39: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 4QCLch0VpBz47Dc; Fri, 5 May 2023 06:39:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683268740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zr4JRyTM8QtLCWP0PfVWfQNsPEDJp6hPGjLma28zGU0=; b=pSKrUPs/hlSmPhsJmpQS3S2W6zSssFGUeOkPTG1flptz/1Sn/cb7ZA4zV0PFyKsWIAYHCA /cuedFspaCFvWbEdazanNzcdk0yUmSC2xxx5etK7lx9LHqB05sL+eA6mJePc3feL7hdtdB hKyCKGvH/XG/Ccyc+E6zTDaJ0nDG8OIfUhFksfVJE4KHHj0wYs0bPNc5NmBPl0k2xS2CP3 lUljReAQDR5Tc/WAKGdG37vordAfHrPW+Ts4XAKXI59Qa/MoDJlNPwn8ow0eFEt+WA5YF2 A3Pl50TmQgTf1Aptkt50XvVKWhEDa5pyrbx06mCgszY6JrVJnG5acZ1Lt1dcFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683268740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zr4JRyTM8QtLCWP0PfVWfQNsPEDJp6hPGjLma28zGU0=; b=IKDrNLG8bXRgjxg/6jfhAeTj4gBHLBdHk3IesVyadHonuUhVKuuAWqjtWLshGJ1QIrcBgh BOitPQ1X+4CS6SS/fHVvA7pIT6t/01geR8qJ5g/IiulBfEwyyM/2ZzLSBqsyIitfWRQ5oN JRQg2jt4QF7vbDzNTLQk3M7xuzgtWeiPg3ci46PkH/PNq7ZGZbHVaYU0l47wqR2502jFJY caP2ooubPAW2d/4bg7jCAKnIyBlzNwFbxvuL72eIpQ6Y7fkXY8XwB2fzSyGOPbKB2+7dWQ vgr5DKtKrohTSFzYILEtlFNXXkGJsNuVuG3+hftvss8p1okGF3vHwv8nOd/c2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683268740; a=rsa-sha256; cv=none; b=l5a2GF6dlIXTC4A0PY6/T2Glk8UZfnzxjdvKpgi4G6w2AFV6vWgWZPrCA9pGYO+/mgfDGy Mg3X4oA6ZosWS85sqLNGLHhCPJOrPSAyAegQMcG+ic1ZC3U1FA6dLXlXuK8hEmWehp44aN xAoYmb4OjUzbfDboUL+1v7u5BWgHMqy+wKGUlXihfi4rYgjZGxF2INPOtXQXzp00ea0FCy TiG7jcUCx+PhoVyj2MxxM8TKf61+4m4wukxYQ974kLKC8D3Nol8IrTdElPRNXBfROqSoOd iXzJ/Ck0f3VgthGl4SD+qar1p7eghE3pt+fybAeAPC9oBXXqs/sMDMCrHjlw5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCLcg6jZszkRJ; Fri, 5 May 2023 06:38:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3456cxD3039558; Fri, 5 May 2023 06:38:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3456cxn6039557; Fri, 5 May 2023 06:38:59 GMT (envelope-from git) Date: Fri, 5 May 2023 06:38:59 GMT Message-Id: <202305050638.3456cxn6039557@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 8ba938472706 - stable/13 - vfs: Rename vfs_emptydir() to vn_dir_check_empty() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8ba9384727065435f699f29524980c89a9263e12 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8ba9384727065435f699f29524980c89a9263e12 commit 8ba9384727065435f699f29524980c89a9263e12 Author: Olivier Certner AuthorDate: 2023-04-28 09:00:11 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-05 06:20:58 +0000 vfs: Rename vfs_emptydir() to vn_dir_check_empty() (cherry picked from commit 2544b8e00ca1afea64b00a6ddaf7b584244ade90) --- sys/kern/vfs_mount.c | 2 +- sys/kern/vfs_subr.c | 90 --------------------------------------------------- sys/kern/vfs_vnops.c | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++ sys/sys/vnode.h | 2 +- 4 files changed, 93 insertions(+), 92 deletions(-) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 32d24fb16526..d5b137e7ffab 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -979,7 +979,7 @@ vfs_domount_first( error = ENOTDIR; } if (error == 0 && (fsflags & MNT_EMPTYDIR) != 0) - error = vfs_emptydir(vp); + error = vn_dir_check_empty(vp); if (error == 0) { VI_LOCK(vp); if ((vp->v_iflag & VI_MOUNT) == 0 && vp->v_mountedhere == NULL) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index dbedc16f555b..2002f3b81937 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -6443,96 +6443,6 @@ filt_vfsvnode(struct knote *kn, long hint) return (res); } -/* - * Returns whether the directory is empty or not. - * If it is empty, the return value is 0; otherwise - * the return value is an error value (which may - * be ENOTEMPTY). - */ -int -vfs_emptydir(struct vnode *vp) -{ - struct thread *const td = curthread; - char *dirbuf; - size_t dirbuflen, len; - off_t off; - int eofflag, error; - struct dirent *dp; - struct vattr va; - - ASSERT_VOP_LOCKED(vp, "vfs_emptydir"); - VNASSERT(vp->v_type == VDIR, vp, ("vp is not a directory")); - - error = VOP_GETATTR(vp, &va, td->td_ucred); - if (error != 0) - return (error); - - dirbuflen = max(DEV_BSIZE, GENERIC_MAXDIRSIZ); - if (dirbuflen < va.va_blocksize) - dirbuflen = va.va_blocksize; - dirbuf = malloc(dirbuflen, M_TEMP, M_WAITOK); - - len = 0; - off = 0; - eofflag = 0; - - for (;;) { - error = vn_dir_next_dirent(vp, td, dirbuf, dirbuflen, - &dp, &len, &off, &eofflag); - if (error != 0) - goto end; - - if (len == 0) { - /* EOF */ - error = 0; - goto end; - } - - /* - * Skip whiteouts. Unionfs operates on filesystems only and not - * on hierarchies, so these whiteouts would be shadowed on the - * system hierarchy but not for a union using the filesystem of - * their directories as the upper layer. Additionally, unionfs - * currently transparently exposes union-specific metadata of - * its upper layer, meaning that whiteouts can be seen through - * the union view in empty directories. Taking into account - * these whiteouts would then prevent mounting another - * filesystem on such effectively empty directories. - */ - if (dp->d_type == DT_WHT) - continue; - - /* - * Any file in the directory which is not '.' or '..' indicates - * the directory is not empty. - */ - switch (dp->d_namlen) { - case 2: - if (dp->d_name[1] != '.') { - /* Can't be '..' (nor '.') */ - error = ENOTEMPTY; - goto end; - } - /* FALLTHROUGH */ - case 1: - if (dp->d_name[0] != '.') { - /* Can't be '..' nor '.' */ - error = ENOTEMPTY; - goto end; - } - break; - - default: - error = ENOTEMPTY; - goto end; - } - } - -end: - free(dirbuf, M_TEMP); - return (error); -} - int vfs_read_dirent(struct vop_readdir_args *ap, struct dirent *dp, off_t off) { diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 8ad66be142b2..dfaa6868c567 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -3757,6 +3757,97 @@ out: return (error); } +/* + * Checks whether a directory is empty or not. + * + * If the directory is empty, returns 0, and if it is not, ENOTEMPTY. Other + * values are genuine errors preventing the check. + */ +int +vn_dir_check_empty(struct vnode *vp) +{ + struct thread *const td = curthread; + char *dirbuf; + size_t dirbuflen, len; + off_t off; + int eofflag, error; + struct dirent *dp; + struct vattr va; + + ASSERT_VOP_LOCKED(vp, "vfs_emptydir"); + VNPASS(vp->v_type == VDIR, vp); + + error = VOP_GETATTR(vp, &va, td->td_ucred); + if (error != 0) + return (error); + + dirbuflen = max(DEV_BSIZE, GENERIC_MAXDIRSIZ); + if (dirbuflen < va.va_blocksize) + dirbuflen = va.va_blocksize; + dirbuf = malloc(dirbuflen, M_TEMP, M_WAITOK); + + len = 0; + off = 0; + eofflag = 0; + + for (;;) { + error = vn_dir_next_dirent(vp, td, dirbuf, dirbuflen, + &dp, &len, &off, &eofflag); + if (error != 0) + goto end; + + if (len == 0) { + /* EOF */ + error = 0; + goto end; + } + + /* + * Skip whiteouts. Unionfs operates on filesystems only and + * not on hierarchies, so these whiteouts would be shadowed on + * the system hierarchy but not for a union using the + * filesystem of their directories as the upper layer. + * Additionally, unionfs currently transparently exposes + * union-specific metadata of its upper layer, meaning that + * whiteouts can be seen through the union view in empty + * directories. Taking into account these whiteouts would then + * prevent mounting another filesystem on such effectively + * empty directories. + */ + if (dp->d_type == DT_WHT) + continue; + + /* + * Any file in the directory which is not '.' or '..' indicates + * the directory is not empty. + */ + switch (dp->d_namlen) { + case 2: + if (dp->d_name[1] != '.') { + /* Can't be '..' (nor '.') */ + error = ENOTEMPTY; + goto end; + } + /* FALLTHROUGH */ + case 1: + if (dp->d_name[0] != '.') { + /* Can't be '..' nor '.' */ + error = ENOTEMPTY; + goto end; + } + break; + + default: + error = ENOTEMPTY; + goto end; + } + } + +end: + free(dirbuf, M_TEMP); + return (error); +} + static u_long vn_lock_pair_pause_cnt; SYSCTL_ULONG(_debug, OID_AUTO, vn_lock_pair_pause, CTLFLAG_RD, diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 7b15cb95f63f..543eb06f2f16 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -1099,8 +1099,8 @@ struct dirent; int vn_dir_next_dirent(struct vnode *vp, struct thread *td, char *dirbuf, size_t dirbuflen, struct dirent **dpp, size_t *len, off_t *off, int *eofflag); +int vn_dir_check_empty(struct vnode *vp); int vfs_read_dirent(struct vop_readdir_args *ap, struct dirent *dp, off_t off); -int vfs_emptydir(struct vnode *vp); int vfs_unixify_accmode(accmode_t *accmode); From nobody Fri May 5 08:59:35 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCPlD4rQlz4935Q; Fri, 5 May 2023 08:59:52 +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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCPlB4syRz4Rlx; Fri, 5 May 2023 08:59:50 +0000 (UTC) (envelope-from manu@bidouilliste.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mx header.b=q3p3aqWV; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com; dmarc=pass (policy=none) header.from=bidouilliste.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1683277181; 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=QBe8V8BYP8vrcFTKWp4eVS5rrHBRH5eWqS40SecXfdE=; b=q3p3aqWVhN6OU711lT+YeqtERQxSpuO31wBazv+U8EQBLiIDtRHPAdGDNWAF1/kdwIn17l iz0ezjeUfDfPF+s0Q1R6xlYTZ1xz6IeyySMqthcNJQpkDoYIfO1Ys5yLIBICfF59KqDu+H 50sK4RAjiXFzSyfMJtkKa5o31yZTu9s= 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 60a08cfb (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 5 May 2023 08:59:40 +0000 (UTC) Date: Fri, 5 May 2023 10:59:35 +0200 From: Emmanuel Vadot To: Kyle Evans , ihor@antonovs.family Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 8935a3993219 - main - daemon: use kqueue for all events Message-Id: <20230505105935.c2e6df2864b7a9ab6c6fef81@bidouilliste.com> In-Reply-To: <202304140513.33E5DsXL019547@gitrepo.freebsd.org> References: <202304140513.33E5DsXL019547@gitrepo.freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-3.49 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.990]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:212.83.155.74/32]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mx]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-main@FreeBSD.org]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; MIME_TRACE(0.00)[0:+]; DKIM_TRACE(0.00)[bidouilliste.com:+]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_TWO(0.00)[2]; FREEFALL_USER(0.00)[manu]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4QCPlB4syRz4Rlx X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N Hello, On Fri, 14 Apr 2023 05:13:54 GMT Kyle Evans wrote: > The branch main has been updated by kevans: > > URL: https://cgit.FreeBSD.org/src/commit/?id=8935a3993219be76c7ea03e9ad4509657d08af6c > > commit 8935a3993219be76c7ea03e9ad4509657d08af6c > Author: Ihor Antonov > AuthorDate: 2023-04-14 05:10:29 +0000 > Commit: Kyle Evans > CommitDate: 2023-04-14 05:12:21 +0000 > > daemon: use kqueue for all events > > Refactor daemon to use kqueue/kevent instead of signals. > > This changes allows to simplify the code in several ways: > - the execution flow is now linear, no async events. > - several variables became redundant and got removed. > - all event handling is now concentrated inside of the event loop, which > makes code reading and comprehension easier. > - new kqueuex(2) call is used for CLOEXEC, but maintained closing the > kq fd prior to execve() to ease later MFC > > No UX/API changes are intended. > > Reviewed by: kevans > Pull Request: https://github.com/freebsd/freebsd-src/pull/701 This break sysutils/seatd when we resume and leaves the console is a really sad state (impossible to use, keystroke don't match). Don't really know how to properly debug but : 1/ Reverting the commit make seatd not exiting on resume (and so sway doesn't exit). 2/ If I start seatd without daemon it works 3/ If I manually start saetd with daemon in tmux with "daemon -s debug -T seatd -p /var/run/seatd.pid /usr/local/bin/seatd -g video" (so same thing as the rc script) I see "daemon: kevent wait: Interrupted system call" printed when I get back network. Feel free to ask me any test you want to debug further ;) Cheers, -- Emmanuel Vadot From nobody Fri May 5 09:55:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCQzp4P54z496Kr; Fri, 5 May 2023 09:55: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 4QCQzp3j3Vz4XhD; Fri, 5 May 2023 09:55:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683280550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8+C8wyejlI56TObHgAZEL/fNGnfK5E+t5O8cHxaFI/c=; b=I6xixwYCQYGoLzdxWyquKSoWeOirIGt+QWP689TFHFCX20fKoch9aCbVaCGQkLrY3YrXh8 KtcucWKyDv+yAxG6NtGMlw1+ruvQVjC4JUiEdFZK21yGgJMdY3UElakMXkItO2nXXVbDqJ ALy9aXJBDslnaUxxjaeojKW4MdVaAi9ktMb9wSr7wwW0bVFMqWIc/fX6vL0z5SCncgxlfe 9mH32paTw6nCz8jhOBCvwEA05uv+vXNhDXs0RU8VVdoAZyBYnQA8YXcAZ+LnmeKNyyz/Xk PM+Xxa361uWNQ/eCxPmil2GZKucxvFjk309TFZh0YG0rtTVxdMe+c7fFWeC0fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683280550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8+C8wyejlI56TObHgAZEL/fNGnfK5E+t5O8cHxaFI/c=; b=AjRtRNGrgJm97QOTo8AvVMgjQgdImXulZYvrJcMi/oztuDlyfovNRIDB7CP7USMpV/Na9w ggRC8yvOFc+rdbV66hMjGHzF9W6CY9jFgBXvlLO9g6ZdSgZboXtxUJYtEn0J94tDa9hax8 +V52cB3L7ujx/6YFJ7nUaLi116Lak+6ZguYjSz7WNU631+WAY4DoWvLzo/DxeL3rBnfRdo z1/ChFVUBt2hFzymIjwZEiuQdy4coa2tEo9lJdlUmZWfQbTP3v7L1sQd53A8WHJvT5ivYJ G0feCB+h4KiVBWO2PhyEuCRvS+mX8ZxHBRm4Y8gslFmv/Vco8IV2JOS2Tt2Z4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683280550; a=rsa-sha256; cv=none; b=XwxhcIXWP6tPQByE34EN2cPxGE2Ig7Y82VdgHTXZ5uK1ejqNPlDOIDcHAproSHjQ8dbXV4 bV+WoefeKfNtyXRbs7CcUy03w9LDX2vdkGB2Kcs1E6T/dG22I8lsL89dSDfyriOJe7HpYr TFVhQ8e6J5nyIWecrTE9zMNUvGJD/AmW2W5Lzbz5HVylXModowbos8PJD21/0yLMQIRBhn 5E/JHMAhfftIGVxB0WgFq34UIDRtoBBd4UDuOdaP8uXbNM4wOMlgMIK1qhE8MVkI0g22as 8oKGQgQfj7zguI/twqLQvZRUUP3qpmDCsbsXeHUvIp1uACtqibNlhXAwQEk2nQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCQzp2kbhzqdB; Fri, 5 May 2023 09:55:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3459toZ1067889; Fri, 5 May 2023 09:55:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3459to8l067888; Fri, 5 May 2023 09:55:50 GMT (envelope-from git) Date: Fri, 5 May 2023 09:55:50 GMT Message-Id: <202305050955.3459to8l067888@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Yuri Pankov Subject: git: 6abf81b3d674 - main - pvscsi: maximum target number is one less than number of targets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuripv X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6abf81b3d6747da0baa90860d5a6e929c97c9bb9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yuripv: URL: https://cgit.FreeBSD.org/src/commit/?id=6abf81b3d6747da0baa90860d5a6e929c97c9bb9 commit 6abf81b3d6747da0baa90860d5a6e929c97c9bb9 Author: Yuri Pankov AuthorDate: 2023-05-05 09:48:57 +0000 Commit: Yuri Pankov CommitDate: 2023-05-05 09:51:44 +0000 pvscsi: maximum target number is one less than number of targets Fix the number of targets we inquiry to be one less than the maximum number of targets adapter reports. This gets rid of the errors reported on VMware Workstation: (probe36:pvscsi0:0:65:0): INQUIRY. CDB: 12 00 00 00 24 00 (probe36:pvscsi0:0:65:0): CAM status: CCB request completed with an error While here, print the maximum number of targets. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D39867 --- sys/dev/vmware/pvscsi/pvscsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/vmware/pvscsi/pvscsi.c b/sys/dev/vmware/pvscsi/pvscsi.c index 1ba4777da906..48650647c561 100644 --- a/sys/dev/vmware/pvscsi/pvscsi.c +++ b/sys/dev/vmware/pvscsi/pvscsi.c @@ -1412,7 +1412,7 @@ finish_ccb: cpi->hba_misc = PIM_NOBUSRESET | PIM_UNMAPPED; cpi->hba_eng_cnt = 0; /* cpi->vuhba_flags = 0; */ - cpi->max_target = sc->max_targets; + cpi->max_target = sc->max_targets - 1; cpi->max_lun = 0; cpi->async_flags = 0; cpi->hpath_id = 0; @@ -1684,6 +1684,7 @@ pvscsi_attach(device_t dev) PVSCSI_MAX_REQ_QUEUE_DEPTH); device_printf(sc->dev, "Use Msg: %d\n", sc->use_msg); + device_printf(sc->dev, "Max targets: %d\n", sc->max_targets); device_printf(sc->dev, "REQ num pages: %d\n", sc->req_ring_num_pages); device_printf(sc->dev, "CMP num pages: %d\n", sc->cmp_ring_num_pages); device_printf(sc->dev, "MSG num pages: %d\n", sc->msg_ring_num_pages); From nobody Fri May 5 12:11:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCTzw4zvyz49Ffg; Fri, 5 May 2023 12:11: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 4QCTzw4MRBz3GFQ; Fri, 5 May 2023 12:11:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683288668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/xZNUUB3FaqLJztAa4rBxQNHYQUSpq/sbPjj16OLe7k=; b=Oopj4sdQ3vOCMsfDuzSwW4S3/TLWpWISq0zRqIcj9DJAuM78yO4RMJIyX1zP6VhImMz2vX UGY7Wm46Q5wXNcPyVlPpmp205nG2Xig30fmqHeWxwty8UxD3Nev1mTq9lkrN4Lg1tMY/OH TOAyHb3wSgoSKXwR2ftnEkMZsaZ2NshKh1kB2eIjhz4b4iJDtEXwOJfN3/u+lFAsZ2AvRT UlCvGq6Brjurqt+kYZ30RQg06rxUt+1X99d/RDa3WAT5IrEH4xta6o0UE43H/dw3ONxoSY Z7Zyi3KjrxzjLcaE1HgkZalVrMNr7DoJR3rG7YuVujHmpFNfVIIr7xG/wbE2+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683288668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/xZNUUB3FaqLJztAa4rBxQNHYQUSpq/sbPjj16OLe7k=; b=FugDTbKzxkZcNAY+edNr9AGmB7dJslbNdgpl82dbQa8R6qUhw2nG7cG65AL3H2+tDTpvXA OjXuZYIYMvVh6Tm9WecMcO3zqnZXMDc+RLtT7wuxjscekkWM4TKEQdYHwxWP8GhZUXyBAa KgJ2hdMvwWdaadB4eWp8jzdYCShOeWVueGtsCYkQ+v8D+i9M45glq2jL7Ig9rCOxcD6uZm iV7ucIO+XqlT+vmLaplZ78jmLjVGtlTOuEOmmp3M5GQJE/JKwRe72Dk+vU9XAYRxeAklZz iGfcu5shBU6KqPpFvFsqefJY78UvqtBrSadrWMj4Sr7dNGEi0KKxK3m23RKjUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683288668; a=rsa-sha256; cv=none; b=KBsGYBGAhJey9HPC2G4Jt63X5bVhRteVpvAdvHOYmbJ9VL+55mWCgXgZnIVPPJYRH6G1x7 DynJF6ajNs+ueUtkjqEbnCm5jJ9XkWAcwQK+FpWBNpJuIPDNWmSfD2cysrXFvWEA4nMQLL hFOTpMRjqxkEvdtDnN2UqUt77NbQmuh4vXY8e2rIvuBmQMkX6xc1tWuBuYXrZgQDjIhsLm TKhE0QbmkS/aa1Lcb+5++Te6ZJqrwKUkzZy+aRFYg+8g9Rq8OZOSboCDn43oG8EjeDt0+H pwIxK6llSxWzTPohK1yAN3M3Uo4WA1y+wZtqoQUEXmPi0PI4It6A2eUmdnsTkg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCTzw3BJ2zth7; Fri, 5 May 2023 12:11:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345CB8Wd091340; Fri, 5 May 2023 12:11:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345CB82I091339; Fri, 5 May 2023 12:11:08 GMT (envelope-from git) Date: Fri, 5 May 2023 12:11:08 GMT Message-Id: <202305051211.345CB82I091339@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: 8216f1a9ccaf - main - pf: fix a few more prototypes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8216f1a9ccaf880ac9cdb6d973032239d64e81bf Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8216f1a9ccaf880ac9cdb6d973032239d64e81bf commit 8216f1a9ccaf880ac9cdb6d973032239d64e81bf Author: Kristof Provost AuthorDate: 2023-05-05 11:40:25 +0000 Commit: Kristof Provost CommitDate: 2023-05-05 11:41:02 +0000 pf: fix a few more prototypes Fix function prototypes to use the same type for sa_family_t as the definition. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/pfvar.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index f72c3980438d..b9b7640788d1 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2166,7 +2166,7 @@ VNET_DECLARE(struct ifnet *, sync_ifp); VNET_DECLARE(struct pf_krule, pf_default_rule); #define V_pf_default_rule VNET(pf_default_rule) extern void pf_addrcpy(struct pf_addr *, struct pf_addr *, - u_int8_t); + sa_family_t); void pf_free_rule(struct pf_krule *); int pf_test_eth(int, int, struct ifnet *, struct mbuf **, struct inpcb *); @@ -2181,7 +2181,7 @@ int pf_test6(int, int, struct ifnet *, struct mbuf **, struct inpcb *); int pf_normalize_ip6(struct mbuf **, int, struct pfi_kkif *, u_short *, struct pf_pdesc *); void pf_poolmask(struct pf_addr *, struct pf_addr*, - struct pf_addr *, struct pf_addr *, u_int8_t); + struct pf_addr *, struct pf_addr *, sa_family_t); void pf_addr_inc(struct pf_addr *, sa_family_t); int pf_refragment6(struct ifnet *, struct mbuf **, struct m_tag *, bool); #endif /* INET6 */ @@ -2386,7 +2386,7 @@ int pf_osfp_get(struct pf_osfp_ioctl *); int pf_osfp_match(struct pf_osfp_enlist *, pf_osfp_t); #ifdef _KERNEL -void pf_print_host(struct pf_addr *, u_int16_t, u_int8_t); +void pf_print_host(struct pf_addr *, u_int16_t, sa_family_t); void pf_step_into_anchor(struct pf_kanchor_stackframe *, int *, struct pf_kruleset **, int, struct pf_krule **, From nobody Fri May 5 12:15:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCV4P4TCwz49Fml; Fri, 5 May 2023 12:15: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 4QCV4P3d4vz3HC0; Fri, 5 May 2023 12:15:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683288901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YRt9D9/uN5pjlBaNFu/oNcw1FWZJjFgE8wExrB1keDM=; b=d7dkwfcFP3tCjrGAH0InyzNxduQPs0qX3e677tnss9omqDWHhBW4qZGkLojiGTaducJkAF IqO1+sO7vwr9rlpxIDEGVmCrMR84Q09nrZ7gRgITuwmpwje84qmoazNPWuCocyEtzjxdq2 z0P15C0IyRVYU/eaEPVeBLeJS2T8HAyAtV//f+DAfcbrgRgchIlCvUNwpAG7YTWhWzMH26 qCvmzHS1yLEyCmydKxZU2sGjFiO8cNwzggwoM7CXiI1JlftQDe2xlz1Uqfb6dVkMKGFv7o rzreYOaK9d0znqHbFKAD+JSvCGjhoSpDSuwBM317NwqQRG4xkNEBG+hUn7ymTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683288901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YRt9D9/uN5pjlBaNFu/oNcw1FWZJjFgE8wExrB1keDM=; b=a0u4Yd6oU+a73kdmwQCCNgXCzdz68+Y4xaLOfXM6Y64beTnF0Pa+mpcMmPYhynuhG+WthZ qroiOHat45dS9RPfuPHTr/qWK91dLXDnQ5SHpodrwPchSbtGIjXQ6bZlCn48RZTj/GKlKe cyeAQBgu4h09qiLmi0AMIIZ27rnCM/1evyWdU82FNkKD+dVhOfbLvz0kuYTuQgexZGLCsd SFKJ593EpH2DGP9sApZmfr7iYaPkpjT6qKtIbJa42j+KAbG/LcbC6M9jrQL2WJUBmlynYk tOF4XnvqbN9pG2PURy7GLhcVMQi1ysgG30wQuffDay5pc/g0laNxKdmhNJwcFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683288901; a=rsa-sha256; cv=none; b=LkdrsX6Egd5mJfwWhF4QEqW4VvkjwpAZLKyOc3vi4y+1w+InhWP+2hqSVjklwmx0D9KvWo HzS6x6gHqSHIlZSm/hPEmHuSVpRRObcZMVfMUAkeOGFRs92DsCezsePhFzBt/JgW/fHyJ6 FUsQCO+gIlrTFhmIpnSBNnnkHxnXjWXPSYKcVm7tWpOvwktzPD1VEXI7IBom7pvzTxRkcq HNLxAvDgYWc8NXntzBSb/weX4BxTwWK+TpLkSBoECnKlkpFtwybxbVtz3x2j/2R0OzwCRl C1V221txaH4KnwcTrFZVDTTfYmXUm1uvqaI6J+xTKl4fbFnLLN3qf7igQDgjIA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCV4P2hKlztx8; Fri, 5 May 2023 12:15:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345CF1Aw099321; Fri, 5 May 2023 12:15:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345CF1aY099320; Fri, 5 May 2023 12:15:01 GMT (envelope-from git) Date: Fri, 5 May 2023 12:15:01 GMT Message-Id: <202305051215.345CF1aY099320@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: f7057652618a - main - Makefile.inc1: use make builtin :ts instead of sed List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f7057652618a73d93911cf636c254d183db77f6f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f7057652618a73d93911cf636c254d183db77f6f commit f7057652618a73d93911cf636c254d183db77f6f Author: Ed Maste AuthorDate: 2022-04-10 22:52:48 +0000 Commit: Ed Maste CommitDate: 2023-05-05 12:14:35 +0000 Makefile.inc1: use make builtin :ts instead of sed Commit 3eb1b4da3cf7 replaced "xargs -n1" with a sed expression to convert from space to newline as a list separator for *-old-* targets. Dan Nelson followed up with a suggestion to use make's built-in :ts instead, which should be slightly more efficient. Reviewed by: sjg Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39972 --- Makefile.inc1 | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index d059d5dd9fea..86e8da9467da 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -3245,10 +3245,9 @@ RM_I=-fv list-old-files: .PHONY @cd ${.CURDIR}; \ ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ - -V OLD_FILES -V "OLD_FILES:Musr/share/*.gz:R" \ - -V "OLD_FILES:Mlib/*.so.*:S,^lib,usr/lib32," \ - -V "OLD_FILES:Musr/lib/*:S,^usr/lib,usr/lib32," | \ - sed -E 's/[[:space:]]+/\n/g' | sort + -V "OLD_FILES:ts\n" -V "OLD_FILES:Musr/share/*.gz:R:ts\n" \ + -V "OLD_FILES:Mlib/*.so.*:S,^lib,usr/lib32,:ts\n" \ + -V "OLD_FILES:Musr/lib/*:S,^usr/lib,usr/lib32,:ts\n" | sort delete-old-files: .PHONY @echo ">>> Removing old files (only deletes safe to delete libs)" @@ -3312,10 +3311,10 @@ check-old-files: .PHONY list-old-libs: .PHONY @cd ${.CURDIR}; \ ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ - -V OLD_LIBS -V MOVED_LIBS -V "OLD_LIBS:Mlib/*:S,^lib,usr/lib32," \ - -V "OLD_LIBS:Musr/lib/*:S,^usr/lib,usr/lib32," \ - -V "OLD_LIBS:Mlib/casper/*:S,^lib/casper,usr/lib32," | \ - sed -E 's/[[:space:]]+/\n/g' | sort + -V "OLD_LIBS:ts\n" -V "MOVED_LIBS:ts\n" \ + -V "OLD_LIBS:Mlib/*:S,^lib,usr/lib32,:ts\n" \ + -V "OLD_LIBS:Musr/lib/*:S,^usr/lib,usr/lib32,:ts\n" \ + -V "OLD_LIBS:Mlib/casper/*:S,^lib/casper,usr/lib32,:ts\n" | sort delete-old-libs: .PHONY @echo ">>> Removing old libraries" From nobody Fri May 5 12:27:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCVLn3G6Nz49GkQ; Fri, 5 May 2023 12:27:29 +0000 (UTC) (envelope-from yuri@aetern.org) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCVLm6xf2z3Htw; Fri, 5 May 2023 12:27:28 +0000 (UTC) (envelope-from yuri@aetern.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=aetern.org header.s=fm3 header.b=jBHZrAFo; dkim=pass header.d=messagingengine.com header.s=fm3 header.b="j jEmYNO"; spf=pass (mx1.freebsd.org: domain of yuri@aetern.org designates 64.147.123.24 as permitted sender) smtp.mailfrom=yuri@aetern.org Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id E4805320083A; Fri, 5 May 2023 08:27:26 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 05 May 2023 08:27:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aetern.org; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1683289646; x=1683376046; bh=OWGOH4Q9y7RohqgAyMmckby9L5KE8YOtJ20 91DnbDvg=; b=jBHZrAFobEINLclSedbrhV22qw8KQaDekSjAmzJYXRbbYF4yG84 vNNBt0/0k7VqnZbIO6JZEw5Ag2wt1edAisbcKYpJdiZgqc1ELywX4tk85Eh01TyD 5LlJ7zatc06dUIRaPsQU+xGAZq/jjXqeHhRZ8rtfFTr3AfYruds/zzyU8oQPfpEc kLKzdHCQ5Gt2Zf/JiOH+68NQRD30NxadtDDlwKsUPeaSa0oYrBQg03XaTQK1pOf+ RDry7X6XZVYlQsNgD7c4phIjEoyGKXDqP4xLgJsKwk788BpcEZPwji29Uh42x56B apUPeh50shM+nxi//GvckRdhshvM4Vsgz5g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1683289646; x= 1683376046; bh=OWGOH4Q9y7RohqgAyMmckby9L5KE8YOtJ2091DnbDvg=; b=j jEmYNO62j+vI8oy6LNu0z6zp41O0izPIFwWWxZDfntNgRVXmQ3Krgwnu8oYjzhaJ t+s2LA1lTDfn3Koen8G9xUmk2nhcmz8+BCsryCVBzG4ORYVWV4j7NlxeX2naCY+w Z5Q6bWpy6RkPMgrUCrJUCXmNoCIDYJgt4lIuS/7D9wb9sLTvYyag7VpCBhHn5sUV TyNu/f8Xq5L5YQV7SvOtkIC4AGax5ss1qKUeZG+/Gx3aa1DSvrFbPyswuyDDxtkZ ZckaOHgNlBCgErm2K7hc9gd+ovVxgdm7ThFwXS1AOI6nrXnSHSLZ15kMfj+X80jj 64VuroadksncSJ+gpj8dQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeefvddghedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttdefjeenucfhrhhomhepjghurhhi uceohihurhhisegrvghtvghrnhdrohhrgheqnecuggftrfgrthhtvghrnhepgeehleevue ehhffggfetteffieffhfduteduteeuvdehvdfhffdvtefhffejjedvnecuffhomhgrihhn pehfrhgvvggsshgurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhephihurhhisegrvghtvghrnhdrohhrgh X-ME-Proxy: Feedback-ID: i0d79475b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 5 May 2023 08:27:25 -0400 (EDT) Message-ID: <1b4c658e-0311-876b-bc55-ccbb5200b1c6@aetern.org> Date: Fri, 5 May 2023 14:27:23 +0200 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: git: 5282ada06bbc - main - ObsoleteFiles: Complete 20201025: Remove cal data files Content-Language: en-US To: Li-Wen Hsu , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202305040433.3444XY57062143@gitrepo.freebsd.org> From: Yuri In-Reply-To: <202305040433.3444XY57062143@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4QCVLm6xf2z3Htw X-Spamd-Bar: / X-Spamd-Result: default: False [-0.40 / 15.00]; R_SPF_ALLOW(-0.20)[+ip4:64.147.123.24]; R_DKIM_ALLOW(-0.20)[aetern.org:s=fm3,messagingengine.com:s=fm3]; DKIM_TRACE(0.00)[aetern.org:+,messagingengine.com:+]; local_wl_from(0.00)[yuri@aetern.org]; ASN(0.00)[asn:29838, ipnet:64.147.123.0/24, country:US] X-Rspamd-Pre-Result: action=no action; module=multimap; Matched map: local_wl_from X-ThisMailContainsUnwantedMimeParts: N Li-Wen Hsu wrote: > The branch main has been updated by lwhsu: > > URL: https://cgit.FreeBSD.org/src/commit/?id=5282ada06bbc6727b467d6f6530fa19114143c61 > > commit 5282ada06bbc6727b467d6f6530fa19114143c61 > Author: Li-Wen Hsu > AuthorDate: 2023-05-04 04:28:52 +0000 > Commit: Li-Wen Hsu > CommitDate: 2023-05-04 04:28:52 +0000 > > ObsoleteFiles: Complete 20201025: Remove cal data files > > Fixes: d20d6550187a calendar: remove all datafiles except freebsd one > MFC after: 3 days > --- > ObsoleteFiles.inc | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc > index 6e7c5205a2bf..ede2871455ae 100644 > --- a/ObsoleteFiles.inc > +++ b/ObsoleteFiles.inc > @@ -6199,6 +6199,18 @@ OLD_FILES+=usr/share/calendar/uk_UA.KOI8-U/calendar.all > OLD_FILES+=usr/share/calendar/uk_UA.KOI8-U/calendar.holiday > OLD_FILES+=usr/share/calendar/uk_UA.KOI8-U/calendar.misc > OLD_FILES+=usr/share/calendar/uk_UA.KOI8-U/calendar.orthodox > +OLD_DIRS+=usr/share/calendar/de_AT.ISO_8859-15 > +OLD_DIRS+=usr/share/calendar/de_DE.ISO8859-1 > +OLD_FILES+=usr/share/calendar/de_DE.ISO8859-15 > +OLD_DIRS+=usr/share/calendar/fr_FR.ISO8859-1 > +OLD_FILES+=usr/share/calendar/fr_FR.ISO8859-15 > +OLD_DIRS+=usr/share/calendar/hr_HR.ISO8859-2 > +OLD_DIRS+=usr/share/calendar/hu_HU.ISO8859-2 > +OLD_DIRS+=usr/share/calendar/pt_BR.ISO8859-1 > +OLD_DIRS+=usr/share/calendar/pt_BR.UTF-8 > +OLD_DIRS+=usr/share/calendar/ru_RU.KOI8-R > +OLD_DIRS+=usr/share/calendar/ru_RU.UTF-8 > +OLD_DIRS+=usr/share/calendar/uk_UA.KOI8-U > > # 20201004: logo files renamed to type-agnostic gfx-*.lua > OLD_FILES+=boot/lua/logo-beastie.lua These directories are still in etc/mtree/BSD.usr.dist, so they get recreated. From nobody Fri May 5 12:45:22 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCVlS57bHz49HpL; Fri, 5 May 2023 12:45:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCVlS2lgyz3KrK; Fri, 5 May 2023 12:45:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683290724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1bVfhkvPdBfU/hBhMZwhHICbWnOTI8o11eyR4+u6de8=; b=ruIjG/m/eijGFHwcOb4qotacNTSS3PvLyEQu2C6wsRKOkrU+lzU/wMc+9I42nSXLuGkzVu 1vk9x4hHmrMdtkow++NIBkaeJsEd5SqL7CU1wyCjSEF/qg8VTm1uwRzeXFMNmRdrOwL5Me u2BFFytZoA/bIkUTWKVApOG8L5hoH2Io9grnzy4DaZKWMSLF2UPCd/r6sZNaL4QVzCdQhI +NNGEKce02o1ahMSzfFyrE/4lq7arOSQebbUGQk68ArAFK17knHflhs3ykmCASTy9T8ZJV 7kIZBfQ4hAn5di2K4aGcYTLRpC/9pLm5Q8pmEFiDqi/czrifqjTt1bXCnLk/2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683290724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1bVfhkvPdBfU/hBhMZwhHICbWnOTI8o11eyR4+u6de8=; b=WLAbPoi1ZldJsK2T1pxoSQggEGKa9/M1vx4IsB0OyJszjE32zLAWN9zeMkFR8jHEkEutyp BmwJsUIwTAkCR1IZ55PI6p14sciqZCS322tfNFcVu6MkGmbWB621IcTUIsOy4FgdeOLDgg Vl0acCVXHHH9l8zY+kElnzw9yrJSSQLLbq5pbjI0e5S2yHXR488qUJiHJcvRwcOK/V1ZaB m008GZ03esSZ6CQcXx1Dq2xcZi8VcjdRIAsPPNjAx6SVLsYT0/NDvlx6C9mDMthVDmkzpp 1Vq3/AfntPxKk6n/Gx25n8FMe6jN6aLBAlkOZR02w/bWmxSIPRR+CyYoqa40HQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683290724; a=rsa-sha256; cv=none; b=FPTta/hQGHAq/7D+ky/nvEDs8hzDkg2qowq9KO7M5Z74tG07C5NU9htJfc1fJJRld6qaSF 1JoAf1lI9sq96Lhfx9lcHrbil92I4gfl+9en0+y4TGG+YTGB5PNpmA/oHwF8tfhg/Q1vnN uvXZ1G0Ojc9jxPZ99qU5OT2ncLdRi6UgwJKeytMsJWT66oApR+g4PLvvATZjKeQRDgqBZP kXbAAH5n6G0Tbs1lYZB4d7AMfd5qvGI8dmMjS/GJFZoSqC5NICsul3pdOScZBdquRrg+Yy oGeMWzJLZihQgzRfK5hgcLRpPPAjRFD6rRhAkP9iyvZ4Ys0xz7MP8OPrqUkv+g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCVlQ2FBfzvq4; Fri, 5 May 2023 12:45:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345CjMWH048252; Fri, 5 May 2023 12:45:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345CjMRU048251; Fri, 5 May 2023 12:45:22 GMT (envelope-from git) Date: Fri, 5 May 2023 12:45:22 GMT Message-Id: <202305051245.345CjMRU048251@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: dabef9818f32 - main - dd: Tidy up the tests. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dabef9818f324a8b3cba2a361aff1d74e97be45e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=dabef9818f324a8b3cba2a361aff1d74e97be45e commit dabef9818f324a8b3cba2a361aff1d74e97be45e Author: Dag-Erling Smørgrav AuthorDate: 2023-05-05 11:17:39 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-05-05 12:42:32 +0000 dd: Tidy up the tests. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D39711 --- bin/dd/tests/dd2_test.sh | 48 ++++++++++++++++-------------------------------- 1 file changed, 16 insertions(+), 32 deletions(-) diff --git a/bin/dd/tests/dd2_test.sh b/bin/dd/tests/dd2_test.sh index c0b33fc17226..7632de3bde22 100755 --- a/bin/dd/tests/dd2_test.sh +++ b/bin/dd/tests/dd2_test.sh @@ -1,30 +1,8 @@ # # Copyright (c) 2017 Spectra Logic Corporation -# All rights reserved. # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. +# SPDX-License-Identifier: BSD-2-Clause # -# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -# $FreeBSD$ - atf_test_case max_seek max_seek_head() @@ -33,17 +11,23 @@ max_seek_head() } max_seek_body() { - case `df -T . | tail -n 1 | cut -wf 2` in - "ufs") - atf_skip "UFS's maximum file size is too small";; - "zfs") ;; # ZFS is fine - "tmpfs") - atf_skip "tmpfs can't create arbitrarily large spare files";; - *) atf_skip "Unknown file system";; + case $(df -T . | tail -n 1 | cut -wf 2) in + "ufs") + atf_skip "UFS's maximum file size is too small" + ;; + "zfs") + # ZFS is fine + ;; + "tmpfs") + atf_skip "tmpfs can't create arbitrarily large sparse files" + ;; + *) + atf_skip "Unknown file system" + ;; esac touch f.in - seek=`echo "2^63 / 4096 - 1" | bc` + seek=$(bc -e "2^63 / 4096 - 1") atf_check -s exit:0 -e ignore dd if=f.in of=f.out bs=4096 seek=$seek } @@ -55,7 +39,7 @@ seek_overflow_head() seek_overflow_body() { touch f.in - seek=`echo "2^63 / 4096" | bc` + seek=$(bc -e "2^63 / 4096") atf_check -s not-exit:0 -e match:"seek offsets cannot be larger than" \ dd if=f.in of=f.out bs=4096 seek=$seek atf_check -s not-exit:0 -e match:"seek offsets cannot be larger than" \ From nobody Fri May 5 12:45:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCVlS57cSz49Hk6; Fri, 5 May 2023 12:45:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCVlS2lj6z3KgL; Fri, 5 May 2023 12:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683290724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5d5fzhIneASAWce+XB4+/LWm8h7MT93akoXnqeqJYE0=; b=bZaLocqT9c52HT6d0A0Xfm97BFkosX+DzFPlzeZTK4Bq3KFZQjunkbYngcIv+fle5Q55Yz EzGNL3NF243OvqNGLBvF+Dpovdckeuo5503HNNMwt8o85Bcn9kHzzvcctsqHjafg19t2/j fJEAB3tmI1P7ETTqSQygrX8buvdQXYrOYJ5tu/9lrCOZGarldfAxmlioBBmuojY0pxItyh PRErukr+oJI0sKk25JzX9IaQyiowvIOaR0Cn5icz/LJjbVPCKdoCVM+0NN/Ru10T/3umdj FNgL1SJaF/MzARhQ/qakBXwVJyJcihj+Bhd4CoW5lopelWE7HygpoleFjbYC5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683290724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5d5fzhIneASAWce+XB4+/LWm8h7MT93akoXnqeqJYE0=; b=lY7nxehXBhTT0nTdt1W06GabcE9/nSqZZKZmGtruxYqLerMzbcB5YhsslAbslIwFL9UqoN eXZTrQrry60VVXVYyXbBOaC8tm3cLz80NH5PaIXQAgMsQSkeXuLBrgAI+NO5Wxox3CvYKz Pk9S+0jVYJrktIbGL57BPATFpbJG7apNRN/6Zxf+xCw2oGrjAE8tOAXsgYFur8XTIVWXab y4g9S/WqYj0miuyDXTwqNna6I57gw4f1qM5Usn7EEhgc+i5KcANEzWO0g0HrKnr1ySrp19 pFseMgAbRv+tm18j/C6n4+b8zPIL/mDLHEYipG8yYd35IHWMuHqckUT2VEnO6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683290724; a=rsa-sha256; cv=none; b=bTdZZak95l/8V2WrhpWpVe8xedDB+bC54iF7cxfa4KLu1ssztOG8iCL69/NktHVptdnmia K9wsqB5kSN0Zc4ol0k0r6s8bkjeMPG48S453ltHl+GAWqDHuyqrvceNKDSJK06ymT/I9dU DhaKbtNSY4wcSf9LgVdSCs7YxJcXzWK/qQeh9atGJE8lhMwjt5xbwJMBISPL3XgVZ+ZagW B1wlA/n8H4nrpgNQsFg+YOJIoIoCFjjbqhrhp4i9Fq8OZ1cpQBzzq5in6Sv5moiPy2I4SJ IxXARsJAdvy4F+C2ozYlSKOEmkmf37J+9FpQnQeG5hbFmeejgT28yJuIPxezbg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCVlR31rfzvq5; Fri, 5 May 2023 12:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345CjNsH048276; Fri, 5 May 2023 12:45:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345CjNLE048275; Fri, 5 May 2023 12:45:23 GMT (envelope-from git) Date: Fri, 5 May 2023 12:45:23 GMT Message-Id: <202305051245.345CjNLE048275@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: 5807f35c541c - main - dd: Fix SIGINT handling. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5807f35c541c26bbd91a3ae12506cd8dd8f20688 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5807f35c541c26bbd91a3ae12506cd8dd8f20688 commit 5807f35c541c26bbd91a3ae12506cd8dd8f20688 Author: Dag-Erling Smørgrav AuthorDate: 2023-05-05 11:17:44 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-05-05 12:42:32 +0000 dd: Fix SIGINT handling. Currently, we handle SIGINT by calling summary() and _exit() directly from the signal handler, which we install after setup(). There are several issues with this: * summary() is not signal safe; * the parent is not informed about the signal; * setup() can block on open(), and catching SIGINT at that stage will produce the correct exit status but will not print anything to stderr as POSIX demands. Fix this by making SIGINT non-restartable, changing our signal handler to only set a flag, installing it before setup(), and checking the termination flag before and after every blocking operation, i.e. open(), read(), write(). Also add two test cases, one for catching SIGINT while opening the input and one for catching it while reading. I couldn't think of an easy way to test catching SIGINT while writing (it's certainly feasible, but perhaps not from a shell script). MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: cracauer, ngie, imp Differential Revision: https://reviews.freebsd.org/D39641 --- bin/dd/dd.c | 15 ++++++++++++++- bin/dd/extern.h | 2 ++ bin/dd/misc.c | 20 ++++++++++++++++---- bin/dd/position.c | 5 ++++- bin/dd/tests/dd2_test.sh | 44 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 80 insertions(+), 6 deletions(-) diff --git a/bin/dd/dd.c b/bin/dd/dd.c index c43645fa0073..78a9e8b06720 100644 --- a/bin/dd/dd.c +++ b/bin/dd/dd.c @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -91,12 +92,16 @@ char fill_char; /* Character to fill with if defined */ size_t speed = 0; /* maximum speed, in bytes per second */ volatile sig_atomic_t need_summary; volatile sig_atomic_t need_progress; +volatile sig_atomic_t kill_signal; int main(int argc __unused, char *argv[]) { struct itimerval itv = { { 1, 0 }, { 1, 0 } }; /* SIGALARM every second, if needed */ + (void)siginterrupt(SIGINT, 1); + (void)signal(SIGINT, terminate); + (void)setlocale(LC_CTYPE, ""); jcl(argv); setup(); @@ -110,7 +115,6 @@ main(int argc __unused, char *argv[]) (void)signal(SIGALRM, sigalarm_handler); setitimer(ITIMER_REAL, &itv, NULL); } - (void)signal(SIGINT, terminate); atexit(summary); @@ -154,7 +158,9 @@ setup(void) iflags = 0; if (ddflags & C_IDIRECT) iflags |= O_DIRECT; + check_terminate(); in.fd = open(in.name, O_RDONLY | iflags, 0); + check_terminate(); if (in.fd == -1) err(1, "%s", in.name); } @@ -191,7 +197,9 @@ setup(void) oflags |= O_FSYNC; if (ddflags & C_ODIRECT) oflags |= O_DIRECT; + check_terminate(); out.fd = open(out.name, O_RDWR | oflags, DEFFILEMODE); + check_terminate(); /* * May not have read access, so try again with write only. * Without read we may have a problem if output also does @@ -199,6 +207,7 @@ setup(void) */ if (out.fd == -1) { out.fd = open(out.name, O_WRONLY | oflags, DEFFILEMODE); + check_terminate(); out.flags |= NOREAD; cap_rights_clear(&rights, CAP_READ); } @@ -415,7 +424,9 @@ dd_in(void) in.dbrcnt = 0; fill: + check_terminate(); n = read(in.fd, in.dbp + in.dbrcnt, in.dbsz - in.dbrcnt); + check_terminate(); /* EOF */ if (n == 0 && in.dbrcnt == 0) @@ -596,7 +607,9 @@ dd_out(int force) pending = 0; } if (cnt) { + check_terminate(); nw = write(out.fd, outp, cnt); + check_terminate(); out.seek_offset = 0; } else { return; diff --git a/bin/dd/extern.h b/bin/dd/extern.h index 07c08e2ef8f2..e801722560f7 100644 --- a/bin/dd/extern.h +++ b/bin/dd/extern.h @@ -50,6 +50,7 @@ void summary(void); void sigalarm_handler(int); void siginfo_handler(int); void terminate(int); +void check_terminate(void); void unblock(void); void unblock_close(void); @@ -69,3 +70,4 @@ extern u_char casetab[]; extern char fill_char; extern volatile sig_atomic_t need_summary; extern volatile sig_atomic_t need_progress; +extern volatile sig_atomic_t kill_signal; diff --git a/bin/dd/misc.c b/bin/dd/misc.c index 405448eb1cb0..5fbea20b7049 100644 --- a/bin/dd/misc.c +++ b/bin/dd/misc.c @@ -147,11 +147,23 @@ sigalarm_handler(int signo __unused) need_progress = 1; } -/* ARGSUSED */ void -terminate(int sig) +terminate(int signo) { - summary(); - _exit(sig == 0 ? 0 : 1); + kill_signal = signo; +} + +void +check_terminate(void) +{ + + if (kill_signal) { + summary(); + (void)fflush(stderr); + signal(kill_signal, SIG_DFL); + raise(kill_signal); + /* NOT REACHED */ + _exit(128 + kill_signal); + } } diff --git a/bin/dd/position.c b/bin/dd/position.c index 21a100cd3b24..a7dd733f0bae 100644 --- a/bin/dd/position.c +++ b/bin/dd/position.c @@ -191,9 +191,10 @@ pos_out(void) /* Read it. */ for (cnt = 0; cnt < out.offset; ++cnt) { + check_terminate(); if ((n = read(out.fd, out.db, out.dbsz)) > 0) continue; - + check_terminate(); if (n == -1) err(1, "%s", out.name); @@ -208,7 +209,9 @@ pos_out(void) err(1, "%s", out.name); while (cnt++ < out.offset) { + check_terminate(); n = write(out.fd, out.db, out.dbsz); + check_terminate(); if (n == -1) err(1, "%s", out.name); if (n != out.dbsz) diff --git a/bin/dd/tests/dd2_test.sh b/bin/dd/tests/dd2_test.sh index 7632de3bde22..c4a3065763cd 100755 --- a/bin/dd/tests/dd2_test.sh +++ b/bin/dd/tests/dd2_test.sh @@ -1,5 +1,6 @@ # # Copyright (c) 2017 Spectra Logic Corporation +# Copyright (c) 2023 Klara, Inc. # # SPDX-License-Identifier: BSD-2-Clause # @@ -46,8 +47,51 @@ seek_overflow_body() dd if=f.in of=f.out bs=4096 seek=-1 } +atf_test_case sigint +sigint_open_head() +{ + atf_set "descr" "SIGINT while opening destination" +} +sigint_open_body() +{ + atf_check mkfifo fifo + set -m + dd if=fifo of=/dev/null 2>stderr & + pid=$! + sleep 3 + kill -INT $pid + wait $pid + rv=$? + atf_check test "$rv" -gt 128 + atf_check -o inline:"INT\n" kill -l $((rv-128)) + atf_check test -s stderr +} + +atf_test_case sigint +sigint_read_head() +{ + atf_set "descr" "SIGINT while reading source" +} +sigint_read_body() +{ + atf_check mkfifo fifo + (sleep 30 >fifo &) # ensures that dd does not block on open + set -m + dd if=fifo of=/dev/null 2>stderr & + pid=$! + sleep 3 + kill -INT $pid + wait $pid + rv=$? + atf_check test "$rv" -gt 128 + atf_check -o inline:"INT\n" kill -l $((rv-128)) + atf_check test -s stderr +} + atf_init_test_cases() { atf_add_test_case max_seek atf_add_test_case seek_overflow + atf_add_test_case sigint_open + atf_add_test_case sigint_read } From nobody Fri May 5 13:15:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCWQg1M96z49KK2; Fri, 5 May 2023 13:15:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCWQg0tM1z3Mc9; Fri, 5 May 2023 13:15:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683292555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rikZ1ZgR7ishoKbrzge+S+sI4HGP+bvNb9QXSrcBMdY=; b=cOCKvm75SfqL5BhvDeNxk95peHDa84VtwWx1+F9AzOHWqOgerDW/nZhRs3JYPyEuR9wyur JUuEnia5WoRbDQpx4GeYcHzh9symN0LXUDOeLCnTmcOo7koReOBli46299qQs8l5ABLqu0 0HqJObQa4tpMLrS0AwgicnnAX+SquQzgLdEJDo2nvVnxHWZ0RUJzDX3CvcHU5z2mhcQ5bc scJHfJfIH21RZkW4gEQLgE1Nlp83vw2hU1NhKsuF+1/TkAyEOmuqKBE+bw52ofbSO2SkVj I6QssPcVAXU9D0E8tTHCgcOFm6zJ6epeYNCjDk4Sv+98bQ2AmdaecoMuQT/sJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683292555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rikZ1ZgR7ishoKbrzge+S+sI4HGP+bvNb9QXSrcBMdY=; b=h4K6cXF1UkDhL9WBxkC8ckX9ngMeoMKV2E2jzyKbkEzklqDoclN+t3F98TQ9uZ+NvF4qVa knIzXOoC4m1e2zihSYNfEApeUSyYZys9I0eKuv94+qgXYBprxZhJOyoJdtw653+UGkT8mH XmRxVAOHTfG7k+W0CrS/suZkGRvgSwi7af7BxaywinuHALjkM0f8A/DGFylcQ0xghZIKqb HP9rJQYPZirtyTghc8LEN+nW+4Q36+5Nl27XklISMn/wqeR1Uub8AqIYsTahiwbt4gBSWZ HHDo0dfEEYTcCNeJHWFHe9qiiufNfFREcbIkghcdpEW+y5MmnB8mwcsj9D2n/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683292555; a=rsa-sha256; cv=none; b=KiDGdXhrVNy5Yhj71UzPkAWHkTJa1lO4yGQ+PytvXUyF6xSttnZoaBBfRAnm1Hc3LBR24O gyu9/zYRXR0Zr3+9wpTQx0Xw9JUVcnQqLNx0x6nQ4cQcN+7HWUSrCWw930kWb7uiCjNvs6 fEY5XbYGvXvApPletSKMUm70X3Dik+U8n/hA79nlp75GHVeyCasguR3GCXkucoZipJRjCi /1KDsvUIIuxVAtIagVU7z+42GK1BG/mbu1T3lFmSDjS3f+gz5Qp0h2reD+X2xOWxP0rvb3 W0YkNe9Ozl2INjwOuAGJuQSpMdm6lIHCIk36nuwo+30F6fhQpZbMJqByPSEWyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCWQf71c5zwNG; Fri, 5 May 2023 13:15:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345DFs6P098552; Fri, 5 May 2023 13:15:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345DFsTf098551; Fri, 5 May 2023 13:15:54 GMT (envelope-from git) Date: Fri, 5 May 2023 13:15:54 GMT Message-Id: <202305051315.345DFsTf098551@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Yuri Pankov Subject: git: 66659955dafd - main - bhyve(8): fix typo in examples List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuripv X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 66659955dafd3effd37e292c36c5404318d388e8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yuripv: URL: https://cgit.FreeBSD.org/src/commit/?id=66659955dafd3effd37e292c36c5404318d388e8 commit 66659955dafd3effd37e292c36c5404318d388e8 Author: Alexey Marchenko AuthorDate: 2023-05-05 12:56:50 +0000 Commit: Yuri Pankov CommitDate: 2023-05-05 13:08:51 +0000 bhyve(8): fix typo in examples PR: 271259 --- usr.sbin/bhyve/bhyve.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 72018912e2c5..321c014395fb 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 19, 2022 +.Dd May 5, 2023 .Dt BHYVE 8 .Os .Sh NAME @@ -988,7 +988,7 @@ Be sure to create a per-guest copy of the template VARS file from .Bd -literal -offset indent bhyve -c 2 -m 4g -w -H \\ -s 0,hostbridge \\ - -s 31,lpc -p com1,stdio \\ + -s 31,lpc -l com1,stdio \\ -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CODE.fd,BHYVE_UEFI_VARS.fd uefivm .Ed From nobody Fri May 5 13:34:31 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCWr757kQz49LYM; Fri, 5 May 2023 13:34: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 4QCWr74fFWz3PWH; Fri, 5 May 2023 13:34:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683293671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lA2vWnUIwhQ07c02UNSvBlZSE2pgP0SiPoxJe+TvT1g=; b=YKnpNHBN1bt0AsHLbUCnOlrcQFnfc8dCin6vh3/ITPbohl95KHVPy9edyoT8Uf03kvvONZ C2uBPsaumgIBqGoxt5xmZerFXU+Yabe/eHQmLI7ugPAd2q7mlZzkHUe32lmEev2xVOu3AJ TNentWmoBtL4/fGg1H0bZDHQxoLabfbATR8iGIu6Gb/idnxLgAmK+8+70W6NHbUeNlmopP jje1HEcmSQNoo+ymUs/ac0qCJdMqQTMxqKDZ9o2U8276MYI5bnD77vhv4Gh9xlM/dDXxAD knhNob/4X2r78JR59pxZ1qXWaUhNPd9Gp1/uATGeGbM/LUYnnF+NuRDBmfzDxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683293671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lA2vWnUIwhQ07c02UNSvBlZSE2pgP0SiPoxJe+TvT1g=; b=CRZ71/Wd44b8TcKp9lq5HBOZCh2028TXaON8fwHQaQT1wWFxrcAJAFWcbzFACs+RoBZtDF AKz5+ufe7OdeeuAxh/VnCaYrHQfDYCBY21Pkrpr2QE+jptGgi2wkUnny+ZeT1hSzfjeLhk hmpZvChTQ9NiP7YVw5c/2Mb7HpE+T8+sPWGeAGXv0XtS+jXOVEyF4H7dLj1yPpv3MNbYWp 62MmZybaBnqt4WLuNxdjfV3Fj+mNgbLR7OLSXnMOOhAhtoVSm1pZBhvwHts6hjfZxA/3xZ t2MbdTaegs++PALrrFHrhJ6MhRqeoMp7FPQrQ55OPaBGlCcbFCr7BzuXojH8Bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683293671; a=rsa-sha256; cv=none; b=arVRix3nC1ZizRkoDN13DuZYCqstV527DKA5CuthrJNPccYVv+brKGHb1tCX0efdv0hVtG xtK29z8rnS/pvC84ccvIK6pNvvH/6pGY/l3L3Z0ZtE+Y1OeJo8XBTdxrAKHYO92SMBiQ/h fktEyMkZElMF9+1cCaXsyY8bj3qKT+xrAJB/Sdkl/vdiAhDhKJIj0Kq5z3PXZyTeA9+aIU JcKs56vXEY+ZmKKN4NOLwdIzCuBL+ZIvwno5RzGgTmLymhUMzVPhkfnHa8ZebKWBc894NB fCP/2PkLTvXsGCytJPtN1vNkK3+PfWlOmbWj8isL5/LpKOXdy9CE6E8RExQndQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCWr73j5zzwLn; Fri, 5 May 2023 13:34:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345DYVPH031201; Fri, 5 May 2023 13:34:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345DYVG1031200; Fri, 5 May 2023 13:34:31 GMT (envelope-from git) Date: Fri, 5 May 2023 13:34:31 GMT Message-Id: <202305051334.345DYVG1031200@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Corvin=20K=C3=B6hne?= Subject: git: b10e100d1696 - main - vmm: don't free unallocated memory List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: corvink X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b10e100d1696782cfebef09b5870dfc6d1b3217b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=b10e100d1696782cfebef09b5870dfc6d1b3217b commit b10e100d1696782cfebef09b5870dfc6d1b3217b Author: Corvin Köhne AuthorDate: 2023-05-05 06:36:20 +0000 Commit: Corvin Köhne CommitDate: 2023-05-05 13:34:00 +0000 vmm: don't free unallocated memory If vmx or svm is disabled in BIOS or the device isn't supported by vmm, modinit won't allocate these state save areas. As kmem_free panics when passing a NULL pointer to it, loading the vmm kernel module causes a panic too. PR: 271251 Reviewed by: markj Fixes: 74ac712f72cfd6d7b3db3c9d3b72ccf2824aa183 ("vmm: Dynamically allocate a couple of per-CPU state save areas") MFC after: 1 week Sponsored by: Beckhoff Automation GmbH & Co. KG Differential Revision: https://reviews.freebsd.org/D39974 --- sys/amd64/vmm/amd/svm.c | 5 ++++- sys/amd64/vmm/intel/vmx.c | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/amd64/vmm/amd/svm.c b/sys/amd64/vmm/amd/svm.c index 0af7342128f2..d295401a9043 100644 --- a/sys/amd64/vmm/amd/svm.c +++ b/sys/amd64/vmm/amd/svm.c @@ -166,7 +166,10 @@ svm_modcleanup(void) { smp_rendezvous(NULL, svm_disable, NULL, NULL); - kmem_free(hsave, (mp_maxid + 1) * PAGE_SIZE); + + if (hsave != NULL) + kmem_free(hsave, (mp_maxid + 1) * PAGE_SIZE); + return (0); } diff --git a/sys/amd64/vmm/intel/vmx.c b/sys/amd64/vmm/intel/vmx.c index 55ed5fdf1a00..8b8f8fe6cb25 100644 --- a/sys/amd64/vmm/intel/vmx.c +++ b/sys/amd64/vmm/intel/vmx.c @@ -619,7 +619,9 @@ vmx_modcleanup(void) nmi_flush_l1d_sw = 0; smp_rendezvous(NULL, vmx_disable, NULL, NULL); - kmem_free(vmxon_region, (mp_maxid + 1) * PAGE_SIZE); + + if (vmxon_region != NULL) + kmem_free(vmxon_region, (mp_maxid + 1) * PAGE_SIZE); return (0); } From nobody Fri May 5 13:57:08 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCXLJ0MTFz49Mlx; Fri, 5 May 2023 13:57: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 4QCXLH6t4Nz3kf7; Fri, 5 May 2023 13:57:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683295032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QvmdUgwJ7G0fx4f2IrGSwIw6EBU/G8awIroWvriDMI4=; b=KhtrPbzz9A+2N4gYgQWMQPzD1Lzs7iq50oL7lYCB+7mn2CTddEPEJemwiUka7o/CZhx7HW Q1p6lrLcHI5yJMDHqva0LemTn7e25xK6khs0MyfkwF8RCvHV4IK3+xdVHQYEOegBmBAz1H T6B4sDbAV1H7+pYIdHeJBbo7qosRD3YQBkqFh6LrSBvtZN/YSod5ymnBK91IKvAY2tOLFx g78ljMLpRjxNMNppcy1So59ZCyxxVi0mmbX3aI28LEe/yxRb/fSmJ/codZ+qONw+uZe1Jf uefpmfpnikxGSMHFP3mgmLWZjA5+I6wp3nnwWgUD8uw9ix9xOjHYuzEuF7UC5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683295032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QvmdUgwJ7G0fx4f2IrGSwIw6EBU/G8awIroWvriDMI4=; b=vFNm1MyLfkhBn5MgoSkimd0GTb7WJhWiYFfQONMWWVF3RMd1P/GMNLCREVgm/DL3UnEaMo uadOGAcyieT3tdpHOop8qMPjb/MX+y2eeF1cJqU4wrTQlvIFyThR3lr2b/i6sDrmaWaii0 SZj1YI/mHn3f4n7K37TsRSz4rtWCGB7RNGOiTY1JTyGJ1xmyQLnTzQv7eeh8XsPbwuxDED p3MQaU/jgO5Xbno4xx1OpCE9DtvocCdqNCeMsEtgN9aC4U2o4m/3zTkgSwP7nmHz0ui6x+ BXPEktB4pS6oBHyuAZ0Jrr46Xo4DjqrXiouDVMzV416TEtZtes2SkzikIwDxTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683295032; a=rsa-sha256; cv=none; b=aNn8NnOliwr0uPJg1G50Wf25dQoFMbF3Rz7of6ceE188qpmKnP4zjq/O0sgT3YKQduje+6 0s1g8nvr0JRXCx5ByAcbnc9De0e8ZwuR+Zrcdmy5C/0/48IETdbt4LeGbDPHBPZrTRNIG3 /U9JGz4DBllhfoMAMzP3NCTJ4dL3Y3cSabraG79ypskrB9siDHTjJVZIg6pPjV6XsY25ZR T38UMWqEpo5BjvWqdM8cG/zF5yLUo6jXg0yuhDn0YQOCz52pvJzV+tf3aPHJD4gnb4Zdc8 4m6yYJU8clQ84JPzU9gRemaPIP/kOrmZkfw8/Z1NwPOReHmrmHUAsq1AGi0+8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCXLH5tnWzxK0; Fri, 5 May 2023 13:57:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345DvBUv064554; Fri, 5 May 2023 13:57:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345Dv8E2064545; Fri, 5 May 2023 13:57:08 GMT (envelope-from git) Date: Fri, 5 May 2023 13:57:08 GMT Message-Id: <202305051357.345Dv8E2064545@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Joseph Mingrone Subject: git: dd744a896be3 - main - libpcap: Update to 1.10.4 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dd744a896be358d6f001766188da6aed80e00378 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrm: URL: https://cgit.FreeBSD.org/src/commit/?id=dd744a896be358d6f001766188da6aed80e00378 commit dd744a896be358d6f001766188da6aed80e00378 Merge: b10e100d1696 6b96668d5b49 Author: Joseph Mingrone AuthorDate: 2023-05-05 13:56:10 +0000 Commit: Joseph Mingrone CommitDate: 2023-05-05 13:56:10 +0000 libpcap: Update to 1.10.4 Changelog: https://git.tcpdump.org/libpcap/blob/104271ba4a14de6743e43bcf87536786d8fddea4:/CHANGES Reviewed by: emaste Obtained from: https://www.tcpdump.org/release/libpcap-1.10.4.tar.gz Sponsored by: The FreeBSD Foundation contrib/libpcap/CHANGES | 38 ++++++++++----- contrib/libpcap/Makefile.in | 4 +- contrib/libpcap/README.md | 2 +- contrib/libpcap/VERSION | 2 +- contrib/libpcap/aclocal.m4 | 13 +++-- contrib/libpcap/config.guess | 12 +++-- contrib/libpcap/config.sub | 33 +++++++++---- contrib/libpcap/configure | 64 ++++++++++++------------- contrib/libpcap/configure.ac | 26 +++++----- contrib/libpcap/gencode.c | 16 +++---- contrib/libpcap/mkdep | 2 +- contrib/libpcap/msdos/makefile | 8 ++-- contrib/libpcap/nametoaddr.c | 40 ++++++++-------- contrib/libpcap/optimize.c | 16 +++---- contrib/libpcap/pcap-bt-linux.c | 6 +-- contrib/libpcap/pcap-common.c | 4 +- contrib/libpcap/pcap-libdlpi.c | 2 +- contrib/libpcap/pcap-linux.c | 8 ++-- contrib/libpcap/pcap-netfilter-linux.c | 4 +- contrib/libpcap/pcap-npf.c | 6 +-- contrib/libpcap/pcap-sita.c | 2 +- contrib/libpcap/pcap-sita.html | 22 ++++----- contrib/libpcap/pcap-snf.c | 20 ++++---- contrib/libpcap/pcap-usb-linux.c | 14 +++--- contrib/libpcap/pcap/bpf.h | 6 +-- contrib/libpcap/pcap/dlt.h | 4 +- contrib/libpcap/pcap/pcap.h | 4 +- contrib/libpcap/rpcapd/Makefile.in | 2 +- contrib/libpcap/rpcapd/org.tcpdump.rpcapd.plist | 2 +- contrib/libpcap/rpcapd/rpcapd.manadmin.in | 42 +++++++++++++++- contrib/libpcap/sockutils.c | 2 +- contrib/libpcap/testprogs/Makefile.in | 2 +- 32 files changed, 252 insertions(+), 176 deletions(-) diff --cc contrib/libpcap/README.md index 46c33c24125e,000000000000..e38b9a15d6b3 mode 100644,000000..100644 --- a/contrib/libpcap/README.md +++ b/contrib/libpcap/README.md @@@ -1,76 -1,0 +1,76 @@@ +# LIBPCAP 1.x.y by [The Tcpdump Group](https://www.tcpdump.org) + +**To report a security issue please send an e-mail to security@tcpdump.org.** + +To report bugs and other problems, contribute patches, request a +feature, provide generic feedback etc please see the +[guidelines for contributing](CONTRIBUTING.md). + +The [documentation directory](doc/) has README files about specific +operating systems and options. + +Anonymous Git is available via: + + https://github.com/the-tcpdump-group/libpcap.git + +This directory contains source code for libpcap, a system-independent +interface for user-level packet capture. libpcap provides a portable +framework for low-level network monitoring. Applications include +network statistics collection, security monitoring, network debugging, +etc. Since almost every system vendor provides a different interface +for packet capture, and since we've developed several tools that +require this functionality, we've created this system-independent API +to ease in porting and to alleviate the need for several +system-dependent packet capture modules in each application. + +```text - formerly from Lawrence Berkeley National Laboratory ++formerly from Lawrence Berkeley National Laboratory + Network Research Group + ftp://ftp.ee.lbl.gov/old/libpcap-0.4a7.tar.Z +``` + +### Support for particular platforms and BPF +For some platforms there are `README.{system}` files that discuss issues +with the OS's interface for packet capture on those platforms, such as +how to enable support for that interface in the OS, if it's not built in +by default. + +The libpcap interface supports a filtering mechanism based on the +architecture in the BSD packet filter. BPF is described in the 1993 +Winter Usenix paper ``The BSD Packet Filter: A New Architecture for +User-level Packet Capture'' +([compressed PostScript](https://www.tcpdump.org/papers/bpf-usenix93.ps.Z), +[gzipped PostScript](https://www.tcpdump.org/papers/bpf-usenix93.ps.gz), +[PDF](https://www.tcpdump.org/papers/bpf-usenix93.pdf)). + +Although most packet capture interfaces support in-kernel filtering, +libpcap utilizes in-kernel filtering only for the BPF interface. +On systems that don't have BPF, all packets are read into user-space +and the BPF filters are evaluated in the libpcap library, incurring +added overhead (especially, for selective filters). Ideally, libpcap +would translate BPF filters into a filter program that is compatible +with the underlying kernel subsystem, but this is not yet implemented. + +BPF is standard in 4.4BSD, BSD/OS, NetBSD, FreeBSD, OpenBSD, DragonFly +BSD, macOS, and Solaris 11; an older, modified and undocumented version +is standard in AIX. {DEC OSF/1, Digital UNIX, Tru64 UNIX} uses the +packetfilter interface but has been extended to accept BPF filters +(which libpcap utilizes). + +Linux has a number of BPF based systems, and libpcap does not support +any of the eBPF mechanisms as yet, although it supports many of the +memory mapped receive mechanisms. +See the [Linux-specific README](doc/README.linux) for more information. + +### Note to Linux distributions and *BSD systems that include libpcap: + +There's now a rule to make a shared library, which should work on Linux +and *BSD, among other platforms. + +It sets the soname of the library to `libpcap.so.1`; this is what it +should be, **NOT** `libpcap.so.1.x` or `libpcap.so.1.x.y` or something such as +that. + +We've been maintaining binary compatibility between libpcap releases for +quite a while; there's no reason to tie a binary linked with libpcap to +a particular release of libpcap. From nobody Fri May 5 14:20:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCXs35PLyz49NpG; Fri, 5 May 2023 14:20:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCXs34yHpz3mFj; Fri, 5 May 2023 14:20:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683296423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Im6pwkfixBrGqkmaFIYS+906cZhzsQU4xOBL9Cntn9U=; b=EQcj+YtmaOzUsgFUoxeVc4VBf3n7E8DV1El5PIry2SoHFobUElGzIwPJpV7O0hVznbCawv 0WX+obVtyWDyV2RaO67pBpCSMVh5OaEB2JUZxn5fLTZDrvxahHVAifY3/rJr0yHbf41LoJ XYKPO+Hm80O3cO35cOThB5xb1zKin/mZBLdbzenCOc2uCK8Ol8j7oWgvil2tioBJqhed4D u67jnjRy2rF2rNLtQLuUHMx0dH4jqfzmcO31rHAssl7mS54GN5kgHUHAiBgv/oKhJLND0a 26EcUPi08jaxTGN2k26tcMau36RhWi/mO4XrPfEVsxxaW5RoCbOQJ+Idda0ETA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683296423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Im6pwkfixBrGqkmaFIYS+906cZhzsQU4xOBL9Cntn9U=; b=jPTOy9ITBW5XW5NeJwvVLukxGO4aNoijmuySVhzohFKl13nE4+lu7z9vjvUcc56IfuQay4 +z8OyKpxP7ZLmVETlwaUy3a6mWI4WIDphksphEyaQCZ5YO4uPNhBTAHB/umRjB7d8CYcj5 fVwX4nCjRPxRR3/p28IC7nN/H5jmN9082O9GBZozRwtqAzfw21Vh0Oz1Al3f12SMqkAj/R 3wBH+W4WLFSiw7jaJplc5D+JKyRGU/31w6EP/GgikpkbneE6LqDzjoQVugosLQViaKaq5u rWD14pPabGObRQEi9f4ToXeY3reUikhEL8xshGjV1LT2PRWTAZrAF/GW1Nu+Uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683296423; a=rsa-sha256; cv=none; b=dIpXkXQfvfajCQ7oSJt4mPdmpLu8Ixg/LpwmfUMR92n9js5DhJPciY6s98AGjtT5SehWzi 08LHGd+Fh70V7yvCtjcyKqscgXmFA+V2nk+sO+ZeitOQkym3VxNolKUWvRM2XA9674kzmT 0koVrJyWnzhtUrYCdS9zru/hRiL99dvkGZmRH9p/SCc86KVYk8UAMxU1obPV8pCg61ebrQ forY8LJSxdEDKHijB9k6go17jzWuWICt223epajQNBd4wdANlQVdqrms5hEpgzBRxqRYNd qNXmhLDERNhWRP5iJF9R/hYf7HOy4BmnLzG8e0rAh8PSSCRXqgWAlz/jp8PXrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCXs342S8zxnc; Fri, 5 May 2023 14:20:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345EKNFC006849; Fri, 5 May 2023 14:20:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345EKN03006848; Fri, 5 May 2023 14:20:23 GMT (envelope-from git) Date: Fri, 5 May 2023 14:20:23 GMT Message-Id: <202305051420.345EKN03006848@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Piotr Kubaj Subject: git: 448045e4a787 - main - share/mk/bsd.cpu.mk: add AltiVec / VSX to powerpc*'s MACHINE_CPU List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 448045e4a7873f4733cebda56df002acabb2aef1 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/src/commit/?id=448045e4a7873f4733cebda56df002acabb2aef1 commit 448045e4a7873f4733cebda56df002acabb2aef1 Author: Piotr Kubaj AuthorDate: 2023-05-05 14:19:19 +0000 Commit: Piotr Kubaj CommitDate: 2023-05-05 14:20:28 +0000 share/mk/bsd.cpu.mk: add AltiVec / VSX to powerpc*'s MACHINE_CPU MFC after: 3 days Approved by: jhibbits Differential revision: https://reviews.freebsd.org/D39240 --- share/mk/bsd.cpu.mk | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk index dbd58a385b23..ba18204b9230 100644 --- a/share/mk/bsd.cpu.mk +++ b/share/mk/bsd.cpu.mk @@ -276,6 +276,25 @@ MACHINE_CPU += amd64 sse2 sse mmx . elif ${MACHINE_ARCH} == "powerpc" . if ${CPUTYPE} == "e500" MACHINE_CPU = booke softfp +. elif ${CPUTYPE} == "g4" +MACHINE_CPU = altivec +. endif +. elif ${MACHINE_ARCH} == "powerpc64" +. if ${CPUTYPE} == "e5500" +MACHINE_CPU = booke +. elif ${CPUTYPE} == power7 +MACHINE_CPU = altivec vsx +. elif ${CPUTYPE} == power8 +MACHINE_CPU = altivec vsx vsx2 +. elif ${CPUTYPE} == power9 +MACHINE_CPU = altivec vsx vsx2 vsx3 +. else +MACHINE_CPU = altivec +. endif +. elif ${MACHINE_ARCH} == "powerpc64le" +MACHINE_CPU = altivec vsx vsx2 +. if ${CPUTYPE} == power9 +MACHINE_CPU += vsx3 . endif ########## riscv . elif ${MACHINE_CPUARCH} == "riscv" From nobody Fri May 5 14:44:36 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCYP10pL0z49QPC; Fri, 5 May 2023 14:44: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 4QCYP10GkYz3nf8; Fri, 5 May 2023 14:44:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683297877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6DhMK3Gw0qZf+kxJ3UnW/za0qQ/f8W9c659c7q2tce8=; b=iR1dnG4KXQV4jAyTrc3cEF8nNYimjpmCKjN5doIrtAwpvCs0MwnBQOEGd8ow3XC3zUKj8P If4E/aneLXvIzxMoy8x4lpQyPcYcW+mOO9hRKDHFi/Md8p04IxuDNZARrfu+b5lfrleF/O BrK/YojYsklnVSqXDptuzUqU/OS71amvlxZmtUtOr/dwR43qOyrQeAsUsGckhFHMufAtQ1 4C70XbHYI3URMLROU49/LIhVUdIVmmeCyUj9oiR4k8FGK2upl39lLdxNe+x5ZNSDnC3TyJ KpBqzJ8/tTlsuLwobVYUQv66OPS92Ym9Rxusz9S6TQbml5OYB69cx+bD/o4Hew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683297877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6DhMK3Gw0qZf+kxJ3UnW/za0qQ/f8W9c659c7q2tce8=; b=YWYmhaK4sh+tn7waUaJrhskH3CJP6SxMHLLH3GjgyfJAvB41kmjp0VGNVn/uhasekvRsgT WpZ6fAW0bfq2V/BZbYVJvOjJWu0dNHk/5mj6naVWM1M7QSbSRXM74+uIQi8A2IYzp5R8Ug eGtjxqlb/yH0BJhylDEJqYer4VrM1rw8iLZBnCbRYvkJsMArRGNg66HPuJboK43x1DYusm q/ln7kUszgdPqs4bQZ7W8cCn878yRBQO5V6nE7pXXZ7ShpIVJfSgLYjt8zLLCN45srOI/s AeZEld50IHq+vTP2RoRhLqYNQTREP6Rx+BbMe3iHKEAL5lp92cj+clzeDsHsFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683297877; a=rsa-sha256; cv=none; b=Du74t18xmhw/Gf4o4l1WNmGPCxYDPm3OEDtB0SPs0sPNJQU8Rc2MaeIZutZRKXgr+Znbjy T/V/iIn4Q+hN8wrFzI9uwDrELzXm+KXfiqFwVUJul86NvpIeoSukgu/T3uLrGETH7SFIzw l60l5SslUSf9/zuyANVOe4Fs4S+HlNKnVXeomIphDRbtnvKRAqUowandzODRSGAUIbLApU KHg40JpCAjUToV49bpdFuRcXPT49luipianiTX31PigAwXyyrx4Y1FB7J86DYJAXBaXqN7 /dTiSLlwP5KcQ61A3qbxVw/FkToUgYwlzNKl9HNdhW2NLKvKEpKCkuyuuRrewg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCYP06R2wzypg; Fri, 5 May 2023 14:44:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345EiakB046693; Fri, 5 May 2023 14:44:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345EiajE046692; Fri, 5 May 2023 14:44:36 GMT (envelope-from git) Date: Fri, 5 May 2023 14:44:36 GMT Message-Id: <202305051444.345EiajE046692@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Joseph Koshy Subject: git: c2eae5c39adc - main - man9: Add a manual page for kstack_contains(9). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkoshy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c2eae5c39adcad87b9c04aaeefa0bef74e5ccf32 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jkoshy: URL: https://cgit.FreeBSD.org/src/commit/?id=c2eae5c39adcad87b9c04aaeefa0bef74e5ccf32 commit c2eae5c39adcad87b9c04aaeefa0bef74e5ccf32 Author: Joseph Koshy AuthorDate: 2023-05-02 09:37:38 +0000 Commit: Joseph Koshy CommitDate: 2023-05-05 14:42:59 +0000 man9: Add a manual page for kstack_contains(9). Approved by: gnn (mentor) Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D39933 --- share/man/man9/Makefile | 1 + share/man/man9/kstack_contains.9 | 62 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 84b2fbf5e34d..2a320cf0fcba 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -204,6 +204,7 @@ MAN= accept_filter.9 \ kobj.9 \ kproc.9 \ kqueue.9 \ + kstack_contains.9 \ kthread.9 \ ktr.9 \ lock.9 \ diff --git a/share/man/man9/kstack_contains.9 b/share/man/man9/kstack_contains.9 new file mode 100644 index 000000000000..52a6ba9e2ca6 --- /dev/null +++ b/share/man/man9/kstack_contains.9 @@ -0,0 +1,62 @@ +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2023 Joseph Koshy +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd May 2, 2023 +.Dt KSTACK_CONTAINS 9 +.Os +.Sh NAME +.Nm kstack_contains +.Nd determine if an address range lies within the kernel stack for a thread +.Sh SYNOPSIS +.In machine/stack.h +.Ft bool +.Fn kstack_contains "struct thread *td" "vm_offset_t va" "size_t len" +.Sh DESCRIPTION +This function can be used to determine whether a given address range +falls within the kernel stack for the thread pointed to by +.Fa td . +.Sh RETURN VALUES +The function +.Fn kstack_contains +returns +.Dv true +if the range of addresses +.Bo +.Fa va Ns .. Ns ( +.Fa va Ns + Ns +.Fa len Ns - Ns 1 ) +.Bc +(both addresses inclusive) lies within the kernel stack for the thread +pointed to by argument +.Fa td , +or returns +.Dv false +otherwise. +.Sh ERRORS +This function does not return an error. +.Sh SEE ALSO +.Xr kproc 9 , +.Xr kthread 9 From nobody Fri May 5 15:00:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCYl367WBz49QWD; Fri, 5 May 2023 15:00:15 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCYl35jsTz3qjk; Fri, 5 May 2023 15:00:15 +0000 (UTC) (envelope-from kevans@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683298815; 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=D0dpFP8H0QRsCvptg6bdBiLGIP7VK2b48IMm41OKCuU=; b=fMPVeMCA3rh6tDWqE8JN5E9N0TxtUprCuLe14rrc5oVCcvqloPncfHKecJ348iNpW2XP9H 4yZ4Owz23anIRXtxCFeokqyE0pozf+nftptJMWGEzAH0J6+IgD/IzOXAEJ6GI4puzTtt/J NZOa3OiQAjGAjfzLxMl/BQu+s3vaSkAxwcT/hATCOdqC+eBd4gBfcbHjaRCD5YkL9LfVq/ uY+jwN3MoFM4QrxuHvNYso4iGsfXpDaCnWrr/7sNVVn7Y5fbVXNEZjszcWixzUfhjDc8RR NVButj4K8GBedH7J0HpMyjBHtry7SINxh+WtNvZivD/rTvUh5FRqFGauVV8/NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683298815; 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=D0dpFP8H0QRsCvptg6bdBiLGIP7VK2b48IMm41OKCuU=; b=repiJVCC4MdkpR5sWHV5B80PDO7aZqM8VXt8PC3LVA9tWjdqw5nzBk5Xn3y9q+eYNPPA3Y GXIMwXId1PDsIpY2m5Bx9tf45mmdy3zZ0Gsno5D6TtlSpeFFJU6ySBd+aNjnU/4tHUCDz1 JQQPhhRXxukM6AG60ATjiXfWPXLOFlShyUq2/kDhaR0pIJiAuV3+dHZ93fhX+vucADN5Zu tx4pS94Is6tZHiB1isaL1EP/c76ZzL6N8Gjvn2PzWn0va8+SeWs9pFbeWtNTq2z94rUQhc zzKH2sNI3ZOrTS8hmW2eKsYu8oGx33rUZqfbwJM9R/gZanLoH+xNqs6uk+nIxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683298815; a=rsa-sha256; cv=none; b=ZrQNQC1urPL405/2c5HcppvrOx3l7HRa1bHSx0vlpDwHXVBuIzS+btzaxIWUdiyjpeRXD9 BZP7lYNp9iw71BYOkGfzvHw+R2J+U2VsRvxzcg0XYJqwE9BNUx9fqxHrFCBFjLylTTwOy/ RVFxjMzjxqYsKQl+0qGJfaAdQt/B4UZ/m4+uoJNWtPN4CuDnQA9PbY+AckTti5m2IXK41n 3sfT7JgR1Gb377UvSShOT65w3iKYxQcxS5f9qZ6TapTAjLinLmP1xlJPUcNGGnavlKzQAI Y/To37hp4qhoAhhgID1QMzMhn1e4DEz7rXZQKXMhkGEnegJ6NYh2vVktCaXKAA== Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QCYl34k8pzRrx; Fri, 5 May 2023 15:00:15 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f170.google.com with SMTP id af79cd13be357-74fbf99adc2so84520385a.3; Fri, 05 May 2023 08:00:15 -0700 (PDT) X-Gm-Message-State: AC+VfDwsSQbwXCWRl2aGIE+4p4LQacWuP6VWnV6I3cV+geRWHbvnhD4N GZZtJpH8IOFC6jJy+vc99dpKPeRyJhdxz2ZJ6AE= X-Google-Smtp-Source: ACHHUZ44ZrmQx6+OREmzGa6fY3O5x18R7wtfDycdhrsfmYvx/p4lZEYjXZyk4ZNkDbVZACIEq0HRsKbePIhP9wQwevA= X-Received: by 2002:a05:6214:c47:b0:5ce:7b40:89bd with SMTP id r7-20020a0562140c4700b005ce7b4089bdmr2050815qvj.18.1683298815234; Fri, 05 May 2023 08:00:15 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202304140513.33E5DsXL019547@gitrepo.freebsd.org> <20230505105935.c2e6df2864b7a9ab6c6fef81@bidouilliste.com> In-Reply-To: <20230505105935.c2e6df2864b7a9ab6c6fef81@bidouilliste.com> From: Kyle Evans Date: Fri, 5 May 2023 10:00:04 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 8935a3993219 - main - daemon: use kqueue for all events To: Emmanuel Vadot Cc: ihor@antonovs.family, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-ThisMailContainsUnwantedMimeParts: N On Fri, May 5, 2023 at 3:59=E2=80=AFAM Emmanuel Vadot wrote: > > > Hello, > > On Fri, 14 Apr 2023 05:13:54 GMT > Kyle Evans wrote: > > > The branch main has been updated by kevans: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D8935a3993219be76c7ea03e9= ad4509657d08af6c > > > > commit 8935a3993219be76c7ea03e9ad4509657d08af6c > > Author: Ihor Antonov > > AuthorDate: 2023-04-14 05:10:29 +0000 > > Commit: Kyle Evans > > CommitDate: 2023-04-14 05:12:21 +0000 > > > > daemon: use kqueue for all events > > > > Refactor daemon to use kqueue/kevent instead of signals. > > > > This changes allows to simplify the code in several ways: > > - the execution flow is now linear, no async events. > > - several variables became redundant and got removed. > > - all event handling is now concentrated inside of the event loop, = which > > makes code reading and comprehension easier. > > - new kqueuex(2) call is used for CLOEXEC, but maintained closing t= he > > kq fd prior to execve() to ease later MFC > > > > No UX/API changes are intended. > > > > Reviewed by: kevans > > Pull Request: https://github.com/freebsd/freebsd-src/pull/701 > > This break sysutils/seatd when we resume and leaves the console is a > really sad state (impossible to use, keystroke don't match). > Don't really know how to properly debug but : > > 1/ Reverting the commit make seatd not exiting on resume (and so sway > doesn't exit). > 2/ If I start seatd without daemon it works > 3/ If I manually start saetd with daemon in tmux with > "daemon -s debug -T seatd -p /var/run/seatd.pid /usr/local/bin/seatd > -g video" (so same thing as the rc script) I see > "daemon: kevent wait: Interrupted system call" printed when I get back > network. > > Feel free to ask me any test you want to debug further ;) > Can you check if this is sufficient? https://people.freebsd.org/~kevans/daemon-kq.diff We shouldn't bail out if were simply interrupted, presumably we just want to resume waiting for an event. Thanks, Kyle Evans From nobody Fri May 5 15:07:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCYw06p0sz49RRY; Fri, 5 May 2023 15:08:00 +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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCYw01yHGz3s1j; Fri, 5 May 2023 15:08:00 +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=1683299276; 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=pKq8ij9JHz2/og2f3TciNCZePfyX5mb2+jCLzq6mKqE=; b=q1iVly2QlNeac67kGHydiUsAghmX7weQuktOdBaxwOdDsl2OEk5+5t0KBINsaIhGXwhiKI BB1o7V4J6v+rfV7sWaE4UvkHm23at94XMMtkTFcyGZJtnld/wcdJWk/FjbrLyOhJNNED46 1Xx1c6hEY1Hj52gV0MZNCvSW9BK1LuU= 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 dba7125c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 5 May 2023 15:07:55 +0000 (UTC) Date: Fri, 5 May 2023 17:07:54 +0200 From: Emmanuel Vadot To: Kyle Evans Cc: ihor@antonovs.family, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 8935a3993219 - main - daemon: use kqueue for all events Message-Id: <20230505170754.01f9e99fbc90e7afede80ae9@bidouilliste.com> In-Reply-To: References: <202304140513.33E5DsXL019547@gitrepo.freebsd.org> <20230505105935.c2e6df2864b7a9ab6c6fef81@bidouilliste.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4QCYw01yHGz3s1j X-Spamd-Bar: ---- 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-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Fri, 5 May 2023 10:00:04 -0500 Kyle Evans wrote: > On Fri, May 5, 2023 at 3:59?AM Emmanuel Vadot wro= te: > > > > > > Hello, > > > > On Fri, 14 Apr 2023 05:13:54 GMT > > Kyle Evans wrote: > > > > > The branch main has been updated by kevans: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D8935a3993219be76c7ea03= e9ad4509657d08af6c > > > > > > commit 8935a3993219be76c7ea03e9ad4509657d08af6c > > > Author: Ihor Antonov > > > AuthorDate: 2023-04-14 05:10:29 +0000 > > > Commit: Kyle Evans > > > CommitDate: 2023-04-14 05:12:21 +0000 > > > > > > daemon: use kqueue for all events > > > > > > Refactor daemon to use kqueue/kevent instead of signals. > > > > > > This changes allows to simplify the code in several ways: > > > - the execution flow is now linear, no async events. > > > - several variables became redundant and got removed. > > > - all event handling is now concentrated inside of the event loop= , which > > > makes code reading and comprehension easier. > > > - new kqueuex(2) call is used for CLOEXEC, but maintained closing= the > > > kq fd prior to execve() to ease later MFC > > > > > > No UX/API changes are intended. > > > > > > Reviewed by: kevans > > > Pull Request: https://github.com/freebsd/freebsd-src/pull/701 > > > > This break sysutils/seatd when we resume and leaves the console is a > > really sad state (impossible to use, keystroke don't match). > > Don't really know how to properly debug but : > > > > 1/ Reverting the commit make seatd not exiting on resume (and so sway > > doesn't exit). > > 2/ If I start seatd without daemon it works > > 3/ If I manually start saetd with daemon in tmux with > > "daemon -s debug -T seatd -p /var/run/seatd.pid /usr/local/bin/seatd > > -g video" (so same thing as the rc script) I see > > "daemon: kevent wait: Interrupted system call" printed when I get back > > network. > > > > Feel free to ask me any test you want to debug further ;) > > >=20 > Can you check if this is sufficient? > https://people.freebsd.org/~kevans/daemon-kq.diff >=20 > We shouldn't bail out if were simply interrupted, presumably we just > want to resume waiting for an event. >=20 > Thanks, >=20 > Kyle Evans Seems to work fine, thanks ! --=20 Emmanuel Vadot From nobody Fri May 5 15:29:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCZNL31t8z49SXD; Fri, 5 May 2023 15:29: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 4QCZNL2GScz3wBt; Fri, 5 May 2023 15:29:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683300546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YkYXblIXfHPEj4f9jG6dDtEKtLvrFeW2YqDXVxGE33o=; b=p4HNHL5LOdnt82Hipn53Mk0bf9ED3qVfoPUBNU4GvXGchAafeeVdU/96Kz0zhNMjhSFxD6 FjnEls47wOrcguz8yN75MTpt7cfsHE8/5zATt1H/jV0xuan3vIQUy6mPXwGWQypbq150Cr XjbYbtV2CXquwJR/JjN37TqEvrT+b1bWnc50Mq0g1sjTUOp+c4IvCdgJhFJWJzbbTIlS92 z6yhiiCeRHXUPqT77rdpiE3k7tspOKvIbsTYVf29qxRfoAQB4DpY+ldztzjsQwFL4+cFOZ aJKcGjcnwS1RloXsRaV5wIZTSnbLktwGK18F4X40CVLk4EaJBDlWH+R8sNcMyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683300546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YkYXblIXfHPEj4f9jG6dDtEKtLvrFeW2YqDXVxGE33o=; b=ya3dY9rEqjZe+HKS7rIwMgPdtzAU96X2feZ+drjbDZ0boyWXFVA3umkkhNvfqH17gdYw8z ObWU9TCu9Bbs1f1pXaDuSIAc0IWhRQ7Ou3mQR8pMVtPdFc+T/ONGvCRJ0zxoP5IixPL7pO b2TUNBVMGypxdqBayb4Z6O95yYCjlNEgZAa8bMfzJK3upvCIM+fyxeJ0EqiOd9KZjWJUBv 6q0wvh/IiTCpPr+ZqZymivIibWAo71GXF6gI57BrUoKlzEYM+BDffHCNB/oWkCw6f7Nt96 1oKSDSDSufg64Pe8fBMGeFKwqV8HLEzj7aOjGwdwh6IXrNg8QwMTP1gsh5nHfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683300546; a=rsa-sha256; cv=none; b=pqiJvQBPPItZpav9TkLBHWiquiitI/FJ1nBx7a2QNrNoHaweWCXpA5g6fipZ0xbUQxNirY SK+mdG7CaCdxn9mOtFWHc45Dwa82NZljo6yRFBNKVOz2IvFHjS+1+b8lmWfREalrm+m/wB LK7ySmfOxnYhKdDMDzXVUju/0JqpPIvEKU8OdioLBNDO1Zd0PMaGdon82Jt05EdnFgPqoX 9iN80BY8+myne0rdsNLon2PUHwhqQOLZpTyOIj9IrxcwOHNsFb9XDfFMlyvrRIa9JPuwqJ W/gX5KaU5liJ+MPsh31RhWvRJAfHxtJLvW7T6XxGd3xluVDn+w2BCZWNLo8nRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCZNL1FXWz10j5; Fri, 5 May 2023 15:29:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345FT6we013277; Fri, 5 May 2023 15:29:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345FT6IR013276; Fri, 5 May 2023 15:29:06 GMT (envelope-from git) Date: Fri, 5 May 2023 15:29:06 GMT Message-Id: <202305051529.345FT6IR013276@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 494e7dfdbe6e - main - daemon: EINTR from kevent(2) is not a fatal error List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 494e7dfdbe6ecfe572228ed39f5c794954da068c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=494e7dfdbe6ecfe572228ed39f5c794954da068c commit 494e7dfdbe6ecfe572228ed39f5c794954da068c Author: Kyle Evans AuthorDate: 2023-05-05 15:12:13 +0000 Commit: Kyle Evans CommitDate: 2023-05-05 15:28:40 +0000 daemon: EINTR from kevent(2) is not a fatal error Simply resume waiting for events rather than exiting if we took a signal here. This at least fixes running programs under daemon(8) in the face of suspend/resume, which I suspect hits us with a spurious EINTR rather than a signal anyways. Reported and tested by: manu Fixes: 8935a3993219b ("daemon: use kqueue for all events") --- usr.sbin/daemon/daemon.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/daemon/daemon.c b/usr.sbin/daemon/daemon.c index 89adde8d5e83..92e640271d10 100644 --- a/usr.sbin/daemon/daemon.c +++ b/usr.sbin/daemon/daemon.c @@ -427,6 +427,8 @@ daemon_eventloop(struct daemon_state *state) ret = kevent(kq, NULL, 0, &event, 1, NULL); switch (ret) { case -1: + if (errno == EINTR) + continue; err(EXIT_FAILURE, "kevent wait"); case 0: continue; From nobody Fri May 5 16:20:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCbW928cjz49WQ7; Fri, 5 May 2023 16:20:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCbW91RJ6z48b4; Fri, 5 May 2023 16:20:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683303605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ce5taeLs1YGMscnKltQYawjzrddIRCO5CiWNBjF00ck=; b=ws6IyJ5mQR2aUg87YalijZoRjlSs8VAtRWgx3MQiHObYEsDgpZcxe7NTRnYN/vsskz7blE n+GKnYM90lYCCHqAr7bw1Sr2ZBVVUptVm96An0VL2wU/BFmeJPQQmp7yi0PFRlUblwT6xf Ep2yP6He2f42xBWegRa+gXWnwke/DinItdMjzZgA/RFD5TQ7tejPo5pdaRWkBLVDttD9Q4 II6eK/y5J/dWZ6mwI4qBlxUysdg1ffjX7NgPVwi6UwVma4/AURoxk8tU/SPe8sMN2Gb5lI YhuiHg8gAFLI7fkoW5wZBaoCopuYr3AE+NN+pY0nSxyBLxOC7+9kCSSJluP9LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683303605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ce5taeLs1YGMscnKltQYawjzrddIRCO5CiWNBjF00ck=; b=FF/bbzlMb7Dfwls5b5DyqpodN1l01zfVnGsyzOzk0ZBUu/o0NJAr8hZZUnG4TMXXKdjRmW d8EBKUMdbdwTEmqFtizf48rE5dU/49Qx6+VTieHHfUaPzH/t0BdtHzsoZoYLcdGiu2BnmK SJz4eysweh0FHL8sAcItwesNOMCUX48Ig2G1DTSFIzBEd+z73u15oP47XamJt72C5nhlQt NS/eKYKCerS6LgzlVR1+DQmypdU5t67rU/mRjI9LDpUizCwZoJwZ3OExWR2hY+f0WENJFH T+6vnKGaI7JO+2D01geHVSdsPwXKgD7F2OFOftwdqZNtq8Xh2CrRwm7ycZqIYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683303605; a=rsa-sha256; cv=none; b=X7HkfaRDgs5/tR7ajeOkdI5X4EV9YPSU3mNlThOQLuVNvjiJjDGaVBRt+b9hsmBguBLX+y +ENdq5BpRWCG1yZhwR6MUcnHI1JDgwCmcoJlhycdut6EJNTnWQNfaBw/oKwLqyJjW3YeU5 k0Jj4jFSyZrMbhYe+CfDkjAC2605eB3SPsbX7DmweNwfcw/CBDnmtSyu8NVTd7kkvYkumg BKq6Ko6UQ514LSQhVWEdD09bNgH4XMDKYmV7nHu+MzCkXEy1lDz2Ed1BeAnFrg4G4gw6/N ZitrNmjyKBWUu+rEFDYvwyolSfqvcDfHlwlhZm/pVUokDgNZDPkJYaKT2ErCGg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCbW90Nvjz11RL; Fri, 5 May 2023 16:20:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345GK4BD098962; Fri, 5 May 2023 16:20:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345GK4eD098958; Fri, 5 May 2023 16:20:04 GMT (envelope-from git) Date: Fri, 5 May 2023 16:20:04 GMT Message-Id: <202305051620.345GK4eD098958@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 2df58f190731 - main - Apply libc++ fix for compiling with gcc 13 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2df58f190731634be67e90b7c453dee587b4ea27 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=2df58f190731634be67e90b7c453dee587b4ea27 commit 2df58f190731634be67e90b7c453dee587b4ea27 Author: Dimitry Andric AuthorDate: 2023-05-05 16:19:40 +0000 Commit: Dimitry Andric CommitDate: 2023-05-05 16:19:40 +0000 Apply libc++ fix for compiling with gcc 13 Merge commit 484e64f7e7b2 from llvm-project (by Roland McGrath): [libc++] Use __is_convertible built-in when available https://github.com/llvm/llvm-project/issues/62396 reports that GCC 13 barfs on parsing because of the declarations of `struct __is_convertible`. In GCC 13, `__is_convertible` is a built-in, but `__is_convertible_to` is not. Clang has both, so using either should be fine. Reviewed By: #libc, philnik Differential Revision: https://reviews.llvm.org/D149313 Reported by: Mark Millard MFC after: 3 days --- .../llvm-project/libcxx/include/__type_traits/is_convertible.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_convertible.h b/contrib/llvm-project/libcxx/include/__type_traits/is_convertible.h index 7e49cd4e6a31..7ce3c38b76de 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_convertible.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_convertible.h @@ -24,11 +24,18 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if __has_builtin(__is_convertible_to) && !defined(_LIBCPP_USE_IS_CONVERTIBLE_FALLBACK) +#if __has_builtin(__is_convertible) && !defined(_LIBCPP_USE_IS_CONVERTIBLE_FALLBACK) + +template +struct _LIBCPP_TEMPLATE_VIS is_convertible : public integral_constant {}; + +#elif __has_builtin(__is_convertible_to) && !defined(_LIBCPP_USE_IS_CONVERTIBLE_FALLBACK) template struct _LIBCPP_TEMPLATE_VIS is_convertible : public integral_constant {}; +// TODO: Remove this fallback when GCC < 13 support is no longer required. +// GCC 13 has the __is_convertible built-in. #else // __has_builtin(__is_convertible_to) && !defined(_LIBCPP_USE_IS_CONVERTIBLE_FALLBACK) namespace __is_convertible_imp From nobody Fri May 5 16:20:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCbX56RdRz49WW8 for ; Fri, 5 May 2023 16:20: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 4QCbX55t4cz49Yx; Fri, 5 May 2023 16:20:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683303653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K3dZBf36uIsRVwfnQ4BaMuOs2N/KjOdEWMYNO265yI8=; b=pF3h+Ef9nSySxJHHn/9xRfR0qLyBTXQvCV3qFr0lKUhFeDY4D4rf7joy20lPWNWDYTBl6e Kkf1cZYn+uGejie3irQ1NccpfMyjS4taXVCFURgW8U+dbhtkmykXC6s3Vo78nvejXx063S 9StQT8KTslz5g/ECAq9n5g68RQ042qd63ErFfyHBTGvitT64lTcHj+b0AR1gh4xSYWbWK/ pTgZbDls7snBQKu/O3H6BuCuZ1+b3Ct2AlnNkl5OzJ0ethbCqPkUsuAlY3yRyBbqnX0c0W JT2Du1fxt02m9sGBF7JybFWxh58x0BgfjzRhli+9p+jdZOXNVgASnn0m1WUFlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683303653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K3dZBf36uIsRVwfnQ4BaMuOs2N/KjOdEWMYNO265yI8=; b=JMeHVU8sK9G3XZ0bhbsNKaedCSpjSPSR2M6GEyqrXAVBEMSOgav/lsuAJ8pCJngJjijoib Lq3n5cFoB9F1VnL8bu8WKmvZpZIcqZ2sIr/BNTzCAfMpRMdT4w8XIhHvZdgTOs/CyiX3a6 SXxeLg4WPmfhkCaSgKa91/ZRZbNafWzeWi5u0ck4m/k7scuV6A8c2VOoRDef6Wfa27fIZu QRR7i0H/d9O2dTKXugdvhuxa7EnwsgjCRAtwgKv2P2PIW3xMglqBbsRV/jrSUVxfRt+9/3 ahG6mzsh0C5RPPARfUdeIh/Q8lRSuKs/7URE+j8QCkrgt0Y1X+D4Nn4ySVXFhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683303653; a=rsa-sha256; cv=none; b=qlYS4TSBqbhirq9V7/ESB+7Cql0loaxznb06DrowcsZE3i5xdkZoC7bSYNYiMFQAQxmh62 J9oWQckU49Vdyrxdd3tkT4o+xqDIJa9ZSwXtO5cCyFjnTcScYwC3+uy7KfPhZcdLEXJxG8 AKSg2MjIQk4AEBEojqiN/IXhLKwU1wksWxsHTWRJ80t5F943MU41vsjHD070o8LNasCRjC 3FOO6TFr85tgdzgVr4nyEKl7RGzv1iu/QYJ8soGk15K93bEFWMHUZyJfMwJ3EAC/+RBKEs T/lXkIa3kmQW6gbfIFIJVdkWT9x1yABAJNi4pyxDDdrHkKY8WzjLOYmDzE9fBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCbX54fKZz11sy; Fri, 5 May 2023 16:20:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345GKrwx005127; Fri, 5 May 2023 16:20:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345GKrfC005126; Fri, 5 May 2023 16:20:53 GMT (envelope-from git) Date: Fri, 5 May 2023 16:20:53 GMT Message-Id: <202305051620.345GKrfC005126@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: 86321b98854d..727e049ae598 - vendor/llvm-project/release-16.x - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/vendor/llvm-project/release-16.x X-Git-Reftype: branch X-Git-Commit: 727e049ae5985f129320069542bb57add1ba6096 X-Git-Oldrev: 86321b98854d834e516cc65ddd09ef53e930fc4c X-Git-Newrev: 727e049ae5985f129320069542bb57add1ba6096 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch vendor/llvm-project/release-16.x has been updated by dim: URL: https://cgit.FreeBSD.org/src/log/?id=86321b98854d..727e049ae598 727e049ae598 Vendor import of llvm-project branch release/16.x llvmorg-16.0.3-0-gda3cd333bea5 (aka 16.0.3 release). From nobody Fri May 5 16:20:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCbX56j8Wz49W4B for ; Fri, 5 May 2023 16:20: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 4QCbX56HK5z49Yy; Fri, 5 May 2023 16:20:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683303653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8/LRQs3yVQwwINtekJ0rZCpO95vcILyJxCqmbjRN4tM=; b=IYu0w+WXDzUR94Ov4iB/dyLs9WBwFWujT1aLbv9GtFtWZGHqTEKIL804O21LaACkbfU3D1 JLsIdHoZbRgwekZ3i0GO3P453amNk6GnxhtK5n+bbwpgu1Xpv+wJ6bwGwZkyXNGB5JEByJ E0tKC381W4vPK7cJ+2gVk+cmBCl3sOgSS5G6RH8Qg1m4GXpP2B/fuUHopK00y7iFwQMXgh tZcmMj9XQO+yrBPdceaaOeVzPMViEs+fk29qCUMkFglE50SBdZhpWm0kkuxS2tN/GeUYOR kqixxtUYbHCN7ad8u4SHZ1EyCNUSfI7S8R6kGW5e9Vxwe169o1+f6WaP6cpcqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683303653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8/LRQs3yVQwwINtekJ0rZCpO95vcILyJxCqmbjRN4tM=; b=Mzc/IhX1gQ7S7Cy9VQd11niB5wi29ilzvltSO4PPDMmyvoI80YCrVuUkGmdG2URLh16hLr 6veQtDSIdjJzSgGpIs3eo7fhK5r5SjzohfaMBKYzDOOp/0CBEa+WRkns63WOJ+L/bzSexo BKRnalzXJHf2JP1T+257Q+pDiTf2EIMPX9btSnZ+pn5IHIXcfTeWnxQszlfncDKNVSlqdF hosw2ZP3hbZ3oY6ImSVKFH+aUCmT21CKkeqpkTkEJjzDlKJSMWzVdpIiozVFPvKsr4mNYB S72K3dr+AdBhg4U8oAHtiL0zPFFMTmrVfWbDwArcpoYb+dutKRPtWh7HZq67Wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683303653; a=rsa-sha256; cv=none; b=iAGVIkGFKhnIE+3Zb3hfariXBs1LWiBcr+lpEDwJNMHcXXbAW8JisSebWA3t2CY6wgBI4H m3hc/OSu1nVxN7LD0iv8vYGxGkTxVu1qcJq4LpXSiNFLqGF0Q6oRqlPsXseW9VG/ZFQo5a 70R05AHzwKu29Rc8ckF0NKZAdVPj+B/iGLbs9ma9yh3efzm4L39o47sgdY0PRMBwdfynHD iciV3UWwXiOufgs1cQ2xd/12e/EuGqIbQhbdQQ7ZLhh0zGt3dzoNCgcWc82N8KhFnlxN7F ODUxuetRMBRhZVZ+95UAWbES+sm8OyR6NAK4OYV8ghH4FUPSid1FjYraKcJxhA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCbX55MGHz11t0; Fri, 5 May 2023 16:20:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345GKrrR005146; Fri, 5 May 2023 16:20:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345GKr9Y005145; Fri, 5 May 2023 16:20:53 GMT (envelope-from git) Date: Fri, 5 May 2023 16:20:53 GMT Message-Id: <202305051620.345GKr9Y005145@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: bc6b7f3ff36e - Create tag vendor/llvm-project/llvmorg-16.0.3-0-gda3cd333bea5 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/tags/vendor/llvm-project/llvmorg-16.0.3-0-gda3cd333bea5 X-Git-Reftype: annotated tag X-Git-Commit: bc6b7f3ff36e3ce728816650ba30b6ae32b41ee8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The annotated tag vendor/llvm-project/llvmorg-16.0.3-0-gda3cd333bea5 has been created by dim: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/llvm-project/llvmorg-16.0.3-0-gda3cd333bea5 tag vendor/llvm-project/llvmorg-16.0.3-0-gda3cd333bea5 Tagger: Dimitry Andric TaggerDate: 2023-05-05 16:20:37 +0000 Tag llvm-project branch release/16.x llvmorg-16.0.3-0-gda3cd333bea5 (aka 16.0.3 release). commit 727e049ae5985f129320069542bb57add1ba6096 Author: Dimitry Andric AuthorDate: 2023-05-05 16:20:22 +0000 Commit: Dimitry Andric CommitDate: 2023-05-05 16:20:22 +0000 Vendor import of llvm-project branch release/16.x llvmorg-16.0.3-0-gda3cd333bea5 (aka 16.0.3 release). From nobody Fri May 5 16:20:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCbX667xFz49W6f; Fri, 5 May 2023 16:20: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 4QCbX65vl8z49VD; Fri, 5 May 2023 16:20:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683303654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YqAUdwc+E9QKeSeWL/XKv73ZssKilMuKxJqY611O9YU=; b=s02hDinVy2njtFipET7qfGvZtxWcpzVsU1XJshvS4sm1LyBJ2IJ0M1Wx/smzeDpXmd28Ay eqRV2jKa2AB0wGmvOh1Ryynl3Fcmj8SnKVgoXx3GG8DNxOxD+47i0VgiHZTHt2CMP580Ec 1nKOghGfAtdS1ZkNa4QeZlRpGFRAqF6A0gPSq8g9i397L/M/tnbj5LhZVHhbnQMzvOhAM5 DNxDg4uE1j3wWelDXP1JdQNdnNBiGiK04xMmnARkm11RJ390WKJ3cFkkku04LgUkLY2ttT xRx41o5dS4MfX2is5OYOXkgkDKWPnhBG2uGu3RMVpyACafF+EJgmAuzG1CiKvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683303654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YqAUdwc+E9QKeSeWL/XKv73ZssKilMuKxJqY611O9YU=; b=P2mX19dAf8d5UDbtQtzHsYnS0um2rLr4lRDCEUgf1eNYKPyenH0XMlIMu2ZSVDYH41CHoq V2GRo1D7wj2PhIVqzeswGt+K14zARDtCVbWFMQ6a67oCvvxuDQU7pRbHiOV+djEeQBrU0+ RvT9zClq/+y1axjpeOVn9r05ujGhy9wJZBDXw+rv9C+vxvbQQ2VzpgPz2QnUJ1MO1CetDS /e+y1RHexESuy2/pY6NeZc/hXdjnCAjqW/XWeVF0V7YFzCyvKjKg26L6Dx9T0OnWDGBFo8 SS/+cptokxNQg8JN/SyR4Ce4Mt+XHBr4do3xbi+QN/mtDE2N6gq5SzAeDf7AzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683303654; a=rsa-sha256; cv=none; b=dcg3gHg024YiqAa1emWeyVx4bXDnTGYStFuVTCP+lnieNCBBMXn0Cu03w2KOsLdDxAT8SW /TF8ECBnE+EWxZNGnL81Y27LdeMg9OCukG4TrHopl3LKV/8cGzoiUEId8+T1+uhvwdQDoo 9iHHp91oDuaVOevTZj3G0zI54tP216X1g7UF+8khx3emPzH8wsvwNA5Y0gm+Yvj60jslwa 1azZdMBbQ5zCyZ207XU2+zbVtGznmSxt17GtPqB7h7nmC3o5XbAY9hfS6u5gZNXaep8uON Z5YDNCdsO9AU/QgY3Qsf1lQUfIfw8aYBEs9FAKbgAsEFuS8sZt3SHd5+0VMKsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCbX6511Bz11TN; Fri, 5 May 2023 16:20:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345GKs3p005253; Fri, 5 May 2023 16:20:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345GKsNh005252; Fri, 5 May 2023 16:20:54 GMT (envelope-from git) Date: Fri, 5 May 2023 16:20:54 GMT Message-Id: <202305051620.345GKsNh005252@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Ambrisko Subject: git: 7e0f8b79b773 - main - Add mrsasutil(8) as alias to mfiutil(8) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ambrisko X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7e0f8b79b773276712234421f140c8c6ebc0f780 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by ambrisko: URL: https://cgit.FreeBSD.org/src/commit/?id=7e0f8b79b773276712234421f140c8c6ebc0f780 commit 7e0f8b79b773276712234421f140c8c6ebc0f780 Author: Doug Ambrisko AuthorDate: 2022-08-24 22:38:43 +0000 Commit: Doug Ambrisko CommitDate: 2023-05-05 16:20:48 +0000 Add mrsasutil(8) as alias to mfiutil(8) mfiutil(8) in theory can work on devices attached to mrsas(4) but mrsas(4) is missing the FreeBSD mfi(4) ioctl support. Once that support is added to mrsas(4) then mrsasutil(8) can manage mrsas(4) attached devices. So this commit depends on that. When mrsasutil(8) is run it automatically opens /dev/mrsas0 instead of /dev/mfi0. Add -D and -t flag to optionally specify mrsas or mfi to work with the existing -u . Device is the device node with or without /dev/ PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265794 Differential Revision: https://reviews.freebsd.org/D36343 Tested by: Dan Mahoney Reviewed by: jhb --- usr.sbin/mfiutil/Makefile | 2 + usr.sbin/mfiutil/mfi_bbu.c | 4 +- usr.sbin/mfiutil/mfi_cmd.c | 29 +++++++---- usr.sbin/mfiutil/mfi_config.c | 91 ++++++++++++++++----------------- usr.sbin/mfiutil/mfi_drive.c | 14 ++--- usr.sbin/mfiutil/mfi_evt.c | 10 ++-- usr.sbin/mfiutil/mfi_flash.c | 4 +- usr.sbin/mfiutil/mfi_foreign.c | 58 ++++++++++----------- usr.sbin/mfiutil/mfi_patrol.c | 8 +-- usr.sbin/mfiutil/mfi_properties.c | 12 ++--- usr.sbin/mfiutil/mfi_show.c | 37 +++++++------- usr.sbin/mfiutil/mfi_volume.c | 10 ++-- usr.sbin/mfiutil/mfiutil.8 | 104 ++++++++++++++++++++++++++++++++++++-- usr.sbin/mfiutil/mfiutil.c | 43 ++++++++++++++-- usr.sbin/mfiutil/mfiutil.h | 11 ++-- 15 files changed, 294 insertions(+), 143 deletions(-) diff --git a/usr.sbin/mfiutil/Makefile b/usr.sbin/mfiutil/Makefile index dc6f3e481593..139e31d6c41d 100644 --- a/usr.sbin/mfiutil/Makefile +++ b/usr.sbin/mfiutil/Makefile @@ -1,10 +1,12 @@ # $FreeBSD$ PROG= mfiutil +LINKS= ${BINDIR}/mfiutil ${BINDIR}/mrsasutil SRCS= mfiutil.c mfi_bbu.c mfi_cmd.c mfi_config.c mfi_drive.c mfi_evt.c \ mfi_flash.c mfi_patrol.c mfi_show.c mfi_volume.c mfi_foreign.c \ mfi_properties.c MAN8= mfiutil.8 +MLINKS= mfiutil.8 mrsasutil.8 CFLAGS.gcc+= -fno-builtin-strftime diff --git a/usr.sbin/mfiutil/mfi_bbu.c b/usr.sbin/mfiutil/mfi_bbu.c index 343d101661da..6c1a76aeacc3 100644 --- a/usr.sbin/mfiutil/mfi_bbu.c +++ b/usr.sbin/mfiutil/mfi_bbu.c @@ -134,7 +134,7 @@ start_bbu_learn(int ac, char **av __unused) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -171,7 +171,7 @@ update_bbu_props(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); diff --git a/usr.sbin/mfiutil/mfi_cmd.c b/usr.sbin/mfiutil/mfi_cmd.c index 094c9017348b..d0df65ecb937 100644 --- a/usr.sbin/mfiutil/mfi_cmd.c +++ b/usr.sbin/mfiutil/mfi_cmd.c @@ -44,6 +44,7 @@ #include #include #include +#include #include "mfiutil.h" #include @@ -209,15 +210,23 @@ mfi_volume_busy(int fd, uint8_t target_id) * configuration of the mfi controller. */ int -mfi_reconfig_supported(void) +mfi_reconfig_supported(const char *dev) { char mibname[64]; + const char *cp; size_t len; - int dummy; + int dummy, mfi_unit; + + cp = dev + strlen(_PATH_DEV); + if (strncmp(cp, MRSAS_TYPE, strlen(MRSAS_TYPE)) == 0) + return (1); + + cp += strlen(MFI_TYPE); + mfi_unit = strtol(cp, NULL, 10);; len = sizeof(dummy); - snprintf(mibname, sizeof(mibname), "dev.mfi.%d.delete_busy_volumes", - mfi_unit); + snprintf(mibname, sizeof(mibname), + "dev.mfi.%d.delete_busy_volumes", mfi_unit); return (sysctlbyname(mibname, &dummy, &len, NULL, 0) == 0); } @@ -239,7 +248,7 @@ mfi_lookup_volume(int fd, const char *name, uint8_t *target_id) if (mfi_dcmd_command(fd, MFI_DCMD_LD_GET_LIST, &list, sizeof(list), NULL, 0, NULL) < 0) - return (-1); + return (-1); for (i = 0; i < list.ld_count; i++) { if (mfi_query_disk(fd, list.ld_list[i].ld.v.target_id, @@ -304,12 +313,14 @@ mfi_ctrl_get_info(int fd, struct mfi_ctrl_info *info, uint8_t *statusp) } int -mfi_open(int unit, int acs) +mfi_open(char *dev, int acs) { - char path[MAXPATHLEN]; + int ret; - snprintf(path, sizeof(path), "/dev/mfi%d", unit); - return (open(path, acs)); + ret = open(dev, acs); + if (ret < 0) + warn("Couldn't open %s", dev); + return (ret); } static void diff --git a/usr.sbin/mfiutil/mfi_config.c b/usr.sbin/mfiutil/mfi_config.c index 0ee78fca0613..e2afbe52e0c3 100644 --- a/usr.sbin/mfiutil/mfi_config.c +++ b/usr.sbin/mfiutil/mfi_config.c @@ -35,6 +35,7 @@ #ifdef DEBUG #include #endif +#include #include #include #include @@ -52,30 +53,30 @@ static int remove_spare(int ac, char **av); static long dehumanize(const char *value) { - char *vtp; - long iv; - - if (value == NULL) - return (0); - iv = strtoq(value, &vtp, 0); - if (vtp == value || (vtp[0] != '\0' && vtp[1] != '\0')) { - return (0); - } - switch (vtp[0]) { - case 't': case 'T': - iv *= 1024; - case 'g': case 'G': - iv *= 1024; - case 'm': case 'M': - iv *= 1024; - case 'k': case 'K': - iv *= 1024; - case '\0': - break; - default: - return (0); - } - return (iv); + char *vtp; + long iv; + + if (value == NULL) + return (0); + iv = strtoq(value, &vtp, 0); + if (vtp == value || (vtp[0] != '\0' && vtp[1] != '\0')) { + return (0); + } + switch (vtp[0]) { + case 't': case 'T': + iv *= 1024; + case 'g': case 'G': + iv *= 1024; + case 'm': case 'M': + iv *= 1024; + case 'k': case 'K': + iv *= 1024; + case '\0': + break; + default: + return (0); + } + return (iv); } int @@ -162,16 +163,16 @@ clear_config(int ac __unused, char **av __unused) int ch, error, fd; u_int i; - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); return (error); } - if (!mfi_reconfig_supported()) { - warnx("The current mfi(4) driver does not support " - "configuration changes."); + if (!mfi_reconfig_supported(mfi_device)) { + warnx("The current %s driver does not support " + "configuration changes.", mfi_device); close(fd); return (EOPNOTSUPP); } @@ -193,8 +194,8 @@ clear_config(int ac __unused, char **av __unused) } printf( - "Are you sure you wish to clear the configuration on mfi%u? [y/N] ", - mfi_unit); + "Are you sure you wish to clear the configuration on %s? [y/N] ", + mfi_device); ch = getchar(); if (ch != 'y' && ch != 'Y') { printf("\nAborting\n"); @@ -209,7 +210,7 @@ clear_config(int ac __unused, char **av __unused) return (error); } - printf("mfi%d: Configuration cleared\n", mfi_unit); + printf("%s: Configuration cleared\n", mfi_device); close(fd); return (0); @@ -587,16 +588,16 @@ create_volume(int ac, char **av) narrays = 0; error = 0; - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); return (error); } - if (!mfi_reconfig_supported()) { - warnx("The current mfi(4) driver does not support " - "configuration changes."); + if (!mfi_reconfig_supported(mfi_device)) { + warnx("The current %s(4) driver does not support " + "configuration changes.", mfi_device); error = EOPNOTSUPP; goto error; } @@ -869,16 +870,16 @@ delete_volume(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); return (error); } - if (!mfi_reconfig_supported()) { - warnx("The current mfi(4) driver does not support " - "configuration changes."); + if (!mfi_reconfig_supported(mfi_device)) { + warnx("The current %s(4) driver does not support " + "configuration changes.", mfi_device); close(fd); return (EOPNOTSUPP); } @@ -937,7 +938,7 @@ add_spare(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -1027,7 +1028,7 @@ add_spare(int ac, char **av) ar->array_ref); error = EINVAL; goto error; - } + } spare->array_ref[i] = ar->array_ref; } } @@ -1062,7 +1063,7 @@ remove_spare(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -1120,7 +1121,7 @@ dump_config(int fd, struct mfi_config_data *config, const char *msg_prefix) msg_prefix = "Configuration (Debug)"; printf( - "mfi%d %s: %d arrays, %d volumes, %d spares\n", mfi_unit, + "%s %s: %d arrays, %d volumes, %d spares\n", mfi_device, msg_prefix, config->array_count, config->log_drv_count, config->spares_count); printf(" array size: %u\n", config->array_size); @@ -1211,7 +1212,7 @@ debug_config(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -1248,7 +1249,7 @@ dump(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); diff --git a/usr.sbin/mfiutil/mfi_drive.c b/usr.sbin/mfiutil/mfi_drive.c index 4fd8fb93dd4c..17231af13fb0 100644 --- a/usr.sbin/mfiutil/mfi_drive.c +++ b/usr.sbin/mfiutil/mfi_drive.c @@ -74,7 +74,7 @@ mfi_drive_name(struct mfi_pd_info *pinfo, uint16_t device_id, uint32_t def) else snprintf(buf, sizeof(buf), "%2u", device_id); - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { warn("mfi_open"); return (buf); @@ -388,7 +388,7 @@ drive_set_state(char *drive, uint16_t new_state) uint8_t mbox[6]; int error, fd; - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -503,7 +503,7 @@ start_rebuild(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -560,7 +560,7 @@ abort_rebuild(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -616,7 +616,7 @@ drive_progress(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -682,7 +682,7 @@ drive_clear(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -742,7 +742,7 @@ drive_locate(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); diff --git a/usr.sbin/mfiutil/mfi_evt.c b/usr.sbin/mfiutil/mfi_evt.c index 915fbb7125bf..68b78ea6bfa9 100644 --- a/usr.sbin/mfiutil/mfi_evt.c +++ b/usr.sbin/mfiutil/mfi_evt.c @@ -77,7 +77,7 @@ show_logstate(int ac, char **av __unused) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -91,13 +91,13 @@ show_logstate(int ac, char **av __unused) return (error); } - printf("mfi%d Event Log Sequence Numbers:\n", mfi_unit); + printf("%s Event Log Sequence Numbers:\n", mfi_device); printf(" Newest Seq #: %u\n", info.newest_seq_num); printf(" Oldest Seq #: %u\n", info.oldest_seq_num); printf(" Clear Seq #: %u\n", info.clear_seq_num); printf("Shutdown Seq #: %u\n", info.shutdown_seq_num); printf(" Boot Seq #: %u\n", info.boot_seq_num); - + close(fd); return (0); @@ -547,7 +547,7 @@ show_events(int ac, char **av) int ch, error, fd, num_events, verbose; u_int i; - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -691,7 +691,7 @@ show_events(int ac, char **av) * need to know the size of the buffer somehow. */ seq = list->event[list->count - 1].seq + 1; - + } finish: if (first) diff --git a/usr.sbin/mfiutil/mfi_flash.c b/usr.sbin/mfiutil/mfi_flash.c index 239390acf7b5..fe2ccbd3d80f 100644 --- a/usr.sbin/mfiutil/mfi_flash.c +++ b/usr.sbin/mfiutil/mfi_flash.c @@ -58,7 +58,7 @@ display_pending_firmware(int fd) return (error); } - printf("mfi%d Pending Firmware Images:\n", mfi_unit); + printf("%s Pending Firmware Images:\n", mfi_device); strcpy(header.name, "Name"); strcpy(header.version, "Version"); strcpy(header.build_date, "Date"); @@ -122,7 +122,7 @@ flash_adapter(int ac, char **av) goto error; } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); diff --git a/usr.sbin/mfiutil/mfi_foreign.c b/usr.sbin/mfiutil/mfi_foreign.c index ce4b8a704bea..f2662cb9de7a 100644 --- a/usr.sbin/mfiutil/mfi_foreign.c +++ b/usr.sbin/mfiutil/mfi_foreign.c @@ -48,7 +48,7 @@ foreign_clear(__unused int ac, __unused char **av) { int ch, error, fd; - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -57,7 +57,7 @@ foreign_clear(__unused int ac, __unused char **av) printf( "Are you sure you wish to clear ALL foreign configurations" - " on mfi%u? [y/N] ", mfi_unit); + " on %s? [y/N] ", mfi_device); ch = getchar(); if (ch != 'y' && ch != 'Y') { @@ -74,7 +74,7 @@ foreign_clear(__unused int ac, __unused char **av) return (error); } - printf("mfi%d: Foreign configuration cleared\n", mfi_unit); + printf("%s: Foreign configuration cleared\n", mfi_device); close(fd); return (0); } @@ -86,7 +86,7 @@ foreign_scan(__unused int ac, __unused char **av) struct mfi_foreign_scan_info info; int error, fd; - fd = mfi_open(mfi_unit, O_RDONLY); + fd = mfi_open(mfi_device, O_RDONLY); if (fd < 0) { error = errno; warn("mfi_open"); @@ -101,7 +101,7 @@ foreign_scan(__unused int ac, __unused char **av) return (error); } - printf("mfi%d: Found %d foreign configurations\n", mfi_unit, + printf("%s: Found %d foreign configurations\n", mfi_device, info.count); close(fd); return (0); @@ -143,7 +143,7 @@ foreign_show_cfg(int fd, uint32_t opcode, uint8_t cfgidx, int diagnostic) ld_list = (char *)(config->array); - printf("%s: %d arrays, %d volumes, %d spares\n", prefix, + printf("%s: %d arrays, %d volumes, %d spares\n", prefix, config->array_count, config->log_drv_count, config->spares_count); @@ -152,28 +152,28 @@ foreign_show_cfg(int fd, uint32_t opcode, uint8_t cfgidx, int diagnostic) ld_list += config->array_size; for (i = 0; i < config->log_drv_count; i++) { - const char *level; - char size[6], stripe[5]; + const char *level; + char size[6], stripe[5]; struct mfi_ld_config *ld; ld = (struct mfi_ld_config *)ld_list; - format_stripe(stripe, sizeof(stripe), - ld->params.stripe_size); + format_stripe(stripe, sizeof(stripe), + ld->params.stripe_size); /* * foreign configs don't seem to have a secondary raid level * but, we can use span depth here as if a LD spans multiple * arrays of disks (2 raid 1 sets for example), we will have an * indication based on the spam depth. swb - */ - level = mfi_raid_level(ld->params.primary_raid_level, - (ld->params.span_depth - 1)); + */ + level = mfi_raid_level(ld->params.primary_raid_level, + (ld->params.span_depth - 1)); - humanize_number(size, sizeof(size), ld->span[0].num_blocks * 512, - "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); + humanize_number(size, sizeof(size), ld->span[0].num_blocks * 512, + "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); printf(" ID%d ", i); - printf("(%6s) %-8s |", + printf("(%6s) %-8s |", size, level); printf("volume spans %d %s\n", ld->params.span_depth, (ld->params.span_depth > 1) ? "arrays" : "array"); @@ -183,9 +183,9 @@ foreign_show_cfg(int fd, uint32_t opcode, uint8_t cfgidx, int diagnostic) uint16_t device_id; printf(" array %u @ ", ld->span[j].array_ref); - humanize_number(size, sizeof(size), ld->span[j].num_blocks * 512, - "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); - + humanize_number(size, sizeof(size), ld->span[j].num_blocks * 512, + "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); + printf("(%6s)\n",size); ar_list = (char *)config->array + (ld->span[j].array_ref * config->array_size); @@ -196,7 +196,7 @@ foreign_show_cfg(int fd, uint32_t opcode, uint8_t cfgidx, int diagnostic) printf(" drive MISSING\n"); else { printf(" drive %u %s\n", device_id, - mfi_pdstate(ar->pd[k].fw_state)); + mfi_pdstate(ar->pd[k].fw_state)); } } @@ -222,7 +222,7 @@ display_format(int ac, char **av, int diagnostic, mfi_dcmd_t display_cmd) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDONLY); + fd = mfi_open(mfi_device, O_RDONLY); if (fd < 0) { error = errno; warn("mfi_open"); @@ -262,7 +262,7 @@ display_format(int ac, char **av, int diagnostic, mfi_dcmd_t display_cmd) return (error); } } - + close(fd); return (0); } @@ -294,7 +294,7 @@ foreign_import(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -318,7 +318,7 @@ foreign_import(int ac, char **av) if (ac == 1) { cfgidx = 0xff; printf("Are you sure you wish to import ALL foreign " - "configurations on mfi%u? [y/N] ", mfi_unit); + "configurations on %s? [y/N] ", mfi_device); } else { /* * While this is docmmented for MegaCli this failed with @@ -334,7 +334,7 @@ foreign_import(int ac, char **av) return (EINVAL); } printf("Are you sure you wish to import the foreign " - "configuration %d on mfi%u? [y/N] ", cfgidx, mfi_unit); + "configuration %d on %s? [y/N] ", cfgidx, mfi_device); } ch = getchar(); @@ -355,11 +355,11 @@ foreign_import(int ac, char **av) } if (ac == 1) - printf("mfi%d: All foreign configurations imported\n", - mfi_unit); + printf("%s: All foreign configurations imported\n", + mfi_device); else - printf("mfi%d: Foreign configuration %d imported\n", mfi_unit, - cfgidx); + printf("%s: Foreign configuration %d imported\n", + mfi_device, cfgidx); close(fd); return (0); } diff --git a/usr.sbin/mfiutil/mfi_patrol.c b/usr.sbin/mfiutil/mfi_patrol.c index a1dbb1336f1b..3071fa0a8ace 100644 --- a/usr.sbin/mfiutil/mfi_patrol.c +++ b/usr.sbin/mfiutil/mfi_patrol.c @@ -89,7 +89,7 @@ show_patrol(int ac __unused, char **av __unused) int error, fd; u_int i; - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -199,7 +199,7 @@ start_patrol(int ac __unused, char **av __unused) { int error, fd; - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -225,7 +225,7 @@ stop_patrol(int ac __unused, char **av __unused) { int error, fd; - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -295,7 +295,7 @@ patrol_config(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); diff --git a/usr.sbin/mfiutil/mfi_properties.c b/usr.sbin/mfiutil/mfi_properties.c index f5affe14bd50..2e49312d7867 100644 --- a/usr.sbin/mfiutil/mfi_properties.c +++ b/usr.sbin/mfiutil/mfi_properties.c @@ -3,7 +3,7 @@ * * Copyright (c) 2013 Yahoo!, Inc. * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -64,7 +64,7 @@ mfi_ctrl_set_properties(int fd, struct mfi_ctrl_props *info) } /* - * aquite the controller properties data structure modify the + * aquire the controller properties data structure modify the * rebuild rate if requested and then retun */ static int @@ -77,8 +77,8 @@ mfi_ctrl_rebuild_rate(int ac, char **av) warn("mfi_ctrl_set_rebuild_rate"); return(-1); } - - fd = mfi_open(mfi_unit, O_RDWR); + + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -129,8 +129,8 @@ mfi_ctrl_alarm_enable(int ac, char **av) warn("mfi_ctrl_alarm_enable"); return(-1); } - - fd = mfi_open(mfi_unit, O_RDWR); + + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); diff --git a/usr.sbin/mfiutil/mfi_show.c b/usr.sbin/mfiutil/mfi_show.c index 17c967762963..d1ab70cf641b 100644 --- a/usr.sbin/mfiutil/mfi_show.c +++ b/usr.sbin/mfiutil/mfi_show.c @@ -50,7 +50,7 @@ void format_stripe(char *buf, size_t buflen, uint8_t stripe) { - humanize_number(buf, buflen, (1 << stripe) * 512, "", HN_AUTOSCALE, + humanize_number(buf, buflen, (1 << stripe) * 512, "", HN_AUTOSCALE, HN_B | HN_NOSPACE); } @@ -66,7 +66,7 @@ show_adapter(int ac, char **av __unused) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDONLY); + fd = mfi_open(mfi_device, O_RDONLY); if (fd < 0) { error = errno; warn("mfi_open"); @@ -79,7 +79,7 @@ show_adapter(int ac, char **av __unused) close(fd); return (error); } - printf("mfi%d Adapter:\n", mfi_unit); + printf("%s Adapter:\n", mfi_device); printf(" Product Name: %.80s\n", info.product_name); printf(" Serial Number: %.32s\n", info.serial_number); if (info.package_version[0] != '\0') @@ -155,7 +155,7 @@ show_battery(int ac, char **av __unused) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDONLY); + fd = mfi_open(mfi_device, O_RDONLY); if (fd < 0) { error = errno; warn("mfi_open"); @@ -170,7 +170,7 @@ show_battery(int ac, char **av __unused) return (error); } if (status == MFI_STAT_NO_HW_PRESENT) { - printf("mfi%d: No battery present\n", mfi_unit); + printf("%s: No battery present\n", mfi_device); close(fd); return (0); } @@ -200,7 +200,7 @@ show_battery(int ac, char **av __unused) } show_props = (status == MFI_STAT_OK); - printf("mfi%d: Battery State:\n", mfi_unit); + printf("%s: Battery State:\n", mfi_device); printf(" Manufacture Date: %d/%d/%d\n", design.mfg_date >> 5 & 0x0f, design.mfg_date & 0x1f, design.mfg_date >> 9 & 0xffff); printf(" Serial Number: %d\n", design.serial_number); @@ -357,7 +357,7 @@ show_config(int ac, char **av __unused) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDONLY); + fd = mfi_open(mfi_device, O_RDONLY); if (fd < 0) { error = errno; warn("mfi_open"); @@ -373,8 +373,8 @@ show_config(int ac, char **av __unused) } /* Dump out the configuration. */ - printf("mfi%d Configuration: %d arrays, %d volumes, %d spares\n", - mfi_unit, config->array_count, config->log_drv_count, + printf("%s Configuration: %d arrays, %d volumes, %d spares\n", + mfi_device, config->array_count, config->log_drv_count, config->spares_count); p = (char *)config->array; @@ -458,7 +458,7 @@ show_volumes(int ac, char **av __unused) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDONLY); + fd = mfi_open(mfi_device, O_RDONLY); if (fd < 0) { error = errno; warn("mfi_open"); @@ -474,7 +474,7 @@ show_volumes(int ac, char **av __unused) } /* List the volumes. */ - printf("mfi%d Volumes:\n", mfi_unit); + printf("%s Volumes:\n", mfi_device); state_len = strlen("State"); for (i = 0; i < list.ld_count; i++) { len = strlen(mfi_ldstate(list.ld_list[i].state)); @@ -541,7 +541,7 @@ show_drives(int ac, char **av __unused) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDONLY); + fd = mfi_open(mfi_device, O_RDONLY); if (fd < 0) { error = errno; warn("mfi_open"); @@ -576,7 +576,7 @@ show_drives(int ac, char **av __unused) } /* List the drives. */ - printf("mfi%d Physical Drives:\n", mfi_unit); + printf("%s Physical Drives:\n", mfi_device); for (i = 0; i < list->count; i++) { /* Skip non-hard disks. */ @@ -621,7 +621,7 @@ show_firmware(int ac, char **av __unused) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDONLY); + fd = mfi_open(mfi_device, O_RDONLY); if (fd < 0) { error = errno; warn("mfi_open"); @@ -636,9 +636,9 @@ show_firmware(int ac, char **av __unused) } if (info.package_version[0] != '\0') - printf("mfi%d Firmware Package Version: %s\n", mfi_unit, + printf("%s Firmware Package Version: %s\n", mfi_device, info.package_version); - printf("mfi%d Firmware Images:\n", mfi_unit); + printf("%s Firmware Images:\n", mfi_device); strcpy(header.name, "Name"); strcpy(header.version, "Version"); strcpy(header.build_date, "Date"); @@ -681,7 +681,7 @@ show_progress(int ac, char **av __unused) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDONLY); + fd = mfi_open(mfi_device, O_RDONLY); if (fd < 0) { error = errno; warn("mfi_open"); @@ -776,7 +776,8 @@ show_progress(int ac, char **av __unused) close(fd); if (!busy) - printf("No activity in progress for adapter mfi%d\n", mfi_unit); + printf("No activity in progress for adapter %s\n", + mfi_device); return (0); } diff --git a/usr.sbin/mfiutil/mfi_volume.c b/usr.sbin/mfiutil/mfi_volume.c index 2bc913374b86..8a0e911155c0 100644 --- a/usr.sbin/mfiutil/mfi_volume.c +++ b/usr.sbin/mfiutil/mfi_volume.c @@ -297,7 +297,7 @@ volume_cache(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -319,7 +319,7 @@ volume_cache(int ac, char **av) } if (ac == 2) { - printf("mfi%u volume %s cache settings:\n", mfi_unit, + printf("%s volume %s cache settings:\n", mfi_device, mfi_volume_name(fd, target_id)); printf(" I/O caching: "); switch (props.default_cache_policy & @@ -406,7 +406,7 @@ volume_name(int ac, char **av) return (ENOSPC); } - fd = mfi_open(mfi_unit, O_RDWR); + fd = mfi_open(mfi_device, O_RDWR); if (fd < 0) { error = errno; warn("mfi_open"); @@ -427,7 +427,7 @@ volume_name(int ac, char **av) return (error); } - printf("mfi%u volume %s name changed from \"%s\" to \"%s\"\n", mfi_unit, + printf("%s volume %s name changed from \"%s\" to \"%s\"\n", mfi_device, mfi_volume_name(fd, target_id), props.name, av[2]); bzero(props.name, sizeof(props.name)); strcpy(props.name, av[2]); @@ -457,7 +457,7 @@ volume_progress(int ac, char **av) return (EINVAL); } - fd = mfi_open(mfi_unit, O_RDONLY); + fd = mfi_open(mfi_device, O_RDONLY); if (fd < 0) { error = errno; warn("mfi_open"); diff --git a/usr.sbin/mfiutil/mfiutil.8 b/usr.sbin/mfiutil/mfiutil.8 index 29409ad53e46..6b92ce049b86 100644 --- a/usr.sbin/mfiutil/mfiutil.8 +++ b/usr.sbin/mfiutil/mfiutil.8 @@ -31,26 +31,37 @@ .Dt MFIUTIL 8 .Os .Sh NAME -.Nm mfiutil +.Nm mfiutil , +.Nm mrsasutil .Nd Utility for managing LSI MegaRAID SAS controllers .Sh SYNOPSIS .Nm .Cm version .Nm +.Op Fl D Ar device +.Op Fl t Ar type .Op Fl u Ar unit .Cm show adapter .Nm +.Op Fl D Ar device +.Op Fl t Ar type .Op Fl u Ar unit .Cm show battery .Nm .Op Fl d .Op Fl e +.Op Fl D Ar device +.Op Fl t Ar type *** 383 LINES SKIPPED *** From nobody Fri May 5 18:21:36 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCfCY0WJ0z49dTL; Fri, 5 May 2023 18:21:45 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCfCX4Mksz3Bvw; Fri, 5 May 2023 18:21:44 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.17.1/8.17.1) with ESMTPS id 345ILat1040490 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 5 May 2023 21:21:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 345ILat1040490 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 345ILaYf040489; Fri, 5 May 2023 21:21:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 5 May 2023 21:21:36 +0300 From: Konstantin Belousov To: Dag-Erling =?utf-8?B?U23DuHJncmF2?= Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 5807f35c541c - main - dd: Fix SIGINT handling. Message-ID: References: <202305051245.345CjNLE048275@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202305051245.345CjNLE048275@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home X-Rspamd-Queue-Id: 4QCfCX4Mksz3Bvw X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Fri, May 05, 2023 at 12:45:23PM +0000, Dag-Erling Smørgrav wrote: > The branch main has been updated by des: > > URL: https://cgit.FreeBSD.org/src/commit/?id=5807f35c541c26bbd91a3ae12506cd8dd8f20688 > > commit 5807f35c541c26bbd91a3ae12506cd8dd8f20688 > Author: Dag-Erling Smørgrav > AuthorDate: 2023-05-05 11:17:44 +0000 > Commit: Dag-Erling Smørgrav > CommitDate: 2023-05-05 12:42:32 +0000 > > dd: Fix SIGINT handling. > > Currently, we handle SIGINT by calling summary() and _exit() directly from the signal handler, which we install after setup(). There are several issues with this: > > * summary() is not signal safe; > * the parent is not informed about the signal; > * setup() can block on open(), and catching SIGINT at that stage will produce the correct exit status but will not print anything to stderr as POSIX demands. > > Fix this by making SIGINT non-restartable, changing our signal handler to only set a flag, installing it before setup(), and checking the termination flag before and after every blocking operation, i.e. open(), read(), write(). > > Also add two test cases, one for catching SIGINT while opening the input and one for catching it while reading. I couldn't think of an easy way to test catching SIGINT while writing (it's certainly feasible, but perhaps not from a shell script). > This does not fix SIGINT handler, it only (significantly) reduces the window where the issue could occur. See my latest comment on the review. From nobody Fri May 5 22:45:23 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCm3m0fxfz49tcR; Fri, 5 May 2023 22:45:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCm3m00zkz3nwF; Fri, 5 May 2023 22:45:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683326724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=huy8AlVIJ1hgD+K5Qqufm0MmCn96jNxu2qWy1XGoQOg=; b=MX5QPCy7s+C682FfIoPt2O4jNwVXzLWeCwosHyXuUH9xZ2dzJHaljqtbQDdejmyTEAAH21 MkI9c9LP6e+twn2u1hrChmhJpbtvtRwlYwzHOSbv1usQUiptfXrzJAEpjwtiSGQzv2ao43 5zytyMLsYz1uJogvHGz6MSdimLmXpWEEu9X99VF6fhIANhailWwHbVkOtD8ldHpcu1vzSY uMJoH1ueNOcCoeiEJW5Fj63/xnJ9583rNeGI8UIzzcZMZ2kKH3h0iqnkbCIGGNpKqstRi6 YPJOIH6WATDIIPuQcB96eDjTJM35MroD2PV6+YpVLEsjPlFtJeW1RsByiF/fQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683326724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=huy8AlVIJ1hgD+K5Qqufm0MmCn96jNxu2qWy1XGoQOg=; b=SGfRHYnW+8IWQPSor/5nRA9KXFGoraoHRhgtLmLjF3w61oFabxXnsF3fNYEi49QeA4IGBt 9pzjStqxXLsW9Oi8HG5V4fHxLem0QSv3CdzPgQeg+hzrPToIOxGdcR5t04l303wh8QgfV9 e1rZPZw19IYMingyRmeg9oXEHU/UVJ9CRUKYmTFdwMYDLIQcKepd0oQViFkxXOnd01OIRU 6+u8dSjwL+pQ4rLU2NVsSC9VqCEwGhHZvD6W4kYfnQigMO/KKshy4lBjOVytj853xguyoi /VjMoJ52JYnTjD7yXXZZXYRqICSJRbIrY+7RG+bHydM30I+H7ccIk+e8DRQu4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683326724; a=rsa-sha256; cv=none; b=yt4MXKXBZPJ7EstWXJqCmD2G5KYyQ4Kjxpq3c5N2xW7bKVjKBjCa5qYNoju2NVxJ22uyzx 5ehsJmJeotP1/WjnAlm/v30qL2PdpR8OFbFLznpRv167qBweZESojA5C6C2R5V0znX/+IN c6tznTk0gP7dJCxpLN17abVppHesuXyxSj3800bmRkpAWEEI6660G1QmscMuX0k5Sz7SCw Gvg4lR4dvuPkL7Qz8rGH02Nb4MhB0qsBWP9YfpZpTzzzOIMQg8utQwaRVKvH7cahVaVwfo gAgaLOrNZnCMtmzR7q5g4wR1q26V6207y7fUhNEF+AUDwqobhXwlrytR41Ji4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCm3l64csz1BvD; Fri, 5 May 2023 22:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345MjNxN037958; Fri, 5 May 2023 22:45:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345MjNlD037957; Fri, 5 May 2023 22:45:23 GMT (envelope-from git) Date: Fri, 5 May 2023 22:45:23 GMT Message-Id: <202305052245.345MjNlD037957@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 648a208ef3a1 - main - nfsd: Fix NFSv3 Readdir/ReaddirPlus reply for large i-node numbers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 648a208ef3a171585f3446464646832f0e0ed3dc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=648a208ef3a171585f3446464646832f0e0ed3dc commit 648a208ef3a171585f3446464646832f0e0ed3dc Author: Rick Macklem AuthorDate: 2023-05-05 22:43:55 +0000 Commit: Rick Macklem CommitDate: 2023-05-05 22:43:55 +0000 nfsd: Fix NFSv3 Readdir/ReaddirPlus reply for large i-node numbers If the i-node number (d_fileno) for a file on the server did not fit in 32bits, it would be truncated to the low order 32bits for the NFSv3 Readdir and ReaddirPlus RPC replies. This is no longer correct, given that ino_t is now 64bits. This patch fixes this by sending the full 64bits of d_fileno on the wire in the NFSv3 Readdir/ReaddirPlus RPC reply. PR: 271174 Reported by: bmueller@panasas.com Tested by: bmueller@panasas.com MFC after: 2 weeks --- sys/fs/nfsserver/nfs_nfsdport.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index 56f5c00d0aed..6b5f357ecaf9 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -2251,12 +2251,12 @@ again: if (nd->nd_flag & ND_NFSV3) { NFSM_BUILD(tl, u_int32_t *, 3 * NFSX_UNSIGNED); *tl++ = newnfs_true; - *tl++ = 0; + txdr_hyper(dp->d_fileno, tl); } else { NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); *tl++ = newnfs_true; + *tl = txdr_unsigned(dp->d_fileno); } - *tl = txdr_unsigned(dp->d_fileno); (void) nfsm_strtom(nd, dp->d_name, nlen); if (nd->nd_flag & ND_NFSV3) { NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); @@ -2753,8 +2753,7 @@ again: if (nd->nd_flag & ND_NFSV3) { NFSM_BUILD(tl, u_int32_t *, 3 * NFSX_UNSIGNED); *tl++ = newnfs_true; - *tl++ = 0; - *tl = txdr_unsigned(dp->d_fileno); + txdr_hyper(dp->d_fileno, tl); dirlen += nfsm_strtom(nd, dp->d_name, nlen); NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); txdr_hyper(*cookiep, tl); From nobody Fri May 5 23:11:06 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCmdQ60HMz49vsF for ; Fri, 5 May 2023 23:11: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 4QCmdQ5WVqz3rx3; Fri, 5 May 2023 23:11:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683328266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R7myxZp2q7zhbDbvADT1Cv7vkq6PxjGNr1ISE9/4vjs=; b=yfHblL+sIDSdXoQ/jPGdocFQmEcL6a7q4RqV1KdfiwzH6IiOlGyVlIPcT0/9L8KnqI2UQq N9Sc3CachgZssQr4ovkuygLp8k6aAktZf3ogQSfxBi8toGf/GG+D3zciYc1DR8XxprRnWf DwA+aoQx/01SrxCe89rTw7BrNIeXpTLdQrbQZxOPSFCtDGp+sEcaUk2NNghQStegGvUs5u OoI7C34PRMN0iP+F42MF7ZyjFLII3McsmMIlJgtqI2HH3+BdhUTx5uymkPwo4O8Bh0sl9Z C+pYuu9OQvkUuoPHVbLQ64IVBEdo0Y50EIC1VjzYMded8fPD2QMwtHAYTFs/PQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683328266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R7myxZp2q7zhbDbvADT1Cv7vkq6PxjGNr1ISE9/4vjs=; b=TGCP8CEhb2WkqxK+Y1eChqF7OX9TJkZIvTgZLdPsOaMGJS5u71ZtckW0IjuUGEUMTjuuXE 5kcUPHOpwg0Q1mBbvJ/eBogenK/KOSG477rSj+n9Erin3oTAUIpbgPuIAz1eRWYk1jJZmh f/zwixtLgbnYXm3epevrrj22YQStVB9twhtXdG0Uq/ud+jbM375M8xYFsweDXLx70RAjlB xCiWUJNoo4KMHPKb5of4sF/wjbxmnD0hA65kBqm1W0l/rd8M6gVsTM0NgblwQB9eZo57MZ HGXtmIhzXJtSq7JcnIbfag7JB27k0dApsLTTsOe7Wxx5aU7Bk10jTpotLHpe2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683328266; a=rsa-sha256; cv=none; b=msP3z7sldqgSb5Ve7fDITYiFjZjp5EddSuVhcrqqAtQXT6GmTc8TyFOwfnZAvIepVyhJhp BHBft4voBb/7mmz6HwkVizEuwFHSytQho/CobALGNabgYmYkU9bujS+qch5ksaP/OJzNed OLtVvpgzZC7QnIfdDU/3iqFArxkelSYkpaBJU+HdHDmy9I5c9zp3FKfQEA6gtga6v7+Y20 ZOce+SBuDfAV+zJq4nCrK9sWp4uXKxiJRBlKeeQTBqMAmNhD/MsDoOjOr3pnIzYCEc6J4z zyfEgOGorIuNZ67MOGxTb+5C+cQxAIHo83FBrlCwmcad/lg+mLgso9QgyaXgbg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCmdQ4GYsz1CjK; Fri, 5 May 2023 23:11:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345NB672080486; Fri, 5 May 2023 23:11:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345NB6mm080485; Fri, 5 May 2023 23:11:06 GMT (envelope-from git) Date: Fri, 5 May 2023 23:11:06 GMT Message-Id: <202305052311.345NB6mm080485@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Ed Maste Subject: git: a58dee945a5d..00db45a65823 - vendor/libfido2 - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/vendor/libfido2 X-Git-Reftype: branch X-Git-Commit: 00db45a65823dc224f3630bc8185e789064fef6a X-Git-Oldrev: a58dee945a5da64d0e97f35a508928e0d17c9cc7 X-Git-Newrev: 00db45a65823dc224f3630bc8185e789064fef6a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch vendor/libfido2 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/log/?id=a58dee945a5d..00db45a65823 7248ec417c7d Vendor import of libfido2 1.9.0 3a9b77fea280 Vendor import of libfido2 1.10.0 cd0b1b947d7a Vendor import of libfido2 1.11.0 fdfa06d7d381 Vendor import of libfido2 0.12.0 00db45a65823 Vendor import of libfido2 0.13.0 From nobody Fri May 5 23:12:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCmfg6tMbz49w9V; Fri, 5 May 2023 23:12: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 4QCmfg6SRcz3scN; Fri, 5 May 2023 23:12:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683328331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Aimmbnn5hn81rseJvzKZxqTp89KRr0ZZZGpLxkyzSis=; b=NI/vxsugrIe+/Nic7k/vWUnMwmLTLaNB2wVgNDjKmAsUQZmoEGeTI8pZycYYvoCciargbL raQbZHYjdMJfKVJ+GiAbHsZRzCgfOho23NQLBNa6hcS4f4o+64XxqamteZ8Q9q5sD20rOF CEJtfPlRsi7XYFD9l1A3AnYnJIvEKKA2Sh7MZthW4D+ANfzj2vQff6xLnVpwpHD3Jsk1B8 o9xIMpa85P6obOtpYuxd9oVdUS68CEdaCdQSv3aZIzRW/kEiWS8cDHMZfKXN56+kXrjmh7 XEXmbMCYDaq0zDL2QKmWQJ0rJB09PC91cfT/qNbiWReKNyD+TZUWN5p9IE7fvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683328331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Aimmbnn5hn81rseJvzKZxqTp89KRr0ZZZGpLxkyzSis=; b=m2WIIQjXhoijKTNcLbK5DLwCQKeHbKnTpfCyv95CkO/0bPYWXe5s4cvMQ7dlG89BoR4lYV xv5JUgYYeREHXkmltDeMFlXRopq7AbxuVW+MJ6xTKcxDAI4rb/SA1OMJgmWFRXCSMAdAYI p1fwL1muM2J6iEv39bv5WkOffc4ZKXbsLIPP7jGQEaPkX0B3vzbDpJ93lIlh1nCcGJesRj EsYvPbg//oxV+hawyx7USXiVCH8xSdieZ6JqnwF6i6P3ua2plNxdTAnSJynjOu1i6JVQ1M WT9jdEWvZfHiVLFelKqLh6FnNGywhW8FMmNSo951VFMKoBoJvsWpcpkR4jvqVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683328331; a=rsa-sha256; cv=none; b=VWAc5TG08JRiLtVPAE5QLoPN2QGD152RZ8yj3WTV6FwatFTJ2rH95jMASiwg8ryTk/rSMr VFEoNmpykfAu2py7un7oRbvMmk4tiN5gePepGCqTOAlikqv6CwpVpgrAKy4dxwsR3UJNAD r8udkpKm4FtkVvbVFW4rK0UpjQSefCqGpBMmfvbAq5xrO90LI91gYzHne4EFpmdsvbYg+g BrPXOCaKhVtN5weoN0vURdmUWSz8KT6MuUaIBnAqCt/hz3eJBeBPWAaMe+G/pr+z3uO3s7 4KnrpLc1BqOVK+RYAVko3vpnW2ehYQM3H0CFoDsEH8mtY5E6GZWEgz+9IU4NWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCmfg5XHPz1Ckl; Fri, 5 May 2023 23:12:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345NCBsq083741; Fri, 5 May 2023 23:12:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345NCBOE083740; Fri, 5 May 2023 23:12:11 GMT (envelope-from git) Date: Fri, 5 May 2023 23:12:11 GMT Message-Id: <202305052312.345NCBOE083740@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: f540a43052c1 - main - libfido2: update to 1.9.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f540a43052c12c76d3453ead881248d5467a1ab0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f540a43052c12c76d3453ead881248d5467a1ab0 commit f540a43052c12c76d3453ead881248d5467a1ab0 Merge: 648a208ef3a1 7248ec417c7d Author: Ed Maste AuthorDate: 2023-05-05 23:11:52 +0000 Commit: Ed Maste CommitDate: 2023-05-05 23:11:52 +0000 libfido2: update to 1.9.0 Some highlights from NEWS: ** Added OpenSSL 3.0 compatibility. ** Removed OpenSSL 1.0 compatibility. ** Support for FIDO 2.1 "minPinLength" extension. ** Support for COSE_EDDSA, COSE_ES256, and COSE_RS1 attestation. ** Support for TPM 2.0 attestation. ** Support for device timeouts; see fido_dev_set_timeout(). ** New API calls: - es256_pk_from_EVP_PKEY; - fido_cred_attstmt_len; - fido_cred_attstmt_ptr; - fido_cred_pin_minlen; - fido_cred_set_attstmt; - fido_cred_set_pin_minlen; - fido_dev_set_pin_minlen_rpid; - fido_dev_set_timeout; - rs256_pk_from_EVP_PKEY. ** Reliability and portability fixes. ** Better handling of HID devices without identification strings; gh#381. Relnotes: Yes Sponsored by: The FreeBSD Foundation contrib/libfido2/CMakeLists.txt | 59 +- contrib/libfido2/NEWS | 22 + contrib/libfido2/README.adoc | 9 +- contrib/libfido2/examples/assert.c | 44 +- contrib/libfido2/examples/cred.c | 110 +- contrib/libfido2/examples/extern.h | 8 - contrib/libfido2/examples/reset.c | 13 +- contrib/libfido2/examples/util.c | 28 - contrib/libfido2/fuzz/Dockerfile | 6 +- contrib/libfido2/fuzz/Makefile | 16 +- contrib/libfido2/fuzz/clock.c | 79 ++ contrib/libfido2/fuzz/dummy.h | 83 ++ contrib/libfido2/fuzz/export.gnu | 12 + contrib/libfido2/fuzz/functions.txt | 1165 ++++++++++++---------- contrib/libfido2/fuzz/fuzz_assert.c | 48 +- contrib/libfido2/fuzz/fuzz_bio.c | 1 + contrib/libfido2/fuzz/fuzz_cred.c | 39 +- contrib/libfido2/fuzz/fuzz_credman.c | 1 + contrib/libfido2/fuzz/fuzz_hid.c | 30 +- contrib/libfido2/fuzz/fuzz_largeblob.c | 1 + contrib/libfido2/fuzz/fuzz_mgmt.c | 28 + contrib/libfido2/fuzz/fuzz_netlink.c | 94 +- contrib/libfido2/fuzz/mutator_aux.c | 5 +- contrib/libfido2/fuzz/mutator_aux.h | 5 +- contrib/libfido2/fuzz/report.tgz | Bin 303082 -> 320981 bytes contrib/libfido2/fuzz/summary.txt | 86 +- contrib/libfido2/fuzz/wrap.c | 201 ++-- contrib/libfido2/fuzz/wrapped.sym | 25 +- contrib/libfido2/man/CMakeLists.txt | 17 +- contrib/libfido2/man/es256_pk_new.3 | 18 +- contrib/libfido2/man/fido2-token.1 | 12 + contrib/libfido2/man/fido_cred_new.3 | 50 +- contrib/libfido2/man/fido_cred_set_authdata.3 | 57 +- contrib/libfido2/man/fido_cred_verify.3 | 12 +- contrib/libfido2/man/fido_dev_enable_entattest.3 | 27 +- contrib/libfido2/man/fido_dev_info_manifest.3 | 10 + contrib/libfido2/man/fido_dev_set_io_functions.3 | 35 +- contrib/libfido2/man/rs256_pk_new.3 | 18 +- contrib/libfido2/openbsd-compat/hkdf.c | 124 --- contrib/libfido2/openbsd-compat/hkdf.h | 65 -- contrib/libfido2/openbsd-compat/openbsd-compat.h | 17 +- contrib/libfido2/openbsd-compat/strsep.c | 79 ++ contrib/libfido2/regress/CMakeLists.txt | 10 +- contrib/libfido2/regress/assert.c | 88 +- contrib/libfido2/regress/cred.c | 646 +++++++++++- contrib/libfido2/regress/dev.c | 154 ++- contrib/libfido2/src/CMakeLists.txt | 15 +- contrib/libfido2/src/assert.c | 168 +--- contrib/libfido2/src/authkey.c | 16 +- contrib/libfido2/src/bio.c | 77 +- contrib/libfido2/src/cbor.c | 107 +- contrib/libfido2/src/config.c | 74 +- contrib/libfido2/src/cred.c | 245 +++-- contrib/libfido2/src/credman.c | 62 +- contrib/libfido2/src/dev.c | 63 +- contrib/libfido2/src/ecdh.c | 12 +- contrib/libfido2/src/eddsa.c | 82 +- contrib/libfido2/src/es256.c | 62 +- contrib/libfido2/src/export.gnu | 9 + contrib/libfido2/src/export.llvm | 9 + contrib/libfido2/src/export.msvc | 9 + contrib/libfido2/src/extern.h | 55 +- contrib/libfido2/src/fido.h | 18 +- contrib/libfido2/src/fido/config.h | 2 + contrib/libfido2/src/fido/eddsa.h | 9 +- contrib/libfido2/src/fido/es256.h | 3 +- contrib/libfido2/src/fido/param.h | 8 +- contrib/libfido2/src/fido/rs256.h | 3 +- contrib/libfido2/src/fido/types.h | 14 +- contrib/libfido2/src/hid_freebsd.c | 8 +- contrib/libfido2/src/hid_linux.c | 4 +- contrib/libfido2/src/hid_openbsd.c | 17 +- contrib/libfido2/src/hid_osx.c | 32 +- contrib/libfido2/src/hid_unix.c | 3 +- contrib/libfido2/src/hid_win.c | 48 +- contrib/libfido2/src/info.c | 81 +- contrib/libfido2/src/io.c | 104 +- contrib/libfido2/src/largeblob.c | 65 +- contrib/libfido2/src/netlink.c | 4 +- contrib/libfido2/src/nfc_linux.c | 44 +- contrib/libfido2/src/pin.c | 72 +- contrib/libfido2/src/reset.c | 12 +- contrib/libfido2/src/rs1.c | 99 ++ contrib/libfido2/src/rs256.c | 127 ++- contrib/libfido2/src/time.c | 74 ++ contrib/libfido2/src/tpm.c | 286 ++++++ contrib/libfido2/src/types.c | 76 ++ contrib/libfido2/src/u2f.c | 158 ++- contrib/libfido2/src/webauthn.h | 839 ++++++++++++++++ contrib/libfido2/src/winhello.c | 387 +++---- contrib/libfido2/tools/CMakeLists.txt | 3 + contrib/libfido2/tools/config.c | 48 + contrib/libfido2/tools/extern.h | 3 +- contrib/libfido2/tools/fido2-token.c | 2 + contrib/libfido2/tools/token.c | 6 + contrib/libfido2/windows/build.ps1 | 390 ++++---- contrib/libfido2/windows/const.ps1 | 42 + contrib/libfido2/windows/release.ps1 | 84 ++ lib/libfido2/Makefile | 4 + 99 files changed, 5599 insertions(+), 2302 deletions(-) diff --cc contrib/libfido2/fuzz/clock.c index 000000000000,23803c2ee3e5..23803c2ee3e5 mode 000000,100644..100644 --- a/contrib/libfido2/fuzz/clock.c +++ b/contrib/libfido2/fuzz/clock.c diff --cc contrib/libfido2/fuzz/report.tgz index c8d4d3f38028,cf74f315cb80..cf74f315cb80 Binary files differ diff --cc contrib/libfido2/openbsd-compat/strsep.c index 000000000000,578668c8ac7b..578668c8ac7b mode 000000,100644..100644 --- a/contrib/libfido2/openbsd-compat/strsep.c +++ b/contrib/libfido2/openbsd-compat/strsep.c diff --cc contrib/libfido2/src/rs1.c index 000000000000,37aa9f073bed..37aa9f073bed mode 000000,100644..100644 --- a/contrib/libfido2/src/rs1.c +++ b/contrib/libfido2/src/rs1.c diff --cc contrib/libfido2/src/time.c index 000000000000,b82b61874498..b82b61874498 mode 000000,100644..100644 --- a/contrib/libfido2/src/time.c +++ b/contrib/libfido2/src/time.c diff --cc contrib/libfido2/src/tpm.c index 000000000000,74620a5e4865..74620a5e4865 mode 000000,100644..100644 --- a/contrib/libfido2/src/tpm.c +++ b/contrib/libfido2/src/tpm.c diff --cc contrib/libfido2/src/types.c index 000000000000,54c0ca582865..54c0ca582865 mode 000000,100644..100644 --- a/contrib/libfido2/src/types.c +++ b/contrib/libfido2/src/types.c diff --cc contrib/libfido2/src/webauthn.h index 000000000000,5fbdd6faa927..5fbdd6faa927 mode 000000,100644..100644 --- a/contrib/libfido2/src/webauthn.h +++ b/contrib/libfido2/src/webauthn.h diff --cc contrib/libfido2/windows/const.ps1 index 000000000000,6d2a8189d362..6d2a8189d362 mode 000000,100644..100644 --- a/contrib/libfido2/windows/const.ps1 +++ b/contrib/libfido2/windows/const.ps1 diff --cc contrib/libfido2/windows/release.ps1 index 000000000000,32e88e256274..32e88e256274 mode 000000,100644..100644 --- a/contrib/libfido2/windows/release.ps1 +++ b/contrib/libfido2/windows/release.ps1 diff --cc lib/libfido2/Makefile index edf737b9dafc,000000000000..9a0e4a57bd9a mode 100644,000000..100644 --- a/lib/libfido2/Makefile +++ b/lib/libfido2/Makefile @@@ -1,73 -1,0 +1,77 @@@ +PACKAGE=ssh +LIB= fido2 +PRIVATELIB= +DIST= ${SRCTOP}/contrib/libfido2 + +.PATH: ${DIST}/src ${DIST} + +SRCS+= aes256.c +SRCS+= assert.c +SRCS+= authkey.c +SRCS+= bio.c +SRCS+= blob.c +SRCS+= buf.c +SRCS+= cbor.c +SRCS+= compress.c +SRCS+= config.c +SRCS+= cred.c +SRCS+= credman.c +SRCS+= dev.c +SRCS+= ecdh.c +SRCS+= eddsa.c +SRCS+= err.c +SRCS+= es256.c +SRCS+= hid_freebsd.c +SRCS+= hid_unix.c +SRCS+= hid.c +SRCS+= info.c +SRCS+= io.c +SRCS+= iso7816.c +SRCS+= largeblob.c +SRCS+= log.c +SRCS+= pin.c +SRCS+= random.c +SRCS+= reset.c ++SRCS+= rs1.c +SRCS+= rs256.c ++SRCS+= time.c ++SRCS+= tpm.c ++SRCS+= types.c +SRCS+= u2f.c + +SRCS+= openbsd-compat/freezero.c +SRCS+= openbsd-compat/recallocarray.c + +CFLAGS+= -I ${DIST}/src -I${SRCTOP}/contrib/libcbor/src -I${.CURDIR}/../libcbor +CFLAGS+= -D_FIDO_INTERNAL +CFLAGS+= -DHAVE_ARC4RANDOM_BUF +CFLAGS+= -DHAVE_CLOCK_GETTIME +CFLAGS+= -DHAVE_DEV_URANDOM +CFLAGS+= -DHAVE_ERR_H +CFLAGS+= -DHAVE_EXPLICIT_BZERO +CFLAGS+= -DHAVE_GETLINE +CFLAGS+= -DHAVE_GETOPT +CFLAGS+= -DHAVE_GETPAGESIZE +CFLAGS+= -DHAVE_GETRANDOM +CFLAGS+= -DHAVE_OPENSSLV_H +CFLAGS+= -DHAVE_READPASSPHRASE +CFLAGS+= -DHAVE_SIGNAL_H +CFLAGS+= -DHAVE_STRLCAT +CFLAGS+= -DHAVE_STRLCPY +CFLAGS+= -DHAVE_STRSEP +CFLAGS+= -DHAVE_SYSCONF +CFLAGS+= -DHAVE_SYS_RANDOM_H +CFLAGS+= -DHAVE_TIMESPECSUB +CFLAGS+= -DHAVE_TIMINGSAFE_BCMP +CFLAGS+= -DHAVE_UNISTD_H +CFLAGS+= -DTLS=__thread +CFLAGS+= -D_FIDO_MAJOR=1 +CFLAGS+= -D_FIDO_MINOR=9 +CFLAGS+= -D_FIDO_PATCH=0 + +LIBADD= crypto z + +WARNS=2 +MAN= + +.include From nobody Fri May 5 23:39:01 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCnFx0KwDz49x31 for ; Fri, 5 May 2023 23:39:17 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCnFv1p8wz3vf5; Fri, 5 May 2023 23:39:15 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.167.41 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com; dmarc=none Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-4f004cc54f4so2756002e87.3; Fri, 05 May 2023 16:39:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683329953; x=1685921953; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=x508zGFCTZmTXJ34hrMRbnqJ+3Hxo0lUJLR+g4YSs+I=; b=Fs3RQcth6U84yZT8Cz+PsvaECk8KMpkI2V7Et56NDfklowQbCpplhBcoxGdlcLycTj nx+QX0zQm636e9BLZi6EcAqmZQSFujVoSiOU3PZOS5TaBPtYFHnkl8oRNuFPXenS96nt CVWrVjuOXx6CauCjkuDOKZX1HISyEuKVOiDgztROb4QxCHM9nOwD6tX++SERT2gBh0Ra HvgRRfvg/sPqDQ2TKP0k+Em6ZJbMpxo0vefjMSxkSQsezKq2ADkHxXbDfk4aKD4i1sm+ 2cvZcimGzNSjQjRvfXrRGxNi4jm6FBqkNONjxvq/eQRQ4fTEL/eU1F5mdeKarkn81Dem 2TFw== X-Gm-Message-State: AC+VfDwzWMT/FSIeSBkJJreTTb1kcpC7ylvzCB4NIB4nCqdagkTzupdI /hrFs/+erSTiUp3LX3fnno0LXAhjahqNl/vICpehrplE X-Google-Smtp-Source: ACHHUZ46lsnZp1K5zFqUwn2YTWT4J8FYk4WmgfmG9HTLytSicyh6Hwm9Do18VVrhCMMP/zBOz8k9+DrNAjeJG4OsDAU= X-Received: by 2002:ac2:4850:0:b0:4ec:7967:9e8a with SMTP id 16-20020ac24850000000b004ec79679e8amr864441lfy.16.1683329952823; Fri, 05 May 2023 16:39:12 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202305052311.345NB6mm080485@gitrepo.freebsd.org> In-Reply-To: <202305052311.345NB6mm080485@gitrepo.freebsd.org> From: Ed Maste Date: Fri, 5 May 2023 19:39:01 -0400 Message-ID: Subject: Re: git: a58dee945a5d..00db45a65823 - vendor/libfido2 - vendor branch updated To: src-committers@freebsd.org, dev-commits-src-all@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [1.34 / 15.00]; NEURAL_SPAM_SHORT(0.99)[0.986]; NEURAL_SPAM_LONG(0.49)[0.486]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_MEDIUM(-0.13)[-0.128]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.41:from]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; FREEFALL_USER(0.00)[carpeddiem]; ARC_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.41:from]; FROM_HAS_DN(0.00)[]; TO_DN_NONE(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[freebsd.org]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4QCnFv1p8wz3vf5 X-Spamd-Bar: + X-ThisMailContainsUnwantedMimeParts: N On Fri, 5 May 2023 at 19:11, Ed Maste wrote: > > The branch vendor/libfido2 has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/log/?id=a58dee945a5d..00db45a65823 > > 7248ec417c7d Vendor import of libfido2 1.9.0 > 3a9b77fea280 Vendor import of libfido2 1.10.0 > cd0b1b947d7a Vendor import of libfido2 1.11.0 > fdfa06d7d381 Vendor import of libfido2 0.12.0 > 00db45a65823 Vendor import of libfido2 0.13.0 Oops, I've got a typo on the version number on the last two vendor updates. Although it should theoretically be possible to remove and redo these commits I don't think it's worth trying to pursue it. I'll note the error in the eventual merge commit. From nobody Fri May 5 23:58:17 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCngs4CG4z49y2P; Fri, 5 May 2023 23:58:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCngs3dSgz3wyF; Fri, 5 May 2023 23:58:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683331097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ejVAGicTMvSKjJNyBWVO4zVYkNaOgYtMJsn6ET4PuCw=; b=yipU9hqLxl/pt54Hif+BYkdHd1SuR8S25uVYT0QDfZkaE1w/MwVOcQOjQRBgp5zLphk68j DnL4pFnfgioA7o2iHLu44Fok6/Nt6nhVmQKAElvwDnTIaheHDPYW2MnSEnN6c/zrPQuuvb URDesEqsx7vVUbHiBM4MX77bNRwfcIqgNIkIjR2ahg6yqxd9f8fc+J/tdofBpkpoOgYSPS 5fGhoK99aPNWGYL4h+qPtPMRwZoegxot16HMqLGbnX/kWFZjGov+zvhnM23PV4JByTZuIW 0MX3lgByXbkc4fMyaJRNzqZqNhFkadKrBryUZNQyuA1VpAEv+mem2BJCey1CRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683331097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ejVAGicTMvSKjJNyBWVO4zVYkNaOgYtMJsn6ET4PuCw=; b=sWQjWH6+NIe81WGV7B5lGtf6rVqT8HuS4S+tnCG4bOpDWrqknVDC12q3vafjIgRAdQuLbd slIqbwZqSYbohWU4blsFtAFOf37OdEhVr8OGQp7w4crdrH5+cmSi4CKrJau6cgogbasqJV XmDSxOGgkiJJb3PWJ6h59NtQPIQWCHF5v8m2QvipAI2vnqB6Xdfn0bJSaANpspKl/DhkI/ gIveTBS4GtwOgOmR7kspKmaOFauu9oKjf9dm33ZQDfk6Ecmr4T3MVon5tUQ70FrWq++NZo sFR9C/bSfyFlxM6ZTZ6jD1BoyRRmJe3MzK55SL8pFFMZcRRK9OLnXwCHjHNBwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683331097; a=rsa-sha256; cv=none; b=FfUtZd6coinmsFse7STEIJCowso7Hl3nBWXAfzSiS2w3UZfI4upqM9ZKrdsQSnP7Suxr83 CNcL0ZZqRPQMtKTE5PqK5RicP2m1J+UJfwGPbvRjhiDAaoFSR0m8qWEwhu4j9G7M1MCbNX dJ1lDUOwoJKBuIIs5+QYLwQUVwtH20VlIMyRFFBMTSYIymt41chCuOdMlA6euDlRKrTCaS XdJQpq/HZfBwv40G5/Lje8k2G+6n1+i7GNGMCEWzWxSfmCdTGn1IlRce2ji14fQSUmhwGa PAQCXUk/c6eDdqdZXMeFMK7BXceJ0m5nqSak+WKrfah//ylciBLD59Hc7NXxMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCngs2gkxzDgL; Fri, 5 May 2023 23:58:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 345NwHIx053566; Fri, 5 May 2023 23:58:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 345NwH8l053565; Fri, 5 May 2023 23:58:17 GMT (envelope-from git) Date: Fri, 5 May 2023 23:58:17 GMT Message-Id: <202305052358.345NwH8l053565@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: 3e696dfb7009 - main - libfido2: update to 1.10.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3e696dfb7009cd8ffa12e36f48f4339bb7a2048d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3e696dfb7009cd8ffa12e36f48f4339bb7a2048d commit 3e696dfb7009cd8ffa12e36f48f4339bb7a2048d Merge: f540a43052c1 3a9b77fea280 Author: Ed Maste AuthorDate: 2023-05-05 23:57:34 +0000 Commit: Ed Maste CommitDate: 2023-05-05 23:57:34 +0000 libfido2: update to 1.10.0 Some highlights from NEWS: ** bio: fix CTAP2 canonical CBOR encoding in fido_bio_dev_enroll_*(); gh#480. ** New API calls: - fido_dev_info_set; - fido_dev_io_handle; - fido_dev_new_with_info; - fido_dev_open_with_info. ** Documentation and reliability fixes. ** Support for TPM 2.0 attestation of COSE_ES256 credentials. Relnotes: Yes Sponsored by: The FreeBSD Foundation contrib/libfido2/CMakeLists.txt | 47 +- contrib/libfido2/LICENSE | 2 +- contrib/libfido2/NEWS | 14 + contrib/libfido2/README.adoc | 4 +- contrib/libfido2/SECURITY.md | 5 + contrib/libfido2/examples/README.adoc | 2 +- contrib/libfido2/fuzz/Dockerfile | 2 +- contrib/libfido2/fuzz/Makefile | 2 +- contrib/libfido2/fuzz/export.gnu | 1 + contrib/libfido2/fuzz/functions.txt | 35 +- contrib/libfido2/fuzz/fuzz_hid.c | 11 +- contrib/libfido2/fuzz/report.tgz | Bin 320981 -> 323706 bytes contrib/libfido2/fuzz/summary.txt | 14 +- contrib/libfido2/man/CMakeLists.txt | 17 +- contrib/libfido2/man/check.sh | 42 ++ contrib/libfido2/man/eddsa_pk_new.3 | 4 +- contrib/libfido2/man/es256_pk_new.3 | 8 +- contrib/libfido2/man/fido2-assert.1 | 6 +- contrib/libfido2/man/fido2-cred.1 | 6 +- contrib/libfido2/man/fido2-token.1 | 24 +- contrib/libfido2/man/fido_assert_allow_cred.3 | 4 +- contrib/libfido2/man/fido_assert_new.3 | 95 ++-- contrib/libfido2/man/fido_assert_set_authdata.3 | 57 ++- contrib/libfido2/man/fido_assert_verify.3 | 6 +- contrib/libfido2/man/fido_bio_dev_get_info.3 | 2 +- contrib/libfido2/man/fido_bio_enroll_new.3 | 4 +- contrib/libfido2/man/fido_bio_info_new.3 | 2 +- contrib/libfido2/man/fido_bio_template.3 | 4 +- contrib/libfido2/man/fido_cbor_info_new.3 | 3 +- contrib/libfido2/man/fido_cred_exclude.3 | 2 +- contrib/libfido2/man/fido_cred_new.3 | 10 +- contrib/libfido2/man/fido_cred_set_authdata.3 | 20 +- contrib/libfido2/man/fido_cred_verify.3 | 44 +- contrib/libfido2/man/fido_credman_metadata_new.3 | 6 +- contrib/libfido2/man/fido_dev_enable_entattest.3 | 6 +- contrib/libfido2/man/fido_dev_get_assert.3 | 6 +- contrib/libfido2/man/fido_dev_get_touch_begin.3 | 4 +- contrib/libfido2/man/fido_dev_info_manifest.3 | 41 +- contrib/libfido2/man/fido_dev_largeblob_get.3 | 10 +- contrib/libfido2/man/fido_dev_make_cred.3 | 6 +- contrib/libfido2/man/fido_dev_open.3 | 71 ++- contrib/libfido2/man/fido_dev_set_io_functions.3 | 81 +++- contrib/libfido2/man/fido_dev_set_pin.3 | 2 +- contrib/libfido2/man/fido_init.3 | 28 +- contrib/libfido2/man/fido_strerr.3 | 2 +- contrib/libfido2/man/rs256_pk_new.3 | 4 +- contrib/libfido2/regress/cred.c | 576 ++++++++++++++++++++++- contrib/libfido2/src/CMakeLists.txt | 2 +- contrib/libfido2/src/bio.c | 4 +- contrib/libfido2/src/cbor.c | 1 - contrib/libfido2/src/dev.c | 7 + contrib/libfido2/src/eddsa.c | 6 +- contrib/libfido2/src/export.gnu | 4 + contrib/libfido2/src/export.llvm | 4 + contrib/libfido2/src/export.msvc | 4 + contrib/libfido2/src/extern.h | 1 - contrib/libfido2/src/fido.h | 8 +- contrib/libfido2/src/fido/types.h | 4 +- contrib/libfido2/src/hid.c | 56 ++- contrib/libfido2/src/hid_osx.c | 62 ++- contrib/libfido2/src/hid_win.c | 2 +- contrib/libfido2/src/tpm.c | 144 +++++- contrib/libfido2/src/webauthn.h | 88 +++- contrib/libfido2/src/winhello.c | 171 ++++--- contrib/libfido2/tools/test.sh | 6 +- contrib/libfido2/windows/build.ps1 | 2 +- contrib/libfido2/windows/const.ps1 | 6 +- contrib/libfido2/windows/cygwin.gpg | Bin 0 -> 2193 bytes contrib/libfido2/windows/cygwin.ps1 | 68 +++ contrib/libfido2/windows/release.ps1 | 19 +- lib/libfido2/Makefile | 2 +- 71 files changed, 1639 insertions(+), 374 deletions(-) diff --cc contrib/libfido2/SECURITY.md index 000000000000,e12a48a847ba..e12a48a847ba mode 000000,100644..100644 --- a/contrib/libfido2/SECURITY.md +++ b/contrib/libfido2/SECURITY.md diff --cc contrib/libfido2/fuzz/report.tgz index cf74f315cb80,d78f4628de59..d78f4628de59 Binary files differ diff --cc contrib/libfido2/man/check.sh index 000000000000,951afeb88e0b..951afeb88e0b mode 000000,100755..100755 --- a/contrib/libfido2/man/check.sh +++ b/contrib/libfido2/man/check.sh diff --cc contrib/libfido2/windows/cygwin.gpg index 000000000000,1e87237a6e03..1e87237a6e03 mode 000000,100755..100755 Binary files differ diff --cc contrib/libfido2/windows/cygwin.ps1 index 000000000000,aada60b6f06f..aada60b6f06f mode 000000,100755..100755 --- a/contrib/libfido2/windows/cygwin.ps1 +++ b/contrib/libfido2/windows/cygwin.ps1 diff --cc lib/libfido2/Makefile index 9a0e4a57bd9a,000000000000..a9e1c526d45d mode 100644,000000..100644 --- a/lib/libfido2/Makefile +++ b/lib/libfido2/Makefile @@@ -1,77 -1,0 +1,77 @@@ +PACKAGE=ssh +LIB= fido2 +PRIVATELIB= +DIST= ${SRCTOP}/contrib/libfido2 + +.PATH: ${DIST}/src ${DIST} + +SRCS+= aes256.c +SRCS+= assert.c +SRCS+= authkey.c +SRCS+= bio.c +SRCS+= blob.c +SRCS+= buf.c +SRCS+= cbor.c +SRCS+= compress.c +SRCS+= config.c +SRCS+= cred.c +SRCS+= credman.c +SRCS+= dev.c +SRCS+= ecdh.c +SRCS+= eddsa.c +SRCS+= err.c +SRCS+= es256.c +SRCS+= hid_freebsd.c +SRCS+= hid_unix.c +SRCS+= hid.c +SRCS+= info.c +SRCS+= io.c +SRCS+= iso7816.c +SRCS+= largeblob.c +SRCS+= log.c +SRCS+= pin.c +SRCS+= random.c +SRCS+= reset.c +SRCS+= rs1.c +SRCS+= rs256.c +SRCS+= time.c +SRCS+= tpm.c +SRCS+= types.c +SRCS+= u2f.c + +SRCS+= openbsd-compat/freezero.c +SRCS+= openbsd-compat/recallocarray.c + +CFLAGS+= -I ${DIST}/src -I${SRCTOP}/contrib/libcbor/src -I${.CURDIR}/../libcbor +CFLAGS+= -D_FIDO_INTERNAL +CFLAGS+= -DHAVE_ARC4RANDOM_BUF +CFLAGS+= -DHAVE_CLOCK_GETTIME +CFLAGS+= -DHAVE_DEV_URANDOM +CFLAGS+= -DHAVE_ERR_H +CFLAGS+= -DHAVE_EXPLICIT_BZERO +CFLAGS+= -DHAVE_GETLINE +CFLAGS+= -DHAVE_GETOPT +CFLAGS+= -DHAVE_GETPAGESIZE +CFLAGS+= -DHAVE_GETRANDOM +CFLAGS+= -DHAVE_OPENSSLV_H +CFLAGS+= -DHAVE_READPASSPHRASE +CFLAGS+= -DHAVE_SIGNAL_H +CFLAGS+= -DHAVE_STRLCAT +CFLAGS+= -DHAVE_STRLCPY +CFLAGS+= -DHAVE_STRSEP +CFLAGS+= -DHAVE_SYSCONF +CFLAGS+= -DHAVE_SYS_RANDOM_H +CFLAGS+= -DHAVE_TIMESPECSUB +CFLAGS+= -DHAVE_TIMINGSAFE_BCMP +CFLAGS+= -DHAVE_UNISTD_H +CFLAGS+= -DTLS=__thread +CFLAGS+= -D_FIDO_MAJOR=1 - CFLAGS+= -D_FIDO_MINOR=9 ++CFLAGS+= -D_FIDO_MINOR=10 +CFLAGS+= -D_FIDO_PATCH=0 + +LIBADD= crypto z + +WARNS=2 +MAN= + +.include From nobody Sat May 6 00:26:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCpK11DZJz4B0XF; Sat, 6 May 2023 00:27:01 +0000 (UTC) (envelope-from peterj@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 4QCpK10lfYz417c; Sat, 6 May 2023 00:27:01 +0000 (UTC) (envelope-from peterj@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683332821; 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=M+nDiOb47LO4iim4Y+HmyS4Wfh72R6QYgv9fahDybuA=; b=BnuK32+8dm9qqyKaVlSj1bjxhniFnvCqmP+NRi0SJ9Ktq2/K782Aalv8FshMTpIv8Xk50t ZDMI80rfLGw8r249RZKVRNzhXi44rpVrKmrBZKNxxKJ7wKGgsWs3iYOUFhKNHVhMHfRI+h /Ol4rpQ8QQXF44ICgFv6zrmy9hC5hyjWPnsUkam+KdlWubC6HyKDr11TMHfeUge8K6YWti lefrqyJdjFX86ZcfGMapcRwokJR8BF0IPfAn0vCxkkk42IaWRsVVS4HohpIycHHUBLalAn HwKZrFq/d6L4WXrsT0Cy3haBH3kUHjx7f1vvnP4O+eHkHjxghtCyaqXdxqsL0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683332821; 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=M+nDiOb47LO4iim4Y+HmyS4Wfh72R6QYgv9fahDybuA=; b=sKPaTI3gKV/XMU8tMEcGuh0OuJC+veS+tkh/oA+L2XCOCTNA/mK2mkPcQnVE+DpGGUeS49 Bi19ZXnTnsNiD1tmHCPa9JS1MBwMFnFOjj07yP5vHlMUzLylynH2ocSk4oHOn4kXEXGaFh OL+ZfzGW04JrgfIkhw5eSPWbnuJpaNyF91IjNktXvAwh97NrXeZSwlutfjb/DNXoxBPMFS cmTWcj3Ceblq6c2/EnAfNX7zj0tLbzeER8UcpmNwxrNnhn+ZA1IK3pZCMKUTGjlSOxoDRS RG6KaAVRywIqOivW+sveclTMRAb96ZSVPWsACrECsMQ6TqtqjwK1DXqXY2C2pw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683332821; a=rsa-sha256; cv=none; b=vlo5R3p3y+oZS4zb+7lmeHWFJkPtgVEWBLCT02KCWMy6HCARfKw1+i2w5H7l7uNKVRNVkq 7agNpygGS2dkB0TeXGxU7/AHdxeRsQ0kejq7kXJ8ulDrf58WUv14aPV5T+UUR5MkE5kqi3 jYkhVR8AUgcROKWQY57kG+Hm80RzTF84H+10qdPRU71khUpE76HPmBTOXyY0BL5Ipou8YS gOOcfnYC8xgvTLpavCbxa6HnaX0RxjZ812xgNBh9RP+alZq33hutpALszZQ5NkzAjMRVGh aAb1qsD86qDJMxL2xGsfN9OKPfvolOx3dETjElSww3B05eCZWKKCT30KaiWsHA== Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) (Authenticated sender: peterj) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QCpJz46lPzd1v; Sat, 6 May 2023 00:26:59 +0000 (UTC) (envelope-from peterj@freebsd.org) Date: Sat, 6 May 2023 10:26:53 +1000 From: Peter Jeremy To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 42f722e721cd - main - amd64: store pcids pmap data in pcpu zone Message-ID: References: <202305021139.342Bdtn7092368@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="CB/PyJuI29xUfjOc" Content-Disposition: inline In-Reply-To: <202305021139.342Bdtn7092368@gitrepo.freebsd.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp X-ThisMailContainsUnwantedMimeParts: N --CB/PyJuI29xUfjOc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2023-May-02 11:39:55 +0000, Konstantin Belousov wrote: >The branch main has been updated by kib: > >URL: https://cgit.FreeBSD.org/src/commit/?id=3D42f722e721cd010ae5759a4b0d3= b7b93c2b9cad2 > >commit 42f722e721cd010ae5759a4b0d3b7b93c2b9cad2 >Author: Konstantin Belousov >AuthorDate: 2023-05-01 05:17:45 +0000 >Commit: Konstantin Belousov >CommitDate: 2023-05-02 11:32:47 +0000 > > amd64: store pcids pmap data in pcpu zone > =20 > This change eliminates the struct pmap_pcid array embedded into struct > pmap and sized by MAXCPU, which would bloat with MAXCPU increase. Also > it removes false sharing of cache lines, since the array elements are > mostly locally accessed by corresponding CPUs. > =20 > Suggested by: mjg > Reviewed by: markj > Tested by: pho > Sponsored by: The FreeBSD Foundation > Differential revision: https://reviews.freebsd.org/D39890 This breaks the !SMP case: Whilst references to pm_pcids have been replaced in the SMP case, there are still references to pmap->pm_pcids[0] in the !SMP cane. --=20 Peter Jeremy --CB/PyJuI29xUfjOc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKSBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAmRVnshfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzSPpw/4g+r2OztXiYuzQzfT+LhGLrPYSxS/RYx/OlTVSVuA2dAZUDbplKIj7gQ5 lRNjmgbLQK4nRTcmNhpJFJbrut34ALzhGOg8bOA7pmOlncBXwMFX4TKL3I3xMuaJ z0ivHEEWRvvbdSm03+QuyTUzjSfqcpj3aQzOwSzyZaKxDQB2pPC5L0j/AgNW9Qgl 61j/6tvlDD4oPldkEzO2iIprKGFhmjgQWUs8qL1xz3F171T8UKK5COd2uskQJC7H mGaxb814vg35KnbVecC+xYOEPjylQehb2bWnC630fXDV/tfvJZNAMFzVY2/BNUuf mw+IaSAvqhz4TIfcV82y4tVju9MH1b7s7EZpQiugyq3sA1wMMe1kwHyV5AThM3HR VecL0j8Ie4EisSmur8fdkr1c36ZXcXaO5u6moNixhhyzyFahNaQlXXck5GNdqtp4 fWmzJ4Q0XAWqUgoFEkE1y2zGoweZl/057s8HPwfJEYk6mitXCCCsD/BV68d2r9sB iPFeVIa8F/7cZOEZ8ADG/9fKvI9CasiqOoe9EZJcEzFamXtSF8JvWGAkJN78TEew iZupOzXR8x5kjhu5sCxEA0xnSHqzfyclxZzL8/3R5UkJ4iChcrpk3bQOzDwwt5q3 s6fzqT5GfwVauXCZqdTSavEv+D/G+6iv8lDyDdfG9YZdvcce5A== =Co19 -----END PGP SIGNATURE----- --CB/PyJuI29xUfjOc-- From nobody Sat May 6 00:29:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCpN82LQmz4B0b0; Sat, 6 May 2023 00:29: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 4QCpN81jJQz41b2; Sat, 6 May 2023 00:29:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683332984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a6wPuDNeCFfa/MyIfdT0J3UOznsme0F129zJQO04yAk=; b=KJpPum1kGgTtQyJrCz/El+pkFqB1y9nBGTOfrh33X6ribt2Ix4NQJRglIEZbBxF/24D02r tEtYjI4P1XwqQumuuL6EWHVy3X7ODJ2eURFq/+WFxsH173uvYuPUXR4qMec3hlFhR+j54x w22BhIhAhiJu3jgwrB8EENHw0m8cAjsGacGuEb6LrYzB94IJglU/T2U2XsA9fNCkmJpZ+U I5BGAUOeyki2eABkhyM4k/b6VVRSeMAMc2+xefjxl5KLfkDLuk7mWHlSYwTpn9saAesX87 h/lKJeMBsKUZruIEuQGTFFf44bJKE619wfgAix1SqCZuiD2Hg+hwtp2LkTV3LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683332984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a6wPuDNeCFfa/MyIfdT0J3UOznsme0F129zJQO04yAk=; b=dzTo3hH8kKBWhjfqDENOPfOPx/4PNuvoV6OH57ZQyTxSro2U0fJVaOtefb29dvH9lEzAnW zuzA2kOZ/KGSe+wwziQsCdRmGhGv9kz6ikw1m5GDUazkEKwHQ57VFwo80o9iZJIzMBUF4V PWGa0GSsTbobDCZtKEBnhqCugCdeAnwLgXWO1Av8lRZe4WPg9Hw1KAsTjHS5kwl4DEMcaE lRu4BaoHJXcTcBO4xm+jwgw+Tfj7cZLIs8akHK86arKqNIyyhcCPkBlLkeoWifctuGYn3X G7PWURZvOw7e1aFUZndUaiTB96PMB/wjCKesmI93oTuGzOtR5zc+SU95NctNVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683332984; a=rsa-sha256; cv=none; b=eOytDX7NdBfp7e1aRAOg+3UZDQX1ppgtRw/FowrCSUODfu3mzXunIPoHR7AHE5aBqILzLu wisAGjjSo7fLXrEpG4Di5O13nD0WHSFiOGOWOhRRRGUxSTMeg+Gq5RUb8Ynah+Mh3hd/gp q+Ami2fXLB6hFnbkf7y94bQlYN7rzw52vfQ5T3qkBBUFmibEmVoFb5+1MxgGetozCSs/xu B8I/0Z/GyRNPGuG9ZnAt0NtM5+esLAI1Vkdf0tQdrlQ/z0VIaIOCDMV8Z+to/RXeW9/4f2 C8fDeheCn5IUkWSc2d5hMIKdIns4zRez+ti1lxVwjMZQset1QQEYiBP+ArJ/Yw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCpN80nvBzGJp; Sat, 6 May 2023 00:29:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3460Ti1K004364; Sat, 6 May 2023 00:29:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3460TiH2004363; Sat, 6 May 2023 00:29:44 GMT (envelope-from git) Date: Sat, 6 May 2023 00:29:44 GMT Message-Id: <202305060029.3460TiH2004363@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: c6062b358862 - stable/13 - authpf: do not sprintf to a null pointer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c6062b3588624371feb24a52c34c8d0674f59f80 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c6062b3588624371feb24a52c34c8d0674f59f80 commit c6062b3588624371feb24a52c34c8d0674f59f80 Author: Ed Maste AuthorDate: 2023-05-03 13:26:42 +0000 Commit: Ed Maste CommitDate: 2023-05-06 00:29:31 +0000 authpf: do not sprintf to a null pointer The fgetln loop will terminate with buf = NULL at EOF. Reported by: GCC Reviewed by: kp MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39947 (cherry picked from commit 81f964e2ffb7cd5d30df0a5c3877900cca4fdd07) --- contrib/pf/authpf/authpf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/contrib/pf/authpf/authpf.c b/contrib/pf/authpf/authpf.c index 4032efb27895..5ffa5b9cfe43 100644 --- a/contrib/pf/authpf/authpf.c +++ b/contrib/pf/authpf/authpf.c @@ -566,9 +566,8 @@ allowed_luser(struct passwd *pw) syslog(LOG_INFO, "denied access to %s: not listed in %s", pw->pw_name, PATH_ALLOWFILE); - /* reuse buf */ - sprintf(buf, "%s", "\n\nSorry, you are not allowed to use this facility!\n"); - fputs(buf, stdout); + fputs("\n\nSorry, you are not allowed to use this facility!\n", + stdout); } fflush(stdout); return (0); From nobody Sat May 6 00:59:21 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCq2L17Zrz4B1nQ; Sat, 6 May 2023 00:59:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QCq2L0Sgsz45DN; Sat, 6 May 2023 00:59:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683334762; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7+XMeJ4qTAuovkFK+5aCxpVG89f8H0Q+aWf2pGan+qc=; b=jYm3yCY1LY6lYvGJKj1MEoB4BqIQZEeqhg1fKMTL3mvoCzfGH/tzNUaysIM6xOBTokLGqg ObaM2QuqcrE79AxJVd7lZvIaBf1eqBX0UKARrkYs2C5K/W0uEf/0XHflqCROmjwWdkSiks x5785qra4CV9SlhpWsMNy01m4G3no2V3PTVRgwwpHenuRoa/nF6jzUFwjxC/hzqpUrtdo/ pTly/lfY58QFTmbarHPR/max+h/Q0r3a6JtQuL9W8YK81yHwqWPf23kYpdoItR/gjQh247 zkOnV9a6AX3WDg9TpbWDCN7mOrFDwePGyEKnFyXLRnmJ4U2XeWMD8Pn5hmk5+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683334762; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7+XMeJ4qTAuovkFK+5aCxpVG89f8H0Q+aWf2pGan+qc=; b=nUrE7Ar9M4K/cybsyZQwvzVjKknTt3ZlBg36k9OR4kxJVdwiC6oBT7BzQbbNOo2L9A9x97 itS3HVlhn7GBjGCdVfwB+HyNuRc4XydU1UTvlvocaMTvDBQviNZsyzqIR/rDmD9sLkBNxb TvDmS9km6IwDaVD1llLL1E4hcqB1klp9esyv2n3lNd26U8WibwgWiGixmKyk4l+14cH1gq jd9kGWGsPadg59I7imjVObbnkiPEtblbwp/33dsW2tv8T0GvWGSUFT7zy2ONbeKldh03+U 52umpz9+SbrPRCGTkdHo1gHAboFd+wRXcf48pB81hg0Qdb6asrGZ0dxfUa0QRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683334762; a=rsa-sha256; cv=none; b=aWRHEs4B2AXdf9z4q8v7N+x2szigIAj6susx0JuHxB82Vnyqmy1pnw4j+BH/Bia23ZvS94 8FeF2doPyO1HnkdF6TAuFIY4QUkvO7kvY+cDS2K7Abbboi4+YKVJCuZUlDx4puVeKK6AsK xr2qFhA10ZPjy006ddUWG0urcXCgM8KBZYdnp/vIWsfkoMT0bmpw7MgVvB4nkpuyMTCvUo Sk4quLXwbb73yPN/gLLBTjy8tx2hW+Vh3pw41c8uK8YGymAMlWPACn8RHtdzec/T+eKWYA kxLiBUf/OZtnkZcNF746SoEk0GIdCTvVo8Z/poGZakSiPuu+WVeeGyuuteAUsw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCq2K6YbGzGNf; Sat, 6 May 2023 00:59:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3460xLFD052702; Sat, 6 May 2023 00:59:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3460xLLw052701; Sat, 6 May 2023 00:59:21 GMT (envelope-from git) Date: Sat, 6 May 2023 00:59:21 GMT Message-Id: <202305060059.3460xLLw052701@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Jason A. Harmening" Subject: git: 651e037e2720 - stable/13 - Intel DMAR: remove parsing of 6-level paging capability List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jah X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 651e037e27207f94c50a3a07d78493c51065da64 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=651e037e27207f94c50a3a07d78493c51065da64 commit 651e037e27207f94c50a3a07d78493c51065da64 Author: Jason A. Harmening AuthorDate: 2023-05-01 16:22:39 +0000 Commit: Jason A. Harmening CommitDate: 2023-05-06 00:58:41 +0000 Intel DMAR: remove parsing of 6-level paging capability Early versions of the VT-d spec mentioned 6-level paging support as a possible value for the SAGAW capability, but later versions removed it and SAGAW=0x10 is currently listed as a reserved value. The 6-level (agaw=64) entry in sagaw_bits is furthermore problematic with clang15 because the attempted comparison against 1ULL << 64 in dmar_maxaddr2mgaw() causes the compiler to elide the last iteration of the initial loop, which bypasses the subsequent logic to find the greatest HW-supported address width. This results in 5-level paging always being selected regardless of whether the hardware supports it, which can result address translation failure due to invalid context- entry programming. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D39896 (cherry picked from commit 6f378116e9bf982b8246d033d81cb64d52b24462) --- sys/x86/iommu/intel_utils.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sys/x86/iommu/intel_utils.c b/sys/x86/iommu/intel_utils.c index 152c7cac3a7d..315ffc8d4160 100644 --- a/sys/x86/iommu/intel_utils.c +++ b/sys/x86/iommu/intel_utils.c @@ -99,9 +99,14 @@ static const struct sagaw_bits_tag { {.agaw = 48, .cap = DMAR_CAP_SAGAW_4LVL, .awlvl = DMAR_CTX2_AW_4LVL, .pglvl = 4}, {.agaw = 57, .cap = DMAR_CAP_SAGAW_5LVL, .awlvl = DMAR_CTX2_AW_5LVL, - .pglvl = 5}, - {.agaw = 64, .cap = DMAR_CAP_SAGAW_6LVL, .awlvl = DMAR_CTX2_AW_6LVL, - .pglvl = 6} + .pglvl = 5} + /* + * 6-level paging (DMAR_CAP_SAGAW_6LVL) is not supported on any + * current VT-d hardware and its SAGAW field value is listed as + * reserved in the VT-d spec. If support is added in the future, + * this structure and the logic in dmar_maxaddr2mgaw() will need + * to change to avoid attempted comparison against 1ULL << 64. + */ }; bool From nobody Sat May 6 01:13:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QCqM03R9Cz4B2hr; Sat, 6 May 2023 01:13: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 4QCqM02yzlz46pm; Sat, 6 May 2023 01:13:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683335628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RoU0voeTlgkbr7xISTjvxTJRV517U6oDdddmnfBtsYI=; b=yEFp7uJ6txg9MxJzWgeIf4XV0C2puXkIDQyDxG2vqI2gw3piSGV6gXv5IIucXE/mhZ1VOy eepCvdXB1om49bHQTRr0u06f/EVNeIWm9Mv0tMlm7Dve6dXnA6+xvRyVnQBtA+5pFzv6oL gnMbJWH0e9dQXr+UmQt9r11vyXPK932OZ1/EHys5j0gVXriOlO6xtQ7gOsI62aaOlN5yjs HeM3KtuD+0DCICsyh7UzNzjl1zA+A42cj3Qn0lMOLshtwBIKk+PcJF3JiLS0HK/moGvYMj bXZjWWM1WgiOtsONbiKuPkLh3KNH6o08xeeXIvPNNOG5B1aMlpNQOuWMWgZuEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683335628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RoU0voeTlgkbr7xISTjvxTJRV517U6oDdddmnfBtsYI=; b=bwl16izwx4OrhY3Vyk/ZBRvQS1YIhDT+OAgYq6fpA1R3sCwYhxMHnXjMLzZlIPaK19Dk5G vnWp3eXQHe7piYIcdAzI9XEiNNzKJ/OrMCivHJyWTXXhbBenm/OZkIUeISbjYLWJqBD+Eu V12mYtT865jXiWPgYYWyf8zOY2SvTgWd5SOSVjaMuzuxfOvd/hCaWvEiht62grWCFLH5ie SrCn4wddS1jZMcG1GGDqOKW9PbGeUghPRbX60jHobW7USqk0EkZD9GHB5sLj8PfyMQK7km lbFxMERlg/YeIJvMzaQwASwRjJsl1Dh+qg1xfNgpuBRDTKvvdbqc/9XCVmveMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683335628; a=rsa-sha256; cv=none; b=RhZ2VhQouOLNkyeK0OJ0/gpUJlahPnnfyfLhf0up6ri2gcWEfiJagYkBiOHjW/XoZ2L5Ox ybSAngFMpnP7ZWWC2aoY6KfheLvGLIqaMTpOaT1cQH2ZH4zRCNzhcvMjZfzhOFd1uha7jL XbCSBdCVVTEzvm0mfqo4up1NTx8PRRbyDNIa0vjXY6UmIVdgzKG4grkFIr+AxCSJ4iEcSt o2KQo2K/m/ZR6XMCOBF++ak1sGlFft9wJlS0xxsqLeTRxUM/HCMIJC2eY0K2wfTxJ8suWU e9Co3OApgiGfK8vTR94HZGYgnbSayNKDRm5r5+kyjXIqQk97WMhhV/hzJ4tx6Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QCqM023Z5zH9x; Sat, 6 May 2023 01:13:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3461DmMZ085283; Sat, 6 May 2023 01:13:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3461DmcL085282; Sat, 6 May 2023 01:13:48 GMT (envelope-from git) Date: Sat, 6 May 2023 01:13:48 GMT Message-Id: <202305060113.3461DmcL085282@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Jason A. Harmening" Subject: git: 95e02a419224 - stable/12 - Intel DMAR: remove parsing of 6-level paging capability List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jah X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 95e02a41922437f0d616f9b61dfff5605ad7c601 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=95e02a41922437f0d616f9b61dfff5605ad7c601 commit 95e02a41922437f0d616f9b61dfff5605ad7c601 Author: Jason A. Harmening AuthorDate: 2023-05-01 16:22:39 +0000 Commit: Jason A. Harmening CommitDate: 2023-05-06 01:00:34 +0000 Intel DMAR: remove parsing of 6-level paging capability Early versions of the VT-d spec mentioned 6-level paging support as a possible value for the SAGAW capability, but later versions removed it and SAGAW=0x10 is currently listed as a reserved value. The 6-level (agaw=64) entry in sagaw_bits is furthermore problematic with clang15 because the attempted comparison against 1ULL << 64 in dmar_maxaddr2mgaw() causes the compiler to elide the last iteration of the initial loop, which bypasses the subsequent logic to find the greatest HW-supported address width. This results in 5-level paging always being selected regardless of whether the hardware supports it, which can result address translation failure due to invalid context- entry programming. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D39896 (cherry picked from commit 6f378116e9bf982b8246d033d81cb64d52b24462) --- sys/x86/iommu/intel_utils.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sys/x86/iommu/intel_utils.c b/sys/x86/iommu/intel_utils.c index dd46c4290527..9e9c59d98fd0 100644 --- a/sys/x86/iommu/intel_utils.c +++ b/sys/x86/iommu/intel_utils.c @@ -100,9 +100,14 @@ static const struct sagaw_bits_tag { {.agaw = 48, .cap = DMAR_CAP_SAGAW_4LVL, .awlvl = DMAR_CTX2_AW_4LVL, .pglvl = 4}, {.agaw = 57, .cap = DMAR_CAP_SAGAW_5LVL, .awlvl = DMAR_CTX2_AW_5LVL, - .pglvl = 5}, - {.agaw = 64, .cap = DMAR_CAP_SAGAW_6LVL, .awlvl = DMAR_CTX2_AW_6LVL, - .pglvl = 6} + .pglvl = 5} + /* + * 6-level paging (DMAR_CAP_SAGAW_6LVL) is not supported on any + * current VT-d hardware and its SAGAW field value is listed as + * reserved in the VT-d spec. If support is added in the future, + * this structure and the logic in dmar_maxaddr2mgaw() will need + * to change to avoid attempted comparison against 1ULL << 64. + */ }; bool From nobody Sat May 6 09:04:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QD1pb15rZz49KT5; Sat, 6 May 2023 09:04:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QD1pb0Jnbz3nvX; Sat, 6 May 2023 09:04:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683363895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5oox4J7YOPGsDYTGByXjCZqgH3WcH2c28M2lGVK88no=; b=ZBjrE5DG/UAbmVwbfQqp5BGdk8agnJ/63mU06IwEkum6c2UA8zQdAYHR5GbhALqgCxnV7T iCOK0pY14Tu2M9Ux+wKxYigX71qZ980iWSnWjpz/AOZJiL2WoQpeXP0+z9utbRCB4rNWGj Pv+H9sL9bx1DECxWiH6/Hbg1HF1W6/HIkpsADs59ZeUVu19KYCwWCRAmmDDa5U7tmZeZzn OSd4nR/6YUZbxMsncak//PHP4H8+rRHxhsekRb2ddc0yBUGB1ZJ2dkt1EZbhkCoxRi/uGi qslWgERqdRjZrd25pK5OSoW18RESf5My1dKLYgDcO6nwfmsv2CuNoDTdf/4dtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683363895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5oox4J7YOPGsDYTGByXjCZqgH3WcH2c28M2lGVK88no=; b=lBXnpxp3TrsZ9M9lEvKygFQZvbDs2ELO2EFa8ZSkdDl9WFSXLNQQ6ckKd1g04QXyRI8Q4H YQZPdnT8RYZaNr/0dS9WtWu81RoIC37jHfxGB7V3fV0mwhfH1xIttnz59NaUC6ItufS1JI xnOUHMKD+2Kt25UPmn58npWaIC9yZx+KviSnI6xPIuS3SPH7QW535PPtrrdNhKv+wKHvjZ +kSnpeHQgbGsarpixzhjJus6rXZYH2r7m378/osJufIuJpa7ZyeH4Bj+43+BAuKliawF1+ UkOqeYrC31CDg9iwdQfXb5Zw0Ba5uwlhCwyE28mrf1k7utJGcdIBIh4XVtw4Bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683363895; a=rsa-sha256; cv=none; b=sKdAmrROe+IU9Cw6mrdO1XMlqTn8Ob3mGPglsUj7RMg3fHOlrAsvrMpdXDZkYvVDDOTUor DsJKT7LeHJyPRsPwpOw3s+2PVOWbJkrTnRrYmlqw4AKbSpaw3TCmbDdh68DkP67P1nNZFj mTvp9TiR7B2iVfzrsT6sw+96OrqknCGSN++FGykfiu70ATfDTWuPnGzffDYTkilACns70w y6YOtqCMOLy0KJkoQ38V/TBzUooAn0UnNyUkk12sL9iBTHnvtruluEobd7o0gRTr4MuErJ yLSPthPwJx+J09OUeXevoMlJP2D3ByJ2cjnzr5oRS76b1wScEGrgPL6y8XrYVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QD1pZ6VPvzWW1; Sat, 6 May 2023 09:04:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34694s0o061640; Sat, 6 May 2023 09:04:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34694sc7061639; Sat, 6 May 2023 09:04:54 GMT (envelope-from git) Date: Sat, 6 May 2023 09:04:54 GMT Message-Id: <202305060904.34694sc7061639@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 113f56ba4930 - main - tcp_rack: allow the module to be loaded without TCP_BLACKBOX List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 113f56ba493037c752da15ed20eae18c9103ffa6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=113f56ba493037c752da15ed20eae18c9103ffa6 commit 113f56ba493037c752da15ed20eae18c9103ffa6 Author: Michael Tuexen AuthorDate: 2023-05-06 09:02:50 +0000 Commit: Michael Tuexen CommitDate: 2023-05-06 09:02:50 +0000 tcp_rack: allow the module to be loaded without TCP_BLACKBOX PR: 271091 Reviewed by: cc Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D39860 --- sys/netinet/tcp_log_buf.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet/tcp_log_buf.h b/sys/netinet/tcp_log_buf.h index 4507507e5f63..11c4c25a3727 100644 --- a/sys/netinet/tcp_log_buf.h +++ b/sys/netinet/tcp_log_buf.h @@ -447,6 +447,7 @@ tcp_get_bblog_state(struct tcpcb *tp) static inline void tcp_trace_point(struct tcpcb *tp, int num) { +#ifdef TCP_BLACKBOX if (((tcp_trace_point_config == num) || (tcp_trace_point_config == 0xffffffff)) && (tcp_trace_point_bb_mode != 0) && @@ -461,6 +462,7 @@ tcp_trace_point(struct tcpcb *tp, int num) tcp_trace_point_count = 0; } } +#endif } #define TCP_LOG_BUF_DEFAULT_SESSION_LIMIT 5000 From nobody Sat May 6 09:15:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QD23253Nnz49KtH; Sat, 6 May 2023 09:15: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 4QD2324WG7z3plf; Sat, 6 May 2023 09:15:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683364542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9K9Xj/VpqvY6dXG8FYRINSjjNeB1oEeMngt+iEvZDCM=; b=IkDRYPmSizwQ+pzekNKltIV9446KTWO6OcO32YBZRTGCWtadhO/67Dxs9b3X7yOdZ8P23f Gv58QygQ6n8f58lCytcy3Ru5c/R/eN6v880xuoRuVx5XBfnipMZFxyQmL07OwIQecygCaB N4/j5Fxpkc4PnzVRbYf/uFXfzdPS51Iz2lCwIimMMVbZAQE1uVevf2uOMkN5s90ngD7jp2 He1C96oETxZhvwFvNfBPFiEKCb5SDVzaGWzrz7KMqKmJytx4JFWttsSPEsh79CL3fiZLp7 nzfbKGHu+nwU7wyUI+R8somZ/tkLB+CMnnVHyg47JBDrcG2GFSM3QkMEMl8dUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683364542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9K9Xj/VpqvY6dXG8FYRINSjjNeB1oEeMngt+iEvZDCM=; b=veknetvTM/6hezrN7NtgSbZ8dapZMolHn0Uw7W52p3MzFyrj06oqONBuJ1A8I3O6JpzIRv AJ8kxlPGcQme0IhQqysLqkbQoK3c7LyEuqr+5TJBfbK9fwl8GkM4n9fL71fRpQFkFZHdAo t5s7++Hiaufptf809n3M2/y5Rg2cnalj8AOjIIA3+UcQ6nn1IAADDGWbRHPJO0f+Q71ckU QOq7iPbvttxDGyWEBnOVIyIuj5RGawTjAvFhfuok2cUpZp6rY37qCKmJRykeqRom5tPoHb xuCujJo01/CAi13t4XYR14iPXJnJYBy9PeeCiCpeO+6XKj+1fhc1E/DIHQA3zQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683364542; a=rsa-sha256; cv=none; b=h0yn2udvTrtWU/Thtq4GvonagAPG70X7ABWtkPBUHXUcZhIJSY57wFvCCz7zl0g3rrzRCN tGyMa4xoqj3gzjedF+iqcyl46rdxEZQLHo5UKdTaO7Cg+o90p7a37N1YzRSKEgQfNSm1Ag s7QOd6HpTy+YLiD1/4TzEhPztb5POdHrJI0BRobDYcwgchwxLep5f/KMU4aDr3EmxhKTw0 l7FbmDJSn5Sj/jtZwwffV6/e6rL9F7RCKXzH2L919SEzs2tNDIFd3hb2iAWU/GTPFF+mDg XCVm/m8Nvlek7W4jCEx/g4LSrb2JRu9ALOYb9tiRY/X7yRd9G8eFtSM1LrdN1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QD2323Zd5zWn8; Sat, 6 May 2023 09:15:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3469FgSv078028; Sat, 6 May 2023 09:15:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3469FgOo078027; Sat, 6 May 2023 09:15:42 GMT (envelope-from git) Date: Sat, 6 May 2023 09:15:42 GMT Message-Id: <202305060915.3469FgOo078027@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: c2399dd2e227 - main - tcp: improve BBLoging for PRUs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c2399dd2e2273df296b58781a6a3690d7b8f3715 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=c2399dd2e2273df296b58781a6a3690d7b8f3715 commit c2399dd2e2273df296b58781a6a3690d7b8f3715 Author: Michael Tuexen AuthorDate: 2023-05-06 09:12:06 +0000 Commit: Michael Tuexen CommitDate: 2023-05-06 09:12:06 +0000 tcp: improve BBLoging for PRUs Log all errors for PRUs, except when INP_DROPPED is set. In that case, don't log it. Reviewed by: glebius, rrs Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D39591 --- sys/netinet/tcp_usrreq.c | 255 +++++++++++++++++++++++++++-------------------- 1 file changed, 145 insertions(+), 110 deletions(-) diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index d23dd9f97222..a9aee98f1332 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -136,9 +136,7 @@ tcp_bblog_pru(struct tcpcb *tp, uint32_t pru, int error) { struct tcp_log_buffer *lgb; - if (tp == NULL) { - return; - } + KASSERT(tp != NULL, ("tcp_bblog_pru: tp == NULL")); INP_WLOCK_ASSERT(tptoinpcb(tp)); if (tcp_bblogging_on(tp)) { lgb = tcp_log_event(tp, NULL, NULL, NULL, TCP_LOG_PRU, error, @@ -232,9 +230,18 @@ tcp_usr_bind(struct socket *so, struct sockaddr *nam, struct thread *td) { int error = 0; struct inpcb *inp; - struct tcpcb *tp = NULL; + struct tcpcb *tp; struct sockaddr_in *sinp; + inp = sotoinpcb(so); + KASSERT(inp != NULL, ("tcp_usr_bind: inp == NULL")); + INP_WLOCK(inp); + if (inp->inp_flags & INP_DROPPED) { + INP_WUNLOCK(inp); + return (EINVAL); + } + tp = intotcpcb(inp); + sinp = (struct sockaddr_in *)nam; if (nam->sa_family != AF_INET) { /* @@ -242,28 +249,24 @@ tcp_usr_bind(struct socket *so, struct sockaddr *nam, struct thread *td) */ if (nam->sa_family != AF_UNSPEC || nam->sa_len < offsetof(struct sockaddr_in, sin_zero) || - sinp->sin_addr.s_addr != INADDR_ANY) - return (EAFNOSUPPORT); + sinp->sin_addr.s_addr != INADDR_ANY) { + error = EAFNOSUPPORT; + goto out; + } nam->sa_family = AF_INET; } - if (nam->sa_len != sizeof(*sinp)) - return (EINVAL); - + if (nam->sa_len != sizeof(*sinp)) { + error = EINVAL; + goto out; + } /* * Must check for multicast addresses and disallow binding * to them. */ - if (IN_MULTICAST(ntohl(sinp->sin_addr.s_addr))) - return (EAFNOSUPPORT); - - inp = sotoinpcb(so); - KASSERT(inp != NULL, ("tcp_usr_bind: inp == NULL")); - INP_WLOCK(inp); - if (inp->inp_flags & INP_DROPPED) { - error = EINVAL; + if (IN_MULTICAST(ntohl(sinp->sin_addr.s_addr))) { + error = EAFNOSUPPORT; goto out; } - tp = intotcpcb(inp); INP_HASH_WLOCK(&V_tcbinfo); error = in_pcbbind(inp, sinp, td->td_ucred); INP_HASH_WUNLOCK(&V_tcbinfo); @@ -282,32 +285,39 @@ tcp6_usr_bind(struct socket *so, struct sockaddr *nam, struct thread *td) { int error = 0; struct inpcb *inp; - struct tcpcb *tp = NULL; + struct tcpcb *tp; struct sockaddr_in6 *sin6; u_char vflagsav; - sin6 = (struct sockaddr_in6 *)nam; - if (nam->sa_family != AF_INET6) - return (EAFNOSUPPORT); - if (nam->sa_len != sizeof(*sin6)) + inp = sotoinpcb(so); + KASSERT(inp != NULL, ("tcp6_usr_bind: inp == NULL")); + INP_WLOCK(inp); + if (inp->inp_flags & INP_DROPPED) { + INP_WUNLOCK(inp); return (EINVAL); + } + tp = intotcpcb(inp); + + vflagsav = inp->inp_vflag; + sin6 = (struct sockaddr_in6 *)nam; + if (nam->sa_family != AF_INET6) { + error = EAFNOSUPPORT; + goto out; + } + if (nam->sa_len != sizeof(*sin6)) { + error = EINVAL; + goto out; + } /* * Must check for multicast addresses and disallow binding * to them. */ - if (IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) - return (EAFNOSUPPORT); - - inp = sotoinpcb(so); - KASSERT(inp != NULL, ("tcp6_usr_bind: inp == NULL")); - INP_WLOCK(inp); - vflagsav = inp->inp_vflag; - if (inp->inp_flags & INP_DROPPED) { - error = EINVAL; + if (IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) { + error = EAFNOSUPPORT; goto out; } - tp = intotcpcb(inp); + INP_HASH_WLOCK(&V_tcbinfo); inp->inp_vflag &= ~INP_IPV4; inp->inp_vflag |= INP_IPV6; @@ -353,16 +363,17 @@ tcp_usr_listen(struct socket *so, int backlog, struct thread *td) { int error = 0; struct inpcb *inp; - struct tcpcb *tp = NULL; + struct tcpcb *tp; inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp_usr_listen: inp == NULL")); INP_WLOCK(inp); if (inp->inp_flags & INP_DROPPED) { - error = EINVAL; - goto out; + INP_WUNLOCK(inp); + return (EINVAL); } tp = intotcpcb(inp); + SOCK_LOCK(so); error = solisten_proto_check(so); if (error != 0) { @@ -403,18 +414,20 @@ tcp6_usr_listen(struct socket *so, int backlog, struct thread *td) { int error = 0; struct inpcb *inp; - struct tcpcb *tp = NULL; + struct tcpcb *tp; u_char vflagsav; inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp6_usr_listen: inp == NULL")); INP_WLOCK(inp); if (inp->inp_flags & INP_DROPPED) { - error = EINVAL; - goto out; + INP_WUNLOCK(inp); + return (EINVAL); } - vflagsav = inp->inp_vflag; tp = intotcpcb(inp); + + vflagsav = inp->inp_vflag; + SOCK_LOCK(so); error = solisten_proto_check(so); if (error != 0) { @@ -469,37 +482,44 @@ tcp_usr_connect(struct socket *so, struct sockaddr *nam, struct thread *td) struct epoch_tracker et; int error = 0; struct inpcb *inp; - struct tcpcb *tp = NULL; + struct tcpcb *tp; struct sockaddr_in *sinp; - sinp = (struct sockaddr_in *)nam; - if (nam->sa_family != AF_INET) - return (EAFNOSUPPORT); - if (nam->sa_len != sizeof (*sinp)) - return (EINVAL); - - /* - * Must disallow TCP ``connections'' to multicast addresses. - */ - if (IN_MULTICAST(ntohl(sinp->sin_addr.s_addr))) - return (EAFNOSUPPORT); - if (ntohl(sinp->sin_addr.s_addr) == INADDR_BROADCAST) - return (EACCES); - if ((error = prison_remote_ip4(td->td_ucred, &sinp->sin_addr)) != 0) - return (error); - inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp_usr_connect: inp == NULL")); INP_WLOCK(inp); if (inp->inp_flags & INP_DROPPED) { - error = ECONNREFUSED; + INP_WUNLOCK(inp); + return (ECONNREFUSED); + } + tp = intotcpcb(inp); + + sinp = (struct sockaddr_in *)nam; + if (nam->sa_family != AF_INET) { + error = EAFNOSUPPORT; + goto out; + } + if (nam->sa_len != sizeof (*sinp)) { + error = EINVAL; + goto out; + } + /* + * Must disallow TCP ``connections'' to multicast addresses. + */ + if (IN_MULTICAST(ntohl(sinp->sin_addr.s_addr))) { + error = EAFNOSUPPORT; goto out; } + if (ntohl(sinp->sin_addr.s_addr) == INADDR_BROADCAST) { + error = EACCES; + goto out; + } + if ((error = prison_remote_ip4(td->td_ucred, &sinp->sin_addr)) != 0) + goto out; if (SOLISTENING(so)) { error = EOPNOTSUPP; goto out; } - tp = intotcpcb(inp); NET_EPOCH_ENTER(et); if ((error = tcp_connect(tp, sinp, td)) != 0) goto out_in_epoch; @@ -530,37 +550,43 @@ tcp6_usr_connect(struct socket *so, struct sockaddr *nam, struct thread *td) struct epoch_tracker et; int error = 0; struct inpcb *inp; - struct tcpcb *tp = NULL; + struct tcpcb *tp; struct sockaddr_in6 *sin6; u_int8_t incflagsav; u_char vflagsav; - sin6 = (struct sockaddr_in6 *)nam; - if (nam->sa_family != AF_INET6) - return (EAFNOSUPPORT); - if (nam->sa_len != sizeof (*sin6)) - return (EINVAL); - - /* - * Must disallow TCP ``connections'' to multicast addresses. - */ - if (IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) - return (EAFNOSUPPORT); - inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp6_usr_connect: inp == NULL")); INP_WLOCK(inp); + if (inp->inp_flags & INP_DROPPED) { + INP_WUNLOCK(inp); + return (ECONNREFUSED); + } + tp = intotcpcb(inp); + vflagsav = inp->inp_vflag; incflagsav = inp->inp_inc.inc_flags; - if (inp->inp_flags & INP_DROPPED) { - error = ECONNREFUSED; + + sin6 = (struct sockaddr_in6 *)nam; + if (nam->sa_family != AF_INET6) { + error = EAFNOSUPPORT; + goto out; + } + if (nam->sa_len != sizeof (*sin6)) { + error = EINVAL; + goto out; + } + /* + * Must disallow TCP ``connections'' to multicast addresses. + */ + if (IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) { + error = EAFNOSUPPORT; goto out; } if (SOLISTENING(so)) { error = EINVAL; goto out; } - tp = intotcpcb(inp); #ifdef INET /* * XXXRW: Some confusion: V4/V6 flags relate to binding, and @@ -672,10 +698,12 @@ tcp_usr_disconnect(struct socket *so) KASSERT(inp != NULL, ("tcp_usr_disconnect: inp == NULL")); INP_WLOCK(inp); if (inp->inp_flags & INP_DROPPED) { - error = ECONNRESET; - goto out; + INP_WUNLOCK(inp); + NET_EPOCH_EXIT(et); + return (ECONNRESET); } tp = intotcpcb(inp); + if (tp->t_state == TCPS_TIME_WAIT) goto out; tcp_disconnect(tp); @@ -696,23 +724,24 @@ static int tcp_usr_accept(struct socket *so, struct sockaddr **nam) { int error = 0; - struct inpcb *inp = NULL; - struct tcpcb *tp = NULL; + struct inpcb *inp; + struct tcpcb *tp; struct in_addr addr; in_port_t port = 0; - if (so->so_state & SS_ISDISCONNECTED) - return (ECONNABORTED); - inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp_usr_accept: inp == NULL")); INP_WLOCK(inp); if (inp->inp_flags & INP_DROPPED) { - error = ECONNABORTED; - goto out; + INP_WUNLOCK(inp); + return (ECONNABORTED); } tp = intotcpcb(inp); + if (so->so_state & SS_ISDISCONNECTED) { + error = ECONNABORTED; + goto out; + } /* * We inline in_getpeeraddr and COMMON_END here, so that we can * copy the data of interest and defer the malloc until after we @@ -735,28 +764,30 @@ out: static int tcp6_usr_accept(struct socket *so, struct sockaddr **nam) { - struct inpcb *inp = NULL; + struct inpcb *inp; int error = 0; - struct tcpcb *tp = NULL; + struct tcpcb *tp; struct in_addr addr; struct in6_addr addr6; struct epoch_tracker et; in_port_t port = 0; int v4 = 0; - if (so->so_state & SS_ISDISCONNECTED) - return (ECONNABORTED); - inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp6_usr_accept: inp == NULL")); - NET_EPOCH_ENTER(et); + NET_EPOCH_ENTER(et); /* XXXMT Why is this needed? */ INP_WLOCK(inp); if (inp->inp_flags & INP_DROPPED) { - error = ECONNABORTED; - goto out; + INP_WUNLOCK(inp); + NET_EPOCH_EXIT(et); + return (ECONNABORTED); } tp = intotcpcb(inp); + if (so->so_state & SS_ISDISCONNECTED) { + error = ECONNABORTED; + goto out; + } /* * We inline in6_mapped_peeraddr and COMMON_END here, so that we can * copy the data of interest and defer the malloc until after we @@ -794,7 +825,7 @@ tcp_usr_shutdown(struct socket *so) { int error = 0; struct inpcb *inp; - struct tcpcb *tp = NULL; + struct tcpcb *tp; struct epoch_tracker et; inp = sotoinpcb(so); @@ -805,6 +836,7 @@ tcp_usr_shutdown(struct socket *so) return (ECONNRESET); } tp = intotcpcb(inp); + NET_EPOCH_ENTER(et); socantsendmore(so); tcp_usrclosed(tp); @@ -826,7 +858,7 @@ tcp_usr_rcvd(struct socket *so, int flags) { struct epoch_tracker et; struct inpcb *inp; - struct tcpcb *tp = NULL; + struct tcpcb *tp; int outrv = 0, error = 0; inp = sotoinpcb(so); @@ -837,6 +869,7 @@ tcp_usr_rcvd(struct socket *so, int flags) return (ECONNRESET); } tp = intotcpcb(inp); + NET_EPOCH_ENTER(et); /* * For passively-created TFO connections, don't attempt a window @@ -876,7 +909,7 @@ tcp_usr_send(struct socket *so, int flags, struct mbuf *m, struct epoch_tracker et; int error = 0; struct inpcb *inp; - struct tcpcb *tp = NULL; + struct tcpcb *tp; #ifdef INET #ifdef INET6 struct sockaddr_in sin; @@ -891,15 +924,6 @@ tcp_usr_send(struct socket *so, int flags, struct mbuf *m, u_char vflagsav; bool restoreflags; - if (control != NULL) { - /* TCP doesn't do control messages (rights, creds, etc) */ - if (control->m_len) { - m_freem(control); - return (EINVAL); - } - m_freem(control); /* empty control, just free it */ - } - inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp_usr_send: inp == NULL")); INP_WLOCK(inp); @@ -909,13 +933,23 @@ tcp_usr_send(struct socket *so, int flags, struct mbuf *m, INP_WUNLOCK(inp); return (ECONNRESET); } + tp = intotcpcb(inp); vflagsav = inp->inp_vflag; incflagsav = inp->inp_inc.inc_flags; restoreflags = false; - tp = intotcpcb(inp); NET_EPOCH_ENTER(et); + if (control != NULL) { + /* TCP doesn't do control messages (rights, creds, etc) */ + if (control->m_len > 0) { + m_freem(control); + error = EINVAL; + goto out; + } + m_freem(control); /* empty control, just free it */ + } + if ((flags & PRUS_OOB) != 0 && (error = tcp_pru_options_support(tp, PRUS_OOB)) != 0) goto out; @@ -1222,7 +1256,7 @@ static void tcp_usr_abort(struct socket *so) { struct inpcb *inp; - struct tcpcb *tp = NULL; + struct tcpcb *tp; struct epoch_tracker et; inp = sotoinpcb(so); @@ -1260,7 +1294,7 @@ static void tcp_usr_close(struct socket *so) { struct inpcb *inp; - struct tcpcb *tp = NULL; + struct tcpcb *tp; struct epoch_tracker et; inp = sotoinpcb(so); @@ -1318,16 +1352,17 @@ tcp_usr_rcvoob(struct socket *so, struct mbuf *m, int flags) { int error = 0; struct inpcb *inp; - struct tcpcb *tp = NULL; + struct tcpcb *tp; inp = sotoinpcb(so); KASSERT(inp != NULL, ("tcp_usr_rcvoob: inp == NULL")); INP_WLOCK(inp); if (inp->inp_flags & INP_DROPPED) { - error = ECONNRESET; - goto out; + INP_WUNLOCK(inp); + return (ECONNRESET); } tp = intotcpcb(inp); + error = tcp_pru_options_support(tp, PRUS_OOB); if (error) { goto out; From nobody Sat May 6 09:23:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QD2DQ2LVQz49LQ2; Sat, 6 May 2023 09:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QD2DQ1dCwz3r75; Sat, 6 May 2023 09:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683365030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NqeBFCNnmpIpL6AzKweDnoNiMaoI2dvrkIxl9gybKTI=; b=IW9PegErOpRLC3mAObBcmAsslgKW4qf7l6eq/Cw8pupfIEuIrn/PNtT6BzfZoou5MKKldA +N6QLUSHhIoAZ1/yC7s+VUfUxEYNOnSl/9cpBRZ3OGYFMHGFGKiqrd3hyG9TPk/O9sBoXq mAnO+mnyJFVFYOSIdhWiSNUOicbfZVdfAB7AMkjemxXeFhi8pJOQCcWKMCHMzgahFcYzog yEtBSCNvex1nc42Dy/LoEOLEaX+HcfpmKbqoGM6+NEqKT1vt+VoFI0XFup0O3kFKkE2zWB 2dty9qhMf5A7kjLrgoHTPk0VFw2HD9nzEOTc6I4xnRXkD5G2j8UP4u/b0Uw4+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683365030; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NqeBFCNnmpIpL6AzKweDnoNiMaoI2dvrkIxl9gybKTI=; b=ppe7FshZl20gLIo58AkHL6b5mdn5eLPwPUXCBxkd5Q39YJAp3RSK+B7Zp8aru4N/BYdqAZ KaFZbp+gfoNHxv3b9v7zG4rjJrPGd7a1P1RJWMbLqKPh6xhI2ULgbA57T7wmAGB6kH7ka2 unr9pjT5kb9ZyHXae+ybiHHO8K/caVUbaPIwwB9uMIQ9X8FJDlbmG+6j9guotR+RyyzFNt XgLo0IqlAJhpY8oRXDO6vYQD/KtqJjLE5gy/8n5vy0Caag7nBg1LQLW/gfe/L3qbRceYpL wogDLtWxqlcqSgBYxn8RMvpWxM3WbAK+YduyoRpyCoL7dhtBX3DqaxFGO+6gew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683365030; a=rsa-sha256; cv=none; b=UEvOCEeZw1ludPoyXOns4isDI3qrpsbIHYtkzW2mNcbSN9GTnbgVmcqz3qOc3oj2xyByrc 8l8UgZuT3npGN4sBWPMcbpZYEFLRYr9lKt4vgAdNvwhruKHgI0D4pFf2YCe3hgVuskZ+7k hSWUIZxR/l1ZBDL3SA4VSq9Ifn5aT3LfXdqpAnvk5bwQJEa7e4Bl7k7kdTalmwV75BMA4J 7EPFVQOFh3RVkrs0s/Ibk3kJeREAVfPVFVDX6MgrKU7rb8MUcndhPU+tJuYwyYhOhJOV4I UtsCZKAgReR7yUlr+FvwDWEOrr4IzwZeAQEOwruyX4k+ePJdJR/kei3xGJ5BQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QD2DQ0hDgzWp4; Sat, 6 May 2023 09:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3469NoFs094523; Sat, 6 May 2023 09:23:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3469NnZP094522; Sat, 6 May 2023 09:23:49 GMT (envelope-from git) Date: Sat, 6 May 2023 09:23:49 GMT Message-Id: <202305060923.3469NnZP094522@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: e044a0bce495 - main - bblog: inherit TCP_LOG option from listener List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e044a0bce4953ed9a98af73fa98dd16d04a9c5ed Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e044a0bce4953ed9a98af73fa98dd16d04a9c5ed commit e044a0bce4953ed9a98af73fa98dd16d04a9c5ed Author: Michael Tuexen AuthorDate: 2023-05-06 09:21:16 +0000 Commit: Michael Tuexen CommitDate: 2023-05-06 09:21:16 +0000 bblog: inherit TCP_LOG option from listener When the TCP_LOG option is used to enable logging on a listening socket, inherit this if the listener is not auto selected and does not have a log id set. Reviewed by: cc MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D38436 --- sys/netinet/tcp_syncache.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 54a347c2669e..5fc63d42b21a 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -90,6 +90,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef TCP_BLACKBOX +#include +#endif #ifdef TCP_OFFLOAD #include #endif @@ -1013,6 +1016,20 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m) tod->tod_offload_socket(tod, sc->sc_todctx, so); } +#endif +#ifdef TCP_BLACKBOX + /* + * Inherit the log state from the listening socket, if + * - the log state of the listening socket is not off and + * - the listening socket was not auto selected from all sessions and + * - a log id is not set on the listening socket. + * This avoids inheriting a log state which was automatically set. + */ + if ((tcp_get_bblog_state(sototcpcb(lso)) != TCP_LOG_STATE_OFF) && + ((sototcpcb(lso)->t_flags2 & TF2_LOG_AUTO) == 0) && + (sototcpcb(lso)->t_lib == NULL)) { + tcp_log_state_change(tp, tcp_get_bblog_state(sototcpcb(lso))); + } #endif /* * Copy and activate timers. From nobody Sat May 6 11:24:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QD4w60yv7z49StY; Sat, 6 May 2023 11:24: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 4QD4w60Xf9z441J; Sat, 6 May 2023 11:24:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683372294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WcUJ3L5ZxrFD3pPlMiAT7l5lds0BQS+YfWmFHBy/2K4=; b=VT2DH1WXzJN2gOOZTxUEK5I33oi0eo/mqpZhH3Dt6QTqeRFuO6y+biQmV4wiG5rDyqitrp go8XyHnmc+zbGcsOfi6IL+6yo0Y9tQvVn9ZsM4gExeqUHQVHGIPIQR0/MmrEWKeonL/lhx 0Nb8LoIppPU0ZLcGYbhK+BjPXsLoAbemktUq5YUU004laJd/YHYS24bpUtYjrJAAxPpmPV VmAPRhOYOMzk3wN+wO79J5wkZ8JvCwXy25+haDoXbAdkSVLF8b2J6EoatqVf9q2aEyczuU szpMbrUVaN9Bjlw7ItMAb1OdAJUnfiTjH+6BkywVXaNMMb+Yc24LJ4Jr99w70g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683372294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WcUJ3L5ZxrFD3pPlMiAT7l5lds0BQS+YfWmFHBy/2K4=; b=D1JvOqP7vUNOMHuLrdImSwXBonL1lnh9Gq7tZ4HXErz/+CIRNt9wzENzfZERiAp/bkPNfG qFbHumHLlFT2okE404QAClGXtA+2uSTPmCythF22u3WC0HmB2KWysoAZZ7Ca05BPo3kBN0 mvywjbc0aoj430A6b90xMVjaPnqjpfB7t827JLUH7hdlKBpDuJvwdQMN6D298l6maxwAYS 4GDqJAyuct8WHsLJLx8SlwdaEdCJ6F8Ufyt6VRYIN04tnT4NkObKg9X4UlaSW11KuYhla9 8QNN1n2TMi+ZWWf+ZbugD4MENJS+W/vtdwFFiLqJIWa2PZJMAF1p4zPcRUglSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683372294; a=rsa-sha256; cv=none; b=FEuyMbl4VQdGDGyUwWV0Z1iOFboaEAcNKz/z4AqzKBgb0scF+8T7FEmDsQuS/BCHqJCwW/ 7KtGzJg20KJuM5+Glspeuso/IhBCSVvQlqUgyCk2hbs8YnCb5rPsqfkAX7f0KivPDhV0HZ n9q2iq6wtsglbsMTwLoCrPASEja/YQ9TsFnijv2XJ0y9bBEabou2UnEHvGlV0F0DNGBCbL 2bZkIZwnvyb2wqjaVI32efGHF3/yK+DJAy/wnMv5KlnwZH6IRpUA9/fZloK5uaLPyHUIog rS7GZv0PskSLi6bAFemR9CyHkbaNIf89c3ZCQh63Irg5c24cuPxS0iE5Xt4zgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QD4w56bLkzZgc; Sat, 6 May 2023 11:24:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346BOrlO091252; Sat, 6 May 2023 11:24:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346BOrgS091251; Sat, 6 May 2023 11:24:53 GMT (envelope-from git) Date: Sat, 6 May 2023 11:24:53 GMT Message-Id: <202305061124.346BOrgS091251@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: 7c8e66ed8d9c - main - amd64: convert UP code to dynamically allocated pmap->pm_pcid List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7c8e66ed8d9cbe49a4b8271883f2b2d5fdd37bce Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7c8e66ed8d9cbe49a4b8271883f2b2d5fdd37bce commit 7c8e66ed8d9cbe49a4b8271883f2b2d5fdd37bce Author: Konstantin Belousov AuthorDate: 2023-05-06 11:20:15 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-06 11:24:07 +0000 amd64: convert UP code to dynamically allocated pmap->pm_pcid Reported by: peterj Sponsored by: The FreeBSD Foundation --- sys/amd64/amd64/pmap.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 273c768559e1..6de7f955d624 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -3467,7 +3467,7 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va) if (pmap == PCPU_GET(curpmap) && pmap_pcid_enabled && pmap->pm_ucr3 != PMAP_NO_CR3) { critical_enter(); - pcid = pmap->pm_pcids[0].pm_pcid; + pcid = pmap->pm_pcidp->pm_pcid; if (invpcid_works) { d.pcid = pcid | PMAP_PCID_USER_PT; d.pad = 0; @@ -3482,7 +3482,7 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va) critical_exit(); } } else if (pmap_pcid_enabled) - pmap->pm_pcids[0].pm_gen = 0; + pmap->pm_pcidp->pm_gen = 0; } void @@ -3506,23 +3506,23 @@ pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) pmap->pm_ucr3 != PMAP_NO_CR3) { critical_enter(); if (invpcid_works) { - d.pcid = pmap->pm_pcids[0].pm_pcid | + d.pcid = pmap->pm_pcidp->pm_pcid | PMAP_PCID_USER_PT; d.pad = 0; d.addr = sva; for (; d.addr < eva; d.addr += PAGE_SIZE) invpcid(&d, INVPCID_ADDR); } else { - kcr3 = pmap->pm_cr3 | pmap->pm_pcids[0]. + kcr3 = pmap->pm_cr3 | pmap->pm_pcidp-> pm_pcid | CR3_PCID_SAVE; - ucr3 = pmap->pm_ucr3 | pmap->pm_pcids[0]. + ucr3 = pmap->pm_ucr3 | pmap->pm_pcidp-> pm_pcid | PMAP_PCID_USER_PT | CR3_PCID_SAVE; pmap_pti_pcid_invlrng(ucr3, kcr3, sva, eva); } critical_exit(); } } else if (pmap_pcid_enabled) { - pmap->pm_pcids[0].pm_gen = 0; + pmap->pm_pcidp->pm_gen = 0; } } @@ -3550,7 +3550,7 @@ pmap_invalidate_all(pmap_t pmap) if (pmap_pcid_enabled) { critical_enter(); if (invpcid_works) { - d.pcid = pmap->pm_pcids[0].pm_pcid; + d.pcid = pmap->pm_pcidp->pm_pcid; d.pad = 0; d.addr = 0; invpcid(&d, INVPCID_CTX); @@ -3559,10 +3559,10 @@ pmap_invalidate_all(pmap_t pmap) invpcid(&d, INVPCID_CTX); } } else { - kcr3 = pmap->pm_cr3 | pmap->pm_pcids[0].pm_pcid; + kcr3 = pmap->pm_cr3 | pmap->pm_pcidp->pm_pcid; if (pmap->pm_ucr3 != PMAP_NO_CR3) { - ucr3 = pmap->pm_ucr3 | pmap->pm_pcids[ - 0].pm_pcid | PMAP_PCID_USER_PT; + ucr3 = pmap->pm_ucr3 | pmap->pm_pcidp-> + pm_pcid | PMAP_PCID_USER_PT; pmap_pti_pcid_invalidate(ucr3, kcr3); } else load_cr3(kcr3); @@ -3572,7 +3572,7 @@ pmap_invalidate_all(pmap_t pmap) invltlb(); } } else if (pmap_pcid_enabled) { - pmap->pm_pcids[0].pm_gen = 0; + pmap->pm_pcidp->pm_gen = 0; } } @@ -3591,7 +3591,7 @@ pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, pd_entry_t newpde) if (pmap == kernel_pmap || pmap == PCPU_GET(curpmap)) pmap_update_pde_invalidate(pmap, va, newpde); else - pmap->pm_pcids[0].pm_gen = 0; + pmap->pm_pcidp->pm_gen = 0; } #endif /* !SMP */ From nobody Sat May 6 11:24:54 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QD4w71f6Bz49SbN; Sat, 6 May 2023 11:24:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QD4w71D0qz43rK; Sat, 6 May 2023 11:24:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683372295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gu0WJ9AE79oJ7tpRVOPBXqbOZrm7eW/Ex6YryAYlYGs=; b=yYnucUNBROUOFuLggO0qiqosO4A52/r4iquUoAGkbOMI1Ato5qburWd9pDWLjJbnAUddgN wqYs3reKXM0OtK6nzJ9Ps4A5fT0cK5qLJky9PXSA3s9HHvhKrw6HnPfrQYh5zxtGjpyrZP CxmjVsowFe8WXEpGwtcxJXSL6QBPHlL1wNCI4U7bCls56PJiq4B3Ncpqw/4ZrLxePBqEay ct6SW9sQU/7qg/FKhl+InzDz6p/sB3oCeHVvu4cBvKnm0ZSjy7ju0DBjH4y/ezQ3QaRn4G S57M3VOXpC1Glbbrkf+ERbEW3xy4lXYznHZ2n6bTqtR3I+RlDZ2nbwSZOfvddA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683372295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gu0WJ9AE79oJ7tpRVOPBXqbOZrm7eW/Ex6YryAYlYGs=; b=WoOz11f7mvcPofhpsa9ghywUsIpRUCjyIdohJfXLQJH7apMWjqZgFWt2B6cOrxv5mgfxHE PwmNyir+8h3VUyYSdBQppludWN5rd3yNJJn4IoQrYIFQEfEUbJsCRmrrSunKkz+pRIisOc wBxd+FToDz6Rv7F8lt/XrV8DyetD7mPM47NkH3VBy20d+BT8cs4Xfw2W8p/rYbFQbjAN+F j42pzZdMP4bNrEKBJGOSNdQHHpyqJyb4ZZaWjcbYCbDyBJvF3Yoxwoe9/1NnKAWDEcJgP/ kAiRadJT7z1Jm0alhlLSX/fB1R7GeutPZVhl/TPy1eZRKM/hkQvXZBIspanRPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683372295; a=rsa-sha256; cv=none; b=E27m858q745kMvbos9V4SbvDi6q86wNmRdtiyxh0YIsZA4GkL4DZV56f6pm+rdsKsQ1HDw jy4Ch9vS7QDCQNVSKA1ftWj2xa2HFs7+dF6htjhtlRqybq4/sIg6dHBuNeyWMfgxcZBaGY STZF1DS14dMUmd6Hc1Zp87rZWk/Y7Qhn6xsItQR6Ta96XZzjsJ4KT4Ce8YaYhvcuwiPKLB arNBeUtu2HEyaLeUQIlEsfXy0CHNnVlr6OtbU1l1DSVBNs7zUTE0NnjGLMaJTiUDpw6o1/ zG3vh/XtuvfnKl2KnxDXsl7JP6dpM8n4XD8nbzv0xzP7mkd4QILhR7PaERUC2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QD4w70DkNzZRL; Sat, 6 May 2023 11:24:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346BOs7g091271; Sat, 6 May 2023 11:24:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346BOsZ5091270; Sat, 6 May 2023 11:24:54 GMT (envelope-from git) Date: Sat, 6 May 2023 11:24:54 GMT Message-Id: <202305061124.346BOsZ5091270@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: 3a8c69c1ff56 - main - amd64 MINIMAL config: remove sentence about acpi List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3a8c69c1ff56b8f55a3ca87b1cb2513b5072a150 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3a8c69c1ff56b8f55a3ca87b1cb2513b5072a150 commit 3a8c69c1ff56b8f55a3ca87b1cb2513b5072a150 Author: Konstantin Belousov AuthorDate: 2023-05-06 11:21:13 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-06 11:24:07 +0000 amd64 MINIMAL config: remove sentence about acpi On amd64 ACPI is required to boot, it cannot work as a module, and we do not build the ACPI module for long time. Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/amd64/conf/MINIMAL | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/amd64/conf/MINIMAL b/sys/amd64/conf/MINIMAL index e4d2d0febe94..7a3a6a61df8d 100644 --- a/sys/amd64/conf/MINIMAL +++ b/sys/amd64/conf/MINIMAL @@ -8,8 +8,6 @@ # Exceptions: # o While UFS is buildable as a module, the current module lacks # some features (ACL, GJOURNAL) that GENERIC includes. -# o acpi as a module has been reported flakey and not well tested, so -# is included in the kernel. # o (non-loaded) random is included due to uncertainty... # o Many networking things are included # From nobody Sat May 6 11:24:56 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QD4w845wNz49T3r; Sat, 6 May 2023 11:24: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 4QD4w82C5zz43x7; Sat, 6 May 2023 11:24:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683372296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nVPwj1k8pSNWbGDBh+mVHipazOMfOj/aBh70aazNPxA=; b=yrFg3y6ZryDAfG9QkNGPMUARqkXXkOcodlj7mAMYOzJQuwiufvMc8FVhw2t4R65BiuYrKG JvV0GiaFvxfYDU953CHBhzOO0rYGK6cS+xBFN38Ws+DdUuWQN9/E4cx6dVO3/hH9RVPchg Z/37DXkwGORrHgi3XnLHVx3AxCnjHmSCqtoWDEO9YFBWTWs2MzhemMo01M1bOH867sojho OHB2C3+52Y0v5I/KqN2C3N2uOJg3hLgY6nhFNUXh5P0zCNmvKCE18aCHzefLMUTNlmdVPF V2vMbf437Ep1HrTFz73tlBwlePpNXJUMhWH4WX5kl+cnge2B4f3sPexiF8oSMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683372296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nVPwj1k8pSNWbGDBh+mVHipazOMfOj/aBh70aazNPxA=; b=lCbfW/MLLiAT4JZVjK3qFHwild2swNPBlZQG1Il+T6Jg4PGymY3v2l7/757qdqoowt/T8H CwgPgINv8VYITxauiuEgv+WEvqKouKxl5Nb+up6bbI52EQCFsKQEIFhjGq9nwWtYdScwnx 728TAHT13R1/KpOmeOpjDkUDFu3vDHjR5fBW5TfdtwRrh3v8CveXGFatgfJiL+6x0RdKQc MwxrPAR19YtVu3iVYwV9z2DFbU8z/69KbPura4yT5NsOQMBM2C49l7HLWpzpTzEeKekM5B gL6oFJpHnZIdX8m5pUdFYW1zyjE5MF0rz5FZIXdXPOL6uYQCyQWPDygbWtarMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683372296; a=rsa-sha256; cv=none; b=gFyPHRNJ4HxXTbECLLtaUt6b0meT+t+v/IhXZohTDmM2pRdo0Gvr0tOzyesS7VPAmZ/lGo +JVNdAL/1bngoek7xjAMdegLTB2MIXjQ9lpA6gqHDuGduY4rOQ55WXmacXaPloXh2SYYH7 XBlGme8PG4JWL5/thsKXTcSCJ8K7ZvrRif4AO4zSSqOqgRUy808RWRW0h3BAWIFabSknQD Vh1SwHIsuZQmd5UuCMBRrxBd9JH5+SPKim7Xkcc6oH1PpX1tM3zXQWXf46/9Kg3HXsrsqM uMwQrmav7F+JtEKj+acT40KCY9BfegtEdn/8qQqQH1M4A1FQfbGxtfkltbxtuw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QD4w818hJzZRM; Sat, 6 May 2023 11:24:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346BOutU091290; Sat, 6 May 2023 11:24:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346BOumL091289; Sat, 6 May 2023 11:24:56 GMT (envelope-from git) Date: Sat, 6 May 2023 11:24:56 GMT Message-Id: <202305061124.346BOumL091289@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: 38843fe0f27c - main - amd64: add MINIMALUP config List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 38843fe0f27cb93dc50a3b0d7ba9a958c0581de7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=38843fe0f27cb93dc50a3b0d7ba9a958c0581de7 commit 38843fe0f27cb93dc50a3b0d7ba9a958c0581de7 Author: Konstantin Belousov AuthorDate: 2023-05-06 11:22:58 +0000 Commit: Konstantin Belousov CommitDate: 2023-05-06 11:24:07 +0000 amd64: add MINIMALUP config This is the MINIMAL config with SMP/NUMA options turned off. Useful to ensure that UP configuration still builds, until it is removed finally. Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/amd64/conf/MINIMALUP | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/amd64/conf/MINIMALUP b/sys/amd64/conf/MINIMALUP new file mode 100644 index 000000000000..0dbddbe5b341 --- /dev/null +++ b/sys/amd64/conf/MINIMALUP @@ -0,0 +1,4 @@ +include MINIMAL +ident MINIMALUP +nooptions SMP +nooptions NUMA From nobody Sat May 6 13:01:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QD74F06gDz49ZFN; Sat, 6 May 2023 13:02:05 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [95.217.20.81]) (using TLSv1.3 with cipher TLS_AES_256_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 4QD74C6L0bz4GBS; Sat, 6 May 2023 13:02:03 +0000 (UTC) (envelope-from des@des.no) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of des@des.no designates 95.217.20.81 as permitted sender) smtp.mailfrom=des@des.no; dmarc=none Received: from ltc.des.no (unknown [88.169.161.78]) by smtp.des.no (Postfix) with ESMTPSA id ACAF561A2A; Sat, 6 May 2023 13:01:54 +0000 (UTC) Received: by ltc.des.no (Postfix, from userid 1001) id EC8B570D9B; Sat, 6 May 2023 15:01:53 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 5807f35c541c - main - dd: Fix SIGINT handling. In-Reply-To: (Konstantin Belousov's message of "Fri, 5 May 2023 21:21:36 +0300") References: <202305051245.345CjNLE048275@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (berkeley-unix) Date: Sat, 06 May 2023 15:01:53 +0200 Message-ID: <86a5yhy5oe.fsf@ltc.des.no> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-3.03 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-0.996]; NEURAL_HAM_SHORT(-0.73)[-0.733]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; ASN(0.00)[asn:24940, ipnet:95.217.0.0/16, country:DE]; FREEFALL_USER(0.00)[des]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; DMARC_NA(0.00)[des.no]; RCVD_TLS_LAST(0.00)[] X-Rspamd-Queue-Id: 4QD74C6L0bz4GBS X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N Konstantin Belousov writes: > This does not fix SIGINT handler, it only (significantly) reduces the win= dow > where the issue could occur. Yes, it does. I think you fundamentally misunderstand the intent of the patch. I know there is a tiny race but it's still a vast improvement on the original. > See my latest comment on the review. See my reply. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From nobody Sat May 6 14:42:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QD9JP0bfYz49gsJ; Sat, 6 May 2023 14:42:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QD9JN75Mnz4NM9; Sat, 6 May 2023 14:42:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683384165; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PQKpI432RbKV0My+LqohRLxDQ2Q4vVP1/nA7vOO2laE=; b=DzSGiPc0iXyupkm352SOYNirCmXdlmOtnYRAKXvHFZOOYDRZW/iuH/f95m2wSfBD9ohrql 9mm/vde6q4RIg1/9RmbdXZScLco00IqqGMfYzD+H2crmagdti+3m/8jGDQDkR5dD/lz92r 67Q7RfW/qFmDBkYjmkdr6xYlC3LrTguiYDO4CqS6a07rUmQrhQt0KxMKUzLQ3tjWtpbdE8 PitEU1qyhcEfJSQUeg0S5vLm9IDIss/9oDV7qErVMYl/scB54zyDaS7Z2BeffkOglOG8Nx WtlJRoSm8HG3v+b1nIvHMXx/MXmEMJh3C7Zu3C7iv5j1NqyjqTccrlx+bOI0fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683384165; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PQKpI432RbKV0My+LqohRLxDQ2Q4vVP1/nA7vOO2laE=; b=Zda/eBeFi3dB5xHPpekNcr3YtFHAdBVygwyWZyZ2EF2Sv6CKvPf3o5sZJcfC+ch2HIgqfx /G/sutoBMTZEwuzSNVZeRG2IAP928ePyvP2oGi73ems+l9T1ZCYRyREoTY6ufIgbv5oJhL +fpVJqHW7/egkHVPfCi4Ijt3iFO+cobT+vrD9ooZz1uzBcBWtj3WPOjTPk78Fnsn1B4Dg9 ejcRKlr9fSGVP0qzE4n4hgVRqOn8KxcX17jXCQvSB02wx9CveM+QL8lEZn1xhYcBpUiMRg 7QhYjgAxZ99nZ2DlCvlu5CeT5Z00JiUSgKTg+IPdtg+WF+a/v3U9hZGlb+alWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683384165; a=rsa-sha256; cv=none; b=MKlZoikj+7yfDgg1PGxd96UAv7riS92HFZmX4lGO4xFzs6911jkvhRk2ruTvEP1nOv8kPA KKmP+gCvu3KjAjpATWbDfPG+uw8n+wqfv5dB3XmFjPXeoM2jPE1U07dDv4xjYkkypZ43Ad xbjQ1RQDSUWoiWMZvSLz3ESszVAz+S2UJPEsLdbc09y310w51liD3QZF6xh7Fvvt8KxfO7 QngNIuevyot5Fx48dAVPi4IfDzBSSpmMLfVOXmi4kJZKSaLE2xarcYo7VwuYqwixRN4F3h KwriB1Grwo69RSQ/F4ShG1HSPnjO38qohRqpJTYgOegg0xAg7sKhL5SmyN6dOg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QD9JN6BXMzgJm; Sat, 6 May 2023 14:42:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346EgiLK020056; Sat, 6 May 2023 14:42:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346EgitV020055; Sat, 6 May 2023 14:42:44 GMT (envelope-from git) Date: Sat, 6 May 2023 14:42:44 GMT Message-Id: <202305061442.346EgitV020055@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: 7c067d5b823d - stable/13 - renice: Avoid segfault if -n flag is given without argument. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7c067d5b823d34d22bbaa9e1f1dd16fdb99fbc2d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=7c067d5b823d34d22bbaa9e1f1dd16fdb99fbc2d commit 7c067d5b823d34d22bbaa9e1f1dd16fdb99fbc2d Author: Dag-Erling Smørgrav AuthorDate: 2023-04-17 19:49:13 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-05-06 13:14:01 +0000 renice: Avoid segfault if -n flag is given without argument. Fixes: 65ee0a8495538 MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D39623 (cherry picked from commit b03311cadd3a6f931e176f97b97bd72be3ef96d4) renice: Clean up the tests. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D39629 (cherry picked from commit d59dd30cf19bb6df5635b3c896c7c4262917a9b6) renice: Factor out common code in tests. Furthermore, prefer test -eq (which ignores whitespace) over a strict string equality test when comparing numerical values. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: thj Differential Revision: https://reviews.freebsd.org/D39650 (cherry picked from commit 1bc6dcc287fa80af74768c4e2b2a1d7511ba1729) --- usr.bin/renice/renice.c | 2 +- usr.bin/renice/tests/renice_test.sh | 92 +++++++++++++++++++------------------ 2 files changed, 49 insertions(+), 45 deletions(-) diff --git a/usr.bin/renice/renice.c b/usr.bin/renice/renice.c index 890d7043ebbd..42e93cce240e 100644 --- a/usr.bin/renice/renice.c +++ b/usr.bin/renice/renice.c @@ -94,7 +94,7 @@ main(int argc, char *argv[]) } if (strcmp(*argv, "-n") == 0) { /* may occur only once, prior to priority */ - if (haveprio || incr) + if (haveprio || incr || argc < 2) usage(); incr = true; (void)argc--, argv++; diff --git a/usr.bin/renice/tests/renice_test.sh b/usr.bin/renice/tests/renice_test.sh old mode 100644 new mode 100755 index 323fe44591c8..feb07a6af825 --- a/usr.bin/renice/tests/renice_test.sh +++ b/usr.bin/renice/tests/renice_test.sh @@ -1,28 +1,7 @@ -#!/bin/sh -#- -# Copyright (c) 2022 Klara, Inc. -# All rights reserved. # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. +# Copyright (c) 2022-2023 Klara, Inc. # -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. +# SPDX-License-Identifier: BSD-2-Clause # # Name of user to use for -u tests when running as root. Beware that @@ -33,8 +12,16 @@ _renice() { atf_check -o empty -e ignore -s exit:0 renice "$@" } -# Set a process's nice number to an absolute value +atf_check_nice_value() { + local pid=$1 + local nice=$2 + atf_check test "$(ps -o nice= -p $pid)" -eq "$nice" +} + atf_test_case renice_abs_pid +renice_abs_pid_head() { + atf_set "descr" "Set a process's nice number to an absolute value" +} renice_abs_pid_body() { local pid nice incr sleep 60 & @@ -42,12 +29,14 @@ renice_abs_pid_body() { nice="$(ps -o nice= -p $pid)" incr=3 _renice $((nice+incr)) $pid - atf_check_equal $((nice+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr)) kill $pid } -# Change a process's nice number by a relative value atf_test_case renice_rel_pid +renice_rel_pid_head() { + atf_set "descr" "Change a process's nice number by a relative value" +} renice_rel_pid_body() { local pid nice incr sleep 60 & @@ -57,12 +46,14 @@ renice_rel_pid_body() { _renice -n $incr $pid _renice -p -n $incr $pid _renice -n $incr -p $pid - atf_check_equal $((nice+incr+incr+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr+incr+incr)) kill $pid } -# Set a process group's nice number to an absolute value atf_test_case renice_abs_pgid +renice_abs_pgid_head() { + atf_set "descr" "Set a process group's nice number to an absolute value" +} renice_abs_pgid_body() { local pid pgid nice incr # make sure target runs in a different pgrp than ours @@ -71,12 +62,14 @@ renice_abs_pgid_body() { nice="$(ps -o nice= -p $pid)" incr=3 _renice $((nice+incr)) -g $pgid - atf_check_equal $((nice+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr)) kill $pid } -# Change a process group's nice number by a relative value atf_test_case renice_rel_pgid +renice_rel_pgid_head() { + atf_set "descr" "Change a process group's nice number by a relative value" +} renice_rel_pgid_body() { local pid pgid nice incr # make sure target runs in a different pgrp than ours @@ -86,13 +79,13 @@ renice_rel_pgid_body() { incr=3 _renice -g -n $incr $pgid _renice -n $incr -g $pgid - atf_check_equal $((nice+incr+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr+incr)) kill $pid } -# Set a user's processes' nice numbers to an absolute value atf_test_case renice_abs_user renice_abs_user_head() { + atf_set "descr" "Set a user's processes' nice numbers to an absolute value" atf_set "require.user" "root" } renice_abs_user_body() { @@ -101,13 +94,13 @@ renice_abs_user_body() { nice="$(ps -o nice= -p $pid)" incr=3 _renice $((nice+incr)) -u $TEST_USER - atf_check_equal $((nice+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr)) kill $pid } -# Change a user's processes' nice numbers by a relative value atf_test_case renice_rel_user renice_rel_user_head() { + atf_set "descr" "Change a user's processes' nice numbers by a relative value" atf_set "require.user" "root" } renice_rel_user_body() { @@ -117,12 +110,14 @@ renice_rel_user_body() { incr=3 _renice -u -n $incr $TEST_USER _renice -n $incr -u $TEST_USER - atf_check_equal $((nice+incr+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr+incr)) kill $pid } -# Test various delimiter positions atf_test_case renice_delim +renice_delim_head() { + atf_set "descr" "Test various delimiter positions" +} renice_delim_body() { local pid nice incr sleep 60 & @@ -132,32 +127,40 @@ renice_delim_body() { # without -p : $((incr=incr+1)) _renice -- $((nice+incr)) $pid - atf_check_equal $((nice+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr)) : $((incr=incr+1)) _renice $((nice+incr)) -- $pid - atf_check_equal $((nice+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr)) : $((incr=incr+1)) _renice $((nice+incr)) $pid -- - atf_check_equal $((nice+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr)) # with -p : $((incr=incr+1)) _renice -p -- $((nice+incr)) $pid - atf_check_equal $((nice+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr)) : $((incr=incr+1)) _renice -p $((nice+incr)) -- $pid - atf_check_equal $((nice+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr)) : $((incr=incr+1)) _renice -p $((nice+incr)) $pid -- - atf_check_equal $((nice+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr)) : $((incr=incr+1)) _renice $((nice+incr)) -p -- $pid - atf_check_equal $((nice+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr)) : $((incr=incr+1)) _renice $((nice+incr)) -p $pid -- - atf_check_equal $((nice+incr)) "$(ps -o nice= -p $pid)" + atf_check_nice_value $pid $((nice+incr)) kill $pid } +atf_test_case renice_incr_noarg +renice_incr_noarg_head() { + atf_set "descr" "Do not segfault if -n is given without an argument" +} +renice_incr_noarg_body() { + atf_check -o empty -e ignore -s exit:1 renice -n +} + atf_init_test_cases() { atf_add_test_case renice_abs_pid atf_add_test_case renice_rel_pid @@ -166,4 +169,5 @@ atf_init_test_cases() { atf_add_test_case renice_abs_user atf_add_test_case renice_rel_user atf_add_test_case renice_delim + atf_add_test_case renice_incr_noarg } From nobody Sat May 6 17:49:35 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFRz5dvWz49shK; Sat, 6 May 2023 17: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 4QDFRz5Bbmz3FQ9; Sat, 6 May 2023 17: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=1683395375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EU5leFTqzlIisNuYJIS+//RNpMc+oZS6zEUEXtlknwI=; b=Z7TfPaY42dO1qN56nNUkx6VpOFtJDRzoIM5bzF04HpSZkHOJDCz5E8yOcbedyve6jx7fU+ BgHR3mEwPtYeWXubq2KNF0uymtIxZHmwU3q1C/pwW6WyQAK6pq48q/IfFweYTX1eDTNgVY 4HTG8OLesIkfasp6q78m+kAqrZWGfJxboffM6bb3T1thEcsvJVDdUErxV25fPZ6QBmwXCo PCBO/o5QuxcQe5keeAa2eeLO6FCJh8iJkLdoKP5sGEQrKcprwki+nVW+vA1AJrWpnqh7un uQy2tPas1Bg3bBVFe/3wg1GtUFlSdGhfRSfGIUGNFkh3ZkpakWz4k5ZvyCHoTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EU5leFTqzlIisNuYJIS+//RNpMc+oZS6zEUEXtlknwI=; b=nXADm89oEug7aLUdiekqGRf0FPWaicq1SgVibBvXytgS8cIC5XAQPm8czQXR8YYlcwuRt3 V8R9PRxvLHkhXDNt2wfwcHy3fnHmqdSZOKlNvOwTr9+oFQJsEbEFGQNIJSRiLRFZYGeq7K uP8vv41L+hhPhu17Qo1A1aRezf9ES9LZzltupbKMobuVb0XOdXANJpFxAJJfpeTVhfqc3G CC/RsuO96HN0dIDU1IS9nGWiYSdbQSDxKC1Nn2Uf/oggYPO0NikDakJ0DnUzXU1TbsAKUr 9OKEd7+hQpdBf3YlMekz34qCq5os0RcenYIlrcBTznhIa38nBnBKiJ5BGPKBUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395375; a=rsa-sha256; cv=none; b=bkyDy1hhjXSb0pkHf/hBrbLHpmNBikJzgWYuK+0y2TIikCaE+cjGxwmOq2Y5Cl958zLGKH Jz0ewK+8rNRKxutUHHrXGROng2aD2LobOc9eEpODJFE8PbGtUyuPu9QRuGOhcR5aVbmU85 zXkaqJ7/eGClYEn0Z+wfD08mXVGB7UCPq26zVcqr2zWXVs5hWtkxsPNvpemJzuaQHWUFU/ fVa6gC4kJWV1HdS6v5WNTwD6lqFZXh6f+HPQnnFaamSoqksUECqXNyrqZSg1/I7S8Z4RbO xZHrBMqLpeV5l3REHQ4dsDBpL52tNADrP5ydqnErg7Xx6foarLtak/tge2+hXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFRz4HNQzlk3; Sat, 6 May 2023 17:49:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346HnZY6017753; Sat, 6 May 2023 17:49:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346HnZFO017752; Sat, 6 May 2023 17:49:35 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:35 GMT Message-Id: <202305061749.346HnZFO017752@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: 1be8ef26794d - main - hwpmc: drop vestigial IAP event definitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1be8ef26794dcf93e2f4851474808dc3b34dbcbd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=1be8ef26794dcf93e2f4851474808dc3b34dbcbd commit 1be8ef26794dcf93e2f4851474808dc3b34dbcbd Author: Mitchell Horne AuthorDate: 2023-05-05 21:55:54 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:18 +0000 hwpmc: drop vestigial IAP event definitions These are maintained elsewhere. No functional change. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39900 --- sys/dev/hwpmc/pmc_events.h | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/sys/dev/hwpmc/pmc_events.h b/sys/dev/hwpmc/pmc_events.h index e1b97f5a1948..dd31107de9e7 100644 --- a/sys/dev/hwpmc/pmc_events.h +++ b/sys/dev/hwpmc/pmc_events.h @@ -204,22 +204,6 @@ __PMC_EV_ALIAS("instruction-retired", IAF_INSTR_RETIRED_ANY) \ __PMC_EV_ALIAS("unhalted-core-cycles", IAF_CPU_CLK_UNHALTED_CORE) \ __PMC_EV_ALIAS("unhalted-reference-cycles", IAF_CPU_CLK_UNHALTED_REF) - -#define PMC_EV_IAP_FIRST PMC_EV_IAP_ARCH_BR_INS_RET -#define PMC_EV_IAP_LAST PMC_EV_IAP_EVENT_FDH_40H - -/* - * Map "architectural" event names to event ids. - */ -#define __PMC_EV_ALIAS_INTEL_ARCHITECTURAL() \ -__PMC_EV_ALIAS("branch-instruction-retired", IAP_ARCH_BR_INS_RET) \ -__PMC_EV_ALIAS("branch-misses-retired", IAP_ARCH_BR_MIS_RET) \ -__PMC_EV_ALIAS("instruction-retired", IAP_ARCH_INS_RET) \ -__PMC_EV_ALIAS("llc-misses", IAP_ARCH_LLC_MIS) \ -__PMC_EV_ALIAS("llc-reference", IAP_ARCH_LLC_REF) \ -__PMC_EV_ALIAS("unhalted-reference-cycles", IAP_ARCH_UNH_REF_CYC) \ -__PMC_EV_ALIAS("unhalted-core-cycles", IAP_ARCH_UNH_COR_CYC) - #define __PMC_EV_UCP() \ __PMC_EV(UCP, EVENT_0CH_04H_E) \ __PMC_EV(UCP, EVENT_0CH_04H_F) \ From nobody Sat May 6 17:49:36 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFS111DFz49skW; Sat, 6 May 2023 17:49: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 4QDFS06lrSz3F1s; Sat, 6 May 2023 17:49:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=grPlrCt8QZcHRfz//DccM7wWt9nV0OD4GsxRPoYTns8=; b=khXyydQdz3ZInW++clzjaIUPQeoRdi3sjE7MC3vHdxINRNBcbdn3GeKO/4Z4jJzCkfZbmt v2k0jjSjyXH/6R4xOe/ZLDhD1rxuayrm2KwkOkmocudFHGxHDbYCL7Nue1kaWQzlJu8Khc 20OPLMminmR/uKn78Y00llhoo9+xTYStja6u0Ca27hw2jQScXUes4KUzWmF+zr7as/JoKf o36dts6D7hWK/I44tU8cTbzLKlMUN0OjeXczHxE0CGVYqxWZ5EMSWm2V+2LTqn4WkBaz4g XAqk2cjXm82ku+0AxzSRpcuBFC/aYsfIko1W+t1WzOzrAbuulk5YcGpan3xVGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=grPlrCt8QZcHRfz//DccM7wWt9nV0OD4GsxRPoYTns8=; b=lSULQ+X+IDFEmbMsOb4N95IgvdZLmjcgTatzupXdT+LEvm/8CqmVI/LJyuXDWSaCg/0WlT nHfUz/6D3x2pNwHIrsejv+vDM7uImYL0FijomhEPrM+kSgZENH0K0RmYwz0LGDU9I/xL4r cUS58X9zGzkqRQ7TV9Ivsq8p382U1w+drrxfkj/OzJjBuH3K7AhPEVoDfuHfuOKJ6sDW19 ZZh/zs3na8npnP8DSo2PTmcIQRdXbeJoJX97ceyRNzNatSPw7y0Ly43DZodnyUU8NDE8of S6LQJ809ZdMKOIF8TbbYvNm/Pc0JmsG6B2lxpSivzfR5TytGbenAXtps6F86Kw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395377; a=rsa-sha256; cv=none; b=OEbDgTLn+R62of45rkjA5rwrUxPyODSTc1szm3PFw1BZ4INovECUK3FvL4KCK4aIR1LxHD Y05Q1Iv2tysR6Qynt448XxzoRtUfkQ+1dHbLfeckY58le1yqBuKyVCJQwx5YKfGbojF/KL 2v55affR17PpfoofYFYiaDksmdouJrU/EmF61xuQBLbV87A6effmYYP+vKwQkAmN6ncWFq fL55+LoNgi7//0GNEmyhvWtFQOVaF+v5R8TNUUDM77cXpX/t+/ghvdjXAjLZVvrFuuLlgD 5NASw8drL1mnXI71hbKxM2XH79rA0IN7IBdZO4ET7aLu2t8xv3HUQiFc4Js0ZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFS059S0zmHx; Sat, 6 May 2023 17:49:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346Hnaef017772; Sat, 6 May 2023 17:49:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346Hnahg017771; Sat, 6 May 2023 17:49:36 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:36 GMT Message-Id: <202305061749.346Hnahg017771@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: d71a43902072 - main - hwpmc: remove remaining UCP event definitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d71a439020721a9abea5c353b9e03b5dc29d253e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=d71a439020721a9abea5c353b9e03b5dc29d253e commit d71a439020721a9abea5c353b9e03b5dc29d253e Author: Mitchell Horne AuthorDate: 2023-05-05 21:56:34 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:18 +0000 hwpmc: remove remaining UCP event definitions Although this block has remained in __PMC_EVENTS(), there is no handling of UCP in libpmc/libpmc.c, so it is not possible to select one of these events. It should therefore be impossible to trigger the code removed from ucp_start_pmc(). Note that the GQ_SNOOP_MSF MSR exists only for Nehalem and Westmere architectures, and the related events do not exist for later generations. The Uncore support in hwpmc has severely atrophied in general. We have uncore event definitions in pmu-events, but the kernel support was written against Intel Performance Measurement Architecture version 2, and is disabled for processor generations later than Westmere. Nehalem and Westmere lack uncore event definitions in pmu-events. I'd be surprised if Uncore support is usable on any machine in its current state. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39901 --- sys/dev/hwpmc/hwpmc_uncore.c | 21 --------------------- sys/dev/hwpmc/pmc_events.h | 12 ------------ 2 files changed, 33 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_uncore.c b/sys/dev/hwpmc/hwpmc_uncore.c index 577969b47fb7..56373f383dda 100644 --- a/sys/dev/hwpmc/hwpmc_uncore.c +++ b/sys/dev/hwpmc/hwpmc_uncore.c @@ -667,27 +667,6 @@ ucp_start_pmc(int cpu, int ri) "ucp-start/2 cpu=%d ri=%d evselmsr=0x%x evsel=0x%x", cpu, ri, SELECTSEL(uncore_cputype) + ri, evsel); - /* Event specific configuration. */ - switch (pm->pm_event) { - case PMC_EV_UCP_EVENT_0CH_04H_E: - case PMC_EV_UCP_EVENT_0CH_08H_E: - wrmsr(MSR_GQ_SNOOP_MESF,0x2); - break; - case PMC_EV_UCP_EVENT_0CH_04H_F: - case PMC_EV_UCP_EVENT_0CH_08H_F: - wrmsr(MSR_GQ_SNOOP_MESF,0x8); - break; - case PMC_EV_UCP_EVENT_0CH_04H_M: - case PMC_EV_UCP_EVENT_0CH_08H_M: - wrmsr(MSR_GQ_SNOOP_MESF,0x1); - break; - case PMC_EV_UCP_EVENT_0CH_04H_S: - case PMC_EV_UCP_EVENT_0CH_08H_S: - wrmsr(MSR_GQ_SNOOP_MESF,0x4); - break; - default: - break; - } wrmsr(SELECTSEL(uncore_cputype) + ri, evsel); cc->pc_globalctrl |= (1ULL << ri); diff --git a/sys/dev/hwpmc/pmc_events.h b/sys/dev/hwpmc/pmc_events.h index dd31107de9e7..f0839aa49b5b 100644 --- a/sys/dev/hwpmc/pmc_events.h +++ b/sys/dev/hwpmc/pmc_events.h @@ -204,16 +204,6 @@ __PMC_EV_ALIAS("instruction-retired", IAF_INSTR_RETIRED_ANY) \ __PMC_EV_ALIAS("unhalted-core-cycles", IAF_CPU_CLK_UNHALTED_CORE) \ __PMC_EV_ALIAS("unhalted-reference-cycles", IAF_CPU_CLK_UNHALTED_REF) -#define __PMC_EV_UCP() \ - __PMC_EV(UCP, EVENT_0CH_04H_E) \ - __PMC_EV(UCP, EVENT_0CH_04H_F) \ - __PMC_EV(UCP, EVENT_0CH_04H_M) \ - __PMC_EV(UCP, EVENT_0CH_04H_S) \ - __PMC_EV(UCP, EVENT_0CH_08H_E) \ - __PMC_EV(UCP, EVENT_0CH_08H_F) \ - __PMC_EV(UCP, EVENT_0CH_08H_M) \ - __PMC_EV(UCP, EVENT_0CH_08H_S) \ - /* * ARMv7 Events */ @@ -2477,8 +2467,6 @@ __PMC_EV_ALIAS("unhalted-reference-cycles", IAF_CPU_CLK_UNHALTED_REF) __PMC_EV_K7() \ __PMC_EV_BLOCK(K8, 0x2080) \ __PMC_EV_K8() \ - __PMC_EV_BLOCK(UCP, 0x12080) \ - __PMC_EV_UCP() \ __PMC_EV_BLOCK(PPC7450, 0x13000) \ __PMC_EV_PPC7450() \ __PMC_EV_BLOCK(PPC970, 0x13100) \ From nobody Sat May 6 17:49:37 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFS223SGz49sqd; Sat, 6 May 2023 17:49: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 4QDFS20BFVz3FRK; Sat, 6 May 2023 17:49:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pFF9qCWaxfvW9Q1KNts0TwiUyaqkD8173EStMLrS7GE=; b=JYMsWUWFb7FQ0CccH2lKF50mnHU9vngQf23q0zxoDe7Ol/m2Ex2wnWttVkuw9BaW3JuQCJ tTnRu8NFRVBJYhc0MDLxiG3wjwg5VhdnEyGKZo1OJzKJ7MgnjNPtefevBOZW+b/qVl9ZJG fzs7B3rEQKuh9RPLjrkjpC+n5cvHU54jPJVOO7z3UhcZGrfpY1OtcyWRyEukU+VWrTSEMw LnD2vHMvyUXovFtBI7BfTtEOM7I5zS+HEeU1poPbWdiwrxdtjE3cvWffLcKFA9g3Y7LGmr DMudHIzoVAitWUuFL02F3Q1QJfYmSQWUW/uNCeMXHdzfL4TGVNeF4Wp1HyLvTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pFF9qCWaxfvW9Q1KNts0TwiUyaqkD8173EStMLrS7GE=; b=vvP8Weq/f7N5rTs6FXPwOYNqLfbwkXOY4+sHtKJati/M3y8rNgdtJpQ+uL7x1WFcLoh53N GG5sh0/CupXZDwcxZZ119MIkxSqeaWOVacJVwVa1kcfEklV7u7JP6f37hLalYkuFGwFh0q qagakOOX06Oa6eIVC76h8HiibczF8jtpjGfU4jeeK+pwFd0NzHW1CUbhBZxQXC4FgIh7OX j8uMk23bTxboGrdhegCXBTeTFGyKc6D6yPqtXvbBc0B/C6K2cYEKLpggnZrVN4RAXS7oe9 8uIUl9wjWUuqs5+hY6huTm+HKKVTzcqc7kMhut0O4t7fXsvwUSjWTHZZWBC9Pw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395378; a=rsa-sha256; cv=none; b=TYvEHBRDspyv0H28Q1qJLnCU+Z1MCV3D/5Y+GAN160Q3tfumheupb/Qe+3SUERkZRW65au 5YHz3Z2f4HDtCNuHV3s5yO1mMufMocoQvzeecWEb8hYiA00pgVYV/AJzhIPt6Km9tV5sTc IkjPwExhKOxIZiQvE9iMDzehUj/9/QkV4R9htmiLKPY65CJcvnlb4qci0OpZ6XvRlUUzWB l1mqpsjPZ8MDCa/FBYlsUwStwEli+jRWq5Kg4x/rKWRePq3s2RSIZlJtdZR7Hj5ww7KyR/ 9wn5QNr+N6RMWERHNV92Sj8O+BywLGA+atwKccs330/u4J4/a6rSDKziV9ygCQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFS165BJzlwX; Sat, 6 May 2023 17:49:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346HnbHS017794; Sat, 6 May 2023 17:49:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346HnbC5017793; Sat, 6 May 2023 17:49:37 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:37 GMT Message-Id: <202305061749.346HnbC5017793@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: 6bdf067890ed - main - pmc_events.h: update event list comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6bdf067890ed1d1515ad0dbd105848bb11711210 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=6bdf067890ed1d1515ad0dbd105848bb11711210 commit 6bdf067890ed1d1515ad0dbd105848bb11711210 Author: Mitchell Horne AuthorDate: 2023-05-05 21:56:55 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:18 +0000 pmc_events.h: update event list comment This comment is no longer in sync with the contents of __PMC_EVENTS(). Update to reflect the removal of various Intel event definitions from this list; these event definitions now come from Linux and live in lib/libpmc/pmu-events/. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39902 --- sys/dev/hwpmc/pmc_events.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/hwpmc/pmc_events.h b/sys/dev/hwpmc/pmc_events.h index f0839aa49b5b..f7963d3b0789 100644 --- a/sys/dev/hwpmc/pmc_events.h +++ b/sys/dev/hwpmc/pmc_events.h @@ -2438,10 +2438,10 @@ __PMC_EV_ALIAS("unhalted-reference-cycles", IAF_CPU_CLK_UNHALTED_REF) * 0x2000 0x0080 AMD K7 events * 0x2080 0x0100 AMD K8 events * 0x10000 0x0080 INTEL architectural fixed-function events - * 0x10080 0x0F80 INTEL architectural programmable events - * 0x11000 0x0080 INTEL Pentium 4 events - * 0x11080 0x0080 INTEL Pentium MMX events - * 0x11100 0x0100 INTEL Pentium Pro/P-II/P-III/Pentium-M events + * 0x10080 0x0F80 free (was INTEL architectural programmable events) + * 0x11000 0x0080 free (was INTEL Pentium 4 events) + * 0x11080 0x0080 free (was INTEL Pentium MMX events) + * 0x11100 0x0100 free (was INTEL Pentium Pro/P-II/P-III/Pentium-M events) * 0x11200 0x00FF free (was INTEL XScale events) * 0x11300 0x00FF free (was MIPS 24K events) * 0x11400 0x00FF free (was Octeon events) From nobody Sat May 6 17:49:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFS322s5z49sMx; Sat, 6 May 2023 17:49: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 4QDFS30nJtz3FP9; Sat, 6 May 2023 17:49:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IpAfjKFb8fTieYBLvCev6IN8vvfSljVrHcb6WABKzHs=; b=JzKc8gyYpFXZIwxkJIYEdH+LUIgLfCnRzrbwqbSnXqOJX7uibEpFCwOj+c2jw2RJuKvDMS 0KwETQVFf6r8lvWt+zROJArCJObMs45M/p77cdPLU1siS6cW+R8oeC2wZo+B4u19LPF6Pq m33Dzsb2JKKzmtiFbkA48Cxkg0vEVuC20e7DqPt+VvzHmU5I/O4Bo5qQGq0amdptQhcVi/ cnpcdY8ooCa9TaKREMX2ccB1CHo9X03pcZqx/ZN5u8pqyMFtCHS7lBhrm4mk0MvFxYg3he ybLpvamGSiM5qLcM9Jaz60NgYSpjSHEM1MffkECGfHmHVLoH2OEqDR8c6k2iAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IpAfjKFb8fTieYBLvCev6IN8vvfSljVrHcb6WABKzHs=; b=vvkLeUTXWH+jZYcPv3PX7SkuboG0EUbW3ZXCdPKcVu2VbjEdBKxVN/uhs1DjPOT2PvKG0w +AWAJbOdmy/ojNGp0Z1AscHAfPC0n3+e2UOVJry9E4ko8hbKTVH8Yrhz7Tzo5+c5HTbqUd YBnD9FJOcu4qHtFKZiInVcnYpxWRAEC89UnMOQW/i//4g6WmXyJe1PwyGorpPZuR693pnR fAZ4E/IwvwcpH/O1BINwpB+WtkK0wkQMlMay9Z2YZrefNlCfLrxcNhICPnVkf/veLw6WAb x5zIM/lIBqAxeyi1AeZ8hOStW7ORFr0r+3WFZNmf5SEhZe1ql1t7uMfakpxT7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395379; a=rsa-sha256; cv=none; b=bf+t53jLamoLoFBs4I/nrzmddYab2OzqvWhWo47Q5W2tKen51TsHa/7wlVHHBpL0hx0wsU kt62rYuKcnjP8gZr+7TQB6aTur+Nb7esQC9WMeaONuSb4mFg6leZ9MqQ8A10vMPBYhc/I8 P9BmAQsu8cJflGnxaozInSzKNWoLOFk3SAYh/f3dJ9Q9/zd5zLga8SN4zPqRJxhkRRQfqU qbnkguMnkmkLSRRd5PsNad3SMqBjeZ0Vr6adwS2i/iz8qZp2aHMWJ+D5LLGb7IEuAv0HUW eqUu7zrFmTU4M6HYKaLYnDFutw97am5Jc+0NcC/n/EVzfr7eOkLtcm4qoBpcxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFS270xGzlnG; Sat, 6 May 2023 17:49:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346HncXC017825; Sat, 6 May 2023 17:49:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346Hncri017823; Sat, 6 May 2023 17:49:38 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:38 GMT Message-Id: <202305061749.346Hncri017823@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: b6c9d2a3f892 - main - pmc_events.h: event list formatting List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b6c9d2a3f892169d4a6acc92869f9d9db52876ea Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=b6c9d2a3f892169d4a6acc92869f9d9db52876ea commit b6c9d2a3f892169d4a6acc92869f9d9db52876ea Author: Mitchell Horne AuthorDate: 2023-05-05 21:57:14 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:18 +0000 pmc_events.h: event list formatting Improve the legibility of the list. Bump overall indentation, fix some whitespace, and sort the IAF block. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39903 --- sys/dev/hwpmc/pmc_events.h | 48 +++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/sys/dev/hwpmc/pmc_events.h b/sys/dev/hwpmc/pmc_events.h index f7963d3b0789..5ab87d1be360 100644 --- a/sys/dev/hwpmc/pmc_events.h +++ b/sys/dev/hwpmc/pmc_events.h @@ -2458,30 +2458,30 @@ __PMC_EV_ALIAS("unhalted-reference-cycles", IAF_CPU_CLK_UNHALTED_REF) * 0x14600 0x0100 ARM CMN-600 events * 0x20000 0x1000 Software events */ -#define __PMC_EVENTS() \ - __PMC_EV_BLOCK(TSC, 0x01000) \ - __PMC_EV_TSC() \ - __PMC_EV_BLOCK(IAF, 0x10000) \ - __PMC_EV_IAF() \ - __PMC_EV_BLOCK(K7, 0x2000) \ - __PMC_EV_K7() \ - __PMC_EV_BLOCK(K8, 0x2080) \ - __PMC_EV_K8() \ - __PMC_EV_BLOCK(PPC7450, 0x13000) \ - __PMC_EV_PPC7450() \ - __PMC_EV_BLOCK(PPC970, 0x13100) \ - __PMC_EV_PPC970() \ - __PMC_EV_BLOCK(E500, 0x13300) \ - __PMC_EV_E500() \ - __PMC_EV_BLOCK(ARMV7, 0x14000) \ - __PMC_EV_ARMV7() \ - __PMC_EV_BLOCK(ARMV8, 0x14100) \ - __PMC_EV_ARMV8() \ - __PMC_EV_BLOCK(DMC620_PMU_CD2, 0x14500) \ - __PMC_EV_DMC620_PMU_CD2() \ - __PMC_EV_BLOCK(DMC620_PMU_C, 0x14520) \ - __PMC_EV_DMC620_PMU_C() \ - __PMC_EV_BLOCK(CMN600_PMU, 0x14600) \ +#define __PMC_EVENTS() \ + __PMC_EV_BLOCK(TSC, 0x01000) \ + __PMC_EV_TSC() \ + __PMC_EV_BLOCK(K7, 0x02000) \ + __PMC_EV_K7() \ + __PMC_EV_BLOCK(K8, 0x02080) \ + __PMC_EV_K8() \ + __PMC_EV_BLOCK(IAF, 0x10000) \ + __PMC_EV_IAF() \ + __PMC_EV_BLOCK(PPC7450, 0x13000) \ + __PMC_EV_PPC7450() \ + __PMC_EV_BLOCK(PPC970, 0x13100) \ + __PMC_EV_PPC970() \ + __PMC_EV_BLOCK(E500, 0x13300) \ + __PMC_EV_E500() \ + __PMC_EV_BLOCK(ARMV7, 0x14000) \ + __PMC_EV_ARMV7() \ + __PMC_EV_BLOCK(ARMV8, 0x14100) \ + __PMC_EV_ARMV8() \ + __PMC_EV_BLOCK(DMC620_PMU_CD2, 0x14500) \ + __PMC_EV_DMC620_PMU_CD2() \ + __PMC_EV_BLOCK(DMC620_PMU_C, 0x14520) \ + __PMC_EV_DMC620_PMU_C() \ + __PMC_EV_BLOCK(CMN600_PMU, 0x14600) \ __PMC_EV_CMN600_PMU() #define PMC_EVENT_FIRST PMC_EV_TSC_TSC From nobody Sat May 6 17:49:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFS42D5Jz49sqj; Sat, 6 May 2023 17:49: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 4QDFS41n1Zz3FjX; Sat, 6 May 2023 17:49:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o2ViLG2XzC9wpRfzpT5jCpzwupRZhPbRm5h358seEAM=; b=fK6Qx8/LQrILNlR1P0oYEbdWVo79/dYz56mihu7H81jrq5vwtwq9afJa0sx/tn9pe2hlys Wk0/HTYU2d1ge3ggAEsBwV6XHdzv0bvpMd/QumMCKz9OWbIbHqptCV8JDHhYp4yhIylUBA ug5AcLk0E4pZgROmVhQv8AXCzfdlqWrvLDLtyyiPuFrmDEhnR4fRyjeb+V3ex1+AEpYXIB +oY6a+qXXI0KxmN9SSlijQvwqzXOCjADyEKWB8H5MAHXGB5/rJqipjRh2rHoLzyL8Tagxi cX1JjsVwuPAtRQ78u1doo8Rbtr0yr014j1RxRsWZm2QyHgae2Ey4/iKmDeW3cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o2ViLG2XzC9wpRfzpT5jCpzwupRZhPbRm5h358seEAM=; b=B+Ku4I2cQMS9ihZgLDfeJcvjB1PGRZt5kysqwkCY3zHbJ7yCXTCfDdCP40i9c71FkfBE3F OwGcN2+dPItONfcTWh9JiFGaFeGQbZjZ8vTFnVoH7+bnzeQOt/CE+psF/rKFlxLniMtz1l K2I3tfjk2443O7S9IucG17jmFB3Bj28PnqET0+rRFJhGcvEiDuNeSkKBHWbh/WbFdTAJDd KqIBWkIQu75cc0EWpisEldFdgNWDpfUCD82KnaX4pefalPM0ZOCTOet+sI79dqZhD6ScDp iZfJQ7s1doYxFdtolJWrCLTb9T5jzzMWQLAjj/YpGDem6fCToIVTPiDaiAsE0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395380; a=rsa-sha256; cv=none; b=Uw2axOIBsFPZJfyXRm5UCz520Fjdof8F38CSC2WGxaq8XftOToZpt4Bkyy3PEWFDgaPeUJ S3XXcaooKJcE6so6SzyOozxmQ7cl+Jlo2j9w8kb8dN2g+Kq8DAONR8nM1u4kqgroIhHqHD pdaJfMx0OxODaVnEXqRiF9a+PXLy0AVYSiNp8MRPnQA24lBidVD+OX9XsgTHrNA4T6AO+1 tv3fTDTTW8kBSNOUCnEORJdRHXpetZbZGLCjUAl08BZVRbsSp7hy4x/2DbRwSq6Y221puv QA42Axae2CBjFRN5nAXDI//OnyL9i+ngLKYt+a+XO4z05eQzUxDnaWe4iI+M1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFS40psMzmHy; Sat, 6 May 2023 17:49:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346Hneea017844; Sat, 6 May 2023 17:49:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346Hne2d017843; Sat, 6 May 2023 17:49:40 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:40 GMT Message-Id: <202305061749.346Hne2d017843@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: 8bd4459560f3 - main - pmccontrol: drop Pentium 4 special case List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8bd4459560f39bdbccba76a21539136a7a44b9d7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=8bd4459560f39bdbccba76a21539136a7a44b9d7 commit 8bd4459560f39bdbccba76a21539136a7a44b9d7 Author: Mitchell Horne AuthorDate: 2023-05-05 21:57:23 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:18 +0000 pmccontrol: drop Pentium 4 special case This is dead code; we no longer support Pentium hardware in libpmc or hwpmc. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation --- usr.sbin/pmccontrol/pmccontrol.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/usr.sbin/pmccontrol/pmccontrol.c b/usr.sbin/pmccontrol/pmccontrol.c index 1130c2c07b20..c1a1040ecfbe 100644 --- a/usr.sbin/pmccontrol/pmccontrol.c +++ b/usr.sbin/pmccontrol/pmccontrol.c @@ -241,11 +241,6 @@ pmcc_do_list_state(void) ncpu = pc->pm_ncpu; for (c = cpu = 0; cpu < ncpu; cpu++) { -#if defined(__i386__) || defined(__amd64__) - if (pc->pm_cputype == PMC_CPU_INTEL_PIV && - CPU_ISSET(cpu, &logical_cpus_mask)) - continue; /* skip P4-style 'logical' cpus */ -#endif if (pmc_pmcinfo(cpu, &pi) < 0) { if (errno == ENXIO) continue; From nobody Sat May 6 17:49:41 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFS53Swtz49skb; Sat, 6 May 2023 17:49: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 4QDFS52gZdz3FSJ; Sat, 6 May 2023 17:49:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rxKiRcdVVL0AlDxbaYAL5sqLR5CEIojhL8CNEr4QA/4=; b=uZk6mSPvC9+y1aSo1ZpAxXUgO3DrKnxAj2fTzRn57/dN4DA1aJdz2d8lzmaVY81dGIyGFn 0czOuTdGowlUXnoTXNoc8q4BEXbonf6IdD7ROcavnqJyBhjYBSXEqjANlL+IjJ5R5cbhRR H3d36/Ox6Kr/B0VYKG+lR/cPLQts4ez2ak6PSzl+RkgVAIRa/BMXYBjzz07DSO0TZGJBpl wbME9nRMiG3D5CqfebFPx0prh3UgWjMHWiOvLuyFwJ+TKpnxpwCkfSnT/1EXB0+T+EKIpV iLu0NcdwZRAw4VnVq9fATmdjITsyA+ilig2nUpu01JGeRcPrsMiyyfUgzblnGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rxKiRcdVVL0AlDxbaYAL5sqLR5CEIojhL8CNEr4QA/4=; b=tqUkC/dkdmZmr+9vuX13I0k1nGUz6/uEwkWIu8gDgnL9hIR1H4XkEyXC320jRsa4vi58cn wI9NFwN++ZztOdsW0mSysOYe6NHKMPRRM4vmjfdYTCgv6OE4dTG0cAXfTO1EkGVzOGPbef jfKwI+9zbYcQLkupuYPLOFmbeP2y+uiLeekXC1SwwyqXId+U2lgRE787dLG9BBtM7Jnz4U 3/ZNq1jMLKM6pNCCKaQ7BFd1K3TBDaPiqXn8Fcc/0avgYxijfS09TLFA+5QiqGcrMaNbIt BxdutKO0eL3IaijT4YsYDL+wrj4mFJhuIEHJSMvSAAv4+cmx6oJ8mOBTUvcKzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395381; a=rsa-sha256; cv=none; b=KJrTRSN9uh4lJd4eePUcrQf1x6flGEGb0AaMVhs8crARgjYSvncjAhqAPPi1DLH4B8SajU DDkLeV48Z1kmBvWMN0UhaciAkLVGc8gLSaScZWXIEcj3GOb9oGO7M5Zb3h1x0V0RlVmj1q nB1/ldZihMRVAqt6tLuLxQ6ot0dlWJcfcU3ESBKkm+/ua37wuqiIU8wDh0PqxNOE5CgxG7 tTr6Czc7f6kZekcPbk+ivhwlLo9ZfcmoeYOJ+63ooGhYPDRzGCjT6h2IiwMKra7m+xAlaO LB5S/RljIYbi9cg7RTSE7ieQKdgnmLhwbEXCkoPDpPNO/vp0R8oHEjiHv9V02g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFS51l5gzm6Y; Sat, 6 May 2023 17:49:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346HnfVC017871; Sat, 6 May 2023 17:49:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346Hnfn1017870; Sat, 6 May 2023 17:49:41 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:41 GMT Message-Id: <202305061749.346Hnfn1017870@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: ca43b2ae3ef2 - main - hwpmc: trim obsolete Intel CPU and class defs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ca43b2ae3ef2ed86b0df36296464d7830b61b944 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=ca43b2ae3ef2ed86b0df36296464d7830b61b944 commit ca43b2ae3ef2ed86b0df36296464d7830b61b944 Author: Mitchell Horne AuthorDate: 2023-05-05 21:57:38 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:18 +0000 hwpmc: trim obsolete Intel CPU and class defs No functional change. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39904 --- sys/dev/hwpmc/hwpmc_intel.c | 2 +- sys/i386/include/pmc_mdep.h | 4 ---- sys/sys/pmc.h | 10 ---------- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_intel.c b/sys/dev/hwpmc/hwpmc_intel.c index 894f9c07b622..c51e74f34516 100644 --- a/sys/dev/hwpmc/hwpmc_intel.c +++ b/sys/dev/hwpmc/hwpmc_intel.c @@ -99,7 +99,7 @@ pmc_intel_initialize(void) family, model, stepping); switch (cpu_id & 0xF00) { - case 0x600: /* Pentium Pro, Celeron, Pentium II & III */ + case 0x600: switch (model) { case 0xE: cputype = PMC_CPU_INTEL_CORE; diff --git a/sys/i386/include/pmc_mdep.h b/sys/i386/include/pmc_mdep.h index a868ce11c3ca..3d498e006a36 100644 --- a/sys/i386/include/pmc_mdep.h +++ b/sys/i386/include/pmc_mdep.h @@ -45,10 +45,6 @@ struct pmc_mdep; * TSC The timestamp counter * K7 AMD Athlon XP/MP and other 32 bit processors. * K8 AMD Athlon64 and Opteron PMCs in 32 bit mode. - * PIV Intel P4/HTT and P4/EMT64 - * PPRO Intel Pentium Pro, Pentium-II, Pentium-III, Celeron and - * Pentium-M processors - * PENTIUM Intel Pentium MMX. * IAP Intel Core/Core2/Atom programmable PMCs. * IAF Intel fixed-function PMCs. * UCP Intel Uncore programmable PMCs. diff --git a/sys/sys/pmc.h b/sys/sys/pmc.h index 8d25ecad721d..fb99e22ff232 100644 --- a/sys/sys/pmc.h +++ b/sys/sys/pmc.h @@ -86,13 +86,6 @@ extern char pmc_cpuid[PMC_CPUID_LEN]; #define __PMC_CPUS() \ __PMC_CPU(AMD_K7, 0x00, "AMD K7") \ __PMC_CPU(AMD_K8, 0x01, "AMD K8") \ - __PMC_CPU(INTEL_P5, 0x80, "Intel Pentium") \ - __PMC_CPU(INTEL_P6, 0x81, "Intel Pentium Pro") \ - __PMC_CPU(INTEL_CL, 0x82, "Intel Celeron") \ - __PMC_CPU(INTEL_PII, 0x83, "Intel Pentium II") \ - __PMC_CPU(INTEL_PIII, 0x84, "Intel Pentium III") \ - __PMC_CPU(INTEL_PM, 0x85, "Intel Pentium M") \ - __PMC_CPU(INTEL_PIV, 0x86, "Intel Pentium IV") \ __PMC_CPU(INTEL_CORE, 0x87, "Intel Core Solo/Duo") \ __PMC_CPU(INTEL_CORE2, 0x88, "Intel Core2") \ __PMC_CPU(INTEL_CORE2EXTREME, 0x89, "Intel Core2 Extreme") \ @@ -155,9 +148,6 @@ enum pmc_cputype { __PMC_CLASS(TSC, 0x00, "CPU Timestamp counter") \ __PMC_CLASS(K7, 0x01, "AMD K7 performance counters") \ __PMC_CLASS(K8, 0x02, "AMD K8 performance counters") \ - __PMC_CLASS(P5, 0x03, "Intel Pentium counters") \ - __PMC_CLASS(P6, 0x04, "Intel Pentium Pro counters") \ - __PMC_CLASS(P4, 0x05, "Intel Pentium-IV counters") \ __PMC_CLASS(IAF, 0x06, "Intel Core2/Atom, fixed function") \ __PMC_CLASS(IAP, 0x07, "Intel Core...Atom, programmable") \ __PMC_CLASS(UCF, 0x08, "Intel Uncore fixed function") \ From nobody Sat May 6 17:49:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFS64TMvz49ssG; Sat, 6 May 2023 17:49: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 4QDFS63d7Jz3FfW; Sat, 6 May 2023 17:49:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VSi6dpIMQm1qys1MHxnNYw5jGZb4bDFs26u9f2gIIa4=; b=LdtCnfEkbmm/4Uy+7uwRiusrP29vvErF6huOTb9FzhRojck8Gk11/mRS0aIzHEA3VXu5SS QX5h6xarIzADsGe0+uI/YfMhHH/W+8g3jHNvBF1A+IJDosZvbvZplCqo6QRWioe1vd9v6z o5Td+c7ahYe59BPTv2wua44xp2vUYngoS9TllKSY+bJ+KUMx9k7zWdcu7yRl3PgDHXUbuV w9TXK8ujCvYyKGTb2BfvdRWR0sC/xFQS7nOCxKOBwY37lb7I6ICnA/GrDjiuLRC30Bdpkm E8O+9jOK3uteVmEeGNXn4ARmE82wK6ZhhMc7GQs1vp8HPTh+GxPV6IlrSFAdiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VSi6dpIMQm1qys1MHxnNYw5jGZb4bDFs26u9f2gIIa4=; b=s0yWX0bqJ6JtSL3HdHOeep5SwPwBOPpIJ5dCo2ZwKbG6/Sgm7FNlih5vw7qbgFQUEqwW1e +zXlWm/OFZds/6bW9PDe3H+oA6Gn5kC8aL/RDKLe3JIWSqL1ruOnOPSfbciS8tue+gkT0v BNtLCEgCKQwG+ih5pUayXNp+xOycTSrgexmTrQ8Dj10agK1FAnPKVXTLtyUWqxGGNckXjw DGo+n9/vZQI1yl8dWF/8nO0TEHtnR2TDEZSrM8Us95P1VeVJVG+krFUmDSHfhVZl9Q3hQR 6wuSZuRR/J3vWtcshoiK/II6FjXi05d+o40wmu2AGmCqtJZVgXm7AESbzjzCog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395382; a=rsa-sha256; cv=none; b=LV79CRr/aNiGtS6Bk0nOG12Hcvwg1QeBgtKUiMiSOky+sewt/tHWqKvwf8UGnLkuGebUb8 N2Abpho8zy7PLsyNfMdVJZ0KmlHOAvSJgprySCKDCK2jMeJskHcBNN5OWKgMwU5NqLcfmV PryzFAA0MmGOhbvhyk84AfrJaxGNK9IHF7tml+JPEB7T58EBk15bnkXGfCGfLxcFLghhqu xi64Yl3M3OScLafjT6Q2CUw0Z3BHCM5onaRQ5Hq+i+bl7TEPLLDN/mHEDbmSH70HlY247b 5COMrt6g6wqUPY2vmO3PhMr6Fxa2U9Ck6GNQJEjN2/EapVC33jvWkRcBgkJWJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFS62jZTzlwY; Sat, 6 May 2023 17:49:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346Hngvv017890; Sat, 6 May 2023 17:49:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346HngwM017889; Sat, 6 May 2023 17:49:42 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:42 GMT Message-Id: <202305061749.346HngwM017889@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: 3c8b7f49d0eb - main - hwpmc: trim MIPS CPU and class defs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3c8b7f49d0eb0eb448a68939aa7cccbd1f617520 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=3c8b7f49d0eb0eb448a68939aa7cccbd1f617520 commit 3c8b7f49d0eb0eb448a68939aa7cccbd1f617520 Author: Mitchell Horne AuthorDate: 2023-05-05 21:57:44 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:18 +0000 hwpmc: trim MIPS CPU and class defs MIPS is gone, and this is the last remaining bit in the pmc code. Reviewed by: jkoshy, emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39905 --- sys/sys/pmc.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sys/sys/pmc.h b/sys/sys/pmc.h index fb99e22ff232..6a9f614bcbc8 100644 --- a/sys/sys/pmc.h +++ b/sys/sys/pmc.h @@ -112,10 +112,6 @@ extern char pmc_cpuid[PMC_CPUID_LEN]; __PMC_CPU(INTEL_ATOM_GOLDMONT_P, 0x9E, "Intel Atom Goldmont Plus") \ __PMC_CPU(INTEL_ATOM_TREMONT, 0x9F, "Intel Atom Tremont") \ __PMC_CPU(INTEL_XSCALE, 0x100, "Intel XScale") \ - __PMC_CPU(MIPS_24K, 0x200, "MIPS 24K") \ - __PMC_CPU(MIPS_OCTEON, 0x201, "Cavium Octeon") \ - __PMC_CPU(MIPS_74K, 0x202, "MIPS 74K") \ - __PMC_CPU(MIPS_BERI, 0x203, "BERI") \ __PMC_CPU(PPC_7450, 0x300, "PowerPC MPC7450") \ __PMC_CPU(PPC_E500, 0x340, "PowerPC e500 Core") \ __PMC_CPU(PPC_970, 0x380, "IBM PowerPC 970") \ @@ -153,16 +149,12 @@ enum pmc_cputype { __PMC_CLASS(UCF, 0x08, "Intel Uncore fixed function") \ __PMC_CLASS(UCP, 0x09, "Intel Uncore programmable") \ __PMC_CLASS(XSCALE, 0x0A, "Intel XScale counters") \ - __PMC_CLASS(MIPS24K, 0x0B, "MIPS 24K") \ - __PMC_CLASS(OCTEON, 0x0C, "Cavium Octeon") \ __PMC_CLASS(PPC7450, 0x0D, "Motorola MPC7450 class") \ __PMC_CLASS(PPC970, 0x0E, "IBM PowerPC 970 class") \ __PMC_CLASS(SOFT, 0x0F, "Software events") \ __PMC_CLASS(ARMV7, 0x10, "ARMv7") \ __PMC_CLASS(ARMV8, 0x11, "ARMv8") \ - __PMC_CLASS(MIPS74K, 0x12, "MIPS 74K") \ __PMC_CLASS(E500, 0x13, "Freescale e500 class") \ - __PMC_CLASS(BERI, 0x14, "MIPS BERI") \ __PMC_CLASS(POWER8, 0x15, "IBM POWER8 class") \ __PMC_CLASS(DMC620_PMU_CD2, 0x16, "ARM DMC620 Memory Controller PMU CLKDIV2") \ __PMC_CLASS(DMC620_PMU_C, 0x17, "ARM DMC620 Memory Controller PMU CLK") \ From nobody Sat May 6 17:49:43 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFS8095Pz49skf; Sat, 6 May 2023 17:49: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 4QDFS74YfCz3FsT; Sat, 6 May 2023 17:49:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DrBiTKUoDcAjmJFRtKUYyT0sY4v3O1SMgxA2uocYbWc=; b=GrgqU1Y9IFgQgp3w1pwt2Dinp+17HSztB9dojO73qK/MY7mpwB5rCqO4B+sGlWElP008CW DXWJxlRKglOsJ2FEyRm+J+37ygcBP4ifQmsFMWHN/V0tCRqtesggTImY03Vin0rc4Mu14l C7zwtiDWo1OzXcs+dw8ozQ39rvF73b1XmQXETO+uOih+BcwdMEVDAWNdMBOA8gbNU/nOUR qXS2Su5YPZ9iGnOcVJRLmWHk/LphLZQta3dBnwA7dtg3d6F9y8SAJ3ohayp4zb7fvJA49D jU9k+M3PmtIH9SZIDTUKodMKiVUmQwVirbNeMIB8miMf66k3ndvdA5Lc7VRHXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DrBiTKUoDcAjmJFRtKUYyT0sY4v3O1SMgxA2uocYbWc=; b=CbVUCcbuXzPErTY74EsQji717p+FyQ2Nlonlw76WyZdBcqbWaMjrOZJ/H7mae64LMi4CSg p6Fzg0u4Qvht9DH+KhCXeJxSk4NpeDSjD8fsE1c68KAH7dtetM3aYs8yAkCP3ylRuDMQ5r tKka2lbXAwbIm2TaOf13nOwv9kV1coEMndrRUgofku475JjSu7CvBJN3e1R/xG27P/qakq uuMU/Yl8z6BlrCqnmeoiOu/8aDfW7gz/WyzlVGsx6hx7FTxUZ5Ok9N5qblqMRDaIEfKmzo eLufXs0oI6AuHFmtsusjO/dBkUYAXWfLjqysNb+4qNKBoNlMS8Egq2cA4mFV5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395383; a=rsa-sha256; cv=none; b=EPSnq2CR5HM5ohbDcKR6OoVAUNPOUSb3U8JNN+BJVUvsq5A5K03hRDNF53CXS9+mBp8QWc EKyRRhA8jw/XHi8GGbqeOQvBOc2zZ1brk8riCJwmKpse9+K9hHuwieiY2RdOMIZL/tpts+ o0eKX+qkfqv/d0+uW94gRiigndhpzdMdz5KJCJAeTCRX3bQMeFut2poMXgm7TNj5fHjkA8 f933uIcRodLe+Lgel/PlJoj3zFRMKVMn0wUIwCPtb6LQQqmN6bvQrvFT+iL6krcMLI30g0 DagN1AGuxzIeFThTL8xqO9TH5/W1cgmr35AqWirjHeb0wNy7c08fC5Yp4ovF1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFS73SBszlFc; Sat, 6 May 2023 17:49:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346Hnh22017910; Sat, 6 May 2023 17:49:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346HnhDd017909; Sat, 6 May 2023 17:49:43 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:43 GMT Message-Id: <202305061749.346HnhDd017909@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: 7253dc57a0b4 - main - hwpmc: formatting of CPU and class lists List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7253dc57a0b400ff745a43017928304ff8dcf33f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=7253dc57a0b400ff745a43017928304ff8dcf33f commit 7253dc57a0b400ff745a43017928304ff8dcf33f Author: Mitchell Horne AuthorDate: 2023-05-05 21:58:13 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:19 +0000 hwpmc: formatting of CPU and class lists The end result is much more legible in both cases. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39906 --- sys/sys/pmc.h | 126 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 62 insertions(+), 64 deletions(-) diff --git a/sys/sys/pmc.h b/sys/sys/pmc.h index 6a9f614bcbc8..558fe4b20d39 100644 --- a/sys/sys/pmc.h +++ b/sys/sys/pmc.h @@ -82,50 +82,49 @@ extern char pmc_cpuid[PMC_CPUID_LEN]; * * Please keep the pmc(3) manual page in sync with this list. */ - -#define __PMC_CPUS() \ - __PMC_CPU(AMD_K7, 0x00, "AMD K7") \ - __PMC_CPU(AMD_K8, 0x01, "AMD K8") \ - __PMC_CPU(INTEL_CORE, 0x87, "Intel Core Solo/Duo") \ - __PMC_CPU(INTEL_CORE2, 0x88, "Intel Core2") \ - __PMC_CPU(INTEL_CORE2EXTREME, 0x89, "Intel Core2 Extreme") \ - __PMC_CPU(INTEL_ATOM, 0x8A, "Intel Atom") \ - __PMC_CPU(INTEL_COREI7, 0x8B, "Intel Core i7") \ - __PMC_CPU(INTEL_WESTMERE, 0x8C, "Intel Westmere") \ - __PMC_CPU(INTEL_SANDYBRIDGE, 0x8D, "Intel Sandy Bridge") \ - __PMC_CPU(INTEL_IVYBRIDGE, 0x8E, "Intel Ivy Bridge") \ - __PMC_CPU(INTEL_SANDYBRIDGE_XEON, 0x8F, "Intel Sandy Bridge Xeon") \ - __PMC_CPU(INTEL_IVYBRIDGE_XEON, 0x90, "Intel Ivy Bridge Xeon") \ - __PMC_CPU(INTEL_HASWELL, 0x91, "Intel Haswell") \ - __PMC_CPU(INTEL_ATOM_SILVERMONT, 0x92, "Intel Atom Silvermont") \ - __PMC_CPU(INTEL_NEHALEM_EX, 0x93, "Intel Nehalem Xeon 7500") \ - __PMC_CPU(INTEL_WESTMERE_EX, 0x94, "Intel Westmere Xeon E7") \ - __PMC_CPU(INTEL_HASWELL_XEON, 0x95, "Intel Haswell Xeon E5 v3") \ - __PMC_CPU(INTEL_BROADWELL, 0x96, "Intel Broadwell") \ - __PMC_CPU(INTEL_BROADWELL_XEON, 0x97, "Intel Broadwell Xeon") \ - __PMC_CPU(INTEL_SKYLAKE, 0x98, "Intel Skylake") \ - __PMC_CPU(INTEL_SKYLAKE_XEON, 0x99, "Intel Skylake Xeon") \ - __PMC_CPU(INTEL_ATOM_GOLDMONT, 0x9A, "Intel Atom Goldmont") \ - __PMC_CPU(INTEL_ICELAKE, 0x9B, "Intel Icelake") \ - __PMC_CPU(INTEL_ICELAKE_XEON, 0x9C, "Intel Icelake Xeon") \ - __PMC_CPU(INTEL_ALDERLAKE, 0x9D, "Intel Alderlake") \ - __PMC_CPU(INTEL_ATOM_GOLDMONT_P, 0x9E, "Intel Atom Goldmont Plus") \ - __PMC_CPU(INTEL_ATOM_TREMONT, 0x9F, "Intel Atom Tremont") \ - __PMC_CPU(INTEL_XSCALE, 0x100, "Intel XScale") \ - __PMC_CPU(PPC_7450, 0x300, "PowerPC MPC7450") \ - __PMC_CPU(PPC_E500, 0x340, "PowerPC e500 Core") \ - __PMC_CPU(PPC_970, 0x380, "IBM PowerPC 970") \ - __PMC_CPU(PPC_POWER8, 0x390, "IBM POWER8") \ - __PMC_CPU(GENERIC, 0x400, "Generic") \ - __PMC_CPU(ARMV7_CORTEX_A5, 0x500, "ARMv7 Cortex A5") \ - __PMC_CPU(ARMV7_CORTEX_A7, 0x501, "ARMv7 Cortex A7") \ - __PMC_CPU(ARMV7_CORTEX_A8, 0x502, "ARMv7 Cortex A8") \ - __PMC_CPU(ARMV7_CORTEX_A9, 0x503, "ARMv7 Cortex A9") \ - __PMC_CPU(ARMV7_CORTEX_A15, 0x504, "ARMv7 Cortex A15") \ - __PMC_CPU(ARMV7_CORTEX_A17, 0x505, "ARMv7 Cortex A17") \ - __PMC_CPU(ARMV8_CORTEX_A53, 0x600, "ARMv8 Cortex A53") \ - __PMC_CPU(ARMV8_CORTEX_A57, 0x601, "ARMv8 Cortex A57") \ - __PMC_CPU(ARMV8_CORTEX_A76, 0x602, "ARMv8 Cortex A76") +#define __PMC_CPUS() \ + __PMC_CPU(AMD_K7, 0x00, "AMD K7") \ + __PMC_CPU(AMD_K8, 0x01, "AMD K8") \ + __PMC_CPU(INTEL_CORE, 0x87, "Intel Core Solo/Duo") \ + __PMC_CPU(INTEL_CORE2, 0x88, "Intel Core2") \ + __PMC_CPU(INTEL_CORE2EXTREME, 0x89, "Intel Core2 Extreme") \ + __PMC_CPU(INTEL_ATOM, 0x8A, "Intel Atom") \ + __PMC_CPU(INTEL_COREI7, 0x8B, "Intel Core i7") \ + __PMC_CPU(INTEL_WESTMERE, 0x8C, "Intel Westmere") \ + __PMC_CPU(INTEL_SANDYBRIDGE, 0x8D, "Intel Sandy Bridge") \ + __PMC_CPU(INTEL_IVYBRIDGE, 0x8E, "Intel Ivy Bridge") \ + __PMC_CPU(INTEL_SANDYBRIDGE_XEON, 0x8F, "Intel Sandy Bridge Xeon") \ + __PMC_CPU(INTEL_IVYBRIDGE_XEON, 0x90, "Intel Ivy Bridge Xeon") \ + __PMC_CPU(INTEL_HASWELL, 0x91, "Intel Haswell") \ + __PMC_CPU(INTEL_ATOM_SILVERMONT, 0x92, "Intel Atom Silvermont") \ + __PMC_CPU(INTEL_NEHALEM_EX, 0x93, "Intel Nehalem Xeon 7500") \ + __PMC_CPU(INTEL_WESTMERE_EX, 0x94, "Intel Westmere Xeon E7") \ + __PMC_CPU(INTEL_HASWELL_XEON, 0x95, "Intel Haswell Xeon E5 v3") \ + __PMC_CPU(INTEL_BROADWELL, 0x96, "Intel Broadwell") \ + __PMC_CPU(INTEL_BROADWELL_XEON, 0x97, "Intel Broadwell Xeon") \ + __PMC_CPU(INTEL_SKYLAKE, 0x98, "Intel Skylake") \ + __PMC_CPU(INTEL_SKYLAKE_XEON, 0x99, "Intel Skylake Xeon") \ + __PMC_CPU(INTEL_ATOM_GOLDMONT, 0x9A, "Intel Atom Goldmont") \ + __PMC_CPU(INTEL_ICELAKE, 0x9B, "Intel Icelake") \ + __PMC_CPU(INTEL_ICELAKE_XEON, 0x9C, "Intel Icelake Xeon") \ + __PMC_CPU(INTEL_ALDERLAKE, 0x9D, "Intel Alderlake") \ + __PMC_CPU(INTEL_ATOM_GOLDMONT_P, 0x9E, "Intel Atom Goldmont Plus") \ + __PMC_CPU(INTEL_ATOM_TREMONT, 0x9F, "Intel Atom Tremont") \ + __PMC_CPU(INTEL_XSCALE, 0x100, "Intel XScale") \ + __PMC_CPU(PPC_7450, 0x300, "PowerPC MPC7450") \ + __PMC_CPU(PPC_E500, 0x340, "PowerPC e500 Core") \ + __PMC_CPU(PPC_970, 0x380, "IBM PowerPC 970") \ + __PMC_CPU(PPC_POWER8, 0x390, "IBM POWER8") \ + __PMC_CPU(GENERIC, 0x400, "Generic") \ + __PMC_CPU(ARMV7_CORTEX_A5, 0x500, "ARMv7 Cortex A5") \ + __PMC_CPU(ARMV7_CORTEX_A7, 0x501, "ARMv7 Cortex A7") \ + __PMC_CPU(ARMV7_CORTEX_A8, 0x502, "ARMv7 Cortex A8") \ + __PMC_CPU(ARMV7_CORTEX_A9, 0x503, "ARMv7 Cortex A9") \ + __PMC_CPU(ARMV7_CORTEX_A15, 0x504, "ARMv7 Cortex A15") \ + __PMC_CPU(ARMV7_CORTEX_A17, 0x505, "ARMv7 Cortex A17") \ + __PMC_CPU(ARMV8_CORTEX_A53, 0x600, "ARMv8 Cortex A53") \ + __PMC_CPU(ARMV8_CORTEX_A57, 0x601, "ARMv8 Cortex A57") \ + __PMC_CPU(ARMV8_CORTEX_A76, 0x602, "ARMv8 Cortex A76") enum pmc_cputype { #undef __PMC_CPU @@ -139,26 +138,25 @@ enum pmc_cputype { /* * Classes of PMCs */ - -#define __PMC_CLASSES() \ - __PMC_CLASS(TSC, 0x00, "CPU Timestamp counter") \ - __PMC_CLASS(K7, 0x01, "AMD K7 performance counters") \ - __PMC_CLASS(K8, 0x02, "AMD K8 performance counters") \ - __PMC_CLASS(IAF, 0x06, "Intel Core2/Atom, fixed function") \ - __PMC_CLASS(IAP, 0x07, "Intel Core...Atom, programmable") \ - __PMC_CLASS(UCF, 0x08, "Intel Uncore fixed function") \ - __PMC_CLASS(UCP, 0x09, "Intel Uncore programmable") \ - __PMC_CLASS(XSCALE, 0x0A, "Intel XScale counters") \ - __PMC_CLASS(PPC7450, 0x0D, "Motorola MPC7450 class") \ - __PMC_CLASS(PPC970, 0x0E, "IBM PowerPC 970 class") \ - __PMC_CLASS(SOFT, 0x0F, "Software events") \ - __PMC_CLASS(ARMV7, 0x10, "ARMv7") \ - __PMC_CLASS(ARMV8, 0x11, "ARMv8") \ - __PMC_CLASS(E500, 0x13, "Freescale e500 class") \ - __PMC_CLASS(POWER8, 0x15, "IBM POWER8 class") \ - __PMC_CLASS(DMC620_PMU_CD2, 0x16, "ARM DMC620 Memory Controller PMU CLKDIV2") \ - __PMC_CLASS(DMC620_PMU_C, 0x17, "ARM DMC620 Memory Controller PMU CLK") \ - __PMC_CLASS(CMN600_PMU, 0x18, "Arm CoreLink CMN600 Coherent Mesh Network PMU") +#define __PMC_CLASSES() \ + __PMC_CLASS(TSC, 0x00, "CPU Timestamp counter") \ + __PMC_CLASS(K7, 0x01, "AMD K7 performance counters") \ + __PMC_CLASS(K8, 0x02, "AMD K8 performance counters") \ + __PMC_CLASS(IAF, 0x06, "Intel Core2/Atom, fixed function") \ + __PMC_CLASS(IAP, 0x07, "Intel Core...Atom, programmable") \ + __PMC_CLASS(UCF, 0x08, "Intel Uncore fixed function") \ + __PMC_CLASS(UCP, 0x09, "Intel Uncore programmable") \ + __PMC_CLASS(XSCALE, 0x0A, "Intel XScale counters") \ + __PMC_CLASS(PPC7450, 0x0D, "Motorola MPC7450 class") \ + __PMC_CLASS(PPC970, 0x0E, "IBM PowerPC 970 class") \ + __PMC_CLASS(SOFT, 0x0F, "Software events") \ + __PMC_CLASS(ARMV7, 0x10, "ARMv7") \ + __PMC_CLASS(ARMV8, 0x11, "ARMv8") \ + __PMC_CLASS(E500, 0x13, "Freescale e500 class") \ + __PMC_CLASS(POWER8, 0x15, "IBM POWER8 class") \ + __PMC_CLASS(DMC620_PMU_CD2, 0x16, "ARM DMC620 Memory Controller PMU CLKDIV2") \ + __PMC_CLASS(DMC620_PMU_C, 0x17, "ARM DMC620 Memory Controller PMU CLK") \ + __PMC_CLASS(CMN600_PMU, 0x18, "Arm CoreLink CMN600 Coherent Mesh Network PMU") enum pmc_class { #undef __PMC_CLASS From nobody Sat May 6 17:49:44 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFS86Tw3z49sqw; Sat, 6 May 2023 17:49: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 4QDFS85z00z3Fvl; Sat, 6 May 2023 17:49:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4nWuze1QBr54MbGv4N7djvR8lC6DO/UInv3QEeGExsw=; b=cA283xv2VS7ldmna4Q/YvFn5ME1T53AIQdxj0VC2XkJgO8Nj5MMMJs+e5WDdWFykBmKckT pPPP5Ufe2hrEoJrKmYNZGwIucKnOmnfTXaW1qTror5zKTpfekOxlefPM9lFrl5cOx05dvF AE6JNZco/IVdsOTgQH13mN8sY+pf4JhAm+EAiRyNkgpD+3vMD2LMb1UvlatqBmgps6MM0c LRhI92FwpHuapBjWXympOuR1H37pm/8zVOEvvXTN+TYnUTPBT2kHQL1RFsM84R9ZA2OmZU NBefBvUliI8YvAbkZV+bUZVp29RnCdF0XEPFx3PazWD/Wm3H5rFv0eB+gvbM9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4nWuze1QBr54MbGv4N7djvR8lC6DO/UInv3QEeGExsw=; b=RoTYzVfsAcHhv+DLEgkKm1LKn6tzANFF+kclns7w7Q68zmWOfG5a/Z9sqzC/T/VSxZKfGi ZLuLisleuG6Z5KcQqjUr7iiI56gIYocD5waVxbuVvV68ZPHE9Osel4I5Pswwi5hIZBGg21 5VZR60NgO7SoXT5SPF2SOD3Lj9E+O65eZ4SdOScPyO9fCapNB1hG8klfOQZadzU/g+l7As i1fNhrcgcDW1KGSAkN5VsbU7qlgoLrisrTarK4rBCUSX4iZMi5io8ycbS74qc4qqmQXZuZ riiy3+iZ0+HTPBZSjILKJtUt5obzfxJPFZuWsq+m3XS66HqVMDnkPfQ/NY6OKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395384; a=rsa-sha256; cv=none; b=ddw6GheXF/3VOJNdaj7T+BDDHPXR7FbsvA9YnjwX8EYKekQnNK2mpIStBXje6/uFQKGU49 H2iQWYBc7dRJrjXb9b6Rhty4+A1dUwf3uvZqrOCNFgCl9AzSiodoA7CKS+z37GDZ0yiiZS w66ads3APenBOP+yCT647o+Koi1rNHrV8KUKxLbuUGW3/1PlTgZjuAOiVXv+NwNqcsoKu3 4+zJlOP2wlh+eyxOaxgzUEIV0xJNKqsn9El0GHGXWFDOq0zga6J8wuti1NjNrO6y8ri4Ph gNmISD4tphQLURcb68shlZgrN3rWHWMmB2Kpk5fJV7fVkaYA3SZWa3JSUYLD5A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFS84jjTzlgl; Sat, 6 May 2023 17:49:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346Hni79017935; Sat, 6 May 2023 17:49:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346HniGp017934; Sat, 6 May 2023 17:49:44 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:44 GMT Message-Id: <202305061749.346HniGp017934@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: bf66159342e8 - main - pmcstat: augment an error message List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bf66159342e86b1dba02f1c463b47dd96fb09969 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=bf66159342e86b1dba02f1c463b47dd96fb09969 commit bf66159342e86b1dba02f1c463b47dd96fb09969 Author: Mitchell Horne AuthorDate: 2023-05-05 21:58:23 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:19 +0000 pmcstat: augment an error message It also applies to the -t argument. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39907 --- usr.sbin/pmcstat/pmcstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/pmcstat/pmcstat.c b/usr.sbin/pmcstat/pmcstat.c index 81fa4c75d58e..ed3ee70e20ce 100644 --- a/usr.sbin/pmcstat/pmcstat.c +++ b/usr.sbin/pmcstat/pmcstat.c @@ -983,7 +983,7 @@ main(int argc, char **argv) if ((args.pa_required & FLAG_HAS_PROCESS_PMCS) && (args.pa_flags & FLAG_HAS_PROCESS_PMCS) == 0) errx(EX_USAGE, -"ERROR: options -d, -E, and -W require a process mode PMC to be specified." +"ERROR: options -d, -E, -t, and -W require a process mode PMC to be specified." ); /* check for -c cpu with no system mode PMCs or logfile. */ From nobody Sat May 6 17:49:45 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFSB0M1zz49sT6; Sat, 6 May 2023 17:49: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 4QDFS96gflz3FnQ; Sat, 6 May 2023 17:49:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NuE5dMddArkSVw/Uk8sdxHOEBC6ckdco0N6G8FeyrjA=; b=mWX5SErzoTCnNnAs5NJx7n9iiCwPFHiOQhGDKj5o/+QbRosGdAdVucBq7L1EgcHrLv/Eye ULyYHZL+7qMOtKQkwjay9t2RPLCPwUppNmPGAizM6cxRDEBMNZzZq5g/NkvKHQEgX2QEsL zGAIm50rfMMs8BQq1RU5pP1upD1vQc0isPTYorv9wSt80DpR9VhUl2eHVwrngmPdHKlaal TYpuA5ajLssnhL/sGnHJJd4uG9ucX+8AI84Hf1t90taVoieBrzWfIFKU+PSraqB+BbBR2S SirdPhzRkkOWYxhXi4blewjBSayi/5drbWrwYVSWsJhfxMkHn/S6OOuDrc8oyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NuE5dMddArkSVw/Uk8sdxHOEBC6ckdco0N6G8FeyrjA=; b=IUaXAIM6H0LC7WNvASxGGOMEpKAU8v4VTSH0s2eRL9hoOQ5AEsodGv+3epM7jHvezsRlvU axhqoYznQ7SkRBqIhkDeN+u9UBB1u/feVgeh6cHrdoQsXr2VtWcoqSKG6dvBcX0UDZ5x/j QoM50wqSuitdGsd6ELDiP0OhA2YeUyO5MQjNESvVD8tLB6elDUhLVqswb5AYFeW4CSkhkm r7C+aneWgqz+VfegtHWh6Nh3bVzvlIRsWWuxv5ESJ+yX2pR2Pjn5HFABCh72VT9k57JQbg o0ILRSdfd7strb131383MIY90B0YPzQO48R3P8cdcTQwaxWPZwYqpNwID0gjZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395386; a=rsa-sha256; cv=none; b=Hy6KLliVcniXypqocRkj3tAuOsL38qEMiMj37fE1b3JwDUIN/IrBcQR0GNywIe/88Lj448 G8zywEASo6m88/gMo22sRemvpk6FvxYq72MgJ4HddiZ0OzPFBS8W5v3nxJA4Am+KnoNcZQ riOP90WlTtAjuWnWf6bba/d7z88RDW0WlHWhgigzYp8E3g8wUqgY3R4O0AzMn1/cAZodae n9DhZ0CEgJPvG4E34iB9ij9eBL0AiLkETP8aOa2kA9fTK/KCtkGoxL8c4O0wATY2t4JMCf Re6TfEYkQ9kLQRMg3SmxKOfcNm1f3vkjsjmX5ic/rHjphvcDJRx39KcXvnbLXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFS95ltczm8k; Sat, 6 May 2023 17:49:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346HnjqD017956; Sat, 6 May 2023 17:49:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346HnjS9017955; Sat, 6 May 2023 17:49:45 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:45 GMT Message-Id: <202305061749.346HnjS9017955@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: 5387495773e9 - main - hwpmc: simplify arm64 kernel stack unwinding List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5387495773e9e92441b795c0eb8c2a3ecc25708a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=5387495773e9e92441b795c0eb8c2a3ecc25708a commit 5387495773e9e92441b795c0eb8c2a3ecc25708a Author: Mitchell Horne AuthorDate: 2023-05-05 21:58:40 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:19 +0000 hwpmc: simplify arm64 kernel stack unwinding Use the unwind_frame() function, which properly validates the frame pointer and uses ADDR_MAKE_CANONICAL() for the pc, required when PAC is enabled. Reviewed by: andrew, markj, jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39934 --- sys/dev/hwpmc/hwpmc_arm64_md.c | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_arm64_md.c b/sys/dev/hwpmc/hwpmc_arm64_md.c index 59d33ef34d06..dd51f7bd18d5 100644 --- a/sys/dev/hwpmc/hwpmc_arm64_md.c +++ b/sys/dev/hwpmc/hwpmc_arm64_md.c @@ -62,7 +62,8 @@ int pmc_save_kernel_callchain(uintptr_t *cc, int maxsamples, struct trapframe *tf) { - uintptr_t pc, r, stackstart, stackend, fp; + struct unwind_state frame; + uintptr_t stackstart, stackend; struct thread *td; int count; @@ -70,38 +71,26 @@ pmc_save_kernel_callchain(uintptr_t *cc, int maxsamples, __LINE__)); td = curthread; - pc = PMC_TRAPFRAME_TO_PC(tf); - *cc++ = pc; + frame.pc = PMC_TRAPFRAME_TO_PC(tf); + *cc++ = frame.pc; if (maxsamples <= 1) return (1); stackstart = (uintptr_t) td->td_kstack; stackend = (uintptr_t) td->td_kstack + td->td_kstack_pages * PAGE_SIZE; - fp = PMC_TRAPFRAME_TO_FP(tf); + frame.fp = PMC_TRAPFRAME_TO_FP(tf); - if (!PMC_IN_KERNEL(pc) || - !PMC_IN_KERNEL_STACK(fp, stackstart, stackend)) + if (!PMC_IN_KERNEL(frame.pc) || + !PMC_IN_KERNEL_STACK(frame.fp, stackstart, stackend)) return (1); for (count = 1; count < maxsamples; count++) { - /* Use saved lr as pc. */ - r = fp + sizeof(uintptr_t); - if (!PMC_IN_KERNEL_STACK(r, stackstart, stackend)) - break; - pc = *(uintptr_t *)r; - if (!PMC_IN_KERNEL(pc)) - break; - - *cc++ = pc; - - /* Switch to next frame up */ - r = fp; - if (!PMC_IN_KERNEL_STACK(r, stackstart, stackend)) + if (!unwind_frame(curthread, &frame)) break; - fp = *(uintptr_t *)r; - if (!PMC_IN_KERNEL_STACK(fp, stackstart, stackend)) + if (!PMC_IN_KERNEL(frame.pc)) break; + *cc++ = frame.pc; } return (count); From nobody Sat May 6 17:49:46 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFSC194Wz49skp; Sat, 6 May 2023 17:49: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 4QDFSC0ck6z3G8r; Sat, 6 May 2023 17:49:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i11sIVMsgx+/N88m4IuCoA7oaMvutuJoKFtjwzro8C0=; b=Wbxx99QJBOlznd9ROXNPwf9+R1Y/lOOe/maw9WlYw0RAEhQYFVVdSYDrSyMTEzRdubFkkb waemGptBnpRM1us2ZkL/kx0Kw/u3gsfvY5LsmNtKrxmDQWhUc0PxHXgkDdOQ6+QKr8ZuDS 5hwkei+20on6JMgmLKbiemkjvFHYULY6nhMyPaeXiwzUlvaonAmBmMk+12A3ekGii3OAwe 0hi8OP5xZypcCpGtG28m0qxhkcotEFnSu0rZfDyCD2f4KMvWviQlRnQdRzjEX6uM91SM46 fcBqORKKr40+RP9KR57/vN5gF1Et09eEctB6VcwJn4slt4oyPnySO0+YdpBIpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i11sIVMsgx+/N88m4IuCoA7oaMvutuJoKFtjwzro8C0=; b=tIV5qPk6oBuLLFz4bzE0JmJ150y31pKNteRR5oO7jlWCUu+noS25Qq6RK0Qe1fyApSWgDm s99q9DhEy0x6m+oUxKzltK8KEM6p0l9jQSfD6GAoQUK1KK3lEmzx2faWXZ6T/chMAoDrHW OHGL472BjAQKz/4rz2E/r+jUkEmYvtbsqZKqDSa4r1SjzvB3vJ9ETE7dj6J2RQZ4nqJusM XPIdG35wlSwOtSbQfaqllGe46oZ7sH/nUGeNqVGmBuoTYLRRSgGKZU+nO2oaguSUyYR9IM 30XpK0eu5O4W9ZBZEXijB35Q2EMaWP3lsV4+DOm/fsxC4mxM+cYXWQfyS4yPvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395387; a=rsa-sha256; cv=none; b=ZY7LCT2OSkUDXCEkycoBGD3bmi9bf99aMrZ0bkrEVXxgR4G/yaam1uxfnEL08nOoY8tbgy nHG0zDubDRwxC2ut8Np3iEKFf8j6a7aVni/Bvk4Gg0vZelVRgEg84sA7leE4MqqyN9luar FJyaWryLPIb44LBxPqw2lU2eO4QvPR4vNBwdzNVXcNtn7tCGOGdBiitdZf3fAvhY3C/mas lp6duV9sNWXKCe2OmsmbeyzqKstokm+MT15qkyouEDWfoTMHRLLNASeefXAXC6B4eCGVMS AmR+gtXv4EAo3sJDmGyyQ6tN7QHLlSf+hsxliBkrwwtRN9WzZ9Ytw6kikz7g5A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFSB6plQzm6Z; Sat, 6 May 2023 17:49:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346Hnk0s017975; Sat, 6 May 2023 17:49:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346HnksB017974; Sat, 6 May 2023 17:49:46 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:46 GMT Message-Id: <202305061749.346HnksB017974@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: aba91805aa92 - main - hwpmc: use kstack_contains() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aba91805aa92a47b2f3f01741a55ff9f07c42d04 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=aba91805aa92a47b2f3f01741a55ff9f07c42d04 commit aba91805aa92a47b2f3f01741a55ff9f07c42d04 Author: Mitchell Horne AuthorDate: 2023-05-05 21:59:01 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:19 +0000 hwpmc: use kstack_contains() This existing helper function is preferable to the hand-rolled calculation of the kstack bounds. Make some small style improvements while here. Notably, rename every instance of "r", the return address, to "ra". Tidy the includes in the affected files. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39909 --- sys/amd64/include/pmc_mdep.h | 8 +++--- sys/arm/include/pmc_mdep.h | 6 ++--- sys/arm64/include/pmc_mdep.h | 9 +++---- sys/dev/hwpmc/hwpmc_arm.c | 35 +++++++++++--------------- sys/dev/hwpmc/hwpmc_arm64_md.c | 23 ++++++----------- sys/dev/hwpmc/hwpmc_x86.c | 56 ++++++++++++++++++------------------------ sys/i386/include/pmc_mdep.h | 6 ++--- sys/riscv/include/pmc_mdep.h | 11 ++++----- 8 files changed, 61 insertions(+), 93 deletions(-) diff --git a/sys/amd64/include/pmc_mdep.h b/sys/amd64/include/pmc_mdep.h index 026a9ae2e669..5563f5b1bdbb 100644 --- a/sys/amd64/include/pmc_mdep.h +++ b/sys/amd64/include/pmc_mdep.h @@ -109,11 +109,9 @@ union pmc_md_pmc { ((PC) >= (uintptr_t) start_exceptions && \ (PC) < (uintptr_t) end_exceptions) -#define PMC_IN_KERNEL_STACK(S,START,END) \ - ((S) >= (START) && (S) < (END)) -#define PMC_IN_KERNEL(va) INKERNEL(va) - -#define PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) +#define PMC_IN_KERNEL_STACK(va) kstack_contains(curthread, (va), sizeof(va)) +#define PMC_IN_KERNEL(va) INKERNEL(va) +#define PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) /* Build a fake kernel trapframe from current instruction pointer. */ #define PMC_FAKE_TRAPFRAME(TF) \ diff --git a/sys/arm/include/pmc_mdep.h b/sys/arm/include/pmc_mdep.h index 69cb0c84deca..d7b80abb64b0 100644 --- a/sys/arm/include/pmc_mdep.h +++ b/sys/arm/include/pmc_mdep.h @@ -52,11 +52,9 @@ union pmc_md_pmc { struct pmc_md_armv7_pmc pm_armv7; }; -#define PMC_IN_KERNEL_STACK(S,START,END) \ - ((S) >= (START) && (S) < (END)) +#define PMC_IN_KERNEL_STACK(va) kstack_contains(curthread, (va), sizeof(va)) #define PMC_IN_KERNEL(va) INKERNEL((va)) - -#define PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) +#define PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) #define PMC_TRAPFRAME_TO_PC(TF) ((TF)->tf_pc) #define PMC_TRAPFRAME_TO_FP(TF) ((TF)->tf_r11) diff --git a/sys/arm64/include/pmc_mdep.h b/sys/arm64/include/pmc_mdep.h index d27bdbd5afc1..049bb2b22751 100644 --- a/sys/arm64/include/pmc_mdep.h +++ b/sys/arm64/include/pmc_mdep.h @@ -66,12 +66,11 @@ union pmc_md_pmc { struct pmc_md_dmc620_pmc pm_dmc620; }; -#define PMC_IN_KERNEL_STACK(S,START,END) \ - ((S) >= (START) && (S) < (END)) +#define PMC_IN_KERNEL_STACK(va) kstack_contains(curthread, (va), sizeof(va)) #define PMC_IN_KERNEL(va) INKERNEL((va)) -#define PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) -#define PMC_TRAPFRAME_TO_PC(TF) ((TF)->tf_elr) -#define PMC_TRAPFRAME_TO_FP(TF) ((TF)->tf_x[29]) +#define PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) +#define PMC_TRAPFRAME_TO_PC(TF) ((TF)->tf_elr) +#define PMC_TRAPFRAME_TO_FP(TF) ((TF)->tf_x[29]) /* * Prototypes diff --git a/sys/dev/hwpmc/hwpmc_arm.c b/sys/dev/hwpmc/hwpmc_arm.c index c585a6cefd1e..a0e2e6823219 100644 --- a/sys/dev/hwpmc/hwpmc_arm.c +++ b/sys/dev/hwpmc/hwpmc_arm.c @@ -31,18 +31,17 @@ __FBSDID("$FreeBSD$"); #include -#include -#include #include +#include + +#include +#include #include #include #include #include - -#include -#include -#include +#include /* XXX: Userland code compiled with gcc will need an heuristic * to be correctly detected. @@ -78,45 +77,39 @@ int pmc_save_kernel_callchain(uintptr_t *cc, int maxsamples, struct trapframe *tf) { - uintptr_t pc, r, stackstart, stackend, fp; - struct thread *td; + uintptr_t pc, ra, fp; int count; KASSERT(TRAPF_USERMODE(tf) == 0,("[arm,%d] not a kernel backtrace", __LINE__)); - td = curthread; pc = PMC_TRAPFRAME_TO_PC(tf); *cc++ = pc; if (maxsamples <= 1) return (1); - stackstart = (uintptr_t) td->td_kstack; - stackend = (uintptr_t) td->td_kstack + td->td_kstack_pages * PAGE_SIZE; fp = PMC_TRAPFRAME_TO_FP(tf); - - if (!PMC_IN_KERNEL(pc) || - !PMC_IN_KERNEL_STACK(fp, stackstart, stackend)) + if (!PMC_IN_KERNEL(pc) || !PMC_IN_KERNEL_STACK(fp)) return (1); for (count = 1; count < maxsamples; count++) { /* Use saved lr as pc. */ - r = fp + PC_OFF * sizeof(uintptr_t); - if (!PMC_IN_KERNEL_STACK(r, stackstart, stackend)) + ra = fp + PC_OFF * sizeof(uintptr_t); + if (!PMC_IN_KERNEL_STACK(ra)) break; - pc = *(uintptr_t *)r; + pc = *(uintptr_t *)ra; if (!PMC_IN_KERNEL(pc)) break; *cc++ = pc; /* Switch to next frame up */ - r = fp + FP_OFF * sizeof(uintptr_t); - if (!PMC_IN_KERNEL_STACK(r, stackstart, stackend)) + ra = fp + FP_OFF * sizeof(uintptr_t); + if (!PMC_IN_KERNEL_STACK(ra)) break; - fp = *(uintptr_t *)r; - if (!PMC_IN_KERNEL_STACK(fp, stackstart, stackend)) + fp = *(uintptr_t *)ra; + if (!PMC_IN_KERNEL_STACK(fp)) break; } diff --git a/sys/dev/hwpmc/hwpmc_arm64_md.c b/sys/dev/hwpmc/hwpmc_arm64_md.c index dd51f7bd18d5..4220badb30a6 100644 --- a/sys/dev/hwpmc/hwpmc_arm64_md.c +++ b/sys/dev/hwpmc/hwpmc_arm64_md.c @@ -31,18 +31,17 @@ __FBSDID("$FreeBSD$"); #include -#include -#include #include +#include + +#include +#include #include #include #include #include - -#include -#include -#include +#include struct pmc_mdep * pmc_md_initialize(void) @@ -59,30 +58,22 @@ pmc_md_finalize(struct pmc_mdep *md) } int -pmc_save_kernel_callchain(uintptr_t *cc, int maxsamples, - struct trapframe *tf) +pmc_save_kernel_callchain(uintptr_t *cc, int maxsamples, struct trapframe *tf) { struct unwind_state frame; - uintptr_t stackstart, stackend; - struct thread *td; int count; KASSERT(TRAPF_USERMODE(tf) == 0,("[arm64,%d] not a kernel backtrace", __LINE__)); - td = curthread; frame.pc = PMC_TRAPFRAME_TO_PC(tf); *cc++ = frame.pc; if (maxsamples <= 1) return (1); - stackstart = (uintptr_t) td->td_kstack; - stackend = (uintptr_t) td->td_kstack + td->td_kstack_pages * PAGE_SIZE; frame.fp = PMC_TRAPFRAME_TO_FP(tf); - - if (!PMC_IN_KERNEL(frame.pc) || - !PMC_IN_KERNEL_STACK(frame.fp, stackstart, stackend)) + if (!PMC_IN_KERNEL(frame.pc) || !PMC_IN_KERNEL_STACK(frame.fp)) return (1); for (count = 1; count < maxsamples; count++) { diff --git a/sys/dev/hwpmc/hwpmc_x86.c b/sys/dev/hwpmc/hwpmc_x86.c index e427139244ad..913c8f756815 100644 --- a/sys/dev/hwpmc/hwpmc_x86.c +++ b/sys/dev/hwpmc/hwpmc_x86.c @@ -34,21 +34,22 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include -#include -#include + +#include +#include #include #include -#include -#include -#include +#include /* For x86/apicvar.h */ #include +#include +#include +#include -#include -#include -#include +#include #include "hwpmc_soft.h" @@ -155,36 +156,29 @@ pmc_save_user_callchain(uintptr_t *cc, int nframes, struct trapframe *tf) int __nosanitizeaddress __nosanitizememory pmc_save_kernel_callchain(uintptr_t *cc, int nframes, struct trapframe *tf) { - int n; + uintptr_t fp, pc, ra, sp; uint32_t instr; - uintptr_t fp, pc, r, sp, stackstart, stackend; - struct thread *td; + int n; KASSERT(TRAPF_USERMODE(tf) == 0,("[x86,%d] not a kernel backtrace", __LINE__)); - td = curthread; pc = PMC_TRAPFRAME_TO_PC(tf); fp = PMC_TRAPFRAME_TO_FP(tf); sp = PMC_TRAPFRAME_TO_KERNEL_SP(tf); *cc++ = pc; - r = fp + sizeof(uintptr_t); /* points to return address */ + ra = fp + sizeof(uintptr_t); /* points to return address */ if (nframes <= 1) return (1); - stackstart = (uintptr_t) td->td_kstack; - stackend = (uintptr_t) td->td_kstack + td->td_kstack_pages * PAGE_SIZE; - - if (PMC_IN_TRAP_HANDLER(pc) || - !PMC_IN_KERNEL(pc) || - !PMC_IN_KERNEL_STACK(r, stackstart, stackend) || - !PMC_IN_KERNEL_STACK(sp, stackstart, stackend) || - !PMC_IN_KERNEL_STACK(fp, stackstart, stackend)) + if (PMC_IN_TRAP_HANDLER(pc) || !PMC_IN_KERNEL(pc) || + !PMC_IN_KERNEL_STACK(ra) || !PMC_IN_KERNEL_STACK(sp) || + !PMC_IN_KERNEL_STACK(fp)) return (1); - instr = *(uint32_t *) pc; + instr = *(uint32_t *)pc; /* * Determine whether the interrupted function was in the @@ -205,15 +199,15 @@ pmc_save_kernel_callchain(uintptr_t *cc, int nframes, struct trapframe *tf) * and the caller's address is therefore at sp[1]. */ sp += sizeof(uintptr_t); - if (!PMC_IN_KERNEL_STACK(sp, stackstart, stackend)) + if (!PMC_IN_KERNEL_STACK(sp)) return (1); - pc = *(uintptr_t *) sp; + pc = *(uintptr_t *)sp; } else { /* * Not in the function prologue or epilogue. */ - pc = *(uintptr_t *) r; - fp = *(uintptr_t *) fp; + pc = *(uintptr_t *)ra; + fp = *(uintptr_t *)fp; } for (n = 1; n < nframes; n++) { @@ -222,12 +216,11 @@ pmc_save_kernel_callchain(uintptr_t *cc, int nframes, struct trapframe *tf) if (PMC_IN_TRAP_HANDLER(pc)) break; - r = fp + sizeof(uintptr_t); - if (!PMC_IN_KERNEL_STACK(fp, stackstart, stackend) || - !PMC_IN_KERNEL_STACK(r, stackstart, stackend)) + ra = fp + sizeof(uintptr_t); + if (!PMC_IN_KERNEL_STACK(fp) || !PMC_IN_KERNEL_STACK(ra)) break; - pc = *(uintptr_t *) r; - fp = *(uintptr_t *) fp; + pc = *(uintptr_t *)ra; + fp = *(uintptr_t *)fp; } return (n); @@ -236,7 +229,6 @@ pmc_save_kernel_callchain(uintptr_t *cc, int nframes, struct trapframe *tf) /* * Machine dependent initialization for x86 class platforms. */ - struct pmc_mdep * pmc_md_initialize(void) { diff --git a/sys/i386/include/pmc_mdep.h b/sys/i386/include/pmc_mdep.h index 3d498e006a36..15bdd7a65dc8 100644 --- a/sys/i386/include/pmc_mdep.h +++ b/sys/i386/include/pmc_mdep.h @@ -121,11 +121,9 @@ struct pmc_mdep; #define PMC_TRAPFRAME_TO_USER_SP(TF) ((TF)->tf_esp) #define PMC_TRAPFRAME_TO_KERNEL_SP(TF) ((uintptr_t) &((TF)->tf_esp)) -#define PMC_IN_KERNEL_STACK(S,START,END) \ - ((S) >= (START) && (S) < (END)) +#define PMC_IN_KERNEL_STACK(va) kstack_contains(curthread, (va), sizeof(va)) #define PMC_IN_KERNEL(va) INKERNEL(va) - -#define PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) +#define PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) #define PMC_IN_TRAP_HANDLER(PC) \ ((PC) >= (uintptr_t)start_exceptions + setidt_disp && \ diff --git a/sys/riscv/include/pmc_mdep.h b/sys/riscv/include/pmc_mdep.h index 10dc5c8b98ed..b192d75ec14b 100644 --- a/sys/riscv/include/pmc_mdep.h +++ b/sys/riscv/include/pmc_mdep.h @@ -48,12 +48,11 @@ union pmc_md_pmc { struct pmc_md_riscv_pmc pm_riscv; }; -#define PMC_IN_KERNEL_STACK(S,START,END) \ - ((S) >= (START) && (S) < (END)) -#define PMC_IN_KERNEL(va) INKERNEL((va)) -#define PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) -#define PMC_TRAPFRAME_TO_PC(TF) ((TF)->tf_ra) -#define PMC_TRAPFRAME_TO_FP(TF) (0) /* stub */ +#define PMC_IN_KERNEL_STACK(va) kstack_contains(curthread, (va), sizeof(va)) +#define PMC_IN_KERNEL(va) INKERNEL((va)) +#define PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) +#define PMC_TRAPFRAME_TO_PC(TF) ((TF)->tf_ra) +#define PMC_TRAPFRAME_TO_FP(TF) (0) /* stub */ /* * Prototypes From nobody Sat May 6 17:49:48 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFSD39ZBz49shZ; Sat, 6 May 2023 17:49: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 4QDFSD1hcBz3G7P; Sat, 6 May 2023 17:49:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rx6c37zfX2KXMSNUtTCGDEki4Xs7yDhla7aXfQtZLN4=; b=gvZo2ZvJqyHi2p661nvelapFAH7oVKMtiSFsNF6S3ZE/Fu+1TiAh/SIT7yHwrY+S2KmOuI pleZjYmVmPbN0vAdab2wsWrFSye8QJmM/EZL0YCP2ej9RgYt5RfrI7FCT/x655ePWFzljt nNqUhKrVEU80+J8cKsmb4fSGWALBZHPBt0cKXQ14qt2BTXL8qe5uDuX8jwQ5e1ouDRoVv/ ByGL9pLXiI44QAzHHMviMIEx55VhSWJpZNY1/wcslIVbIexU9p/mh1ivgNAiuRLmGcenps rvkSCYek2gpkhON45tvCDT9bQPwxqlwQzCAHvoGHT8oSnjgjSHWFWb7x65Qtog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rx6c37zfX2KXMSNUtTCGDEki4Xs7yDhla7aXfQtZLN4=; b=Pn2RjMF3hkLJOT3r1Dz0hGDplvqqjxfDy6IMTGp3UsIGdchEnJrkbzmogbR2doJ4H8fvr3 kVrOc2Li2RXw88sCPfxfNSrmufAp+ONZo2lzvDW9HEmbhQrVik6uQwvvEJjMKbNLAnkyNF FvaNX2tf0DRJTzYb/JCNRnRjwHcPhTSzU6TrBhBfSe1cQCoWPBrwpzJ49jSn8vZN6hm67t 2vOVQA+pQE1HAkVhjRi6+HEg6iQ8z1Cdkji3ivBmIWS5Mt1H69WJFrsppcst3IsxQj1Km2 T3NX7KsPmc2dEU3dqAf9hq5GHhTGk4Xr4NkzdmKK7EhiyrVBd8kxbAR7+bNDmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395388; a=rsa-sha256; cv=none; b=mRWVJA/OxBy+n4q/U2iiPmIEWDrN4wcY5ab6r5MNJtp3sXwmO+vCo7czPNpcKcIDU8SIUY jADBVRPU46Bv7/JYj5/OjGIU5W7R2S9HnIFgJqJi83duvMimle/3WANPhaZuDt1hNgpXIr ISnHodDD831HBQ1xfSU9nct5uj18RArKLN1Iy8oIlH6hV3/c7e1f1g2y/YmfqwfkoPL98k FbFmykCXaFC0aUFjiyGbb1jyIQ+lmeRN1+3PpcR7Nb807aNPOsBQiEgFpa8ZJcZLMKUg1F 2RnT/bwkRINZfBWEMZQCwMYQ2osNph6NdKQE39wlKpweXRf/rgDV7gieaRGg1A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFSD0nzTzlnH; Sat, 6 May 2023 17:49:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346HnmVs017994; Sat, 6 May 2023 17:49:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346HnmxQ017993; Sat, 6 May 2023 17:49:48 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:48 GMT Message-Id: <202305061749.346HnmxQ017993@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: 31610e34b7e3 - main - hwpmc: don't use deprecated copystr(9) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31610e34b7e39d573d927ea98346c88f23cabdab Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=31610e34b7e39d573d927ea98346c88f23cabdab commit 31610e34b7e39d573d927ea98346c88f23cabdab Author: Mitchell Horne AuthorDate: 2023-05-05 21:59:15 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:19 +0000 hwpmc: don't use deprecated copystr(9) It is just wrapper around strlcpy(), but results in more complicated code. Clean this up to use strlcpy() or snprintf() as appropriate. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39910 --- sys/dev/hwpmc/hwpmc_amd.c | 7 +------ sys/dev/hwpmc/hwpmc_arm64.c | 9 +++------ sys/dev/hwpmc/hwpmc_armv7.c | 9 +++------ sys/dev/hwpmc/hwpmc_cmn600.c | 11 ++++------- sys/dev/hwpmc/hwpmc_core.c | 16 ++-------------- sys/dev/hwpmc/hwpmc_dmc620.c | 11 ++++------- sys/dev/hwpmc/hwpmc_powerpc.c | 9 +++------ sys/dev/hwpmc/hwpmc_soft.c | 7 +------ sys/dev/hwpmc/hwpmc_tsc.c | 7 +------ sys/dev/hwpmc/hwpmc_uncore.c | 16 ++-------------- 10 files changed, 24 insertions(+), 78 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_amd.c b/sys/dev/hwpmc/hwpmc_amd.c index 936974080fed..c35f5fd4f095 100644 --- a/sys/dev/hwpmc/hwpmc_amd.c +++ b/sys/dev/hwpmc/hwpmc_amd.c @@ -905,8 +905,6 @@ amd_intr(struct trapframe *tf) static int amd_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) { - int error; - size_t copied; const struct amd_descr *pd; struct pmc_hw *phw; @@ -918,10 +916,7 @@ amd_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) phw = &amd_pcpu[cpu]->pc_amdpmcs[ri]; pd = &amd_pmcdesc[ri]; - if ((error = copystr(pd->pm_descr.pd_name, pi->pm_name, - PMC_NAME_MAX, &copied)) != 0) - return error; - + strlcpy(pi->pm_name, pd->pm_descr.pd_name, sizeof(pi->pm_name)); pi->pm_class = pd->pm_descr.pd_class; if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c index ec796bcc8ff5..baf05e52b42a 100644 --- a/sys/dev/hwpmc/hwpmc_arm64.c +++ b/sys/dev/hwpmc/hwpmc_arm64.c @@ -416,9 +416,7 @@ arm64_intr(struct trapframe *tf) static int arm64_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) { - char arm64_name[PMC_NAME_MAX]; struct pmc_hw *phw; - int error; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[arm64,%d], illegal CPU %d", __LINE__, cpu)); @@ -426,11 +424,10 @@ arm64_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) ("[arm64,%d] row-index %d out of range", __LINE__, ri)); phw = &arm64_pcpu[cpu]->pc_arm64pmcs[ri]; - snprintf(arm64_name, sizeof(arm64_name), "ARMV8-%d", ri); - if ((error = copystr(arm64_name, pi->pm_name, PMC_NAME_MAX, - NULL)) != 0) - return (error); + + snprintf(pi->pm_name, sizeof(pi->pm_name), "ARMV8-%d", ri); pi->pm_class = PMC_CLASS_ARMV8; + if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { pi->pm_enabled = TRUE; *ppmc = phw->phw_pmc; diff --git a/sys/dev/hwpmc/hwpmc_armv7.c b/sys/dev/hwpmc/hwpmc_armv7.c index 1ba1dbb6e695..34f3fd009c9d 100644 --- a/sys/dev/hwpmc/hwpmc_armv7.c +++ b/sys/dev/hwpmc/hwpmc_armv7.c @@ -384,9 +384,7 @@ armv7_intr(struct trapframe *tf) static int armv7_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) { - char armv7_name[PMC_NAME_MAX]; struct pmc_hw *phw; - int error; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[armv7,%d], illegal CPU %d", __LINE__, cpu)); @@ -394,11 +392,10 @@ armv7_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) ("[armv7,%d] row-index %d out of range", __LINE__, ri)); phw = &armv7_pcpu[cpu]->pc_armv7pmcs[ri]; - snprintf(armv7_name, sizeof(armv7_name), "ARMV7-%d", ri); - if ((error = copystr(armv7_name, pi->pm_name, PMC_NAME_MAX, - NULL)) != 0) - return error; + + snprintf(pi->pm_name, sizeof(pi->pm_name), "ARMV7-%d", ri); pi->pm_class = PMC_CLASS_ARMV7; + if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { pi->pm_enabled = TRUE; *ppmc = phw->phw_pmc; diff --git a/sys/dev/hwpmc/hwpmc_cmn600.c b/sys/dev/hwpmc/hwpmc_cmn600.c index fe98fdf969fc..82b6e553801a 100644 --- a/sys/dev/hwpmc/hwpmc_cmn600.c +++ b/sys/dev/hwpmc/hwpmc_cmn600.c @@ -587,9 +587,8 @@ cmn600_stop_pmc(int cpu, int ri) static int cmn600_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) { + struct pmc_descr *pd; struct pmc_hw *phw; - size_t copied; - int error; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[cmn600,%d] illegal CPU %d", __LINE__, cpu)); @@ -597,12 +596,10 @@ cmn600_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) ri)); phw = cmn600desc(ri)->pd_phw; + pd = &cmn600desc(ri)->pd_descr; - if ((error = copystr(cmn600desc(ri)->pd_descr.pd_name, - pi->pm_name, PMC_NAME_MAX, &copied)) != 0) - return (error); - - pi->pm_class = cmn600desc(ri)->pd_descr.pd_class; + strlcpy(pi->pm_name, pd->pd_name, sizeof(pi->pm_name)); + pi->pm_class = pd->pd_class; if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { pi->pm_enabled = TRUE; diff --git a/sys/dev/hwpmc/hwpmc_core.c b/sys/dev/hwpmc/hwpmc_core.c index 5d29931c90f0..ad9d323bdb9a 100644 --- a/sys/dev/hwpmc/hwpmc_core.c +++ b/sys/dev/hwpmc/hwpmc_core.c @@ -330,17 +330,11 @@ iaf_config_pmc(int cpu, int ri, struct pmc *pm) static int iaf_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) { - int error; struct pmc_hw *phw; - char iaf_name[PMC_NAME_MAX]; phw = &core_pcpu[cpu]->pc_corepmcs[ri + core_iaf_ri]; - (void) snprintf(iaf_name, sizeof(iaf_name), "IAF-%d", ri); - if ((error = copystr(iaf_name, pi->pm_name, PMC_NAME_MAX, - NULL)) != 0) - return (error); - + snprintf(pi->pm_name, sizeof(pi->pm_name), "IAF-%d", ri); pi->pm_class = PMC_CLASS_IAF; if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { @@ -814,17 +808,11 @@ iap_config_pmc(int cpu, int ri, struct pmc *pm) static int iap_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) { - int error; struct pmc_hw *phw; - char iap_name[PMC_NAME_MAX]; phw = &core_pcpu[cpu]->pc_corepmcs[ri]; - (void) snprintf(iap_name, sizeof(iap_name), "IAP-%d", ri); - if ((error = copystr(iap_name, pi->pm_name, PMC_NAME_MAX, - NULL)) != 0) - return (error); - + snprintf(pi->pm_name, sizeof(pi->pm_name), "IAP-%d", ri); pi->pm_class = PMC_CLASS_IAP; if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { diff --git a/sys/dev/hwpmc/hwpmc_dmc620.c b/sys/dev/hwpmc/hwpmc_dmc620.c index a6a1dfb44ca4..6152e264a169 100644 --- a/sys/dev/hwpmc/hwpmc_dmc620.c +++ b/sys/dev/hwpmc/hwpmc_dmc620.c @@ -454,9 +454,8 @@ CLASSDEP_FN2(dmc620_stop_pmc, int, cpu, int, ri) CLASSDEP_FN4(dmc620_describe, int, cpu, int, ri, struct pmc_info *, pi, struct pmc **, ppmc) { + struct pmc_descr *pd; struct pmc_hw *phw; - size_t copied; - int error; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[dmc620,%d] illegal CPU %d", __LINE__, cpu)); @@ -464,12 +463,10 @@ CLASSDEP_FN4(dmc620_describe, int, cpu, int, ri, struct pmc_info *, pi, ri)); phw = dmc620desc(class, cpu, ri)->pd_phw; + pd = &dmc620desc(class, cpu, ri)->pd_descr; - if ((error = copystr(dmc620desc(class, cpu, ri)->pd_descr.pd_name, - pi->pm_name, PMC_NAME_MAX, &copied)) != 0) - return (error); - - pi->pm_class = dmc620desc(class, cpu, ri)->pd_descr.pd_class; + strlcpy(pi->pm_name, pd->pd_name, sizeof(pi->pm_name)); + pi->pm_class = pd->pd_class; if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { pi->pm_enabled = TRUE; diff --git a/sys/dev/hwpmc/hwpmc_powerpc.c b/sys/dev/hwpmc/hwpmc_powerpc.c index aeb7285ead2c..3d65d8753fcb 100644 --- a/sys/dev/hwpmc/hwpmc_powerpc.c +++ b/sys/dev/hwpmc/hwpmc_powerpc.c @@ -122,19 +122,16 @@ powerpc_switch_out(struct pmc_cpu *pc, struct pmc_process *pp) int powerpc_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) { - int error; struct pmc_hw *phw; - char powerpc_name[PMC_NAME_MAX]; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[powerpc,%d], illegal CPU %d", __LINE__, cpu)); phw = &powerpc_pcpu[cpu]->pc_ppcpmcs[ri]; - snprintf(powerpc_name, sizeof(powerpc_name), "POWERPC-%d", ri); - if ((error = copystr(powerpc_name, pi->pm_name, PMC_NAME_MAX, - NULL)) != 0) - return error; + + snprintf(pi->pm_name, sizeof(pi->pm_name), "POWERPC-%d", ri); pi->pm_class = powerpc_pcpu[cpu]->pc_class; + if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { pi->pm_enabled = TRUE; *ppmc = phw->phw_pmc; diff --git a/sys/dev/hwpmc/hwpmc_soft.c b/sys/dev/hwpmc/hwpmc_soft.c index c96a41457a66..3b602cfee89d 100644 --- a/sys/dev/hwpmc/hwpmc_soft.c +++ b/sys/dev/hwpmc/hwpmc_soft.c @@ -159,8 +159,6 @@ soft_config_pmc(int cpu, int ri, struct pmc *pm) static int soft_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) { - int error; - size_t copied; const struct soft_descr *pd; struct pmc_hw *phw; @@ -172,10 +170,7 @@ soft_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) phw = &soft_pcpu[cpu]->soft_hw[ri]; pd = &soft_pmcdesc[ri]; - if ((error = copystr(pd->pm_descr.pd_name, pi->pm_name, - PMC_NAME_MAX, &copied)) != 0) - return (error); - + strlcpy(pi->pm_name, pd->pm_descr.pd_name, sizeof(pi->pm_name)); pi->pm_class = pd->pm_descr.pd_class; if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { diff --git a/sys/dev/hwpmc/hwpmc_tsc.c b/sys/dev/hwpmc/hwpmc_tsc.c index d59c8908f4ca..25b2e9f8fd57 100644 --- a/sys/dev/hwpmc/hwpmc_tsc.c +++ b/sys/dev/hwpmc/hwpmc_tsc.c @@ -115,8 +115,6 @@ tsc_config_pmc(int cpu, int ri, struct pmc *pm) static int tsc_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) { - int error; - size_t copied; const struct tsc_descr *pd; struct pmc_hw *phw; @@ -127,10 +125,7 @@ tsc_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) phw = &tsc_pcpu[cpu]->tc_hw; pd = &tsc_pmcdesc[ri]; - if ((error = copystr(pd->pm_descr.pd_name, pi->pm_name, - PMC_NAME_MAX, &copied)) != 0) - return (error); - + strlcpy(pi->pm_name, pd->pm_descr.pd_name, sizeof(pi->pm_name)); pi->pm_class = pd->pm_descr.pd_class; if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { diff --git a/sys/dev/hwpmc/hwpmc_uncore.c b/sys/dev/hwpmc/hwpmc_uncore.c index 56373f383dda..7f61deedfd79 100644 --- a/sys/dev/hwpmc/hwpmc_uncore.c +++ b/sys/dev/hwpmc/hwpmc_uncore.c @@ -233,17 +233,11 @@ ucf_config_pmc(int cpu, int ri, struct pmc *pm) static int ucf_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) { - int error; struct pmc_hw *phw; - char ucf_name[PMC_NAME_MAX]; phw = &uncore_pcpu[cpu]->pc_uncorepmcs[ri + uncore_ucf_ri]; - (void) snprintf(ucf_name, sizeof(ucf_name), "UCF-%d", ri); - if ((error = copystr(ucf_name, pi->pm_name, PMC_NAME_MAX, - NULL)) != 0) - return (error); - + snprintf(pi->pm_name, sizeof(pi->pm_name), "UCF-%d", ri); pi->pm_class = PMC_CLASS_UCF; if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { @@ -560,17 +554,11 @@ ucp_config_pmc(int cpu, int ri, struct pmc *pm) static int ucp_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) { - int error; struct pmc_hw *phw; - char ucp_name[PMC_NAME_MAX]; phw = &uncore_pcpu[cpu]->pc_uncorepmcs[ri]; - (void) snprintf(ucp_name, sizeof(ucp_name), "UCP-%d", ri); - if ((error = copystr(ucp_name, pi->pm_name, PMC_NAME_MAX, - NULL)) != 0) - return (error); - + snprintf(pi->pm_name, sizeof(pi->pm_name), "UCP-%d", ri); pi->pm_class = PMC_CLASS_UCP; if (phw->phw_state & PMC_PHW_FLAG_IS_ENABLED) { From nobody Sat May 6 17:49:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFSF4GWMz49sl1; Sat, 6 May 2023 17:49: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 4QDFSF2z9Wz3GGB; Sat, 6 May 2023 17:49:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/oHp43lVVxxnq5TC0StC6gjIyLlw7YlmwbOvNGXB4PE=; b=EC2Np4skNZsmXOPI4l42k+xtFcV3RHWF5R5ONR67qHBv03ZfUPypLoHqLAWsccl72UaTsy /iTXWZbpiTxZhgeSPNB6PPNwgjSFVieT/uPoSWEaKoTAPFbj4Jy5fAPsuo/7EpaORyaYNS rhxfob+kz/GLliPyVMVt2rTMpKfxvZcatbCGVKiDW0jRuoCcNKs9bHILxDQ/dVFggvKOSk T+goOEq6Uwp9BJNfRd6WUYYpBITLEUS4lr8HaDFybvHhVYJfIc7UnbPM0RTtPEwpQic5i6 aitSjm5HiQ/XIUX+R8E8FQkG2nu9vMjo/8J7cB4u/vV09EtL/RWfPKwwXI6Grg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/oHp43lVVxxnq5TC0StC6gjIyLlw7YlmwbOvNGXB4PE=; b=x3hHgcGO0PAw+tD4XQthmwobhZDqtAA1E2FCm8YLSi4aWliAP8hS/l1s4kvtrouew4Aap5 ksP+xGMNEstMMEEFnpGPDb6obY+FP63wvthv13rytP62sllLEtcks79b6cH/XC8kv10s+I k2ehbi8il1CIpMQXaTqOlp73/RqP8hBGUbZRpz1uiaXzGVBis2TzXKq+ZSopjK0b2gXWmy VSyauM4QHNP/g/jxprK8DZbbLUJsz+MGI7ANE9OEyYbgFZse9yS7vicugD4K63WgyVYkay 7Rc3j6RkpTAqy5DldTD9G0QAMNT8DPGgsW1H+wB5sllziarmffUl4/g76H7zCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395389; a=rsa-sha256; cv=none; b=k2K/QimOoFepmMIJHYMh+yEtEOqQNkfqEN9AJy+oW6PHfH9I6UMh2hwYVEPbb6j3zChXys ijCDC2LhojH/xq6NyB1vwuXknBFhM1HyefIJD6ppOUZ/0zWE+hyLEj8tkUxpXJp20IoDfg bInxUNZk2mComxtPY3EK0kQBLy+9xLZmhpXexgGREXaJXeCFyMH1CylZgjgmRYkN3DqZid fhnYIEiI8SQ6mQKyTfi2KhgR95qhLFfqWcHLsUUdo2egIY2LNi2HlVxwg7TtU086J1zSan UY3lBMMB0gOOxgTY0iPc/9P2KivJCG1Cn1XlWSW3aAoFQxVlpPIm4kJa2h6Ikw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFSF1wPbzm8l; Sat, 6 May 2023 17:49:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346HnnZP018013; Sat, 6 May 2023 17:49:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346Hnn30018012; Sat, 6 May 2023 17:49:49 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:49 GMT Message-Id: <202305061749.346Hnn30018012@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: 3a7c9fc01bda - main - hwpmc_logging: less macro magic for type names List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3a7c9fc01bdae13edbd5724745b748e6a61065eb Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=3a7c9fc01bdae13edbd5724745b748e6a61065eb commit 3a7c9fc01bdae13edbd5724745b748e6a61065eb Author: Mitchell Horne AuthorDate: 2023-05-05 21:59:27 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:19 +0000 hwpmc_logging: less macro magic for type names Provide the log type names in their entirely, rather than relying on the macro to prepend the prefix. This improves their searchability; for example, if I see PMCLOG_TYPE_PMCALLOCATE in libpmc I will now be able to find where that is emitted in the kernel with a simple grep. Reviewed by: jkoshy, emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39911 --- sys/dev/hwpmc/hwpmc_logging.c | 57 +++++++++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_logging.c b/sys/dev/hwpmc/hwpmc_logging.c index 1c48089a58dc..e0ff87619137 100644 --- a/sys/dev/hwpmc/hwpmc_logging.c +++ b/sys/dev/hwpmc/hwpmc_logging.c @@ -110,9 +110,7 @@ static struct mtx pmc_kthread_mtx; /* sleep lock */ * Log file record constructors. */ #define _PMCLOG_TO_HEADER(T,L) \ - ((PMCLOG_HEADER_MAGIC << 24) | \ - (PMCLOG_TYPE_ ## T << 16) | \ - ((L) & 0xFFFF)) + ((PMCLOG_HEADER_MAGIC << 24) | (T << 16) | ((L) & 0xFFFF)) /* reserve LEN bytes of space and initialize the entry header */ #define _PMCLOG_RESERVE_SAFE(PO,TYPE,LEN,ACTION, TSC) do { \ @@ -716,7 +714,7 @@ pmclog_configure_log(struct pmc_mdep *md, struct pmc_owner *po, int logfd) PROC_UNLOCK(p); nanotime(&ts); /* create a log initialization entry */ - PMCLOG_RESERVE_WITH_ERROR(po, INITIALIZE, + PMCLOG_RESERVE_WITH_ERROR(po, PMCLOG_TYPE_INITIALIZE, sizeof(struct pmclog_initialize)); PMCLOG_EMIT32(PMC_VERSION); PMCLOG_EMIT32(md->pmd_cputype); @@ -916,7 +914,7 @@ pmclog_process_callchain(struct pmc *pm, struct pmc_sample *ps) ps->ps_nsamples * sizeof(uintfptr_t); po = pm->pm_owner; flags = PMC_CALLCHAIN_TO_CPUFLAGS(ps->ps_cpu,ps->ps_flags); - PMCLOG_RESERVE_SAFE(po, CALLCHAIN, recordlen, ps->ps_tsc); + PMCLOG_RESERVE_SAFE(po, PMCLOG_TYPE_CALLCHAIN, recordlen, ps->ps_tsc); PMCLOG_EMIT32(ps->ps_pid); PMCLOG_EMIT32(ps->ps_tid); PMCLOG_EMIT32(pm->pm_id); @@ -929,14 +927,16 @@ pmclog_process_callchain(struct pmc *pm, struct pmc_sample *ps) void pmclog_process_closelog(struct pmc_owner *po) { - PMCLOG_RESERVE(po,CLOSELOG,sizeof(struct pmclog_closelog)); + PMCLOG_RESERVE(po, PMCLOG_TYPE_CLOSELOG, + sizeof(struct pmclog_closelog)); PMCLOG_DESPATCH_SYNC(po); } void pmclog_process_dropnotify(struct pmc_owner *po) { - PMCLOG_RESERVE(po,DROPNOTIFY,sizeof(struct pmclog_dropnotify)); + PMCLOG_RESERVE(po, PMCLOG_TYPE_DROPNOTIFY, + sizeof(struct pmclog_dropnotify)); PMCLOG_DESPATCH(po); } @@ -952,7 +952,7 @@ pmclog_process_map_in(struct pmc_owner *po, pid_t pid, uintfptr_t start, recordlen = offsetof(struct pmclog_map_in, pl_pathname) + pathlen; - PMCLOG_RESERVE(po, MAP_IN, recordlen); + PMCLOG_RESERVE(po, PMCLOG_TYPE_MAP_IN, recordlen); PMCLOG_EMIT32(pid); PMCLOG_EMIT32(0); PMCLOG_EMITADDR(start); @@ -966,7 +966,7 @@ pmclog_process_map_out(struct pmc_owner *po, pid_t pid, uintfptr_t start, { KASSERT(start <= end, ("[pmclog,%d] start > end", __LINE__)); - PMCLOG_RESERVE(po, MAP_OUT, sizeof(struct pmclog_map_out)); + PMCLOG_RESERVE(po, PMCLOG_TYPE_MAP_OUT, sizeof(struct pmclog_map_out)); PMCLOG_EMIT32(pid); PMCLOG_EMIT32(0); PMCLOG_EMITADDR(start); @@ -985,7 +985,7 @@ pmclog_process_pmcallocate(struct pmc *pm) PMCDBG1(LOG,ALL,1, "pm=%p", pm); if (PMC_TO_CLASS(pm) == PMC_CLASS_SOFT) { - PMCLOG_RESERVE(po, PMCALLOCATEDYN, + PMCLOG_RESERVE(po, PMCLOG_TYPE_PMCALLOCATEDYN, sizeof(struct pmclog_pmcallocatedyn)); PMCLOG_EMIT32(pm->pm_id); PMCLOG_EMIT32(pm->pm_event); @@ -1000,7 +1000,7 @@ pmclog_process_pmcallocate(struct pmc *pm) pmc_soft_ev_release(ps); PMCLOG_DESPATCH_SYNC(po); } else { - PMCLOG_RESERVE(po, PMCALLOCATE, + PMCLOG_RESERVE(po, PMCLOG_TYPE_PMCALLOCATE, sizeof(struct pmclog_pmcallocate)); PMCLOG_EMIT32(pm->pm_id); PMCLOG_EMIT32(pm->pm_event); @@ -1024,7 +1024,7 @@ pmclog_process_pmcattach(struct pmc *pm, pid_t pid, char *path) pathlen = strlen(path) + 1; /* #bytes for the string */ recordlen = offsetof(struct pmclog_pmcattach, pl_pathname) + pathlen; - PMCLOG_RESERVE(po, PMCATTACH, recordlen); + PMCLOG_RESERVE(po, PMCLOG_TYPE_PMCATTACH, recordlen); PMCLOG_EMIT32(pm->pm_id); PMCLOG_EMIT32(pid); PMCLOG_EMITSTRING(path, pathlen); @@ -1040,7 +1040,8 @@ pmclog_process_pmcdetach(struct pmc *pm, pid_t pid) po = pm->pm_owner; - PMCLOG_RESERVE(po, PMCDETACH, sizeof(struct pmclog_pmcdetach)); + PMCLOG_RESERVE(po, PMCLOG_TYPE_PMCDETACH, + sizeof(struct pmclog_pmcdetach)); PMCLOG_EMIT32(pm->pm_id); PMCLOG_EMIT32(pid); PMCLOG_DESPATCH_SYNC(po); @@ -1050,13 +1051,15 @@ void pmclog_process_proccreate(struct pmc_owner *po, struct proc *p, int sync) { if (sync) { - PMCLOG_RESERVE(po, PROC_CREATE, sizeof(struct pmclog_proccreate)); + PMCLOG_RESERVE(po, PMCLOG_TYPE_PROC_CREATE, + sizeof(struct pmclog_proccreate)); PMCLOG_EMIT32(p->p_pid); PMCLOG_EMIT32(p->p_flag); PMCLOG_EMITSTRING(p->p_comm, MAXCOMLEN+1); PMCLOG_DESPATCH_SYNC(po); } else { - PMCLOG_RESERVE(po, PROC_CREATE, sizeof(struct pmclog_proccreate)); + PMCLOG_RESERVE(po, PMCLOG_TYPE_PROC_CREATE, + sizeof(struct pmclog_proccreate)); PMCLOG_EMIT32(p->p_pid); PMCLOG_EMIT32(p->p_flag); PMCLOG_EMITSTRING(p->p_comm, MAXCOMLEN+1); @@ -1081,7 +1084,8 @@ pmclog_process_proccsw(struct pmc *pm, struct pmc_process *pp, pmc_value_t v, st po = pm->pm_owner; - PMCLOG_RESERVE_SAFE(po, PROCCSW, sizeof(struct pmclog_proccsw), pmc_rdtsc()); + PMCLOG_RESERVE_SAFE(po, PMCLOG_TYPE_PROCCSW, + sizeof(struct pmclog_proccsw), pmc_rdtsc()); PMCLOG_EMIT64(v); PMCLOG_EMIT32(pm->pm_id); PMCLOG_EMIT32(pp->pp_proc->p_pid); @@ -1100,7 +1104,7 @@ pmclog_process_procexec(struct pmc_owner *po, pmc_id_t pmid, pid_t pid, pathlen = strlen(path) + 1; /* #bytes for the path */ recordlen = offsetof(struct pmclog_procexec, pl_pathname) + pathlen; - PMCLOG_RESERVE(po, PROCEXEC, recordlen); + PMCLOG_RESERVE(po, PMCLOG_TYPE_PROCEXEC, recordlen); PMCLOG_EMIT32(pid); PMCLOG_EMIT32(pmid); PMCLOG_EMITADDR(startaddr); @@ -1124,7 +1128,8 @@ pmclog_process_procexit(struct pmc *pm, struct pmc_process *pp) po = pm->pm_owner; - PMCLOG_RESERVE(po, PROCEXIT, sizeof(struct pmclog_procexit)); + PMCLOG_RESERVE(po, PMCLOG_TYPE_PROCEXIT, + sizeof(struct pmclog_procexit)); PMCLOG_EMIT32(pm->pm_id); PMCLOG_EMIT32(pp->pp_proc->p_pid); PMCLOG_EMIT64(pp->pp_pmcs[ri].pp_pmcval); @@ -1138,7 +1143,8 @@ pmclog_process_procexit(struct pmc *pm, struct pmc_process *pp) void pmclog_process_procfork(struct pmc_owner *po, pid_t oldpid, pid_t newpid) { - PMCLOG_RESERVE(po, PROCFORK, sizeof(struct pmclog_procfork)); + PMCLOG_RESERVE(po, PMCLOG_TYPE_PROCFORK, + sizeof(struct pmclog_procfork)); PMCLOG_EMIT32(oldpid); PMCLOG_EMIT32(newpid); PMCLOG_DESPATCH(po); @@ -1151,7 +1157,7 @@ pmclog_process_procfork(struct pmc_owner *po, pid_t oldpid, pid_t newpid) void pmclog_process_sysexit(struct pmc_owner *po, pid_t pid) { - PMCLOG_RESERVE(po, SYSEXIT, sizeof(struct pmclog_sysexit)); + PMCLOG_RESERVE(po, PMCLOG_TYPE_SYSEXIT, sizeof(struct pmclog_sysexit)); PMCLOG_EMIT32(pid); PMCLOG_DESPATCH(po); } @@ -1163,7 +1169,8 @@ pmclog_process_threadcreate(struct pmc_owner *po, struct thread *td, int sync) p = td->td_proc; if (sync) { - PMCLOG_RESERVE(po, THR_CREATE, sizeof(struct pmclog_threadcreate)); + PMCLOG_RESERVE(po, PMCLOG_TYPE_THR_CREATE, + sizeof(struct pmclog_threadcreate)); PMCLOG_EMIT32(td->td_tid); PMCLOG_EMIT32(p->p_pid); PMCLOG_EMIT32(p->p_flag); @@ -1171,7 +1178,8 @@ pmclog_process_threadcreate(struct pmc_owner *po, struct thread *td, int sync) PMCLOG_EMITSTRING(td->td_name, MAXCOMLEN+1); PMCLOG_DESPATCH_SYNC(po); } else { - PMCLOG_RESERVE(po, THR_CREATE, sizeof(struct pmclog_threadcreate)); + PMCLOG_RESERVE(po, PMCLOG_TYPE_THR_CREATE, + sizeof(struct pmclog_threadcreate)); PMCLOG_EMIT32(td->td_tid); PMCLOG_EMIT32(p->p_pid); PMCLOG_EMIT32(p->p_flag); @@ -1185,7 +1193,8 @@ void pmclog_process_threadexit(struct pmc_owner *po, struct thread *td) { - PMCLOG_RESERVE(po, THR_EXIT, sizeof(struct pmclog_threadexit)); + PMCLOG_RESERVE(po, PMCLOG_TYPE_THR_EXIT, + sizeof(struct pmclog_threadexit)); PMCLOG_EMIT32(td->td_tid); PMCLOG_DESPATCH(po); } @@ -1203,7 +1212,7 @@ pmclog_process_userlog(struct pmc_owner *po, struct pmc_op_writelog *wl) error = 0; - PMCLOG_RESERVE_WITH_ERROR(po, USERDATA, + PMCLOG_RESERVE_WITH_ERROR(po, PMCLOG_TYPE_USERDATA, sizeof(struct pmclog_userdata)); PMCLOG_EMIT32(wl->pm_userdata); PMCLOG_DESPATCH(po); From nobody Sat May 6 17:49:50 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFSG4vBZz49sl5; Sat, 6 May 2023 17:49: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 4QDFSG461Fz3GNC; Sat, 6 May 2023 17:49:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aE0oY8lDEeg/gdq9mjCCEMBpFmIFLH8jGHFpwfCcc0k=; b=UgwVeaTAEIzYWZ2ZU5jkI1XARvROOrKtMUfI2/kvKwEW0sxBtr87geG4YOr/OO514yAKja 0ZAmxWYRQJd/UNM8tpAZpBIZHwnE3PhhGO+mPLXpOlJPOUqfwPXmh5iTSNNWUd16+7okYi AV8lEz+wVV1h3m4+9AzZOSpBbiB4aFyO6flUjprH9x23QjlWTVTHfsiHC1dMUa+mnXoFy4 8tadVroU+YdPz8rzTJR8NAiNJ3hQNJppZwWMrNyWipT5sh/fR5lg1uFelGl5qdkAfgMrqh ZmIBQYX0IUlTssEitEdqceIp07W8jZYDvgPzczLx6vuEZ3UhugVdD+scw3wV6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aE0oY8lDEeg/gdq9mjCCEMBpFmIFLH8jGHFpwfCcc0k=; b=WwefMituxrxgoCscXWPGFwulD7QsonzEyN8xUpXpW8hd5skLs2IclzJEpbAV9YRkStYT3Q BWVMc0mMaMVDqKhS9HXlqj0MY5Yrvy1I9q18/vUGZwR4CXdJSjOqEYxL50XGLR1hEi7TkX MO+LwHMrt8nuK4i6GGNebPMTLhQPs2qemgUI0TANRtnw64pUT4LKBbYteemhu6gjPzZFqO KcgNcxNbA3ZmtAAR3vCtgP9YoJltTeWvvN3DNCt/3cWsEU0iw8ia5v+UdbZIG19poXxLmj I9kbpbdyVIaVR8PKOl009kV05Qng2aQBN8PqkYCdi2MHwm0/ZnGSLcY4OUfmLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395390; a=rsa-sha256; cv=none; b=xV1WXYa4ssk7fBuw4NkfhgIQyqN7nnomplxodosbNcueZYf9mPO5czApEu9ssHTaZGx51S TtgfE+IERm2Nr521vYQEr2XqdarnZs9aKLwNZ463BcB0lmaOaTxtpp0Dpnm2pBLHrZO4SL t3xXWfkeB3VePVaTkH30EdrsIUaG8ClLtpkihJKpfAIbmdqwvGP7zeeLJctS/RGhZQ8LmI vJtf3HNRImnLQguTSzVVtFtSlt/cWmuK31A5+6isoGQWBmLN81Edmg8Rc+9E6Jao+/B2kD W12eEUbFmpBfj4gSEKOtmWSN5e+PA01+3SH19mXU/zej8rfQk3dyQiXwhfLZoQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFSG34JTzlk4; Sat, 6 May 2023 17:49:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346Hno3G018042; Sat, 6 May 2023 17:49:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346HnoQl018041; Sat, 6 May 2023 17:49:50 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:50 GMT Message-Id: <202305061749.346HnoQl018041@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: 772b2dc3abc5 - main - hwpmc: remove pmd_pcpu_{init,fini} callbacks List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 772b2dc3abc5072743e7598d35e0a8ad621e7b0d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=772b2dc3abc5072743e7598d35e0a8ad621e7b0d commit 772b2dc3abc5072743e7598d35e0a8ad621e7b0d Author: Mitchell Horne AuthorDate: 2023-05-05 21:59:33 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:19 +0000 hwpmc: remove pmd_pcpu_{init,fini} callbacks These are unused on all platforms. Reviewed by: jkoshy, emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39912 --- sys/dev/hwpmc/hwpmc_amd.c | 2 -- sys/dev/hwpmc/hwpmc_core.c | 3 --- sys/dev/hwpmc/hwpmc_mod.c | 6 ------ sys/sys/pmc.h | 4 ---- 4 files changed, 15 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_amd.c b/sys/dev/hwpmc/hwpmc_amd.c index c35f5fd4f095..43812951a8e5 100644 --- a/sys/dev/hwpmc/hwpmc_amd.c +++ b/sys/dev/hwpmc/hwpmc_amd.c @@ -1175,8 +1175,6 @@ pmc_amd_initialize(void) pcd->pcd_stop_pmc = amd_stop_pmc; pcd->pcd_write_pmc = amd_write_pmc; - pmc_mdep->pmd_pcpu_init = NULL; - pmc_mdep->pmd_pcpu_fini = NULL; pmc_mdep->pmd_intr = amd_intr; pmc_mdep->pmd_switch_in = amd_switch_in; pmc_mdep->pmd_switch_out = amd_switch_out; diff --git a/sys/dev/hwpmc/hwpmc_core.c b/sys/dev/hwpmc/hwpmc_core.c index ad9d323bdb9a..76ffbdb9b0d2 100644 --- a/sys/dev/hwpmc/hwpmc_core.c +++ b/sys/dev/hwpmc/hwpmc_core.c @@ -1294,9 +1294,6 @@ pmc_core_initialize(struct pmc_mdep *md, int maxcpu, int version_override) else md->pmd_intr = core_intr; - md->pmd_pcpu_fini = NULL; - md->pmd_pcpu_init = NULL; - return (0); } diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c index e5a12b666e1b..d5de1874c59b 100644 --- a/sys/dev/hwpmc/hwpmc_mod.c +++ b/sys/dev/hwpmc/hwpmc_mod.c @@ -5490,8 +5490,6 @@ pmc_generic_cpu_initialize(void) md->pmd_cputype = PMC_CPU_GENERIC; - md->pmd_pcpu_init = NULL; - md->pmd_pcpu_fini = NULL; md->pmd_switch_in = generic_switch_in; md->pmd_switch_out = generic_switch_out; @@ -5634,8 +5632,6 @@ pmc_initialize(void) pmc_pcpu[cpu] = malloc(sizeof(struct pmc_cpu) + md->pmd_npmc * sizeof(struct pmc_hw *), M_PMC, M_WAITOK|M_ZERO); - if (md->pmd_pcpu_init) - error = md->pmd_pcpu_init(md, cpu); for (n = 0; error == 0 && n < md->pmd_nclass; n++) if (md->pmd_classdep[n].pcd_num > 0) error = md->pmd_classdep[n].pcd_pcpu_init(md, @@ -5879,8 +5875,6 @@ pmc_cleanup(void) if (md->pmd_classdep[c].pcd_num > 0) md->pmd_classdep[c].pcd_pcpu_fini(md, cpu); - if (md->pmd_pcpu_fini) - md->pmd_pcpu_fini(md, cpu); } if (md->pmd_cputype == PMC_CPU_GENERIC) diff --git a/sys/sys/pmc.h b/sys/sys/pmc.h index 558fe4b20d39..3a6052594fda 100644 --- a/sys/sys/pmc.h +++ b/sys/sys/pmc.h @@ -1043,10 +1043,6 @@ struct pmc_mdep { * Machine dependent methods. */ - /* per-cpu initialization and finalization */ - int (*pmd_pcpu_init)(struct pmc_mdep *_md, int _cpu); - int (*pmd_pcpu_fini)(struct pmc_mdep *_md, int _cpu); - /* thread context switch in/out */ int (*pmd_switch_in)(struct pmc_cpu *_p, struct pmc_process *_pp); int (*pmd_switch_out)(struct pmc_cpu *_p, struct pmc_process *_pp); From nobody Sat May 6 17:49:51 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFSJ0gcyz49syV; Sat, 6 May 2023 17:49:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QDFSH5XgRz3GSb; Sat, 6 May 2023 17:49:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UPKqcP6mgdY0vdEGK3iOOM21zT4qO7fYbIySkRGQkKU=; b=yLioIo+0iWn/ThZC+1JmMxpgWJ3II5KSZj33DQ+OPMUZpY4/LW5KzSB9KWNrC9C0ZfBS0V hSVEgm8gRhIcbd+DmN3uPFehYln0CH14Syg3GDPhfvwHMjUJZRx0nzdsxiMhs995W2ZM6m unrCNSlD/dPmRGAGOmgyB9rQBu7ngiHrRI72mgO/EQsZXiPRDck7owwrun0GQylaxpzk83 5R8TNUFQ9qG56OsWlV8NHwAaF4t38r9A6jdP7gnnpcr3EPJd3S5q4JePGFTjd8O8FyKYNV U3UnZRlbb07PLJeahK1/BrUTKiMS7bVQMXb5GSE0jGizcqYjlSCuMcNJaLNoHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UPKqcP6mgdY0vdEGK3iOOM21zT4qO7fYbIySkRGQkKU=; b=NZqIFH9igTOFpIT1KWhgTPd4vScpGd0Pb7NdF/vIsVlpC2YQL+nT5Uc0i8LGCri8qB11nF PhCmrbDZ1RVvWaSBk0FCQi1+IL5RfTHAzKzdP16FZmxzHbUj3GGVgPrVGfvj80xmI2x6/r 5CvInk4Mb0KBKwDB6TScIxLNMaUIcxMtHs0OaOyX1VgXNh/ch1NL5eWIiQTY5y1Muo/WTg fIivHYOJrVv21CqNzS/YpZ/4DhyAyPMX6c3uiNSUO8MKDUJwJDmYFlRM1sUbhd4+pmgoUa BHcMmeELvCvppp58vYrhotS1JdCMghoSDtn8HUIhzSW8YK8URhizBv0br/SRDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395391; a=rsa-sha256; cv=none; b=lhUtS3vyOIDGO6mKuGsXyvALDZwIuPPT6wecr6RsmzPfZoK65Pkp1kB6qNuCv+Zt+ccTKL X9riQ2d9e/X41vjBw24x/tXbAQH+pkYjiuR2MyaWe3NIjPyKThaW8+Zld3IOhCfFvZNydn 4ceANeFfDFU0gQk7pREbZ/rjYYSdcRdZOSTW1WtxJfoRVUig2G9XKDbTnJLtoOR4iUE4ha ZFh+hDwNy05yZAytLyTfdnTma68RA6TQf0S47FlQPQokm5psXZHzhIWuGpJRwCgvYiuM9E ALoS/vjp1GFsUvdjmmECby8Y9APc3/1ndBJ4jx9sdSo2Vcp9G6Ii+/95CuLb9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFSH496rzlwZ; Sat, 6 May 2023 17:49:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346Hnpjj018063; Sat, 6 May 2023 17:49:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346HnpM2018062; Sat, 6 May 2023 17:49:51 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:51 GMT Message-Id: <202305061749.346HnpM2018062@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: fa88954fd8f1 - main - hwpmc: remove stub pmd_switch_{in,out} methods List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa88954fd8f16ef60084a73d446a23e791ed22e5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=fa88954fd8f16ef60084a73d446a23e791ed22e5 commit fa88954fd8f16ef60084a73d446a23e791ed22e5 Author: Mitchell Horne AuthorDate: 2023-05-05 21:59:41 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:19 +0000 hwpmc: remove stub pmd_switch_{in,out} methods Most platforms (non-x86) don't require these methods and implement stub versions. If we initialize the pmc_mdep structure to always point to the generic versions, then we can purge the duplicate stubs. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39913 --- sys/dev/hwpmc/hwpmc_arm64.c | 24 ++---------------------- sys/dev/hwpmc/hwpmc_armv7.c | 24 ++---------------------- sys/dev/hwpmc/hwpmc_mod.c | 7 ++++--- sys/dev/hwpmc/hwpmc_powerpc.c | 17 ----------------- 4 files changed, 8 insertions(+), 64 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c index baf05e52b42a..e3fefc96ff8f 100644 --- a/sys/dev/hwpmc/hwpmc_arm64.c +++ b/sys/dev/hwpmc/hwpmc_arm64.c @@ -448,23 +448,6 @@ arm64_get_config(int cpu, int ri, struct pmc **ppm) return (0); } -/* - * XXX don't know what we should do here. - */ -static int -arm64_switch_in(struct pmc_cpu *pc, struct pmc_process *pp) -{ - - return (0); -} - -static int -arm64_switch_out(struct pmc_cpu *pc, struct pmc_process *pp) -{ - - return (0); -} - static int arm64_pcpu_init(struct pmc_mdep *md, int cpu) { @@ -614,11 +597,8 @@ pmc_arm64_initialize(void) pcd->pcd_stop_pmc = arm64_stop_pmc; pcd->pcd_write_pmc = arm64_write_pmc; - pmc_mdep->pmd_intr = arm64_intr; - pmc_mdep->pmd_switch_in = arm64_switch_in; - pmc_mdep->pmd_switch_out = arm64_switch_out; - - pmc_mdep->pmd_npmc += arm64_npmcs; + pmc_mdep->pmd_intr = arm64_intr; + pmc_mdep->pmd_npmc += arm64_npmcs; #ifdef DEV_ACPI if (pmc_cmn600_nclasses() > 0) diff --git a/sys/dev/hwpmc/hwpmc_armv7.c b/sys/dev/hwpmc/hwpmc_armv7.c index 34f3fd009c9d..526f9c59b4c8 100644 --- a/sys/dev/hwpmc/hwpmc_armv7.c +++ b/sys/dev/hwpmc/hwpmc_armv7.c @@ -416,23 +416,6 @@ armv7_get_config(int cpu, int ri, struct pmc **ppm) return 0; } -/* - * XXX don't know what we should do here. - */ -static int -armv7_switch_in(struct pmc_cpu *pc, struct pmc_process *pp) -{ - - return 0; -} - -static int -armv7_switch_out(struct pmc_cpu *pc, struct pmc_process *pp) -{ - - return 0; -} - static int armv7_pcpu_init(struct pmc_mdep *md, int cpu) { @@ -551,11 +534,8 @@ pmc_armv7_initialize(void) pcd->pcd_stop_pmc = armv7_stop_pmc; pcd->pcd_write_pmc = armv7_write_pmc; - pmc_mdep->pmd_intr = armv7_intr; - pmc_mdep->pmd_switch_in = armv7_switch_in; - pmc_mdep->pmd_switch_out = armv7_switch_out; - - pmc_mdep->pmd_npmc += armv7_npmcs; + pmc_mdep->pmd_intr = armv7_intr; + pmc_mdep->pmd_npmc += armv7_npmcs; return (pmc_mdep); } diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c index d5de1874c59b..fd90e62e3f2c 100644 --- a/sys/dev/hwpmc/hwpmc_mod.c +++ b/sys/dev/hwpmc/hwpmc_mod.c @@ -5453,6 +5453,10 @@ pmc_mdep_alloc(int nclasses) sizeof(struct pmc_classdep), M_PMC, M_WAITOK|M_ZERO); md->pmd_nclass = n; + /* Default methods */ + md->pmd_switch_in = generic_switch_in; + md->pmd_switch_out = generic_switch_out; + /* Add base class. */ pmc_soft_initialize(md); return md; @@ -5490,9 +5494,6 @@ pmc_generic_cpu_initialize(void) md->pmd_cputype = PMC_CPU_GENERIC; - md->pmd_switch_in = generic_switch_in; - md->pmd_switch_out = generic_switch_out; - return (md); } diff --git a/sys/dev/hwpmc/hwpmc_powerpc.c b/sys/dev/hwpmc/hwpmc_powerpc.c index 3d65d8753fcb..e2ce979d0ba8 100644 --- a/sys/dev/hwpmc/hwpmc_powerpc.c +++ b/sys/dev/hwpmc/hwpmc_powerpc.c @@ -105,20 +105,6 @@ pmc_save_kernel_callchain(uintptr_t *cc, int maxsamples, return (frames); } -static int -powerpc_switch_in(struct pmc_cpu *pc, struct pmc_process *pp) -{ - - return (0); -} - -static int -powerpc_switch_out(struct pmc_cpu *pc, struct pmc_process *pp) -{ - - return (0); -} - int powerpc_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) { @@ -564,9 +550,6 @@ pmc_md_initialize(void) vers = mfpvr() >> 16; - pmc_mdep->pmd_switch_in = powerpc_switch_in; - pmc_mdep->pmd_switch_out = powerpc_switch_out; - switch (vers) { case MPC7447A: case MPC7448: From nobody Sat May 6 17:49:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFSK08tpz49slF; Sat, 6 May 2023 17:49: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 4QDFSJ68F3z3GFF; Sat, 6 May 2023 17:49:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zxIxMGvShTPNzNwTKZx8yIv+VkAQ0DtFZIjU6IWdsao=; b=FqeSMC8nFF4tjRwqjMbc5ndkSIoEnz6IE4Y0EHVBq4yaOLLN5O0G+l70Dh9DLcZFOqS2N5 PiNJ6t/b8k9JsApdnu9AfBv0Pwyj5ISEkLfAr5JfgEdBemXfxbuiI20J+ETBFLkgy7t5Ce myUjCv8nHOiY0X2MVdbY77JievCLJQo4jE93cYebHMHxcBFazct4dpJqrjGQlWXva6e7lQ PX9UccRaUUnWdit56PARAGmZxLMbiO5rKgye+GBzv1Er1i53Q6XVY9WGrJYzVTHUGPUwcs w4i7jzHGOR5VOIxC6FF7ZlnCk6CqGczQi/gfcIrVoWyROQfI3NPzPCgol7tWHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zxIxMGvShTPNzNwTKZx8yIv+VkAQ0DtFZIjU6IWdsao=; b=Ijl/5v7sVLCisYng/Y7uGxt31HFi+3S/dFQcyiRtrOq0TxCiSdkgWNibFPsx3UTbiMVKuq 5DGyGGi6ZMX3ZvNgMtjGoaGrvucGU0pE0mS7kKp1PDR4GhonD0SFvWAam5P+SPta2C2GA2 rhcI4chxM62eygaQ0VdBbUA9verjfZBOJo6od2liC/CAUFupeMDR7iMFgijQ0q9LIrDVjL 4WEE9MfBNkbqY/Go+jH0z6GqamdEg3r2pT1r2uzchhR1tlWTNH65l7m/bT/Uq3tmHZBoJd QRr/N5tB3KnnuXTuD+en9oS3PCPfUlB/hsuiSlfOViHPgEMcwTAbF5RBjrjCQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395392; a=rsa-sha256; cv=none; b=pGwOuEXSZMME2Z1lPbAOBUFamkY44Kc6DiXT3qXZhgayVGoI7XxsYcH1gw47XrFJewA6g9 AW0by2t3wFQsvBRSjlYmgteYfZwLtKsh6mrpFu0ibAjadSrsg4I6JC8W2OHvOkat4ZS5WH 3k7qyI8E4HtxLrbakDizKgcM/oiAC2AWJQfq3UTYKt2ixCVu1aPRAc9wQ8xduj4+hL0w5z EuWpdMQjEnE02HU9jNt8+RT4m11lqz3N1I+UhMSWLLdbNHheqbBHXHq95TiUXHNs1H/B/o XJTYsiS0/EeP6QvsYWuzAfVuCz+/hPhx83l5xG70P8dyKTldWLjCA5jj6laeMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFSJ5D24zlgm; Sat, 6 May 2023 17:49:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346HnqXZ018082; Sat, 6 May 2023 17:49:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346HnqMP018081; Sat, 6 May 2023 17:49:52 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:52 GMT Message-Id: <202305061749.346HnqMP018081@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: a35453b9c764 - main - hwpmc: unused/diagused annotations in tsc class List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a35453b9c7644f11df83d0c7e73da488f521e56e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=a35453b9c7644f11df83d0c7e73da488f521e56e commit a35453b9c7644f11df83d0c7e73da488f521e56e Author: Mitchell Horne AuthorDate: 2023-05-05 21:59:53 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:19 +0000 hwpmc: unused/diagused annotations in tsc class These are preferred over casts to void. No functional change. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39914 --- sys/dev/hwpmc/hwpmc_tsc.c | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_tsc.c b/sys/dev/hwpmc/hwpmc_tsc.c index 25b2e9f8fd57..3c95ceb080a5 100644 --- a/sys/dev/hwpmc/hwpmc_tsc.c +++ b/sys/dev/hwpmc/hwpmc_tsc.c @@ -70,10 +70,9 @@ struct tsc_cpu { static struct tsc_cpu **tsc_pcpu; static int -tsc_allocate_pmc(int cpu, int ri, struct pmc *pm, +tsc_allocate_pmc(int cpu __diagused, int ri __diagused, struct pmc *pm __unused, const struct pmc_op_pmcallocate *a) { - (void) cpu; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[tsc,%d] illegal CPU value %d", __LINE__, cpu)); @@ -140,9 +139,8 @@ tsc_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) } static int -tsc_get_config(int cpu, int ri, struct pmc **ppm) +tsc_get_config(int cpu, int ri __diagused, struct pmc **ppm) { - (void) ri; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[tsc,%d] illegal CPU %d", __LINE__, cpu)); @@ -154,9 +152,8 @@ tsc_get_config(int cpu, int ri, struct pmc **ppm) } static int -tsc_get_msr(int ri, uint32_t *msr) +tsc_get_msr(int ri __diagused, uint32_t *msr) { - (void) ri; KASSERT(ri >= 0 && ri < TSC_NPMCS, ("[tsc,%d] ri %d out of range", __LINE__, ri)); @@ -252,12 +249,10 @@ tsc_read_pmc(int cpu, int ri, pmc_value_t *v) } static int -tsc_release_pmc(int cpu, int ri, struct pmc *pmc) +tsc_release_pmc(int cpu, int ri __diagused, struct pmc *pmc __unused) { struct pmc_hw *phw __diagused; - (void) pmc; - KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[tsc,%d] illegal CPU value %d", __LINE__, cpu)); KASSERT(ri == 0, @@ -275,9 +270,8 @@ tsc_release_pmc(int cpu, int ri, struct pmc *pmc) } static int -tsc_start_pmc(int cpu, int ri) +tsc_start_pmc(int cpu __diagused, int ri __diagused) { - (void) cpu; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[tsc,%d] illegal CPU value %d", __LINE__, cpu)); @@ -287,9 +281,8 @@ tsc_start_pmc(int cpu, int ri) } static int -tsc_stop_pmc(int cpu, int ri) +tsc_stop_pmc(int cpu __diagused, int ri __diagused) { - (void) cpu; (void) ri; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[tsc,%d] illegal CPU value %d", __LINE__, cpu)); @@ -299,9 +292,8 @@ tsc_stop_pmc(int cpu, int ri) } static int -tsc_write_pmc(int cpu, int ri, pmc_value_t v) +tsc_write_pmc(int cpu __diagused, int ri __diagused, pmc_value_t v __unused) { - (void) cpu; (void) ri; (void) v; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[tsc,%d] illegal CPU value %d", __LINE__, cpu)); @@ -354,7 +346,7 @@ pmc_tsc_initialize(struct pmc_mdep *md, int maxcpu) } void -pmc_tsc_finalize(struct pmc_mdep *md) +pmc_tsc_finalize(struct pmc_mdep *md __diagused) { #ifdef INVARIANTS int i, ncpus; @@ -366,9 +358,6 @@ pmc_tsc_finalize(struct pmc_mdep *md) KASSERT(md->pmd_classdep[PMC_MDEP_CLASS_INDEX_TSC].pcd_class == PMC_CLASS_TSC, ("[tsc,%d] class mismatch", __LINE__)); - -#else - (void) md; #endif free(tsc_pcpu, M_PMC); From nobody Sat May 6 17:49:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFSL0ln2z49sw4; Sat, 6 May 2023 17:49: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 4QDFSK73MLz3GWW; Sat, 6 May 2023 17:49:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HuBguxfgg+zLQ+53NeuB8Yv/d4YuuL9HB+oEZP3aJ6E=; b=I5pRLxpvT5h3cwTvQrGbxZQ2GTKirY/fnWZmnMvKxJgympuvswYeO+MKb7PQ+FzE2mzjta LDXbd0tJw5ObjXrfm9vdWjSQeuO/XlTlfYjrP+NdUJHSBKwPJCwxbJ7sYYxoFByI/YYCa4 OywqxdM91BV3EEUTXux7uaPWhetBAnxpapx1IKqUMunVEJalYJmnGtw8IzWEDual5N+Fcs eGOoOEkCVB4wZsInAwaW7HKLT6y23eoInwE9xWHHcpndykJ37Hxzr7y1x6r8ToDuhvC9rC wNUcUh6Lg/bsg0KEHhgl8PdYVY6wLawuWxWlshXVFWok0md4lFZ7yFFdF7VVPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HuBguxfgg+zLQ+53NeuB8Yv/d4YuuL9HB+oEZP3aJ6E=; b=ZOQ0VhmZhjYbU1zX1tAUpvy2JN7DdOg9d466Nqe0QWaxFM44sZlAUPPRwv9TSNiL1M339L 3tKH1nnOoAUrk27sItemXoUcLoxOWrNeth/Q4kYpINwAybSASt9dQgJeJJYz2S5D7j+ZDu +puKJRW8hb6jTRtMggBb0dkX1n4RF20JdeLzd01BX0v8iBkl2L87gdUxdK10PRVG0bVJJo gWkk/OMvM1psfE1UxpP8rqRp65RetJNyEPm/5EsinXf/Ydr7hbGMf5FMslOfVRBe0QeaW4 jYoGj1iV/vjzPtp0X/NsVfpswDp9N5D+qCA0bneDf8SKmzTzI13MdhDYvqRgOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395394; a=rsa-sha256; cv=none; b=JMaUqTV7fxGZPPlrcUMJ2EISsGNOHPD2AR8Cy8kJVaocCo7QEFvOTWtDYvImMRI9k+SS+x VLtrnjaoINIdJwn/PZMNqp0HVZ9/2uc7/5+IKt6PHcYJcymgpu629h+Rvo+CVJ96fGcGkW lJkn4STrbH/+3HU5UFGe2rF0wlXuG4TTy/4IRiDzeODQn8qTS1HcrbA2WeZQ27dbYDI5Fn CdYmy5ZEPy2oG5w/1LrytldvSX0QnayIgZhTGH/LKnJKz9DVNiLCimyX6+CLFpApWyC1Ff Llg1PdMrefg/yqEbHgi/e9o7xqS8X72JpTJAr+gChVPhC5eTkoCeiHOQRTc6Yw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFSK68n7zlnJ; Sat, 6 May 2023 17:49:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346Hnr2f018104; Sat, 6 May 2023 17:49:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346HnrUw018103; Sat, 6 May 2023 17:49:53 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:53 GMT Message-Id: <202305061749.346HnrUw018103@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: 39f92a76a99a - main - hwpmc: pass pmc pointer to more class methods List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 39f92a76a99a2ceb747250da4f2d627b9c317f8c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=39f92a76a99a2ceb747250da4f2d627b9c317f8c commit 39f92a76a99a2ceb747250da4f2d627b9c317f8c Author: Mitchell Horne AuthorDate: 2023-05-05 22:00:02 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:19 +0000 hwpmc: pass pmc pointer to more class methods In many cases this avoids an extra lookup, since the callers always have pm at hand. We can also eliminate several assertions, mostly for pm != NULL. The class methods are an internal interface, and the callers already handle such a scenario. No functional change intended. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39915 --- sys/dev/hwpmc/hwpmc_amd.c | 39 ++++----------------------- sys/dev/hwpmc/hwpmc_arm64.c | 22 +++++---------- sys/dev/hwpmc/hwpmc_armv7.c | 26 +++++------------- sys/dev/hwpmc/hwpmc_cmn600.c | 36 +++++-------------------- sys/dev/hwpmc/hwpmc_core.c | 62 ++++++------------------------------------- sys/dev/hwpmc/hwpmc_dmc620.c | 42 ++++++----------------------- sys/dev/hwpmc/hwpmc_e500.c | 2 +- sys/dev/hwpmc/hwpmc_mod.c | 34 +++++++++++++----------- sys/dev/hwpmc/hwpmc_powerpc.c | 25 +++++------------ sys/dev/hwpmc/hwpmc_powerpc.h | 8 +++--- sys/dev/hwpmc/hwpmc_soft.c | 41 ++++------------------------ sys/dev/hwpmc/hwpmc_tsc.c | 17 ++++-------- sys/dev/hwpmc/hwpmc_uncore.c | 62 ++++++------------------------------------- sys/sys/pmc.h | 12 +++++---- 14 files changed, 94 insertions(+), 334 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_amd.c b/sys/dev/hwpmc/hwpmc_amd.c index 43812951a8e5..9fe1f4f8ed87 100644 --- a/sys/dev/hwpmc/hwpmc_amd.c +++ b/sys/dev/hwpmc/hwpmc_amd.c @@ -397,11 +397,10 @@ static struct amd_cpu **amd_pcpu; */ static int -amd_read_pmc(int cpu, int ri, pmc_value_t *v) +amd_read_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t *v) { enum pmc_mode mode; const struct amd_descr *pd; - struct pmc *pm; pmc_value_t tmp; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -411,13 +410,7 @@ amd_read_pmc(int cpu, int ri, pmc_value_t *v) KASSERT(amd_pcpu[cpu], ("[amd,%d] null per-cpu, cpu %d", __LINE__, cpu)); - pm = amd_pcpu[cpu]->pc_amdpmcs[ri].phw_pmc; pd = &amd_pmcdesc[ri]; - - KASSERT(pm != NULL, - ("[amd,%d] No owner for HWPMC [cpu%d,pmc%d]", __LINE__, - cpu, ri)); - mode = PMC_TO_MODE(pm); PMCDBG2(MDP,REA,1,"amd-read id=%d class=%d", ri, pd->pm_descr.pd_class); @@ -456,24 +449,17 @@ amd_read_pmc(int cpu, int ri, pmc_value_t *v) */ static int -amd_write_pmc(int cpu, int ri, pmc_value_t v) +amd_write_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t v) { const struct amd_descr *pd; enum pmc_mode mode; - struct pmc *pm; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[amd,%d] illegal CPU value %d", __LINE__, cpu)); KASSERT(ri >= 0 && ri < AMD_NPMCS, ("[amd,%d] illegal row-index %d", __LINE__, ri)); - pm = amd_pcpu[cpu]->pc_amdpmcs[ri].phw_pmc; pd = &amd_pmcdesc[ri]; - - KASSERT(pm != NULL, - ("[amd,%d] PMC not owned (cpu%d,pmc%d)", __LINE__, - cpu, ri)); - mode = PMC_TO_MODE(pm); #ifdef HWPMC_DEBUG @@ -705,11 +691,9 @@ amd_release_pmc(int cpu, int ri, struct pmc *pmc) */ static int -amd_start_pmc(int cpu, int ri) +amd_start_pmc(int cpu, int ri, struct pmc *pm) { uint64_t config; - struct pmc *pm; - struct pmc_hw *phw; const struct amd_descr *pd; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -717,14 +701,8 @@ amd_start_pmc(int cpu, int ri) KASSERT(ri >= 0 && ri < AMD_NPMCS, ("[amd,%d] illegal row-index %d", __LINE__, ri)); - phw = &amd_pcpu[cpu]->pc_amdpmcs[ri]; - pm = phw->phw_pmc; pd = &amd_pmcdesc[ri]; - KASSERT(pm != NULL, - ("[amd,%d] starting cpu%d,pmc%d with null pmc record", __LINE__, - cpu, ri)); - PMCDBG2(MDP,STA,1,"amd-start cpu=%d ri=%d", cpu, ri); KASSERT(AMD_PMC_IS_STOPPED(pd->pm_evsel), @@ -745,10 +723,8 @@ amd_start_pmc(int cpu, int ri) */ static int -amd_stop_pmc(int cpu, int ri) +amd_stop_pmc(int cpu, int ri, struct pmc *pm) { - struct pmc *pm; - struct pmc_hw *phw; const struct amd_descr *pd; uint64_t config; int i; @@ -758,13 +734,8 @@ amd_stop_pmc(int cpu, int ri) KASSERT(ri >= 0 && ri < AMD_NPMCS, ("[amd,%d] illegal row-index %d", __LINE__, ri)); - phw = &amd_pcpu[cpu]->pc_amdpmcs[ri]; - pm = phw->phw_pmc; - pd = &amd_pmcdesc[ri]; + pd = &amd_pmcdesc[ri]; - KASSERT(pm != NULL, - ("[amd,%d] cpu%d,pmc%d no PMC to stop", __LINE__, - cpu, ri)); KASSERT(!AMD_PMC_IS_STOPPED(pd->pm_evsel), ("[amd,%d] PMC%d, CPU%d \"%s\" already stopped", __LINE__, ri, cpu, pd->pm_descr.pd_name)); diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c index e3fefc96ff8f..bbd3edf84ea0 100644 --- a/sys/dev/hwpmc/hwpmc_arm64.c +++ b/sys/dev/hwpmc/hwpmc_arm64.c @@ -211,10 +211,9 @@ arm64_allocate_pmc(int cpu, int ri, struct pmc *pm, static int -arm64_read_pmc(int cpu, int ri, pmc_value_t *v) +arm64_read_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t *v) { pmc_value_t tmp; - struct pmc *pm; register_t s; int reg; @@ -223,8 +222,6 @@ arm64_read_pmc(int cpu, int ri, pmc_value_t *v) KASSERT(ri >= 0 && ri < arm64_npmcs, ("[arm64,%d] illegal row index %d", __LINE__, ri)); - pm = arm64_pcpu[cpu]->pc_arm64pmcs[ri].phw_pmc; - /* * Ensure we don't get interrupted while updating the overflow count. */ @@ -260,17 +257,14 @@ arm64_read_pmc(int cpu, int ri, pmc_value_t *v) } static int -arm64_write_pmc(int cpu, int ri, pmc_value_t v) +arm64_write_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t v) { - struct pmc *pm; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[arm64,%d] illegal CPU value %d", __LINE__, cpu)); KASSERT(ri >= 0 && ri < arm64_npmcs, ("[arm64,%d] illegal row-index %d", __LINE__, ri)); - pm = arm64_pcpu[cpu]->pc_arm64pmcs[ri].phw_pmc; - if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) v = ARMV8_RELOAD_COUNT_TO_PERFCTR_VALUE(v); @@ -306,14 +300,10 @@ arm64_config_pmc(int cpu, int ri, struct pmc *pm) } static int -arm64_start_pmc(int cpu, int ri) +arm64_start_pmc(int cpu, int ri, struct pmc *pm) { - struct pmc_hw *phw; uint32_t config; - struct pmc *pm; - phw = &arm64_pcpu[cpu]->pc_arm64pmcs[ri]; - pm = phw->phw_pmc; config = pm->pm_md.pm_arm64.pm_arm64_evsel; /* @@ -334,7 +324,7 @@ arm64_start_pmc(int cpu, int ri) } static int -arm64_stop_pmc(int cpu, int ri) +arm64_stop_pmc(int cpu, int ri, struct pmc *pm __unused) { /* * Disable the PMCs. @@ -404,10 +394,10 @@ arm64_intr(struct trapframe *tf) error = pmc_process_interrupt(PMC_HR, pm, tf); if (error) - arm64_stop_pmc(cpu, ri); + arm64_stop_pmc(cpu, ri, pm); /* Reload sampling count */ - arm64_write_pmc(cpu, ri, pm->pm_sc.pm_reloadcount); + arm64_write_pmc(cpu, ri, pm, pm->pm_sc.pm_reloadcount); } return (retval); diff --git a/sys/dev/hwpmc/hwpmc_armv7.c b/sys/dev/hwpmc/hwpmc_armv7.c index 526f9c59b4c8..89cb27457bd2 100644 --- a/sys/dev/hwpmc/hwpmc_armv7.c +++ b/sys/dev/hwpmc/hwpmc_armv7.c @@ -160,10 +160,9 @@ armv7_allocate_pmc(int cpu, int ri, struct pmc *pm, static int -armv7_read_pmc(int cpu, int ri, pmc_value_t *v) +armv7_read_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t *v) { pmc_value_t tmp; - struct pmc *pm; register_t s; u_int reg; @@ -172,8 +171,6 @@ armv7_read_pmc(int cpu, int ri, pmc_value_t *v) KASSERT(ri >= 0 && ri < armv7_npmcs, ("[armv7,%d] illegal row index %d", __LINE__, ri)); - pm = armv7_pcpu[cpu]->pc_armv7pmcs[ri].phw_pmc; - s = intr_disable(); tmp = armv7_pmcn_read(ri, pm->pm_md.pm_armv7.pm_armv7_evsel); @@ -212,17 +209,14 @@ armv7_read_pmc(int cpu, int ri, pmc_value_t *v) } static int -armv7_write_pmc(int cpu, int ri, pmc_value_t v) +armv7_write_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t v) { - struct pmc *pm; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[armv7,%d] illegal CPU value %d", __LINE__, cpu)); KASSERT(ri >= 0 && ri < armv7_npmcs, ("[armv7,%d] illegal row-index %d", __LINE__, ri)); - pm = armv7_pcpu[cpu]->pc_armv7pmcs[ri].phw_pmc; - if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) v = ARMV7_RELOAD_COUNT_TO_PERFCTR_VALUE(v); @@ -261,14 +255,10 @@ armv7_config_pmc(int cpu, int ri, struct pmc *pm) } static int -armv7_start_pmc(int cpu, int ri) +armv7_start_pmc(int cpu, int ri, struct pmc *pm) { - struct pmc_hw *phw; uint32_t config; - struct pmc *pm; - phw = &armv7_pcpu[cpu]->pc_armv7pmcs[ri]; - pm = phw->phw_pmc; config = pm->pm_md.pm_armv7.pm_armv7_evsel; /* @@ -290,14 +280,10 @@ armv7_start_pmc(int cpu, int ri) } static int -armv7_stop_pmc(int cpu, int ri) +armv7_stop_pmc(int cpu, int ri, struct pmc *pm) { - struct pmc_hw *phw; - struct pmc *pm; uint32_t config; - phw = &armv7_pcpu[cpu]->pc_armv7pmcs[ri]; - pm = phw->phw_pmc; config = pm->pm_md.pm_armv7.pm_armv7_evsel; if (config == PMC_EV_CPU_CYCLES) ri = 31; @@ -372,10 +358,10 @@ armv7_intr(struct trapframe *tf) error = pmc_process_interrupt(PMC_HR, pm, tf); if (error) - armv7_stop_pmc(cpu, ri); + armv7_stop_pmc(cpu, ri, pm); /* Reload sampling count */ - armv7_write_pmc(cpu, ri, pm->pm_sc.pm_reloadcount); + armv7_write_pmc(cpu, ri, pm, pm->pm_sc.pm_reloadcount); } return (retval); diff --git a/sys/dev/hwpmc/hwpmc_cmn600.c b/sys/dev/hwpmc/hwpmc_cmn600.c index 82b6e553801a..762063a4a173 100644 --- a/sys/dev/hwpmc/hwpmc_cmn600.c +++ b/sys/dev/hwpmc/hwpmc_cmn600.c @@ -141,11 +141,10 @@ cmn600_pmu_writecntr(void *arg, u_int nodeid, u_int xpcntr, u_int dtccntr, * read a pmc register */ static int -cmn600_read_pmc(int cpu, int ri, pmc_value_t *v) +cmn600_read_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t *v) { int counter, local_counter, nodeid; struct cmn600_descr *desc; - struct pmc *pm; void *arg; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -155,15 +154,10 @@ cmn600_read_pmc(int cpu, int ri, pmc_value_t *v) counter = ri % CMN600_COUNTERS_N; desc = cmn600desc(ri); - pm = desc->pd_phw->phw_pmc; arg = desc->pd_rw_arg; nodeid = pm->pm_md.pm_cmn600.pm_cmn600_nodeid; local_counter = pm->pm_md.pm_cmn600.pm_cmn600_local_counter; - KASSERT(pm != NULL, - ("[cmn600,%d] No owner for HWPMC [cpu%d,pmc%d]", __LINE__, - cpu, ri)); - *v = cmn600_pmu_readcntr(arg, nodeid, local_counter, counter, 4); PMCDBG3(MDP, REA, 2, "%s id=%d -> %jd", __func__, ri, *v); @@ -174,11 +168,10 @@ cmn600_read_pmc(int cpu, int ri, pmc_value_t *v) * Write a pmc register. */ static int -cmn600_write_pmc(int cpu, int ri, pmc_value_t v) +cmn600_write_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t v) { int counter, local_counter, nodeid; struct cmn600_descr *desc; - struct pmc *pm; void *arg; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -188,7 +181,6 @@ cmn600_write_pmc(int cpu, int ri, pmc_value_t v) counter = ri % CMN600_COUNTERS_N; desc = cmn600desc(ri); - pm = desc->pd_phw->phw_pmc; arg = desc->pd_rw_arg; nodeid = pm->pm_md.pm_cmn600.pm_cmn600_nodeid; local_counter = pm->pm_md.pm_cmn600.pm_cmn600_local_counter; @@ -424,13 +416,11 @@ cmn600_encode_source(int node_type, int counter, int port, int sub) */ static int -cmn600_start_pmc(int cpu, int ri) +cmn600_start_pmc(int cpu, int ri, struct pmc *pm) { int counter, local_counter, node_type, shift; uint64_t config, occupancy, source, xp_pmucfg; struct cmn600_descr *desc; - struct pmc_hw *phw; - struct pmc *pm; uint8_t event, port, sub; uint16_t nodeid; void *arg; @@ -442,14 +432,8 @@ cmn600_start_pmc(int cpu, int ri) counter = ri % CMN600_COUNTERS_N; desc = cmn600desc(ri); - phw = desc->pd_phw; - pm = phw->phw_pmc; arg = desc->pd_rw_arg; - KASSERT(pm != NULL, - ("[cmn600,%d] starting cpu%d,pmc%d with null pmc record", __LINE__, - cpu, ri)); - PMCDBG3(MDP, STA, 1, "%s cpu=%d ri=%d", __func__, cpu, ri); config = pm->pm_md.pm_cmn600.pm_cmn600_config; @@ -541,11 +525,9 @@ cmn600_start_pmc(int cpu, int ri) */ static int -cmn600_stop_pmc(int cpu, int ri) +cmn600_stop_pmc(int cpu, int ri, struct pmc *pm) { struct cmn600_descr *desc; - struct pmc_hw *phw; - struct pmc *pm; int local_counter; uint64_t val; @@ -555,12 +537,6 @@ cmn600_stop_pmc(int cpu, int ri) ri)); desc = cmn600desc(ri); - phw = desc->pd_phw; - pm = phw->phw_pmc; - - KASSERT(pm != NULL, - ("[cmn600,%d] cpu%d,pmc%d no PMC to stop", __LINE__, - cpu, ri)); PMCDBG2(MDP, STO, 1, "%s ri=%d", __func__, ri); @@ -696,10 +672,10 @@ cmn600_pmu_intr(struct trapframe *tf, int unit, int i) error = pmc_process_interrupt(PMC_HR, pm, tf); if (error) - cmn600_stop_pmc(cpu, ri); + cmn600_stop_pmc(cpu, ri, pm); /* Reload sampling count */ - cmn600_write_pmc(cpu, ri, pm->pm_sc.pm_reloadcount); + cmn600_write_pmc(cpu, ri, pm, pm->pm_sc.pm_reloadcount); return (0); } diff --git a/sys/dev/hwpmc/hwpmc_core.c b/sys/dev/hwpmc/hwpmc_core.c index 76ffbdb9b0d2..02165898aeed 100644 --- a/sys/dev/hwpmc/hwpmc_core.c +++ b/sys/dev/hwpmc/hwpmc_core.c @@ -368,9 +368,8 @@ iaf_get_msr(int ri, uint32_t *msr) } static int -iaf_read_pmc(int cpu, int ri, pmc_value_t *v) +iaf_read_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t *v) { - struct pmc *pm; pmc_value_t tmp; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -378,12 +377,6 @@ iaf_read_pmc(int cpu, int ri, pmc_value_t *v) KASSERT(ri >= 0 && ri < core_iaf_npmc, ("[core,%d] illegal row-index %d", __LINE__, ri)); - pm = core_pcpu[cpu]->pc_corepmcs[ri + core_iaf_ri].phw_pmc; - - KASSERT(pm, - ("[core,%d] cpu %d ri %d(%d) pmc not configured", __LINE__, cpu, - ri, ri + core_iaf_ri)); - tmp = rdpmc(IAF_RI_TO_MSR(ri)); if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) @@ -421,9 +414,8 @@ iaf_release_pmc(int cpu, int ri, struct pmc *pmc) } static int -iaf_start_pmc(int cpu, int ri) +iaf_start_pmc(int cpu, int ri, struct pmc *pm) { - struct pmc *pm; struct core_cpu *cc; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -434,8 +426,6 @@ iaf_start_pmc(int cpu, int ri) PMCDBG2(MDP,STA,1,"iaf-start cpu=%d ri=%d", cpu, ri); cc = core_pcpu[cpu]; - pm = cc->pc_corepmcs[ri + core_iaf_ri].phw_pmc; - cc->pc_iafctrl |= pm->pm_md.pm_iaf.pm_iaf_ctrl; wrmsr(IAF_CTRL, cc->pc_iafctrl); @@ -450,7 +440,7 @@ iaf_start_pmc(int cpu, int ri) } static int -iaf_stop_pmc(int cpu, int ri) +iaf_stop_pmc(int cpu, int ri, struct pmc *pm) { struct core_cpu *cc; @@ -476,10 +466,9 @@ iaf_stop_pmc(int cpu, int ri) } static int -iaf_write_pmc(int cpu, int ri, pmc_value_t v) +iaf_write_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t v) { struct core_cpu *cc; - struct pmc *pm; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] illegal cpu value %d", __LINE__, cpu)); @@ -487,10 +476,6 @@ iaf_write_pmc(int cpu, int ri, pmc_value_t v) ("[core,%d] illegal row-index %d", __LINE__, ri)); cc = core_pcpu[cpu]; - pm = cc->pc_corepmcs[ri + core_iaf_ri].phw_pmc; - - KASSERT(pm, - ("[core,%d] cpu %d ri %d pmc not configured", __LINE__, cpu, ri)); if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) v = iaf_reload_count_to_perfctr_value(v); @@ -846,9 +831,8 @@ iap_get_msr(int ri, uint32_t *msr) } static int -iap_read_pmc(int cpu, int ri, pmc_value_t *v) +iap_read_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t *v) { - struct pmc *pm; pmc_value_t tmp; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -856,12 +840,6 @@ iap_read_pmc(int cpu, int ri, pmc_value_t *v) KASSERT(ri >= 0 && ri < core_iap_npmc, ("[core,%d] illegal row-index %d", __LINE__, ri)); - pm = core_pcpu[cpu]->pc_corepmcs[ri].phw_pmc; - - KASSERT(pm, - ("[core,%d] cpu %d ri %d pmc not configured", __LINE__, cpu, - ri)); - tmp = rdpmc(ri); if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) *v = iap_perfctr_value_to_reload_count(tmp); @@ -894,9 +872,8 @@ iap_release_pmc(int cpu, int ri, struct pmc *pm) } static int -iap_start_pmc(int cpu, int ri) +iap_start_pmc(int cpu, int ri, struct pmc *pm) { - struct pmc *pm; uint64_t evsel; struct core_cpu *cc; @@ -906,11 +883,6 @@ iap_start_pmc(int cpu, int ri) ("[core,%d] illegal row-index %d", __LINE__, ri)); cc = core_pcpu[cpu]; - pm = cc->pc_corepmcs[ri].phw_pmc; - - KASSERT(pm, - ("[core,%d] starting cpu%d,ri%d with no pmc configured", - __LINE__, cpu, ri)); PMCDBG2(MDP,STA,1, "iap-start cpu=%d ri=%d", cpu, ri); @@ -943,23 +915,14 @@ iap_start_pmc(int cpu, int ri) } static int -iap_stop_pmc(int cpu, int ri) +iap_stop_pmc(int cpu, int ri, struct pmc *pm __unused) { - struct pmc *pm __diagused; - struct core_cpu *cc; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] illegal cpu value %d", __LINE__, cpu)); KASSERT(ri >= 0 && ri < core_iap_npmc, ("[core,%d] illegal row index %d", __LINE__, ri)); - cc = core_pcpu[cpu]; - pm = cc->pc_corepmcs[ri].phw_pmc; - - KASSERT(pm, - ("[core,%d] cpu%d ri%d no configured PMC to stop", __LINE__, - cpu, ri)); - PMCDBG2(MDP,STO,1, "iap-stop cpu=%d ri=%d", cpu, ri); wrmsr(IAP_EVSEL0 + ri, 0); @@ -970,23 +933,14 @@ iap_stop_pmc(int cpu, int ri) } static int -iap_write_pmc(int cpu, int ri, pmc_value_t v) +iap_write_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t v) { - struct pmc *pm; - struct core_cpu *cc; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] illegal cpu value %d", __LINE__, cpu)); KASSERT(ri >= 0 && ri < core_iap_npmc, ("[core,%d] illegal row index %d", __LINE__, ri)); - cc = core_pcpu[cpu]; - pm = cc->pc_corepmcs[ri].phw_pmc; - - KASSERT(pm, - ("[core,%d] cpu%d ri%d no configured PMC to stop", __LINE__, - cpu, ri)); - if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) v = iap_reload_count_to_perfctr_value(v); diff --git a/sys/dev/hwpmc/hwpmc_dmc620.c b/sys/dev/hwpmc/hwpmc_dmc620.c index 6152e264a169..f32199df15e7 100644 --- a/sys/dev/hwpmc/hwpmc_dmc620.c +++ b/sys/dev/hwpmc/hwpmc_dmc620.c @@ -192,10 +192,10 @@ class_ri2unit(int class, int ri) * read a pmc register */ -CLASSDEP_FN3(dmc620_read_pmc, int, cpu, int, ri, pmc_value_t *, v) +CLASSDEP_FN4(dmc620_read_pmc, int, cpu, int, ri, struct pmc *, pm, + pmc_value_t *, v) { struct dmc620_descr *desc; - struct pmc *pm; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[dmc620,%d] illegal CPU value %d", __LINE__, cpu)); @@ -203,11 +203,6 @@ CLASSDEP_FN3(dmc620_read_pmc, int, cpu, int, ri, pmc_value_t *, v) ri)); desc = dmc620desc(class, cpu, ri); - pm = desc->pd_phw->phw_pmc; - - KASSERT(pm != NULL, - ("[dmc620,%d] No owner for HWPMC [cpu%d,pmc%d]", __LINE__, - cpu, ri)); PMCDBG3(MDP,REA,1,"%s id=%d class=%d", __func__, ri, class); @@ -229,10 +224,10 @@ CLASSDEP_FN3(dmc620_read_pmc, int, cpu, int, ri, pmc_value_t *, v) * Write a pmc register. */ -CLASSDEP_FN3(dmc620_write_pmc, int, cpu, int, ri, pmc_value_t, v) +CLASSDEP_FN4(dmc620_write_pmc, int, cpu, int, ri, struct pmc *, pm, + pmc_value_t, v) { struct dmc620_descr *desc; - struct pmc *pm __diagused; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[dmc620,%d] illegal CPU value %d", __LINE__, cpu)); @@ -240,11 +235,6 @@ CLASSDEP_FN3(dmc620_write_pmc, int, cpu, int, ri, pmc_value_t, v) ri)); desc = dmc620desc(class, cpu, ri); - pm = desc->pd_phw->phw_pmc; - - KASSERT(pm != NULL, - ("[dmc620,%d] PMC not owned (cpu%d,pmc%d)", __LINE__, - cpu, ri)); PMCDBG4(MDP, WRI, 1, "%s cpu=%d ri=%d v=%jx", __func__, cpu, ri, v); @@ -374,12 +364,10 @@ CLASSDEP_FN3(dmc620_release_pmc, int, cpu, int, ri, struct pmc *, pmc) * start a PMC. */ -CLASSDEP_FN2(dmc620_start_pmc, int, cpu, int, ri) +CLASSDEP_FN3(dmc620_start_pmc, int, cpu, int, ri, struct pmc *, pm) { struct dmc620_descr *desc; - struct pmc_hw *phw; uint64_t control; - struct pmc *pm; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[dmc620,%d] illegal CPU value %d", __LINE__, cpu)); @@ -387,12 +375,6 @@ CLASSDEP_FN2(dmc620_start_pmc, int, cpu, int, ri) ri)); desc = dmc620desc(class, cpu, ri); - phw = desc->pd_phw; - pm = phw->phw_pmc; - - KASSERT(pm != NULL, - ("[dmc620,%d] starting cpu%d,pmc%d with null pmc record", __LINE__, - cpu, ri)); PMCDBG3(MDP, STA, 1, "%s cpu=%d ri=%d", __func__, cpu, ri); @@ -418,11 +400,9 @@ CLASSDEP_FN2(dmc620_start_pmc, int, cpu, int, ri) * Stop a PMC. */ -CLASSDEP_FN2(dmc620_stop_pmc, int, cpu, int, ri) +CLASSDEP_FN3(dmc620_stop_pmc, int, cpu, int, ri, struct pmc *, pm) { struct dmc620_descr *desc; - struct pmc_hw *phw; - struct pmc *pm; uint64_t control; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -431,12 +411,6 @@ CLASSDEP_FN2(dmc620_stop_pmc, int, cpu, int, ri) ri)); desc = dmc620desc(class, cpu, ri); - phw = desc->pd_phw; - pm = phw->phw_pmc; - - KASSERT(pm != NULL, - ("[dmc620,%d] cpu%d,pmc%d no PMC to stop", __LINE__, - cpu, ri)); PMCDBG2(MDP, STO, 1, "%s ri=%d", __func__, ri); @@ -564,10 +538,10 @@ dmc620_intr(struct trapframe *tf, int class, int unit, int i) error = pmc_process_interrupt(PMC_HR, pm, tf); if (error) - dmc620_stop_pmc(class, cpu, ri); + dmc620_stop_pmc(class, cpu, ri, pm); /* Reload sampling count */ - dmc620_write_pmc(class, cpu, ri, pm->pm_sc.pm_reloadcount); + dmc620_write_pmc(class, cpu, ri, pm, pm->pm_sc.pm_reloadcount); return (0); } diff --git a/sys/dev/hwpmc/hwpmc_e500.c b/sys/dev/hwpmc/hwpmc_e500.c index b82bada95fe3..020337830eb5 100644 --- a/sys/dev/hwpmc/hwpmc_e500.c +++ b/sys/dev/hwpmc/hwpmc_e500.c @@ -341,7 +341,7 @@ e500_pcpu_init(struct pmc_mdep *md, int cpu) for (i = 0; i < E500_MAX_PMCS; i++) /* Initialize the PMC to stopped */ - powerpc_stop_pmc(cpu, i); + e500_set_pmc(cpu, i, PMCN_NONE); /* Unfreeze global register. */ mtpmr(PMR_PMGC0, PMGC_PMIE | PMGC_FCECE); diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c index fd90e62e3f2c..0c39271cf991 100644 --- a/sys/dev/hwpmc/hwpmc_mod.c +++ b/sys/dev/hwpmc/hwpmc_mod.c @@ -1488,7 +1488,7 @@ pmc_process_csw_in(struct thread *td) PMCDBG3(CSW,SWI,1,"cpu=%d ri=%d new=%jd", cpu, ri, newvalue); - pcd->pcd_write_pmc(cpu, adjri, newvalue); + pcd->pcd_write_pmc(cpu, adjri, pm, newvalue); /* If a sampling mode PMC, reset stalled state. */ if (PMC_TO_MODE(pm) == PMC_MODE_TS) @@ -1498,7 +1498,7 @@ pmc_process_csw_in(struct thread *td) pm->pm_pcpu_state[cpu].pps_cpustate = 1; /* Start the PMC. */ - pcd->pcd_start_pmc(cpu, adjri); + pcd->pcd_start_pmc(cpu, adjri, pm); } /* @@ -1601,7 +1601,7 @@ pmc_process_csw_out(struct thread *td) */ pm->pm_pcpu_state[cpu].pps_cpustate = 0; if (pm->pm_pcpu_state[cpu].pps_stalled == 0) - pcd->pcd_stop_pmc(cpu, adjri); + pcd->pcd_stop_pmc(cpu, adjri, pm); KASSERT(counter_u64_fetch(pm->pm_runcount) > 0, ("[pmc,%d] pm=%p runcount %ld", __LINE__, (void *) pm, @@ -1625,7 +1625,7 @@ pmc_process_csw_out(struct thread *td) ("[pmc,%d] pp refcnt = %d", __LINE__, pp->pp_refcnt)); - pcd->pcd_read_pmc(cpu, adjri, &newvalue); + pcd->pcd_read_pmc(cpu, adjri, pm, &newvalue); if (mode == PMC_MODE_TS) { PMCDBG3(CSW,SWO,1,"cpu=%d ri=%d val=%jd (samp)", @@ -2824,7 +2824,7 @@ pmc_release_pmc_descriptor(struct pmc *pm) PMCDBG2(PMC,REL,2, "stopping cpu=%d ri=%d", cpu, ri); critical_enter(); - pcd->pcd_stop_pmc(cpu, adjri); + pcd->pcd_stop_pmc(cpu, adjri, pm); critical_exit(); } @@ -3246,7 +3246,7 @@ pmc_start(struct pmc *pm) pm->pm_state = PMC_STATE_RUNNING; critical_enter(); - if ((error = pcd->pcd_write_pmc(cpu, adjri, + if ((error = pcd->pcd_write_pmc(cpu, adjri, pm, PMC_IS_SAMPLING_MODE(mode) ? pm->pm_sc.pm_reloadcount : pm->pm_sc.pm_initial)) == 0) { @@ -3256,7 +3256,7 @@ pmc_start(struct pmc *pm) /* Indicate that we desire this to run. Start it. */ pm->pm_pcpu_state[cpu].pps_cpustate = 1; - error = pcd->pcd_start_pmc(cpu, adjri); + error = pcd->pcd_start_pmc(cpu, adjri, pm); } critical_exit(); @@ -3321,8 +3321,9 @@ pmc_stop(struct pmc *pm) pm->pm_pcpu_state[cpu].pps_cpustate = 0; critical_enter(); - if ((error = pcd->pcd_stop_pmc(cpu, adjri)) == 0) - error = pcd->pcd_read_pmc(cpu, adjri, &pm->pm_sc.pm_initial); + if ((error = pcd->pcd_stop_pmc(cpu, adjri, pm)) == 0) + error = pcd->pcd_read_pmc(cpu, adjri, pm, + &pm->pm_sc.pm_initial); critical_exit(); pmc_restore_cpu_binding(&pb); @@ -4400,7 +4401,7 @@ pmc_syscall_handler(struct thread *td, void *syscall_args) if ((pm->pm_flags & PMC_F_ATTACHED_TO_OWNER) && (pm->pm_state == PMC_STATE_RUNNING)) error = (*pcd->pcd_read_pmc)(cpu, adjri, - &oldvalue); + pm, &oldvalue); else oldvalue = pm->pm_gv.pm_savedvalue; } @@ -4425,13 +4426,14 @@ pmc_syscall_handler(struct thread *td, void *syscall_args) critical_enter(); /* save old value */ - if (prw.pm_flags & PMC_F_OLDVALUE) + if (prw.pm_flags & PMC_F_OLDVALUE) { if ((error = (*pcd->pcd_read_pmc)(cpu, adjri, - &oldvalue))) + pm, &oldvalue))) goto error; + } /* write out new value */ if (prw.pm_flags & PMC_F_NEWVALUE) - error = (*pcd->pcd_write_pmc)(cpu, adjri, + error = (*pcd->pcd_write_pmc)(cpu, adjri, pm, prw.pm_value); error: critical_exit(); @@ -5028,7 +5030,7 @@ pmc_process_samples(int cpu, ring_type_t ring) continue; pm->pm_pcpu_state[cpu].pps_stalled = 0; - (*pcd->pcd_start_pmc)(cpu, adjri); + (*pcd->pcd_start_pmc)(cpu, adjri, pm); } } @@ -5162,11 +5164,11 @@ pmc_process_exit(void *arg __unused, struct proc *p) if (pm->pm_pcpu_state[cpu].pps_cpustate) { pm->pm_pcpu_state[cpu].pps_cpustate = 0; if (!pm->pm_pcpu_state[cpu].pps_stalled) { - (void) pcd->pcd_stop_pmc(cpu, adjri); + (void) pcd->pcd_stop_pmc(cpu, adjri, pm); if (PMC_TO_MODE(pm) == PMC_MODE_TC) { pcd->pcd_read_pmc(cpu, adjri, - &newvalue); + pm, &newvalue); tmp = newvalue - PMC_PCPU_SAVED(cpu,ri); diff --git a/sys/dev/hwpmc/hwpmc_powerpc.c b/sys/dev/hwpmc/hwpmc_powerpc.c index e2ce979d0ba8..7c9a9395ab46 100644 --- a/sys/dev/hwpmc/hwpmc_powerpc.c +++ b/sys/dev/hwpmc/hwpmc_powerpc.c @@ -248,19 +248,17 @@ powerpc_release_pmc(int cpu, int ri, struct pmc *pmc) } int -powerpc_start_pmc(int cpu, int ri) +powerpc_start_pmc(int cpu, int ri, struct pmc *pm) { - struct pmc *pm; PMCDBG2(MDP,STA,1,"powerpc-start cpu=%d ri=%d", cpu, ri); - pm = powerpc_pcpu[cpu]->pc_ppcpmcs[ri].phw_pmc; powerpc_set_pmc(cpu, ri, pm->pm_md.pm_powerpc.pm_powerpc_evsel); return (0); } int -powerpc_stop_pmc(int cpu, int ri) +powerpc_stop_pmc(int cpu, int ri, struct pmc *pm __unused) { PMCDBG2(MDP,STO,1, "powerpc-stop cpu=%d ri=%d", cpu, ri); powerpc_set_pmc(cpu, ri, PMCN_NONE); @@ -363,9 +361,8 @@ powerpc_pmcn_write_default(unsigned int pmc, uint32_t val) } int -powerpc_read_pmc(int cpu, int ri, pmc_value_t *v) +powerpc_read_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t *v) { - struct pmc *pm; pmc_value_t p, r, tmp; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -373,11 +370,6 @@ powerpc_read_pmc(int cpu, int ri, pmc_value_t *v) KASSERT(ri >= 0 && ri < ppc_max_pmcs, ("[powerpc,%d] illegal row index %d", __LINE__, ri)); - pm = powerpc_pcpu[cpu]->pc_ppcpmcs[ri].phw_pmc; - KASSERT(pm, - ("[core,%d] cpu %d ri %d pmc not configured", __LINE__, cpu, - ri)); - /* * After an interrupt occurs because of a PMC overflow, the PMC value * is not always MAX_PMC_VALUE + 1, but may be a little above it. @@ -416,9 +408,8 @@ powerpc_read_pmc(int cpu, int ri, pmc_value_t *v) } int -powerpc_write_pmc(int cpu, int ri, pmc_value_t v) +powerpc_write_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t v) { - struct pmc *pm; pmc_value_t vlo; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -426,8 +417,6 @@ powerpc_write_pmc(int cpu, int ri, pmc_value_t v) KASSERT(ri >= 0 && ri < ppc_max_pmcs, ("[powerpc,%d] illegal row-index %d", __LINE__, ri)); - pm = powerpc_pcpu[cpu]->pc_ppcpmcs[ri].phw_pmc; - if (PMC_IS_COUNTING_MODE(PMC_TO_MODE(pm))) { PPC_OVERFLOWCNT(pm) = v / (POWERPC_MAX_PMC_VALUE + 1); vlo = v % (POWERPC_MAX_PMC_VALUE + 1); @@ -482,7 +471,7 @@ powerpc_pmc_intr(struct trapframe *tf) if ((pm = pc->pc_ppcpmcs[i].phw_pmc) != NULL && PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) { if (pm->pm_state != PMC_STATE_RUNNING) { - powerpc_write_pmc(cpu, i, + powerpc_write_pmc(cpu, i, pm, pm->pm_sc.pm_reloadcount); continue; } @@ -504,11 +493,11 @@ powerpc_pmc_intr(struct trapframe *tf) PMCDBG3(MDP,INT,3, "cpu=%d ri=%d: error %d processing interrupt", cpu, i, error); - powerpc_stop_pmc(cpu, i); + powerpc_stop_pmc(cpu, i, pm); } /* Reload sampling count */ - powerpc_write_pmc(cpu, i, pm->pm_sc.pm_reloadcount); + powerpc_write_pmc(cpu, i, pm, pm->pm_sc.pm_reloadcount); } if (retval) diff --git a/sys/dev/hwpmc/hwpmc_powerpc.h b/sys/dev/hwpmc/hwpmc_powerpc.h index 25b041327b84..efd7aca1b9ef 100644 --- a/sys/dev/hwpmc/hwpmc_powerpc.h +++ b/sys/dev/hwpmc/hwpmc_powerpc.h @@ -101,13 +101,13 @@ int powerpc_pcpu_fini(struct pmc_mdep *md, int cpu); int powerpc_allocate_pmc(int cpu, int ri, struct pmc *pm, const struct pmc_op_pmcallocate *a); int powerpc_release_pmc(int cpu, int ri, struct pmc *pmc); -int powerpc_start_pmc(int cpu, int ri); -int powerpc_stop_pmc(int cpu, int ri); +int powerpc_start_pmc(int cpu, int ri, struct pmc *pm); +int powerpc_stop_pmc(int cpu, int ri, struct pmc *pm); *** 389 LINES SKIPPED *** From nobody Sat May 6 17:56:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFcT2j9xz49tHY; Sat, 6 May 2023 17:56:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QDFcS6nWnz3Mjl; Sat, 6 May 2023 17:56:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.17.1/8.17.1) with ESMTPS id 346Huepf092455 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sat, 6 May 2023 20:56:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 346Huepf092455 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 346HueJv092454; Sat, 6 May 2023 20:56:40 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 6 May 2023 20:56:40 +0300 From: Konstantin Belousov To: Dag-Erling =?utf-8?B?U23DuHJncmF2?= Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 5807f35c541c - main - dd: Fix SIGINT handling. Message-ID: References: <202305051245.345CjNLE048275@gitrepo.freebsd.org> <86a5yhy5oe.fsf@ltc.des.no> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86a5yhy5oe.fsf@ltc.des.no> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home X-Rspamd-Queue-Id: 4QDFcS6nWnz3Mjl X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Sat, May 06, 2023 at 03:01:53PM +0200, Dag-Erling Smørgrav wrote: > Konstantin Belousov writes: > > This does not fix SIGINT handler, it only (significantly) reduces the window > > where the issue could occur. > > Yes, it does. I think you fundamentally misunderstand the intent of the > patch. I know there is a tiny race but it's still a vast improvement on > the original. > > > See my latest comment on the review. > > See my reply. I do not see a reply to my last comment in the review. From nobody Sat May 6 18:55:52 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDGwT19Xgz48yGx; Sat, 6 May 2023 18:55: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 4QDGwT0Y7Rz3jG3; Sat, 6 May 2023 18:55:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683399353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Uy/XFeEGlehM0/4vUhVc3s6a6VC1FCWNezy3mKVLc8=; b=TJwuoIlBNYXKsLnGIel60L7hm2m49N8J3rTqqiWvhc1XdMMMNjHHUkwbNn+NZ47D1PlIzX xnveEScC/PES+0ZGXs0pmdwHb4twm0TfwdN3fnuh3XFgaSWyPX7aNmxEEjKXozKw1vBVRd kvx8rFsyvEUPz8lFQ/gUz520bEnMRODIA7HwP7cV8NDJmMjXG+xT27Y6TTjKOPedGZBMB6 C8RlOOrAQsTPGBh5rOhHa/eJAZeqtUAz4lHbtetyF6EIXUmKPvGAcooZ/QB4BiziCQ6V6J LTKEl20wiVH3sk8FGLL6X0fXTLNoFouBch1yTmt5llTuT8qTmez9HzS7nvMY9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683399353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Uy/XFeEGlehM0/4vUhVc3s6a6VC1FCWNezy3mKVLc8=; b=M1QTZ66Pyj3iP+p3dez1ST6Rqf93yQ1xzxuNbQdc7rqfPF+EUgyK6FPb0Jjwc0vQMv1iZA ycDCCZjgECF5zA9Lqr8EXcfWzFn5BBCso4rAked/c0a4s7+pqxAhqy0A5lim5nR8wuktEL UgXE0yqpVf3fkTxUuB43ZJPHMNif3pnLgrUW0urjhro0vfhD4Iworq9hHfFz2ncNEph/bP 1G22/rK1aaVjbdNNNH3GSlPmGlaJj1gc4J8gk4GNIrFm2Bgp77olikwKMOIyqS8h+ooE1c MYUwtFRgwysM8jngJTLD/Iav42T7dSAaNRN3Y0SrpVrnCCxotamiUWDs4tzvyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683399353; a=rsa-sha256; cv=none; b=anvRibZJ4noH3fDE5YlOCowDbrlOuwC5kUHldB9OqfiBcFaROQ0Nog8g8xioJeQ4xa89J9 PaDxubnl5EChmwv1LMg7xUWVJKKkpqCP/dNPNBhyv11ByQ5EwdnI/vapeojTp3z7Bv4faW gVw5cQoopkIpbuIWG84F1MPMnsHIm9VUI7m5F90u6+/+5YTy2A1+xQqYi5mmqy3Sjcn2FS 02b2yGdPCyU+0vtAQwIfgsQCt9JcNnJDLkbeArsKoCSIvn9foXyfFneIqFGGzaMr15ESSS ZXfpXyZI/zxY7Cj+v3cqwJ55CtfX8R91NPpx2V9KgHEvUPzBaC0pk9+DEXIsyw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDGwS6hWkznw2; Sat, 6 May 2023 18:55:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346Itqa3032643; Sat, 6 May 2023 18:55:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346Itqoq032642; Sat, 6 May 2023 18:55:52 GMT (envelope-from git) Date: Sat, 6 May 2023 18:55:52 GMT Message-Id: <202305061855.346Itqoq032642@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 899ba534a50a - stable/13 - release: Report disk image filename List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 899ba534a50a82ef994c9b9034e6efbe0cb70832 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=899ba534a50a82ef994c9b9034e6efbe0cb70832 commit 899ba534a50a82ef994c9b9034e6efbe0cb70832 Author: Ed Maste AuthorDate: 2022-05-16 18:37:21 +0000 Commit: Ed Maste CommitDate: 2023-05-06 18:55:33 +0000 release: Report disk image filename For someone new to the release bits it's not always clear what files are being created. Report the disk image name explicitly. Reviewed by: gjb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39953 (cherry picked from commit 4194bbb34c60a5bf0fd0ba28f7bfa20b7842ba3f) --- release/tools/vmimage.subr | 2 ++ 1 file changed, 2 insertions(+) diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index 6e0c1ea633e2..bd592c94ec38 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -251,6 +251,8 @@ vm_create_disk() { ${ROOTFSPART} \ -o ${VMIMAGE} + echo "Disk image ${VMIMAGE} created." + if [ ${ESP} = "yes" ]; then rm ${espfilename} fi From nobody Sat May 6 18:55:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDGwV1msnz48yGy; Sat, 6 May 2023 18:55: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 4QDGwV1JFVz3jVM; Sat, 6 May 2023 18:55:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683399354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E7dnJG9zkUGeurMAqPHaBTg+ETATJ2OrVFn3AGnbI3o=; b=koLtXq8YaWmw+ZbT0n1DaE392o3VfwfKLF24DxI7SxvoH1RK/lHSmJL9TSsZvoZ0JcHWPc Wyb1lPJI8iARAkb1Z8/QfJtUvnZvpSP8nTuekRXnrTS0Nbk/ukPh5NhZaJQMcEvETy2aXP I+fsUSlX4piWmT6gO/gfQcterCzD4fAiG4zI2R40P1BCsX2tr0hnqwek939nAdf2eFsyt3 4kBt7S96leX7mEXS8ABXPLDe6wT51H6/awT19WhaE8pHzKYN/Lx440PRgrHULBqI9auVav ZCiOKiI0yljwBbWk3BTukDEXUZfvBTLpWmFP1yI01zD2r9teX4g9t/7OanuLjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683399354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E7dnJG9zkUGeurMAqPHaBTg+ETATJ2OrVFn3AGnbI3o=; b=Oy1Ee+D2ifFRfzIe029iywAYLUA4BXQMdXh01pXn4YyRkrCfwKBSj02Nr2GrRib7ITdKBO Ml8pADs1TbMPPXPdYdYfN+sygE020t4NV4gYjbSjr/aEr5pQXmUJigYPfQLi2CSzdW+dwk CK/2SRkycJcuEczEivpqSVoKkVICPPjeWRyzJMbQyu1zNDR6hSXgWQwtmlKgJubkWxDAlI 9KBN20G7OIh05P9YFXFuY3agizZARmKoc9en42IrlxEboUQGMjfxETvMhoSJSKlLEJdHhF kqZPmRhWsj/xpiH+7jCVuiKLq26NVJzw/9cJO32utpLmlVbXtv4c5b/hwYq+MQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683399354; a=rsa-sha256; cv=none; b=QYTCnYU03q/8lz4t7QlMn6Ho28gF8OvQZhlXwLorFzRNWTViwSLloNUf6yWcKR2Ys4vQ37 x7xeRA7oGcjwdYkPOyz4Z6cAkkoanJz5rNRYhZ+jAS5IPHAuCe6RnOuoKk9UG2UTT5UVMU rnuZkhrPRJaejKxiqkV25j0csZoJV0k7rACqyt+HprLvgRuCJVAhHbJ6WeweT5+/4nVpM1 uxUtzPo2r1nRmED+VzXTKr84CHS0Bhpor+LMw4WOLbsyeOluKTeDghhwZrIji63rg+FJPu rfVZEon9XkqUQhEHL0rtm6sLnFzFgnpUCb1CxdNHeHPFfnHLoYnE8mMQZpsd3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDGwV0NvLznLx; Sat, 6 May 2023 18:55:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346Itrx0032671; Sat, 6 May 2023 18:55:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346Itrtj032670; Sat, 6 May 2023 18:55:53 GMT (envelope-from git) Date: Sat, 6 May 2023 18:55:53 GMT Message-Id: <202305061855.346Itrtj032670@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: a0ef7a056027 - stable/13 - src.conf: add WITH_TOOLCHAIN description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a0ef7a056027d2046efaad8fa8a038475bcaba52 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a0ef7a056027d2046efaad8fa8a038475bcaba52 commit a0ef7a056027d2046efaad8fa8a038475bcaba52 Author: Ed Maste AuthorDate: 2023-05-02 17:27:18 +0000 Commit: Ed Maste CommitDate: 2023-05-06 18:55:33 +0000 src.conf: add WITH_TOOLCHAIN description It is not used by the in-tree default configuration, but adding it allows downstream projects with different defaults to make use of Cirrus-CI (as the makeman test added in 85e8c2a03490 requires that there are no missing option descriptions). Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39936 (cherry picked from commit fc2e2c950d97166ab32ca24134a37986ccaf94ab) --- tools/build/options/WITH_TOOLCHAIN | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/build/options/WITH_TOOLCHAIN b/tools/build/options/WITH_TOOLCHAIN new file mode 100644 index 000000000000..62624bf9e28b --- /dev/null +++ b/tools/build/options/WITH_TOOLCHAIN @@ -0,0 +1,2 @@ +Install programs used for software development such as +compilers, debuggers, linkers etc.