[<prev] [next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.11.1412022338020.21284@vincent-weaver-1.umelst.maine.edu>
Date: Tue, 2 Dec 2014 23:56:03 -0500 (EST)
From: Vince Weaver <vincent.weaver@...ne.edu>
To: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
cc: Peter Zijlstra <peterz@...radead.org>,
Paul Mackerras <paulus@...ba.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>
Subject: perf: attr backwards compatability issues
So PAPI reshuffled the way it used libpfm4 and ended up inadvertently
setting exclude_guest=1.
This managed to break anyone using the new version of the library (with
a modern verison of the perf_event.h header) on kernels older than 3.2,
with a helpful EINVAL return.
After a lot of false leads this was tracked to the
if (attr->__reserved_1)
return -EINVAL;
line in kernel/events.c (any hope of the better error reporting
happening?)
Anyway, this is completely useless backwards compatability wise.
Shouldn't that return be E2BIG to be consistent with the way that
extensions to the ABI are handled elsewhere in the interface
(i.e. report E2BIG if a formerly unused bit is set to 1)?
Though I guess it's too late to change this behavior now.
I looked to see how perf handles this issue, but I guess conveniently
any new bitfield values are designed in such a way that the perf default
behavior matches up with a zero for the new setting.
Vince
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists