[LTP] [PATCH] ustat: Fix EFAULT in 32bit compatability mode

Richard Palethorpe rpalethorpe@suse.de
Thu Feb 7 15:38:58 CET 2019


Hello,

Petr Vorel <pvorel@suse.cz> writes:

> Hi Jan,
>
>> > From looking at glibc, this test may also be broken on mips, but I am not
>> > sure
>> > if that matters. AFAICT on all other platforms glibc always casts to uint
>> > after performing a sanity check..
>
>> LGTM, LTP is using only 0 (and -1 for errno tests), so it shouldn't matter.
> I'm sorry I missed your mail, so pushed without your ack.
>
>> What about ustat02? Are you planning on sending something similar for that test?
> It's not needed for ustat02. Is it because *tc[test].dev in ustat02 is
> pointer?

I don't think so, but AFAICT ustat02 is still valid because passing the
wrong data type still has the desired effect of creating an invalid
buffer pointer in the bad address test. On the invalid parameter test,
only the first 32bits of dev are checked before EINVAL is thrown, so
again, it doesn't matter.

So I won't send another patch, but I am not against adding the cast
either.

>
> Kind regards,
> Petr


--
Thank you,
Richard.


More information about the ltp mailing list