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

Re: [PATCH] rombios: Work around GCC issue 99578


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 18 Aug 2023 08:50:54 +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=s7s1+R6tZTHRX/faqws1uxQoWFSUf5hbELCwTFGIBJo=; b=WC6D615cs9WDFz0yOyzv1CVwwMeXt7Bc8Zc35lVc84xZvM4iVcnh3EmB2cXTya9Asvf8uU53AzvUzC/3G8fsJELUQNzqT7z+/QgJnL8tIEqE6kheX2qInmrkTjrWgxu6CMLUt02bFR4JFgiB2tQxE7aij5NSf+FABq50/byuz4o61QEZeCwV2WpfKLU4BQxYdn5wU2ZcWmiYROqRR52KxNWhh3k2mVxDvQpHbsH9Y3zcAS/5vjo/hiDuPC4oZ7iHTiTiAufGge2URjjuMzQOw08wWaYlCuVwvSBGV317k05rinOZ4+Ax7lc1C9PHJCR1dQt5auERZkfOVxg45gcKdg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gXskbTA6PHB1Medm2MJz9RrlBX9K4QjOnyjgq0jotIlMNJJ1vb52Pk2wu3ul7sJ7IIR3xmD8mMe8Pt1nPgYSpGeR3vno+QzmVUUTzyn2tzFLQKxk+ZHgam5SKi27ER+mO4OHjyuK/UPSmUZ1H5QzT1iS8Lb0va+Ma0iwGcml16OccAwfPwru4HLQdtUfZXWqOwg7eIw1Lz6R2sn2dAgZepUcX6F61yTn/Nb1wqoB//qS7hFfBmqt6a0guuC7pi8Ju8wB9D79iP64C5JOvI5Hgi8w8Rz7ldub6k106Qd/Gma3G9LuY36e4SsXd5KrGHtE2MEjCNlio+SclV2NEqOfUw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 18 Aug 2023 06:51:08 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 17.08.2023 22:45, Andrew Cooper wrote:
> GCC 12 objects to pointers derived from a constant:
> 
>   util.c: In function 'find_rsdp':
>   util.c:429:16: error: array subscript 0 is outside array bounds of 
> 'uint16_t[0]' {aka 'short unsigned int[]'} [-Werror=array-bounds]
>     429 |     ebda_seg = *(uint16_t *)ADDR_FROM_SEG_OFF(0x40, 0xe);
>   cc1: all warnings being treated as errors
> 

Yet supposedly the bug was fixed in 12.1 (and the fix also backported to
11.3). Did you spot anything in ADDR_FROM_SEG_OFF() and this particular
use of it that is different from the patterns mentioned in that bug?

> This is a GCC bug, but work around it rather than turning array-bounds
> checking off generally.

I certainly agree here. I guess it's not worth trying to restrict the
workaround for rombios (I will want to try doing so in the hypervisor).

Jan



 


Rackspace

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