<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/compat/linux/linux_emul.c, branch releng/7.3</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>Merge r191269 from HEAD to stable/7:</title>
<updated>2009-05-25T14:36:21+00:00</updated>
<author>
<name>Dmitry Chagin</name>
<email>dchagin@FreeBSD.org</email>
</author>
<published>2009-05-25T14:36:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ec54525f084ea191cf988d76b88650e8a1b3fb8a'/>
<id>ec54525f084ea191cf988d76b88650e8a1b3fb8a</id>
<content type='text'>
Remove support for FUTEX_REQUEUE operation.
Glibc does not use this operation since 2.3.3 version (Jun 2004),
as it is racy and replaced by FUTEX_CMP_REQUEUE operation.
Glibc versions prior to 2.3.3 fall back to FUTEX_WAKE when
FUTEX_REQUEUE returned EINVAL.

Any application directly using FUTEX_REQUEUE without return
value checking are definitely broken.

Limit quantity of messages per process about unsupported
operation.

Approved by:	kib(mentor)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove support for FUTEX_REQUEUE operation.
Glibc does not use this operation since 2.3.3 version (Jun 2004),
as it is racy and replaced by FUTEX_CMP_REQUEUE operation.
Glibc versions prior to 2.3.3 fall back to FUTEX_WAKE when
FUTEX_REQUEUE returned EINVAL.

Any application directly using FUTEX_REQUEUE without return
value checking are definitely broken.

Limit quantity of messages per process about unsupported
operation.

Approved by:	kib(mentor)
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge from HEAD to stable/7:</title>
<updated>2009-05-05T14:53:58+00:00</updated>
<author>
<name>Dmitry Chagin</name>
<email>dchagin@FreeBSD.org</email>
</author>
<published>2009-05-05T14:53:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7a57d7ffe816b0fe0347ab9d72820bfb56d04992'/>
<id>7a57d7ffe816b0fe0347ab9d72820bfb56d04992</id>
<content type='text'>
r178976 (rdivacky):
Implement robust futexes. Most of the code is modelled after
what Linux does. This is because robust futexes are mostly
userspace thing which we cannot alter. Two syscalls maintain
pointer to userspace list and when process exits a routine
walks this list waking up processes sleeping on futexes
from that list.

r183871:
Make robust futexes work on linux32/amd64. Use PTRIN to read
user-mode pointers. Change types used in the structures definitions to
properly-sized architecture-specific types.

r185002:
In the robust futexes list head, futex_offset shall be signed,
and glibc actually supplies negative offsets. Change l_ulong to l_long.

Approved by:	kib (mentor)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
r178976 (rdivacky):
Implement robust futexes. Most of the code is modelled after
what Linux does. This is because robust futexes are mostly
userspace thing which we cannot alter. Two syscalls maintain
pointer to userspace list and when process exits a routine
walks this list waking up processes sleeping on futexes
from that list.

r183871:
Make robust futexes work on linux32/amd64. Use PTRIN to read
user-mode pointers. Change types used in the structures definitions to
properly-sized architecture-specific types.

r185002:
In the robust futexes list head, futex_offset shall be signed,
and glibc actually supplies negative offsets. Change l_ulong to l_long.

Approved by:	kib (mentor)
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC r184501:</title>
<updated>2008-11-13T15:00:40+00:00</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2008-11-13T15:00:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=351c97541f3784d463fb661afe0e375bb4ba3e5f'/>
<id>351c97541f3784d463fb661afe0e375bb4ba3e5f</id>
<content type='text'>
The code in linux_proc_exit() contains a race when multiple linux based
processes exits at the same time. The linux_emuldata structure is freed
but p-&gt;p_emuldata is left as a dangling pointer to the just freed
memory.

The check for W_EXIT in the loop scanning the child processes isn't safe
since the state of the child process can change right afterwards. Lock
the process and check the W_EXIT before delivering signal.

Approved by:	re (kensmith)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The code in linux_proc_exit() contains a race when multiple linux based
processes exits at the same time. The linux_emuldata structure is freed
but p-&gt;p_emuldata is left as a dangling pointer to the just freed
memory.

The check for W_EXIT in the loop scanning the child processes isn't safe
since the state of the child process can change right afterwards. Lock
the process and check the W_EXIT before delivering signal.

Approved by:	re (kensmith)
</pre>
</div>
</content>
</entry>
<entry>
<title>MFP4:	Turn emul_lock into a mutex.</title>
<updated>2007-04-02T18:38:13+00:00</updated>
<author>
<name>Jung-uk Kim</name>
<email>jkim@FreeBSD.org</email>
</author>
<published>2007-04-02T18:38:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=357afa71139263ad214da3ceea164c974129735c'/>
<id>357afa71139263ad214da3ceea164c974129735c</id>
<content type='text'>
Submitted by:	rdivacky
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Submitted by:	rdivacky
</pre>
</div>
</content>
</entry>
<entry>
<title>MFP4:	115220, 115222</title>
<updated>2007-03-02T00:08:47+00:00</updated>
<author>
<name>Jung-uk Kim</name>
<email>jkim@FreeBSD.org</email>
</author>
<published>2007-03-02T00:08:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a4e3bad794e41d2d5362743924bd356d76d8e5a9'/>
<id>a4e3bad794e41d2d5362743924bd356d76d8e5a9</id>
<content type='text'>
- Fix style(9) and reduce diff between amd64 and i386.
- Prefix Linuxulator macros with LINUX_ to prevent future collision.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Fix style(9) and reduce diff between amd64 and i386.
- Prefix Linuxulator macros with LINUX_ to prevent future collision.
</pre>
</div>
</content>
</entry>
<entry>
<title>Partial MFp4 of 114977:</title>
<updated>2007-02-24T16:49:25+00:00</updated>
<author>
<name>Alexander Leidinger</name>
<email>netchild@FreeBSD.org</email>
</author>
<published>2007-02-24T16:49:25+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=802e08a3608afbbb68f9fe21eded08a92ff0308f'/>
<id>802e08a3608afbbb68f9fe21eded08a92ff0308f</id>
<content type='text'>
	Whitespace commit: Fix grammar, spelling and punctuation.

Submitted by:	"Scot Hetzel" &lt;swhetzel@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	Whitespace commit: Fix grammar, spelling and punctuation.

Submitted by:	"Scot Hetzel" &lt;swhetzel@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>MFp4 (114193 (i386 part), 114194, 114195, 114200):</title>
<updated>2007-02-23T22:39:26+00:00</updated>
<author>
<name>Alexander Leidinger</name>
<email>netchild@FreeBSD.org</email>
</author>
<published>2007-02-23T22:39:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1a26db0a3a744efecaf35971ca7ad0c9b18a7efe'/>
<id>1a26db0a3a744efecaf35971ca7ad0c9b18a7efe</id>
<content type='text'>
 - Dont "return" in linux_clone() after we forked the new process in a case
   of problems.
 - Move the copyout of p2-&gt;p_pid outside the emul_lock coverage in
   linux_clone().
 - Cache the em-&gt;pdeath_signal in a local variable and move the copyout
   out of the emul_lock coverage.
 - Move the free() out of the emul_shared_lock coverage in a preparation
   to switch emul_lock to non-sleepable lock (mutex).

Submitted by:	rdivacky
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
 - Dont "return" in linux_clone() after we forked the new process in a case
   of problems.
 - Move the copyout of p2-&gt;p_pid outside the emul_lock coverage in
   linux_clone().
 - Cache the em-&gt;pdeath_signal in a local variable and move the copyout
   out of the emul_lock coverage.
 - Move the free() out of the emul_shared_lock coverage in a preparation
   to switch emul_lock to non-sleepable lock (mutex).

Submitted by:	rdivacky
</pre>
</div>
</content>
</entry>
<entry>
<title>MFp4 (part of 114132):</title>
<updated>2007-02-23T22:29:24+00:00</updated>
<author>
<name>Alexander Leidinger</name>
<email>netchild@FreeBSD.org</email>
</author>
<published>2007-02-23T22:29:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e8b8b834b4bc8960f553e50589329e5c3b6d7fe5'/>
<id>e8b8b834b4bc8960f553e50589329e5c3b6d7fe5</id>
<content type='text'>
 - Fix a LOR caused by holding emul_lock and proctree_lock at once.

Submitted by:	rdivacky
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
 - Fix a LOR caused by holding emul_lock and proctree_lock at once.

Submitted by:	rdivacky
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove extern int hz; use proper include file instead.</title>
<updated>2007-02-02T08:58:16+00:00</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2007-02-02T08:58:16+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b4bb515484770283e7d8b6501f6a2e3355a4b6f3'/>
<id>b4bb515484770283e7d8b6501f6a2e3355a4b6f3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>No need to synchronize linux_schedtail with linux_proc_init.</title>
<updated>2007-02-01T13:29:27+00:00</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2007-02-01T13:29:27+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=25954d743041da5014c4b48d9ef2504664ce1ec9'/>
<id>25954d743041da5014c4b48d9ef2504664ce1ec9</id>
<content type='text'>
p-&gt;p_emuldata is properly initialized in the time when the child can run.

Do not set p-&gt;p_emuldata to NULL when the process is exiting.
It does not make any sense and only costs 2 mutex operations.

Do not lock emul_data to unlock it on the very next line.
Comment on possible race while there.

Reparent all procs that are part of a threading group but not its leaders
to init and SIGCHLD init to finish the zombies off. This fixes zombies
left after opera's exit. [1]

There is no need to lock p_em in the linux_proc_init CLONE_THREAD
case because the process cannot change the address of the p_em-&gt;shared
because its currently running this code path.
Move assigning of em-&gt;shared outside emul_shared_lock.

Noticed by: Scott Robbins &lt;scottro@nyc.rr.com&gt; [1]
Submitted by: rdivacky
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
p-&gt;p_emuldata is properly initialized in the time when the child can run.

Do not set p-&gt;p_emuldata to NULL when the process is exiting.
It does not make any sense and only costs 2 mutex operations.

Do not lock emul_data to unlock it on the very next line.
Comment on possible race while there.

Reparent all procs that are part of a threading group but not its leaders
to init and SIGCHLD init to finish the zombies off. This fixes zombies
left after opera's exit. [1]

There is no need to lock p_em in the linux_proc_init CLONE_THREAD
case because the process cannot change the address of the p_em-&gt;shared
because its currently running this code path.
Move assigning of em-&gt;shared outside emul_shared_lock.

Noticed by: Scott Robbins &lt;scottro@nyc.rr.com&gt; [1]
Submitted by: rdivacky
</pre>
</div>
</content>
</entry>
</feed>
