Re: [PATCH] mtd: physmap: physmap-bt1-rom: Fix unintentional stack access

2021-03-02 Thread Miquel Raynal
On Fri, 2021-02-12 at 10:40:22 UTC, "Gustavo A. R. Silva" wrote: > Cast to (char *) in order to avoid unintentionally accessing > the stack. > > Notice that data is of type u32, so any increment to > will be in the order of 4-byte chunks, and this piece of code > is actually intended to be a

Re: [PATCH] mtd: physmap: physmap-bt1-rom: Fix unintentional stack access

2021-02-12 Thread Serge Semin
On Fri, Feb 12, 2021 at 04:40:22AM -0600, Gustavo A. R. Silva wrote: > Cast to (char *) in order to avoid unintentionally accessing > the stack. > > Notice that data is of type u32, so any increment to > will be in the order of 4-byte chunks, and this piece of code > is actually intended to be

Re: [PATCH] mtd: physmap: physmap-bt1-rom: Fix unintentional stack access

2021-02-12 Thread Miquel Raynal
Hi Gustavo, "Gustavo A. R. Silva" wrote on Fri, 12 Feb 2021 08:45:33 -0600: > On 2/12/21 08:12, Miquel Raynal wrote: > > Hi Gustavo, > > > > "Gustavo A. R. Silva" wrote on Fri, 12 Feb 2021 > > 04:40:22 -0600: > > > >> Cast to (char *) in order to avoid unintentionally accessing > >> the

Re: [PATCH] mtd: physmap: physmap-bt1-rom: Fix unintentional stack access

2021-02-12 Thread Miquel Raynal
Hi Gustavo, "Gustavo A. R. Silva" wrote on Fri, 12 Feb 2021 04:40:22 -0600: > Cast to (char *) in order to avoid unintentionally accessing > the stack. > > Notice that data is of type u32, so any increment to > will be in the order of 4-byte chunks, and this piece of code > is actually

[PATCH] mtd: physmap: physmap-bt1-rom: Fix unintentional stack access

2021-02-12 Thread Gustavo A. R. Silva
Cast to (char *) in order to avoid unintentionally accessing the stack. Notice that data is of type u32, so any increment to will be in the order of 4-byte chunks, and this piece of code is actually intended to be a byte offset. Fixes: b3e79e7682e0 ("mtd: physmap: Add Baikal-T1 physically