https://bugs.kde.org/show_bug.cgi?id=509567

--- Comment #2 from Mark Wielaard <[email protected]> ---
(In reply to mcermak from comment #1)
> Created attachment 185009 [details]
> proposed patch

It looks like the new syscall number is 443 for all linux arches, so maybe it
can be defined once in include/vki/vki-scnums-shared-linux.h ?

> +PRE(sys_quotactl_fd)
> +{
> +   PRINT("sys_quotactl (0x%" FMT_REGWORD "x, 0x%#" FMT_REGWORD "x, 0x%"
> +         FMT_REGWORD "x, 0x%" FMT_REGWORD "x )", ARG1, ARG2, ARG3, ARG4);
> +   PRE_REG_READ4(long, "quotactl_fd",
> +                 unsigned int, cmd, unsigned int, cmd, vki_qid_t, id,
> +                 void *, addr);
> +}

The first argument is a file descriptor which we normally check specially so no
valgrind internal file descriptor are used and to track file descriptors with
--track-fds. Something like:

   if (!ML_(fd_allowed)(ARG1, "quotactl_fd", tid, False))
      SET_STATUS_Failure( VKI_EBADF );

Checking of the addr argument is a little tricky. Depending on the cmd it can
point to various things of different sizes (or be totally ignored).
It might require a POST handler if some datastructure is set by the syscall. It
looks like the quotactl wrapper also doesn't handle the addr pointer. They
should be handled similarly so. You could do this as a followup bug/patch. If
you decide not to handle it now then please file a bug report so we won't
forget.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to