Bug 504936 - Add FreeBSD amd64 sysarch subcommands AMD64_SET_TLSBASE and AMD64_GET_TLSBASE
Summary: Add FreeBSD amd64 sysarch subcommands AMD64_SET_TLSBASE and AMD64_GET_TLSBASE
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: 3.25 GIT
Platform: FreeBSD Ports FreeBSD
: NOR major
Target Milestone: ---
Assignee: Paul Floyd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-28 20:00 UTC by Paul Floyd
Modified: 2025-05-29 08:07 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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