[Mesa-dev] [PATCH] configure.ac: Add support to enable read-only text segment on x86.
Albert Freeman
albertwdfreeman at gmail.com
Sat Sep 5 18:12:19 PDT 2015
Maybe we should add some kind of prefix to this to indicate a
performance vs security trade off and a more powerful general overide
option to enable/disable all such future flags?
On 4 September 2015 at 09:39, Jeremy Huddleston Sequoia
<jeremyhu at freedesktop.org> wrote:
> Wow, that's a blast from the past ;)
>
>> On Sep 3, 2015, at 21:36, Matt Turner <mattst88 at gmail.com> wrote:
>>
>> From: Jeremy Huddleston <jeremyhu at freedesktop.org>
>>
>> Cc: "10.6 11.0" <mesa-stable at lists.freedesktop.org>
>> Bugzilla: https://bugs.gentoo.org/240956
>> ---
>> After talking with Ian today, we determined that this disables an
>> optimization.
>>
>> And FWIW, NVIDIA's fork of glapi (libglvnd) contains this kind of
>> writable-text optimization for x86-64.
>>
>> configure.ac | 10 ++++++++++
>> 1 file changed, 10 insertions(+)
>>
>> diff --git a/configure.ac b/configure.ac
>> index 90ba4fe..259f770 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -1289,6 +1289,16 @@ AC_SUBST(GLX_TLS, ${GLX_USE_TLS})
>> AS_IF([test "x$GLX_USE_TLS" = xyes -a "x$ax_pthread_ok" = xyes],
>> [DEFINES="${DEFINES} -DGLX_USE_TLS"])
>>
>> +dnl Read-only text section on x86 hardened platforms
>> +AC_ARG_ENABLE([glx-read-only-text],
>> + [AS_HELP_STRING([--enable-glx-read-only-text],
>> + [Disable writable .text section on x86 (decreases performance) @<:@default=disabled@:>@])],
>> + [enable_glx_read_only_text="$enableval"],
>> + [enable_glx_read_only_text=no])
>> +if test "x$enable_glx_read_only_text" = xyes; then
>> + DEFINES="$DEFINES -DGLX_X86_READONLY_TEXT"
>> +fi
>> +
>> dnl
>> dnl More DRI setup
>> dnl
>> --
>> 2.4.6
>>
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list