Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Sep 2000 10:50:04 -0700 (PDT)
From:      Jonathan Chen <jon@spock.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: i386/21329: change to allow vm86 interrupt calls from userland
Message-ID:  <200009171750.KAA24884@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR i386/21329; it has been noted by GNATS.

From: Jonathan Chen <jon@spock.org>
To: Bill Fumerola <billf@chimesnet.com>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: i386/21329: change to allow vm86 interrupt calls from userland
Date: Sun, 17 Sep 2000 13:45:11 -0400

 bleah, forgot one last bit to satisfy the style(9) police... ;P
 (how many mistake can I make in one three-line patch?)
 
 Index: sys/i386/i386/vm86.c
 ===================================================================
 RCS file: /export/ncvs/src/sys/i386/i386/vm86.c,v
 retrieving revision 1.31
 diff -u -r1.31 vm86.c
 --- sys/i386/i386/vm86.c	1999/10/29 18:08:35	1.31
 +++ sys/i386/i386/vm86.c	2000/09/17 17:42:34
 @@ -701,18 +701,19 @@
  		}
  		break;
  
 -#if 0
  	case VM86_INTCALL: {
  		struct vm86_intcall_args sa;
  
 -		if (error = copyin(ua.sub_args, &sa, sizeof(sa)))
 +		if (p->p_cred->pc_ucred->cr_uid != 0)
 +			return EPERM;
 +
 +		if (0 != (error = copyin(ua.sub_args, &sa, sizeof(sa))))
  			return (error);
 -		if (error = vm86_intcall(sa.intnum, &sa.vmf))
 +		if (0 != (error = vm86_intcall(sa.intnum, &sa.vmf)))
  			return (error);
  		error = copyout(&sa, ua.sub_args, sizeof(sa));
  		}
  		break;
 -#endif
  
  	default:
  		error = EINVAL;
 
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009171750.KAA24884>