1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-11-06 19:29:35 +03:00
Files
glibc/sysdeps/i386/stackguard-macros.h
Uros Bizjak 1a076b5c21 i386: Use __seg_gs qualifiers in {STACK, POINTER}_CHK_GUARD macros
Use the __seg_gs named address space qualifiers to cast reads of
the guard values in the TCB as %gs: prefixed addresses.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: H.J.Lu <hjl.tools@gmail.com>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2025-09-10 05:32:40 -07:00

8 lines
202 B
C

#include <stdint.h>
#define STACK_CHK_GUARD \
(*(uintptr_t __seg_gs *) offsetof (tcbhead_t, stack_guard))
#define POINTER_CHK_GUARD \
(*(uintptr_t __seg_gs *) offsetof (tcbhead_t, pointer_guard))