Re: [PATCH] powerpc/ipic: Fix a bounds check in ipic_set_priority()

2018-12-11 Thread Dan Carpenter
On Thu, Dec 06, 2018 at 09:12:12AM +0100, Julia Lawall wrote: > > > On Thu, 6 Dec 2018, Christophe LEROY wrote: > > > > > > > Le 05/12/2018 à 04:26, Michael Ellerman a écrit : > > > Hi Dan, > > > > > > Thanks for the patch. > > > > > > Dan Carpenter writes: > > > > The ipic_info[] array only ha

Re: [PATCH] powerpc/ipic: Fix a bounds check in ipic_set_priority()

2018-12-10 Thread Christophe Leroy
Le 07/12/2018 à 03:07, Michael Ellerman a écrit : Christophe LEROY writes: Le 05/12/2018 à 04:26, Michael Ellerman a écrit : Hi Dan, Thanks for the patch. Dan Carpenter writes: The ipic_info[] array only has 95 elements so I have made the bounds check smaller to prevent a read overflow. I

Re: [PATCH] powerpc/ipic: Fix a bounds check in ipic_set_priority()

2018-12-06 Thread Michael Ellerman
Christophe LEROY writes: > Le 05/12/2018 à 04:26, Michael Ellerman a écrit : >> Hi Dan, >> >> Thanks for the patch. >> >> Dan Carpenter writes: >>> The ipic_info[] array only has 95 elements so I have made the bounds >>> check smaller to prevent a read overflow. It was Smatch that found >>> th

Re: [PATCH] powerpc/ipic: Fix a bounds check in ipic_set_priority()

2018-12-06 Thread Dan Carpenter
On Wed, Dec 05, 2018 at 02:26:47PM +1100, Michael Ellerman wrote: > Can smatch help us find things like this that are defined non-static but > never used? > It's too tricky because it depends on the .config as well. regards, dan carpenter

Re: [PATCH] powerpc/ipic: Fix a bounds check in ipic_set_priority()

2018-12-06 Thread Julia Lawall
On Thu, 6 Dec 2018, Christophe LEROY wrote: > > > Le 05/12/2018 à 04:26, Michael Ellerman a écrit : > > Hi Dan, > > > > Thanks for the patch. > > > > Dan Carpenter writes: > > > The ipic_info[] array only has 95 elements so I have made the bounds > > > check smaller to prevent a read overflow.

Re: [PATCH] powerpc/ipic: Fix a bounds check in ipic_set_priority()

2018-12-05 Thread Christophe LEROY
Le 05/12/2018 à 04:26, Michael Ellerman a écrit : Hi Dan, Thanks for the patch. Dan Carpenter writes: The ipic_info[] array only has 95 elements so I have made the bounds check smaller to prevent a read overflow. It was Smatch that found this issue: arch/powerpc/sysdev/ipic.c:784 ip

Re: [PATCH] powerpc/ipic: Fix a bounds check in ipic_set_priority()

2018-12-05 Thread Julia Lawall
On Wed, 5 Dec 2018, Michael Ellerman wrote: > Julia Lawall writes: > > On Wed, 5 Dec 2018, Michael Ellerman wrote: > > > >> Hi Dan, > >> > >> Thanks for the patch. > >> > >> Dan Carpenter writes: > >> > The ipic_info[] array only has 95 elements so I have made the bounds > >> > check smaller

Re: [PATCH] powerpc/ipic: Fix a bounds check in ipic_set_priority()

2018-12-05 Thread Michael Ellerman
Julia Lawall writes: > On Wed, 5 Dec 2018, Michael Ellerman wrote: > >> Hi Dan, >> >> Thanks for the patch. >> >> Dan Carpenter writes: >> > The ipic_info[] array only has 95 elements so I have made the bounds >> > check smaller to prevent a read overflow. It was Smatch that found >> > this issu

Re: [PATCH] powerpc/ipic: Fix a bounds check in ipic_set_priority()

2018-12-05 Thread Julia Lawall
On Wed, 5 Dec 2018, Michael Ellerman wrote: > Hi Dan, > > Thanks for the patch. > > Dan Carpenter writes: > > The ipic_info[] array only has 95 elements so I have made the bounds > > check smaller to prevent a read overflow. It was Smatch that found > > this issue: > > > > arch/powerpc/sy

Re: [PATCH] powerpc/ipic: Fix a bounds check in ipic_set_priority()

2018-12-04 Thread Michael Ellerman
Hi Dan, Thanks for the patch. Dan Carpenter writes: > The ipic_info[] array only has 95 elements so I have made the bounds > check smaller to prevent a read overflow. It was Smatch that found > this issue: > > arch/powerpc/sysdev/ipic.c:784 ipic_set_priority() > error: buffer overflow '

[PATCH] powerpc/ipic: Fix a bounds check in ipic_set_priority()

2018-12-03 Thread Dan Carpenter
The ipic_info[] array only has 95 elements so I have made the bounds check smaller to prevent a read overflow. It was Smatch that found this issue: arch/powerpc/sysdev/ipic.c:784 ipic_set_priority() error: buffer overflow 'ipic_info' 95 <= 127 Signed-off-by: Dan Carpenter --- I wasn't a