Re: [axtls-general] reading and writing from different threads
Brought to you by:
cameronrich
From: Cameron R. <cam...@gm...> - 2012-05-25 11:17:35
|
Hi Arunkumar, axTLS is guaranteed to be thread safe if multiple SSL contexts are used. However parallel calls to ssl_read() and ssl_write() were never considered as the buffers they use are the same to save memory. So locking is the next step, and I've never really had the need for this, as axTLS was never designed for high performance I/O. I think this might be non-trivial to do as the code changes could be quite invasive. I have the same problem with non-blocking ssl_read/ssl_write calls - axTLS can be made to be almost non-blocking but in some cases it will. High performance has been sacrificed for code/memory size. But feel free to write a patch and I'll see what I can do. Cheers, Cam Arunkumar Dhananjayn wrote: > Hi All, > > We are using axTLS in our embedded project and need to perform > ssl_write() and ssl_read() from different threads. But Valgrind tool > reported a race condition on the ssl->flag and ssl->bm_data fields. On > further investigation it looks like, the code was not written to support > performing read and write operations simultaneously. > > Can anyone confirm this? How much of a priority is this to other developers? > > We are planning to perform crude locking so that only read of write > happens at a time, although I think it should be possible to do it > without a lock if the fields used for write and read operations are > separated. Is anyone interested in the changes? > > thanks, > arun > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > axtls-general mailing list > axt...@li... > https://lists.sourceforge.net/lists/listinfo/axtls-general > > |