From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 31 Oct 2016 17:26:05 +0100 (CET) Received: from mailapp01.imgtec.com ([195.59.15.196]:27809 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S23992886AbcJaQZ6TelE1 (ORCPT ); Mon, 31 Oct 2016 17:25:58 +0100 Received: from HHMAIL01.hh.imgtec.org (unknown [10.100.10.19]) by Forcepoint Email with ESMTPS id E97368247D820; Mon, 31 Oct 2016 16:25:48 +0000 (GMT) Received: from [10.20.78.238] (10.20.78.238) by HHMAIL01.hh.imgtec.org (10.100.10.21) with Microsoft SMTP Server id 14.3.294.0; Mon, 31 Oct 2016 16:25:51 +0000 Date: Mon, 31 Oct 2016 16:25:44 +0000 From: "Maciej W. Rozycki" To: Ralf Baechle CC: , Subject: [PATCH 1/4] MIPS: Fix ISA I FP sigcontext access violation handling In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [10.20.78.238] Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 55610 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: macro@imgtec.com Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips Complement commit 0ae8dceaebe3 ("Merge with 2.3.10.") and use the local `fault' handler to recover from FP sigcontext access violation faults, like corresponding code does in r4k_fpu.S. The `bad_stack' handler is in syscall.c and is not suitable here as we want to propagate the error condition up through the caller rather than killing the thread outright. Signed-off-by: Maciej W. Rozycki --- I guess it hardly ever triggers and code still builds, so it has aged so well... Maciej linux-mips-isa1-sig-fp-context-fault.patch Index: linux-sfr-test/arch/mips/kernel/r2300_fpu.S =================================================================== --- linux-sfr-test.orig/arch/mips/kernel/r2300_fpu.S 2016-10-22 02:36:46.000000000 +0100 +++ linux-sfr-test/arch/mips/kernel/r2300_fpu.S 2016-10-22 02:37:20.891186000 +0100 @@ -21,7 +21,7 @@ #define EX(a,b) \ 9: a,##b; \ .section __ex_table,"a"; \ - PTR 9b,bad_stack; \ + PTR 9b,fault; \ .previous .set noreorder From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailapp01.imgtec.com ([195.59.15.196]:27809 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S23992886AbcJaQZ6TelE1 (ORCPT ); Mon, 31 Oct 2016 17:25:58 +0100 Date: Mon, 31 Oct 2016 16:25:44 +0000 From: "Maciej W. Rozycki" Subject: [PATCH 1/4] MIPS: Fix ISA I FP sigcontext access violation handling In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Return-Path: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-subscribe: List-owner: List-post: List-archive: To: Ralf Baechle Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org Message-ID: <20161031162544.TdztMqkyKF5QGBIxZd8Hb3sJz5HIXOUDG1Kozw-FleM@z> Complement commit 0ae8dceaebe3 ("Merge with 2.3.10.") and use the local `fault' handler to recover from FP sigcontext access violation faults, like corresponding code does in r4k_fpu.S. The `bad_stack' handler is in syscall.c and is not suitable here as we want to propagate the error condition up through the caller rather than killing the thread outright. Signed-off-by: Maciej W. Rozycki --- I guess it hardly ever triggers and code still builds, so it has aged so well... Maciej linux-mips-isa1-sig-fp-context-fault.patch Index: linux-sfr-test/arch/mips/kernel/r2300_fpu.S =================================================================== --- linux-sfr-test.orig/arch/mips/kernel/r2300_fpu.S 2016-10-22 02:36:46.000000000 +0100 +++ linux-sfr-test/arch/mips/kernel/r2300_fpu.S 2016-10-22 02:37:20.891186000 +0100 @@ -21,7 +21,7 @@ #define EX(a,b) \ 9: a,##b; \ .section __ex_table,"a"; \ - PTR 9b,bad_stack; \ + PTR 9b,fault; \ .previous .set noreorder