Re: [uml-devel] [PATCH] broken uml_util.spec

2007-03-05 Thread Itamar Reis Peixoto
about uml_util.spec, this patch have yo fixed the problem of unpackaged file (jail_uml)? %attr(755,root,root)%{_sbindir}/jail_uml Itamar Reis Peixoto e-mail: [EMAIL PROTECTED] msn: [EMAIL PROTECTED] skype: itamarjp icq: 81053601 +55 34 3238 3845 +55 11

Re: [uml-devel] [PATCH] x86_64 32-bit ptrace mangles sixth system call argument

2007-03-05 Thread Blaisorblade
On Tuesday 06 March 2007 00:10, Jeff Dike wrote: > On Tue, Mar 06, 2007 at 12:03:26AM +0100, Blaisorblade wrote: > > > No, RCX corruption is different - that happens when a sysexit is done > > > from a system call where userspace wasn't prepared to save and restore > > > RCX. sigreturn is the best

Re: [uml-devel] [PATCH] x86_64 32-bit ptrace mangles sixth system call argument

2007-03-05 Thread Jeff Dike
On Tue, Mar 06, 2007 at 12:03:26AM +0100, Blaisorblade wrote: > > No, RCX corruption is different - that happens when a sysexit is done > > from a system call where userspace wasn't prepared to save and restore > > RCX. sigreturn is the best example. > > Hmm... we should finally fix that, at some

Re: [uml-devel] [PATCH 04/11] uml - hostfs: avoid possible escapes from hostfs=.

2007-03-05 Thread Jeff Dike
On Mon, Mar 05, 2007 at 11:59:13PM +0100, Blaisorblade wrote: > I gave a look, and it's nice. Except that maybe "escapes_jail" would be a > clearer name (there's confusion about the subject of "escaping"). Feel free to change the name. > Also, what about concurrent UML threads caring about curre

[uml-devel] [PATCH 1/2] uml: make sigio_lock() irq-safe

2007-03-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> sigio_lock is taken both from process context and from interrupt context. So we *must* use irqsave. Then, remove irq disabling from update_thread(), as it's called with sigio_lock() held (yes, set_signals(0) is local_irq_save). In fact, I'

[uml-devel] [PATCH 2/2] uml: avoid calling request_irq in atomic context

2007-03-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> To avoid calling request_irq under a spinlock, and to simplify code around, code a state machine to allow safely dropping and retaking sigio_lock during initialization. The state variable is protected by a spinlock together with much other s

Re: [uml-devel] Remap_file_pages protection support: when to send patches?

2007-03-05 Thread Andrew Morton
On Mon, 5 Mar 2007 22:45:26 +0100 Blaisorblade <[EMAIL PROTECTED]> wrote: > Hi Andrew, I've been resurrecting lately remap_file_pages protection support > for UML. > > I've updated it to 2.6.20 and it passes its unit test, and the > resulting kernel has no stability problems in my experience on

Re: [uml-devel] [PATCH] x86_64 32-bit ptrace mangles sixth system call argument

2007-03-05 Thread Blaisorblade
On Friday 02 February 2007 21:12, Jeff Dike wrote: > On Fri, Feb 02, 2007 at 06:48:39PM +0100, Blaisorblade wrote: > > Is this a recent regression or did this always happen? > > I haven't looked at the history of the code, but it has the look of > something that's been there a long time. > > > Is t

Re: [uml-devel] [PATCH 04/11] uml - hostfs: avoid possible escapes from hostfs=.

2007-03-05 Thread Blaisorblade
On Monday 05 March 2007 23:03, Jeff Dike wrote: > On Mon, Mar 05, 2007 at 09:49:02PM +0100, Paolo 'Blaisorblade' Giarrusso wrote: > > From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> > > > > Avoid accepting things like -o .., -o dir/../../dir2, -o dir/../.. . > > This may be considered use

[uml-devel] [PATCH 4/4] UML - Comment the initialization of a global

2007-03-05 Thread Jeff Dike
Comment the fact that sig_info is initialized early in boot, and thus doesn't need any locking. Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> -- arch/um/os-Linux/trap.c |1 + 1 file changed, 1 insertion(+) Index: linux-2.6.18-mm/arch/um/os-Linux/trap.c

[uml-devel] [PATCH 2/4] UML - Fix formatting violations in signal delivery code

2007-03-05 Thread Jeff Dike
Fix a few formatting bugs in the signal code. Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> -- arch/um/kernel/signal.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Index: test/arch/um/kernel/signal.c === --- test.or

[uml-devel] [PATCH 3/4] UML - Add a debugging message

2007-03-05 Thread Jeff Dike
Add a debugging message in the case that mapping a stub fails. Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> -- arch/um/os-Linux/skas/process.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) Index: test/arch/um/os-Linux/skas/process.c

[uml-devel] [PATCH 1/4] linux/audit.h needs linux/types.h

2007-03-05 Thread Jeff Dike
Include linux/types.h here because we need a definition of __u32. This file appears not be exported verbatim by libc, so I think this doesn't have any userspace consequences. Signed-off-by: Jeff Dike <[EMAIL PROTECTED]> -- include/linux/audit.h |1 + 1 file changed, 1 insertion(+) Index: li

[uml-devel] [PATCH 0/4] Small UML and audit.h cleanups

2007-03-05 Thread Jeff Dike
These are for 2.6.21. Three are UML cleanups, and one is adding an include to linux/audit.h. Jeff - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel an

Re: [uml-devel] [PATCH] broken uml_util.spec

2007-03-05 Thread Blaisorblade
On Friday 15 December 2006 08:00, Ilkka Tengvall wrote: > Howdy, > > I just dowloaded uml and gave it a shot. Seems to work nice on > 2.6.19-rc6. While at it, I fixed the rpm spec file. It had old tag for > license, incorrect directory name for build and was missing jail_uml > from files list. I bu

Re: [uml-devel] [PATCH 00/11] Uml simple fixes

2007-03-05 Thread Jeff Dike
On Mon, Mar 05, 2007 at 09:42:29PM +0100, Paolo 'Blaisorblade' Giarrusso wrote: > Some tested UML fixes - should be applied for 2.6.21. ACK on all of these except for 1, which won't apply to current -mm, and 4, which might need some more work. Jeff -- Work email

Re: [uml-devel] [PATCH 04/11] uml - hostfs: avoid possible escapes from hostfs=.

2007-03-05 Thread Jeff Dike
On Mon, Mar 05, 2007 at 09:49:02PM +0100, Paolo 'Blaisorblade' Giarrusso wrote: > From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> > > Avoid accepting things like -o .., -o dir/../../dir2, -o dir/../.. . > This may be considered useless, but YMMV. I consider that this has a limited > secur

Re: [uml-devel] [PATCH 01/11] uml: code convention cleanup of a file

2007-03-05 Thread Jeff Dike
On Mon, Mar 05, 2007 at 09:48:59PM +0100, Paolo 'Blaisorblade' Giarrusso wrote: > From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> > > Fix coding conventions violations is arch/um/os-Linux/helper.c. The code which you're changing here is gone in current -mm.

[uml-devel] Remap_file_pages protection support: when to send patches?

2007-03-05 Thread Blaisorblade
Hi Andrew, I've been resurrecting lately remap_file_pages protection support for UML. I've updated it to 2.6.20 and it passes its unit test, and the resulting kernel has no stability problems in my experience on my Dual Core laptop (I've been using it for long time). Since last time I sent it,

[uml-devel] [PATCH 04/11] uml - hostfs: avoid possible escapes from hostfs=.

2007-03-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> Avoid accepting things like -o .., -o dir/../../dir2, -o dir/../.. . This may be considered useless, but YMMV. I consider that this has a limited security value, exactly like disabling module support (in many case it is useful). Signed-off-

[uml-devel] [PATCH 11/11] uml: fix errno usage

2007-03-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> Avoid reusing userspace errno twice - it can be cleared by libc code everywhere (in particular printk() does clear it in my setup). Signed-off-by: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> --- arch/um/drivers/daemon_user.c | 17

[uml-devel] [PATCH 07/11] uml: remove dead code about os_usr1_signal() and os_usr1_process()

2007-03-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> os_usr1_signal() is totally unused, os_usr1_process() is used only by TT mode. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> --- arch/um/include/os.h |3 ++- arch/um/os-Linux/process.c |3 +++ arch/um/os-

[uml-devel] [PATCH 00/11] Uml simple fixes

2007-03-05 Thread Paolo 'Blaisorblade' Giarrusso
Some tested UML fixes - should be applied for 2.6.21. -- Paolo Giarrusso, aka Blaisorblade http://www.user-mode-linux.org/~blaisorblade - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay pa

[uml-devel] [PATCH 01/11] uml: code convention cleanup of a file

2007-03-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> Fix coding conventions violations is arch/um/os-Linux/helper.c. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> --- arch/um/os-Linux/helper.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch

[uml-devel] [PATCH 10/11] uml - activate_fd: return ENOMEM only when appropriate

2007-03-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> Avoid returning ENOMEM in case of a duplicate IRQ - ENOMEM was saved into err earlier. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> --- arch/um/kernel/irq.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-)

[uml-devel] [PATCH 06/11] uml: fix a memory leak in the multicast driver

2007-03-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> Memory allocated by mcast_user_init must be freed in the matching mcast_remove. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> --- arch/um/drivers/mcast_user.c | 10 +- 1 files changed, 9 insertions(+), 1 dele

[uml-devel] [PATCH 02/11] uml - hostfs: fix double free

2007-03-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> Fix double free in the error path - when name is assigned into root_inode we do not own it any more and we must not kfree() it - see patch for details. Thanks to William Stearns for the initial report. CC: William Stearns <[EMAIL PROTECTED

[uml-devel] [PATCH 09/11] uml: fix confusion irq early reenabling

2007-03-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> Fix confusion about call context - comments and code are inconsistent and plain wrong, my fault. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> --- arch/um/drivers/line.c |6 +++--- 1 files changed, 3 insertions(+),

[uml-devel] [PATCH 05/11] hostfs: rename some vars for clarity

2007-03-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> * rename name to host_root_path * rename data to req_root. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> --- fs/hostfs/hostfs_kern.c | 26 +- 1 files changed, 13 insertions(+), 13 deletions(-)

[uml-devel] [PATCH 08/11] uml: mark both consoles as CON_ANYTIME

2007-03-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> Since both UML consoles do not use percpu variables, they may be called when the cpu is still offline, and they may be marked CON_ANYTIME (this is documented in kernel/printk.c, grep for CON_ANYTIME to find mentions of this). Works well in

[uml-devel] [PATCH 03/11] uml - hostfs: make hostfs= option work as a jail, as intended.

2007-03-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]> When a given host directory is specified to be mounted both in hostfs=path1 and with mount option -o path2, we should give access to path1/path2, but this does not happen. Fix that in the simpler way. Also, root_ino can be the empty string,

Re: [uml-devel] [PATCH] UML utrace support, step 1

2007-03-05 Thread Jeff Dike
On Thu, Feb 22, 2007 at 07:19:03PM -0800, Roland McGrath wrote: > Your replacement patch still has utrace_regset stuff in it, so it doesn't > compile without the later patches in the series. Try applying only > utrace-tracehook.patch from the series, then get it to build and make your > utrace-tra

Re: [uml-devel] [uml-user] [PATCH] uml hostfs: fix interaction between hostfs=path1 and -o path2 at mount time

2007-03-05 Thread Blaisorblade
On Sunday 04 March 2007 23:53, Antoine Martin wrote: > Blaisorblade wrote: > > On Sunday 04 March 2007 17:50, Sylvain Beucler wrote: > >> On Sat, Mar 03, 2007 at 07:32:46PM +0100, Blaisorblade wrote: > >> Hi, > >> > >> I tested and it works. > >> > >> Thanks, > > > > You'll probably also see that -

Re: [uml-devel] When opening /tmp/uml.ctl fails, what do we get?

2007-03-05 Thread Blaisorblade
On Monday 05 March 2007 16:51, Jeff Dike wrote: > On Sun, Mar 04, 2007 at 08:13:39PM +0100, Blaisorblade wrote: > > Have you checked if other calls require that register_netdev was already > > called? > > Just did, nothing else depends on it. Fine. > > Hmm, I'm really not sure about what to do abou

[uml-devel] 2.6.21-rc CONFIG_DEBUG_SHIRQ breaks UML

2007-03-05 Thread Blaisorblade
I've seen UML 2.6.21-rc crashing at boot due to CONFIG_DEBUG_SHIRQ. Below I've written the diagnosis, without a resolution. The problem is in mconsole_init() with CONFIG_DEBUG_SHIRQ - it registers the mconsole IRQ. CONFIG_DEBUG_SHIRQ triggers a fake IRQ at registration time, to catch device dri

Re: [uml-devel] When opening /tmp/uml.ctl fails, what do we get?

2007-03-05 Thread Jeff Dike
On Sun, Mar 04, 2007 at 08:13:39PM +0100, Blaisorblade wrote: > Have you checked if other calls require that register_netdev was already > called? Just did, nothing else depends on it. > Hmm, I'm really not sure about what to do about this. However I'd leave that > for a future cleanup and just