Page MenuHomeFreeBSD

Rework a bit /dev/shm magic.
ClosedPublic

Authored by dchagin on Jan 11 2015, 2:30 PM.
Tags
None
Referenced Files
F131827905: D1497.diff
Sat, Oct 11, 12:28 PM
Unknown Object (File)
Aug 19 2025, 11:28 AM
Unknown Object (File)
Jul 6 2025, 10:52 PM
Unknown Object (File)
Jul 3 2025, 9:29 PM
Unknown Object (File)
Jun 28 2025, 5:25 PM
Unknown Object (File)
Jun 28 2025, 7:39 AM
Unknown Object (File)
Jun 20 2025, 8:55 AM
Unknown Object (File)
Jun 16 2025, 9:43 PM
Subscribers
None

Details

Summary

As for now our tmpfs is no longer being considered "highly experimental" remove /dev/shm magic commited in r218497 and convert tmpfs type to an expected magic number.

Test Plan

rt/tst-shm test from glib-2.20

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

dchagin retitled this revision from to Rework a bit /dev/shm magic..
dchagin updated this object.
dchagin added a reviewer: Linux Emulation.

Out of curiosity, what did the deleted parts of code used to do, and why it's no longer needed?

In D1497#5, @trasz wrote:

Out of curiosity, what did the deleted parts of code used to do, and why it's no longer needed?

glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for POSIX shared memory (shm_open, shm_unlink).
if /dev/shm is not mounted glibc tries (where_is_shmfs() method) all entries in /proc/mounts by statfs() sys call
and check f_type against SHMFS_SUPER_MAGIC.
So, removed code weird )))

trasz edited edge metadata.
This revision is now accepted and ready to land.Mar 31 2015, 12:27 PM
This revision was automatically updated to reflect the committed changes.