Re: PING: [PATCH] i386: Add TARGET_INDIRECT_BRANCH_REGISTER

2018-02-28 Thread Jeff Law
On 02/28/2018 02:39 AM, Steve Beattie wrote: > Hi Jeff, > > On Thu, Feb 22, 2018 at 10:10:13AM -0700, Jeff Law wrote: >> A few notes. >> >> 1. It's not even clear at this time that retpolining user space binaries >> makes any sense at all. SO before doing anything to make this easier >> I'd like

Re: PING: [PATCH] i386: Add TARGET_INDIRECT_BRANCH_REGISTER

2018-02-28 Thread Steve Beattie
Hi Jeff, On Thu, Feb 22, 2018 at 10:10:13AM -0700, Jeff Law wrote: > A few notes. > > 1. It's not even clear at this time that retpolining user space binaries > makes any sense at all. SO before doing anything to make this easier > I'd like to see a justification for why it's really needed. Do

Re: PING: [PATCH] i386: Add TARGET_INDIRECT_BRANCH_REGISTER

2018-02-27 Thread Jan Hubicka
> On Mon, Feb 26, 2018 at 8:54 AM, Jan Hubicka wrote: > >> On Mon, Feb 26, 2018 at 7:47 AM, Jan Hubicka wrote: > >> > Hi, > >> > my main concern about the patch is that we now have > >> > -mindirect-branch=thunk-extern > >> > which is intended to work well and is used by kernel, but we also have

Re: PING: [PATCH] i386: Add TARGET_INDIRECT_BRANCH_REGISTER

2018-02-27 Thread H.J. Lu
On Mon, Feb 26, 2018 at 8:54 AM, Jan Hubicka wrote: >> On Mon, Feb 26, 2018 at 7:47 AM, Jan Hubicka wrote: >> > Hi, >> > my main concern about the patch is that we now have >> > -mindirect-branch=thunk-extern >> > which is intended to work well and is used by kernel, but we also have >> > other

Re: PING: [PATCH] i386: Add TARGET_INDIRECT_BRANCH_REGISTER

2018-02-26 Thread Jan Hubicka
> On Mon, Feb 26, 2018 at 7:47 AM, Jan Hubicka wrote: > > Hi, > > my main concern about the patch is that we now have > > -mindirect-branch=thunk-extern > > which is intended to work well and is used by kernel, but we also have > > other modes > > that are documented and as such they should work

Re: PING: [PATCH] i386: Add TARGET_INDIRECT_BRANCH_REGISTER

2018-02-26 Thread H.J. Lu
On Mon, Feb 26, 2018 at 7:47 AM, Jan Hubicka wrote: > Hi, > my main concern about the patch is that we now have > -mindirect-branch=thunk-extern > which is intended to work well and is used by kernel, but we also have other > modes > that are documented and as such they should work but they may

Re: PING: [PATCH] i386: Add TARGET_INDIRECT_BRANCH_REGISTER

2018-02-26 Thread Jan Hubicka
Hi, my main concern about the patch is that we now have -mindirect-branch=thunk-extern which is intended to work well and is used by kernel, but we also have other modes that are documented and as such they should work but they may lead to invalid unwind info (or did I miss anything imporant here

Re: PING: [PATCH] i386: Add TARGET_INDIRECT_BRANCH_REGISTER

2018-02-23 Thread H.J. Lu
On Thu, Feb 22, 2018 at 9:32 AM, H.J. Lu wrote: > On Thu, Feb 22, 2018 at 9:10 AM, Jeff Law wrote: >> On 02/22/2018 07:38 AM, Jan Hubicka wrote: >> >> Hi Jan, >> >> https://gcc.gnu.org/ml/gcc-patches/2018-01/msg02233.html >> >> Is OK for trunk? > > I see that using

Re: PING: [PATCH] i386: Add TARGET_INDIRECT_BRANCH_REGISTER

2018-02-22 Thread H.J. Lu
On Thu, Feb 22, 2018 at 9:10 AM, Jeff Law wrote: > On 02/22/2018 07:38 AM, Jan Hubicka wrote: > > Hi Jan, > > https://gcc.gnu.org/ml/gcc-patches/2018-01/msg02233.html > > Is OK for trunk? I see that using register makes the problem go away and pushing address to

Re: PING: [PATCH] i386: Add TARGET_INDIRECT_BRANCH_REGISTER

2018-02-22 Thread Jeff Law
On 02/22/2018 07:38 AM, Jan Hubicka wrote: Hi Jan, https://gcc.gnu.org/ml/gcc-patches/2018-01/msg02233.html Is OK for trunk? >>> >>> I see that using register makes the problem go away and pushing address to >>> stack >>> seemed bit odd anyway. However how does this w

Re: PING: [PATCH] i386: Add TARGET_INDIRECT_BRANCH_REGISTER

2018-02-22 Thread H.J. Lu
On Thu, Feb 22, 2018 at 6:38 AM, Jan Hubicka wrote: >> >> >> >> Hi Jan, >> >> >> >> https://gcc.gnu.org/ml/gcc-patches/2018-01/msg02233.html >> >> >> >> Is OK for trunk? >> > >> > I see that using register makes the problem go away and pushing address to >> > stack >> > seemed bit odd anyway. How

Re: PING: [PATCH] i386: Add TARGET_INDIRECT_BRANCH_REGISTER

2018-02-22 Thread Jan Hubicka
> >> > >> Hi Jan, > >> > >> https://gcc.gnu.org/ml/gcc-patches/2018-01/msg02233.html > >> > >> Is OK for trunk? > > > > I see that using register makes the problem go away and pushing address to > > stack > > seemed bit odd anyway. However how does this work on other types of thunk? > > Kernel on

Re: PING: [PATCH] i386: Add TARGET_INDIRECT_BRANCH_REGISTER

2018-02-22 Thread H.J. Lu
On Thu, Feb 22, 2018 at 6:29 AM, Jan Hubicka wrote: >> On Sun, Jan 28, 2018 at 11:56 AM, H.J. Lu wrote: >> > On Sat, Jan 27, 2018 at 2:12 PM, H.J. Lu wrote: >> >> For >> >> >> >> --- >> >> struct C { >> >> virtual ~C(); >> >> virtual void f(); >> >> }; >> >> >> >> void >> >> f (C *p) >> >> {

Re: PING: [PATCH] i386: Add TARGET_INDIRECT_BRANCH_REGISTER

2018-02-22 Thread Jan Hubicka
> On Sun, Jan 28, 2018 at 11:56 AM, H.J. Lu wrote: > > On Sat, Jan 27, 2018 at 2:12 PM, H.J. Lu wrote: > >> For > >> > >> --- > >> struct C { > >> virtual ~C(); > >> virtual void f(); > >> }; > >> > >> void > >> f (C *p) > >> { > >> p->f(); > >> p->f(); > >> } > >> --- > >> > >> -mindirec

PING: [PATCH] i386: Add TARGET_INDIRECT_BRANCH_REGISTER

2018-02-08 Thread H.J. Lu
On Sun, Jan 28, 2018 at 11:56 AM, H.J. Lu wrote: > On Sat, Jan 27, 2018 at 2:12 PM, H.J. Lu wrote: >> For >> >> --- >> struct C { >> virtual ~C(); >> virtual void f(); >> }; >> >> void >> f (C *p) >> { >> p->f(); >> p->f(); >> } >> --- >> >> -mindirect-branch=thunk-extern -O2 on x86-64 GN