Re: [PATCH][next] cpumask: allocate enough space for string and trailing '\0' char

2020-11-10 Thread Colin Ian King
On 10/11/2020 18:38, Paul E. McKenney wrote: > On Tue, Nov 10, 2020 at 03:34:05PM +, Colin Ian King wrote: >> On 10/11/2020 15:24, Paul E. McKenney wrote: >>> On Mon, Nov 09, 2020 at 11:57:15PM -0500, Paul Gortmaker wrote: On 2020-11-09 8:07 p.m., Qian Cai wrote: > On Mon,

Re: [PATCH][next] cpumask: allocate enough space for string and trailing '\0' char

2020-11-10 Thread Paul E. McKenney
On Tue, Nov 10, 2020 at 03:34:05PM +, Colin Ian King wrote: > On 10/11/2020 15:24, Paul E. McKenney wrote: > > On Mon, Nov 09, 2020 at 11:57:15PM -0500, Paul Gortmaker wrote: > >> > >> > >> On 2020-11-09 8:07 p.m., Qian Cai wrote: > >>> On Mon, 2020-11-09 at 13:04 +, Colin King wrote: >

Re: [PATCH][next] cpumask: allocate enough space for string and trailing '\0' char

2020-11-10 Thread Colin Ian King
On 10/11/2020 15:24, Paul E. McKenney wrote: > On Mon, Nov 09, 2020 at 11:57:15PM -0500, Paul Gortmaker wrote: >> >> >> On 2020-11-09 8:07 p.m., Qian Cai wrote: >>> On Mon, 2020-11-09 at 13:04 +, Colin King wrote: From: Colin Ian King Currently the allocation of cpulist is

Re: [PATCH][next] cpumask: allocate enough space for string and trailing '\0' char

2020-11-10 Thread Paul E. McKenney
On Mon, Nov 09, 2020 at 11:57:15PM -0500, Paul Gortmaker wrote: > > > On 2020-11-09 8:07 p.m., Qian Cai wrote: > > On Mon, 2020-11-09 at 13:04 +, Colin King wrote: > > > From: Colin Ian King > > > > > > Currently the allocation of cpulist is based on the length of buf but does > > > not

Re: [PATCH][next] cpumask: allocate enough space for string and trailing '\0' char

2020-11-09 Thread Paul Gortmaker
On 2020-11-09 8:07 p.m., Qian Cai wrote: On Mon, 2020-11-09 at 13:04 +, Colin King wrote: From: Colin Ian King Currently the allocation of cpulist is based on the length of buf but does not include the addition end of string '\0' terminator. Static analysis is reporting this as a

Re: [PATCH][next] cpumask: allocate enough space for string and trailing '\0' char

2020-11-09 Thread Qian Cai
On Mon, 2020-11-09 at 13:04 +, Colin King wrote: > From: Colin Ian King > > Currently the allocation of cpulist is based on the length of buf but does > not include the addition end of string '\0' terminator. Static analysis is > reporting this as a potential out-of-bounds access on cpulist.

[PATCH][next] cpumask: allocate enough space for string and trailing '\0' char

2020-11-09 Thread Colin King
From: Colin Ian King Currently the allocation of cpulist is based on the length of buf but does not include the addition end of string '\0' terminator. Static analysis is reporting this as a potential out-of-bounds access on cpulist. Fix this by allocating enough space for the additional '\0'