Re: [RFC 2/2] kvm: eventfd: detect integer overflow using check_*_overflow

From: Sasha Levin
Date: Wed Nov 26 2014 - 12:55:35 EST


On 11/26/2014 12:50 PM, Andrey Ryabinin wrote:
> 2014-11-26 17:00 GMT+03:00 Sasha Levin <sasha.levin@xxxxxxxxxx>:
>> > Detect integer overflows using safe operations rather than relying on
>> > undefined behaviour.
>> >
> Unsigned overflow is defined.
> args->addr and args->len both unsigned, so there is no UB here.
>

Good point. Do you think there's an advantage in using GCC's overflow
checker in this case?


Thanks,
Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/