public inbox for gnu-gabi@sourceware.org
 help / color / mirror / Atom feed
* RFC: Update x86 psABI to support shadow stac
@ 2017-01-01  0:00 H.J. Lu
  2017-01-01  0:00 ` Florian Weimer
  0 siblings, 1 reply; 12+ messages in thread
From: H.J. Lu @ 2017-01-01  0:00 UTC (permalink / raw)
  To: gnu-gabi, IA32 System V Application Binary Interface, x86-64-abi

Any comments?

-- 
H.J.
---
To support shadow stack (SHSTK) in Intel Control-flow Enforcement
Technology (CET) instructions:

https://software.intel.com/sites/default/files/managed/4d/2a/control-flow-enforc
ement-technology-preview.pdf

following changes to x86 psABI are required.

To program properties, add

#define GNU_PROPERTY_X86_FEATURE_1_SHSTK (1U << 1)

to the GNU_PROPERTY_X86_FEATURE_1_AND property to indicate that all
executable sections are compatible with SHSTK where return address
popped from shadow stack always matches return address popped from
normal stack.

GNU_PROPERTY_X86_FEATURE_1_SHSTK is set on output only if it is set on
all relocatable inputs, which means that the C library must be compiled
with SHSTK-enabled compiler.

Load-time processing

On a SHSTK capable processor, the following steps should be taken:

1. When loading an executable, if GNU_PROPERTY_X86_FEATURE_1_SHSTK is
set on the executable as well as all shared objects loaded via the
DT_NEEDED tag, enable SHSTK.
2. After SHSTK is enabled, it is an error to load a shared object
without GNU_PROPERTY_X86_FEATURE_1_SHSTK.
gnu-6:pts/8[8]> cat  shstk.txt                /export/gnu/import/git/properties
Update x86 psABI to support shadow stack

To support shadow stack (SHSTK) in Intel Control-flow Enforcement
Technology (CET) instructions:

https://software.intel.com/sites/default/files/managed/4d/2a/control-flow-enforcement-technology-preview.pdf

following changes to x86 psABI are required.

To program properties, add

#define GNU_PROPERTY_X86_FEATURE_1_SHSTK (1U << 1)

to the GNU_PROPERTY_X86_FEATURE_1_AND property to indicate that all
executable sections are compatible with SHSTK where return address
popped from shadow stack always matches return address popped from
normal stack.

GNU_PROPERTY_X86_FEATURE_1_SHSTK is set on output only if it is set on
all relocatable inputs, which means that the C library must be compiled
with SHSTK-enabled compiler.

Load-time processing

On a SHSTK capable processor, the following steps should be taken:

1. When loading an executable, if GNU_PROPERTY_X86_FEATURE_1_SHSTK is
set on the executable as well as all shared objects loaded via the
DT_NEEDED tag, enable SHSTK.
2. After SHSTK is enabled, it is an error to load a shared object
without GNU_PROPERTY_X86_FEATURE_1_SHSTK.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-07-28 20:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-01  0:00 RFC: Update x86 psABI to support shadow stac H.J. Lu
2017-01-01  0:00 ` Florian Weimer
2017-01-01  0:00   ` H.J. Lu
2017-01-01  0:00     ` Florian Weimer
2017-01-01  0:00       ` H.J. Lu
2017-01-01  0:00         ` Florian Weimer
2017-01-01  0:00           ` H.J. Lu
2017-01-01  0:00             ` Florian Weimer
2017-01-01  0:00               ` H.J. Lu
2017-01-01  0:00                 ` Florian Weimer
2017-01-01  0:00                   ` H.J. Lu
2017-01-01  0:00         ` Shanbhogue, Vedvyas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).