Page MenuHomeFreeBSD

sdt: Disable SDT probes in kernel modules for GCC on aarch64
ClosedPublic

Authored by jhb on Sat, Feb 7, 3:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 1, 2:18 PM
Unknown Object (File)
Sat, Feb 28, 11:00 AM
Unknown Object (File)
Wed, Feb 25, 6:51 AM
Unknown Object (File)
Tue, Feb 24, 8:27 PM
Unknown Object (File)
Tue, Feb 24, 7:35 AM
Unknown Object (File)
Mon, Feb 23, 10:05 PM
Unknown Object (File)
Mon, Feb 23, 4:28 PM
Unknown Object (File)
Sat, Feb 21, 3:34 PM
Subscribers

Details

Summary

For PIC code, the existing assembly constraints do compile on aarch64.
Some kernel modules build ok using the 'p' constraint with the 'a'
operand modifier, but not all.

Diff Detail

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

Event Timeline

I do not like this at all, but I can't find a way to get this to work with GCC on arm64. I tried various combinations of constraints and modifiers to no avail.

FYI, this stack of changes lets me build aarch64 world + GENERIC with GCC 14 and 15.

Some kernel modules build ok using the 'p' constraint with the 'a' operand modifier, but not all.

Hmm, that seems a bit surprising. What goes wrong? I wonder if it works to try declaring a local variable struct sdt_probe *p = &_SDT_PROBE_NAME(...) and passing that as an operand instead.

This revision is now accepted and ready to land.Sat, Feb 7, 8:47 PM

Some kernel modules build ok using the 'p' constraint with the 'a' operand modifier, but not all.

Hmm, that seems a bit surprising. What goes wrong? I wonder if it works to try declaring a local variable struct sdt_probe *p = &_SDT_PROBE_NAME(...) and passing that as an operand instead.

I can try to reproduce, but I ended up with :lo12:LADDR0 or the like as the resulting argument to .word in the assembly in the case it breaks.