Bug 294713 - [Linuxulator] Implement basic entries for /proc/sys/fs
Summary: [Linuxulator] Implement basic entries for /proc/sys/fs
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 16.0-CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Pouria Mousavizadeh Tehrani
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-04-22 20:33 UTC by Ricardo Branco
Modified: 2026-04-26 17:58 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ricardo Branco 2026-04-22 20:33:17 UTC
Some entries can be mapped to the equivalent FreeBSD sysctls:

file-max: kern.maxfiles
file-nr: kern.openfiles 0 kern.maxfiles
nr_open: kern.maxfilesperproc
overflowuid: UID_NOBODY
overflowgid: GID_NOBODY (65534)
suid_dumpable: kern.sugid_coredump (0/1 subset of Linux 0/1/2)
protected_hardlinks: security.bsd.hardlink_check_uid || security.bsd.hardlink_check_gid

Will provide a fix soon.
Comment 1 Ricardo Branco 2026-04-22 20:49:12 UTC
Fix: https://github.com/freebsd/freebsd-src/pull/2159
Comment 2 commit-hook freebsd_committer freebsd_triage 2026-04-26 17:58:13 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=4f9f09d95103e1db6b7c75fce7cf3e8c448321e9

commit 4f9f09d95103e1db6b7c75fce7cf3e8c448321e9
Author:     Ricardo Branco <rbranco@suse.de>
AuthorDate: 2026-04-22 20:19:29 +0000
Commit:     Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org>
CommitDate: 2026-04-26 17:53:23 +0000

    compat/linprocfs: Add some entries to /proc/sys/fs and /proc/sys/kernel

    Add following sys/fs entries to linprocfs(4):
    * proc/sys/fs/file-max
    * proc/sys/fs/file-nr
    * proc/sys/fs/nr_open
    * proc/sys/fs/overflowuid
    * proc/sys/fs/overflowgid
    * proc/sys/fs/suid_dumpable
    * proc/sys/fs/protected_hardlinks
    Also, add /proc/sys/kernel/threads-max

    Signed-off-by:  Ricardo Branco <rbranco@suse.de>
    PR:             294713
    Reviewed by:    markj, pouria
    Pull-Request:   https://github.com/freebsd/freebsd-src/pull/2159

 sys/compat/linprocfs/linprocfs.c | 150 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 150 insertions(+)