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]
Date:	Mon, 10 Mar 2008 10:20:02 -0700
From:	Greg KH <gregkh@...e.de>
To:	Mikael Pettersson <mikpe@...uu.se>
Cc:	Balaji Rao <balajirrao@...il.com>, kvm-devel@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Mark kobjects as unitialized

On Sun, Mar 09, 2008 at 11:49:26AM +0100, Mikael Pettersson wrote:
> Balaji Rao writes:
>  > Yes the idea works. One more memset is needed in sysdev_register. Here's the final patch.
>  > 
>  > diff --git a/drivers/base/sys.c b/drivers/base/sys.c
>  > index 2f79c55..7c839d9 100644
>  > --- a/drivers/base/sys.c
>  > +++ b/drivers/base/sys.c
>  > @@ -133,6 +133,7 @@ int sysdev_class_register(struct sysdev_class * cls)
>  >         pr_debug("Registering sysdev class '%s'\n",
>  >                  kobject_name(&cls->kset.kobj));
>  >         INIT_LIST_HEAD(&cls->drivers);
>  > +       memset(&cls->kset.kobj, 0x00, sizeof(struct kobject));
>  >         cls->kset.kobj.parent = &system_kset->kobj;
>  >         cls->kset.kobj.ktype = &ktype_sysdev_class;
>  >         cls->kset.kobj.kset = system_kset;
>  > @@ -227,6 +228,7 @@ int sysdev_register(struct sys_device * sysdev)
>  >  
>  >         pr_debug("Registering sys device '%s'\n", kobject_name(&sysdev->kobj));
>  >  
>  > +       memset(&sysdev->kobj, 0x00, sizeof(struct kobject));
>  >         /* Make sure the kset is set */
>  >         sysdev->kobj.kset = &cls->kset;
>  > 
> 
> Thanks, 2.6.25-rc4 + these two memset()s is finally stable for
> me with no warnings, BUG()s, or panics.
> 
> (However, the patch is whitespace damaged with initial tabs
> converted to spaces.)
> 
> If you want to pass this on to Linus, you can add a
> 
> Tested-by: Mikael Pettersson <mikpe@...uu.se>

Thanks for testing.

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