public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* fopen mode for buffer clearing
@ 2017-04-13  9:41 Florian Weimer
  2017-04-13 17:28 ` Adhemerval Zanella
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Weimer @ 2017-04-13  9:41 UTC (permalink / raw)
  To: GNU C Library

We used to use mmap for the internal FILE * buffer.  This had the side 
effect that after fclose, the data in the buffer may not be gone from 
the system as a whole, but it will definitely not be part of the address 
space of the process anymore.  This is desirable if the stdio stream 
functions are used to process sensitive data because it reduces the risk 
of leaks.

Would it make sense to add an fopen mode flag to indicate that the 
implementation should clear the buffer (with explicit_bzero) before 
deallocating it?  This would also apply to reallocating buffers in getline.

Thanks,
Florian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-13 17:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-13  9:41 fopen mode for buffer clearing Florian Weimer
2017-04-13 17:28 ` Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).