Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1628349

Re: [PATCH] x86/mpx: Correctly report do_mpx_bt_fault() failures to user-space

From Dave Hansen <dave.hansen@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH] x86/mpx: Correctly report do_mpx_bt_fault() failures to user-space
Date 2017-04-21 16:40 +0200
Message-ID <tyHT4-6W1-21@gated-at.bofh.it> (permalink)
References <ttgqu-1dQ-7@gated-at.bofh.it> <txgUV-2mc-15@gated-at.bofh.it> <tyj4m-kL-17@gated-at.bofh.it> <tymvg-2j8-11@gated-at.bofh.it> <tyFHz-5HC-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 04/21/2017 05:19 AM, Joerg Roedel wrote:
> On Thu, Apr 20, 2017 at 08:45:28AM -0700, Dave Hansen wrote:
>> How about doing X86_TRAP_PF?  That would at least be consistent with
>> SIGBUS, which is probably the closest thing to a generic error code that
>> we have.
> Correct me if I am wrong, but for SIGBUS this only happens in the
> page-fault path, right? And this path is indeed entered on a #PF
> exception.

It can happen to programs for tons of reasons.  It definitely happens
outside page faults.

> I see no reason to lie to user-space about the trap_nr that caused the
> SIGSEGV, especially since user-space software needs to be modified to
> make use of MPX, including the signal handler. So there is no risk of
> introducing any incompatibility or regression, no?

I think it's pretty safe to change.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH] x86/mpx: Correctly report do_mpx_bt_fault() failures to  user-space Dave Hansen <dave.hansen@linux.intel.com> - 2017-04-17 17:40 +0200
  Re: [PATCH] x86/mpx: Correctly report do_mpx_bt_fault() failures to  user-space Joerg Roedel <jroedel@suse.de> - 2017-04-20 14:10 +0200
    Re: [PATCH] x86/mpx: Correctly report do_mpx_bt_fault() failures to  user-space Dave Hansen <dave.hansen@linux.intel.com> - 2017-04-20 17:50 +0200
      Re: [PATCH] x86/mpx: Correctly report do_mpx_bt_fault() failures to  user-space Joerg Roedel <jroedel@suse.de> - 2017-04-21 14:20 +0200
        Re: [PATCH] x86/mpx: Correctly report do_mpx_bt_fault() failures to  user-space Dave Hansen <dave.hansen@linux.intel.com> - 2017-04-21 16:40 +0200

csiph-web