This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, libmpx, i386, PR driver/65444] Pass '-z bndplt' when building dynamic objects with MPX


2015-03-18 20:14 GMT+03:00 H.J. Lu <hjl.tools@gmail.com>:
> On Wed, Mar 18, 2015 at 10:13 AM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
>> 2015-03-18 19:45 GMT+03:00 H.J. Lu <hjl.tools@gmail.com>:
>>> On Wed, Mar 18, 2015 at 9:14 AM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
>>>>
>>>> Instrumented binary used with legacy libraries is a supported usage
>>>> model. Each user determines his own level of security.
>>>>
>>>
>>> It doesn't mean we should leave a door open.  Are we supposed to
>>> detect this with MPX:
>>>
>>> [hjl@skylakeclient bug-1]$ cat x.c
>>> #include <string.h>
>>>
>>> int
>>> main ()
>>> {
>>>   char buf[10];
>>>   memset(buf, 'a', 11);
>>>   return 0;
>>> }
>>> [hjl@skylakeclient bug-1]$
>>>
>>> I believe we should, not maybe.  We shouldn't silent fail it
>>> when linker doesn't support -z bndplt.
>>
>> It depends on compiler flags and libraries used and is up to user to
>> decide. User may be warned during libmpx configuration.
>>
>
> What is "USER"?  The one who build GCC may not be same
> person who uses GCC.
>

The person who build GCC determines its default behavior. User either
uses it with default settings or overwrites it with own flags. You may
warn the person who build GCC that his config has no '-z bndplt' by
default.

Ilya

>
> --
> H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]