@agl__ Hey, thanks for your work on https://godoc.org/golang.org/x/crypto/nacl/box …. Q: Would it be actually bad to mmap(2) some large files? I believe this would not stress memory usage and I can't see a reason not to do it (except perf-wise)? Would you advise against it? Thx! cc @FiloSottile @jedisct1
-
-
I'm not sure why, though. Chunking means risking a release of a partially valid/partially corrupted document, with difficult situations to backpaddle or unknown impacts. OTOH combining open(2) with O_TMPFILE, mmap(2) and linkat(2) ensures atomic release (except block device read)
-
Creating large ciphertexts _can_ be reasonable, and mmap, O_TMPFILE etc might make it more efficient. The worry comes when smaller systems need to process them. What if they don't have enough buffer space, even on disk? Does that push them towards doing dangerous things?
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.