Skip to content

Enable Intel CET support in assembler sources#56

Open
nefigtut wants to merge 1 commit into
intel:developfrom
nefigtut:develop
Open

Enable Intel CET support in assembler sources#56
nefigtut wants to merge 1 commit into
intel:developfrom
nefigtut:develop

Conversation

@nefigtut
Copy link
Copy Markdown

@nefigtut nefigtut commented May 17, 2026

If Intel CET is enabled, add .note.gnu.property section with x86 assembly code which indicates IBT and SHSTK presence. This is required for ELF outputs to mark Intel CET support when Intel CET is enabled since all input files must be marked with Intel CET support in order for linker to mark output with Intel CET support.

The required ENDBR instructions were added by the upsteream ISA-L commit cd888f01 included in this copy of ISA-L code. The ISA-L upstream commit 57846f41 which added a section needed is missing here, so add it.

The object files with an assembly code and the resulting library have proper flags in the proper section as a result:

$ readelf -n sources/isal/igzip/encode_df.c.o sources/libqpl.so.1.9.0
File: sources/isal/igzip/encode_df.c.o
Displaying notes found in: .note.gnu.property
  Owner                Data size 	Description
  GNU                  0x00000010	NT_GNU_PROPERTY_TYPE_0
      Properties: x86 feature: IBT, SHSTK
File: sources/libqpl.so.1.9.0
Displaying notes found in: .note.gnu.property
  Owner                Data size 	Description
  GNU                  0x00000010	NT_GNU_PROPERTY_TYPE_0
      Properties: x86 feature: IBT, SHSTK

If Intel CET is enabled, add .note.gnu.property section with x86 assembly code
which indicates IBT and SHSTK presence. This is required for ELF outputs to mark
Intel CET support when Intel CET is enabled since all input files must be marked
with Intel CET support in order for linker to mark output with Intel CET support.

The required ENDBR instructions were added by the upsteream ISA-L commit cd888f01
(intel/isa-l@cd888f01) included in this copy of ISA-L
code. The ISA-L upstream commit 57846f41 (https://github.com/intel/isa-l/commit/
57846f41) which added a section needed is missing here, so add it.

The object files with an assembly code and the resulting library have proper
flags in the proper section as a result:

$ readelf -n sources/isal/igzip/encode_df.c.o sources/libqpl.so.1.9.0
File: sources/isal/igzip/encode_df.c.o
Displaying notes found in: .note.gnu.property
  Owner                Data size 	Description
  GNU                  0x00000010	NT_GNU_PROPERTY_TYPE_0
      Properties: x86 feature: IBT, SHSTK
File: sources/libqpl.so.1.9.0
Displaying notes found in: .note.gnu.property
  Owner                Data size 	Description
  GNU                  0x00000010	NT_GNU_PROPERTY_TYPE_0
      Properties: x86 feature: IBT, SHSTK
@nefigtut
Copy link
Copy Markdown
Author

nefigtut commented May 17, 2026

hi, i'm adding the intel-qpl package to RedHat Linux per Intel request. RHEL (and probably other distributions) requires security features like Intel CET to be enabled for the executables shipped. This PR suggests enabling Intel CET for the resulting libqpl.so binary. could you please consider this PR for a possible inclusion? thank you.

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.

1 participant