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] [day] [month] [year] [list]
Message-Id: <200807112232.43293.david-b@pacbell.net>
Date:	Fri, 11 Jul 2008 22:32:43 -0700
From:	David Brownell <david-b@...bell.net>
To:	Greg KH <greg@...ah.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Michael Buesch <mb@...sch.de>, sfr@...b.auug.org.au,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] gpiolib: Allow user-selection

On Thursday 03 July 2008, Greg KH wrote:
> > The scenario is that gpios sometimes get initialized very early,
> > as part of board setup before kmalloc or irqs work, so when they
> > get registered sometimes there's work left over for later.  All
> > that's needed is a predicate to test whether that class can be
> > used as a parameter to stuff like device_create_drvdata() and
> > sysfs_create_group().
> 
> If you want to see if a class has any devices in it, just do a search
> for any device instead of poking into that field.  Or I can wrap that up
> in the driver core if needed.

That would require taking driver model mutexes before
tasking is working and driver_init() is called.  GPIOs
are regularly used *really* early in board setup ... even
before IRQs are working.

Are driver model searches really expected to work then??

Seems simpler to me to just check "is pointer NULL",
when we know that the pointer is initialized by the
class initialization, and (because the relevant struct
is zero-initialized) null beforehand.  That works more
or less any point during kernel initialization ... not
just after the first task is running.  Plus it's not
as expensive.  :)

- Dave
--
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