Skip to content

[aaelf64-morello] ELF markers to identify Morello purecap binaries#101

Merged
stuij merged 3 commits intoARM-software:mainfrom
amilendra:main
Jun 23, 2021
Merged

[aaelf64-morello] ELF markers to identify Morello purecap binaries#101
stuij merged 3 commits intoARM-software:mainfrom
amilendra:main

Conversation

@amilendra
Copy link
Copy Markdown
Contributor

  1. Assign e_flags bit 16 (0x00010000) to identify CHERI purecap binaries.
  2. Add platform agnostic CHERI Note Section to specify abi variant.

1) Assign e_flags bit 16 (0x00010000) to identify CHERI purecap binaries.
2) Add platform agnostic CHERI Note Section to specify abi variant.
Comment on lines +269 to +288
.. _Morello-specific e_flags:

.. class:: aaelf64-morello-elf-flags

.. table:: Morello-specific e_flags

+---------------------------------+--------------------------------------------------------------+
| Value | Meaning |
+---------------------------------+--------------------------------------------------------------+
| :code:`EF_AARCH64_MORELLO_EXT` | The ELF file contains uses an ABI where all pointers are |
| (:code:`0x00010000`) | implemented using capabilities (Pure-capability ABI) |
+---------------------------------+--------------------------------------------------------------+

Sections
--------

Special Sections
^^^^^^^^^^^^^^^^

A Morello toolchain can emit ELF Note sections in accordance to [CHERI_ELF_].
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should Morello prove successful, do you want to reserve the ability to reuse this flag to be its real non-prototype successor? As it stands this bit will forever be wasted once the Morello program comes to an end.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i.e. should this really be EF_AARCH64_CHERI_PURECAP?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

That is my only concern as well and the reason I had originally suggested an ELF note with a name of "Morello" as it could be easily jettisoned in the future. Checking e_flags bits is of course vastly simpler to deal with than looking for an ELF note, so if the bit is potentially forward looking I'm happy with having a flag in e_flags.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is difficult to make predictions at this stage. We can either reuse or rename the flag for a future architecture.
However we don't have any strong opinions on the name so will go with the more generic EF_AARCH64_CHERI_PURECAP.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@jrtc27, @bsdjhb
Are you happy with these changes?

Change-Id: Ic9e6f3bde6d3862b8a955f740d82db1e280a352e
Copy link
Copy Markdown

@bsdjhb bsdjhb left a comment

Choose a reason for hiding this comment

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

Thanks.

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.

4 participants