Bug 504936

Summary: Add FreeBSD amd64 sysarch subcommands AMD64_SET_TLSBASE and AMD64_GET_TLSBASE
Product: [Developer tools] valgrind Reporter: Paul Floyd <pjfloyd>
Component: generalAssignee: Paul Floyd <pjfloyd>
Status: RESOLVED FIXED    
Severity: major    
Priority: NOR    
Version First Reported In: 3.25 GIT   
Target Milestone: ---   
Platform: FreeBSD Ports   
OS: FreeBSD   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Paul Floyd 2025-05-28 20:00:14 UTC
These have been added to 15.0-CURRENT (see https://reviews.freebsd.org/D50482)

I also see that there are AMD64_SET_PKRU  and AMD64_CLEAR_PKRU (with i386 versions), haven't looked at them yet. That'll probably be another bugzilla item.
Comment 1 Paul Floyd 2025-05-29 05:25:54 UTC
Without a fix just about everything crashes.

As for the PKRU that looks like a big can of worms. It's kernel key signing for user mapped pages. We don't advertise the flags (pku and ospke) or support the amd64 opcodes (rdpkru and wrpkru). How would that interact with tools that replace malloc?
Comment 2 Paul Floyd 2025-05-29 08:07:49 UTC
commit f7b087df5ccd4ac1c0803a5dfd168327dc25286c (HEAD -> master, origin/master, origin/HEAD)
Author: Paul Floyd <pjfloyd@wanadoo.fr>
Date:   Thu May 29 08:52:28 2025 +0200

    Bug 504936 - Add FreeBSD amd64 sysarch subcommands AMD64_SET_TLSBASE and AMD64_GET_TLSBASE