Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tor
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jarl
tor
Commits
10174b00
Commit
10174b00
authored
10 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'public/bug11477'
parents
97366139
64f62881
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changes/bug11477
+4
-0
4 additions, 0 deletions
changes/bug11477
configure.ac
+13
-6
13 additions, 6 deletions
configure.ac
with
17 additions
and
6 deletions
changes/bug11477
0 → 100644
+
4
−
0
View file @
10174b00
o Minor features:
- New --enable-expensive-hardening option to turn on security hardening
options that consume nontrivial amounts of CPU and memory. Right now,
this includes AddressSanitizer and UbSan. Closes ticket 11477.
This diff is collapsed.
Click to expand it.
configure.ac
+
13
−
6
View file @
10174b00
...
...
@@ -129,13 +129,13 @@ AC_ARG_ENABLE(gcc-warnings,
AC_ARG_ENABLE(gcc-warnings-advisory,
AS_HELP_STRING(--enable-gcc-warnings-advisory, [enable verbose warnings, excluding -Werror]))
dnl Adam shostack suggests the following for Windows:
dnl -D_FORTIFY_SOURCE=2 -fstack-protector-all
dnl Others suggest '/gs /safeseh /nxcompat /dynamicbase' for non-gcc on Windows
dnl This requires that we use gcc and that we add -O2 to the CFLAGS.
AC_ARG_ENABLE(gcc-hardening,
AS_HELP_STRING(--disable-gcc-hardening, disable compiler security checks))
AC_ARG_ENABLE(expensive-hardening,
AS_HELP_STRING(--enable-expensive-hardening, enable more expensive compiler hardening; makes Tor slower))
dnl Linker hardening options
dnl Currently these options are ELF specific - you can't use this with MacOSX
AC_ARG_ENABLE(linker-hardening,
...
...
@@ -628,6 +628,12 @@ if test x$enable_gcc_hardening != xno; then
fi
fi
if test x$enable_expensive_hardening = xyes ; then
TOR_CHECK_CFLAGS([-fsanitize=address])
TOR_CHECK_CFLAGS([-fsanitize=undefined])
TOR_CHECK_CFLAGS([-fno-omit-frame-pointer])
fi
if test x$enable_linker_hardening != xno; then
TOR_CHECK_LDFLAGS(-z relro -z now, "$all_ldflags_for_check", "$all_libs_for_check")
fi
...
...
@@ -640,10 +646,11 @@ dnl Now see if we have a -fomit-frame-pointer compiler option.
saved_CFLAGS="$CFLAGS"
TOR_CHECK_CFLAGS(-fomit-frame-pointer)
F_OMIT_FRAME_POINTER=''
if test "$saved_CFLAGS" != "$CFLAGS"; then
F_OMIT_FRAME_POINTER='-fomit-frame-pointer'
else
F_OMIT_FRAME_POINTER=''
if test x$enable_expensive_hardening != xyes ; then
F_OMIT_FRAME_POINTER='-fomit-frame-pointer'
fi
fi
CFLAGS="$saved_CFLAGS"
AC_SUBST(F_OMIT_FRAME_POINTER)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment