Re: [Kgdb-bugreport] [PATCH] kdb: Cleanup math with KDB_CMD_HISTORY_COUNT

2020-05-20 Thread Daniel Thompson
On Thu, May 07, 2020 at 04:11:46PM -0700, Douglas Anderson wrote: > From code inspection the math in handle_ctrl_cmd() looks super sketchy > because it subjects -1 from cmdptr and then does a "% > KDB_CMD_HISTORY_COUNT". It turns out that this code works because > "cmdptr" is unsigned and

Re: [Kgdb-bugreport] [PATCH] kdb: Cleanup math with KDB_CMD_HISTORY_COUNT

2020-05-08 Thread Sumit Garg
On Fri, 8 May 2020 at 04:42, Douglas Anderson wrote: > > From code inspection the math in handle_ctrl_cmd() looks super sketchy > because it subjects -1 from cmdptr and then does a "% > KDB_CMD_HISTORY_COUNT". It turns out that this code works because > "cmdptr" is unsigned and