Add control-flow protection

This commit is contained in:
inference 2023-10-15 09:20:16 +01:00
parent 0a4d330123
commit 8a34c3db5a
Signed by: inference
SSH Key Fingerprint: SHA256:FtEVfx1CmTKMy40VwZvF4k+3TC+QhCWy+EmPRg50Nnc
3 changed files with 6 additions and 6 deletions

View File

@ -4,12 +4,12 @@
# Copyright 2022 Jake Winters # Copyright 2022 Jake Winters
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# Version: 10.0.0-alpha.1+17 # Version: 10.0.0-alpha.2+18
# Flags # Flags
# Hardening flags # Hardening flags
C_SEC="-fstack-clash-protection -fstack-protector-strong -ftrivial-auto-var-init=zero -fwrapv" C_SEC="-fcf-protection=full -fstack-clash-protection -fstack-protector-strong -ftrivial-auto-var-init=zero -fwrapv"
LD_SEC="-Wl,-z,defs -Wl,-z,now -Wl,-z,relro" LD_SEC="-Wl,-z,defs -Wl,-z,now -Wl,-z,relro"
## Compiler flags ## Compiler flags
CFLAGS="-march=znver3 -mtune=znver3 -O2 -pipe ${C_SEC}" CFLAGS="-march=znver3 -mtune=znver3 -O2 -pipe ${C_SEC}"

View File

@ -4,12 +4,12 @@
# Copyright 2023 Jake Winters # Copyright 2023 Jake Winters
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# Version: 3.0.0-alpha.1+5 # Version: 3.0.0-alpha.2+6
# Flags # Flags
# Hardening flags # Hardening flags
C_SEC="-fstack-clash-protection -fstack-protector-strong -ftrivial-auto-var-init=zero -fwrapv" C_SEC="-fcf-protection=full -fstack-clash-protection -fstack-protector-strong -ftrivial-auto-var-init=zero -fwrapv"
LD_SEC="-Wl,-z,defs -Wl,-z,now -Wl,-z,relro" LD_SEC="-Wl,-z,defs -Wl,-z,now -Wl,-z,relro"
## Compiler flags ## Compiler flags
CFLAGS="-flto=4 -march=znver3 -mtune=znver3 -O2 -pipe ${C_SEC}" CFLAGS="-flto=4 -march=znver3 -mtune=znver3 -O2 -pipe ${C_SEC}"

View File

@ -4,12 +4,12 @@
# Copyright 2023 Jake Winters # Copyright 2023 Jake Winters
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
# Version: 5.0.0-alpha.1+9 # Version: 5.0.0-alpha.2+10
# Flags # Flags
## Hardening flags ## Hardening flags
C_SEC="-fstack-clash-protection -fstack-protector-strong -ftrivial-auto-var-init=zero -fwrapv" C_SEC="-fcf-protection=full -fstack-clash-protection -fstack-protector-strong -ftrivial-auto-var-init=zero -fwrapv"
LD_SEC="-Wl,-z,defs -Wl,-z,now -Wl,-z,relro" LD_SEC="-Wl,-z,defs -Wl,-z,now -Wl,-z,relro"
## Compiler flags ## Compiler flags
CFLAGS="-march=znver3 -mtune=znver3 -O2 -pipe ${C_SEC}" CFLAGS="-march=znver3 -mtune=znver3 -O2 -pipe ${C_SEC}"