Page MenuHomeFreeBSD

Make linux_enable="YES" result in mounting linprocfs, linsysfs, and handling /dev/shm/
AbandonedPublic

Authored by trasz on May 20 2019, 5:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 23 2023, 1:26 AM
Unknown Object (File)
Dec 9 2023, 10:08 PM
Unknown Object (File)
Nov 14 2023, 12:35 PM
Unknown Object (File)
Sep 21 2023, 12:41 AM
Unknown Object (File)
Aug 24 2023, 3:20 PM
Unknown Object (File)
Jul 2 2023, 11:07 AM
Unknown Object (File)
Apr 8 2023, 12:24 AM
Unknown Object (File)
Mar 21 2023, 8:21 PM
Subscribers

Details

Reviewers
tijl
dchagin
Summary

Make linux_enable="YES" result in mounting linprocfs, linsysfs,
and handling /dev/shm/.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 24331
Build 23153: arc lint + arc unit

Event Timeline

I like the idea and I propose to add fdescfs also

I like the idea although have users already put entries in /etc/fstab?

We used to tell people to symlink /dev/shm to /tmp in pkg-message but some programs check the file system type of /dev/shm (using statfs) so after https://svnweb.freebsd.org/base?view=revision&revision=283461 /dev/shm must be tmpfs for these programs to work properly and /tmp isn't necessarily tmpfs. So I created /compat/linux/dev/shm in https://svnweb.freebsd.org/ports?view=revision&revision=424237. This also makes /dev/shm and /tmp separate namespaces like they are on Linux. The only problem I've encountered with this is when running 'command > /dev/null' as root it will create /compat/linux/dev/null as a regular file. There's no such problem when running commands as a regular user. I think the proper fix is to have a real /dev/shm directory, either by default or created by linux_common.ko. And then let linux_enable mount a tmpfs there.

In D20322#438209, @tijl wrote:

We used to tell people to symlink /dev/shm to /tmp in pkg-message but some programs check the file system type of /dev/shm (using statfs) so after https://svnweb.freebsd.org/base?view=revision&revision=283461 /dev/shm must be tmpfs for these programs to work properly and /tmp isn't necessarily tmpfs. So I created /compat/linux/dev/shm in https://svnweb.freebsd.org/ports?view=revision&revision=424237. This also makes /dev/shm and /tmp separate namespaces like they are on Linux. The only problem I've encountered with this is when running 'command > /dev/null' as root it will create /compat/linux/dev/null as a regular file. There's no such problem when running commands as a regular user. I think the proper fix is to have a real /dev/shm directory, either by default or created by linux_common.ko. And then let linux_enable mount a tmpfs there.

Thank you, that's very useful to know. How about https://reviews.freebsd.org/D20333?

I like the idea although have users already put entries in /etc/fstab?

I wonder if we could add those to the default fstab, marked noauto. Do we have a default fstab, though?