Sender: vheyndri AT rug DOT ac DOT be Message-Id: <350659E5.1930@rug.ac.be> Date: Wed, 11 Mar 1998 10:31:17 +0100 From: Vik Heyndrickx Mime-Version: 1.0 To: Bill Currie Cc: Eli Zaretskii , djgpp-workers AT delorie DOT com, Charles Sandmann Subject: Re: Temporary files considered unsafe References: <350655E0 DOT A0EFE270 AT taniwha DOT tssc DOT co DOT nz> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk Bill Currie wrote: > > Eli Zaretskii wrote: > > > > On Tue, 10 Mar 1998, Vik Heyndrickx wrote: > > > > > I've thought about STR-ing in the djgpp start-up code > > ^^^^^^^ > > What's that? > > Store Task Register. However, I'm not certain windows uses task > segments. I never thought so far, but you may be right, at least for W95's predecessors. Meaning that the TSS-selector is not a good candidate for a unique pid. So let us forget about that. > AFAICT from the Win3.0 VxD docs, the VMM (the real OS behind > windows, also the DPMI provider) uses the ring 0 stack to hold task > info, though I could easily be wrong. That indeed makes sense for versions up Win3.1 that don't necessarily run 'Enhanced' mode. > My 386/486 programmers guide impiles that STR is > allowed in ring 3 (only LTR isn't). Mine doesn't. Although it isn't really a securite risk to allow that STR instruction to run at CPL=3, so I could believe that. > why not combine the dos psp and the windows vmid (?, can't remember the > correct name, RBIL isn't handy at the moment :(, but I remember seeing a > 2f16xx call to grab it). Sure, you wind up with a 32 bit number, but > that can be expressed in 6 chars (uuencode or related) with the rest (5 > if the extension is used) used for time/counter/whatever. Problem is that the less bits are in the PID the easier it is to squeeze them in a filename (the original reason for the quest for a good PID). When there are 32 bits it may get impossible to combine them with a 'large enough' counter and the current time yielding an eight-character filename. -- \ Vik /-_-_-_-_-_-_/ \___/ Heyndrickx / \ /-_-_-_-_-_-_/