Re: [PATCH V9 05/14] perf tools: tidy up sample parsing overflow checking

From: Namhyung Kim
Date: Wed Aug 07 2013 - 04:09:12 EST


On Mon, 5 Aug 2013 19:26:25 +0300, Adrian Hunter wrote:
> The size of data retrieved from a sample event must be
> validated to ensure it does not go past the end of the
> event. That was being done sporadically and without
> considering integer overflows.

Wouldn't it be great if the macro (or something) can do all three things
together - checking overflow, getting current value (pointer) and
advancing the array to the size? Is that possible?

Thanks,
Namhyung
--
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/