From patchwork Sun Apr 15 15:59:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Eric W. Biederman" X-Patchwork-Id: 10341683 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7C565601D7 for ; Sun, 15 Apr 2018 16:01:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E41F28451 for ; Sun, 15 Apr 2018 16:01:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5EFDE28458; Sun, 15 Apr 2018 16:01:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D4AE428451 for ; Sun, 15 Apr 2018 16:01:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:Message-ID: In-Reply-To:Date:References:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=S5v90vKnrMiP/OxsGhJozRQSmp1+cmiYJZG0gxZbz2E=; b=KaCM1pCytwxJiJ 3ICJMCH9MIL78k1R5WIOagX9kdOo55L/e9Jh7AZbtmN5qZSg0BHrEeMgrl/a0CCib6H17fkCXtqOG xK5gziFS521O6kxnFEsc8X3PkxC71W8FWhAuTx2hRj0XoYrLb2k2J4BXgP6FCC3qmyRUzkPB4Bv9b s2xwpdWhQURrYTtuSNBtuwKGC3ktoL+bUKhSdFDls+d+q7SPtx1szf22gdRsXi40P9hVmgZjVbyvr E44XCgyVVZDVPuMNytS+30gBcRp3+XfdfCB76v23YkJ/a/qJZru/N9hq6nS2SOfTv1sCYTgeRYY5F XpEGq/q0wIKpbabi9p8w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f7k5h-0001Dc-BH; Sun, 15 Apr 2018 16:01:21 +0000 Received: from casper.infradead.org ([85.118.1.10]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f7k5f-0001DR-W9 for linux-arm-kernel@bombadil.infradead.org; Sun, 15 Apr 2018 16:01:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Subject:Content-Type:MIME-Version: Message-ID:In-Reply-To:Date:References:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=iiFQSpaJ0KfEaD0/MwyHVVz3rtrGk7XL1LkDBjPkyKQ=; b=Dwr2FTRMiFv8wWFP6zU57KIU5 6FcLzd2HFGotP2iaVRUsy771JAsjZBokoO02ZGmQyloVLqh+SEE4I9p5p/YQ7D+CikIIEA17FUvos tufENj66rsXtil/HiisURw09ZWOTE0NmlgO/3bQlamq4ZFGaEo5oJpySmBeJgReeazawi9w6at4rN A+YtCOpiLmmSoPyi0FkF53g+98xqXaaZ+TUwQUazCA7xkWB51TS/oKOA2mbCY46Y9gEUEB7tDL8Rf BRjJ0h2lNhdG9wjr507ZmBFCnUb1BK8v0TTICss03jWfNKmuD8MdJRn7cpAq5AsYBcFYHiNYQWVrY /bS27sUKw==; Received: from out03.mta.xmission.com ([166.70.13.233]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f7k5a-0007zk-E0 for linux-arm-kernel@lists.infradead.org; Sun, 15 Apr 2018 16:01:17 +0000 Received: from in01.mta.xmission.com ([166.70.13.51]) by out03.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1f7k55-00015d-N6; Sun, 15 Apr 2018 10:00:43 -0600 Received: from [97.119.174.25] (helo=x220.xmission.com) by in01.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1f7k4q-0006e6-2i; Sun, 15 Apr 2018 10:00:43 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Linus Torvalds References: <20180412172051.GK16141@n2100.armlinux.org.uk> <20180413094211.GN16141@n2100.armlinux.org.uk> <20180413170827.GB16308@e103592.cambridge.arm.com> <20180413175407.GO16141@n2100.armlinux.org.uk> <20180413184522.GD16308@e103592.cambridge.arm.com> <20180415131206.GR16141@n2100.armlinux.org.uk> <87604sa2fu.fsf_-_@xmission.com> Date: Sun, 15 Apr 2018 10:59:09 -0500 In-Reply-To: <87604sa2fu.fsf_-_@xmission.com> (Eric W. Biederman's message of "Sun, 15 Apr 2018 10:56:21 -0500") Message-ID: <87muy48nqq.fsf_-_@xmission.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 X-XM-SPF: eid=1f7k4q-0006e6-2i; ; ; mid=<87muy48nqq.fsf_-_@xmission.com>; ; ; hst=in01.mta.xmission.com; ; ; ip=97.119.174.25; ; ; frm=ebiederm@xmission.com; ; ; spf=neutral X-XM-AID: U2FsdGVkX1/1TXbHRQ/NgjXC1GqqK3+craTezWqgpgc= X-SA-Exim-Connect-IP: 97.119.174.25 X-SA-Exim-Mail-From: ebiederm@xmission.com Subject: [RFC PATCH 3/3] signal: Stop special casing TRAP_FIXME and FPE_FIXME in siginfo_layout X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180415_170114_592688_E8AB56FD X-CRM114-Status: GOOD ( 14.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Linux Kernel Mailing List , "Dmitry V. Levin" , sparclinux , Russell King - ARM Linux , ppc-dev , Dave Martin , linux-arm-kernel Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP After more experience with the cases where no one the si_code of 0 is used both as a signal specific si_code, and as SI_USER it appears that no one cares about the signal specific si_code case and the good solution is to just fix the architectures by using a different si_code. In none of the conversations has anyone even suggested that anything depends on the signal specific redefinition of SI_USER. There are at least test cases that care when si_code as 0 does not work as si_user. So make things simple and keep the generic code from introducing problems by removing the special casing of TRAP_FIXME and FPE_FIXME. This will ensure the generic case of sending a signal with kill will always set SI_USER and work. The architecture specific, and signal specific overloads that set si_code to 0 will now have problems with signalfd and the 32bit compat versions of siginfo copying. At least until they are fixed. Signed-off-by: "Eric W. Biederman" --- kernel/signal.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/kernel/signal.c b/kernel/signal.c index d56f4d496c89..fc82d2c0918f 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -2835,15 +2835,6 @@ enum siginfo_layout siginfo_layout(int sig, int si_code) layout = SIL_POLL; else if (si_code < 0) layout = SIL_RT; - /* Tests to support buggy kernel ABIs */ -#ifdef TRAP_FIXME - if ((sig == SIGTRAP) && (si_code == TRAP_FIXME)) - layout = SIL_FAULT; -#endif -#ifdef FPE_FIXME - if ((sig == SIGFPE) && (si_code == FPE_FIXME)) - layout = SIL_FAULT; -#endif } return layout; }