Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1039188AbdDUMTH (ORCPT ); Fri, 21 Apr 2017 08:19:07 -0400 Received: from mx2.suse.de ([195.135.220.15]:33495 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1039165AbdDUMTF (ORCPT ); Fri, 21 Apr 2017 08:19:05 -0400 Date: Fri, 21 Apr 2017 14:19:01 +0200 From: Joerg Roedel To: Dave Hansen Cc: Joerg Roedel , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/mpx: Correctly report do_mpx_bt_fault() failures to user-space Message-ID: <20170421121901.GJ5077@suse.de> References: <1491488362-27198-1-git-send-email-joro@8bytes.org> <0d387d7f-208e-75aa-55ea-0157412aa4d4@linux.intel.com> <20170420120801.GH5077@suse.de> <61c36474-63a5-d080-77d8-874e8c01c626@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <61c36474-63a5-d080-77d8-874e8c01c626@linux.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 633 Lines: 16 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. 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? Joerg