lkml.org 
[lkml]   [2020]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] drm/komeda: use bitmap API to convert U32 to bitmap
On Mon, Dec 28, 2020 at 11:43:43AM -0800, Yury Norov wrote:
> The commit be3e477effba636ad25 ("drm/komeda: Fix bit
> check to import to value of proper type") fixes possible
> out-of-bound issue related to find_first_bit() usage, but
> does not address the endianness problem.

Hmm... Can you elaborate?

...

> u32 comp_mask)

> - unsigned long comp_mask_local = (unsigned long)comp_mask;

Here we convert u32 to unsigned long (LSB is kept LSB since it happens in
native endianess).

> - id = find_first_bit(&comp_mask_local, 32);

Here it takes an address to unsigned long and tries only lower 32 bits.

Are you telling that find_first_bit() has an issue?

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2020-12-29 00:17    [W:0.064 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site