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

[Xen-devel] staging GCC 8.1.0 build warnings



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?

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


/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.



Cheers,
-- 
  John Thomson

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

 


Rackspace

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