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:	Tue, 13 Oct 2009 15:13:53 -0700
From:	David Brownell <david-b@...bell.net>
To:	Ben Nizette <bn@...sdigital.com>
Cc:	Jonathan Corbet <corbet@....net>,
	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	dsilvers@...tec.co.uk
Subject: Re: [PATCH v2] GPIO: Add gpio_lookup

On Tuesday 13 October 2009, Ben Nizette wrote:
> If gpios are going to be named, and it seems they are,

I'm not so sure of that.  Keep in mind that "name" implies, to me,
focussing on name-centric operation, with lookup and browsing.
Neither of those mechanisms is fundamental to what GPIOs solve.

So far I've not seen any use case that can't be addressed within
the current framework, which keys only on numeric IDs.  If we *did*
see such cases appear in real-world scenarios, we could explore
what that means.


> then personally 
> I'd like to see the names field of struct gpio_chip go and a proper
> namespace layer inserted.  Something which allows gpio_name() and
> gpio_lookup() and decentralises that responsibility would be nice (the
> chip could call gpio_name itself if it has reason).  That code could be
> common to all gpio framework implementations.

But why would we need such lookups in the first place?

In-kernel, they are not needed, for either static or dynamic ID
assignment schemes.  Just register the numbers so they're available
as needed.

For userspace, I think gpio_export_link() is the best way to
go ... it scopes the names sanely, so there's no requirement
for driver-provided labels to be globally unique.

- 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