Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Dec 2019 19:58:14 +0000 (UTC)
From:      Brandon Bergren <bdragon@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r356134 - head/sys/powerpc/ofw
Message-ID:  <201912271958.xBRJwE5H019648@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912271958.xBRJwE5H019648>