summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-04-10 17:04:22 -0400
committerIan Moffett <ian@osmora.org>2024-04-10 17:04:22 -0400
commit434b79c0be7fdd72dd965615104b00f52b1dc4c3 (patch)
tree9f248452a5c686ccb4034015b39696c58b10af28 /sys/kern
parent055639ca4842d64af6bba9f6719eaedddc4325d1 (diff)
kernel: Get rid of invalid_uaddr()
Use signal_raise(NULL, SIGSEGV) instead Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_filedesc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/kern_filedesc.c b/sys/kern/kern_filedesc.c
index 3401f0b..8e15d48 100644
--- a/sys/kern/kern_filedesc.c
+++ b/sys/kern/kern_filedesc.c
@@ -35,6 +35,7 @@
#include <sys/system.h>
#include <sys/syslog.h>
#include <sys/vfs.h>
+#include <sys/signal.h>
#include <sys/vnode.h>
#include <vm/dynalloc.h>
#include <dev/vcons/vcons.h>
@@ -79,7 +80,7 @@ make_write_buf(struct proc *td, const void *data, char **buf_out, size_t count)
* and use copyin()
*/
if (copyin((uintptr_t)data, buf, count) != 0) {
- invalid_uaddr(data);
+ signal_raise(NULL, SIGSEGV);
}
} else {
/* Can just memcpy() here */
@@ -413,7 +414,7 @@ sys_open(struct syscall_args *args)
}
if (copyinstr(args->arg0, pathbuf, PATH_MAX) != 0) {
- invalid_uaddr(args->arg0);
+ signal_raise(NULL, SIGSEGV);
}
ret = open(pathbuf, args->arg1);
@@ -461,7 +462,7 @@ sys_read(struct syscall_args *args)
return bytes_read;
}
if (copyout(kbuf, args->arg1, bytes_read) != 0) {
- invalid_uaddr(args->arg1);
+ signal_raise(NULL, SIGSEGV);
}
dynfree(kbuf);