tech-userlevel archive

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

Re: db(3) removal and lastlogx



On Tue, Jun 12, 2012 at 02:25:42AM +0000, YAMAMOTO Takashi wrote:
> hi,
> 
> > Considering lastlogx, it seems like the db(3) use provides an
> > interesting DOS vector. If I run login and SIGSTOP it after it opened
> > the file with exclusive log, but before it finished writting the entry,
> > it should provide other instances from doing the same. In other words,
> > we really want to have a file format that works without any exclusive
> > lock on the (database) file.
> 
> does your proprosed format work without locks?

Variant 1 (sparse file) yes. The others could be made to work using CAS
and mmap, but would leak space in the race case for initial inserts.

Joerg


Home | Main Index | Thread Index | Old Index