Module Name: src Committed By: simonb Date: Thu Feb 18 12:54:03 UTC 2021
Modified Files: src/sys/compat/netbsd32: netbsd32_compat_50.c netbsd32_time.c Log Message: In the compat setitimer(2) calls, don't validate which timer is being used since dosetitimer() does this anyway. The compat functions hadn't been updated since ITIMER_MONOTONIC was introduced, so they reported that that ITIMER_MONOTONIC timer was invalid. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/compat/netbsd32/netbsd32_compat_50.c cvs rdiff -u -r1.54 -r1.55 src/sys/compat/netbsd32/netbsd32_time.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/compat/netbsd32/netbsd32_compat_50.c diff -u src/sys/compat/netbsd32/netbsd32_compat_50.c:1.50 src/sys/compat/netbsd32/netbsd32_compat_50.c:1.51 --- src/sys/compat/netbsd32/netbsd32_compat_50.c:1.50 Tue Jan 19 03:20:13 2021 +++ src/sys/compat/netbsd32/netbsd32_compat_50.c Thu Feb 18 12:54:03 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_compat_50.c,v 1.50 2021/01/19 03:20:13 simonb Exp $ */ +/* $NetBSD: netbsd32_compat_50.c,v 1.51 2021/02/18 12:54:03 simonb Exp $ */ /*- * Copyright (c) 2008, 2020 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_50.c,v 1.50 2021/01/19 03:20:13 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_50.c,v 1.51 2021/02/18 12:54:03 simonb Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -875,8 +875,6 @@ compat_50_netbsd32_setitimer(struct lwp struct itimerval aitv; int error; - if ((u_int)which > ITIMER_PROF) - return EINVAL; itv32 = SCARG_P32(uap, itv); if (itv32) { if ((error = copyin(itv32, &s32it, sizeof(s32it)))) Index: src/sys/compat/netbsd32/netbsd32_time.c diff -u src/sys/compat/netbsd32/netbsd32_time.c:1.54 src/sys/compat/netbsd32/netbsd32_time.c:1.55 --- src/sys/compat/netbsd32/netbsd32_time.c:1.54 Tue Jan 19 03:20:13 2021 +++ src/sys/compat/netbsd32/netbsd32_time.c Thu Feb 18 12:54:03 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_time.c,v 1.54 2021/01/19 03:20:13 simonb Exp $ */ +/* $NetBSD: netbsd32_time.c,v 1.55 2021/02/18 12:54:03 simonb Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: netbsd32_time.c,v 1.54 2021/01/19 03:20:13 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_time.c,v 1.55 2021/02/18 12:54:03 simonb Exp $"); #if defined(_KERNEL_OPT) #include "opt_ntp.h" @@ -142,8 +142,6 @@ netbsd32___setitimer50(struct lwp *l, co struct itimerval aitv; int error; - if ((u_int)which > ITIMER_PROF) - return EINVAL; itv32 = SCARG_P32(uap, itv); if (itv32) { if ((error = copyin(itv32, &s32it, sizeof(s32it))))