[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] xen: Change parameter of generic_fls() to unsigned int


  • To: Michal Orzel <michal.orzel@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 4 Sep 2023 17:13:16 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=S8JIv6W7EpN3kT49oRVmaUamLPtPsejDWu/lj6gh2BA=; b=CgF7tMy1J9FMGtWNN4WsIbgWyikmX2l6TAghIuN2gR+usMj+DvEam4MBAN22wiqmMtJ+j8goyGzzLeY4Gh/7DRL8TUnrKrEO7XqD40MX5quD6Okkf6+sAh9wIKuIpd+y2cP4wiMq2FbP02+I5M13ph1bt1FL+OHPPfNGiyYDLPQUkfSzR5144JRVBko5lFhr1vjoKD+8V56R+YPcVd3PxFHRlIU+G2nhwfZWPomRgQ1s41SjT6KprT0w1KJ+rHOv05H6EWAj0F8/SOeGshA4xn2EhhgNItbvEE9AFVvACWoxSr42IcJNZzxXcI3cJ6OTkDWvRJQ358qZfTcCJqeJ0A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UgmePPzp4fVu3nhPfbKiawtIaTLPz3ufvjyjnU/UY1x6871mNIY3umaw1dI0sk2fg4Ot2s6xpZBSfGMTTFEfcwrZLLA25L/f5fv/EAncQGB6cjL4x/pAbhRB42O6KjobqvSJsCnXJEGLmF6QT7MvmWYB01el1SKEaMJMqK9XNygKrvDMU1TE3spE/f+hkysJhimqeqUp1LWOu+LvKG0t9UoOaw9zbMuP2IgFKOQ8BAKfSg2vDoW28hLy340YkCWYeB3RvrrQBqbuV2kpbpDXwJQ8UFvLu2IidyHNP05cZ9pFNoXO1WbErh2xfzdSLWMnFYEHfju519nGI+zJQqdI8w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 04 Sep 2023 15:13:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 04.09.2023 16:03, Michal Orzel wrote:
> On 04/09/2023 15:28, Jan Beulich wrote:
>> On 04.09.2023 11:14, Michal Orzel wrote:
>>> --- a/xen/include/xen/bitops.h
>>> +++ b/xen/include/xen/bitops.h
>>> @@ -51,7 +51,7 @@ static inline int generic_ffs(int x)
>>>   * fls: find last bit set.
>>>   */
>>>
>>> -static __inline__ int generic_fls(int x)
>>> +static __inline__ int generic_fls(unsigned int x)
>>>  {
>>>      int r = 32;
>>>
>>
>> Even if perhaps not affected by UBSAN, generic_ffs() then wants taking care
>> of as well, imo. If additionally you switch __inline__ to inline, things
>> will become nicely symmetric with generic_f{f,l}sl().
> If others agree, I can switch generic_ffs() to take unsigned as well 
> (together with s/__inline__/inline/).
> However, such change would no longer fall in fixes category (i.e. nothing 
> wrong with ffs() taking int):
> - is it ok at this stage of release? (not sure but no problem for me to do 
> this)

I'd say yes, but the release manager would have the ultimate say.

> - is it ok to mix a fix with non-fix change? (I always prefer fixes to be 
> done as standalone changes)

Imo it is, to avoid introducing an inconsistency. While such may
not themselves be bugs, they increase the risk of introducing some.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.