Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751932AbdGRSXI (ORCPT ); Tue, 18 Jul 2017 14:23:08 -0400 Received: from mail-qk0-f194.google.com ([209.85.220.194]:33114 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751847AbdGRSXF (ORCPT ); Tue, 18 Jul 2017 14:23:05 -0400 Subject: Re: [PATCH 1/7] signal/alpha: Document a conflict with SI_USER for SIGTRAP To: "Eric W. Biederman" , linux-kernel@vger.kernel.org Cc: Andy Lutomirski , Linus Torvalds , Al Viro , Oleg Nesterov , Andrei Vagin , Thomas Gleixner , Greg KH , Andrey Vagin , Serge Hallyn , Pavel Emelyanov , Cyrill Gorcunov , Peter Zijlstra , Willy Tarreau , linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Linux Containers , Michael Kerrisk , Helge Deller , Ivan Kokshaysky , Matt Turner , linux-alpha@vger.kernel.org References: <87o9shg7t7.fsf_-_@xmission.com> <20170718140651.15973-1-ebiederm@xmission.com> From: Richard Henderson Message-ID: Date: Tue, 18 Jul 2017 08:22:52 -1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170718140651.15973-1-ebiederm@xmission.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1404 Lines: 34 On 07/18/2017 04:06 AM, Eric W. Biederman wrote: > Setting si_code to __SI_FAULT results in a userspace seeing > an si_code of 0. This is the same si_code as SI_USER. Posix > and common sense requires that SI_USER not be a signal specific > si_code. As such this use of 0 for the si_code is a pretty > horribly broken ABI. > > Given that alpha is on it's last legs I don't know that it is worth > fixing this, but it is worth documenting what is going on so that > no one decides to copy this bad decision. > > This was introduced during the 2.5 development cycle so this > mess has had a long time for people to be able to depend upon it. > > v2: Added FPE_FIXME for alpha as Helge Deller pointed out > with his alternate patch one of the cases is SIGFPE not SIGTRAP. > > Cc: Helge Deller > Cc: Richard Henderson > Cc: Ivan Kokshaysky > Cc: Matt Turner > Cc:linux-alpha@vger.kernel.org > History Tree:https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git > Ref: 0a635c7a84cf ("Fill in siginfo_t.") > Signed-off-by: "Eric W. Biederman" > --- > arch/alpha/include/uapi/asm/siginfo.h | 14 ++++++++++++++ > arch/alpha/kernel/traps.c | 6 +++--- > 2 files changed, 17 insertions(+), 3 deletions(-) Acked-by: Richard Henderson r~