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

Re: [PATCH] Arm64: adjust __irq_to_desc() to fix build with gcc14


  • To: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Thu, 29 Aug 2024 09:28:42 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=LvDgCUlzTqKh0t/JzhHySZPFUzHRBypWW0m9/XxgAAE=; b=XYrh0iVc42g3KGPlQQotkRK+xzK68ka4o4HzVY4XfNDDOy6o0bo7QXmBsmtW6gGeg5D7ytMgqDTUy2LGH9+coJMjptzWD8gTy35C0IpEPerRv14uO6WK9cSWvyLtCQycsYe1tt7dqIHp3q7TrRE7H0rSTZlns1Ch89SBm/cxEGw9J8VF6/36daRTCRhUPkxNiOvYgjOUEU+wzbOOHFb/yOpdN6jgLe/kiMEkC6YLYB9kSfIP+s/qZWam0qygCuN5rSPBn38CfEZ+QZiJ7OfrJlkEkqJfClS/3NP7kdTk7TS9rx+NX51wCvmz4+ohLZruVm+Wr2G7uP+chfgIitXw9g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XaJBDgwP5Ok6e5wfc6elFBVdOhCt3kETSANWowtGLL4Vj66pafaJ1geyXKL0QrYpdX3yRVpMyd1IAgtituIrla00YdsZm2qLQyT4vRmqqHDbaR1QyiMcZ8KcpxITmtn/MXo/IOv5kvMP+UyGI9cosvOA1To+5sRmVwdGNhl7zXTJ0/xzRLedeg0N10UJpnIpTIvanGofjS7+7u2BRLsvrjm1RsT8dIhYncBo+tiqb2f6R1azkf+/CU9qXrLkh7UiZXplyIxW3/KcS8oTS1C1bOZzQCOHjvZ0qNoudBNcIObHSYsXVWO1nweU7FeWTAlWEAlxxkhIoRiSupO0x8AcIg==
  • Cc: Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>
  • Delivery-date: Thu, 29 Aug 2024 07:29:14 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 29/08/2024 07:55, Jan Beulich wrote:
> 
> 
> With the original code I observe
> 
> In function ‘__irq_to_desc’,
>     inlined from ‘route_irq_to_guest’ at arch/arm/irq.c:465:12:
> arch/arm/irq.c:54:16: error: array subscript -2 is below array bounds of 
> ‘irq_desc_t[32]’ {aka ‘struct irq_desc[32]’} [-Werror=array-bounds=]
>    54 |         return &this_cpu(local_irq_desc)[irq];
>       |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> which looks pretty bogus: How in the world does the compiler arrive at
> -2 when compiling route_irq_to_guest()? Yet independent of that the
> function's parameter wants to be of unsigned type anyway, as shown by
> a vast majority of callers (others use plain int when they really mean
> non-negative quantities). With that adjustment the code compiles fine
> again.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Michal Orzel <michal.orzel@xxxxxxx>

Are there any places where we still require irq member of irq_desc to be signed?

~Michal



 


Rackspace

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