[RFC PATCH v3 2/3] drm: implement decoding of DRM ioctls

Zhibin Li haoyouab at gmail.com
Thu Aug 1 16:06:26 UTC 2019


On Mon, Jul 29, 2019 at 9:58 AM Eugene Syromiatnikov <esyr at redhat.com>
wrote:

>
> > +# include "xlat/drm_stat_type.h"
> > +
> > +static int
> > +drm_get_stats(struct tcb *const tcp, const kernel_ulong_t arg)
> > +{
> > +     struct_drm_stats stats;
> > +
> > +     if (exiting(tcp)) {
> > +             tprints(", ");
> > +             if (umove_or_printaddr(tcp, arg, &stats))
> > +                     return RVAL_IOCTL_DECODED;
> > +             PRINT_FIELD_U("{", stats, count);
> > +             tprints(", data=[");
> > +
>
> > +             for (unsigned int i = 0; i < 15; i++) {
> Why is "15" hard-coded?
>
> Also, it seems that it should go up to "count".
>

I just found that in kernel commit v3.12-rc1~61^2~98, GET_STATS
was no-oped out and there is a explanation about it. Do we have to
support decoding of this one? (Some other ioctls may come across
similar situations, how do we choose which is the oldest version to
support?)

>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20190802/1b091f57/attachment.html>


More information about the Strace-devel mailing list