diff options
author | Stefan Kempf <stefan@cvs.openbsd.org> | 2016-01-16 08:55:41 +0000 |
---|---|---|
committer | Stefan Kempf <stefan@cvs.openbsd.org> | 2016-01-16 08:55:41 +0000 |
commit | 14bb73e7a860c71461c6ca641ece152b7bc71b46 (patch) | |
tree | b23d4d1171e6a8d62558116862a01ad0c6c647d4 /usr.sbin/vmd/vmd.h | |
parent | 2b02d7d35660661bd94a10f72953957ce918f9b7 (diff) |
vmd(8) sometimes attempts page-crossing data copies between the host
and guest. The readpage/writepage ioctls of vmm(4) do not support this
and they return EINVAL on such attempts since recently.
Avoid page-crossing guest memory accesses by changing read_page() and
write_page() into read_mem() and write_mem() that can copy arbitrary
lengths of data between host<->guest without page-crossing accesses.
This also allows us to remove page-wise copy-loops in a few places.
ok mlarkin@
Diffstat (limited to 'usr.sbin/vmd/vmd.h')
-rw-r--r-- | usr.sbin/vmd/vmd.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/vmd/vmd.h b/usr.sbin/vmd/vmd.h index 0df024978ba..97a2ebdbba1 100644 --- a/usr.sbin/vmd/vmd.h +++ b/usr.sbin/vmd/vmd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmd.h,v 1.17 2016/01/02 15:05:21 benno Exp $ */ +/* $OpenBSD: vmd.h,v 1.18 2016/01/16 08:55:40 stefan Exp $ */ /* * Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org> @@ -114,8 +114,8 @@ char *get_string(uint8_t *, size_t); /* vmm.c */ pid_t vmm(struct privsep *, struct privsep_proc *); -int write_page(uint32_t dst, void *buf, uint32_t, int); -int read_page(uint32_t dst, void *buf, uint32_t, int); +int write_mem(uint32_t dst, void *buf, uint32_t, int); +int read_mem(uint32_t dst, void *buf, uint32_t, int); int opentap(void); /* control.c */ |