Re: [PATCH] x86/resctrl: Prevent possible overrun during bitmap operations

2019-06-24 Thread Reinette Chatre
Hi David, On 6/24/2019 6:55 AM, David Laight wrote: > From: Reinette Chatre >> Sent: 19 June 2019 21:27 >> >> While the DOC at the beginning of lib/bitmap.c explicitly states that >> "The number of valid bits in a given bitmap does _not_ need to be an >> exact multiple of BITS_PER_LONG.", some of

RE: [PATCH] x86/resctrl: Prevent possible overrun during bitmap operations

2019-06-24 Thread David Laight
From: Reinette Chatre > Sent: 19 June 2019 21:27 > > While the DOC at the beginning of lib/bitmap.c explicitly states that > "The number of valid bits in a given bitmap does _not_ need to be an > exact multiple of BITS_PER_LONG.", some of the bitmap operations do > indeed access BITS_PER_LONG port

Re: [PATCH] x86/resctrl: Prevent possible overrun during bitmap operations

2019-06-20 Thread Reinette Chatre
Hi Borislav, On 6/20/2019 6:44 AM, Borislav Petkov wrote: > On Wed, Jun 19, 2019 at 01:27:16PM -0700, Reinette Chatre wrote: >> @@ -2494,26 +2498,19 @@ static int mkdir_mondata_all(struct kernfs_node >> *parent_kn, >> */ >> static void cbm_ensure_valid(u32 *_val, struct rdt_resource *r) >> {

Re: [PATCH] x86/resctrl: Prevent possible overrun during bitmap operations

2019-06-20 Thread Borislav Petkov
On Wed, Jun 19, 2019 at 01:27:16PM -0700, Reinette Chatre wrote: > @@ -2494,26 +2498,19 @@ static int mkdir_mondata_all(struct kernfs_node > *parent_kn, > */ > static void cbm_ensure_valid(u32 *_val, struct rdt_resource *r) > { > - /* > - * Convert the u32 _val to an unsigned long req

[PATCH] x86/resctrl: Prevent possible overrun during bitmap operations

2019-06-19 Thread Reinette Chatre
While the DOC at the beginning of lib/bitmap.c explicitly states that "The number of valid bits in a given bitmap does _not_ need to be an exact multiple of BITS_PER_LONG.", some of the bitmap operations do indeed access BITS_PER_LONG portions of the provided bitmap no matter the size of the provid