[uml-devel] Re: Why uml-add-tls-support-debug-check-never-works is needed

2006-03-24 Thread Jeff Dike
On Sat, Mar 25, 2006 at 12:28:09AM +0100, Blaisorblade wrote: > BUT, this context switch at the thread born is special: the thread being > switched away switches to a new thread not in the body of the new thread's > call to switch_to_skas->switch_threads(), but in the body of thread_wait()! > At

Re: [uml-devel] Re: [PATCH 12/16] UML - Memory hotplug

2006-03-24 Thread Jeff Dike
On Sat, Mar 25, 2006 at 12:58:57AM +0100, Blaisorblade wrote: > > +int os_drop_memory(void *addr, int length) > > +{ > > + int err; > > + > > + err = madvise(addr, length, MADV_REMOVE); > > + if(err < 0) > > + err = -errno; > > Jeff, did you mean the "return _0_" rather tha

[uml-devel] Re: [PATCH 12/16] UML - Memory hotplug

2006-03-24 Thread Jeff Dike
On Fri, Mar 24, 2006 at 02:45:35PM -0800, Andrew Morton wrote: > The `= 0;' causes this to consume space in vmlinux's .data. If we put it > in bss and let crt0.o take care of zeroing it, we save a little disk space. Yup. > > + page = alloc_page(GFP_ATOMIC); > > That's potentia

Re: [uml-devel] Re: [PATCH 12/16] UML - Memory hotplug

2006-03-24 Thread Blaisorblade
On Friday 24 March 2006 23:45, Andrew Morton wrote: > Jeff Dike <[EMAIL PROTECTED]> wrote: > > Unplugged pages are allocated and then madvise(MADV_REMOVE), > > This patch also removes checking for /dev/anon on the host, which is > > obsoleted by MADVISE_REMOVE. > * NOTE: Currently, only shmfs/

[uml-devel] Fwd: Why uml-add-tls-support-debug-check-never-works is needed (was: Re: Fwd: Proposed additions to the ptrace(2) manpage, take 2)

2006-03-24 Thread Blaisorblade
Had sent it to the wrong address, resending. -- Forwarded Message -- Subject: Why uml-add-tls-support-debug-check-never-works is needed (was: Re: Fwd: Proposed additions to the ptrace(2) manpage, take 2) Date: Saturday 25 March 2006 00:28 From: Blaisorblade <[EMAIL PROTECTED]>

[uml-devel] Re: [PATCH 12/16] UML - Memory hotplug

2006-03-24 Thread Andrew Morton
Jeff Dike <[EMAIL PROTECTED]> wrote: > > This adds hotplug memory support to UML. The mconsole syntax is > config mem=[+-]n[KMG] > In other words, add or subtract some number of kilobytes, megabytes, or > gigabytes. > > Unplugged pages are allocated and then madvise(MADV_REMOVE), which is

Re: [uml-devel] Re: TLS support - status - need for re-testing

2006-03-24 Thread Blaisorblade
On Friday 24 March 2006 18:32, Jeff Dike wrote: > On Fri, Mar 24, 2006 at 12:43:33PM +0100, Blaisorblade wrote: > > We discussed this time ago, and read the description of the patch: > > > global-ldt-sem - We should be using mutexes now, not semaphores > > > > That's your patch, but below I drop t

[uml-devel] [PATCH 12/16] UML - Memory hotplug

2006-03-24 Thread Jeff Dike
This adds hotplug memory support to UML. The mconsole syntax is config mem=[+-]n[KMG] In other words, add or subtract some number of kilobytes, megabytes, or gigabytes. Unplugged pages are allocated and then madvise(MADV_REMOVE), which is a currently experimental madvise extension. Thes

[uml-devel] [PATCH 16/16] UML - Fix hostfs stack corruption

2006-03-24 Thread Jeff Dike
Noted by Oleg Drokin: We initialized an extra slot of struct kstatfs.spare, sometimes causing stack corruption. Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> Index: linux-2.6.16/fs/hostfs/hostfs_user.c === --- linux-2.6.16.orig/fs/hos

[uml-devel] [PATCH 14/16] UML - Prevent umid theft

2006-03-24 Thread Jeff Dike
Behavior when booting two UMLs with the same umid was broken. The second one would steal the umid. This fixes that, making the second UML take a random umid instead. Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> Index: linux-2.6.15/arch/um/os-Linux/umid.c

[uml-devel] [PATCH 15/16] UML - Fix thread startup race

2006-03-24 Thread Jeff Dike
This fixes a race in the starting of write_sigio_thread. Previously, some of the data needed by the thread was initialized after the clone. If the thread ran immediately, it would see the uninitialized data, including an empty pollfds, which would cause it to hang. We move the data initialization

[uml-devel] [PATCH 11/16] UML - Allow ubd devices to be shared in a cluster

2006-03-24 Thread Jeff Dike
This adds a 'c' option to the ubd switch which turns off host file locking so that the device can be shared, as with a cluster. There's also some whitespace cleanup while I was in this file. Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> Index: linux-2.6.16/arch/um/drivers/ubd_kern.c ==

[uml-devel] [PATCH 8/16] UML - More carefully test whether we are in a system call

2006-03-24 Thread Jeff Dike
From: Bodo Stroesser <[EMAIL PROTECTED]> For security reasons, UML in is_syscall() needs to have access to code in vsyscall-page. The current implementation grants this access by explicitly allowing access to vsyscall in access_ok_skas(). With this change, copy_from_user() may be used to read the

[uml-devel] [PATCH 7/16] UML - Move sigio_user.c to os-Linux/sigio.c

2006-03-24 Thread Jeff Dike
The serial UML OS-abstraction layer patch (um/kernel dir). This moves sigio_user.c to os-Linux dir Signed-off-by: Gennady Sharapov <[EMAIL PROTECTED]> Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> Index: linux-2.6.16/arch/um/include/os.h ===

[uml-devel] [PATCH 9/16] UML - Move tty logging to os-Linux

2006-03-24 Thread Jeff Dike
The serial UML OS-abstraction layer patch (um/kernel dir). This moves all systemcalls from tty_log.c file under os-Linux dir Signed-off-by: Gennady Sharapov <[EMAIL PROTECTED]> Index: linux-2.6.16/arch/um/kernel/exec_kern.c === ---

[uml-devel] [PATCH 3/16] UML - Fix some printf formats

2006-03-24 Thread Jeff Dike
Some printf formats are incorrect for large memory sizes. Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> Index: linux-2.6.15-mm/arch/um/kernel/um_arch.c === --- linux-2.6.15-mm.orig/arch/um/kernel/um_arch.c 2006-02-21 17:40:12.0

[uml-devel] [PATCH 13/16] UML - Fix segfault on signal delivery

2006-03-24 Thread Jeff Dike
This fixes a process segfault where a signal was being delivered such that a new stack page needed to be allocated to hold the signal frame. This was tripping some logic in the page fault handler which wouldn't allocate the page if the faulting address was more that 32 bytes lower than the current

[uml-devel] [PATCH 2/16] UML - Fix declaration of exit()

2006-03-24 Thread Jeff Dike
This fixes a conflict between a header and what gcc "knows" the declaration' to be. Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> Index: linux-2.6.15-mm/arch/um/include/kern.h === --- linux-2.6.15-mm.orig/arch/um/include/kern.h 2006-0

[uml-devel] [PATCH 10/16] UML - OS header cleanups

2006-03-24 Thread Jeff Dike
This rearranges the OS declarations by moving some declarations into os.h. Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> Index: linux-2.6.16/arch/um/include/os.h === --- linux-2.6.16.orig/arch/um/include/os.h 2006-03-23 17:35:34.

[uml-devel] [PATCH 1/16] UML - Fix build warnings in __get_user

2006-03-24 Thread Jeff Dike
Fix a gcc warning about losing qualifiers to the first argument of copy_from_user. The typeof change for correctness, and fixes a lot of the warnings, but there are some cases where x has some extra qualifiers, like volatile, which copy_from_user can't know about. For these, the void * cast seems

[uml-devel] [PATCH 6/16] UML - Move SIGIO startup code to os-Linux/start_up.c

2006-03-24 Thread Jeff Dike
The serial UML OS-abstraction layer patch (um/kernel dir). This moves all startup code from sigio_user.c file under os-Linux dir Signed-off-by: Gennady Sharapov <[EMAIL PROTECTED]> Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> Index: linux-2.6.16/arch/um/include/os.h =

[uml-devel] [PATCH 5/16] UML - Merge irq_user.c and irq.c

2006-03-24 Thread Jeff Dike
The serial UML OS-abstraction layer patch (um/kernel dir). This joins irq_user.c and irq.c files. Signed-off-by: Gennady Sharapov <[EMAIL PROTECTED]> Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> Index: linux-2.6.16/arch/um/kernel/Makefile =

[uml-devel] [PATCH 4/16] UML - Move libc-dependent irq code to os-Linux

2006-03-24 Thread Jeff Dike
The serial UML OS-abstraction layer patch (um/kernel dir). This moves all systemcalls from irq_user.c file under os-Linux dir Signed-off-by: Gennady Sharapov <[EMAIL PROTECTED]> Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> Index: linux-2.6.16/arch/um/include/irq_user.h ==

Re: [uml-devel] Re: TLS support - status - need for re-testing

2006-03-24 Thread Jeff Dike
On Fri, Mar 24, 2006 at 12:43:33PM +0100, Blaisorblade wrote: > We discussed this time ago, and read the description of the patch: > > # Also, as suggested by Jeff, remove a redundant enabling of SIGVTALRM, > # comprised in the subsequent local_irq_enable(). I'm just a bit dubious if > # ordering

[uml-devel] Re: (implementation idea) Re: uml and nonstandard memory splits?

2006-03-24 Thread Jeff Dike
On Fri, Mar 24, 2006 at 03:34:01PM +0100, Blaisorblade wrote: > The EIP is inside the stub code page, and the two pages are one near the > other. I think you're going to have to talk more slowly and use shorter words. The problem is that we need to figure out at runtime where to put the stub pag

[uml-devel] Re: (implementation idea) Re: uml and nonstandard memory splits?

2006-03-24 Thread Jason Lunz
[EMAIL PROTECTED] said: > However, currently, the rounding can't be 0.5G, it must be 0.25G with the > current code, and it's still fragile if the host code is changed. > > (arch/i386/Kconfig) > config PAGE_OFFSET > hex > default 0xB000 if VMSPLIT_3G_OPT > default 0x7800

Re: [uml-devel] Resend: how to debug module on UML kernel 2.6.15.6 + SKAS mode?

2006-03-24 Thread Blaisorblade
On Friday 24 March 2006 04:25, Mikado wrote: > - How can I debug loadable modules at run time? > > Here is my way: > > ( /tmp/mymodule.ko exists on both [Host] and [UML] ) > + [Host] # gdb linux > + [Host] (gdb) ... > + [Host] (gdb) r > + [UML] # insmod /tmp/mymodule.ko > + [UML] # cat

[uml-devel] Re: (implementation idea) Re: uml and nonstandard memory splits?

2006-03-24 Thread Blaisorblade
On Friday 24 March 2006 03:30, Jeff Dike wrote: > On Fri, Mar 24, 2006 at 01:56:32AM +0100, Blaisorblade wrote: > > I don't think it's easy - however, it can be done. Below my idea - Jeff, > > please comment on this > > In assembly. > > It goes like this: > > call label /*this is coded like a rel

Re: [uml-devel] Re: TLS support - status - need for re-testing

2006-03-24 Thread Blaisorblade
On Friday 24 March 2006 11:39, Antoine Martin wrote: > On Thu, 2006-03-23 at 20:51 -0500, Jeff Dike wrote: > > On Fri, Mar 24, 2006 at 12:44:05AM +0100, Blaisorblade wrote: > > > Yes, that is true, but meanwhile give a testing to them, especially > > > regressio test the new patches. I can't merge

Re: [uml-devel] Re: TLS support - status - need for re-testing

2006-03-24 Thread Blaisorblade
On Friday 24 March 2006 02:51, Jeff Dike wrote: > On Fri, Mar 24, 2006 at 12:44:05AM +0100, Blaisorblade wrote: > > Yes, that is true, but meanwhile give a testing to them, especially > > regressio test the new patches. I can't merge new patches in until I'm > > sure they don't cause regressions.

Re: [uml-devel] Re: TLS support - status - need for re-testing

2006-03-24 Thread Blaisorblade
On Friday 24 March 2006 05:17, Jeff Dike wrote: > On Fri, Mar 24, 2006 at 12:44:05AM +0100, Blaisorblade wrote: > > Yes, that is true, but meanwhile give a testing to them, especially > > regression test the new patches. I can't merge new patches in until > > I'm sure they don't cause regressions.

Re: [uml-devel] Re: TLS support - status - need for re-testing

2006-03-24 Thread Antoine Martin
On Thu, 2006-03-23 at 20:51 -0500, Jeff Dike wrote: > On Fri, Mar 24, 2006 at 12:44:05AM +0100, Blaisorblade wrote: > > Yes, that is true, but meanwhile give a testing to them, especially > > regressio > > test the new patches. I can't merge new patches in until I'm sure they > > don't > > cause