From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753384AbbEHOin (ORCPT ); Fri, 8 May 2015 10:38:43 -0400 Received: from mga14.intel.com ([192.55.52.115]:25083 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751117AbbEHOij (ORCPT ); Fri, 8 May 2015 10:38:39 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,391,1427785200"; d="scan'208";a="568395325" Message-ID: <554CCA6C.50401@linux.intel.com> Date: Fri, 08 May 2015 15:38:36 +0100 From: Tvrtko Ursulin Organization: Intel Corporation UK Plc User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Peter Zijlstra CC: Tejun Heo , linux-kernel@vger.kernel.org, Ingo Molnar , Greg Kroah-Hartman , NeilBrown Subject: Re: pmu_dev_alloc; warning at at kernel/locking/lockdep.c:3002 lockdep_init_map References: <554B6E78.2090608@linux.intel.com> <20150507140557.GV21418@twins.programming.kicks-ass.net> <20150507162523.GB12245@htj.duckdns.org> <554B9305.301@linux.intel.com> <20150507170626.GA27504@twins.programming.kicks-ass.net> <20150507172905.GE16478@twins.programming.kicks-ass.net> In-Reply-To: <20150507172905.GE16478@twins.programming.kicks-ass.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/07/2015 06:29 PM, Peter Zijlstra wrote: > On Thu, May 07, 2015 at 07:06:26PM +0200, Peter Zijlstra wrote: >> On Thu, May 07, 2015 at 05:29:57PM +0100, Tvrtko Ursulin wrote: >>>>>> May 7 11:58:20 skl kernel: [ 6.066696] futex hash table entries: 1024 (order: 5, 131072 bytes) >> >>>>>> May 7 11:58:20 skl kernel: [ 6.329549] HugeTLB registered 2 MB page size, pre-allocated 0 pages >> >> >>>> sysfs by default uses lockdep key embedded in attrs. It looks like >>>> somebody is making on-heap copies of attrs and using them as the group >>>> attrs. What's the offending pmu type? >>> >>> I am not familiar with this area, is this the answer? >> >> Nope, that's way before you get the fail. initcall_debug might get you >> the right answer, but I suspect its the intel_uncore driver. >> >> I see arch/x86/kernel/cpu/perf_event_intel_uncore.c:uncore_type_init() >> do exactly what TJ says, its dynamically allocating struct attribute. >> >> Now, let me try and trigger that locally, that should not be skylake >> specific at all. > > 4.1-rc2+ with lockdep enabled boots without issue on my ivb-ep, no idea > what's going on on your skylake thingy. Managed to debug it is the intel_pt driver which fails. Which if I see correctly is passing in attr_groups from the data section which should be OK. So I don't know either.. reported offending address is somewhere, terabytes away, before start of kernel. Regards, Tvrtko