public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ilya Enkovich <enkovich.gnu@gmail.com>
To: Joseph Myers <joseph@codesourcery.com>
Cc: Andi Kleen <andi@firstfloor.org>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH, MPX runtime 1/2] Integrate MPX runtime library
Date: Thu, 13 Nov 2014 08:39:00 -0000	[thread overview]
Message-ID: <CAMbmDYbSg4nrktxpkzZR862kaWHpFoheMugTNUJ5-UZQDi+0nw@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1411122259240.31875@digraph.polyomino.org.uk>

2014-11-13 2:03 GMT+03:00 Joseph Myers <joseph@codesourcery.com>:
> On Thu, 13 Nov 2014, Ilya Enkovich wrote:
>
>> It's hard to decide which of runtime functionality should be
>> considered as basic and how it should be used.  We may say that the
>> only basic thing is hardware enabling which is enable_mpx and stop
>> here.  But then you get minimal but quite useless library.  Yes, it
>> can enable MPX and thus make bounds violation to interrupt a program.
>> But users cannot enable/disable MPX dinamycally then.  Also they
>> cannot configure it.  Thus either control via environmental variables
>> appears in this core library or we transform initialization function
>> from constructor to interface function and use it from another
>> extended MPX library which support environment variables, logging etc.
>> But the core library will only be used by this extended MPX library
>> and nothing else. So why not to leave it as a single library as it is?
>
> You can leave it as a single library - it's just that imposes libgcc-like
> constraints on what the library does and how it does things, so as to be
> usable for arbitrary programs built with MPX (e.g. using
> reserved-namespace names such as __write when available - direct syscalls
> may also be a possibility in some cases).

I really don't want to make it libgcc-like and complicate its further
development.  What is the reason for that?  Is it because library is
linked by -mmpx?  Can it be avoided if library is linked only at
'-fcheck-pointer-bounds -mmpx' combination?  If single -mmpx is used
then compiler actually doesn't generate any MPX instructions and user
doesn't even have builtins to do that.  The only option for user to
generate mpx instructions without pointer bounds checker is to write
inline assembler.  In this case he should be prepared enough to enable
MPX in his assembler :) Alternatively enable_mpx function may be put
into i386 intrin headers and used manually in programs by including
immintrin.h.  Does it sound like a viable option?

Thanks,
Ilya

>
> --
> Joseph S. Myers
> joseph@codesourcery.com

  reply	other threads:[~2014-11-13  8:29 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-11 15:37 Ilya Enkovich
2014-11-11 18:09 ` Joseph Myers
2014-11-11 18:15   ` Joseph Myers
2014-11-11 20:26     ` Ilya Enkovich
2014-11-11 18:49   ` Andi Kleen
2014-11-11 20:22     ` H.J. Lu
2014-11-11 21:04       ` Andi Kleen
2014-11-11 21:11         ` H.J. Lu
2014-11-11 21:24           ` Andi Kleen
2014-11-11 21:37             ` Joseph Myers
2014-11-11 22:07               ` H.J. Lu
2014-11-11 22:10                 ` Joseph Myers
2014-11-11 20:36     ` Joseph Myers
2014-11-12 16:20       ` Ilya Enkovich
2014-11-12 21:41         ` Joseph Myers
2014-11-12 22:56           ` Ilya Enkovich
2014-11-12 23:11             ` Joseph Myers
2014-11-13  8:39               ` Ilya Enkovich [this message]
2014-11-13 20:56                 ` Joseph Myers
2014-11-19 14:18                   ` Ilya Enkovich
2014-11-19 18:05                     ` Jeff Law
2014-11-19 18:16                       ` Ilya Enkovich
2014-11-21 16:04                         ` Ilya Enkovich
2014-11-21 23:49                           ` Joseph Myers
2014-11-24 14:28                             ` Ilya Enkovich
2014-12-09  8:25                               ` Ilya Enkovich
2014-12-09 20:48                                 ` Jeff Law
2014-12-09 20:56                                   ` Ilya Enkovich
2015-03-02 16:19                                     ` Ilya Enkovich
2015-03-04 17:36                                       ` Jeff Law
2014-11-22  0:26                     ` Joseph Myers
2014-11-11 20:06 ` Jeff Law
2014-11-11 20:24   ` Ilya Enkovich
2014-11-12 20:53     ` Jeff Law
2014-11-12  8:36 ` Richard Biener
2014-11-12  8:38   ` Jakub Jelinek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMbmDYbSg4nrktxpkzZR862kaWHpFoheMugTNUJ5-UZQDi+0nw@mail.gmail.com \
    --to=enkovich.gnu@gmail.com \
    --cc=andi@firstfloor.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).