Re: [PATCH v5 16/18] perf: enable reading of files fromdifferent ABI rev

From: David Ahern
Date: Tue Feb 07 2012 - 12:57:39 EST

On 02/07/2012 10:42 AM, Stephane Eranian wrote:
>>> Well, the current code solves the problem once and for all. Old tools
>>> can still read new files and vice-versa. If you think that's a problem I
>>> can simply bail out if sz > our_sz.
>> My sensitivity on this is when endianness is broken it is a nightmare to
>> find. You end up lacing the code with printfs trying to find which size
>> field is going off the charts making the parsing of the file fail - or
>> worse the sizes are slightly off and you get non-sense out.
>> New commands should be able to read old files; old commands reading new
>> files is a bit of a stretch in that the code has to be future-proofed.
>> It seems like a reasonable requirement for data files to be examined by
>> a command of the same vintage or newer as the command that wrote the file.
> Fine then, I can simply strip that part of the code and return an
> error is sz > our_sz.
> How about that?

That's my preference - with a nice grep-able error message about an
unexpected attr size.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at