Deleted Added
full compact
svr4_machdep.c (107839) svr4_machdep.c (107849)
1/*
2 * Copyright (c) 1998 Mark Newton
3 * Copyright (c) 1994 Christos Zoulas
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 11 unchanged lines hidden (view full) ---

20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
1/*
2 * Copyright (c) 1998 Mark Newton
3 * Copyright (c) 1994 Christos Zoulas
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 11 unchanged lines hidden (view full) ---

20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * $FreeBSD: head/sys/i386/svr4/svr4_machdep.c 107839 2002-12-13 22:41:47Z alfred $
28 * $FreeBSD: head/sys/i386/svr4/svr4_machdep.c 107849 2002-12-14 01:56:26Z alfred $
29 */
30
31#include <sys/types.h>
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/exec.h>
35#include <sys/filedesc.h>
36#include <sys/lock.h>

--- 493 unchanged lines hidden (view full) ---

530#warning "USER_LDT doesn't work - are you sure you want this?"
531 {
532 struct i386_set_ldt_args sa, *sap;
533 struct sys_sysarch_args ua;
534
535 struct svr4_ssd ssd;
536 union descriptor bsd;
537
29 */
30
31#include <sys/types.h>
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/exec.h>
35#include <sys/filedesc.h>
36#include <sys/lock.h>

--- 493 unchanged lines hidden (view full) ---

530#warning "USER_LDT doesn't work - are you sure you want this?"
531 {
532 struct i386_set_ldt_args sa, *sap;
533 struct sys_sysarch_args ua;
534
535 struct svr4_ssd ssd;
536 union descriptor bsd;
537
538 if ((error = copyin(SCARG(uap, a1), &ssd,
538 if ((error = copyin(uap->a1, &ssd,
539 sizeof(ssd))) != 0) {
540 printf("Cannot copy arg1\n");
541 return error;
542 }
543
544 printf("s=%x, b=%x, l=%x, a1=%x a2=%x\n",
545 ssd.selector, ssd.base, ssd.limit,
546 ssd.access1, ssd.access2);

--- 28 unchanged lines hidden (view full) ---

575 sap = stackgap_alloc(&sg,
576 sizeof(struct i386_set_ldt_args));
577
578 if ((error = copyout(&sa, sap, sizeof(sa))) != 0) {
579 printf("Cannot copyout args\n");
580 return error;
581 }
582
539 sizeof(ssd))) != 0) {
540 printf("Cannot copy arg1\n");
541 return error;
542 }
543
544 printf("s=%x, b=%x, l=%x, a1=%x a2=%x\n",
545 ssd.selector, ssd.base, ssd.limit,
546 ssd.access1, ssd.access2);

--- 28 unchanged lines hidden (view full) ---

575 sap = stackgap_alloc(&sg,
576 sizeof(struct i386_set_ldt_args));
577
578 if ((error = copyout(&sa, sap, sizeof(sa))) != 0) {
579 printf("Cannot copyout args\n");
580 return error;
581 }
582
583 SCARG(&ua, op) = I386_SET_LDT;
584 SCARG(&ua, parms) = (char *) sap;
583 ua.op = I386_SET_LDT;
584 ua.parms = (char *) sap;
585
586 if ((error = copyout(&bsd, sa.desc, sizeof(bsd))) != 0) {
587 printf("Cannot copyout desc\n");
588 return error;
589 }
590
591 return sys_sysarch(td, &ua, retval);
592 }
593#endif
594
595 default:
596 printf("svr4_sysarch(%d), a1 %p\n", uap->op,
597 uap->a1);
598 return 0;
599 }
600}
585
586 if ((error = copyout(&bsd, sa.desc, sizeof(bsd))) != 0) {
587 printf("Cannot copyout desc\n");
588 return error;
589 }
590
591 return sys_sysarch(td, &ua, retval);
592 }
593#endif
594
595 default:
596 printf("svr4_sysarch(%d), a1 %p\n", uap->op,
597 uap->a1);
598 return 0;
599 }
600}