lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1601041523180.3608@macbook-air>
Date:	Mon, 4 Jan 2016 17:19:13 -0500 (EST)
From:	Vince Weaver <vincent.weaver@...ne.edu>
To:	linux-kernel@...r.kernel.org
cc:	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Stephane Eranian <eranian@...il.com>
Subject: perf_event_open() ABI compatability


So I think this might be revisiting an issue that has come up before, but
we're having backward compatability issues with PAPI and libpfm4 and
the perf_event_open() system call.

If a user specifies exclude_guest=1 on an older kernel that doesn't 
support it, we get the awesome EINVAL error return code and it often
takes hours to track down the cause.

Now in theory the ABI is maintained via the "size" field.  So you can
figure out the size of the attr struct by setting an invalid size
and then getting E2BIG with size set to the value the kernel expects.
		
This doesn't help with exclude_guest though, as that's in the giant union
in the middle of the attr, and there's absolutely no mechanism at all
to tell when that has been extended.

Is there any solution to all of this, except having to carry around a big 
table of kernel version numbers for when features were added?

Ideally we would somehow want E2BIG returned plus the size of __reserved_1 
if the value of __reserved_1 is not zero.  I suppose at this point in the 
game it's too late for this to be much help and we're going to have to
work around the problem forever anyway.

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ