🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: muc.lists.netbsd.tech.kern
Article #4

compat_linux: open: Supporting O_NOATIME

#4
From: Aiman Najjar
Date: Sat, 17 Oct 2026 03:00
37 lines
3767 bytes
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: <64843d8a-4319-48b0-b7f8-82927b43d402@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-mail

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: compat_linux: open: Supporting O_NOATIME
Date: Fri, 16 Oct 2026 23:00:18 -0400
Organization: Newsgate at muc.de e.V.
Sender: tech-kern-owner@NetBSD.org
Approved: news-admin@muc.de
Distribution: world
Message-ID: <64843d8a-4319-48b0-b7f8-82927b43d402@hurranet.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2";
	logging-data="50827"; 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 382 seconds by postgrey-1.37 at homeworld.NetBSD.org; Sat, 17 Oct 2026 03:06:46 UTC
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hurranet.com;
	s=MBO0001; t=1792206020;
	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;
	bh=vuFbJFOnVmr80T0ooFC+cRBGqOAgpo+zpWRRvNegBe4=;
	b=ACYhzfh7ef+qS9UNWMduEedXviqG39DPTIKKdSQ5oDfNqTtzhBz5lEYBwkehMD0+w0PkwO
	k/wgr6vOctjXfLl9Vk69+08aJx8eiTYkiHbPsbV9t1C46Z1WtOGBf9OStp5t6dEy4BqTi2
	9fYmC2rn3ZxjCNIuB9G+f8yXjTwxf7i79K/wPozk7gdrBvXMheL0Z/YtHuc+GOFMoKq9EF
	PROz3RVVXWb3nDvLmh9gGYJoXkrNyRRk9geP/j1dvqj6K5LQ8lWlgl6Nhms4ygNadmQe2T
	DSik3gS7ikMjY6+jDeq03vE0IUbZNmaapqp7apYqlqQk/R3nxetgyBePMt0yNQ==
Authentication-Results: outgoing_mbo_mout;
	dkim=none;
	spf=pass (outgoing_mbo_mout: domain of aiman.najjar@hurranet.com designates 2001:67c:2050:b231:465::102 as permitted sender) smtp.mailfrom=aiman.najjar@hurranet.com
Content-Language: en-US
X-Rspamd-Queue-Id: 4j664N6dLTzMlNR
Precedence: bulk
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes