Re: [uml-devel] [PATCH 8/9] um: fix strrchr problems

2011-08-29 Thread Jeff Dike
On Mon, Aug 29, 2011 at 02:27:05PM -0700, Andrew Morton wrote: > ok, I give up. How does this work? It fixes symbol clashes between libc and kernel names by redefining the kernel name in any file that is built against kernel headers. This fix is fairly nasty, but simple and it works. My long-ra

Re: [uml-devel] [PATCH 8/9] um: fix strrchr problems

2011-08-29 Thread Al Viro
On Tue, Aug 30, 2011 at 01:23:31AM +0100, Al Viro wrote: > On Tue, Aug 30, 2011 at 12:25:25AM +0200, Richard Weinberger wrote: > > > I'm building most of the time static. > > Using defconfig and > > CONFIG_STATIC_LINK=y > > it builds fine here (x86_64 and i386) > > 32bit build works, 64bit one br

Re: [uml-devel] [PATCH 8/9] um: fix strrchr problems

2011-08-29 Thread Al Viro
On Tue, Aug 30, 2011 at 12:25:25AM +0200, Richard Weinberger wrote: > I'm building most of the time static. > Using defconfig and > CONFIG_STATIC_LINK=y > it builds fine here (x86_64 and i386) 32bit build works, 64bit one breaks with /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/libc.a(str

Re: [uml-devel] [PATCH 8/9] um: fix strrchr problems

2011-08-29 Thread Boaz Harrosh
On 08/29/2011 03:25 PM, Richard Weinberger wrote: >> >> Try to build it static... > > I'm building most of the time static. > Using defconfig and > CONFIG_STATIC_LINK=y > it builds fine here (x86_64 and i386) > > Thanks, > //richard With some switches and optimization gcc might turn strrchr into

Re: [uml-devel] [PATCH 8/9] um: fix strrchr problems

2011-08-29 Thread Arnaud Lacombe
Hi, On Mon, Aug 29, 2011 at 6:19 PM, Al Viro wrote: > On Tue, Aug 30, 2011 at 12:15:59AM +0200, Richard Weinberger wrote: >> Am 30.08.2011 00:12, schrieb Al Viro: >> >On Mon, Aug 29, 2011 at 11:38:39PM +0200, Richard Weinberger wrote: >> >>> >> >>>ok, I give up.  How does this work? >> >> >> >>*g

Re: [uml-devel] [PATCH 8/9] um: fix strrchr problems

2011-08-29 Thread Richard Weinberger
Am 30.08.2011 00:19, schrieb Al Viro: > On Tue, Aug 30, 2011 at 12:15:59AM +0200, Richard Weinberger wrote: >> Am 30.08.2011 00:12, schrieb Al Viro: >>> On Mon, Aug 29, 2011 at 11:38:39PM +0200, Richard Weinberger wrote: > > ok, I give up. How does this work? *grrr*, you can drop

Re: [uml-devel] [PATCH 8/9] um: fix strrchr problems

2011-08-29 Thread Al Viro
On Tue, Aug 30, 2011 at 12:15:59AM +0200, Richard Weinberger wrote: > Am 30.08.2011 00:12, schrieb Al Viro: > >On Mon, Aug 29, 2011 at 11:38:39PM +0200, Richard Weinberger wrote: > >>> > >>>ok, I give up. How does this work? > >> > >>*grrr*, you can drop this patch. > >>To my excuse, I've dropped

Re: [uml-devel] [PATCH 8/9] um: fix strrchr problems

2011-08-29 Thread Richard Weinberger
Am 30.08.2011 00:12, schrieb Al Viro: > On Mon, Aug 29, 2011 at 11:38:39PM +0200, Richard Weinberger wrote: >>> >>> ok, I give up. How does this work? >> >> *grrr*, you can drop this patch. >> To my excuse, I've dropped it already from my queue but after >> pulling a second time from Al's git bran

Re: [uml-devel] [PATCH 8/9] um: fix strrchr problems

2011-08-29 Thread Al Viro
On Mon, Aug 29, 2011 at 11:38:39PM +0200, Richard Weinberger wrote: > > > >ok, I give up. How does this work? > > *grrr*, you can drop this patch. > To my excuse, I've dropped it already from my queue but after > pulling a second time from Al's git branch it made it again into my > queue and I fo

Re: [uml-devel] [PATCH 8/9] um: fix strrchr problems

2011-08-29 Thread Al Viro
On Mon, Aug 29, 2011 at 02:27:05PM -0700, Andrew Morton wrote: > z:/usr/src/linux-3.1-rc4> grep -r kernel_strrchr . > z:/usr/src/linux-3.1-rc4> > > ok, I give up. How does this work? You are grepping for the wrong thing ;-) It works the same way defines next to it do - both the kernel

Re: [uml-devel] [PATCH 8/9] um: fix strrchr problems

2011-08-29 Thread Richard Weinberger
Am 29.08.2011 23:27, schrieb Andrew Morton: > >> Subject: [PATCH 8/9] um: fix strrchr problems > > What are the problems? > > On Mon, 29 Aug 2011 18:13:38 +0200 > Richard Weinberger wrote: > >> From: Al Viro >> >> Several years old patch, originally by jdike, I think... >> >> Signed-off-by: Al Vir

Re: [uml-devel] [PATCH 8/9] um: fix strrchr problems

2011-08-29 Thread Andrew Morton
> Subject: [PATCH 8/9] um: fix strrchr problems What are the problems? On Mon, 29 Aug 2011 18:13:38 +0200 Richard Weinberger wrote: > From: Al Viro > > Several years old patch, originally by jdike, I think... > > Signed-off-by: Al Viro > Signed-off-by: Richard Weinberger > --- > arch/um/

Re: [uml-devel] [PATCH 1/9] um: disable CMPXCHG_DOUBLE as it breaks UML build

2011-08-29 Thread Christoph Lameter
On Mon, 29 Aug 2011, Richard Weinberger wrote: > Commit b789ef518b2a7231b0668c813f677cee528a9d3f tests for cmpxchg_double > support in the SLUB code and it breaks UML builds with SLUB. Since UML > does not support checking for CPU features, disable CMPXCHG_DOUBLE just > like CMPXCHG_LOCAL is disab

[uml-devel] [PATCH 4/9] um: fix oopsable race in line_close()

2011-08-29 Thread Richard Weinberger
From: Al Viro tty->count is decremented only after ->close() had been called and several tasks can hit it in parallel. As the result, using tty->count to check if you are the last one is broken. We end up leaving line->tty not reset to NULL and the next IRQ on that sucker will blow up trying to

[uml-devel] [PATCH 9/9] um: clean arch_ptrace() up a bit

2011-08-29 Thread Richard Weinberger
From: Al Viro 1) take subarch-specific stuff to subarch_ptrace() 2) PTRACE_{PEEK,POKE}{TEXT,DATA} is handled by ptrace_request() just fine... Signed-off-by: Al Viro Signed-off-by: Richard Weinberger --- arch/um/include/asm/ptrace-generic.h |4 arch/um/kernel/ptrace.c |

[uml-devel] [PATCH 7/9] um: PTRACE_[GS]ETFPXREGS had been wired on the wrong subarch

2011-08-29 Thread Richard Weinberger
From: Al Viro It's 32bit-only, not 64bit-only... And while we are at it, it's set_fpxregs(), not set_fpregs()... Signed-off-by: Al Viro Signed-off-by: Richard Weinberger --- arch/um/sys-i386/ptrace.c | 14 +- arch/um/sys-x86_64/ptrace.c | 14 +- 2 files changed,

[uml-devel] [PATCH 5/9] um: winch_interrupt() can happen inside of free_winch()

2011-08-29 Thread Richard Weinberger
From: Al Viro ... so set winch->fd to -1 before doing free_irq(), to avoid having winch_interrupt() come from/during the latter and attempt to do reactivate_fd() on something that's already gone. Signed-off-by: Al Viro Signed-off-by: Richard Weinberger --- arch/um/drivers/line.c |6 --

[uml-devel] [PATCH 3/9] um: Save FPU registers between task switches

2011-08-29 Thread Richard Weinberger
From: Ingo van Lil Some time ago Jeff prepared a patch (42daba3) for UML to stop saving the process FP state between task switches. The assumption was that since with SKAS0 every guest process runs inside a host process context the host OS will take care of keeping the proper FP state. Unfortunat

[uml-devel] [PATCH 1/9] um: disable CMPXCHG_DOUBLE as it breaks UML build

2011-08-29 Thread Richard Weinberger
From: Thadeu Lima de Souza Cascardo Commit b789ef518b2a7231b0668c813f677cee528a9d3f tests for cmpxchg_double support in the SLUB code and it breaks UML builds with SLUB. Since UML does not support checking for CPU features, disable CMPXCHG_DOUBLE just like CMPXCHG_LOCAL is disabled for UML. Sign

[uml-devel] [PATCH 8/9] um: fix strrchr problems

2011-08-29 Thread Richard Weinberger
From: Al Viro Several years old patch, originally by jdike, I think... Signed-off-by: Al Viro Signed-off-by: Richard Weinberger --- arch/um/Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/um/Makefile b/arch/um/Makefile index fab8121..c0f712c 100644 ---

[uml-devel] UML fixes for 3.1-rcX (2nd try)

2011-08-29 Thread Richard Weinberger
Sorry for sending this patch series again. My mail server thought I'm a spammer. :-\ [PATCH 1/9] um: disable CMPXCHG_DOUBLE as it breaks UML build [PATCH 2/9] um: drivers/xterm.c: fix a file descriptor leak [PATCH 3/9] um: Save FPU registers between task switches [PATCH 4/9] um: fix oopsable race

[uml-devel] [PATCH 6/9] um: fix free_winch() mess

2011-08-29 Thread Richard Weinberger
From: Al Viro while not doing free_irq() from irq handler is commendable, kfree() on the data passed to said handler before free_irq() is Not Good(tm). Freeing the stack it's being run on is also not nice... Solution: delay actually freeing stuff. Signed-off-by: Al Viro Signed-off-by: Richard

[uml-devel] [PATCH 2/9] um: drivers/xterm.c: fix a file descriptor leak

2011-08-29 Thread Richard Weinberger
From: Jonathan Neuschäfer I could use out_close1, but that seems to be the code path to close the fd returned by os_create_unix_socket, and using it to close the fd returned by mkstemp might lead to some confusion, so I don't do it. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Richard Wein

[uml-devel] [PATCH 3/9] um: Save FPU registers between task switches

2011-08-29 Thread Richard Weinberger
From: Ingo van Lil Some time ago Jeff prepared a patch (42daba3) for UML to stop saving the process FP state between task switches. The assumption was that since with SKAS0 every guest process runs inside a host process context the host OS will take care of keeping the proper FP state. Unfortunat

[uml-devel] [PATCH 6/9] um: fix free_winch() mess

2011-08-29 Thread Richard Weinberger
From: Al Viro while not doing free_irq() from irq handler is commendable, kfree() on the data passed to said handler before free_irq() is Not Good(tm). Freeing the stack it's being run on is also not nice... Solution: delay actually freeing stuff. Signed-off-by: Al Viro Signed-off-by: Richard

[uml-devel] [PATCH 5/9] um: winch_interrupt() can happen inside of free_winch()

2011-08-29 Thread Richard Weinberger
From: Al Viro ... so set winch->fd to -1 before doing free_irq(), to avoid having winch_interrupt() come from/during the latter and attempt to do reactivate_fd() on something that's already gone. Signed-off-by: Al Viro Signed-off-by: Richard Weinberger --- arch/um/drivers/line.c |6 --

[uml-devel] [PATCH 7/9] um: PTRACE_[GS]ETFPXREGS had been wired on the wrong subarch

2011-08-29 Thread Richard Weinberger
From: Al Viro It's 32bit-only, not 64bit-only... And while we are at it, it's set_fpxregs(), not set_fpregs()... Signed-off-by: Al Viro Signed-off-by: Richard Weinberger --- arch/um/sys-i386/ptrace.c | 14 +- arch/um/sys-x86_64/ptrace.c | 14 +- 2 files changed,

[uml-devel] [PATCH 4/9] um: fix oopsable race in line_close()

2011-08-29 Thread Richard Weinberger
From: Al Viro tty->count is decremented only after ->close() had been called and several tasks can hit it in parallel. As the result, using tty->count to check if you are the last one is broken. We end up leaving line->tty not reset to NULL and the next IRQ on that sucker will blow up trying to

[uml-devel] [PATCH 1/9] um: disable CMPXCHG_DOUBLE as it breaks UML build

2011-08-29 Thread Richard Weinberger
From: Thadeu Lima de Souza Cascardo Commit b789ef518b2a7231b0668c813f677cee528a9d3f tests for cmpxchg_double support in the SLUB code and it breaks UML builds with SLUB. Since UML does not support checking for CPU features, disable CMPXCHG_DOUBLE just like CMPXCHG_LOCAL is disabled for UML. Sign

[uml-devel] UML fixes for 3.1-rcX

2011-08-29 Thread Richard Weinberger
[PATCH 1/9] um: disable CMPXCHG_DOUBLE as it breaks UML build [PATCH 2/9] um: drivers/xterm.c: fix a file descriptor leak [PATCH 3/9] um: Save FPU registers between task switches [PATCH 4/9] um: fix oopsable race in line_close() [PATCH 5/9] um: winch_interrupt() can happen inside of free_winch() [P

[uml-devel] [PATCH 2/9] um: drivers/xterm.c: fix a file descriptor leak

2011-08-29 Thread Richard Weinberger
From: Jonathan Neuschäfer I could use out_close1, but that seems to be the code path to close the fd returned by os_create_unix_socket, and using it to close the fd returned by mkstemp might lead to some confusion, so I don't do it. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Richard Wein