lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <479a4811-9aa2-57fd-a1a5-900bacdd69fc@linux.vnet.ibm.com>
Date:	Thu, 16 Jun 2016 12:51:44 +0530
From:	Madhavan Srinivasan <maddy@...ux.vnet.ibm.com>
To:	George Spelvin <linux@...encehorizons.net>,
	linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Cc:	acme@...nel.org, adrian.hunter@...el.com, bp@...e.de,
	dsahern@...il.com, jolsa@...hat.com, linux@...izon.com,
	linux@...musvillemoes.dk, mpe@...erman.id.au, namhyung@...nel.org,
	wangnan0@...wei.com, yury.norov@...il.com
Subject: Re: [PATCH] tools/perf: fix the word selected in find_*_bit



On Wednesday 15 June 2016 06:14 PM, George Spelvin wrote:
> Madhavan Srinivasan wrote:
>> +#if (__BYTE_ORDER == __BIG_ENDIAN) && (BITS_PER_LONG != 64)
>> +	tmp = addr[(((nbits - 1)/BITS_PER_LONG) - (start / BITS_PER_LONG))]
>> +								^ invert;
>> +#else
>>  	tmp = addr[start / BITS_PER_LONG] ^ invert;
>> +#endif
> Than you for diagnosing this problem, but I don't think the fix
> is correct.
>
> 1) It's not clear that all users of _find_next_bit and for_each_set_bit()
>    want this change.
> 2) Is your code even correct?  I'd think you'd want addr[x ^ 1].  Are you
>    sure you shpuld be reversing the whole array, and not just the halves of
>    each 64-bit word?
> 3) You've now broken the case of 32-bit big-endian kernel.

Yes. But looks like we havent hit this case yet. Will post a fix.

Maddy

>
> I think the proper solution is uglier than this. :-(
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ