aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2018-03-23 20:33:53 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2018-03-23 20:33:53 -0400
commit7b808e6d3f2bee32e86a42c7bb46154d7c8e1a08 (patch)
tree9822d57fb2cf29937ba808d2c6cb0b814bbcf3f4
parentsupport Spectre mitigation patch for gcc compiler (diff)
downloadfirejail-7b808e6d3f2bee32e86a42c7bb46154d7c8e1a08.tar.gz
firejail-7b808e6d3f2bee32e86a42c7bb46154d7c8e1a08.tar.zst
firejail-7b808e6d3f2bee32e86a42c7bb46154d7c8e1a08.zip
fixes
-rwxr-xr-xconfigure10
-rw-r--r--configure.ac10
-rw-r--r--src/fsec-print/print.c2
3 files changed, 7 insertions, 15 deletions
diff --git a/configure b/configure
index 80f66f8b3..0ccaad051 100755
--- a/configure
+++ b/configure
@@ -2100,7 +2100,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
2100 2100
2101#AC_CONFIG_HEADERS([config.h]) 2101#AC_CONFIG_HEADERS([config.h])
2102 2102
2103
2104ac_ext=c 2103ac_ext=c
2105ac_cpp='$CPP $CPPFLAGS' 2104ac_cpp='$CPP $CPPFLAGS'
2106ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2105ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3106,7 +3105,6 @@ else
3106fi 3105fi
3107 3106
3108 3107
3109
3110HAVE_SPECTRE="no" 3108HAVE_SPECTRE="no"
3111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Spectre mitigation support in gcc compiler" >&5 3109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Spectre mitigation support in gcc compiler" >&5
3112$as_echo_n "checking for Spectre mitigation support in gcc compiler... " >&6; } 3110$as_echo_n "checking for Spectre mitigation support in gcc compiler... " >&6; }
@@ -3121,7 +3119,7 @@ if test "$HAVE_SPECTRE" = "yes"; then :
3121 3119
3122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 3120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3123$as_echo "yes" >&6; } 3121$as_echo "yes" >&6; }
3124 EXTRA_CFLAGS+="-mindirect-branch=thunk" 3122 EXTRA_CFLAGS+=" -mindirect-branch=thunk "
3125 3123
3126fi 3124fi
3127if test "$HAVE_SPECTRE" = "no"; then : 3125if test "$HAVE_SPECTRE" = "no"; then :
@@ -3132,7 +3130,6 @@ $as_echo "... not available" >&6; }
3132fi 3130fi
3133 3131
3134 3132
3135
3136HAVE_APPARMOR="" 3133HAVE_APPARMOR=""
3137# Check whether --enable-apparmor was given. 3134# Check whether --enable-apparmor was given.
3138if test "${enable_apparmor+set}" = set; then : 3135if test "${enable_apparmor+set}" = set; then :
@@ -3147,7 +3144,6 @@ if test "x$enable_apparmor" = "xyes"; then :
3147fi 3144fi
3148 3145
3149 3146
3150
3151ac_ext=c 3147ac_ext=c
3152ac_cpp='$CPP $CPPFLAGS' 3148ac_cpp='$CPP $CPPFLAGS'
3153ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 3149ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3559,7 +3555,7 @@ fi
3559fi 3555fi
3560if test "x$enable_apparmor" = "xyes"; then : 3556if test "x$enable_apparmor" = "xyes"; then :
3561 3557
3562 EXTRA_LDFLAGS+="-lapparmor " 3558 EXTRA_LDFLAGS+=" -lapparmor "
3563 3559
3564fi 3560fi
3565 3561
@@ -3753,7 +3749,7 @@ fi
3753if test "x$enable_gcov" = "xyes"; then : 3749if test "x$enable_gcov" = "xyes"; then :
3754 3750
3755 HAVE_GCOV="--coverage -DHAVE_GCOV " 3751 HAVE_GCOV="--coverage -DHAVE_GCOV "
3756 EXTRA_LDFLAGS+="-lgcov --coverage " 3752 EXTRA_LDFLAGS+=" -lgcov --coverage "
3757 3753
3758 3754
3759fi 3755fi
diff --git a/configure.ac b/configure.ac
index d6d4eb874..9a7a9d65e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,13 +3,11 @@ AC_INIT(firejail, 0.9.53, netblue30@yahoo.com, , http://firejail.wordpress.com)
3AC_CONFIG_SRCDIR([src/firejail/main.c]) 3AC_CONFIG_SRCDIR([src/firejail/main.c])
4#AC_CONFIG_HEADERS([config.h]) 4#AC_CONFIG_HEADERS([config.h])
5 5
6
7AC_PROG_CC 6AC_PROG_CC
8#AC_PROG_CXX 7#AC_PROG_CXX
9AC_PROG_INSTALL 8AC_PROG_INSTALL
10AC_PROG_RANLIB 9AC_PROG_RANLIB
11 10
12
13HAVE_SPECTRE="no" 11HAVE_SPECTRE="no"
14AC_MSG_CHECKING(for Spectre mitigation support in gcc compiler) 12AC_MSG_CHECKING(for Spectre mitigation support in gcc compiler)
15AS_IF([test "$CC" = "gcc"], [ 13AS_IF([test "$CC" = "gcc"], [
@@ -19,14 +17,13 @@ AS_IF([test "$CC" = "gcc"], [
19]) 17])
20AS_IF([test "$HAVE_SPECTRE" = "yes"], [ 18AS_IF([test "$HAVE_SPECTRE" = "yes"], [
21 AC_MSG_RESULT(yes) 19 AC_MSG_RESULT(yes)
22 EXTRA_CFLAGS+="-mindirect-branch=thunk" 20 EXTRA_CFLAGS+=" -mindirect-branch=thunk "
23]) 21])
24AS_IF([test "$HAVE_SPECTRE" = "no"], [ 22AS_IF([test "$HAVE_SPECTRE" = "no"], [
25 AC_MSG_RESULT(... not available) 23 AC_MSG_RESULT(... not available)
26]) 24])
27AC_SUBST([EXTRA_CFLAGS]) 25AC_SUBST([EXTRA_CFLAGS])
28 26
29
30HAVE_APPARMOR="" 27HAVE_APPARMOR=""
31AC_ARG_ENABLE([apparmor], 28AC_ARG_ENABLE([apparmor],
32 AS_HELP_STRING([--enable-apparmor], [enable apparmor])) 29 AS_HELP_STRING([--enable-apparmor], [enable apparmor]))
@@ -35,13 +32,12 @@ AS_IF([test "x$enable_apparmor" = "xyes"], [
35 AC_SUBST(HAVE_APPARMOR) 32 AC_SUBST(HAVE_APPARMOR)
36]) 33])
37 34
38
39AS_IF([test "x$enable_apparmor" = "xyes"], [ 35AS_IF([test "x$enable_apparmor" = "xyes"], [
40 AC_CHECK_HEADER(sys/apparmor.h, , [AC_MSG_ERROR( 36 AC_CHECK_HEADER(sys/apparmor.h, , [AC_MSG_ERROR(
41 [Couldn't find sys/apparmor.h... please install apparmor user space library and development files] )]) 37 [Couldn't find sys/apparmor.h... please install apparmor user space library and development files] )])
42]) 38])
43AS_IF([test "x$enable_apparmor" = "xyes"], [ 39AS_IF([test "x$enable_apparmor" = "xyes"], [
44 EXTRA_LDFLAGS+="-lapparmor " 40 EXTRA_LDFLAGS+=" -lapparmor "
45]) 41])
46AC_SUBST([EXTRA_LDFLAGS]) 42AC_SUBST([EXTRA_LDFLAGS])
47 43
@@ -160,7 +156,7 @@ AC_ARG_ENABLE([gcov],
160 AS_HELP_STRING([--enable-gcov], [Gcov instrumentation])) 156 AS_HELP_STRING([--enable-gcov], [Gcov instrumentation]))
161AS_IF([test "x$enable_gcov" = "xyes"], [ 157AS_IF([test "x$enable_gcov" = "xyes"], [
162 HAVE_GCOV="--coverage -DHAVE_GCOV " 158 HAVE_GCOV="--coverage -DHAVE_GCOV "
163 EXTRA_LDFLAGS+="-lgcov --coverage " 159 EXTRA_LDFLAGS+=" -lgcov --coverage "
164 AC_SUBST(HAVE_GCOV) 160 AC_SUBST(HAVE_GCOV)
165]) 161])
166 162
diff --git a/src/fsec-print/print.c b/src/fsec-print/print.c
index e3b53c44c..faf59aa35 100644
--- a/src/fsec-print/print.c
+++ b/src/fsec-print/print.c
@@ -269,7 +269,7 @@ static void bpf_decode_args(const struct sock_filter *bpf, unsigned int line) {
269 native_arch = (ARCH_NR == ARCH_64)? 1: 0; 269 native_arch = (ARCH_NR == ARCH_64)? 1: 0;
270 } 270 }
271 else if (bpf->k == X32_SYSCALL_BIT) 271 else if (bpf->k == X32_SYSCALL_BIT)
272 printf("X32_ABI true:%.4x (false %.4x)", 272 printf("X32_ABI %.4x (false %.4x)",
273 (line + 1) + bpf->jt, 273 (line + 1) + bpf->jt,
274 (line + 1) + bpf->jf); 274 (line + 1) + bpf->jf);
275 else if (name) 275 else if (name)