Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964925AbXAHV6j (ORCPT ); Mon, 8 Jan 2007 16:58:39 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964916AbXAHV6j (ORCPT ); Mon, 8 Jan 2007 16:58:39 -0500 Received: from ug-out-1314.google.com ([66.249.92.174]:55409 "EHLO ug-out-1314.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964910AbXAHV6i (ORCPT ); Mon, 8 Jan 2007 16:58:38 -0500 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:references:mime-version:content-type:content-disposition:in-reply-to:user-agent:sender; b=XiqhMOZMlv+9qn7J2RrQBQVUcg/zmXqNDaglYd8sLn5X+AjLi29uXwQM54kGdhH2KJ2qBh9CwZ0/WBwz1Qqab+qhC2S1VDY0oMZFHh+XJaFSkbAqEYk9oNImC8xHr8kbZMwV71wXMNBv4iPSrnGm3gc4+EE72Efhl967yaEZOeg= Date: Mon, 8 Jan 2007 21:56:32 +0000 From: Frederik Deweerdt To: Greg KH Cc: Christoph Hellwig , akpm@osdl.org, linux-kernel@vger.kernel.org, haveblue@us.ibm.com Subject: Re: kobject.c changes in -mm Message-ID: <20070108215632.GD15292@slug> References: <20070108133747.GA19692@infradead.org> <20070108190942.GA23629@suse.de> <20070108192507.GC15292@slug> <20070108203156.GA26919@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070108203156.GA26919@suse.de> User-Agent: mutt-ng/devel-r804 (Linux) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2617 Lines: 63 On Mon, Jan 08, 2007 at 12:31:56PM -0800, Greg KH wrote: > On Mon, Jan 08, 2007 at 07:25:07PM +0000, Frederik Deweerdt wrote: > > On Mon, Jan 08, 2007 at 11:09:42AM -0800, Greg KH wrote: > > > On Mon, Jan 08, 2007 at 01:37:47PM +0000, Christoph Hellwig wrote: > > > > --- linux-2.6.20-rc3/lib/kobject.c 2007-01-01 23:04:49.000000000 -0800 > > > > +++ devel/lib/kobject.c 2007-01-04 21:13:21.000000000 -0800 > > > > @@ -15,6 +15,8 @@ > > > > #include > > > > #include > > > > #include > > > > +#include > > > > +#include > > > > > > > > +#ifdef CONFIG_X86_32 > > > > +static int ptr_in_range(void *ptr, void *start, void *end) > > > > +{ > > > > + /* > > > > + * This should hopefully get rid of causing warnings > > > > + * if the architecture did not set one of the section > > > > + * variables up. > > > > + */ > > > > + if (start >= end) > > > > + return 0; > > > > + > > > > + if ((ptr >= start) && (ptr < end)) > > > > + return 1; > > > > + return 0; > > > > +} > > > > > > > > > > > > Can anyone explain WTF is going on here? Including asm-generic headers > > > > in core code definitly is not okay. As are random CONFIG_X86_32 ifdefs > > > > in said code. > > > > > > It's a hack for debugging. See the full patch at: > > > http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/driver/warn-when-statically-allocated-kobjects-are-used.patch > > > > > > It is never going to go to mainline, due to the arch-specific hacks as > > > you have noted. But is good to have for debugging and getting error > > > reports from users of -mm. > > > > > Could a CONFIG_{MM,HACK} option be added for this kind of hacks? It could > > help clarify what the aim of the code is. > > How would that help here? I don't think we want to #ifdef all patches > in the -mm tree that are of this type, that would be a bit nasty. I see how this would be messy, but this could help advertising the fact that the patch is not going to mainline, if only because mainline wouldn't have that CONFIG_HACK thing. Another alternative would a mm-only- prefix to the name of the patches, a simple grep in broken-out would the be enough... Regards, Frederik > thanks, > > greg k-h > - 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/