From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 647268222B for ; Tue, 21 Feb 2017 15:59:56 -0800 (PST) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A180481255; Tue, 21 Feb 2017 23:59:56 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-134.phx2.redhat.com [10.3.116.134]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1LNxrOQ008777; Tue, 21 Feb 2017 18:59:54 -0500 To: Jordan Justen , Anthony PERARD , Rebecca Cran References: <20161201152819.8341-1-anthony.perard@citrix.com> <53c67cb5-e947-8979-7738-288cc83f374b@redhat.com> <20161202160201.GA1848@perard.uk.xensource.com> <9c0c9f43-a297-179f-2d57-fa5d8fab3763@redhat.com> <20170221163922.GC1867@perard.uk.xensource.com> <97214320-6054-8034-7667-6edde4debd80@redhat.com> <20170221175303.GD1867@perard.uk.xensource.com> <2a9ad7dd-fbeb-5a36-091f-d8592e95c509@redhat.com> <0d8b276a-c2ff-8797-4302-953febae931f@bluestop.org> <148771713761.11536.11405248826433236318@jljusten-ivb> Cc: "Gao, Liming" , "Zhu, Yonghong" , Ard Biesheuvel , edk2-devel@ml01.01.org, Konrad Rzeszutek Wilk From: Laszlo Ersek Message-ID: Date: Wed, 22 Feb 2017 00:59:52 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <148771713761.11536.11405248826433236318@jljusten-ivb> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 21 Feb 2017 23:59:56 +0000 (UTC) Subject: Re: [PATCH 0/4] Fix runtime issue in XenBusDxe when compiled with GCC5 X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2017 23:59:56 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 02/21/17 23:45, Jordan Justen wrote: > On 2017-02-21 11:08:24, Rebecca Cran wrote: >> On 2/21/2017 12:02 PM, Laszlo Ersek wrote: >> >>> But in this case, the full edk2 codebase has to be grepped for >>> VA_LIST-taking functions, and all of them must be flipped to EFIAPI, if >>> they currently aren't EFIAPI. Covering just XenStoreVSPrint() seems >>> incomplete. (Note: CryptoPkg/Library/OpensslLib is an exception.) >> >> I think this was discussed previously but I can't remember: is there a >> reason for not just compiling everything with -mabi=ms ? >> > > Originally GCC didn't support -mabi=ms. Once it gained support, it > then produced larger executables. Nowadays (and for quite some time), > I think it generally results in smaller executables. > > A benefit of not using -mabi=ms is that we are able to catch some > cases of misused EFIAPI I agree. > with a compiler warning, or unfortunately in > some cases with crashes or misbehaving code. > > I think the benefit of helping keep EFIAPI clean means that we should > continue to not use -mabi=ms for DEBUG builds. I agree (also for NOOPT builds). > But, I think it would > be good to get the size advantages of -mabi=ms by enabling it for > RELEASE builds. That sounds useful too (even though it wouldn't make the current problem go away). As one caveat, I believe -mabi=ms wouldn't be allowed for building OpensslLib even for RELEASE. See "-DNO_MSABI_VA_FUNCS" in "OpensslLib.inf": commit b2dc04a87fab89307240dc0f30b9a23bb5726c81 Author: Ard Biesheuvel Date: Sun Jul 17 11:57:45 2016 +0200 CryptoPkg: set new define to avoid MS ABI VA_LIST on GCC/X64 Set the #define NO_MSABI_VA_FUNCS that will be introduced in a subsequent patch to avoid the use of the MS ABI in variadic functions. In EDK2, such functions normally require the EFIAPI modifier to be used, but for external libraries such as OpenSSL, which lack these annotations, it is easier to simply revert to the default SysV style VA_LIST ABI. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel Reviewed-by: Jordan Justen Tested-by: Laszlo Ersek Tested-By: Liming Gao Reviewed-by: Liming Gao Thanks! Laszlo