tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: updating COMPAT_LINUX for linux 2.6.x support (take 2)
hi again,
ok, I think I'm finally done with this.
changes since the previous version include:
- I redid the %fs/%gs handling on amd64 so that we always keep the user values
loaded (though the kernel curcpu pointer is in the GS.base MSR via swapgs),
and that fixed the problem with needing to reload %gs on return to user mode.
I also moved more x86 fiddly bits out of the linux code into native.
there's still more that could be moved, but this is enough for now.
- there's now ucas_*() for arm, m68k and mips via kernel RAS
(or real atomic ops on mips if the configuration allows).
I also fixed the amd64 and hppa versions to actually work.
- all this stuff now works under XEN.
- I noticed a couple of existing bugs that would allow an application
to crash the system:
- the assembler apparently now uses a different opcode for reloading %gs
than it used to, so the check for this instruction in INTRFASTEXIT
being the cause of a kernel trap wasn't working. I fixed the check
to match the current generated code.
- the amd64/netbsd32 code was not checking that the %cs value passed
to sigreturn() or setcontext() was a user-mode selector.
I added checks for this too.
the latest diff is at:
ftp://ftp.netbsd.org/pub/NetBSD/misc/chs/linux/diff.linux-nptl-take2.45
I'll check all this in in a few days if there are no more comments.
-Chuck
Home |
Main Index |
Thread Index |
Old Index