Jump to page: 1 24  
Page
Thread overview
IBT/BTI instructions and D compilers
Jul 10, 2023
Brian Callahan
Jul 10, 2023
Brian Callahan
Jul 10, 2023
Brian Callahan
Jul 10, 2023
Brian Callahan
Jul 10, 2023
Walter Bright
Jul 10, 2023
max haughton
Jul 10, 2023
FeepingCreature
Jul 10, 2023
Brian Callahan
Jul 10, 2023
Brian Callahan
Jul 10, 2023
Iain Buclaw
Jul 10, 2023
Brian Callahan
Jul 10, 2023
Brian Callahan
Jul 10, 2023
Brian Callahan
Jul 10, 2023
Iain Buclaw
Jul 10, 2023
Brian Callahan
Jul 15, 2023
Walter Bright
Jul 15, 2023
Walter Bright
Jul 16, 2023
Iain Buclaw
Jul 17, 2023
Walter Bright
Jul 17, 2023
Walter Bright
Jul 15, 2023
Brian Callahan
Jul 10, 2023
Iain Buclaw
Jul 12, 2023
Johan
Jul 14, 2023
Walter Bright
July 10, 2023

Hi all (but probably mostly Walter) --

OpenBSD has moved to an all-BTI world. Binaries produced by DMD and LDC no longer work because of this. If other OSes make this move, this problem will be further compounded. Is there any thought about enabling IBT/BTI instructions in DMD and LDC?

Thanks.

July 10, 2023
It looks like there is a workaround by adding PT_OPENBSD_NOBTCFI segment header. https://man.openbsd.org/ld.bfd.1

Have you tried that?
July 10, 2023
On Monday, 10 July 2023 at 11:39:39 UTC, Richard (Rikki) Andrew Cattermole wrote:
> It looks like there is a workaround by adding PT_OPENBSD_NOBTCFI segment header. https://man.openbsd.org/ld.bfd.1
>
> Have you tried that?

You know I'm an OpenBSD developer, right? We are not accepting this for compilers.
July 11, 2023
No, I am not aware of what projects people work upon unless I've helped them with it typically.

But yes, sorry for not seeing the from email address and making noise that wasn't helpful for continuing D support.
July 10, 2023
On Monday, 10 July 2023 at 12:06:37 UTC, Richard (Rikki) Andrew Cattermole wrote:
> No, I am not aware of what projects people work upon unless I've helped them with it typically.
>
> But yes, sorry for not seeing the from email address and making noise that wasn't helpful for continuing D support.

All good. I'm just asking about the status of IBT/BTI instructions being emitted by DMD and LDC. That's all.
July 10, 2023
On Monday, 10 July 2023 at 12:06:37 UTC, Richard (Rikki) Andrew Cattermole wrote:
> No, I am not aware of what projects people work upon unless I've helped them with it typically.
>
> But yes, sorry for not seeing the from email address and making noise that wasn't helpful for continuing D support.

If you're in the webforum, there's no way to see the From header anyways, afaict.
July 11, 2023
On 11/07/2023 12:16 AM, Brian Callahan wrote:
> All good. I'm just asking about the status of IBT/BTI instructions being emitted by DMD and LDC. That's all.

I should give you some feedback however.

When I looked up the appropriate keywords, all I got from Google was all but one completely useless links. The one useful one is by Intel targeting people who are already pretty deep into attack mitigation.

If this is anything to go by, there are no migration guidelines. So not very likely its going to have an implementation by anyone ;)
July 10, 2023

On Monday, 10 July 2023 at 11:24:37 UTC, Brian Callahan wrote:

>

Hi all (but probably mostly Walter) --

OpenBSD has moved to an all-BTI world. Binaries produced by DMD and LDC no longer work because of this. If other OSes make this move, this problem will be further compounded. Is there any thought about enabling IBT/BTI instructions in DMD and LDC?

Thanks.

BTI should work on GCC D Compiler (GDC) with -branch-protection=bti, LDC as far as I know lacks flag support but it should be very easy to implement because LLVM supports BTI.
Regarding DMD I think it's very complex because probably the backend doesn't support it.

July 10, 2023

On Monday, 10 July 2023 at 12:46:57 UTC, Ernesto Castellotti wrote:

>

On Monday, 10 July 2023 at 11:24:37 UTC, Brian Callahan wrote:

>

Hi all (but probably mostly Walter) --

OpenBSD has moved to an all-BTI world. Binaries produced by DMD and LDC no longer work because of this. If other OSes make this move, this problem will be further compounded. Is there any thought about enabling IBT/BTI instructions in DMD and LDC?

Thanks.

BTI should work on GCC D Compiler (GDC) with -branch-protection=bti, LDC as far as I know lacks flag support but it should be very easy to implement because LLVM supports BTI.
Regarding DMD I think it's very complex because probably the backend doesn't support it.

AFAIK, it does work on GDC.

July 10, 2023

On Monday, 10 July 2023 at 13:01:46 UTC, Brian Callahan wrote:

>

On Monday, 10 July 2023 at 12:46:57 UTC, Ernesto Castellotti wrote:

>

On Monday, 10 July 2023 at 11:24:37 UTC, Brian Callahan wrote:

>

Hi all (but probably mostly Walter) --

OpenBSD has moved to an all-BTI world. Binaries produced by DMD and LDC no longer work because of this. If other OSes make this move, this problem will be further compounded. Is there any thought about enabling IBT/BTI instructions in DMD and LDC?

Thanks.

BTI should work on GCC D Compiler (GDC) with -branch-protection=bti, LDC as far as I know lacks flag support but it should be very easy to implement because LLVM supports BTI.
Regarding DMD I think it's very complex because probably the backend doesn't support it.

AFAIK, it does work on GDC.

Yes I tried now, no problem with -fcf-protection and -mbranch-protection in GDC.

For LDC it should be very simple to do the same, it would be useful to open an issue in the LDC repo

The real problem is DMD, I'm afraid it needs some tweaking in the backend

« First   ‹ Prev
1 2 3 4