From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Wed, 01 Mar 2017 14:48:06 +0100 (CET) Received: from mailapp01.imgtec.com ([195.59.15.196]:11906 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S23993637AbdCANr7trEBl (ORCPT ); Wed, 1 Mar 2017 14:47:59 +0100 Received: from hhmail02.hh.imgtec.org (unknown [10.100.10.20]) by Forcepoint Email with ESMTPS id 2923625100C68; Wed, 1 Mar 2017 13:47:51 +0000 (GMT) Received: from [10.150.130.83] (10.150.130.83) by hhmail02.hh.imgtec.org (10.100.10.21) with Microsoft SMTP Server (TLS) id 14.3.294.0; Wed, 1 Mar 2017 13:47:53 +0000 Subject: Re: [PATCH 1/4] MIPS: Handle non word sized instructions when examining frame To: "Maciej W. Rozycki" References: <1488296279-23057-1-git-send-email-matt.redfearn@imgtec.com> <1488296279-23057-2-git-send-email-matt.redfearn@imgtec.com> CC: Ralf Baechle , , Marcin Nowakowski , , Paul Burton From: Matt Redfearn Message-ID: <8cf06c75-4536-3296-7413-e2dce407e8ab@imgtec.com> Date: Wed, 1 Mar 2017 13:47:53 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.150.130.83] 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: 56939 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: matt.redfearn@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 Hi Maciej On 28/02/17 20:54, Maciej W. Rozycki wrote: > On Tue, 28 Feb 2017, Matt Redfearn wrote: > >> Since the instruction modifying the stack pointer is usually the first >> in the function, that one is ususally handled correctly. But the > s/ususally/usually/ oops > >> diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c >> index 803e255b6fc3..5b1e932ae973 100644 >> --- a/arch/mips/kernel/process.c >> +++ b/arch/mips/kernel/process.c >> @@ -347,6 +347,7 @@ static int get_frame_info(struct mips_frame_info *info) >> union mips_instruction insn, *ip, *ip_end; >> const unsigned int max_insns = 128; >> unsigned int i; >> + unsigned int last_insn_size = 0; > Please keep declarations in the reverse Christmas tree order, i.e. swap > the last two. > > Maciej OK, no problem. Thanks, Matt From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailapp01.imgtec.com ([195.59.15.196]:11906 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S23993637AbdCANr7trEBl (ORCPT ); Wed, 1 Mar 2017 14:47:59 +0100 Subject: Re: [PATCH 1/4] MIPS: Handle non word sized instructions when examining frame References: <1488296279-23057-1-git-send-email-matt.redfearn@imgtec.com> <1488296279-23057-2-git-send-email-matt.redfearn@imgtec.com> From: Matt Redfearn Message-ID: <8cf06c75-4536-3296-7413-e2dce407e8ab@imgtec.com> Date: Wed, 1 Mar 2017 13:47:53 +0000 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit 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: "Maciej W. Rozycki" Cc: Ralf Baechle , linux-mips@linux-mips.org, Marcin Nowakowski , linux-kernel@vger.kernel.org, Paul Burton Message-ID: <20170301134753.g9EgNIdwlWl4N4EXvjbirYaZlx9X5GHfGCjZ8iBE2cQ@z> Hi Maciej On 28/02/17 20:54, Maciej W. Rozycki wrote: > On Tue, 28 Feb 2017, Matt Redfearn wrote: > >> Since the instruction modifying the stack pointer is usually the first >> in the function, that one is ususally handled correctly. But the > s/ususally/usually/ oops > >> diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c >> index 803e255b6fc3..5b1e932ae973 100644 >> --- a/arch/mips/kernel/process.c >> +++ b/arch/mips/kernel/process.c >> @@ -347,6 +347,7 @@ static int get_frame_info(struct mips_frame_info *info) >> union mips_instruction insn, *ip, *ip_end; >> const unsigned int max_insns = 128; >> unsigned int i; >> + unsigned int last_insn_size = 0; > Please keep declarations in the reverse Christmas tree order, i.e. swap > the last two. > > Maciej OK, no problem. Thanks, Matt