summaryrefslogtreecommitdiff
path: root/sys/include
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-06-03 16:41:21 -0400
committerIan Moffett <ian@osmora.org>2025-06-03 16:41:21 -0400
commit42cde478e31ccfe1b6520dd6c54d4405e09bffc7 (patch)
tree85fcac1fe92d5cee24d5cb067fb0acf794233421 /sys/include
parentfd4f7c5d2ffa875368437c78a13eb8fc7595d49d (diff)
kernel: device: Harden cdev mmap() bounds checks
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include')
-rw-r--r--sys/include/sys/device.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/include/sys/device.h b/sys/include/sys/device.h
index cb2a702..04b66fc 100644
--- a/sys/include/sys/device.h
+++ b/sys/include/sys/device.h
@@ -48,7 +48,7 @@ typedef int(*dev_bsize_t)(dev_t);
struct cdevsw {
int(*read)(dev_t dev, struct sio_txn *sio, int flags);
int(*write)(dev_t dev, struct sio_txn *sio, int flags);
- paddr_t(*mmap)(dev_t dev, off_t off, int flags);
+ paddr_t(*mmap)(dev_t dev, size_t size, off_t off, int flags);
/* Private */
struct vm_object vmobj;