summaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2023-10-01 17:35:01 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-10-01 19:33:20 +0200
commitb63dea5ca946c3956637a7bf85a1002866b20cd6 (patch)
tree682eb89c30f95c85a4a2b158fcdfa867c2fa56c8 /i386
parent126c0364bf7d72d4f2ecf1ad2f4ebe1d2667940d (diff)
copyinmsg: Check that we have not overflown
This if of course too late in case of a failure, but better assert than get awful bugs, and it's really not supposed to happen.
Diffstat (limited to 'i386')
-rw-r--r--i386/i386/locore.S1
-rw-r--r--i386/i386/locore.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/i386/i386/locore.S b/i386/i386/locore.S
index d3986793..846f5567 100644
--- a/i386/i386/locore.S
+++ b/i386/i386/locore.S
@@ -1335,6 +1335,7 @@ copyin_fail:
* arg0: user address
* arg1: kernel address
* arg2: byte count - must be a multiple of four
+ * arg3: kernel byte count
*/
ENTRY(copyinmsg)
pushl %esi
diff --git a/i386/i386/locore.h b/i386/i386/locore.h
index 4388ea28..374c8cf9 100644
--- a/i386/i386/locore.h
+++ b/i386/i386/locore.h
@@ -48,7 +48,7 @@ extern int call_continuation (continuation_t continuation);
extern int discover_x86_cpu_type (void);
extern int copyin (const void *userbuf, void *kernelbuf, size_t cn);
-extern int copyinmsg (const void *userbuf, void *kernelbuf, size_t cn);
+extern int copyinmsg (const void *userbuf, void *kernelbuf, size_t cn, size_t kn);
extern int copyout (const void *kernelbuf, void *userbuf, size_t cn);
extern int copyoutmsg (const void *kernelbuf, void *userbuf, size_t cn);