* [PATCH] um: Skip futex_atomic_cmpxchg_inatomic() test
@ 2014-12-10 13:02 Richard Weinberger
2014-12-15 10:27 ` [uml-devel] " Daniel Walter
0 siblings, 1 reply; 2+ messages in thread
From: Richard Weinberger @ 2014-12-10 13:02 UTC (permalink / raw)
To: user-mode-linux-devel
Cc: linux-kernel, miklos, lftan, arnd, geert, Richard Weinberger
futex_atomic_cmpxchg_inatomic() does not work on UML because
it triggers a copy_from_user() in kernel context.
On UML copy_from_user() can only be used if the kernel was called
by a real user space process such that UML can use ptrace()
to fetch the value.
Reported-by: Miklos Szeredi <miklos@szeredi.hu>
Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
---
arch/um/Kconfig.common | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/um/Kconfig.common b/arch/um/Kconfig.common
index 87bc868..d195a87 100644
--- a/arch/um/Kconfig.common
+++ b/arch/um/Kconfig.common
@@ -3,6 +3,7 @@ config UML
default y
select HAVE_ARCH_AUDITSYSCALL
select HAVE_UID16
+ select HAVE_FUTEX_CMPXCHG if FUTEX
select GENERIC_IRQ_SHOW
select GENERIC_CPU_DEVICES
select GENERIC_IO
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [uml-devel] [PATCH] um: Skip futex_atomic_cmpxchg_inatomic() test
2014-12-10 13:02 [PATCH] um: Skip futex_atomic_cmpxchg_inatomic() test Richard Weinberger
@ 2014-12-15 10:27 ` Daniel Walter
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Walter @ 2014-12-15 10:27 UTC (permalink / raw)
To: Richard Weinberger
Cc: arnd, miklos, linux-kernel, geert, lftan, user-mode-linux-devel
----- Original Message -----
> From: "Richard Weinberger" <richard@nod.at>
> To: user-mode-linux-devel@lists.sourceforge.net
> Cc: arnd@arndb.de, miklos@szeredi.hu, "Richard Weinberger" <richard@nod.at>, linux-kernel@vger.kernel.org,
> geert@linux-m68k.org, lftan@altera.com
> Sent: Wednesday, December 10, 2014 1:02:15 PM
> Subject: [uml-devel] [PATCH] um: Skip futex_atomic_cmpxchg_inatomic() test
>
> futex_atomic_cmpxchg_inatomic() does not work on UML because
> it triggers a copy_from_user() in kernel context.
> On UML copy_from_user() can only be used if the kernel was called
> by a real user space process such that UML can use ptrace()
> to fetch the value.
>
> Reported-by: Miklos Szeredi <miklos@szeredi.hu>
> Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Richard Weinberger <richard@nod.at>
> ---
> arch/um/Kconfig.common | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/um/Kconfig.common b/arch/um/Kconfig.common
> index 87bc868..d195a87 100644
> --- a/arch/um/Kconfig.common
> +++ b/arch/um/Kconfig.common
> @@ -3,6 +3,7 @@ config UML
> default y
> select HAVE_ARCH_AUDITSYSCALL
> select HAVE_UID16
> + select HAVE_FUTEX_CMPXCHG if FUTEX
> select GENERIC_IRQ_SHOW
> select GENERIC_CPU_DEVICES
> select GENERIC_IO
> --
> 2.1.0
>
Hi,
tested it a few days, looks good.
Tested-by: Daniel Walter <d.walter@0x90.at>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-15 10:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-10 13:02 [PATCH] um: Skip futex_atomic_cmpxchg_inatomic() test Richard Weinberger
2014-12-15 10:27 ` [uml-devel] " Daniel Walter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox