Page MenuHomeFreeBSD

linux(4): Fixup the vDSO initialization order.
ClosedPublic

Authored by dchagin on Jun 25 2021, 4:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 4, 6:46 PM
Unknown Object (File)
Feb 24 2025, 11:31 AM
Unknown Object (File)
Feb 24 2025, 3:44 AM
Unknown Object (File)
Feb 24 2025, 1:05 AM
Unknown Object (File)
Feb 23 2025, 6:19 AM
Unknown Object (File)
Feb 22 2025, 7:01 PM
Unknown Object (File)
Feb 22 2025, 5:09 PM
Unknown Object (File)
Feb 22 2025, 7:41 AM
Subscribers

Details

Summary

The vDSO initialisation order should be as follows:

  • native abi init via exec_sysvec_init();
  • vDSO symbols queued to the linux_vdso_syms list;
  • linux_vdso_install();
  • linux_exec_sysvec_init();

As the exec_sysvec_init() called with SI_ORDER_ANY (last) at SI_SUB_EXEC
order, move linux_vdso_install() and linux_exec_sysvec_init() to the
SI_SUB_EXEC+1 order.

Diff Detail

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

Event Timeline

sys/amd64/linux/linux_sysvec.c
833

Since the + 1 carries no context I think it would be worth a comment, e.g. mentioning that exec_sysvec_init is SI_SUB_EXEC and this must be after?

This revision is now accepted and ready to land.Jul 9 2021, 2:02 PM