Article View: muc.lists.netbsd.tech.kern
Article #5Re: compat_linux: open: Supporting O_NOATIME
From: Aiman Najjar
Date: Sat, 17 Oct 2026 13:27
Date: Sat, 17 Oct 2026 13:27
56 lines
4602 bytes
4602 bytes
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 -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID:
<b75383ba-b9ae-4b84-90d8-ace0a04fcfb0@hurranet.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mailReferences:
<64843d8a-4319-48b0-b7f8-82927b43d402@hurranet.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail From: Aiman Najjar <aiman.najjar@hurranet.com> Newsgroups: muc.lists.netbsd.tech.kern Subject: Re: compat_linux: open: Supporting O_NOATIME Date: Sat, 17 Oct 2026 09:27:01 -0400 Organization: Newsgate at muc.de e.V. Sender: tech-kern-owner@NetBSD.org Approved: news-admin@muc.de Distribution: world Message-ID: <b75383ba-b9ae-4b84-90d8-ace0a04fcfb0@hurranet.com> References: <64843d8a-4319-48b0-b7f8-82927b43d402@hurranet.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2"; logging-data="99770"; mail-complaints-to="news-admin@muc.de" User-Agent: Mozilla Thunderbird Authentication-Results: mail.netbsd.org (amavisd-new); dkim=pass (2048-bit key) header.d=hurranet.com X-Greylist: delayed 37604 seconds by postgrey-1.37 at homeworld.NetBSD.org; Sat, 17 Oct 2026 13:27:10 UTC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hurranet.com; s=MBO0001; t=1792243625; h=from:from:reply-to:subject: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=3ANmVmPrSlLfrk1lwncs7Gc1eAwVNyFJCe0gG/B/Yzw=; b=o9H97QodQm6A/4vQBE9u/IaiprxAKtvJYALzRDKNkCiNdlV1+Sq0mmK41xYvw3j2/yN8mZ qlL9TQ4BpKmNT0020iNILvVGdarwOjJu63ugMG2cxEmruJxy9aPnDCWEHpbpMp1xZXt4L3 qS4U+ziTXKcvHfCQNnhT//ZNZpplTAgcihNwgCIA26ET81vI+jOYOas6LG5739NEw4lvvE rLHKIX95ckJz2rhgz+/jL15SdsQ3yTgKmZFci2MxLiawgInGhlGq31ifYBfWH+JlMQrXNC SDzwSL4oFZsrhRhwr6GQhHZzlaA0uQAlPVXQDFKSP69V36TVfTgRre85HLazGg== Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of aiman.najjar@hurranet.com designates 2001:67c:2050:b231:465::202 as permitted sender) smtp.mailfrom=aiman.najjar@hurranet.com Content-Language: en-US In-Reply-To: <64843d8a-4319-48b0-b7f8-82927b43d402@hurranet.com> X-Rspamd-Queue-Id: 4j6MzY2csmzMlCC Precedence: bulk X-Newsgate-Id: f02c70b8849f+ X-No-Archive: Yes