Module Name: src
Committed By: jdolecek
Date: Sat Jun 27 09:03:15 UTC 2020
Modified Files:
src/sys/dev/ic: aic79xx.c aic7xxx.c
Log Message:
mark ahc_loadseq()/ahd_loadseq() as __noinline to avoid 'stack usage
might get unbounded' - seems the variable-length array using const variable
is misinterpreted as unbounded when inlined
To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/ic/aic79xx.c
cvs rdiff -u -r1.139 -r1.140 src/sys/dev/ic/aic7xxx.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/ic/aic79xx.c
diff -u src/sys/dev/ic/aic79xx.c:1.53 src/sys/dev/ic/aic79xx.c:1.54
--- src/sys/dev/ic/aic79xx.c:1.53 Fri Dec 27 09:45:26 2019
+++ src/sys/dev/ic/aic79xx.c Sat Jun 27 09:03:15 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: aic79xx.c,v 1.53 2019/12/27 09:45:26 msaitoh Exp $ */
+/* $NetBSD: aic79xx.c,v 1.54 2020/06/27 09:03:15 jdolecek Exp $ */
/*
* Core routines and tables shareable across OS platforms.
@@ -49,7 +49,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aic79xx.c,v 1.53 2019/12/27 09:45:26 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aic79xx.c,v 1.54 2020/06/27 09:03:15 jdolecek Exp $");
#include <dev/ic/aic79xx_osm.h>
#include <dev/ic/aic79xx_inline.h>
@@ -8252,7 +8252,7 @@ ahd_dumpseq(struct ahd_softc* ahd)
}
#endif
-static void
+static void __noinline
ahd_loadseq(struct ahd_softc *ahd)
{
struct cs cs_table[num_critical_sections];
Index: src/sys/dev/ic/aic7xxx.c
diff -u src/sys/dev/ic/aic7xxx.c:1.139 src/sys/dev/ic/aic7xxx.c:1.140
--- src/sys/dev/ic/aic7xxx.c:1.139 Fri Dec 27 09:45:26 2019
+++ src/sys/dev/ic/aic7xxx.c Sat Jun 27 09:03:15 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: aic7xxx.c,v 1.139 2019/12/27 09:45:26 msaitoh Exp $ */
+/* $NetBSD: aic7xxx.c,v 1.140 2020/06/27 09:03:15 jdolecek Exp $ */
/*
* Core routines and tables shareable across OS platforms.
@@ -39,7 +39,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
- * $Id: aic7xxx.c,v 1.139 2019/12/27 09:45:26 msaitoh Exp $
+ * $Id: aic7xxx.c,v 1.140 2020/06/27 09:03:15 jdolecek Exp $
*
* //depot/aic7xxx/aic7xxx/aic7xxx.c#112 $
*
@@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aic7xxx.c,v 1.139 2019/12/27 09:45:26 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aic7xxx.c,v 1.140 2020/06/27 09:03:15 jdolecek Exp $");
#include <dev/ic/aic7xxx_osm.h>
#include <dev/ic/aic7xxx_inline.h>
@@ -6275,7 +6275,7 @@ ahc_dumpseq(struct ahc_softc* ahc)
}
#endif
-static void
+static void __noinline
ahc_loadseq(struct ahc_softc *ahc)
{
struct cs cs_table[num_critical_sections];