[PATCH v5 0/3] aarch64: GCS feature check in GNU note properties for input objects of a same link unit

Richard Sandiford richard.sandiford@arm.com
Mon Dec 2 15:07:09 GMT 2024


Matthieu Longo <matthieu.longo@arm.com> writes:
> This patch series is based on the feedback from a previous review [1] on the GCS patch, and only focus on adding support for Guarded Control Stack to AArch64 linker.
> Most of the issues mentioned in [1] are addressed in a separate patch series [2] independent of the introduction of GCS.
> Regarding the GCS feature, more technical details are available in patch 1.
>
> Regression tested on aarch64-unknown-linux-gnu.
> Ok for binutils-master?

OK, thanks.

As with the BTI series: I reviewed the series internally before Matthieu
posted it, since that was likely to be more productive.  I agree this
version of the series addresses Richard's earlier comments as well as
the ones I had.

If there's any fallout, please send a message to both Matthieu and me,
so that we can cover for each other's absences over December.

Thanks,
Richard

> Regards,
> Matthieu.
>
> [1]: https://inbox.sourceware.org/binutils/4796b1c0-20b5-4ffd-a71f-fdd955cf139b@arm.com/
> [2]: https://inbox.sourceware.org/binutils/20241202142219.3426785-1-matthieu.longo@arm.com/
>
> Matthieu Longo (2):
>   aarch64: add tests to check the correct merge of the GCS feature with
>     others.
>   aarch64: add tests for combinations of GCS options and marked/unmarked
>     inputs
>
> Srinath Parvathaneni (1):
>   aarch64: GCS feature check in GNU note properties for input objects
>
>  bfd/elfnn-aarch64.c                           | 29 +++++++
>  bfd/elfxx-aarch64.c                           | 67 ++++++++++++++-
>  bfd/elfxx-aarch64.h                           | 22 +++++
>  binutils/readelf.c                            |  4 +
>  include/elf/common.h                          |  1 +
>  ld/emultempl/aarch64elf.em                    | 85 ++++++++++++++++---
>  ld/ld.texi                                    | 30 +++++++
>  ld/testsuite/ld-aarch64/protections/gcs-1-a.d |  9 ++
>  ld/testsuite/ld-aarch64/protections/gcs-1-b.d | 12 +++
>  ld/testsuite/ld-aarch64/protections/gcs-1-c.d |  7 ++
>  ld/testsuite/ld-aarch64/protections/gcs-1-d.d |  7 ++
>  .../ld-aarch64/protections/gcs-2-a-i.d        | 12 +++
>  .../ld-aarch64/protections/gcs-2-a-ii.d       | 14 +++
>  .../ld-aarch64/protections/gcs-2-b-i.d        | 12 +++
>  .../ld-aarch64/protections/gcs-2-b-ii.d       |  7 ++
>  .../ld-aarch64/protections/gcs-2-b-iii.d      | 12 +++
>  .../ld-aarch64/protections/gcs-2-b-iv.d       |  7 ++
>  .../ld-aarch64/protections/gcs-2-c-i.d        |  7 ++
>  .../ld-aarch64/protections/gcs-2-c-ii.d       |  7 ++
>  .../ld-aarch64/protections/gcs-3-a-i.d        |  8 ++
>  .../ld-aarch64/protections/gcs-3-a-ii.d       | 14 +++
>  .../ld-aarch64/protections/gcs-3-a-iii.d      | 13 +++
>  .../ld-aarch64/protections/gcs-3-a-iv.d       | 14 +++
>  .../ld-aarch64/protections/gcs-3-b-i.d        |  8 ++
>  .../ld-aarch64/protections/gcs-3-b-ii.d       |  8 ++
>  .../ld-aarch64/protections/gcs-3-b-iii.d      |  8 ++
>  .../ld-aarch64/protections/gcs-3-c-i.d        |  8 ++
>  .../ld-aarch64/protections/gcs-3-c-ii.d       |  8 ++
>  .../ld-aarch64/protections/gcs-3-c-iii.d      |  8 ++
>  ld/testsuite/ld-aarch64/protections/gcs.s     | 12 +++
>  ld/testsuite/ld-aarch64/protections/gcs2.s    | 32 +++++++
>  .../gnu-note-properties-maskable-merged.inc   |  4 +
>  .../gnu-note-properties-maskable-split.inc    | 21 +++++
>  .../gnu-note-properties-selectable-merged.inc |  4 +
>  .../gnu-note-properties-selectable-split.inc  | 21 +++++
>  .../protections/gnu-properties-1-all-merged.d |  2 +-
>  .../protections/gnu-properties-1-all-split.d  |  2 +-
>  .../protections/gnu-properties-all.s          |  3 +-
>  .../gnu-properties-combine-2-all-all.d        |  4 +-
>  .../gnu-properties-combine-2-all-bti-pac.d    | 12 +++
>  .../gnu-properties-combine-2-all-gcs.d        | 12 +++
>  ld/testsuite/ld-aarch64/protections/nogcs.s   | 14 +++
>  42 files changed, 572 insertions(+), 19 deletions(-)
>  create mode 100644 ld/testsuite/ld-aarch64/protections/gcs-1-a.d
>  create mode 100644 ld/testsuite/ld-aarch64/protections/gcs-1-b.d
>  create mode 100644 ld/testsuite/ld-aarch64/protections/gcs-1-c.d
>  create mode 100644 ld/testsuite/ld-aarch64/protections/gcs-1-d.d
>  create mode 100644 ld/testsuite/ld-aarch64/protections/gcs-2-a-i.d
>  create mode 100644 ld/testsuite/ld-aarch64/protections/gcs-2-a-ii.d
>  create mode 100644 ld/testsuite/ld-aarch64/protections/gcs-2-b-i.d
>  create mode 100644 ld/testsuite/ld-aarch64/protections/gcs-2-b-ii.d
>  create mode 100644 ld/testsuite/ld-aarch64/protections/gcs-2-b-iii.d
>  create mode 100644 ld/testsuite/ld-aarch64/protections/gcs-2-b-iv.d
>  create mode 100644 ld/testsuite/ld-aarch64/protections/gcs-2-c-i.d
>  create mode 100644 ld/testsuite/ld-aarch64/protections/gcs-2-c-ii.d
>  create mode 100644 ld/testsuite/ld-aarch64/protections/gcs-3-a-i.d
>  create mode 100644 ld/testsuite/ld-aarch64/protections/gcs-3-a-ii.d
>  create mode 100644 ld/testsuite/ld-aarch64/protections/gcs-3-a-iii.d
>  create mode 100644 ld/testsuite/ld-aarch64/protections/gcs-3-a-iv.d
>  create mode 100644 ld/testsuite/ld-aarch64/protections/gcs-3-b-i.d
>  create mode 100644 ld/testsuite/ld-aarch64/protections/gcs-3-b-ii.d
>  create mode 100644 ld/testsuite/ld-aarch64/protections/gcs-3-b-iii.d
>  create mode 100644 ld/testsuite/ld-aarch64/protections/gcs-3-c-i.d
>  create mode 100644 ld/testsuite/ld-aarch64/protections/gcs-3-c-ii.d
>  create mode 100644 ld/testsuite/ld-aarch64/protections/gcs-3-c-iii.d
>  create mode 100644 ld/testsuite/ld-aarch64/protections/gcs.s
>  create mode 100644 ld/testsuite/ld-aarch64/protections/gcs2.s
>  create mode 100644 ld/testsuite/ld-aarch64/protections/gnu-properties-combine-2-all-bti-pac.d
>  create mode 100644 ld/testsuite/ld-aarch64/protections/gnu-properties-combine-2-all-gcs.d
>  create mode 100644 ld/testsuite/ld-aarch64/protections/nogcs.s


More information about the Binutils mailing list