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: <20090612202334.62c032ac@mycelium.queued.net>
Date:	Fri, 12 Jun 2009 20:23:34 -0400
From:	Andres Salomon <dilinger@...labora.co.uk>
To:	Tobias_Mueller@...m.info
Cc:	akpm@...ux-foundation.org, Randy Dunlap <randy.dunlap@...cle.com>,
	deepak@...top.org, Takashi Iwai <tiwai@...e.de>,
	linux-kernel@...r.kernel.org, linux-geode@...ts.infradead.org,
	jordan@...micpenguin.net, cjb@...top.org,
	David Brownell <david-b@...bell.net>
Subject: Re: [PATCH 1/2] cs5535-gpio: add AMD CS5535/CS5536 GPIO driver  
 support

On Thu, 11 Jun 2009 23:35:55 +0200
Tobias Müller <Tobias_Mueller@...m.info> wrote:

> >> /**
> >> * Some GPIO pins
> >> *  31-29,23 : reserved (always mask out)
> >> *  28       : Power Button
> >> *  26       : PME#
> >> *  22-16    : LPC
> >> *  14,15    : SMBus
> >> *  9,8      : UART1
> >> *  7        : PCI INTB
> >> *  3,4      : UART2/DDC
> >> *  2        : IDE_IRQ0
> >> *  1        : AC_BEEP
> >> *  0        : PCI INTA
> >> *
> >> * If a mask was not specified, be conservative and only allow:
> >> *  1,2,5,6,10-13,24,25,27
> >> */
> >>
> >> I'll add this in my patch to clear it out.
> >>
> >
> > But why are you being conservative in the first place?  If
> > something's using GPIOs, unless they're unmapped, you should allow
> > it to use them without requiring a boot arg.
> >
> > For example, OLPC uses GPIO 7 for its DCON IRQ.  With the masking
> > scheme, OLPC will need to set that mask from the default.  I don't
> > see the point of having the mask at all if other drivers in the
> > kernel are going to be requesting GPIOs (presumably they know what
> > they're doing).
> Hmm... OK, this makes sense. So default mask allow everything exept
> reserved pins and pin 28 (power button).
> 
> I think the mask is quite useful if you've critical things on GPIO
> pins and they should be changeable (especially from userspace and when
> non-root users are allowed to use userspace gpio).

I agree that it would be useful for userspace, just not for
kernelspace.  Is there a way that you can have it only enforce the
mask if the request is coming from userspace?
--
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