On Fri, Aug 18, 2017 at 04:43:57PM +0800, JingPiao Chen wrote:
[...]
> +static bool
> +decode_rtnl_link_ifmap(struct tcb *const tcp,
> + const kernel_ulong_t addr,
> + const unsigned int len,
> + const void *const opaque_data)
> +{
> + struct rtnl_link_ifmap map;
> + unsigned int sizeof_ifmap = sizeof_struct_rtnl_link_ifmap();
> +
> + if (len < sizeof_ifmap)
> + return false;
This would be incompatible with the kernel that implements this differently,
see net/core/rtnetlink.c:rtnl_fill_link_ifmap
struct rtnl_link_ifmap map;
memset(&map, 0, sizeof(map));
...
if (nla_put_64bit(skb, IFLA_MAP, sizeof(map), &map, IFLA_PAD))
...
In other words, this should be something like
const unsigned int sizeof_ifmap = offsetofend(struct rtnl_link_ifmap
map, port);
--
ldv
signature.asc
Description: PGP signature
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________ Strace-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/strace-devel
