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]
Message-ID: <443027f0-08c9-449a-8ee0-db9b234483f4@wanadoo.fr>
Date: Wed, 19 Mar 2025 14:39:03 +0900
From: Vincent Mailhol <mailhol.vincent@...adoo.fr>
To: Yury Norov <yury.norov@...il.com>
Cc: Lucas De Marchi <lucas.demarchi@...el.com>,
 Rasmus Villemoes <linux@...musvillemoes.dk>,
 Jani Nikula <jani.nikula@...ux.intel.com>,
 Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
 Rodrigo Vivi <rodrigo.vivi@...el.com>, Tvrtko Ursulin
 <tursulin@...ulin.net>, David Airlie <airlied@...il.com>,
 Simona Vetter <simona@...ll.ch>, Andrew Morton <akpm@...ux-foundation.org>,
 linux-kernel@...r.kernel.org, intel-gfx@...ts.freedesktop.org,
 dri-devel@...ts.freedesktop.org, Andi Shyti <andi.shyti@...ux.intel.com>,
 David Laight <David.Laight@...lab.com>,
 Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
 Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
 Jani Nikula <jani.nikula@...el.com>
Subject: Re: [PATCH v6 2/7] bits: introduce fixed-type genmasks

On 19/03/2025 at 01:45, Yury Norov wrote:
> On Sat, Mar 08, 2025 at 01:48:49AM +0900, Vincent Mailhol via B4 Relay wrote:
>> From: Yury Norov <yury.norov@...il.com>

(...)

>> +#define GENMASK(h, l)		GENMASK_TYPE(unsigned long,  h, l)
>> +#define GENMASK_ULL(h, l)	GENMASK_TYPE(unsigned long long, h, l)
> 
> I like everything except this part. We switch GENMASK() from a well
> tested implementation, including an asm code, and we split uapi and
> non-uapi users, with no functionality changes.
> 
> Unification is a solid point, however.
> 
> Let's make it a 2-step procedure? Adding fixed-width GENMASKs is a
> non-questionable improvement. Switching an existing API from one
> implementation to another should be a separate patch, and probably
> even a separate series. And we should be very clear that __GENMASK()
> is uapi-only thing from now.
> 
> If we decide to switch GENMASK() in a separate series, we'll have some
> extra time to think about unification...

Ack. I started drafting the split. The two series would look like:

[Series #1] bits: Fixed-type GENMASK_U*() and BIT_U*()
    - bits: introduce fixed-type GENMASK_U*()
    - bits: introduce fixed-type BIT_U*()
    - drm/i915: Convert REG_GENMASK*() to fixed-width GENMASK_U*()
    - test_bits: add tests for GENMASK_U*()
    - test_bits: add tests for BIT_U*()

[Series #2] bits: Split asm and non-asm GENMASK*() and unify definitions
    - bits: split the definition of the asm and non-asm GENMASK*()
    - bits: unify the non-asm GENMASK*()
    - test_bits: add tests for __GENMASK() and __GENMASK_ULL()


Series #1 will leave GENMASK(), GENMASK_ULL() and GENMASK_128()
untouched. The final result after the Series #2 will be the exact same
code as of now.

I am thinking of sending the two series at the same time, and then, you
can decide what is the good timing to merge these (and eventually, start
a separate discussion on the second series).

Does this work for you?

On a side note, it did a lot of modifications to your original patch
which introduced the GENMASK_U*(). It is OK to tag myself as author and
you as co-author or do you still prefer to stay as the main author? Let
me know!


Yours sincerely,
Vincent Mailhol


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ