Skip to content
Snippets Groups Projects

FSGSBASE and user-controlled TLS

Merged Jacob Lorentzon requested to merge 4lDO2/kernel:fsgsbase into master

This MR lets userspace manually modify FSBASE and GSBASE on older CPUs via a restricted version of proc:, thisproc:. Newer CPUs can instead use wrfsbase/wrgsbase and rdfsbase/rdgsbase, and those instructions are enabled if detected.

Additionally, this removes all kernel handling of thread-local storage, and just like Linux does, lets userspace handle TLS on their own. For this, every time fexec() is run, there will be a new grant (which the program can later funmap if desired) pointed to by AT_PHDR (and AT_PHENT and AT_PHNUM for indexing ELF segments).

Depends on syscall!67 (merged) and relibc!340 (merged).

Edited by Jacob Lorentzon

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading