Post 3537272 by hdasch@fosstodon.org
 (DIR) More posts by hdasch@fosstodon.org
 (DIR) Post #3535437 by alexbuzzbee@fosstodon.org
       2019-01-30T03:33:32Z
       
       0 likes, 1 repeats
       
       Update on the segfault issue: mmap(0, 2, 0x01 | 0x02, 0x20 | 0x02, -1, 0) returns -EBADF if I do it with lens_syscalls, but allocates memory if I do it with libc. Reading libc source shows very little difference between their implementation and mine (theirs does a little more validation, but my arguments would pass their validation).Suspected culprit: Wrong types somewhere.I'll fix it in the morning...
       
 (DIR) Post #3537272 by hdasch@fosstodon.org
       2019-01-30T05:39:04Z
       
       0 likes, 1 repeats
       
       @alexbuzzbee Two thoughts on debugging the syscall interface.  First, run both versions under "strace".  That will show you exacly what is passed in the syscall.If that doesn't help, the link below points to kernel side of the interface.  Don't be intimidated.  It is only code.https://lxr.missinglinkelectronics.com/linux+v4.15/arch/x86/kernel/sys_x86_64.c#L91
       
 (DIR) Post #3557043 by alexbuzzbee@fosstodon.org
       2019-01-30T11:38:59Z
       
       0 likes, 1 repeats
       
       @hdasch I have looked at the kernel side, but good point about strace. Thanks!