lkml.org 
[lkml]   [2018]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] arm: kgdb: fix NUMREGBYTES so that gdb_regs[] is the correct size
On Thu, Apr 05, 2018 at 04:09:16PM -0400, David Rivshin wrote:
> From: David Rivshin <DRivshin@allworx.com>
>
> NUMREGBYTES (which is used as the size for gdb_regs[]) is incorrectly based
> on DBG_MAX_REG_NUM instead of GDB_MAX_REGS. DBG_MAX_REG_NUM is the number
> of total registers, while GDB_MAX_REGS is the number of 'unsigned longs'
> it takes to serialize those registers. Since FP registers require 3
> 'unsigned longs' each, DBG_MAX_REG_NUM is smaller than GDB_MAX_REGS.
>
> This causes GDB 8.0 give the following error on connect:
> "Truncated register 19 in remote 'g' packet"
>
> This also causes the register serialization/deserialization logic to
> overflow gdb_regs[], overwriting whatever follows.
>
> Fixes: 834b2964b7ab ("kgdb,arm: fix register dump")
> Cc: <stable@vger.kernel.org> # 2.6.37+
> Signed-off-by: David Rivshin <drivshin@allworx.com>

Acked-by: Rabin Vincent <rabin@rab.in>

\
 
 \ /
  Last update: 2018-04-05 22:48    [W:0.079 / U:2.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site