[uml-devel] Re: [PATCH 1/9] uml: avoid sysfs warning on hot-unplug

2006-01-17 Thread Jeff Dike
On Wed, Jan 18, 2006 at 01:19:21AM +0100, Paolo 'Blaisorblade' Giarrusso wrote: > Done by Jeff around January for ubd only, later lost, then restored in his > tree > - however I'm merging it now since there's no reason to leave this here. The original was dinged by hch for covering over a problem

[uml-devel] Re: [PATCH 1/9] uml: avoid sysfs warning on hot-unplug

2006-01-17 Thread Greg KH
> From: Jeff Dike <[EMAIL PROTECTED]>, Paolo 'Blaisorblade' Giarrusso <[EMAIL > PROTECTED]> > > Define a release method for the ubd and network driver so that sysfs doesn't > complain when one is removed via: What? No. The kernel is complaining for a reason, don't try to out-smart it. > > ho

[uml-devel] Re: [PATCH 6/9] uml: avoid malloc to sleep in atomic sections

2006-01-17 Thread Andrew Morton
"Paolo 'Blaisorblade' Giarrusso" <[EMAIL PROTECTED]> wrote: > > +int __cant_sleep(void) { > + return in_atomic() || irqs_disabled() || in_interrupt(); aww, man, this is awful. Code is supposed to know what context it's running in, not go fishing about in core internals trying to fix up its ow

[uml-devel] Re: [PATCH 4/9] uml: fix spinlock recursion and sleep-inside-spinlock in error path

2006-01-17 Thread Andrew Morton
"Paolo 'Blaisorblade' Giarrusso" <[EMAIL PROTECTED]> wrote: > > > From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> > > In this error path, when the interface has had a problem, we call dev_close(), > which is disallowed for two reasons: > > *) takes again the UML internal spinlock, insid

[uml-devel] [PATCH 2/9] uml: make daemon transport behave properly

2006-01-17 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> Avoid uninitialized data in the daemon_data structure. I used this transport before doing proper setup before-hand, and I got some very nice SLAB corruption due to freeing crap pointers. So just make sure to clear everything when appropriat

[uml-devel] [PATCH 7/9] uml: arch Kconfig menu cleanups

2006-01-17 Thread Paolo 'Blaisorblade' Giarrusso
*) mark as "EXPERIMENTAL" various items that either aren't very stable or that are actively crashing the setup of users which don't really need them (i.e. HIGHMEM and 3-level pagetables on x86 - nobody needs either, everybody reports "I'm using it and getting trouble"). *) move net/Kconfig near t

[uml-devel] [PATCH 8/9] uml: allow again to move backing file and to override saved location

2006-01-17 Thread Paolo 'Blaisorblade' Giarrusso
When the user specifies both a COW file and its backing file, if the previous backing file is not found, currently UML tries again to use it and fails. This can be corrected by changing same_backing_files() return value in that case, so that the caller will try to change the COW file to point to

[uml-devel] [PATCH 1/9] uml: avoid sysfs warning on hot-unplug

2006-01-17 Thread Paolo 'Blaisorblade' Giarrusso
From: Jeff Dike <[EMAIL PROTECTED]>, Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> Define a release method for the ubd and network driver so that sysfs doesn't complain when one is removed via: host $ uml_mconsole remove Done by Jeff around January for ubd only, later lost, then restore

[uml-devel] [PATCH 3/9] uml: networking - clear transport-specific structure

2006-01-17 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> Pre-clear transport-specific private structure before passing it down. In fact, I just got a slab corruption and kernel panic on exit because kfree() was called on a pointer which probably was never allocated, BUT hadn't been set to NULL b

[uml-devel] [PATCH 9/9] uml ubd code: fix a bit of whitespace

2006-01-17 Thread Paolo 'Blaisorblade' Giarrusso
Correct a bit of whitespace problems while working here. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> --- arch/um/drivers/ubd_kern.c | 31 +-- 1 files changed, 17 insertions(+), 14 deletions(-) diff --git a/arch/um/drivers/ubd_kern.c b/arch/um

[uml-devel] [PATCH 6/9] uml: avoid malloc to sleep in atomic sections

2006-01-17 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> Ugly trick to help make malloc not sleeping - we can't do anything else. But this is not yet optimal, since spinlock don't trigger in_atomic() when preemption is disabled. Also, even if ugly, this was already used in one place, and was eve

[uml-devel] [PATCH 5/9] uml: sigio code - reduce spinlock hold time

2006-01-17 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> In a previous patch I shifted an allocation to being atomic. In this patch, a better but more intrusive solution is implemented, i.e. hold the lock only when really needing it, especially not over pipe operations, nor over the culprit allo

[uml-devel] [PATCH 4/9] uml: fix spinlock recursion and sleep-inside-spinlock in error path

2006-01-17 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> In this error path, when the interface has had a problem, we call dev_close(), which is disallowed for two reasons: *) takes again the UML internal spinlock, inside the ->stop method of this device *) can be called in process context on

[uml-devel] [PATCH 0/9] UML various fixes for 2.6.16

2006-01-17 Thread Paolo 'Blaisorblade' Giarrusso
Merge various fixes, mainly for locking issues. A bit of attention is to give to "uml: avoid malloc to sleep in atomic sections". It's really an hack, but we already use this hack in a more buggy way (see the patch). In practice, when malloc() is called, it's translated in a call to kmalloc(GFP_?

[uml-devel] Re: [PATCH] uml: remove leftover from patch revertal

2006-01-17 Thread Jeff Dike
On Wed, Jan 18, 2006 at 12:26:27AM +0100, Paolo 'Blaisorblade' Giarrusso wrote: > > From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> > > I added this line to share this file with UML, but now it's no longer shared > so > remove this useless leftover. ACK - Thanks, I saw this and meant t

[uml-devel] [Bug 111575] sys-kernel/usermode-sources-2.6.14: kernel panic

2006-01-17 Thread bugzilla-daemon
Clear-Text: http://bugs.gentoo.org/show_bug.cgi?id=111575 Secure: https://bugs.gentoo.org/show_bug.cgi?id=111575 [EMAIL PROTECTED] changed: What|Removed |Added CC|

[uml-devel] [PATCH] uml: remove leftover from patch revertal

2006-01-17 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> I added this line to share this file with UML, but now it's no longer shared so remove this useless leftover. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> --- include/asm-i386/futex.h |2 +- 1 files changed, 1 in

[uml-devel] Re: -bs patchset still useful for users?

2006-01-17 Thread Blaisorblade
On Tuesday 17 January 2006 20:52, Daniel Drake wrote: > Blaisorblade wrote: > > Vanilla can do, however -bs has one little additional feature > > (mconsole-exec) and contains all bug fixes written after the release > > (only few important ones go to -stable, they're very restrictive and some > > -b

Re: [uml-devel] arch/um/include/kern_util.h:35: error: 'CONFIG_NR_CPUS' undeclared

2006-01-17 Thread Olaf Hering
On Tue, Jan 17, Blaisorblade wrote: > Disable CONFIG_SMP, it doesn't work well anyway, however thanks for the > report. Some of the libc headers my define it, its not enabled in the kernel .config. The patch gets me further, thanks. Next error is: arch/um/os-Linux/sys-i386/registers.c: In func

[uml-devel] Re: -bs patchset still useful for users?

2006-01-17 Thread Daniel Drake
Blaisorblade wrote: Vanilla can do, however -bs has one little additional feature (mconsole-exec) and contains all bug fixes written after the release (only few important ones go to -stable, they're very restrictive and some -bs patches don't fix critical "regressions"/crashes). In fact, most

Re: [uml-devel] [PATCH 9/11] UML - Implement soft interrupts

2006-01-17 Thread Blaisorblade
On Tuesday 17 January 2006 04:32, Jeff Dike wrote: > On Tue, Jan 17, 2006 at 01:24:31AM +0100, Blaisorblade wrote: > > ~25 %? Good! Which is delay vs. host? > > Delay vs a UML without the patch. > > > A curiosity - did you look at the similar code in Ingo Molnar's VCPU > > patch? I never found the

Re: [uml-devel] arch/um/include/kern_util.h:35: error: 'CONFIG_NR_CPUS' undeclared

2006-01-17 Thread Blaisorblade
On Tuesday 17 January 2006 04:45, Jeff Dike wrote: > On Tue, Jan 17, 2006 at 02:22:59AM +0100, Blaisorblade wrote: > > On Monday 16 January 2006 18:14, Olaf Hering wrote: > > > It picks up the libc headers instead of the 2.6.15 ones. > > > > Yep, that's correct, the bug is that shouldn't be using C

Re: [uml-devel] slip_init and slirp_init using 12K of stack

2006-01-17 Thread Blaisorblade
On Tuesday 17 January 2006 04:41, Jeff Dike wrote: > On Tue, Jan 17, 2006 at 01:26:12AM +0100, Blaisorblade wrote: > > I ran by accident scripts/checkstack.pl and found that slip_init and > > slirp_init are two big offenders. > > > > They are since of such lines: > > > > *spri = ((struct sl

Re: [uml-devel] 2.6.15-rc1 Badness in handle_page_fault

2006-01-17 Thread Blaisorblade
On Tuesday 17 January 2006 04:37, Jeff Dike wrote: > On Tue, Jan 17, 2006 at 02:33:59AM +0100, Blaisorblade wrote: > > what > > about load_TLS? I only got -22, I fixed it by removing tls-debug > > That's caused by referring to errno in kernel code. That gets you the > value of kernel_errno, which