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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070108190942.GA23629@suse.de>
Date:	Mon, 8 Jan 2007 11:09:42 -0800
From:	Greg KH <gregkh@...e.de>
To:	Christoph Hellwig <hch@...radead.org>, akpm@...l.org,
	linux-kernel@...r.kernel.org
Cc:	haveblue@...ibm.com
Subject: Re: kobject.c changes in -mm

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 <linux/module.h>
>  #include <linux/stat.h>
>  #include <linux/slab.h>
> +#include <linux/kallsyms.h>
> +#include <asm-generic/sections.h>
> 
> +#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.

thanks,

greg k-h
-
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