Skip to content

fix: macOS 26 fixes, 26.3+ support, some missing instructions#174

Open
VisualEhrmanntraut wants to merge 1 commit intoLouisBrunner:mainfrom
VisualEhrmanntraut:main
Open

fix: macOS 26 fixes, 26.3+ support, some missing instructions#174
VisualEhrmanntraut wants to merge 1 commit intoLouisBrunner:mainfrom
VisualEhrmanntraut:main

Conversation

@VisualEhrmanntraut
Copy link
Copy Markdown

@VisualEhrmanntraut VisualEhrmanntraut commented Mar 18, 2026

Patchset compromised of the following:

  • Add kdebug_typefilter to syswrap.
    It tries accessing a NULL pointer on macOS 26.3+.
  • Add macOS 26 suppression files to Makefile.
    They were missing, so they would be included in configure, but never copied to the install directory.
  • Stub an SPRR MSR instruction in VEX.
    It is used in user-space from dyld for a new feature called TPRO.
  • Add missing VM statistics constant to vki-darwin.
    To suppress a log along the lines of "unknown vm tag".
  • Add CNTPCT MSR instruction to VEX.
    It is allowed in user-space and used by some programs.

Does not fully fix the issue #169. Callgrind is experiencing different problems after the macOS 26.3+ specific problems.

@VisualEhrmanntraut
Copy link
Copy Markdown
Author

The issue from whatever that SonarQube bullshit is, is a false positive. It tells me to change something from a define to a const/constexpr/enum where everything surrounding it is already defines.

Patchset compromised of the following:
- Add kdebug_typefilter to syswrap.
  It tries accessing a NULL pointer on macOS 26.3+.
- Add macOS 26 suppression files to Makefile.
  They were missing, so they would be included in configure, but never copied to the install directory.
- Stub an SPRR MSR instruction in VEX.
  It is used in user-space from dyld for a new feature called TPRO.
- Add missing VM statistics constant to vki-darwin.
  To suppress a log along the lines of "unknown vm tag".
- Add CNTPCT MSR instruction to VEX.
  It is allowed in user-space and used by some programs.

Fixes LouisBrunner#169
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Mar 18, 2026

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@VisualEhrmanntraut VisualEhrmanntraut changed the title fix: macOS 26 fixes, 26.3+ support fix: macOS 26 fixes, 26.3+ support, some missing instructions Mar 18, 2026
@LouisBrunner
Copy link
Copy Markdown
Owner

Hi @VisualEhrmanntraut,

Thanks a lot for all these fixes! It looks good to me overall, I just need to check the mrs stuff more deeply and test it locally (which will take me a few days due to scheduling).

Don't worry about SonarQube, because of Valgrind's style and quirks it's mostly false positives.

Copy link
Copy Markdown
Owner

@LouisBrunner LouisBrunner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question then good to go.

*/
if ((INSN(31,0) & 0xFFFFFFE0) == 0xD53EF1A0) {
UInt tt = INSN(4,0);
putIReg64orZR(tt, mkU64(0x0));
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the main reason for not forwarding this call as well? Is it unhappy with Valgrind's memory mappings?

Copy link
Copy Markdown
Author

@VisualEhrmanntraut VisualEhrmanntraut Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, I'm not sure why but forwarding the sysreg read caused an immediate crash on it. It may be restricted to specific processes dylibs/memory regions, or maybe I did it wrong, since I am not too familiar with the codebase. If you provide me with the defacto correct code I'll test it to make sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants