Subject: various COMPAT_LINUX fixes for amd64
To: None <>
From: Emmanuel Dreyfus <>
List: current-users
Date: 06/25/2006 18:23:11

With the help of Nicolas Joly, I fixed several bugs in COMPAT_LINUX and
COMPAT_LINUX32 for amd64, including serious ones. I'd be interested in
regressions reports, and success stories as well :-)

From the commit log:

- Complete exit_group() implementation. We now maintain a list of Linux
threads in a processes and kill them properly. The code is a bit too
complicated, but I could not find a simplier way of dealing with it

- Change getpid() and getppid() semantics to match what Linux does,
and implement gettid(). In the Linux kernel, threads are implemnted
as plain old processes. A thread group is just a set of processes,
with the parent called leader. Thread ID, which are returned by
are just the PID of the plain old processes, and getpid() returns the
PID of the thread group leader.

- Remove struct linux32_emuldata. COMPAT_LINUX32 uses a lot of
code, where a struct linux_emuldata is assumed. By having distinct
structure with different sizes and layouts, we caused kernel memory

- Fix setprioriry() and getpriority()

Emmanuel Dreyfus