My guess was accurate. A couple of small patches[0] allow me to
cross-compile a working hello-world. I'll see if I can turn this into a
full bindist to make arm64 ghc self hosting.

Then there a question of building ghc 9.8.3 instead of 9.10.1 which we
currently have. I imagine we can figure this out without much trouble.

I also want the hammer flag to be focused on a single file instead of
everything.

Eventually I want to get this into the ports (of course!)

> I gather retguard is a mitigation against return-oriented programming
> attacks, which is about manipulating return addresses so functions
> return to malicious code instead of the code that called them, to
> subvert protections like W^X and code signing. This is from a quick
> search.

https://www.openbsd.org/papers/eurobsdcon2018-rop.pdf is probably of
interest to you then.

> (For some reason, earlier in the thread, I was referring to W^X in the
> context of different partitions, is that (or something similar) a thing
> there too or was I misremembering or imagining things?)
>
> That said, if you can explain how to mark a function with
> no-retguard-please, I'm happy to do that. Googling “openbsd
> "no-retguard-please"” gives no results.

That's because it's spelled -fno-ret-protector  :-)

> Also, I reckon we're probably nearing the time to actually create a
> ticket on the GHC issue tracker. What do you reckon?

I don't understand the issue well enough to file a sensible ticket. So
far we know that the assembly fragment is somehow not compatible with
retguard. I don't expect anybody in GHC land to become excited about
debugging it instead of us doing the work.

[0] https://gitlab.haskell.org/blackgnezdo/ghc/-/commits/ghc-9.10.1-openbsd

Reply via email to