Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752662Ab3IRPmh (ORCPT ); Wed, 18 Sep 2013 11:42:37 -0400 Received: from merlin.infradead.org ([205.233.59.134]:47855 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751635Ab3IRPmg (ORCPT ); Wed, 18 Sep 2013 11:42:36 -0400 Date: Wed, 18 Sep 2013 17:42:24 +0200 From: Peter Zijlstra To: Vince Weaver Cc: mingo@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org, adrian.hunter@intel.com, tglx@linutronix.de, linux-tip-commits@vger.kernel.org, eranian@googlemail.com Subject: Re: [tip:perf/core] perf: Fix broken union in ' struct perf_event_mmap_page' Message-ID: <20130918154224.GK9326@twins.programming.kicks-ass.net> References: <1372425741-1676-2-git-send-email-adrian.hunter@intel.com> <20130918085722.GL12926@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 933 Lines: 28 On Wed, Sep 18, 2013 at 10:19:32AM -0400, Vince Weaver wrote: > Can you point to any code that is fixed by the commit? I have some, but I don't think a lot of people use it. Would you be ok with something like the below? It should preserve functionality for code that only cares about cap_usr_rdpmc (PAPI). Stephane, does libpfm use any of these? --- a/include/uapi/linux/perf_event.h +++ b/include/uapi/linux/perf_event.h @@ -380,8 +380,8 @@ struct perf_event_mmap_page { union { __u64 capabilities; struct { - __u64 cap_usr_time : 1, - cap_usr_rdpmc : 1, + __u64 cap_usr_rdpmc : 1, + cap_usr_time : 1, cap_usr_time_zero : 1, cap_____res : 61; }; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/