00001 /* Invokes a system call with one byte of the system call's 00002 argument on a separate page from the rest of the bytes. This 00003 must work. */ 00004 00005 #include <syscall-nr.h> 00006 #include "tests/userprog/boundary.h" 00007 #include "tests/lib.h" 00008 #include "tests/main.h" 00009 00010 void 00011 test_main (void) 00012 { 00013 /* Make one byte of a syscall argument hang over into a second 00014 page. */ 00015 int *p = (int *) ((char *) get_boundary_area () - 7); 00016 p[0] = SYS_EXIT; 00017 p[1] = 67; 00018 00019 /* Invoke the system call. */ 00020 asm volatile ("movl %0, %%esp; int $0x30" : : "g" (p)); 00021 fail ("should have called exit(67)"); 00022 }