From mboxrd@z Thu Jan 1 00:00:00 1970 From: mindentropy@gmail.com (mindentropy) Date: Mon, 2 May 2011 22:53:27 +0530 Subject: Clarification regarding design of a device. Message-ID: <201105022253.27438.mindentropy@gmail.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi, I have say a crypto device and if I pass a data stream assuming echo "test" > /dev/aes and when I read it I get an encrypted output. Now if a program opens the same device twice should and pass different streams should I differentiate those 2 streams and have encrypted buffers of these 2 streams as output? If yes how should I differentiate it? Or should I not differentiate and provide different devices say aes0,aes1 or should the userspace program worry about locking and sharing of resource? Thanks.