Switch from zero initialising variables to pattern initialising variables. Add versioning.

This commit is contained in:
inference 2022-11-09 08:20:02 +00:00
parent 3b475bb291
commit e770205018
7 changed files with 20 additions and 11 deletions

View File

@ -3,12 +3,12 @@
# Copyright 2022 Inference # Copyright 2022 Inference
# License: BSD 3-Clause Clear # License: BSD 3-Clause Clear
# 0.0.0.0 # 0.1.0.1
# Flags. # Flags.
## Hardening flags. ## Hardening flags.
C_SEC="-fPIE -fPIC -fstack-protector-all -fstack-clash-protection -D_FORTIFY_SOURCE=2 -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -fwrapv" C_SEC="-fPIE -fPIC -fstack-protector-all -fstack-clash-protection -D_FORTIFY_SOURCE=2 -ftrivial-auto-var-init=pattern -fwrapv"
LD_SEC="-Wl,--strip-all -Wl,-z,defs -Wl,-z,now -Wl,-z,relro -L/usr/local/lib -lhardened_malloc" LD_SEC="-Wl,--strip-all -Wl,-z,defs -Wl,-z,now -Wl,-z,relro -L/usr/local/lib -lhardened_malloc"
## Compiler flags. ## Compiler flags.

View File

@ -3,12 +3,12 @@
# Copyright 2022 Inference # Copyright 2022 Inference
# License: BSD 3-Clause Clear # License: BSD 3-Clause Clear
# 0.0.0.0 # 0.1.0.1
# Flags. # Flags.
## Hardening flags. ## Hardening flags.
C_SEC="-fPIE -fPIC -fstack-protector-all -fstack-clash-protection -D_FORTIFY_SOURCE=2 -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -fwrapv" C_SEC="-fPIE -fPIC -fstack-protector-all -fstack-clash-protection -D_FORTIFY_SOURCE=2 -ftrivial-auto-var-init=pattern -fwrapv"
LD_SEC="-Wl,-pie -Wl,--strip-all -Wl,-z,defs -Wl,-z,now -Wl,-z,relro -L/usr/local/lib -lhardened_malloc" LD_SEC="-Wl,-pie -Wl,--strip-all -Wl,-z,defs -Wl,-z,now -Wl,-z,relro -L/usr/local/lib -lhardened_malloc"
## Compiler flags. ## Compiler flags.

View File

@ -3,12 +3,12 @@
# Copyright 2022 Inference # Copyright 2022 Inference
# License: BSD 3-Clause Clear # License: BSD 3-Clause Clear
# 0.0.0.0 # 0.1.0.1
# Flags. # Flags.
## Hardening flags. ## Hardening flags.
C_SEC="-fPIE -fPIC -fstack-protector-all -fstack-clash-protection -D_FORTIFY_SOURCE=2 -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -fwrapv" C_SEC="-fPIE -fPIC -fstack-protector-all -fstack-clash-protection -D_FORTIFY_SOURCE=2 -ftrivial-auto-var-init=pattern -fwrapv"
LD_SEC="-Wl,--strip-all -Wl,-z,defs -Wl,-z,now -Wl,-z,relro -L/usr/local/lib -lhardened_malloc" LD_SEC="-Wl,--strip-all -Wl,-z,defs -Wl,-z,now -Wl,-z,relro -L/usr/local/lib -lhardened_malloc"
## Compiler flags. ## Compiler flags.

View File

@ -1,11 +1,14 @@
# Portage env Clang - No LTO, no PIE. # Portage - env - Clang - No LTO, no PIE
# Copyright 2022 Inference # Copyright 2022 Inference
# License: BSD 3-Clause Clear
# 0.0.0.0
# Flags. # Flags.
## Hardening flags. ## Hardening flags.
C_SEC="-fPIC -fstack-protector-all -fstack-clash-protection -D_FORTIFY_SOURCE=2 -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -fwrapv" C_SEC="-fPIC -fstack-protector-all -fstack-clash-protection -D_FORTIFY_SOURCE=2 -ftrivial-auto-var-init=pattern -fwrapv"
LD_SEC="-Wl,--strip-all -Wl,-z,defs -Wl,-z,now -Wl,-z,relro" LD_SEC="-Wl,--strip-all -Wl,-z,defs -Wl,-z,now -Wl,-z,relro"
## Compiler flags. ## Compiler flags.

View File

@ -1,11 +1,14 @@
# Portage - env - Clang - No LTO # Portage - env - Clang - No LTO
# Copyright 2022 Inference # Copyright 2022 Inference
# License: BSD 3-Clause Clear
# 0.0.0.0
# Flags. # Flags.
## Hardening flags. ## Hardening flags.
C_SEC="-fPIE -fPIC -fstack-protector-all -fstack-clash-protection -D_FORTIFY_SOURCE=2 -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -fwrapv" C_SEC="-fPIE -fPIC -fstack-protector-all -fstack-clash-protection -D_FORTIFY_SOURCE=2 -ftrivial-auto-var-init=pattern -fwrapv"
LD_SEC="-Wl,-pie -Wl,--strip-all -Wl,-z,defs -Wl,-z,now -Wl,-z,relro" LD_SEC="-Wl,-pie -Wl,--strip-all -Wl,-z,defs -Wl,-z,now -Wl,-z,relro"
## Compiler flags. ## Compiler flags.

View File

@ -1,11 +1,14 @@
# Portage env Clang - No PIE. # Portage env Clang - No PIE.
# Copyright 2022 Inference # Copyright 2022 Inference
# License: BSD 3-Clause Clear
# 0.0.0.0
# Flags. # Flags.
## Hardening flags. ## Hardening flags.
C_SEC="-fPIE -fPIC -fstack-protector-all -fstack-clash-protection -D_FORTIFY_SOURCE=2 -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -fwrapv" C_SEC="-fPIE -fPIC -fstack-protector-all -fstack-clash-protection -D_FORTIFY_SOURCE=2 -ftrivial-auto-var-init=pattern -fwrapv"
LD_SEC="-Wl,--strip-all -Wl,-z,defs -Wl,-z,now -Wl,-z,relro" LD_SEC="-Wl,--strip-all -Wl,-z,defs -Wl,-z,now -Wl,-z,relro"
## Compiler flags. ## Compiler flags.

View File

@ -20,7 +20,7 @@ STRIP="llvm-strip"
# Flags. # Flags.
## Hardening flags. ## Hardening flags.
C_SEC="-fPIE -fPIC -fstack-protector-all -fstack-clash-protection -D_FORTIFY_SOURCE=2 -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -fwrapv" C_SEC="-fPIE -fPIC -fstack-protector-all -fstack-clash-protection -D_FORTIFY_SOURCE=2 -ftrivial-auto-var-init=pattern -fwrapv"
LD_SEC="-Wl,-pie -Wl,--strip-all -Wl,-z,defs -Wl,-z,now -Wl,-z,relro" LD_SEC="-Wl,-pie -Wl,--strip-all -Wl,-z,defs -Wl,-z,now -Wl,-z,relro"
## Compiler flags. ## Compiler flags.