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]
Date:   Wed, 10 Feb 2021 18:34:24 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Paul Gortmaker <paul.gortmaker@...driver.com>
Cc:     linux-kernel@...r.kernel.org, Li Zefan <lizefan@...wei.com>,
        Ingo Molnar <mingo@...nel.org>,
        Yury Norov <yury.norov@...il.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Josh Triplett <josh@...htriplett.org>,
        Peter Zijlstra <peterz@...radead.org>,
        "Paul E. McKenney" <paulmck@...nel.org>,
        Frederic Weisbecker <fweisbec@...il.com>,
        Rasmus Villemoes <linux@...musvillemoes.dk>
Subject: Re: [PATCH 5/8] lib: bitmap: pair nbits value with region struct

On Tue, Feb 09, 2021 at 05:59:04PM -0500, Paul Gortmaker wrote:
> A region is a standalone entity to some degree, but it needs to
> be paired with a bitmap width in order to set context and determine
> if the region even fits into the width of the bitmap.
> 
> This will reduce parameter passing and enable using nbits as part
> of future dynamic region parameter parsing.

...

> +struct bitmap_region {
> +	struct region *r;

Why do we need it as a pointer?

> +	unsigned int nbits;
> +};

...

>  	struct region r;
> +	struct bitmap_region br;

> +	br.r = &r;
> +	br.nbits = nmaskbits;

I thought about simply

	struct bitmap_region br;

	br.nbits = nmaskbits;

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ