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: <201103171454.42838.arnd@arndb.de>
Date:	Thu, 17 Mar 2011 14:54:42 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	Waldemar.Rymarkiewicz@...to.com
Cc:	linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] NFC: Driver for Inside Secure MicroRead NFC chip

On Thursday 17 March 2011, Waldemar.Rymarkiewicz@...to.com wrote:
> >This is not very different from opening the file descriptor in 
> >multiple processes, which you prevent using your logic.
> 
> but in the case when two independent applications try to open 
> my device I can't let the second to access. They obviously won't
> synch the access.

My point was that you don't need to worry.
 
> >You can of course argue that you try your best to prevent the 
> >race. Traditionally, e.g. on serial ports and the like, we 
> >don't do this but instead rely on user space synchronizing the 
> >access. What you have to make sure of course is that multiple 
> >threads calling read on the same file can never bring the 
> >kernel driver into an invalid state.
> 
> I assume, if an application shares the file pointer deliberately
> it have to sync the access. In other cases, the driver needs to
> secure it.

As I said, it's not important if you do it and it certainly doesn't
cause harm to prevent multiple open. It's just that generally
we don't care too much about this problem.

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