diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2017-09-16 02:03:41 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2017-09-16 02:03:41 +0000 |
commit | 28934186950b2f55a492e9a372a2030e04c27ace (patch) | |
tree | f147306a534ad6fca0bee9ced48d796e05273ac4 /regress | |
parent | d866e3a014e7c2d407873e122ad6c8b9c418295c (diff) |
The copyin(9) family of functions should return EFAULT for all memory
protection issues. So make amd64 do that instead of passing through
uvm_fault()'s return value, which lead to other possible errors
(particularly EACCES) being returned to userspace. Clean up a vestige
on arm64 too.
ok bluhn@ deraadt@
Diffstat (limited to 'regress')
-rw-r--r-- | regress/sys/kern/ptrace/ptrace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/regress/sys/kern/ptrace/ptrace.c b/regress/sys/kern/ptrace/ptrace.c index cb88f4e5b17..74a6d5b56d8 100644 --- a/regress/sys/kern/ptrace/ptrace.c +++ b/regress/sys/kern/ptrace/ptrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ptrace.c,v 1.4 2017/09/06 04:20:12 guenther Exp $ */ +/* $OpenBSD: ptrace.c,v 1.5 2017/09/16 02:03:40 guenther Exp $ */ /* * Copyright (c) 2005 Artur Grabowski <art@openbsd.org> * @@ -132,7 +132,7 @@ main(int argc, char **argv) if (ptrace(PT_IO, pid, (caddr_t)&piod, 0) == -1) { warn("ptrace(PT_IO)"); - if (errno == EACCES) + if (errno == EFAULT) ret = 1; else ret = -1; |