Subject: Re: svr4 compat on 1.5X Aug 29
To: None <port-i386@netbsd.org>
From: MOCHIDA Shuji <mochid@netside.co.jp>
List: port-i386
Date: 09/26/2001 10:34:30
>> Netscape 4.75 for Solaris x86 (navigator-v475-us.x86-sun-solaris2.5.1.tar.gz)
>> make kernel drop into debugger. The kernel compiled from "current" source 
>> supped at yesterday. On 1.5.1 kernel, 1.5W supped at Jun 5 kernel both 
>> netscape works without problem, no "unknown svr4 fast trap 2" line appears.

> Fast trap 2 is "set emulated floating point context" which we don't implement.
> I wonder what broke and you are getting this.

 I compiled many kernels, and found that 'cvs update -D 2001-06-18' one
works good, 'cvs update -D "2001-06-18 10:00"' one does not. I can't tell
the cause exactly, but it seems that is related to the change:

    http://mail-index.netbsd.org/source-changes/2001/06/18/0000.html


| Committed By:   sommerfeld
| Date:           Sun Jun 17 21:01:39 UTC 2001
| 
| Modified Files:
|         syssrc/sys/arch/i386/i386: compat_13_machdep.c db_interface.c
|             db_trace.c genassym.cf ibcs2_machdep.c ibcs2_sigcode.s ipkdb_glue.c
|             kgdb_machdep.c linux_sigcode.s locore.s machdep.c process_machdep.c
|             svr4_machdep.c svr4_sigcode.s sys_machdep.c trap.c
|         syssrc/sys/arch/i386/include: db_machdep.h frame.h pcb.h
|         syssrc/sys/compat/linux/arch/i386: linux_machdep.c
| 
| Log Message:
| Add %fs/%gs to trap frame and save/restore them on
| trap/interrupt/syscall entry from userspace.
| 
| Remove special-case "by hand" validation of fs/gs register values as
| well as special handling of them in various signal handling paths.
| 
| Now, like %ds and %es, they are validated by the hardware on return to
| userland.
| 
| This paves the way for the use of %fs for per-cpu data on
| multiprocessor systems, and fixes an otherwise difficult-to-fix
| interaction between threads/clone(2) and USER_LDT.
| 
| Discussed in advance with Frank van der Linden.


>> % netscape -display xxx:0
>> unknown svr4 fast trap 2
>> unknown svr4 fast trap 2
>> uknknown svr4 faste trap 2
>> rnel: type 1216652891 trap, code=0
>> Stopped in pid 295 (netscape) at             0x296:     invalid address
>> db> t
>> param.c(867a118,867a018,0,0,ffffffff) at      0x296
>> Bad user frame pointer: 0x867a090
>> db> ps
>>  PID             PPID       PGRP        UID S   FLAGS          COMMAND    WAIT
>>  298              295        295       7011 3  0x4086         netscape  select
>> >295              282        295       7011 7  0x4006         netscape
>>  285                1        285          0 3  0x4086            getty   ttyin


-mochid