4#include <clues/SystemCall.hxx>
5#include <clues/items/fs.hxx>
6#include <clues/items/signal.hxx>
7#include <clues/items/strings.hxx>
8#include <clues/sysnrs/generic.hxx>
12struct CLUES_API AccessSystemCall :
19 setParameters(path, mode);
28struct CLUES_API FAccessAtSystemCall :
31 explicit FAccessAtSystemCall(
const SystemCallNr nr = SystemCallNr::FACCESSAT) :
36 setParameters(dirfd, path, mode);
46struct CLUES_API FAccessAt2SystemCall :
47 public FAccessAtSystemCall {
49 FAccessAt2SystemCall() :
50 FAccessAtSystemCall{SystemCallNr::FACCESSAT2} {
57struct CLUES_API FcntlSystemCall :
63 setParameters(fd, operation);
85 std::optional<item::SuccessResult>
result;
106struct CLUES_API FstatSystemCall :
112 setParameters(fd, statbuf);
120struct CLUES_API FstatAtSystemCall :
127 setParameters(dirfd, path, statbuf, flags);
138struct StatSystemCallT :
145 setParameters(path, statbuf);
156struct CLUES_API OpenSystemCall :
161 filename{
"filename"},
164 setParameters(filename, flags);
170 std::optional<item::FileModeParameter> mode;
184struct CLUES_API OpenAtSystemCall :
190 filename{
"filename"},
193 setParameters(fd, filename, flags);
200 std::optional<item::FileModeParameter> mode;
214struct CLUES_API CloseSystemCall :
231struct CLUES_API GetDentsSystemCall :
236 size{
"size",
"dirent size in bytes"},
void setReturnItem(SystemCallItem &ret)
Sets the return value system call item.
SystemCall(const SystemCallNr nr)
Instantiates a new SystemCall object with given properties.
Base class for traced processes.
The mode parameter in access().
Flags for system calls with at semantics like linkat(), faccessat().
A range of directory entries from getdents().
Base class for file descriptor system call items.
The flags passed to calls like open().
The stat structure used in stat() & friends.
c-string style system call data.
An always-success return value.
@ PARAM_IN
An input parameter to the system call.
@ RETVAL
A system call return value.
SystemCallNr
Abstract system call number usable across architectures and ABIs.
void updateFDTracking(const Tracee &) override
Update file descriptor tracking.
std::optional< item::FileDescriptor > dup_lowest
for DUPFD, DUPFD_CLOEXEC
std::optional< item::IntValue > pipe_size_arg
for SETPIPE_SZ
bool check2ndPass(const Tracee &) override
Check whether a second pass needs to be made processing parameters.
std::optional< item::OpenFlagsValue > ret_status_flags
for GETFL
std::optional< item::FileDescFlagsValue > ret_fd_flags
for GETFD
std::optional< item::FileDescFlagsValue > fd_flags_arg
for SETFD
void prepareNewSystemCall() override
Perform any necessary actions before processing a new system call entry event.
std::optional< item::SuccessResult > result
for all other cases
std::optional< item::FileDescOwner > owner_arg
for SETOWN
std::optional< item::LeaseType > ret_lease
for GETLEASE
std::optional< item::IntValue > ret_pipe_size
for GETPIPE_SZ, SETPIPE_SZ
std::optional< item::FileDescriptor > ret_dupfd
for DUPFD, DUPFD_CLOEXEC
std::optional< item::ReadWriteHint > rw_hint_arg
for {GET,SET}_[FILE]_RW_HINT
std::optional< item::FLockParameter > flock_arg
for F_SETLK, F_SETLKW, F_GETLK
std::optional< item::FileDescOwner > ret_owner
for GET_OWNER
std::optional< item::DNotifySettings > dnotify_arg
for NOTIFY
std::optional< item::FileSealSettings > file_seals_arg
for ADD_SEALS
std::optional< item::SignalNumber > io_signal_arg
for SETSIG
std::optional< item::SignalNumber > ret_io_signal
for GETSIG
std::optional< item::FileSealSettings > ret_seals
for GET_SEALS
void updateFDTracking(const Tracee &proc) override
Update file descriptor tracking.
std::optional< item::ExtFileDescOwner > ext_owner_arg
for SETOWN_EX, GETOWN_EX
std::optional< item::OpenFlagsValue > status_flags_arg
for SETFL
std::optional< item::LeaseType > lease_arg
for SETLEASE
item::FileDescriptor fd
directory FD.
item::SizeValue ret_bytes
number of bytes filled in dirent buffer.
item::DirEntries dirent
struct linux_dirent*.
item::UintValue size
size of dirent buffer provided by tracee.
bool check2ndPass(const Tracee &) override
Check whether a second pass needs to be made processing parameters.
void updateFDTracking(const Tracee &) override
Update file descriptor tracking.
void prepareNewSystemCall() override
Perform any necessary actions before processing a new system call entry event.
void updateFDTracking(const Tracee &) override
Update file descriptor tracking.
bool check2ndPass(const Tracee &) override
Check whether a second pass needs to be made processing parameters.
void prepareNewSystemCall() override
Perform any necessary actions before processing a new system call entry event.