Re: [PATCH resend] mmc: Added ioctl to let userspace apps send ACMDs

2011-03-23 Thread Arnd Bergmann
On Wednesday 23 March 2011, John Calixto wrote: > > On Wed, 23 Mar 2011, Michał Mirosław wrote: > > When you grant write access to a device to some user, you should > > expect that it is all you are granting. There shouldn't be any hidden > > doors that, for example, if underlying device is SD car

Re: [PATCH resend] mmc: Added ioctl to let userspace apps send ACMDs

2011-03-22 Thread John Calixto
On Wed, 23 Mar 2011, Michał Mirosław wrote: > When you grant write access to a device to some user, you should > expect that it is all you are granting. There shouldn't be any hidden > doors that, for example, if underlying device is SD card then you can > destroy it by this ioctl(). Not counting w

Re: [PATCH resend] mmc: Added ioctl to let userspace apps send ACMDs

2011-03-22 Thread Michał Mirosław
W dniu 22 marca 2011 23:31 użytkownik John Calixto napisał: > On Tue, 22 Mar 2011, Michał Mirosław wrote: >> >> It is not that unusual on "normal systems" to give write access to >> >> some partition or device to unprivileged users. Database volumes are >> >> one example. >> > Are you talking abou

Re: [PATCH resend] mmc: Added ioctl to let userspace apps send ACMDs

2011-03-22 Thread John Calixto
On Tue, 22 Mar 2011, Michał Mirosław wrote: > >> In this case, a process having access to one partition can disrupt > >> other partitions on the same card even if it has no access to them in > >> any other way. > > This is true, but I can already wreak havoc on partitions for any block > > device b

Re: [PATCH resend] mmc: Added ioctl to let userspace apps send ACMDs

2011-03-21 Thread Michał Mirosław
W dniu 21 marca 2011 19:37 użytkownik John Calixto napisał: > On Sat, 19 Mar 2011, Michał Mirosław wrote: >> W dniu 18 marca 2011 20:26 użytkownik Arnd Bergmann napisał: >> > On Friday 18 March 2011 18:56:53 Michał Mirosław wrote: >> >> If that's going to be used by possibly unprivileged userspac

Re: [PATCH resend] mmc: Added ioctl to let userspace apps send ACMDs

2011-03-21 Thread John Calixto
On Sat, 19 Mar 2011, Michał Mirosław wrote: > W dniu 18 marca 2011 20:26 użytkownik Arnd Bergmann napisał: > > On Friday 18 March 2011 18:56:53 Michał Mirosław wrote: > >> If that's going to be used by possibly unprivileged userspace process, > >> then this passthrough should filter and validate a

Re: [PATCH resend] mmc: Added ioctl to let userspace apps send ACMDs

2011-03-19 Thread Arnd Bergmann
On Saturday 19 March 2011, Michał Mirosław wrote: > W dniu 18 marca 2011 20:26 użytkownik Arnd Bergmann napisał: > > On Friday 18 March 2011 18:56:53 Michał Mirosław wrote: > >> If that's going to be used by possibly unprivileged userspace process, > >> then this passthrough should filter and vali

Re: [PATCH resend] mmc: Added ioctl to let userspace apps send ACMDs

2011-03-19 Thread Michał Mirosław
W dniu 18 marca 2011 20:26 użytkownik Arnd Bergmann napisał: > On Friday 18 March 2011 18:56:53 Michał Mirosław wrote: >> If that's going to be used by possibly unprivileged userspace process, >> then this passthrough should filter and validate all commands it >> passes to hardware. If there is a

Re: [PATCH resend] mmc: Added ioctl to let userspace apps send ACMDs

2011-03-19 Thread Chris Ball
Hi, On Sat, Mar 19 2011, Arnd Bergmann wrote: > Chris, do you prefer to leave the new export as EXPORT_SYMBOL > along wiht the others or to use EXPORT_SYMBOL_GPL? Let's just use EXPORT_SYMBOL_GPL() for all new exports, and leave the older ones as they are. Thanks, - Chris. -- Chris Ball <

Re: [PATCH resend] mmc: Added ioctl to let userspace apps send ACMDs

2011-03-19 Thread Arnd Bergmann
On Saturday 19 March 2011, John Calixto wrote: > > > -static int mmc_app_cmd(struct mmc_host *host, struct mmc_card *card) > > > +int mmc_app_cmd(struct mmc_host *host, struct mmc_card *card) > > > { > > > int err; > > > struct mmc_command cmd; > > > @@ -48,6 +48,7 @@ static int m

RE: [PATCH resend] mmc: Added ioctl to let userspace apps send ACMDs

2011-03-18 Thread John Calixto
Hello Arnd, I need some clarification on the last bit of your initial feedback below: On Thu, 17 Mar 2011, Arnd Bergmann wrote: > On Thursday 17 March 2011 19:28:55 John Calixto wrote: > > diff --git a/drivers/mmc/core/sd_ops.c b/drivers/mmc/core/sd_ops.c > > index 797cdb5..0453dcd 100644 > >

Re: [PATCH resend] mmc: Added ioctl to let userspace apps send ACMDs

2011-03-18 Thread Arnd Bergmann
On Friday 18 March 2011 18:56:53 Michał Mirosław wrote: > If that's going to be used by possibly unprivileged userspace process, > then this passthrough should filter and validate all commands it > passes to hardware. If there is a possibility of some command sequence > to generate undefined or oth

Re: [PATCH resend] mmc: Added ioctl to let userspace apps send ACMDs

2011-03-18 Thread Arnd Bergmann
On Friday 18 March 2011 18:32:41 John Calixto wrote: > I started down that route, but part of the problem with putting any more > than a simple passthrough in kernel space is that the CPRM algorithms > live in the next highest logic layer, and 4C licensees are not allowed > to reveal those algorith

Re: [PATCH resend] mmc: Added ioctl to let userspace apps send ACMDs

2011-03-18 Thread Michał Mirosław
2011/3/18 John Calixto : >> -Original Message- >> From: Arnd Bergmann [mailto:a...@arndb.de] >> Sent: Thursday, March 17, 2011 2:56 PM >> To: John Calixto >> Cc: linux-mmc@vger.kernel.org; c...@laptop.org >> Subject: Re: [PATCH resend] mmc: Added io

RE: [PATCH resend] mmc: Added ioctl to let userspace apps send ACMDs

2011-03-18 Thread John Calixto
Hello Arnd, > -Original Message- > From: Arnd Bergmann [mailto:a...@arndb.de] > Sent: Thursday, March 17, 2011 2:56 PM > To: John Calixto > Cc: linux-mmc@vger.kernel.org; c...@laptop.org > Subject: Re: [PATCH resend] mmc: Added ioctl to let userspace apps send ACMDs

Re: [PATCH resend] mmc: Added ioctl to let userspace apps send ACMDs

2011-03-17 Thread Arnd Bergmann
On Thursday 17 March 2011 19:28:55 John Calixto wrote: > Part 3 of the SD Specification (SD Card Association; www.sdcard.org) describes > how to use the security function of an SD card using application specific > commands in conjunction with CPRM algorithms and keys licensed from the 4C > Entity (

Re: [PATCH resend] mmc: Added ioctl to let userspace apps send ACMDs

2011-03-17 Thread Ben Dooks
On Thu, Mar 17, 2011 at 11:28:55AM -0700, John Calixto wrote: > Part 3 of the SD Specification (SD Card Association; www.sdcard.org) describes > how to use the security function of an SD card using application specific > commands in conjunction with CPRM algorithms and keys licensed from the 4C > E