* [PATCH] xfsprogs: remove retpoline support
@ 2018-10-10 19:58 Eric Sandeen
2018-10-10 21:21 ` Darrick J. Wong
0 siblings, 1 reply; 2+ messages in thread
From: Eric Sandeen @ 2018-10-10 19:58 UTC (permalink / raw)
To: linux-xfs; +Cc: Florian Weimer
When it came up that xfsprogs was using retpolines by default,
the gcc folks inside Red Hat expressed ... alarm. I'm not sure
of all the details, but I think the concern was that userspace
support for this is not really quite baked.
Unless/until there is a demonstrated side-channel which would
warrant retpolines here, let's just remove it for now.
Cc: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
Getting this on the list so we can have a discussion with people who
understand the issues better than I do ...
diff --git a/configure.ac b/configure.ac
index 5fdf78e..41f1209 100644
--- a/configure.ac
+++ b/configure.ac
@@ -227,7 +227,6 @@ if test "$enable_lto" = "yes" && test "$have_lto" != "yes"; then
AC_MSG_ERROR([LTO not supported by compiler.])
fi
-AC_PACKAGE_CHECK_RETPOLINE
AC_CHECK_SIZEOF([long])
AC_CHECK_SIZEOF([char *])
AC_TYPE_UMODE_T
diff --git a/include/builddefs.in b/include/builddefs.in
index f7d39a4..fe529c6 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -166,13 +166,6 @@ LIBICU_CFLAGS = @libicu_CFLAGS@
SANITIZER_CFLAGS += @addrsan_cflags@ @threadsan_cflags@ @ubsan_cflags@
SANITIZER_LDFLAGS += @addrsan_ldflags@ @threadsan_ldflags@ @ubsan_ldflags@
-# Enable retpolines if available
-HAVE_RETPOLINE = @have_retpoline@
-ifeq ($(HAVE_RETPOLINE),yes)
-OPTIMIZER += @retpoline_cflags@
-LOADERFLAGS += @retpoline_ldflags@
-endif
-
# Use special ar/ranlib wrappers if we have lto
HAVE_LTO = @have_lto@
ifeq ($(HAVE_LTO),yes)
diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4
index 0a6b514..52ddac2 100644
--- a/m4/package_libcdev.m4
+++ b/m4/package_libcdev.m4
@@ -446,25 +446,3 @@ AC_DEFUN([AC_PACKAGE_CHECK_LTO],
AC_SUBST(lto_cflags)
AC_SUBST(lto_ldflags)
])
-
-AC_DEFUN([AC_PACKAGE_CHECK_RETPOLINE],
- [ AC_MSG_CHECKING([if C compiler supports retpoline])
- OLD_CFLAGS="$CFLAGS"
- OLD_LDFLAGS="$LDFLAGS"
- RETPOLINE_FLAGS="-mindirect-branch=thunk"
- CFLAGS="$CFLAGS $RETPOLINE_FLAGS"
- LDFLAGS="$LDFLAGS $RETPOLINE_FLAGS"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
- [AC_MSG_RESULT([yes])]
- [retpoline_cflags=$RETPOLINE_FLAGS]
- [retpoline_ldflags=$RETPOLINE_FLAGS],
- [AC_MSG_RESULT([no])])
- if test -n "$retpoline_cflags"; then
- have_retpoline=yes
- fi
- CFLAGS="${OLD_CFLAGS}"
- LDFLAGS="${OLD_LDFLAGS}"
- AC_SUBST(have_retpoline)
- AC_SUBST(retpoline_cflags)
- AC_SUBST(retpoline_ldflags)
- ])
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] xfsprogs: remove retpoline support
2018-10-10 19:58 [PATCH] xfsprogs: remove retpoline support Eric Sandeen
@ 2018-10-10 21:21 ` Darrick J. Wong
0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2018-10-10 21:21 UTC (permalink / raw)
To: Eric Sandeen; +Cc: linux-xfs, Florian Weimer
On Wed, Oct 10, 2018 at 02:58:40PM -0500, Eric Sandeen wrote:
> When it came up that xfsprogs was using retpolines by default,
> the gcc folks inside Red Hat expressed ... alarm. I'm not sure
> of all the details, but I think the concern was that userspace
> support for this is not really quite baked.
>
> Unless/until there is a demonstrated side-channel which would
> warrant retpolines here, let's just remove it for now.
>
> Cc: Florian Weimer <fweimer@redhat.com>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Fine with me...
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> ---
>
> Getting this on the list so we can have a discussion with people who
> understand the issues better than I do ...
>
> diff --git a/configure.ac b/configure.ac
> index 5fdf78e..41f1209 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -227,7 +227,6 @@ if test "$enable_lto" = "yes" && test "$have_lto" != "yes"; then
> AC_MSG_ERROR([LTO not supported by compiler.])
> fi
>
> -AC_PACKAGE_CHECK_RETPOLINE
> AC_CHECK_SIZEOF([long])
> AC_CHECK_SIZEOF([char *])
> AC_TYPE_UMODE_T
> diff --git a/include/builddefs.in b/include/builddefs.in
> index f7d39a4..fe529c6 100644
> --- a/include/builddefs.in
> +++ b/include/builddefs.in
> @@ -166,13 +166,6 @@ LIBICU_CFLAGS = @libicu_CFLAGS@
> SANITIZER_CFLAGS += @addrsan_cflags@ @threadsan_cflags@ @ubsan_cflags@
> SANITIZER_LDFLAGS += @addrsan_ldflags@ @threadsan_ldflags@ @ubsan_ldflags@
>
> -# Enable retpolines if available
> -HAVE_RETPOLINE = @have_retpoline@
> -ifeq ($(HAVE_RETPOLINE),yes)
> -OPTIMIZER += @retpoline_cflags@
> -LOADERFLAGS += @retpoline_ldflags@
> -endif
> -
> # Use special ar/ranlib wrappers if we have lto
> HAVE_LTO = @have_lto@
> ifeq ($(HAVE_LTO),yes)
> diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4
> index 0a6b514..52ddac2 100644
> --- a/m4/package_libcdev.m4
> +++ b/m4/package_libcdev.m4
> @@ -446,25 +446,3 @@ AC_DEFUN([AC_PACKAGE_CHECK_LTO],
> AC_SUBST(lto_cflags)
> AC_SUBST(lto_ldflags)
> ])
> -
> -AC_DEFUN([AC_PACKAGE_CHECK_RETPOLINE],
> - [ AC_MSG_CHECKING([if C compiler supports retpoline])
> - OLD_CFLAGS="$CFLAGS"
> - OLD_LDFLAGS="$LDFLAGS"
> - RETPOLINE_FLAGS="-mindirect-branch=thunk"
> - CFLAGS="$CFLAGS $RETPOLINE_FLAGS"
> - LDFLAGS="$LDFLAGS $RETPOLINE_FLAGS"
> - AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
> - [AC_MSG_RESULT([yes])]
> - [retpoline_cflags=$RETPOLINE_FLAGS]
> - [retpoline_ldflags=$RETPOLINE_FLAGS],
> - [AC_MSG_RESULT([no])])
> - if test -n "$retpoline_cflags"; then
> - have_retpoline=yes
> - fi
> - CFLAGS="${OLD_CFLAGS}"
> - LDFLAGS="${OLD_LDFLAGS}"
> - AC_SUBST(have_retpoline)
> - AC_SUBST(retpoline_cflags)
> - AC_SUBST(retpoline_ldflags)
> - ])
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-11 4:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-10 19:58 [PATCH] xfsprogs: remove retpoline support Eric Sandeen
2018-10-10 21:21 ` Darrick J. Wong
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.