MCPcopy Create free account
hub / github.com/qilingframework/qiling / raw_syscall

Function raw_syscall

qiling/os/posix/kernel_proxy/proxy.py:41–51  ·  view source on GitHub ↗

Execute a real Linux syscall. Returns (return_value, errno) in kernel convention.

(nr: int, a0: int, a1: int, a2: int, a3: int, a4: int, a5: int)

Source from the content-addressed store, hash-verified

39
40
41def raw_syscall(nr: int, a0: int, a1: int, a2: int, a3: int, a4: int, a5: int) -> tuple:
42 """Execute a real Linux syscall. Returns (return_value, errno) in kernel convention."""
43 ctypes.set_errno(0)
44 result = _libc.syscall(nr, a0, a1, a2, a3, a4, a5)
45
46 if result == -1:
47 err = ctypes.get_errno()
48 if err != 0:
49 return -err, err # kernel convention: negative errno
50
51 return result, 0
52
53
54def raw_syscall_ex(nr: int, args: list, in_bufs: list, out_specs: list) -> tuple:

Callers 2

raw_syscall_exFunction · 0.85
mainFunction · 0.85

Calls 1

syscallMethod · 0.45

Tested by

no test coverage detected