Hello,

I've just committed a whole bunch of bugfixes to CVS.  Everyone who was
experiencing crashes recently, could you please try again with this
version?

The bugs in detail:

 - The trick of defining special symbols via a linker script to retrieve
   the module virtual address range broke badly under certain combinations
   of kernel / insmod versions, causing all kinds of strange effects.

   I've now completely removed this hack, and instead get the module
   address range by querying the corresponding kernel structure (the
   __this_module structure) in kernels >= 2.1.18, and using a hack in
   earlier kernels (the symbol mod_use_count_ is guaranteed to point
   to the start of the module, and the end of the module is guaranteed
   to be the first virtual address greater than the start where there
   is no physical page mapped ...).

   Thanks to Oleg Drokin for helping to debug this problem.


 - Returning to process pending signals didn't always work correctly;
   on a 2.2.5 kernel, our pending_signals() routine caused strange 
   effects, and the return value of -ERESTARTSYS appears not to be 
   understood by some libc versions.  Thus, I've switched to using
   the Linux standard current_got_fatal_signal() routine for the test
   (this is available on all interesting kernel versions), and return
   directly -EINTR, which appears to always work ...

   If anyone knows what's up with the ERESTARTSYS/EINTR mixup, 
   please let me know.


 - Setting tss->io to 0 does *not* disallow I/O port access! Instead,
   the tss structure is itself used as I/O permission bitmap, and 
   depending on the values of some of the fields, critical system ports
   are accessible by the guest.  This caused the timer hardware to
   get into strange states after running the preemptive kernel, which 
   I only managed to fix by a reboot :-/

   The fix is to set tss->io to some value greater than the TSS limit.


 - The NT flag hack (necessary for proper IRET simulation) was missing
   from the preemptive kernel.


 - Some symbols in nexus.S were not defined as .globl, although they were
   accessed from within monitor.c  (apparently, some broken insmod versions
   resolve those symbols anyway!).

   Thanks to Julian Hall for pointing this out.
 

With those fixes in place, I'm able to run all three guests on both
of my systems (Linux 2.0.36 and Linux 2.2.5); the preemptive kernel
aborts on a not yet implemented 'out' instruction.  Please let me know
whether it works for you! 

Bye,
Ulrich

-- 
  Ulrich Weigand,
  IMMD 1, Universitaet Erlangen-Nuernberg,
  Martensstr. 3, D-91058 Erlangen, Phone: +49 9131 85-7688

Reply via email to