https://sourceware.org/bugzilla/show_bug.cgi?id=24709

Tamar Christina <tnfchris at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tnfchris at sourceware dot org

--- Comment #4 from Tamar Christina <tnfchris at sourceware dot org> ---
Hi Christophe,

A "CMSE-far-branch" gateway isn't allowed by secure extensions development
guide.

The relevant bits are in section 3.4.3,

It states a secure veneer must be an SG followed by a B.W, it does so to
prevent any inadvertent leaks.

So sticking to the specification means the only way to fix this is to add a
long branch veneer after the secure gateway veneer. The extra complication here
is that you have to still create the address to use the indirect branch on.

You will then have to either a) arrange the literal to be in secure memory or
b) construct the address using a sequence of movs.

In the end, due to the complications of this we had decided it's not worth the
headache. We deemed it unlikely that in real code you'd have a program so big
that it would push the veneers and the text section to far away from each other
in an embedded platform.

I don't know what could have changed to make the test fail now, but the address
is clearly too far away.  I'd suggest just changing the address as it hold no
significance in this case and fixing the issue requires you to adhere to a lot
of constraints placed in the CMSE specs.

[1]
https://developer.arm.com/architectures/cpu-architecture/m-profile/docs/ecm0359818/latest/armv8-m-security-extensions-requirements-on-development-tools-engineering-specification

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to