xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: John Thomson <lists@johnthomson.fastmail.com.au>
Cc: xen-devel@lists.xenproject.org, Wei Liu <wei.liu2@citrix.com>
Subject: Re: staging GCC 8.1.0 build warnings
Date: Mon, 14 May 2018 18:03:57 +0100	[thread overview]
Message-ID: <20180514170357.m2cmv4xsty3s3y6x@citrix.com> (raw)
In-Reply-To: <1525909106.2372757.1366819088.5605C10E@webmail.messagingengine.com>

On Thu, May 10, 2018 at 09:38:26AM +1000, John Thomson wrote:
> Hi,
> Trying to build Xen staging with GCC 8.1.0 and facing some of the new warnings:
> 
> For OVMF, I used these three commits:
> https://github.com/tianocore/edk2/compare/1d212a83df0eaf32a6f5d4159beb2d77832e0231^...9de306701312f986c9638cb819d3f1f848d55cab.patch
> 1d212a83df0eaf32a6f5d4159beb2d77832e0231
> 9222154ae7b3eef75ae88cdb56158256227cb929
> 9de306701312f986c9638cb819d3f1f848d55cab
> 
> 
> For IPXE, one of these patches:
> http://lists.ipxe.org/pipermail/ipxe-devel/2018-April/006146.html
> https://build.opensuse.org/package/view_file/openSUSE:Factory/qemu/ipxe-efi-guard-strncpy-with-gcc-warning-ignore-pragma.patch?expand=1
> 
> I was still unable to build IPXE at the Xen selected commit in tools/firmware/etherboot/Makefile:IPXE_GIT_TAG, with Errors:
> [BUILD] bin/netdevice.o
> Assembler messages
> junk at end of line, first unrecognized character is `@'
> can't resolve `__table_entries.2720' {.tbl.net_device_configurators.99 section} - `__table_entries.2722' {.tbl.net_device_configurators.00 section}
> can't resolve `__table_entries.2796' {.tbl.net_device_configurators.99 section} - `__table_entries.2798' {.tbl.net_device_configurators.00 section}
> 
> I ended up using IPXE master and the OpenSUSE ipxe-efi-guard-strncpy-with-gcc-warning-ignore-pragma.patch
> I have not followed this up to find which commit fixes my build yet.
> 
> How close to ready are the standalone IPXE patches?

It has gathered some comments. v2 is not yet posted. At this point it is
definitely N+1 material.

I don't think having it merged in N+1 will be a big problem though,
provided we find enough bandwidth to work on it.

> 
> For QEMU, this commit:
> https://github.com/qemu/qemu/commit/84c868f6b8f8c1be9d3d65df93cf00b30821401c.patch
> 84c868f6b8f8c1be9d3d65df93cf00b30821401c
> 
> 
> In tools/ocaml/libs/xc/xenctrl_stubs.c
> char error_str[1028];
> 
>  CC       xenctrl_stubs.o
> xenctrl_stubs.c: In function 'failwith_xc':
> xenctrl_stubs.c:65:17: error: 'snprintf' output may be truncated before the last format character [-Werror=format-truncation=]
>       "%d: %s: %s", error->code,
>                  ^
> xenctrl_stubs.c:64:4: note: 'snprintf' output 6 or more bytes (assuming 1029) into a destination of size 1028
>     snprintf(error_str, sizeof(error_str),
>     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       "%d: %s: %s", error->code,
>       ~~~~~~~~~~~~~~~~~~~~~~~~~~
>       xc_error_code_to_desc(error->code),
>       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       error->message);
>       ~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> 
> I changed these, but am not sure if this is correct?
> char error_str[XC_MAX_ERROR_MSG_LEN + 6]
> sizeof(error_str) - 1 in the three snprintf

Bumping the size should be fine.

> 
> 
> /build/xen-git/src/xen/stubdom/tpm_emulator-x86_64/tpm/tpm_deprecated.c:437:7: error: 'memcmp' reading 20 bytes from a region of size 8 [-Werror=stringop-overflow=]
>    if (memcmp(&b1, &newAuthLink, sizeof(TPM_HMAC))) {
>        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Not sure how to approach this, I disabled the vtpm stubdoms in my builds for now.
> 

If you don't use it, disabling it is the best option.

Wei.

> 
> 
> Cheers,
> -- 
>   John Thomson
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xenproject.org
> https://lists.xenproject.org/mailman/listinfo/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-05-14 17:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09 23:38 staging GCC 8.1.0 build warnings John Thomson
2018-05-14 17:03 ` Wei Liu [this message]
2018-05-14 18:20   ` Jason Andryuk
2018-05-15  1:42     ` John Thomson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180514170357.m2cmv4xsty3s3y6x@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=lists@johnthomson.fastmail.com.au \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).