4#include <clues/SystemCall.hxx>
5#include <clues/items/fs.hxx>
6#include <clues/items/futex.hxx>
7#include <clues/items/items.hxx>
8#include <clues/items/process.hxx>
9#include <clues/items/signal.hxx>
10#include <clues/items/time.hxx>
11#include <clues/sysnrs/generic.hxx>
15struct CLUES_API SetTIDAddressSystemCall :
18 SetTIDAddressSystemCall() :
20 address{
"addr",
"thread ID location"},
38struct CLUES_API GetRobustListSystemCall :
41 GetRobustListSystemCall() :
44 list_head{
"head",
"pointer to robust list head"},
45 size_ptr{
"sizep",
"pointer to robust list head size",
48 setParameters(thread_id, list_head, size_ptr);
49 list_head.setBase(Base::HEX);
63struct CLUES_API SetRobustListSystemCall :
66 SetRobustListSystemCall() :
68 list_head{
"head",
"pointer to robust list head"},
69 size{
"size",
"robust list size"} {
71 setParameters(list_head, size);
83struct CLUES_API FutexSystemCall :
88 futex_addr{
"addr",
"pointer to futex word"},
96 setParameters(futex_addr, operation);
108 std::optional<item::Uint32Value>
value;
112 std::optional<item::SignalNumber>
fd_sig;
114 std::optional<item::TimeSpecParameter>
timeout;
124 std::optional<item::FutexWakeOperation>
wake_op;
126 std::optional<item::GenericPointerValue>
bitset;
133 std::optional<item::FileDescriptor>
new_fd;
135 std::optional<item::SuccessResult>
result;
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 futex operation to be performed in the context of a futex system call.
A pointer to an integral data type which will be filled in by the kernel.
An always-success return value.
@ PARAM_IN
An input parameter to the system call.
@ RETVAL
A system call return value.
@ PARAM_IN_OUT
Both an input and output parameter.
void updateFDTracking(const Tracee &proc) override
Update file descriptor tracking.
std::optional< item::Uint32Value > wake_count2
! "val2", number of waiters at futex2_addr to wakeup (WAKE_OP).
std::optional< item::Uint32Value > requeue_limit
! "val2", upper limit on waiters to be requeued to addr2 (REQUEUE, CMP_REQUEUE, CMP_REQUEUE_PI).
std::optional< item::FileDescriptor > new_fd
! new file descriptor (CREATE_FD).
std::optional< item::FutexWakeOperation > wake_op
! instructions for how to perform the wake operation (WAKE_OP).
std::optional< item::Uint32Value > requeue_value
! "val3" used for comparison in CMP_REQUEUE, CMP_REQUEUE_PI.
std::optional< item::GenericPointerValue > bitset
! bitset to restrict wait/wakeup (FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET).
std::optional< item::Uint32Value > wake_count
! number of waiters to wake up (WAKE, REQUEUE, CMP_REQUEUE, WAKE_OP, CMD_REQUEUE_PI).
std::optional< item::Uint32Value > value
! the value expected at futex_addr (WAIT, WAIT_REQUEUE_PI).
void prepareNewSystemCall() override
Perform any necessary actions before processing a new system call entry event.
std::optional< item::TimeSpecParameter > timeout
! optional relative timeout (WAIT) or absolute timeout (WAIT_BITSET, LOCK_PI, LOCK_PI2).
std::optional< item::SuccessResult > result
! success status (all remaining operations).
std::optional< item::SignalNumber > fd_sig
! signal used for asynchronous notifications (CREATE_FD).
std::optional< item::GenericPointerValue > futex2_addr
! "uaddr2" requeue address (REQUEUE, CMP_REQUEUE, CMP_REQUEUE_PI, WAIT_REQUEUE_PI) or additional fute...
bool check2ndPass(const Tracee &) override
Check whether a second pass needs to be made processing parameters.
std::optional< item::ReturnValue > num_woken_up
! number of waiters woken up (WAKE, WAKE_OP).
item::GenericPointerValue address
location where to find a futex the kernel operates on.
item::ThreadIDItem caller_tid
This will always be the TID of the caller.