Re: Clarification regarding design of a device.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi...

On Tue, May 3, 2011 at 00:23, mindentropy <mindentropy@xxxxxxxxx> wrote:
> 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?

I am not keen regarding char/block device management, but I think you
should separate those streams.

How? Well, same thing like you open a same file twice, right? You're
given two different file descriptor. After all, the "open", "read" and
"write" handler of device IMHO always assume that we wanna achieve
such different stream, right?

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux