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

Re: [PATCH 3/3] tools/libxl: Rework invariants in libxl__domain_get_device_model_uid()


  • To: Ian Jackson <iwj@xxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Wed, 17 Feb 2021 18:13:01 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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-SenderADCheck; bh=efY9GnvQWruZXPsXoFCvJRoWo8O/XI2YOmFSN4SnK+w=; b=aZEwj+dBqghRsBi/oMc9ZIGnkNunblYurJeCqo+qdeRznzdHsi2hCBsSm6PibxH0BH3ltkzW7dzbaoFJQVl5TI/9UXM63kpu8E7AoVNAI7DTHctb5qNprVm9ZubMpprMB/563nMTDL19F+ryuu+Z/ZRq8g3r69zIwv6gi0bH1i9r2EB3s3vDQ1qNsh7sixvWFk+03G5PyJJJ0WU74ScIh+v7lnuYUWusEMPKA8QSwk9vdRLhnbDM7agB00FgFWqfcpXwTxObeYG+D/b8JCtXgewTtiHn/5LiCL6wTWhqkx66hafgk4sMCeVIf7wgsEug+ZC9gc4aWTvhnwTks6jmIw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OdURUj2tRSO5CW7tpKApyC2xU2EhRTYx7540VrWQJePGvvRnIttxgxZ9q7+FrhabtU+cagBtZwatOiFzEh6CjoBbkTr6uhqlu1JFkKLqJPZFHRIYnkvAz+A3qriya10F/Wk6aDbi5lgn94vB7RSVGPlkDgwU+NdzBWJLyjc7hZTL/dHQmIoJicCMU9Qvu+/1VC62aqtbrzbFavWFjbN2yUKQ8gbFN5L/Eo0QaGF0dqKT1HlMdzviAsaDcmqHxObw+mjThS+ewA0j37tUwJhUUA7FndLM6c3N7J6cdogBBZtp8OXR5WUpnRNIRuZYneCnCv9K2GhL03Qrl475iDN9Mg==
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "Anthony PERARD" <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Wed, 17 Feb 2021 18:13:20 +0000
  • Ironport-sdr: MKjA3RlDl8g7SHBYaRSDFy2pqs8rVx8FD7E1psoxBGOlUpDBqLWM7gLZsYBKZ231XJyUmX63oO syZVi8xZsT4uESUQTq8gUFzNfixnhBcRsRlZ65fIUSm/cNcYLzuo/8FQVO0ZXmAdVy4PqcmzRe ilFoImPyWvKDtDq5gTMbtisg2G2XtpVOY+O2lMhj7J1gCIoeEeVXnlKWRIoovksgL85TmvozoF x6LLDU+rA0DPomb7cqPSsa22CFJD3LBdp9mmlqA57I2+jzRyjC7c6GPtauk2CLJL+3udSDOkTz 8fk=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 17/02/2021 17:50, Ian Jackson wrote:
> Andrew Cooper writes ("[PATCH 3/3] tools/libxl: Rework invariants in 
> libxl__domain_get_device_model_uid()"):
>> Various version of gcc, when compiling with -Og, complain:
>>
>>   libxl_dm.c: In function 'libxl__domain_get_device_model_uid':
>>   libxl_dm.c:256:12: error: 'kill_by_uid' may be used uninitialized in this 
>> function [-Werror=maybe-uninitialized]
>>     256 |         if (kill_by_uid)
>>         |            ^
> Thanks for working on this.  I have reviewed your changes and I see
> where you are coming from.  The situation is not very nice, mostly
> because we don't have proper sum types in C.
>
> I'm sorry to say that with my release manager hat on I think it is too
> late for this kind of reorganisation for 4.15, especially just to work
> around an overzealous compiler warning.
>
> I think we can fix the compiler warning simply by setting the
> `kill_by_uid` variable on more of the exit paths.  This approach was
> already taken in this code for one of the paths.
>
> I would prefer that approach at this stage of the release.

Well - I have explained why I'm not happy with that approach, but you
are the maintainer and RM.

I will trade you a minimal patch for formal R-b's so the time invested
so far fixing this mess isn't wasted when 4.16 opens.

~Andrew



 


Rackspace

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