From nobody Thu Aug 6 22:52:55 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hGMy11SG6z6nNj6 for ; Thu, 06 Aug 2026 22:53:13 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hGMy01zhLz3VxZ for ; Thu, 06 Aug 2026 22:53:12 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); arc=pass ("google.com:s=arc-20260327:i=1"); spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.208.45 as permitted sender) smtp.mailfrom=asomers@gmail.com Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-6a1a546a6bbso1681545a12.1 for ; Thu, 06 Aug 2026 15:53:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1786056790; cv=none; d=google.com; s=arc-20260327; b=AvDhq2nAX7NfR4tvNiWm1/UC/xgYI5NNMC1Zr1WxebzJVsYBdcw9rk5mmgSD82oICi luiSh8J5J/jWqc2/so6fV+4h9+hmR3wluwyDa24ZCjNbNuNw3/JdsGOnh+6k+HoJrzdS 9Xzuq+DWtZMbmzqN/NoCgQ+Z6IDloSxxEm6fFKFmjMGPlRcGuwZ3EtpWNNWQW4hF8Pd+ QFGwmd29xdO8yeUGikxnhe0XpfuIl8S3GrZ/Q0C4hher273skcqMv6sn0EigqdD4BWsg fzwZQVaEq13pTBJWaIoN4RwTK80bGRddjOl8kKqK78jOcpZcZ6QDyIsieSRlxdwhdBp9 SlGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=61buXlabPcoQKx90Ar2Zi3F0bLWNSi4aWovAe8WuXgE=; fh=ddB8C4KSzLCmCgNPTJmNHJxqgXIDt9+cynexa+fR57o=; b=MwNMvJyOS1UGuRM87CzYPKJH0iBJIVOY0N0BDncQL6dzJFrhANgshK3b6UC072O6j4 UPJz2iUQmDbgWqbUBeQl6EMimx2ZRuR7YUlQtKQ0p7WIzj7G/sdSWdoL5CbPG3VfVtiK 7luBns95C35iSIqrz1ypCAtow33tEpZsCx9XdUYI/3JEfYXFqd8+HDmLc5seECaUD+8A q7Ep/Zir9PPLbhibJ4CUi+gYefVp99XCBSQEnBoQ1u4bl2+bbPIWm6EwKLvXSLBtOtL8 TA5JfjKPMzYg8j9RbgHskwSuv+DpV4a8wp36jX72eXI12dIvZ24vfluMIfdfIhNk86pd 62eg==; darn=freebsd.org ARC-Authentication-Results: i=1; mx.google.com; arc=none X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786056790; x=1786661590; h=content-transfer-encoding:content-type:cc:to:subject:message-id :date:from:in-reply-to:references:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=61buXlabPcoQKx90Ar2Zi3F0bLWNSi4aWovAe8WuXgE=; b=mjYgKHNmmLOl/TyTjv2Yf7T6BEBE5aBa91N358nF1+Mi+120li+hztHoWc0ywWCMWX bQSmWOQXWN0BA4E/Fn0UXbLRjeL2NE02oKAeWz2DAqrTmaKzIxO7egxQKWQ5Q+GKRd+0 /osfUcZ9i8jqOiIdjWMIBJDNH2qXX6oTFYbiXBZ+1/ic/u+lHaOOAaxSwayRCQwvrZxt xgLnI6Urir2mds7Lpa2AI7l2AKII97zyzT7Enf4zyHJGhuB+EoB+JoYlgLHVxnJJe9k3 ILwlcMWEgMbJRS50DchIMgojLE6f/STN1xiL0p6MNQC2SQQnp7VMoxqgVW3efnWBSSHC W2Jw== X-Forwarded-Encrypted: i=1; AHgh+RrS3r3Xb5xM9jpq9UPE132KK/wLbbU6is1AnlZANZFyWvjQqKKCZjyHdHZH+OmiXYUMnaEfOkAp610Z1aegkPKgS1VU@freebsd.org X-Gm-Message-State: AOJu0Yw5ihjfzrvNHqjJuFjv7h7IEgAL2PnSnE1VW9DaFCJnhUCKntGX H1n3IlfJIYT2GxfNIBtL8M7VKS4rdhHU22ApE3XMSF6RYjx8y2stq/s5/8cgcymMy8BxMz5aeIJ Y3L5JIGdmkJ18atazYOpqNEOi2ztVkrI= X-Gm-Gg: AR+sD10+0WQfWtHmTCSLsn97YsEdEFfnZYfwdAWbllHcit9DN8tpePGtj/aObWrM8hG J1uRzFtIpafMfAG/SQ3DtHCofnViLLsXPlzc+1UQQMC4hN+U5uGbVja7kF6pigdvxidxLpssZsK TCDBWPJLBesC2fICfW/QmZZ14CH+mCoJJzjNGZOMxvM8oUaDAxNUd8Cy9k4A1SmYd6CGuiqP34B YGmjaz8XFCJKXz73bwcFUwnqzUxgXmyRj4cM9yb51gsewls4hYj6m4Hr7chvYe20PSW6uPDeY1Z NC+1kntnRSh/W82Wyo50QBkmvKs86RWYupmpbXcVkGZNMqWsR54yzg67ETByaMuWQesgfSFFKXr 1G+wGDDiqtLDtyCJLat5JGBsqjnXiPw== X-Received: by 2002:a05:6402:190b:b0:697:e953:d14d with SMTP id 4fb4d7f45d1cf-6a1b4b9a7c9mr2469696a12.17.1786056789700; Thu, 06 Aug 2026 15:53:09 -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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 References: <6a70e844.251cb.6995429f@gitrepo.freebsd.org> In-Reply-To: From: Alan Somers Date: Thu, 6 Aug 2026 16:52:55 -0600 X-Gm-Features: AUfX_mxvMUIl2a1PrJquWouPDSUW2W1BNZw38JqBzZ7qkTvuLoA3I9qc-OTVh-8 Message-ID: Subject: Re: git: 4bd01d6ae016 - main - fts: refactor to use fd-relative operations internally To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Jitendra Bhati Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-3.87 / 15.00]; ARC_ALLOW(-1.00)[google.com:s=arc-20260327:i=1]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.97)[-0.966]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MISSING_XM_UA(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FREEFALL_USER(0.00)[asomers]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; RCVD_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.45:from]; R_DKIM_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.45:from]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4hGMy01zhLz3VxZ X-Spamd-Bar: --- On Tue, Aug 4, 2026 at 4:06=E2=80=AFPM Mark Johnston wr= ote: > > On Tue, Aug 04, 2026 at 01:33:40PM -0600, Alan Somers wrote: > > Try this patch. It works for me. I don't have an ATF regression test > > to go with it, though: > > This fixes the test failures, but I'm still seeing some weirdness when > running tests in parallel: one test is doing something which exhausts > all of the free vnodes in the kernel, and that causes a bunch of other > tests to time out. At some point the system recovers and carries on > normally. I'm not sure what the offending test is, but maybe there is a > file descriptor leak somewhere in the change, or some problem with the > compat implementation? > > > diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c > > index 204340e4b87f..3dd9b6432a2c 100644 > > --- a/lib/libc/gen/fts.c > > +++ b/lib/libc/gen/fts.c > > @@ -489,8 +489,7 @@ fts_read(FTS *sp) > > * FTS_STOP or the fts_info field of the node. > > */ > > if (sp->fts_child !=3D NULL) { > > - if (fts_safe_changedir(sp, p, > > - p->fts_dirfd, p->fts_name)) { > > + if (fts_safe_changedir(sp, p, -1, p->fts_name))= { > > p->fts_errno =3D errno; > > p->fts_flags |=3D FTS_DONTCHDIR; > > for (p =3D sp->fts_child; p !=3D NULL; > > > > > > On Tue, Aug 4, 2026 at 1:00=E2=80=AFPM Alan Somers wrote: > > > > > > On Tue, Aug 4, 2026 at 12:58=E2=80=AFPM Mark Johnston wrote: > > > > > > > > On Mon, Aug 03, 2026 at 07:13:08PM +0000, Alan Somers wrote: > > > > > The branch main has been updated by asomers: > > > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D4bd01d6ae01632501b= 63438b8d9a401db9744a78 > > > > > > > > > > commit 4bd01d6ae01632501b63438b8d9a401db9744a78 > > > > > Author: Jitendra Bhati > > > > > AuthorDate: 2026-06-12 17:07:55 +0000 > > > > > Commit: Alan Somers > > > > > CommitDate: 2026-08-03 19:12:28 +0000 > > > > > > > > > > fts: refactor to use fd-relative operations internally > > > > > > > > > > Replace all _open() calls with _openat() in __fts_open(), fts= _read(), > > > > > and fts_children(). Replace statfs() with _fstatfs(). > > > > > > > > > > Add fts_dirfd to struct _ftsent, set to the file descriptor o= f the > > > > > parent directory. Callers can use openat(ent->fts_dirfd, ent-= >fts_name, > > > > > ...) to access files safely without relying on fts_accpath, w= hich > > > > > enables programs in capability mode to open the files describ= ed by > > > > > _ftsent. > > > > > > > > > > This is a preparatory change for fts_openat() which will allo= w callers > > > > > to provide a pre-opened directory fd, enabling fts(3) travers= al inside > > > > > Capsicum capability mode. > > > > > > > > > > Mirror all fts_open() changes to fts_open_b(). > > > > > > > > > > As a result of expanding _ftsend, publish new ELF symbol vers= ions for > > > > > fts_openat and related functions. > > > > > > > > > > Sponsored by: Google LLC (GSoC 2026) > > > > > Reviewed by: asomers > > > > > Pull Request: https://github.com/freebsd/freebsd-src/pull/2= 303 > > > > > > > > Quite a few regression tests seem to be failing after this commit, = e.g., > > > > some of the makefs tests: https://ci.freebsd.org/job/FreeBSD-main-a= md64-test/29201/ > > > > > > I'm testing a fix now. I should have something ready for you soon. The fix is committed now, as 74bd6fb1eb02 . Sorry for the trouble.