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

Re: Bug#903815: ITP: pw -- A simple command-line password manager



On Thu, 2018-07-19 at 06:16 +0200, Tollef Fog Heen wrote:
> ]] Michael Stone 
> 
> > On Mon, Jul 16, 2018 at 03:14:20PM +0200, Dashamir Hoxha wrote:
> > > It writes to `/dev/shm` which is not disk.
> > 
> > All else that's been said aside, this idea is also dangerously
> > incorrect in a typical configuration: the tmpfs backend will write to
> > swap under memory pressure. (This is also true of the memory used by
> > the process; if it's actually important to keep data from being
> > written to persistent storage, it should be set unswappable using
> > mlock. I have no idea how one would do this effectively in a shell
> > script.)
> 
> Assuming it's small enough, using a pipe (or possibly a FIFO) could
> work.  That's kernel memory and iirc it won't be swapped out.  (I'm
> happy to be corrected on this, I'm basing it on what I've heard before
> and my recollection of it.)

This is true on Linux.  Kernel memory is not swappable.  But data in
the pipe must be written from and read out to swappable process memory,
so using a pipe doesn't solve the problem completely.

Ben.

-- 
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
                                                         - Albert Camus

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: