On Thu, Feb 10, 2011 at 02:08:07PM +0200, Paul Irofti wrote: > This adds the mprotect syscall to the linux compat layer. This plus the > other time syscalls that went in will make the new versions of > applications such as Opera and Skype work. > > Okay?
maybe, but your timing is wrong, we're in ABI lock. -Otto > > Index: linux_misc.c > =================================================================== > RCS file: /cvs/src/sys/compat/linux/linux_misc.c,v > retrieving revision 1.65 > diff -u -p -r1.65 linux_misc.c > --- linux_misc.c 26 Jul 2010 01:56:27 -0000 1.65 > +++ linux_misc.c 7 Feb 2011 10:13:38 -0000 > @@ -1474,3 +1474,13 @@ linux_sys_sysinfo(p, v, retval) > > return (copyout(&si, SCARG(uap, sysinfo), sizeof(si))); > } > + > +int > +linux_sys_mprotect(struct proc *p, void *v, register_t *retval) > +{ > + struct sys_mprotect_args *uap = v; > + > + if (SCARG(uap, prot) & (PROT_READ | PROT_WRITE | PROT_EXEC)) > + SCARG(uap, prot) |= PROT_READ | PROT_EXEC; > + return (sys_mprotect(p, uap, retval)); > +} > Index: syscalls.master > =================================================================== > RCS file: /cvs/src/sys/compat/linux/syscalls.master,v > retrieving revision 1.51 > diff -u -p -r1.51 syscalls.master > --- syscalls.master 30 Jun 2010 21:54:12 -0000 1.51 > +++ syscalls.master 7 Feb 2011 10:13:39 -0000 > @@ -223,7 +223,7 @@ > 123 STD { int linux_sys_modify_ldt(void); } > #endif > 124 STD { int linux_sys_adjtimex(void); } > -125 NOARGS { int sys_mprotect(caddr_t addr, int len, int prot); } > +125 STD { int linux_sys_mprotect(caddr_t addr, int len, int > prot); } > 126 STD { int linux_sys_sigprocmask(int how, \ > linux_old_sigset_t *set, linux_old_sigset_t *oset); > } > 127 STD { int linux_sys_create_module(void); }