Zhibin Li's GSoC status report - #6 of #13

Zhibin Li 08826794brmt at gmail.com
Tue Jun 26 08:49:17 UTC 2018


This week I've finished mpersifying the decoder of struct xfs_dqstats, see
I also added tests quotactl-xfs-success and quotactl-xfs-success-v. This
they could all fetch the struct correctly in multiple personalities and the
And I've discussed a little bit about mpers and attribute packed with eSyr
on IRC.
Besides mpersifying the decoder, I tried just adding ATTRIBUTE_PACKED to
struct fs_qfilestat (see [1]) and then I re-run the tests and they all
I tried to figure out how or why the tests passed considering it will break
alignment on 64 bit.

Before all these changes, quotactl-xfs-success.test failed on tests-m32
the unmpersified decoder tries to fetch struct xfs_dqstats with alignment
on 64 bit
(because the my env is 64 bit) which is 80 bytes. In this specific test
TAIL_ALLOC_OBJECT_CONST_PTR is used so on 32 bit struct fs_quota_stat (it's
a little
confused since it's called xfs_dqstats in quota.c) just gets 68 bytes at
the end of
a mapped memory region, which means fetching 80 bytes will fail with
"strace: umoven: short read (68 < 80)".

After adding ATTRIBUTE_PACKED to struct fs_qfilestat, it seems to be a
that both on 32 and 64 bit struct xfs_dqstats are 72 bytes so fetching it
succeed (I'm not so sure whether it's a coincidence or it's designed in
this way).

Anyway, I realize it's not the right way or at least not a good way to fix

I will continue to revise the code I've wrriten and perhaps I should pay
part of
my attention to other tests, too. I will learn things about net and socket


Zhibin Li
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20180626/79bc9130/attachment.html>

More information about the Strace-devel mailing list