From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754432AbcHYRlf (ORCPT ); Thu, 25 Aug 2016 13:41:35 -0400 Received: from smtprelay.synopsys.com ([198.182.60.111]:37132 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932441AbcHYRla (ORCPT ); Thu, 25 Aug 2016 13:41:30 -0400 Subject: Re: [PATCH] ARC: Change ld.as instruction to regular ld. To: Alexey Brodkin , "liavr@mellanox.com" References: <1471415037-14544-1-git-send-email-liavr@mellanox.com> <1472126602.2600.14.camel@synopsys.com> CC: Cupertino Miranda , "linux-kernel@vger.kernel.org" , "eladkan@mellanox.com" , "noamca@mellanox.com" , "linux-snps-arc@lists.infradead.org" From: Vineet Gupta Message-ID: <57ce386e-d8f1-90f0-fb7c-c1f7b4589fa9@synopsys.com> Date: Thu, 25 Aug 2016 10:40:17 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1472126602.2600.14.camel@synopsys.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.9.131.89] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/25/2016 05:05 AM, Alexey Brodkin wrote: > Hi Liav, > > On Wed, 2016-08-17 at 09:23 +0300, Liav Rehana wrote: >> From: Liav Rehana >> >> User mode callee regs are explicitly collected before signal delivery >> or breakpoint trap. r25 is special for kernel as it serves as task >> pointer, so user mode value is clobbered very early. It is saved in >> pt_regs where generally only scratch (caller saved) res are saved. >> The code to access the corresponding pt_regs location had a subtle bug >> as it was using load/store with scaling of offset, whereas the offset >> was already byte wise correct. So fix this by replacing LD.AS with a >> standard LD >> >> Signed-off-by: Liav Rehana > That nice patch really fixes quite annoying issue when r25 got > printed improperly in gdb! > > So > > Tested-by: Alexey Brodkin Indeed this becomes even more important given that r25 is Thread pointer regs in ARC ABI ! This patch is already merged upstream by Linus. Thx, -Vineet