From owner-svn-src-head@freebsd.org Fri Dec 27 19:58:14 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F0ADD1CD77F; Fri, 27 Dec 2019 19:58:14 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47kyLG5mT5z4VQp; Fri, 27 Dec 2019 19:58:14 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BCE6F1DD6F; Fri, 27 Dec 2019 19:58:14 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBRJwEIH019649; Fri, 27 Dec 2019 19:58:14 GMT (envelope-from bdragon@FreeBSD.org) Received: (from bdragon@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBRJwE5H019648; Fri, 27 Dec 2019 19:58:14 GMT (envelope-from bdragon@FreeBSD.org) Message-Id: <201912271958.xBRJwE5H019648@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdragon set sender to bdragon@FreeBSD.org using -f From: Brandon Bergren Date: Fri, 27 Dec 2019 19:58:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r356134 - head/sys/powerpc/ofw X-SVN-Group: head X-SVN-Commit-Author: bdragon X-SVN-Commit-Paths: head/sys/powerpc/ofw X-SVN-Commit-Revision: 356134 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2019 19:58:15 -0000 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.