Port-i386 archive

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

Re: segment registers in struct trapframe



Hi,

David Laight wrote:
'struct trapframe' (sys/arch/i386/include/frame.h) currently uses 'int'
for all the fields.

This is a problem for the segment registers where the asm code only
writes 16 bits - leaving the high bits unchanged.

The kernel doesn't care it will only load the low bits, however the
values get passed to userspace (eg to signal handlers) where the
high bits are distracting at best.

The following patch make all the copies 16bit (without affecting binary
conpatibility anywhere).

Does this mean, we are passing uninitialized memory to userland, i.e.
some unknwon values from the kernel (or from another user process)?
IMHO, that's in an urgent need for a fix.

Ciao,
Wolfgang
--
Wolfgang%Solfrank.net@localhost                         Wolfgang Solfrank


Home | Main Index | Thread Index | Old Index