Re: regrename/i386: ROP vs df and stack-regs

2015-11-30 Thread Uros Bizjak
On Mon, Nov 30, 2015 at 10:38 PM, Bernd Schmidt wrote: > On 11/27/2015 10:02 AM, Bernd Schmidt wrote: >> >> This is a patch for PRs 68471 and 68472, which show problems with the >> ROP mitigation: >> * reg-stack doesn't call df_insn_update when it makes changes, and >> if df checking is enab

Re: regrename/i386: ROP vs df and stack-regs

2015-11-30 Thread Bernd Schmidt
On 11/27/2015 10:02 AM, Bernd Schmidt wrote: This is a patch for PRs 68471 and 68472, which show problems with the ROP mitigation: * reg-stack doesn't call df_insn_update when it makes changes, and if df checking is enabled, any subsequent df_analyze call will abort * Using -mcmodel=m

Re: regrename/i386: ROP vs df and stack-regs

2015-11-27 Thread Eric Botcazou
> Both good points. Ok with those changes (will retest)? Yes, thanks. -- Eric Botcazou

Re: regrename/i386: ROP vs df and stack-regs

2015-11-27 Thread Bernd Schmidt
On 11/27/2015 10:26 AM, Eric Botcazou wrote: +#ifdef STACK_REGS + if (regstack_completed + && REG_P (recog_data.operand[i]) + && IN_RANGE (REGNO (recog_data.operand[i]), + FIRST_STACK_REG, LAST_STACK_REG)) + u

Re: regrename/i386: ROP vs df and stack-regs

2015-11-27 Thread Eric Botcazou
> Both of these are fixed in the i386 backend. As a further safety > measure, I've added some extra code to regrename to ignore stack regs > after regstack_complete - they can't be dealt with anymore. +#ifdef STACK_REGS + if (regstack_completed + && REG_P (recog_data.op