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: <YLeoDzObZpJwDswB@smile.fi.intel.com>
Date:   Wed, 2 Jun 2021 18:47:27 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Tian Tao <tiantao6@...ilicon.com>
Cc:     gregkh@...uxfoundation.org, rafael@...nel.org,
        akpm@...ux-foundation.org, jonathan.cameron@...wei.com,
        song.bao.hua@...ilicon.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/3] lib: bitmap: introduce bitmap_print_to_buf

On Wed, Jun 02, 2021 at 09:48:52PM +0800, Tian Tao wrote:
> New API bitmap_print_to_buf() with bin_attribute to avoid maskp
> exceeding PAGE_SIZE. bitmap_print_to_pagebuf() is a special case
> of bitmap_print_to_buf(), so in bitmap_print_to_pagebuf() call
> bitmap_print_to_buf().

...

> + * The role of cpumap_print_to_buf and cpumap_print_to_pagebuf is

 * The role of cpumap_print_to_buf() and cpumap_print_to_pagebuf() is

...

> + * The role of bitmap_print_to_buf and bitmap_print_to_pagebuf() is

 * The role of bitmap_print_to_buf() and bitmap_print_to_pagebuf() is

...

> +	int size;

Strictly speaking it should be ssize_t.

> +	void *data;
> +	const char *fmt = list ? "%*pbl\n" : "%*pb\n";

Can you use reversed xmas tree order?

...

> +	return bitmap_print_to_buf(list, buf, maskp, nmaskbits,
> +				   LLONG_MAX, len);

It fits one line.

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ