-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gpkg/glibc: implementation of fakesyscall (#240)
- Loading branch information
Showing
10 changed files
with
100 additions
and
608 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
accept | ||
chmod | ||
chown | ||
chown32 | ||
clock_gettime64 | ||
clone3 | ||
close_range | ||
epoll_pwait2 | ||
faccessat2 | ||
fchmodat2 | ||
futex_waitv | ||
getpgrp | ||
landlock_create_ruleset | ||
pidfd_send_signal | ||
recv | ||
rmdir | ||
rseq | ||
send | ||
set_robust_list | ||
setfsgid | ||
setfsgid32 | ||
setfsuid | ||
setfsuid32 | ||
setgid | ||
setgid32 | ||
setresgid | ||
setresgid32 | ||
setuid | ||
setuid32 | ||
statx | ||
symlink |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#ifndef _FAKE_SYSCALL | ||
#define _FAKE_SYSCALL | ||
|
||
#include <arch-syscall.h> | ||
#include <disabled-syscall.h> | ||
|
||
extern int close_range (unsigned int __fd, unsigned int __max_fd, int __flags) __THROW; | ||
|
||
struct FakeSyscall { | ||
int id; | ||
long int (*func)(long int, | ||
long int, | ||
long int, | ||
long int, | ||
long int, | ||
long int); | ||
}; | ||
|
||
long int JustReturnZero() { | ||
return 0; | ||
} | ||
|
||
static struct FakeSyscall FakeSyscalls[] = { | ||
{ __NR_close_range, close_range }, | ||
{ __NR_mbind, JustReturnZero }, | ||
{ __NR_get_mempolicy, JustReturnZero }, | ||
{ __NR_set_mempolicy, JustReturnZero }, | ||
{ 1008, JustReturnZero }, // for some reason used in julia | ||
}; | ||
|
||
#define CountFakeSyscalls (sizeof(FakeSyscalls) / sizeof(FakeSyscalls[0])) | ||
|
||
#endif //_FAKE_SYSCALL |
Oops, something went wrong.