Messages in this thread | | | From | "Ren, Qiaowei" <> | Subject | RE: [PATCH v6 04/10] x86, mpx: hook #BR exception handler to allocate bound tables | Date | Tue, 24 Jun 2014 01:53:18 +0000 |
| |
On 2014-06-24, Andy Lutomirski wrote: > On 06/18/2014 02:44 AM, Qiaowei Ren wrote: >> + /* >> + * The error code field of the BNDSTATUS register communicates status >> + * information of a bound range exception #BR or operation involving >> + * bound directory. >> + */ >> + switch (status & MPX_BNDSTA_ERROR_CODE) { >> + case 2: >> + /* >> + * Bound directory has invalid entry. >> + * No signal will be sent to the user space. > > This comment is a lie. > Hmm, thanks.
>> + */ >> + if (do_mpx_bt_fault(xsave_buf)) >> + force_sig(SIGBUS, tsk); > > Would it make sense to assign and use a new si_code value here? > There is a new si_code SEGV_BNDERR for bounds violation reported by MPX. But in this case, it is mainly due to the failure caused by allocation of bounds table. I guess it is not necessary to add another new si_code value.
Thanks, Qiaowei
| |