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] [day] [month] [year] [list]
Date:   Fri, 22 Nov 2019 19:01:41 +0300
From:   Alexey Budankov <alexey.budankov@...ux.intel.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Andi Kleen <ak@...ux.intel.com>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1 2/3] perf mmap: declare type for cpu mask of arbitrary
 length

On 22.11.2019 16:58, Alexey Budankov wrote:
> On 22.11.2019 16:20, Jiri Olsa wrote:
>> On Wed, Nov 20, 2019 at 12:37:48PM +0300, Alexey Budankov wrote:
>>>

<SNIP>

>>> +#define mmap_cpu_mask_bytes(m) \
>>
>> we try to have all macros upper case
> 
> In v2.
> 
>>
>>> +	(BITS_TO_LONGS(((struct mmap_cpu_mask *)m)->nbits) * sizeof(unsigned long))
>>
>> we have BITS_TO_BYTES
> 
> In v2.

Avoided BITS_TO_BYTES() in this particular case because 
the storage is allocated in unsigned long chunks, thus
the possibly unused tail bytes at the last chunk would 
be accounted in the returned size, and for compatibility 
with cpu_set_t which is also allocated in unsigned longs.

~Alexey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ