From nobody Wed Jun 24 00:10:07 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4glMlK4fq8z6h966 for ; Wed, 24 Jun 2026 00:10:21 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4glMlK44Wpz3k7q for ; Wed, 24 Jun 2026 00:10:21 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-c07d76ffd0fso47154366b.0 for ; Tue, 23 Jun 2026 17:10:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1782259820; cv=none; d=google.com; s=arc-20240605; b=inFDEhDpjQ2P5iYrbFfCS7ZV4YfO1qiYf188iYLEdGfAqTo+8PdvByFYFi2oiypsSa h+thLUJ71dI7WL7YI2GRho3Z8sKVwC06AScfD9ljwMjhPrucLgLNV1vbew8Axph49eCp MQepQLXbSWGfax8/IgJUYupddK4PoEr5E11/wZq17SbhqKKk2VOExjRFoNDgCtKr/tgl s37yTJ438qKaO7m4FGYaStGnFwwHInJJBbTaOLxAs9jZ6CGfnrmU0SncFouUwd1Ln41R sTqypeqCY1XSVHYD55Yel2msaSGWQ0nkSpCs32lMrZgxdlzn6gJnMX/ClFm9F/Ul8Lno Oong== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=eeMKH2FQazsDvJANz87gRDQUDUjXhV5hhlTBUFXqqQE=; fh=T+c4gfdnxAk/loSZmJfUba9m7+vF0FwRC+l6hs6b0Gg=; b=U3RqmB6+Q42SNeJ/mTtkL77d5m1JazI8PFeWKqkfJjwJnn+yjU9LzZ7b00djXtPu+I e2zs5K7aMzhrnuD6jAY8UzvLwbrSGiFMrXPAW3ok0OZc/aZ7kfDqKoR1dD3epQ+xgxob X1SyW9rQi8g+F1avkWC9DQjSWCIwZKN7T0NWjuSiVYEwbE1PD8aO45o/UhEmGOIAa4e+ wJxNf5H8ixcXyxFuzkRcbYQ5oRmTyzG0iVkkg6wEBM4eHL5f+53e2dEYfVJKubf9kFn2 NUPxqOeQZTd5bQ2R/8LAuS5JC7axx+3rwoZPGh3Hk3Mirp84E7ufwiHqMe8+m0h1/GyZ H/TA==; 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=1782259820; x=1782864620; h=content-transfer-encoding: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; bh=eeMKH2FQazsDvJANz87gRDQUDUjXhV5hhlTBUFXqqQE=; b=NU8bA09JCxfkFtdCINPIEByP2C/6vacZ8Mdlcz6aPKu+R8HGRrEf9KtOTLuB1bt5Um QGqSAj66vqq2+KuVQGX0gxUT4Z+yx+YkqASOLgaYlIS25+EB55Qw/ZaM6o9sk5fmCTtE wU/+F/J2lTtPGIdIY5Td5Jl+ptycMlPXWlN/7MJekzV1NoVMorF7FD7POjyjOZyDAmCA NfY5QtpGpdDuH1qwaSoC25YnGTw+bJJDMbNhFRAkv+7bGfKetuf5/uluj+ybXBv0UsNq 3CGu1QKHODD11/8Fzhhb+9X9sG+eZAgFfrB+8cCqw2zN72ZUEbZeVPCGA6j5374XdPJK TF7g== X-Forwarded-Encrypted: i=1; AFNElJ9Ks5KAoVheLbO/ocq2oNjF5wlFNrZzNMJoI2nMyk8R+qSDC3iQrNSQsYY06BmmSrvHiTbIW1WRdjlkcmVPpjU3Ih/PMA==@freebsd.org X-Gm-Message-State: AOJu0YwvctUz+qWvexXxpzH420LAr3Bn797vc36qTw3gTmXlu3zSmv/F B4zQ681Lk0EnDPQ6/JmzfJBcVOHB6iguG/nIvK6X3AwEPEuQHFZBvHbZ464/8rJA1TIQNk3ekF1 XEh0HKH8x5cwQepAOVpEikwBj3vLkh1c= X-Gm-Gg: AfdE7ckCeEBbKGDsmb2BbmoNpEQVshpUTMHUFv1+0ORIMA7BQLZA4MjWb6w+l7B0pk8 NRZnES1RyIbYQNyt8Fe0SXXG6LZT2g6dNbA3Eu2WebqUhL1SLH2hsb791fketwuDmiiU/KmhdPL 7PoOO0uO2Ca8ducCTW6cQnGJXLhCmuuFkWid7y91Zref7FurNy6lZfT8meeu/IFrb4RCEWLVSW+ p+hCp5kfYCdxlZQFq2jdGUNIVynXtWl+9M+y43IyOChcFhWJ5UvsGkguxliYGqI6+qjRhmNK+Ci 3qaI5FAhPvGsTOdFSi4sY3BLgf2Texy84OvJhmbj30pq9X6DxT1BvW93l+VBO3nDyZkr X-Received: by 2002:a17:906:ee8a:b0:bf0:550:d9f with SMTP id a640c23a62f3a-c107eec8930mr301980266b.31.1782259820108; Tue, 23 Jun 2026 17:10:20 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 References: <6a3a9e2c.1d985.79db71af@gitrepo.freebsd.org> <864iispzxf.fsf@ltc.des.dev> In-Reply-To: <864iispzxf.fsf@ltc.des.dev> From: Alan Somers Date: Tue, 23 Jun 2026 18:10:07 -0600 X-Gm-Features: AVVi8CfLbmwYokC0Zii3AQnamabtRrKxq-It0TxVfBzta5tzs7HQfJQjJ7HhtNg Message-ID: Subject: Re: git: e03ed9daeb49 - main - fts: refactor to use fd-relative operations internally To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= 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 [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4glMlK44Wpz3k7q X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated On Tue, Jun 23, 2026 at 6:03=E2=80=AFPM Dag-Erling Sm=C3=B8rgrav wrote: > > Alan Somers writes: > > commit e03ed9daeb49fffa1d16b8d00240c65e92650d01 > > Author: Jitendra Bhati > > AuthorDate: 2026-06-12 17:07:55 +0000 > > Commit: Alan Somers > > CommitDate: 2026-06-23 14:53:56 +0000 > > > > fts: refactor to use fd-relative operations internally > > > > Replace all _open() calls with _openat() in __fts_open(), fts_read(= ), > > and fts_children(). > > > > Add fts_dirfd to FTSENT. Callers can use > > openat(ent->fts_dirfd, ent->fts_name, ...) to access files > > safely without relying on fts_accpath, which enables: > > > > 1. Capsicum capability mode where path-based operations fail > > 2. Security-sensitive programs that avoid TOCTOU races > > > > Replace statfs(ent->fts_path) with _fstatfs(ent->fts_dirfd) in > > fts_ufslinks() when fts_dirfd is valid, falling back to statfs() fo= r > > root-level entries where fts_dirfd is -1 > > > > This is a preparatory change for fts_openat() which will allow > > callers to provide a pre-opened directory fd, enabling fts(3) > > traversal inside Capsicum capability mode. > > > > Sponsored by: Google LLC (GSoC 2026) > > Reviewed by: asomers, jillest > > MFC after: 2 weeks > > Pull Request: https://github.com/freebsd/freebsd-src/pull/2278 > > This needs to be reverted. It changes struct _ftsent which is part of > the libc ABI. You will have to fork FTS (again) and have one version > with fts_dirfd and fts_openat() and one without. I don't think there's any guarantee that the size of _ftsent is fixed. Since the API only passes FTSENT around by pointer, we are free to add fields. Or am I missing something?