tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: compat_linux: open: Supporting O_NOATIME
Thank you for the feedback!
On 10/16/26 23:35, Mouse wrote:
> I'd be inclined to replace the second part with "or is root" (I can't
> recall how that's spelled these days), not just drop it.
On 10/17/26 02:35, Michael van Elst wrote:
> So a valid implementation could just ignore the flag (which could be
done in the compat layer, if it isn't already).
Sounds good on both counts, I will go ahead and attempt a patch that
validates privileges as discussed (based on UID or is root), and
otherwise ignore the flag. Thanks again.
Aiman
On 10/16/26 23:00, Aiman Najjar wrote:
> Hello tech-kern,
>
> I'm new to NetBSD and I am interested in contributing to compat_linux.
>
> I've had a chance to look at the work Henrique did for the LTP as part
> of GSoC, I am interested in working on some of the failing test cases.
>
> In particular, `open02` test case seems like a good candidate for a
> first patch. The failing test case passes `O_NOATIME` mode flag to open,
> and expects it to fail with `EPERM` error.
>
> My question: what is the correct way to address this, do we: 1) add
> native support for `O_NOATIME`, which allows users to flag (or hint)
> that they don't want the file's access time to be updated (useful for
> backup solutions processing large amount of files), or 2) do we emulate
> it, somehow, at `compat_linux` layer (e.g. only support this behavior
> when the module is installed) or 3) Do we only check for user privileges
> (which would make the test pass) but do not actually implement the behavior?
>
> Additionally, re. privilege check: Linux checks the privilege by
> ensuring process effective UID matches the file owner UID, or if the
> process has `CAP_FOWNER` [*]. On NetBSD, I presume we'd only do the
> first check?
>
> Also, stumbled upon a similar discussion in FreeBSD forums:
> https://forums.freebsd.org/threads/o_noatime-option-in-open.92523/
>
> Thanks,
> Aiman
>
> [*]
> https://manpages.debian.org/trixie/manpages-dev/openat.2.en.html#O_NOATIME
Home |
Main Index |
Thread Index |
Old Index