-
-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #326819 from risicle/ris-shadowstack
cc-wrapper: add support for `shadowstack` hardening flag
- Loading branch information
Showing
17 changed files
with
118 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
pkgs/development/libraries/glibc/2.39-revert-cet-default-disable.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
Revert 55d63e731253de82e96ed4ddca2e294076cd0bc5 | ||
|
||
--- b/sysdeps/x86/cpu-features.c | ||
+++ a/sysdeps/x86/cpu-features.c | ||
@@ -110,7 +110,7 @@ | ||
if (!CPU_FEATURES_CPU_P (cpu_features, RTM_ALWAYS_ABORT)) | ||
CPU_FEATURE_SET_ACTIVE (cpu_features, RTM); | ||
|
||
+#if CET_ENABLED | ||
-#if CET_ENABLED && 0 | ||
CPU_FEATURE_SET_ACTIVE (cpu_features, IBT); | ||
CPU_FEATURE_SET_ACTIVE (cpu_features, SHSTK); | ||
#endif | ||
reverted: | ||
--- b/sysdeps/x86/cpu-tunables.c | ||
+++ a/sysdeps/x86/cpu-tunables.c | ||
@@ -35,17 +35,6 @@ | ||
break; \ | ||
} | ||
|
||
-#define CHECK_GLIBC_IFUNC_CPU_BOTH(f, cpu_features, name, len) \ | ||
- _Static_assert (sizeof (#name) - 1 == len, #name " != " #len); \ | ||
- if (tunable_str_comma_strcmp_cte (&f, #name)) \ | ||
- { \ | ||
- if (f.disable) \ | ||
- CPU_FEATURE_UNSET (cpu_features, name) \ | ||
- else \ | ||
- CPU_FEATURE_SET_ACTIVE (cpu_features, name) \ | ||
- break; \ | ||
- } | ||
- | ||
/* Disable a preferred feature NAME. We don't enable a preferred feature | ||
which isn't available. */ | ||
#define CHECK_GLIBC_IFUNC_PREFERRED_OFF(f, cpu_features, name, len) \ | ||
@@ -142,13 +131,11 @@ | ||
} | ||
break; | ||
case 5: | ||
- { | ||
- CHECK_GLIBC_IFUNC_CPU_BOTH (n, cpu_features, SHSTK, 5); | ||
- } | ||
if (n.disable) | ||
{ | ||
CHECK_GLIBC_IFUNC_CPU_OFF (n, cpu_features, LZCNT, 5); | ||
CHECK_GLIBC_IFUNC_CPU_OFF (n, cpu_features, MOVBE, 5); | ||
+ CHECK_GLIBC_IFUNC_CPU_OFF (n, cpu_features, SHSTK, 5); | ||
CHECK_GLIBC_IFUNC_CPU_OFF (n, cpu_features, SSSE3, 5); | ||
CHECK_GLIBC_IFUNC_CPU_OFF (n, cpu_features, XSAVE, 5); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,6 +115,7 @@ let | |
"format" | ||
"fortify" | ||
"fortify3" | ||
"shadowstack" | ||
"pic" | ||
"pie" | ||
"relro" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters