> > 20188 MathKernel CALL mprotect(0xcfbc1000,0x1000,0x1000007) > > 20188 MathKernel RET mprotect -1 errno 22 Invalid argument > > In OpenBSD, the only legal values for the third argument of mprotect are > the bitwise sums of > > #define PROT_NONE 0x00 /* no permissions */ > #define PROT_READ 0x01 /* pages can be read */ > #define PROT_WRITE 0x02 /* pages can be written */ > #define PROT_EXEC 0x04 /* pages can be executed */ > > But in Linux, bitwise sums of > > #define PROT_SEM 0x8 /* page may be used for atomic ops */ > #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change > to start of growsdown vma */ > #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end > of growsup vma */ > > are also allowed, in addition to those allowed by OpenBSD. So, at this > point in the ktrace, a Linux-specific call to mprotect is being made. > Namely, PROT_READ + PROT_WRITE + PROT_EXEC + PROT_GROWSDOWN. > > Is this the source of the error? If so, could OpenBSD's compat_linux be > patched?
As it turns out, this bug in compat_linux was encountered in NetBSD in 2005 and then fixed. The NetBSD patches are http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/compat/linux/common/linux_mmap.h.diff?r1=1.16&r2=1.17 http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/compat/linux/common/linux_misc.c.diff?r1=1.140&r2=1.141 the complete NetBSD bug report is http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=30008 and a discussion of the bug (and what the PROT_GROWSDOWN flag does) can be found at http://mail-index.netbsd.org/current-users/2005/10/25/0026.html Could I convince one of the developers to port these patches to OpenBSD? Should I just file a bug report?