Re: [PATCH v3 4/4] x86, mpx: extend siginfo structure to include bound violation information

2014-01-27 Thread Ren Qiaowei
On 01/28/2014 05:58 AM, Andy Lutomirski wrote: On 01/26/2014 01:08 AM, Qiaowei Ren wrote: (Why on earth does Intel not expose this stuff in cr2 or an MSR or something?) I guess it is due to some design reason. Thanks, Qiaowei -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH v3 4/4] x86, mpx: extend siginfo structure to include bound violation information

2014-01-27 Thread Andy Lutomirski
On 01/26/2014 01:08 AM, Qiaowei Ren wrote: > This patch adds new fields about bound violation into siginfo > structure. si_lower and si_upper are respectively lower bound > and upper bound when bound violation is caused. > > These fields will be set in #BR exception handler by decoding > the user

Re: [PATCH v3 4/4] x86, mpx: extend siginfo structure to include bound violation information

2014-01-27 Thread Andy Lutomirski
On 01/26/2014 01:08 AM, Qiaowei Ren wrote: This patch adds new fields about bound violation into siginfo structure. si_lower and si_upper are respectively lower bound and upper bound when bound violation is caused. These fields will be set in #BR exception handler by decoding the user

Re: [PATCH v3 4/4] x86, mpx: extend siginfo structure to include bound violation information

2014-01-27 Thread Ren Qiaowei
On 01/28/2014 05:58 AM, Andy Lutomirski wrote: On 01/26/2014 01:08 AM, Qiaowei Ren wrote: (Why on earth does Intel not expose this stuff in cr2 or an MSR or something?) I guess it is due to some design reason. Thanks, Qiaowei -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH v3 4/4] x86, mpx: extend siginfo structure to include bound violation information

2014-01-26 Thread Ren Qiaowei
On 01/27/2014 09:53 AM, H. Peter Anvin wrote: On 01/26/2014 05:34 PM, Ren Qiaowei wrote: I agree with you and we should suppress all the warnings as possible. If I use (unsgined long) to cast like the following code, what do you think about it? sizeof(long) will be 4 for 32-bit.

Re: [PATCH v3 4/4] x86, mpx: extend siginfo structure to include bound violation information

2014-01-26 Thread H. Peter Anvin
On 01/26/2014 05:34 PM, Ren Qiaowei wrote: >> > I agree with you and we should suppress all the warnings as possible. If > I use (unsgined long) to cast like the following code, what do you think > about it? sizeof(long) will be 4 for 32-bit. > > info->si_lower = (void __user *)(unsigned

Re: [PATCH v3 4/4] x86, mpx: extend siginfo structure to include bound violation information

2014-01-26 Thread Ren Qiaowei
On 01/27/2014 05:38 AM, David Rientjes wrote: On Sun, 26 Jan 2014, Ren Qiaowei wrote: arch/x86/kernel/mpx.c: In function ‘do_mpx_bounds’: arch/x86/kernel/mpx.c:407:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] arch/x86/kernel/mpx.c:409:3: warning: cast to

Re: [PATCH v3 4/4] x86, mpx: extend siginfo structure to include bound violation information

2014-01-26 Thread David Rientjes
On Sun, 26 Jan 2014, Ren Qiaowei wrote: > > arch/x86/kernel/mpx.c: In function ‘do_mpx_bounds’: > > arch/x86/kernel/mpx.c:407:3: warning: cast to pointer from integer of > > different size [-Wint-to-pointer-cast] > > arch/x86/kernel/mpx.c:409:3: warning: cast to pointer from integer of > >

Re: [PATCH v3 4/4] x86, mpx: extend siginfo structure to include bound violation information

2014-01-26 Thread David Rientjes
On Sun, 26 Jan 2014, Ren Qiaowei wrote: arch/x86/kernel/mpx.c: In function ‘do_mpx_bounds’: arch/x86/kernel/mpx.c:407:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] arch/x86/kernel/mpx.c:409:3: warning: cast to pointer from integer of different size

Re: [PATCH v3 4/4] x86, mpx: extend siginfo structure to include bound violation information

2014-01-26 Thread Ren Qiaowei
On 01/27/2014 05:38 AM, David Rientjes wrote: On Sun, 26 Jan 2014, Ren Qiaowei wrote: arch/x86/kernel/mpx.c: In function ‘do_mpx_bounds’: arch/x86/kernel/mpx.c:407:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] arch/x86/kernel/mpx.c:409:3: warning: cast to

Re: [PATCH v3 4/4] x86, mpx: extend siginfo structure to include bound violation information

2014-01-26 Thread H. Peter Anvin
On 01/26/2014 05:34 PM, Ren Qiaowei wrote: I agree with you and we should suppress all the warnings as possible. If I use (unsgined long) to cast like the following code, what do you think about it? sizeof(long) will be 4 for 32-bit. info-si_lower = (void __user *)(unsigned long)

Re: [PATCH v3 4/4] x86, mpx: extend siginfo structure to include bound violation information

2014-01-26 Thread Ren Qiaowei
On 01/27/2014 09:53 AM, H. Peter Anvin wrote: On 01/26/2014 05:34 PM, Ren Qiaowei wrote: I agree with you and we should suppress all the warnings as possible. If I use (unsgined long) to cast like the following code, what do you think about it? sizeof(long) will be 4 for 32-bit.

Re: [PATCH v3 4/4] x86, mpx: extend siginfo structure to include bound violation information

2014-01-25 Thread Ren Qiaowei
On 01/26/2014 12:22 PM, David Rientjes wrote: On Sun, 26 Jan 2014, Qiaowei Ren wrote: This patch adds new fields about bound violation into siginfo structure. si_lower and si_upper are respectively lower bound and upper bound when bound violation is caused. These fields will be set in #BR

Re: [PATCH v3 4/4] x86, mpx: extend siginfo structure to include bound violation information

2014-01-25 Thread David Rientjes
On Sun, 26 Jan 2014, Qiaowei Ren wrote: > This patch adds new fields about bound violation into siginfo > structure. si_lower and si_upper are respectively lower bound > and upper bound when bound violation is caused. > > These fields will be set in #BR exception handler by decoding > the user

[PATCH v3 4/4] x86, mpx: extend siginfo structure to include bound violation information

2014-01-25 Thread Qiaowei Ren
This patch adds new fields about bound violation into siginfo structure. si_lower and si_upper are respectively lower bound and upper bound when bound violation is caused. These fields will be set in #BR exception handler by decoding the user instruction and constructing the faulting pointer. A

[PATCH v3 4/4] x86, mpx: extend siginfo structure to include bound violation information

2014-01-25 Thread Qiaowei Ren
This patch adds new fields about bound violation into siginfo structure. si_lower and si_upper are respectively lower bound and upper bound when bound violation is caused. These fields will be set in #BR exception handler by decoding the user instruction and constructing the faulting pointer. A

Re: [PATCH v3 4/4] x86, mpx: extend siginfo structure to include bound violation information

2014-01-25 Thread David Rientjes
On Sun, 26 Jan 2014, Qiaowei Ren wrote: This patch adds new fields about bound violation into siginfo structure. si_lower and si_upper are respectively lower bound and upper bound when bound violation is caused. These fields will be set in #BR exception handler by decoding the user

Re: [PATCH v3 4/4] x86, mpx: extend siginfo structure to include bound violation information

2014-01-25 Thread Ren Qiaowei
On 01/26/2014 12:22 PM, David Rientjes wrote: On Sun, 26 Jan 2014, Qiaowei Ren wrote: This patch adds new fields about bound violation into siginfo structure. si_lower and si_upper are respectively lower bound and upper bound when bound violation is caused. These fields will be set in #BR