Author: bdragon Date: Fri Dec 27 19:58:14 2019 New Revision: 356134 URL: https://svnweb.freebsd.org/changeset/base/356134
Log: [PowerPC] Ignore fortify-source warning in trap vector copy Due to a bug in clang 9.0.0 source tracking, the trap vector copying will always trigger a fortify-source warning. The destination buffers are 0x2f00 bytes, and the bcopy region is 0x2e00 bytes, so there is not an overflow here. (I have been running with this patch since September.) Modified: head/sys/powerpc/ofw/ofw_machdep.c Modified: head/sys/powerpc/ofw/ofw_machdep.c ============================================================================== --- head/sys/powerpc/ofw/ofw_machdep.c Fri Dec 27 18:53:07 2019 (r356133) +++ head/sys/powerpc/ofw/ofw_machdep.c Fri Dec 27 19:58:14 2019 (r356134) @@ -87,6 +87,9 @@ char save_trap_of[0x2f00]; /* EXC_LAST */ int ofwcall(void *); static int openfirmware(void *args); +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wfortify-source" + __inline void ofw_save_trap_vec(char *save_trap_vec) { @@ -106,6 +109,8 @@ ofw_restore_trap_vec(char *restore_trap_vec) EXC_LAST - EXC_RST); __syncicache((void *)PHYS_TO_DMAP(EXC_RSVD), EXC_LAST - EXC_RSVD); } + +#pragma clang diagnostic pop /* * Saved SPRG0-3 from OpenFirmware. Will be restored prior to the callback. _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"