[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH][4.15] gnttab: work around "may be used uninitialized" warning
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Thu, 11 Mar 2021 09:25:30 +0100
- 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=nwQq36Hi81n35Mtk5ZfO1VYif3bs0JJ3T/p+IlBD4Ws=; b=iyOmuOo0usWBTk7JUkURyF5bcxNdZfeoyFxtCKu62LIBvBOzoSGw00GtrG0RGZIzusf3vzO8K0za4AwT09s/RKPzTNblB2f0OxNLLYcejQ/MXMCFPtR2hivM1HxQqVZsPQscLSwkzqcfcTy/akIxGKxJ4TLwnPV/jQbEEY43+mwJe5xnLhXyVbuoL5jJeqyTNveJ8gr0kIyNk87iEabBRjSpQAHKgQ7/ESDsSAwofWTkQoavMUzQRd8l9zCpEcth3nlW3buKg5qmL+AAeGf0hjsd10f8a7NqugyHl7ABR+GG1kPKzzLpDWbftB3cwaln9s0f7IqIDiIgOSz4J89bFw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c7k8TWyYgbPw99vmltu1HCo3SWUoAJUf3ZY1vOrzwjPJKId/z+16DH5cCH6xPcIIQhlAC61glI3+y7XlZofhjRtPKJs5vBxtkN8tzKWxvSnQqv+er81MPJrd0a1Bo8ZpxNZvRsZtBzAYXK4jDoNSnVgZMApFNDxJN2KbMhZtDXL5sLfdpswBdQB6w7feU1P922kqVMnysENemTmtjvSpsJeaHoZJTiUR/IC4nSrggVCbDBBwtXsLYnG/e4cisVqSIG1kMiB3ZIHY4XDoeqvVAR3WHjUqIkl98yg/bt+CnRNJ0xHVhqD8BqPhkszvtRoaVLEeTQOHDb5Sk2gadLSCXA==
- Authentication-results: esa5.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: Julien Grall <julien@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Thu, 11 Mar 2021 08:26:04 +0000
- Ironport-hdrordr: A9a23:TG7m2q1cIH20bHnyjkF/cAqjBU51eYIsi2QD101hICF9Wvez0+ izgfUW0gL1gj4NWHcm3euNIrWEXGm0z+8S3aA4Bp3neAX9omOnIMVZ7YXkyyD9ACGWzJ876Y 5JSII7MtH5CDFB/KLHySGzGdo43Z2j+Kenme/Rwx5WPHRXQol98gZ0DRuaGEVqRA9AQaE0Do aY+9ACgSGhd3QRZsHTPAhNY8HoodrXmJX6JTsPABA64AeD5AnYnILSOR6ewxsYTndz0a4vmF K11zDRy4eCl7WAyhHa33LO9Jg+orCRs+drKcSQhqEuW0TRoymyYoAJYcz5gBkUp6WV5E8ugJ 3wpX4bTrZOwlfwWk3wnhf3wQnn118Vmjjf4HuVm2Hqr8C8ZB9SMbswuatjfhHU61UtsbhHuc ogsgz5xuIndi/opyj269jWWxwvrHOayEBMrccpg3NSSocYYrNKxLZvj399K5scADn8rLkuDe gGNrCE2N9tbViYY3rF11MfvOCEY3UpEh+KBmgEt8CFugIm4kxR8koCyMQT2koH7ZI2IqM0mN jsD6IArsAycuYmKY5aPc8dXNC2AXDRTR/pPHiJKVrqfZt3Y07lmtra8b8x7OGvdIcoyoEulJ n6UF1evXMvYE71TemDxodC/Bz1W2O2US72xsw23fhEk4y5aKv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FWNSDuQ++JSv5LEihyxfZgxGNR9LtBnNm8dn16 y+wvPcRqnLDmrpI0sI/Vd+d9NJtx1ujWFLaM6l652hJi0RC+4TGvM6oqRbiihgpFS2z1oSaX xWx1AV/7CIClzsJHJnE6fy2aPwnRgDvaCHr3ljvm9ZlF/iqFaSvRzShMa6u309qgTm309agJ TYYDs6myBCsAF7hYRnL3qWSGbpBUq/D2mf9tplBVRVTUQuwf4slhzNMu0ikY2/1XNtqXAGBT Uq36u3Gmu3c0TSKfTAaBawFNq0B9ZuZe12IWRrFQ/pCD3U3pArCh7YctZo0Ruh3n8IGKiVI6 ujJAaQFoME8qAcM7HlKrTux/vmx0xc7TUfvoj7gXuKkLZ29sudPBd7qs94fK5zOAumlR0Il+ e7TEbKJcwQ5iqQsmnqrSJfL9USyx4OwUYbqTwLcRnYSO+bVwVkvnoe15TtRCcE0s6PRtZerH fZrTeayTLrHRHRNFPpRqYE7H0o/hvQWY7Wv1C1fLzqKhBZkcvcXJuRhG79zA/Vp9KIkTnYuF dsyApnNF0I9zs=
- Ironport-sdr: 2/NQUwVIH08lJam0sPzA2ScEoQ1XPnNic13esNaKOjjehaJVZer4p3IYocuwBT7fePcRTPDotd Q0YY8dvrjwU1HCEbYq8tlsCghNumaWci6BAmq1nL9cXcSlh3Zhyg5BTPRHHIVoc4EhzRxfgQoV 9zYlCCO/5jkE7D/YZ35IksULvKGOMBiyBqKnx4zHp7AAqMy+9xPrhUz8KI3xbwUeWeKrt67WtO txeDYFz2kubTNoBW+NnwFLDB07SJtKvY8szCbdF2AgVTIDye5Av76wjnNEmnrqzo5RnvfBQTPz jNc=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Thu, Mar 11, 2021 at 09:09:22AM +0100, Jan Beulich wrote:
> On 10.03.2021 18:52, Julien Grall wrote:
> > On 10/03/2021 16:21, Jan Beulich wrote:
> >> On 10.03.2021 15:58, Julien Grall wrote:
> >>> On 10/03/2021 10:13, Jan Beulich wrote:
> >>> 2) A compiler will not be able to help us if we are adding code
> >>> without initialized vaddrs.
> >>>
> >>> It also feels wrong to me to try to write Xen in a way that will make a
> >>> 10 years compiler happy...
> >>
> >> As said above - we've worked around limitations quite a few times
> >> in the past. This is just one more instance.
> >
> > I find amusing you wrote that when you complained multiple time when
> > someone was re-using existing bad pattern. :)
>
> Well, thing is - I don't view this as a bad pattern. The only question
> really is whether NULL is a good initializer here. As per above a non-
> canonical pointer may be better, but then we have quite a few places
> elsewhere to fix.
Sorry for jumping in the middle but I think that would be a very
dangerous move for Xen to do. We have been using implicit conversions
of pointers to booleans all over the place, assuming that NULL ==
false, hence NULL no longer mapping to false would break a lot of our
code. ie:
if ( foo )
free(foo);
Would no longer work as expected.
Thanks, Roger.
|