<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/um/include/os.h, branch linux-2.6.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2006-11-25T21:28:34Z</updated>
<entry>
<title>[PATCH] uml: make execvp safe for our usage</title>
<updated>2006-11-25T21:28:34Z</updated>
<author>
<name>Paolo 'Blaisorblade' Giarrusso</name>
</author>
<published>2006-11-25T19:09:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5d48545e5e88ab7a27ba6a5cb1e8fff617754b61'/>
<id>urn:sha1:5d48545e5e88ab7a27ba6a5cb1e8fff617754b61</id>
<content type='text'>
Reimplement execvp for our purposes - after we call fork() it is fundamentally
unsafe to use the kernel allocator - current is not valid there.  So we simply
pass to our modified execvp() a preallocated buffer.  This fixes a real bug
and works very well in testing (I've seen indirectly warning messages from the
forked thread - they went on the pipe connected to its stdout and where read
as a number by UML, when calling read_output().  I verified the obtained
number corresponded to "BUG:").

The added use of __cant_sleep() is not a new bug since __cant_sleep() is
already used in the same function - passing an atomicity parameter would be
better but it would require huge change, stating that this function must not
be called in atomic context and can sleep is a better idea (will make sure of
this gradually).

Signed-off-by: Paolo 'Blaisorblade' Giarrusso &lt;blaisorblade@yahoo.it&gt;
Acked-by: Jeff Dike &lt;jdike@addtoit.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] uml: readd forgot prototype</title>
<updated>2006-10-11T18:14:20Z</updated>
<author>
<name>Paolo 'Blaisorblade' Giarrusso</name>
</author>
<published>2006-10-11T08:21:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e27e80b3da7ad6b90185bd689879888907104a40'/>
<id>urn:sha1:e27e80b3da7ad6b90185bd689879888907104a40</id>
<content type='text'>
This was forgot in a previous patch so UML does not compile with TT mode
enabled.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso &lt;blaisorblade@yahoo.it&gt;
Cc: Jeff Dike &lt;jdike@addtoit.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] uml: thread creation tidying</title>
<updated>2006-09-27T15:26:16Z</updated>
<author>
<name>Jeff Dike</name>
</author>
<published>2006-09-27T08:50:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3c9173509985b957bea692ea887a8a0e5055cfe8'/>
<id>urn:sha1:3c9173509985b957bea692ea887a8a0e5055cfe8</id>
<content type='text'>
fork on UML has always somewhat subtle.  The underlying cause has been the
need to initialize a stack for the new process.  The only portable way to
initialize a new stack is to set it as the alternate signal stack and take a
signal.  The signal handler does whatever initialization is needed and jumps
back to the original stack, where the fork processing is finished.  The basic
context switching mechanism is a jmp_buf for each process.  You switch to a
new process by longjmping to its jmp_buf.

Now that UML has its own implementation of setjmp and longjmp, and I can poke
around inside a jmp_buf without fear that libc will change the structure, a
much simpler mechanism is possible.  The jmpbuf can simply be initialized by
hand.

This eliminates -
	the need to set up and remove the alternate signal stack
	sending and handling a signal
	the signal blocking needed around the stack switching, since
there is no stack switching
	setting up the jmp_buf needed to jump back to the original
stack after the new one is set up

In addition, since jmp_buf is now defined by UML, and not by libc, it can be
embedded in the thread struct.  This makes it unnecessary to have it exist on
the stack, where it used to be.  It also simplifies interfaces, since the
switch jmp_buf used to be a void * inside the thread struct, and functions
which took it as an argument needed to define a jmp_buf variable and assign it
from the void *.

Signed-off-by: Jeff Dike &lt;jdike@addtoit.com&gt;
Cc: Paolo 'Blaisorblade' Giarrusso &lt;blaisorblade@yahoo.it&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] uml: mark some tt-mode code</title>
<updated>2006-09-27T15:26:16Z</updated>
<author>
<name>Jeff Dike</name>
</author>
<published>2006-09-27T08:50:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0915ee38c7db57ff41a7a68bcc02d0dd3b7b849b'/>
<id>urn:sha1:0915ee38c7db57ff41a7a68bcc02d0dd3b7b849b</id>
<content type='text'>
Mark a symbol and file as being tt-mode only.  This shrinks the binary
slightly when tt mode support is compiled out and makes it easier to identity
stuff when tt mode is removed.

Signed-off-by: Jeff Dike &lt;jdike@addtoit.com&gt;
Cc: Paolo 'Blaisorblade' Giarrusso &lt;blaisorblade@yahoo.it&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] uml: timer cleanups</title>
<updated>2006-09-26T15:49:08Z</updated>
<author>
<name>Jeff Dike</name>
</author>
<published>2006-09-26T06:33:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=537ae946e808d0f22d660f7a3500832fe0c07d14'/>
<id>urn:sha1:537ae946e808d0f22d660f7a3500832fe0c07d14</id>
<content type='text'>
set_interval returns an error instead of panicing if setitimer fails.  Some of
its callers now check the return.

enable_timer is largely tt-mode-specific, so it is marked as such, and the
only skas-mode caller is made to call set-interval instead.

user_time_init was a no-value-added wrapper around set_interval, so it is
gone.

Since set_interval is now called from kernel code, callers no longer pass
ITIMER_* to it.  Instead, they pass a flag which is converted into ITIMER_REAL
or ITIMER_VIRTUAL.

Signed-off-by: Jeff Dike &lt;jdike@addtoit.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] uml: SIGIO cleanups</title>
<updated>2006-09-26T15:49:07Z</updated>
<author>
<name>Jeff Dike</name>
</author>
<published>2006-09-26T06:33:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=19bdf0409f25a85a45874a5a8da6f3e4edcf4a49'/>
<id>urn:sha1:19bdf0409f25a85a45874a5a8da6f3e4edcf4a49</id>
<content type='text'>
- Various cleanups in the sigio code.

- Removed explicit zero-initializations of a few structures.

- Improved some error messages.

- An API change - there was an asymmetry between reactivate_fd calling
  maybe_sigio_broken, which goes through all the machinery of figuring out if
  a file descriptor supports SIGIO and applying the workaround to it if not,
  and deactivate_fd, which just turns off the descriptor.

  This is changed so that only activate_fd calls maybe_sigio_broken, when
  the descriptor is first seen.  reactivate_fd now calls add_sigio_fd, which
  is symmetric with ignore_sigio_fd.

  This removes a recursion which makes a critical section look more critical
  than it really was, obsoleting a big comment to that effect.  This requires
  keeping track of all descriptors which are getting the SIGIO treatment, not
  just the ones being polled at any given moment, so that reactivate_fd,
  through add_sigio_fd, doesn't try to tell the SIGIO thread about descriptors
  it doesn't care about.

Signed-off-by: Jeff Dike &lt;jdike@addtoit.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] uml: header formatting cleanups</title>
<updated>2006-07-15T04:53:52Z</updated>
<author>
<name>Jeff Dike</name>
</author>
<published>2006-07-14T07:24:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=329c6e4257d6a89990d72617d91437e2ce59e426'/>
<id>urn:sha1:329c6e4257d6a89990d72617d91437e2ce59e426</id>
<content type='text'>
Clean up whitespace and return syntax in os.h.

Signed-off-by: Jeff Dike &lt;jdike@addtoit.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] uml: make some symbols static</title>
<updated>2006-07-10T20:24:24Z</updated>
<author>
<name>Jeff Dike</name>
</author>
<published>2006-07-10T11:45:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=29ac1c2142346e1e0e072f41df31688fc42ff540'/>
<id>urn:sha1:29ac1c2142346e1e0e072f41df31688fc42ff540</id>
<content type='text'>
A few sigio-related things can be made static.

Signed-off-by: Jeff Dike &lt;jdike@addtoit.com&gt;
Cc: Paolo 'Blaisorblade' Giarrusso &lt;blaisorblade@yahoo.it&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] uml: remove os_isatty</title>
<updated>2006-07-10T20:24:24Z</updated>
<author>
<name>Jeff Dike</name>
</author>
<published>2006-07-10T11:45:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8e64d96aeb495709c13307e2d79f3ee37e96aa4e'/>
<id>urn:sha1:8e64d96aeb495709c13307e2d79f3ee37e96aa4e</id>
<content type='text'>
os_isatty can be made to disappear by moving maybe_sigio_broken from kernel to
user code.  This also lets write_sigio_workaround become static.

Signed-off-by: Jeff Dike &lt;jdike@addtoit.com&gt;
Cc: Paolo 'Blaisorblade' Giarrusso &lt;blaisorblade@yahoo.it&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] uml: signal initialization cleanup</title>
<updated>2006-07-10T20:24:23Z</updated>
<author>
<name>Jeff Dike</name>
</author>
<published>2006-07-10T11:45:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e64bd134085451fe3f751025c5d5a70729164b7c'/>
<id>urn:sha1:e64bd134085451fe3f751025c5d5a70729164b7c</id>
<content type='text'>
It turns out that init_new_thread_signals is always called with altstack == 1,
so we can eliminate the parameter.

Signed-off-by: Jeff Dike &lt;jdike@addtoit.com&gt;
Cc: Paolo 'Blaisorblade' Giarrusso &lt;blaisorblade@yahoo.it&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
