Page MenuHomeFreeBSD

linuxkpi: stop inlining accesses to curthread->td_lkpi_task
ClosedPublic

Authored by kib on Sat, Aug 8, 7:05 PM.
Tags
None
Referenced Files
F167129535: D58733.id183993.diff
Wed, Aug 19, 8:36 AM
F167106841: D58733.id183696.diff
Wed, Aug 19, 3:40 AM
Unknown Object (File)
Tue, Aug 18, 8:54 PM
Unknown Object (File)
Tue, Aug 18, 4:38 PM
Unknown Object (File)
Sun, Aug 16, 10:41 PM
Unknown Object (File)
Sun, Aug 16, 7:42 PM
Unknown Object (File)
Sun, Aug 16, 8:27 AM
Unknown Object (File)
Sun, Aug 16, 4:53 AM
Subscribers

Details

Summary
This should provide much higher resistence against struct thread layout
changes for out-of-tree modules depending on linuxkpi.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Sat, Aug 8, 7:05 PM

No objections from me reading this. Wait what others are saying.

This revision is now accepted and ready to land.Sat, Aug 8, 10:07 PM

Oops, I forgot to submit, sorry.

sys/compat/linuxkpi/common/src/linux_compat.c
174

I don't really understand the namespacing in linuxkpi. When does one use linux_ vs. lkpi_ vs. __lkpi_?

Oops, I forgot to submit, sorry.

Sorry, committed a second before seeing your accept mail.

sys/compat/linuxkpi/common/src/linux_compat.c
174

I do not know either. I used __llkpi to clearly indicate that the symbol is in the implementation namespace.
The 'linux' prefix is useful for lot of other things in the modern time, so I think it is better to keep it alone for function that is presented everywhere in the code dealing with linuxkpi.

Oops, I forgot to submit, sorry.

In theory there is:

linux_ whichwe are trying to phase out as that is linuxolator really but there is lots of historic stuff like that.
linuxkpi_ and lkpi_ both came up and were used differently; the current way goes:
linuxkpi_ are all the pulbic LinuxKPI (Linux KPI) functions (#defined, aliased by an inline wrapper function).
lkpi_ is internal symbols which do not resemble Linux KPI. Due to history there is a bit of Linux KPI still.

I have a mostly done man page somewhere to document that; stay tuned for another few months ;(