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)
Mon, Jan 19, 11:14 AM
Unknown Object (File)
Fri, Jan 16, 6:52 AM
Unknown Object (File)
Wed, Jan 7, 5:05 PM
Unknown Object (File)
Tue, Jan 6, 5:41 AM
Unknown Object (File)
Sat, Jan 3, 5:58 AM
Unknown Object (File)
Tue, Dec 30, 3:57 PM
Unknown Object (File)
Thu, Dec 25, 4:35 AM
Unknown Object (File)
Tue, Dec 23, 4:59 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?