Skip to content

Mschaara/2.6.5.pil4dfs - #19396

Draft
mchaarawi wants to merge 2 commits into
release/2.6.5-patchfrom
mschaara/2.6.5.pil4dfs
Draft

mchaarawi wants to merge 2 commits into
release/2.6.5-patchfrom
mschaara/2.6.5.pil4dfs

Conversation

@mchaarawi

Copy link
Copy Markdown
Contributor

Steps for the author:

  • Commit message follows the guidelines.
  • Appropriate Features or Test-tag pragmas were used.
  • Appropriate Functional Test Stages were run.
  • At least two positive code reviews including at least one code owner from each category referenced in the PR.
  • Testing is complete. If necessary, forced-landing label added and a reason added in a comment.

After all prior steps are complete:

  • Gatekeeper requested (daos-gatekeeper added as a reviewer).

…#19148)

Backport of the pil4dfs path resolution fixes from master. Building DAOS
over dfuse with libpil4dfs failed in several places, all in the path
resolution of the interception library; fixing it uncovered more cases
where pil4dfs resolved a path differently from the kernel.

- DAOS-19005 pil4dfs: fix path resolution breaking the DAOS build over
  dfuse (#18963, d22e491)
  Hand a leaf symlink dfs cannot follow to the kernel; chdir() and
  fchdir() keep cur_dir right, including in a vfork()ed child; ".."
  above the root resolves as the root; statx(NULL) is passed through.

- DAOS-19630 dfs: do not follow a symlink with an absolute value
  (#19055, d57b106)
  dfs returns EINVAL for an absolute symlink value at any depth instead
  of resolving it from the container root for a link in the root.

- DAOS-19626 pil4dfs: resolve paths by component, and ".." after a
  lookup (#19054, 9902a2c)
  Lexical cleanup works on components so "//" and "/./" cannot survive;
  ".." is applied to the resolved component in front of it, as the
  kernel does, including through symlinks and at the mount point.

- DAOS-19631 pil4dfs: hand a symlink dfs cannot follow to the kernel
  (#19108, 13e2524)
  Absolute and "../.." symlink values in a non-leaf position fall back
  to the kernel; open() with O_NOFOLLOW on a symlink returns ELOOP, or
  ENOTDIR with O_DIRECTORY; O_DIRECTORY no longer matches O_TMPFILE.

Also updates the copyright headers of the two touched dfs headers.

Signed-off-by: Mohamad Chaarawi <mohamad.chaarawi@hpe.com>
@daosbuild3

Copy link
Copy Markdown
Collaborator

@daosbuild3

Copy link
Copy Markdown
Collaborator

@daosbuild3

Copy link
Copy Markdown
Collaborator

@daosbuild3

Copy link
Copy Markdown
Collaborator

#19264)

A path outside of the container was converted to timevals and handed to
utimes(), which drops AT_SYMLINK_NOFOLLOW (the target of a symlink was
changed instead of the link) and turns UTIME_NOW/UTIME_OMIT into
out-of-range microseconds that fail with EINVAL. Hand such a path to the
real utimensat() with the caller's arguments instead. A relative path
outside of the container also gets the caller's times, so a NULL times
keeps the write-permission semantics of the kernel.

For a file in the container, utimensat() and futimens() stored the
UTIME_NOW/UTIME_OMIT markers as the mtime. Resolve UTIME_NOW to the
current time, skip the update for UTIME_OMIT, return EINVAL for an
out-of-range tv_nsec, and return 0 without a lookup when both times
are UTIME_OMIT, as the kernel does.

Add do_utimens to the dfuse_test metadata group covering NULL times on
an absolute path (the DAOS-19755 case, already fixed on master by
DAOS-16638), UTIME_NOW, UTIME_OMIT and invalid nsec through utimensat()
and futimens(), both in the container and on a path outside of it, and
AT_SYMLINK_NOFOLLOW on a symlink outside of the container.

Signed-off-by: Mohamad Chaarawi <mohamad.chaarawi@hpe.com>
@mchaarawi
mchaarawi force-pushed the mschaara/2.6.5.pil4dfs branch from 8f5c8d0 to fd82580 Compare October 29, 2026 17:41
@daosbuild3

Copy link
Copy Markdown
Collaborator

@daosbuild3

Copy link
Copy Markdown
Collaborator

@kaushikvelusamy

Copy link
Copy Markdown

Will DAOS-16638 / #17204 be included in 2.6.5 backporting ?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants