summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2024-01-07 20:52:45 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2024-01-07 20:52:45 +0000
commite4eaf3cc9b768978a46e311724fb00d02681a385 (patch)
treeb5af15760e1c7aa9c841781dddc9be732cb607d1 /sys
parent4a80be7221c4156291c62ae643c7990f104f486f (diff)
Error out if one syscall ever takes more than 6 arguments.
This is not necessarily wrong per se, but would need special consideration, as not all platforms are currently able to process more than six syscall arguments (and upcoming diffs will rely upon reasonably-sized argument lists), so better break now and reconsider later if need be. ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/makesyscalls.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/kern/makesyscalls.sh b/sys/kern/makesyscalls.sh
index bedc95666de..16d09296037 100644
--- a/sys/kern/makesyscalls.sh
+++ b/sys/kern/makesyscalls.sh
@@ -1,5 +1,5 @@
#! /bin/sh -
-# $OpenBSD: makesyscalls.sh,v 1.21 2023/12/21 19:34:07 miod Exp $
+# $OpenBSD: makesyscalls.sh,v 1.22 2024/01/07 20:52:44 miod Exp $
# $NetBSD: makesyscalls.sh,v 1.26 1998/01/09 06:17:51 thorpej Exp $
#
# Copyright (c) 1994,1996 Christopher G. Demetriou
@@ -326,6 +326,11 @@ function parseline() {
parserr($f, "argument definition")
} else
varargc = argc;
+ if (argc > 6) {
+ printf "%s: line %d: too many syscall arguments (%d > 6)\n", \
+ infile, NR, argc
+ exit 1
+ }
}
function putent(nodefs, compatwrap) {
# output syscall declaration for switch table.