Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions src/record_syscall.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1573,9 +1573,20 @@ template <typename Arch> void prepare_ethtool_ioctl(RecordTask* t, TaskSyscallSt
case ETHTOOL_SFEATURES:
break;
// Expected EINVAL for 'ioctl' but got result 0 (errno SUCCESS); unknown ETHTOOL command 76
case ETHTOOL_GLINKSETTINGS:
// TODO(sodar): Handle it somehow?
case ETHTOOL_GLINKSETTINGS: {
auto buf = t->read_mem(buf_ptr.cast<ethtool_link_settings>(), &ok);
if (ok) {
auto nwords = (
buf.link_mode_masks_nwords > 0 ? buf.link_mode_masks_nwords : -buf.link_mode_masks_nwords
);
auto size = ParamSize(sizeof(buf) + sizeof(buf.link_mode_masks[0]) * nwords);
syscall_state.mem_ptr_parameter(payload, size, IN_OUT);
} else {
syscall_state.expect_errno = EFAULT;
return;
}
break;
}
// Expected EINVAL for 'ioctl' but got result 0 (errno SUCCESS); unknown ETHTOOL command 29
case ETHTOOL_GSTATS:
// TODO(sodar): Handle it somehow?
Expand Down