lkml.org 
[lkml]   [2013]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH V9 05/14] perf tools: tidy up sample parsing overflow checking
Date
On Wed, 07 Aug 2013 11:19:32 +0300, Adrian Hunter wrote:
> On 07/08/13 11:09, Namhyung Kim wrote:
>> 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?
>
> Macros are not the answer to everything.

Right.

But I was seeing repeating patterns of the three.. so I asked if there's
a better alternative.

Thanks,
Namhyung


\
 
 \ /
  Last update: 2013-08-07 11:21    [W:0.063 / U:0.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site