Page MenuHomeFreeBSD

fork: Eliminate a now unused RFLINUXTHPN fork option bit.
AbandonedPublic

Authored by dchagin on Aug 9 2021, 3:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 28, 9:35 PM
Unknown Object (File)
Feb 11 2024, 11:03 PM
Unknown Object (File)
Dec 20 2023, 6:43 AM
Unknown Object (File)
Sep 1 2023, 5:35 PM
Unknown Object (File)
Jul 5 2023, 1:00 AM
Unknown Object (File)
Apr 22 2023, 9:07 AM
Unknown Object (File)
Mar 5 2023, 7:37 AM
Unknown Object (File)
Feb 15 2023, 9:49 PM
Subscribers

Details

Reviewers
kib
markj
Group Reviewers
Linux Emulation
Summary

RFLINUXTHPN option was used to emulate Linux clone for Linux Threads which
is replaced by NPTL a long time ago.

Diff Detail

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

Event Timeline

dchagin changed the repository for this revision from rS FreeBSD src repository - subversion to rG FreeBSD src repository.
dchagin retitled this revision from fork: Eleminate a now unused RFLINUXTHPN fork option bit. to fork: Eliminate a now unused RFLINUXTHPN fork option bit..

glibc was aware of this flag, but only uses it on osreldate < 802510

https://sources.debian.org/src/glibc/2.31-13/sysdeps/unix/bsd/bsd4.4/kfreebsd/clone.c/?hl=87

ah, no problem, thanks. how long are we going to support dead stuff?

ah, no problem, thanks. how long are we going to support dead stuff?

IMO we don't need to support this, what was likely the only consumer checks osreldate and does not use this functionality for any FreeBSD kernel from the last decade or so.

RFLINUXTHPN should be removed from rfork.2 as well.

There is a policy called 'ABI stability'. So far we tried to follow it.
Why break this stuff? Yes, there are people who use very old binaries on modern FreeBSD, and it is a value that we provide.

Linuxthreads is/was a native FreeBSD threading library implementing 1:1 threads over FreeBSD processes. It was quite popular to run mysql I believe.
If you want to get rid of support for it, much bigger and more stinky part of it is the 'filedesc leader' stuff (p_fdtol and look from there).

In D31471#709637, @kib wrote:

There is a policy called 'ABI stability'. So far we tried to follow it.
Why break this stuff? Yes, there are people who use very old binaries on modern FreeBSD, and it is a value that we provide.

Linuxthreads is/was a native FreeBSD threading library implementing 1:1 threads over FreeBSD processes. It was quite popular to run mysql I believe.
If you want to get rid of support for it, much bigger and more stinky part of it is the 'filedesc leader' stuff (p_fdtol and look from there).

it's hard to check any reference on such things as thay even not supported on it's native platforms))
I'm using glibc-2.17, glibc-2.32 (now 2.34) and latest Linux sources, so without some historical knowledge like your's I can propose such ideas.
Thanks!

In D31471#709637, @kib wrote:

There is a policy called 'ABI stability'. So far we tried to follow it.
Why break this stuff? Yes, there are people who use very old binaries on modern FreeBSD, and it is a value that we provide.

Linuxthreads is/was a native FreeBSD threading library implementing 1:1 threads over FreeBSD processes. It was quite popular to run mysql I believe.
If you want to get rid of support for it, much bigger and more stinky part of it is the 'filedesc leader' stuff (p_fdtol and look from there).

it's hard to check any reference on such things as thay even not supported on it's native platforms))
I'm using glibc-2.17, glibc-2.32 (now 2.34) and latest Linux sources, so without some historical knowledge like your's I can propose such ideas.
Thanks!

Well, it was supported by the native FreeBSD ABI. The idea was that KSE libpthread.so (native FreeBSD) was replaced by some other libpthread.so that used rfork(2) with RFMEM|RFSIGSHARE|RFLINUXTHPN to create new thread. Most of the code was taken from glibc pthread with clone() replaced by above rfork() call.

So you cannot find it in glibc sources. It was ports:devel/linuxthread, providing native lib. If you are that curious, look at the ports commit 987c1e55714ab0f04cf9 which removed linuxthreads. There are notes about the implementation, which might be still useful to look at.