[uml-devel] [PATCH 04/15] hostfs: Handle bogus st.mode

2015-03-16 Thread Richard Weinberger
Make sure that we return EIO if one passes an invalid st.mode into hostfs. Signed-off-by: Richard Weinberger --- fs/hostfs/hostfs_kern.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 92b008f..8163aac 100644

[uml-devel] [PATCH 08/15] hostfs: Use __getname() in follow_link

2015-03-16 Thread Richard Weinberger
Be consistent with all other functions in hostfs and just use __getname(). Signed-off-by: Richard Weinberger --- fs/hostfs/hostfs_kern.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index

[uml-devel] Hostfs updates

2015-03-16 Thread Richard Weinberger
Host got a visit from the janitor. [PATCH 01/15] hostfs: hostfs_file_open: Switch to data locking model [PATCH 02/15] hostfs: hostfs_file_open: Fix a fd leak in [PATCH 03/15] hostfs: Allow fsync on directories [PATCH 04/15] hostfs: Handle bogus st.mode [PATCH 05/15] hostfs: Make hostfs_readpage mo

[uml-devel] [PATCH 09/15] hostfs: Report append flag in ->show_options()

2015-03-16 Thread Richard Weinberger
hostfs has an "append" mount option. Report it. Signed-off-by: Richard Weinberger --- fs/hostfs/hostfs_kern.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index c60d886..06b3e3f 100644 --- a/fs/hostfs/hostfs_kern.c +++ b

[uml-devel] [PATCH 02/15] hostfs: hostfs_file_open: Fix a fd leak in hostfs_file_open

2015-03-16 Thread Richard Weinberger
In case of a race between to callers of hostfs_file_open() it can happen that a file describtor is leaked. Signed-off-by: Richard Weinberger --- fs/hostfs/hostfs_kern.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 104d58d..112ba5a

[uml-devel] [PATCH 01/15] hostfs: hostfs_file_open: Switch to data locking model

2015-03-16 Thread Richard Weinberger
Instead of serializing hostfs_file_open() we can use a per inode mutex to protect ->mode. Signed-off-by: Richard Weinberger --- fs/hostfs/hostfs_kern.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c in

[uml-devel] [PATCH 07/15] hostfs: Remove open coded strcpy()

2015-03-16 Thread Richard Weinberger
Signed-off-by: Richard Weinberger --- fs/hostfs/hostfs_kern.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 3082a7e..7260f16 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -105,11

[uml-devel] [PATCH 15/15] hostfs: No need to box and later unbox the file mode

2015-03-16 Thread Richard Weinberger
There is really no point in having a function with 10 arguments. Reported-by: Daniel Walter Signed-off-by: Richard Weinberger --- fs/hostfs/hostfs.h | 3 +-- fs/hostfs/hostfs_kern.c | 5 + fs/hostfs/hostfs_user.c | 17 +++-- 3 files changed, 5 insertions(+), 20 deletions

[uml-devel] [PATCH 12/15] hostfs: Remove superfluous initializations in hostfs_open()

2015-03-16 Thread Richard Weinberger
Only initialize what we really need. Signed-off-by: Richard Weinberger --- fs/hostfs/hostfs_kern.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 80ced3d..cf80a30 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs

[uml-devel] [PATCH 13/15] hostfs: Set page flags in hostfs_readpage() correctly

2015-03-16 Thread Richard Weinberger
In case of an error set the page error flag and clear the up-to-date flag. If the read was successful clear the error flag unconditionally. Signed-off-by: Richard Weinberger --- fs/hostfs/hostfs_kern.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/hostfs

[uml-devel] [PATCH 11/15] hostfs: hostfs_open: Reset open flags upon each retry

2015-03-16 Thread Richard Weinberger
...otherwise we might end up with an incorrect mode mode. Signed-off-by: Richard Weinberger --- fs/hostfs/hostfs_kern.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 8bbceae..80ced3d 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs

[uml-devel] [PATCH 10/15] hostfs: Remove superfluous test in hostfs_open()

2015-03-16 Thread Richard Weinberger
Signed-off-by: Richard Weinberger --- fs/hostfs/hostfs_kern.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 06b3e3f..8bbceae 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -318,9 +318,7

[uml-devel] [PATCH 05/15] hostfs: Make hostfs_readpage more readable

2015-03-16 Thread Richard Weinberger
...to make life easier for future readers of that code. Signed-off-by: Richard Weinberger --- fs/hostfs/hostfs_kern.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 8163aac..67e556c 100644 --- a/fs

[uml-devel] [PATCH 14/15] hostfs: Use page_offset()

2015-03-16 Thread Richard Weinberger
The kernel offers a helper function for that, use it. Signed-off-by: Richard Weinberger --- fs/hostfs/hostfs_kern.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index f154747..f82f98a5 100644 --- a/fs/hostfs

[uml-devel] [PATCH 06/15] hostfs: Add a BUG_ON to detect behavior changes of dentry_path_raw()

2015-03-16 Thread Richard Weinberger
hostfs' __dentry_name() relies on the fact that dentry_path_raw() will place the path name at the end of the provided buffer. While this is okay, add a BUG_ON() to detect behavior changes as soon as possible. Signed-off-by: Richard Weinberger --- fs/hostfs/hostfs_kern.c | 7 +++ 1

[uml-devel] [PATCH 03/15] hostfs: Allow fsync on directories

2015-03-16 Thread Richard Weinberger
speaking correct common userspace like dpkg(1) stumbles over that and makes it impossible to use hostfs as root filesystem. The fix is easy, wire up the existing host open/fsync functions to the directory file operations. Reported-by: Daniel Gröber Signed-off-by: Richard Weinberger --- fs/hostfs

Re: [uml-devel] [PATCH 07/15] hostfs: Remove open coded strcpy()

2015-03-16 Thread Richard Weinberger
Am 16.03.2015 um 13:03 schrieb Geert Uytterhoeven: > On Mon, Mar 16, 2015 at 12:41 PM, Richard Weinberger wrote: >> --- a/fs/hostfs/hostfs_kern.c >> +++ b/fs/hostfs/hostfs_kern.c >> @@ -105,11 +105,10 @@ static char *__dentry_name(struct dentry *dentry, char >> *name)

Re: [uml-devel] [PATCH 1/2] mm: Introducing arch_remap hook

2015-03-21 Thread Richard Weinberger
Am 20.03.2015 um 16:53 schrieb Laurent Dufour: > Some architecture would like to be triggered when a memory area is moved > through the mremap system call. > > This patch is introducing a new arch_remap mm hook which is placed in the > path of mremap, and is called before the old area is unmapped

Re: [uml-devel] starting an 32 bit x86 chroot uml image at a ahrdened Gentoo amd64 system fails

2015-03-21 Thread Richard Weinberger
Am 16.03.2015 um 14:23 schrieb Toralf Förster: > On 03/15/2015 05:56 PM, Richard Weinberger wrote: >> Then please move the hardened gcc to /dev/null. ;-) > > yes, at least to compile the UML linux > >> If you can tell me what hardening feature is the root cause I can

[uml-devel] [PATCH 7/7] um: hostfs: Reduce number of syscalls in readdir

2015-03-26 Thread Richard Weinberger
Currently hostfs issues every time a seekdir(), in fact it has to do this only upon the first call. Also telldir() can be omitted as we can obtain the directory offset from readdir(). Signed-off-by: Richard Weinberger --- fs/hostfs/hostfs.h | 3 ++- fs/hostfs/hostfs_kern.c | 1 + fs

[uml-devel] [PATCH 4/7] um: Remove SKAS3/4 support

2015-03-26 Thread Richard Weinberger
. With SKAS0 mode (separated kernel address space using 0 host patches), default since 2005, SKAS3/4 is obsolete and can be removed. Signed-off-by: Richard Weinberger --- arch/um/include/shared/os.h | 2 - arch/um/include/shared/skas/proc_mm.h| 44 -- arch/um/include

[uml-devel] [PATCH 2/7] um: Remove ia64 cruft

2015-03-26 Thread Richard Weinberger
That code is a relict from the early days of UML. ia64 support was never completed nor worked. Let's rip it out. Signed-off-by: Richard Weinberger --- arch/um/Makefile-ia64 | 1 - arch/um/sys-ia64/Makefile | 11 --- arch/um/sys-ia64/sysdep/ptrace.h

[uml-devel] [PATCH 1/7] um: Remove dead code from stacktrace

2015-03-26 Thread Richard Weinberger
Remove left over code from commit 970e51feaddb (um: Add support for CONFIG_STACKTRACE) Signed-off-by: Richard Weinberger --- arch/um/kernel/sysrq.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/um/kernel/sysrq.c b/arch/um/kernel/sysrq.c index 894c8d3..aa1b56f

[uml-devel] [PATCH 6/7] um: Remove broken highmem support

2015-03-26 Thread Richard Weinberger
Highmem was always buggy and experimental on UML(i386). In times where 64 bit computers are default we can remove that experimental code. Signed-off-by: Richard Weinberger --- arch/um/Kconfig.um| 12 arch/um/include/asm/fixmap.h | 4 --- arch/um/include/asm/pgtable.h | 6

[uml-devel] [PATCH 5/7] um: Remove broken SMP support

2015-03-26 Thread Richard Weinberger
At times where UML used the TT mode to operate it had kind of SMP support. It never got finished nor was stable. Let's rip out that cruft and stop confusing developers which do tree-wide SMP cleanups. If someone wants SMP support UML it has do be done from scratch. Signed-off-by: Ri

[uml-devel] [PATCH 3/7] um: Remove ppc cruft

2015-03-26 Thread Richard Weinberger
That code is a relict from the early days of UML. ppc support was never completed nor worked. Let's rip it out. Signed-off-by: Richard Weinberger --- arch/um/Makefile-ppc| 9 --- arch/um/sys-ppc/Makefile| 65 arch/um/sys-pp

Re: [uml-devel] [PATCH v3] um: Print minimum physical memory requirement

2015-04-13 Thread Richard Weinberger
On Fri, Apr 3, 2015 at 4:51 PM, Thomas Meyer wrote: > Print a more sensible message about the minimum physical memory > requirement. > > Signed-off-by: Thomas Meyer All of your three patches are queued for 4.1! :-) -- Thanks, //richard -

[uml-devel] [GIT PULL] UML updates for 4.1

2015-04-15 Thread Richard Weinberger
Andrey Ryabinin (1): x86, UML: fix integer overflow in ELF_ET_DYN_BASE Richard Weinberger (22): hostfs: hostfs_file_open: Switch to data locking model hostfs: hostfs_file_open: Fix a fd leak in hostfs_file_open hostfs: Allow

[uml-devel] Kill hppfs

2015-04-22 Thread Richard Weinberger
hch and Al found that hppfs has some serious issues[0]. As the filesystem as never marked as stable nor in heavy use we decided to rip it out. If someone is using it, speak up now. I plan to remove it in the v4.2 merge window. Now we have FUSE which can be used to implement such a filesystem in a

[uml-devel] [PATCH] um: Remove hppfs

2015-04-22 Thread Richard Weinberger
hppfs (honeypot procfs) was an attempt to use UML as honeypot. It was never stable nor in heavy use. As Al Viro and Christoph Hellwig pointed some major issues out it is better to let it die. Signed-off-by: Richard Weinberger --- arch/um/Kconfig.um | 15 -- fs/Makefile| 1 - fs

Re: [uml-devel] [UM] Long loop in __getnsdayoftime() after resume from ram

2015-04-26 Thread Richard Weinberger
On Fri, Apr 24, 2015 at 9:58 PM, Thomas Meyer wrote: > Am Montag, den 20.10.2014, 11:56 +0200 schrieb Richard Weinberger: >> Am 20.10.2014 um 11:51 schrieb Thomas Meyer: >> >> Hmm, does this always happen? >> > >> > Yes, my single core system seems

Re: [uml-devel] [UM] Long loop in __getnsdayoftime() after resume from ram

2015-04-26 Thread Richard Weinberger
Am 26.04.2015 um 20:32 schrieb Richard Weinberger: > On Fri, Apr 24, 2015 at 9:58 PM, Thomas Meyer wrote: >> Any ideas? > > Can you give the attached patch a try? > Let's see if it proves my theory. > Looks like UML's clocksource needs fixing. Please give also

Re: [uml-devel] [UM] Long loop in __getnsdayoftime() after resume from ram

2015-04-26 Thread Richard Weinberger
Hi! Am 26.04.2015 um 22:57 schrieb Thomas Meyer: > Am Sonntag, den 26.04.2015, 20:32 +0200 schrieb Richard Weinberger: >> On Fri, Apr 24, 2015 at 9:58 PM, Thomas Meyer wrote: >>> Am Montag, den 20.10.2014, 11:56 +0200 schrieb Richard Weinberger: >>>> Am 20.10.2014

Re: [uml-devel] [UM] Long loop in __getnsdayoftime() after resume from ram

2015-04-27 Thread Richard Weinberger
On Mon, Apr 27, 2015 at 7:47 AM, Anton Ivanov wrote: > On 26/04/15 22:00, Richard Weinberger wrote: >> >>>> Can you give the attached patch a try? >>>> Let's see if it proves my theory. >>>> Looks like UML's clocksource needs fixing. >&

[uml-devel] [PATCH] hostfs: Use correct mask for file mode

2015-05-04 Thread Richard Weinberger
S_IFMT is obviously wrong and needs to be 0777. We're interested in the file mode, not the type. Fixes: b98b91029c (hostfs: No need to box and later unbox the file mode) Reported-by: Markus Stenberg Signed-off-by: Richard Weinberger --- fs/hostfs/hostfs_kern.c | 2 +- 1 file chang

Re: [uml-devel] [PATCH] hostfs: Use correct mask for file mode

2015-05-04 Thread Richard Weinberger
Am 04.05.2015 um 15:22 schrieb Geert Uytterhoeven: > On Mon, May 4, 2015 at 2:53 PM, Richard Weinberger wrote: >> --- a/fs/hostfs/hostfs_kern.c >> +++ b/fs/hostfs/hostfs_kern.c >> @@ -581,7 +581,7 @@ static int hostfs_create(struct inode *dir, struct >> d

Re: [uml-devel] [PATCH v6] um: Add a high resolution timer subsystem

2015-05-10 Thread Richard Weinberger
On Sun, May 10, 2015 at 1:14 AM, Thomas Meyer wrote: > Hi, > > Changes: > - also create posix timer in stub_clone_handler() > - incorporated antons remarks Hm, this patch does a *lot* more than the changelog says. > > diff --git a/arch/um/Makefile b/arch/um/Makefile > index 17d4460..a4a434f 1006

Re: [uml-devel] [PATCH v6] um: Add a high resolution timer subsystem

2015-05-10 Thread Richard Weinberger
Am 10.05.2015 um 16:34 schrieb Thomas Meyer: > >> Am 10.05.2015 um 14:35 schrieb Richard Weinberger >> : >> >>> On Sun, May 10, 2015 at 1:14 AM, Thomas Meyer wrote: >>> Hi, >>> >>> Changes: >>> - also create posix timer in stu

[uml-devel] [PATCH 5/5] um: Rework uaccess code

2015-05-11 Thread Richard Weinberger
Rework UML's uaccess code to reuse as much as possible from asm-generic/uaccess.c. Signed-off-by: Richard Weinberger --- arch/um/include/asm/thread_info.h | 2 +- arch/um/include/asm/uaccess.h | 176 ++ arch/um/kernel/skas/uaccess.c

[uml-devel] [PATCH 2/5] um: Add asm/elf.h to vma.c

2015-05-11 Thread Richard Weinberger
um_vdso_addr is defined in asm/elf.h. Signed-off-by: Richard Weinberger --- arch/x86/um/vdso/vma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/um/vdso/vma.c b/arch/x86/um/vdso/vma.c index 916cda4..237c683 100644 --- a/arch/x86/um/vdso/vma.c +++ b/arch/x86/um/vdso/vma.c @@ -10,6

[uml-devel] [PATCH 4/5] um: Add uaccess.h to ldt.c

2015-05-11 Thread Richard Weinberger
...for userspace memory access. Signed-off-by: Richard Weinberger --- arch/x86/um/ldt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/um/ldt.c b/arch/x86/um/ldt.c index 5c0b711..9701a4f 100644 --- a/arch/x86/um/ldt.c +++ b/arch/x86/um/ldt.c @@ -6,6 +6,7 @@ #include #include

[uml-devel] [PATCH 3/5] um: Add uaccess.h to syscalls_64.c

2015-05-11 Thread Richard Weinberger
It's using put_user() and needs this header. Signed-off-by: Richard Weinberger --- arch/x86/um/syscalls_64.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/um/syscalls_64.c b/arch/x86/um/syscalls_64.c index adb08eb..e655227 100644 --- a/arch/x86/um/syscalls_64.c +++ b/arch/x

[uml-devel] Rework UML's uaccess code

2015-05-11 Thread Richard Weinberger
By reusing asm-generic/uaccess.h we can drop a lot of UML's ad-hoc uaccess code and make it much more straightforward. It uncovered also some header issues which got resolved. [PATCH 1/5] um: Cleanup mem_32/64.c headers [PATCH 2/5] um: Add asm/elf.h to vma.c [PATCH 3/5] um: Add uaccess.h to syscal

[uml-devel] [PATCH 1/5] um: Cleanup mem_32/64.c headers

2015-05-11 Thread Richard Weinberger
Include only headers we really need. Signed-off-by: Richard Weinberger --- arch/x86/um/mem_32.c | 3 +-- arch/x86/um/mem_64.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/x86/um/mem_32.c b/arch/x86/um/mem_32.c index f40281e..744afdc 100644 --- a/arch/x86/um

Re: [uml-devel] [PATCH v6] um: Add a high resolution timer subsystem

2015-05-11 Thread Richard Weinberger
Am 10.05.2015 um 16:34 schrieb Thomas Meyer: > >> Am 10.05.2015 um 14:35 schrieb Richard Weinberger >> : >> >>> On Sun, May 10, 2015 at 1:14 AM, Thomas Meyer wrote: >>> Hi, >>> >>> Changes: >>> - also create posix timer in stu

[uml-devel] [GIT PULL] UML fixes for 4.1-rc4

2015-05-15 Thread Richard Weinberger
. Richard Weinberger (1): hostfs: Use correct mask for file mode fs/hostfs/hostfs_kern.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- One dashboard for servers and applications across Physical

Re: [uml-devel] [PATCH] um: Switch clocksource to hrtimers

2015-05-19 Thread Richard Weinberger
On Tue, May 19, 2015 at 6:19 PM, Anton Ivanov wrote: > Same story. > > Overall works quite well, the moment I give it the "dselect upgrade > test" the userspace hangs. > > Kernel continues to work - forwarding, icmp, uml_mconsole are fine. Do you know where it hangs? Maybe the kernel does not get

Re: [uml-devel] [PATCH] um: Switch clocksource to hrtimers

2015-05-19 Thread Richard Weinberger
On Sun, May 17, 2015 at 11:25 AM, Thomas Meyer wrote: > Switch the UML clocksource from interval timers to posix interval timers > and move to a monotonic timer. > > This fixes suspend&resume related timer issues and improves network > performance as TCP state machines are now fed with the correct

Re: [uml-devel] [PATCH] um: handle GCC 5.x like GCC 4.x

2015-05-24 Thread Richard Weinberger
On Sun, May 24, 2015 at 3:23 PM, Hans-Werner Hilse wrote: > Compiler compatibility macros were conditionally defined based on > the compiler version. The it tested __GNUC__, but compared it to > a maximum value of 4, breaking compilation on now current GCC 5.x. > Thus, the check is extended to che

Re: [uml-devel] [PATCH] um: handle GCC 5.x like GCC 4.x

2015-05-24 Thread Richard Weinberger
On Sun, May 24, 2015 at 6:12 PM, Richard Weinberger wrote: > Hmm, instead of continue with that hack it would be much nicer to get rid > of the copy&pasted __user define. Hans-Werner, can you please give the attached patch a try? It should fix your issue too. -- Thanks, //richard di

Re: [uml-devel] [PATCH] um: Switch clocksource to hrtimers

2015-05-31 Thread Richard Weinberger
Am 20.05.2015 um 07:26 schrieb Thomas Meyer: > > Am 20.05.2015 12:12 vorm. schrieb Richard Weinberger > : >> >> On Sun, May 17, 2015 at 11:25 AM, Thomas Meyer wrote: >>> Switch the UML clocksource from interval timers to posix interval timers >>> and m

Re: [uml-devel] [PATCH] um: kernel: ksyms: Export symbol syscall() for fixing modpost issue

2015-05-31 Thread Richard Weinberger
Am 04.10.2014 um 15:11 schrieb Chen Gang: > syscall() is implemented in libc.so/a (e.g. for glibc, in "syscall.o"), > so for normal ".o" files, it is undefined, neither can be found within > kernel wide, so will break modpost. > > Since ".o" files is OK, can simply export 'syscall' symbol, let mod

Re: [uml-devel] [PATCH 3/3] um/os-Linux: Use char[] for syscall_stub declarations

2015-05-31 Thread Richard Weinberger
Am 12.10.2014 um 13:02 schrieb Nicolas Iooss: > When declaring __syscall_stub_start, use the same type in UML userspace > code as in arch/um/include/asm/sections.h. > > While at it, also declare batch_syscall_stub as char[]. > > Signed-off-by: Nicolas Iooss > --- > arch/um/os-Linux/skas/mem.c

[uml-devel] [PATCH 1/5] um: Catch unprotected user memory access

2015-05-31 Thread Richard Weinberger
fault code to detect that situation and causes a panic() such that the root cause of the unprotected memory access can be found and fixed. Signed-off-by: Richard Weinberger --- arch/um/kernel/trap.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/um/kernel/trap.c b/arch/um/kernel

[uml-devel] [PATCH 3/5] um: Remove copy&paste code from init.h

2015-05-31 Thread Richard Weinberger
As we got rid of the __KERNEL__ abuse, we can directly include linux/compiler.h now. This also allows gcc 5 to build UML. Reported-by: Hans-Werner Hilse Signed-off-by: Richard Weinberger --- arch/um/include/shared/init.h | 22 +- 1 file changed, 1 insertion(+), 21 deletions

[uml-devel] [PATCH 4/5] um: Handle tracehook_report_syscall_entry() result

2015-05-31 Thread Richard Weinberger
tracehook_report_syscall_entry() is allowed to fail, in case of failure we have to abort the current syscall. Signed-off-by: Richard Weinberger --- arch/um/include/asm/ptrace-generic.h | 2 +- arch/um/kernel/ptrace.c | 6 +++--- arch/um/kernel/skas/syscall.c| 6 +- 3

[uml-devel] [PATCH 2/5] um: Stop abusing __KERNEL__

2015-05-31 Thread Richard Weinberger
Currently UML is abusing __KERNEL__ to distinguish between kernel and host code (os-Linux). It is better to use a custom define such that existing users of __KERNEL__ don't get confused. Signed-off-by: Richard Weinberger --- arch/um/Makefile| 7 --- arch/um/dr

[uml-devel] [PATCH 5/5] um: Fix mconsole dependency

2015-05-31 Thread Richard Weinberger
mconsole depends on CONFIG_PROC_FS. Signed-off-by: Richard Weinberger --- arch/um/Kconfig.um | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/um/Kconfig.um b/arch/um/Kconfig.um index bd5459c..28a9885 100644 --- a/arch/um/Kconfig.um +++ b/arch/um/Kconfig.um @@ -46,6 +46,7 @@ config

Re: [uml-devel] [PATCH] um: Switch clocksource to hrtimers

2015-05-31 Thread Richard Weinberger
Am 31.05.2015 um 21:00 schrieb Thomas Meyer: >> Ping. >> Would be nice to have this patch for the 4.2 merge window. > > I can provide you the current version of the patch, but I'm not sure if > it's ready for inclusion yet. That's fine. I'll look at it. Just rebase it against Linus' tree or uml-n

Re: [uml-devel] [PATCH 1/3] um: Fallback when C library does not provide __ptr_t

2015-06-10 Thread Richard Weinberger
On Wed, Jun 10, 2015 at 11:20 PM, Hans-Werner Hilse wrote: > Glibc provides __ptr_t for the pointer in the stack_t struct, > but other C libraries - namely musl - do not necessarily do so. > In that case, fall back to a void* pointer. Please just kill __ptr_t in UML. -- Thanks, //richard -

Re: [uml-devel] [PATCH 2/3] um: Do not use stdin and stdout names for variables

2015-06-10 Thread Richard Weinberger
On Wed, Jun 10, 2015 at 11:21 PM, Hans-Werner Hilse wrote: > Naming local variables "stdin" and "stdout" is fine with glibc, > other C libraries, namely musl, will however complain. Wait, what?! These are not local variables, they are struct members. What exactly is the issue with musl? Sounds v

Re: [uml-devel] [PATCH 3/3] um: Include sys/types.h for makedev(), major(), minor()

2015-06-10 Thread Richard Weinberger
On Wed, Jun 10, 2015 at 11:21 PM, Hans-Werner Hilse wrote: > The functions in question are not part of the POSIX standard, > documentation however hints that the corresponding header shall > be sys/types.h. C libraries other than glibc, namely musl, did > not include that header via other ways and

Re: [uml-devel] [PATCH 2/3] um: Do not use stdin and stdout names for variables

2015-06-10 Thread Richard Weinberger
On Thu, Jun 11, 2015 at 8:35 AM, Hans-Werner Hilse wrote: > Hi, > > Am 2015-06-10 23:37, schrieb Richard Weinberger: >> On Wed, Jun 10, 2015 at 11:21 PM, Hans-Werner Hilse >> wrote: >>> Naming local variables "stdin" and "stdout" is fine wi

Re: [uml-devel] [PATCH 2/3] um: Do not use stdin and stdout names for variables

2015-06-11 Thread Richard Weinberger
On Thu, Jun 11, 2015 at 9:54 AM, Hans-Werner Hilse wrote: > Am 2015-06-11 08:49, schrieb Richard Weinberger: >> On Thu, Jun 11, 2015 at 8:35 AM, Hans-Werner Hilse >> wrote: >>> Hi, >>> >>> Am 2015-06-10 23:37, schrieb Richard Weinberger: >>>&g

Re: [uml-devel] [PATCH 2/3] um: Do not use stdin and stdout names for variables

2015-06-11 Thread Richard Weinberger
On Thu, Jun 11, 2015 at 10:26 AM, Hans-Werner Hilse wrote: > Am 2015-06-11 10:09, schrieb Richard Weinberger: >> On Thu, Jun 11, 2015 at 9:54 AM, Hans-Werner Hilse >> wrote: >>> About forbidden use of names/identifiers from the stdlib, the C >>> standard >&g

Re: [uml-devel] [PATCH] um: Fix a build error

2015-06-15 Thread Richard Weinberger
Am 15.06.2015 um 16:43 schrieb Firo Yang: > Gcc5 failed to build uml. > Update codes to test __GNUC__ with 5 will be happier. > > Signed-off-by: Firo Yang The issue got already addressed by patches: [PATCH 2/5] um: Stop abusing __KERNEL__ [PATCH 3/5] um: Remove copy&paste code from init.h They

Re: [uml-devel] [PATCH v2 0/3] musl compatibility patches

2015-06-25 Thread Richard Weinberger
On Thu, Jun 11, 2015 at 11:29 AM, Hans-Werner Hilse wrote: > This set of patches facilitate compilation with the musl libc, > either linked to shared libraries or static. > > Hans-Werner Hilse (3): > um: Do not use __ptr_t type for stack_t's .ss pointer > um: Do not use stdin and stdout identi

Re: [uml-devel] [PATCH] missed musl compatibility patch

2015-06-27 Thread Richard Weinberger
On Fri, Jun 26, 2015 at 10:36 AM, Hans-Werner Hilse wrote: > I'm sorry but one patch that is necessary for compilation against > musl libc was still missing in the series I sent earlier. > (Thank you very much for applying!) Okay. We can merge it for -rc2. -- Thanks, //richard

[uml-devel] [GIT PULL] UML updates for 4.2

2015-06-28 Thread Richard Weinberger
Do not use stdin and stdout identifiers for struct members um: Include sys/types.h for makedev(), major(), minor() Nicolas Iooss (3): um: Create asm/sections.h um: Use char[] for linker script address declarations um/os-Linux: Use char[] for syscall_stub declaration

[uml-devel] [PATCH] um: Fix out-of-tree build

2015-06-28 Thread Richard Weinberger
Commit 30b11ee9a (um: Remove copy&paste code from init.h) uncovered an issue wrt. out-of-tree builds. For out-of-tree builds, we must not rely on relative paths. Before 30b11ee9a it worked by chance as no host code included generated header files. Signed-off-by: Richard Weinberger --- arc

Re: [uml-devel] [PATCH] um: umid: Use strdup to simplify code

2015-07-08 Thread Richard Weinberger
Am 08.07.2015 um 21:15 schrieb Christophe JAILLET: > Replace a malloc+strcpy by an equivalent strdup in order to improve > readability. Makes sense! > Turn a some spaces into a tab to be consistent with the rest of the code. Do this in an extra patch. One logical change per patch please. Thanks

Re: [uml-devel] [PATCH] um: umid: Use strdup to simplify code

2015-07-08 Thread Richard Weinberger
Hi Jeff, Am 08.07.2015 um 21:56 schrieb Jeff Dike: > ... Nice patch elided ... > > I have a bit of a problem here - Christophe isn't a member of > uml-devel, so Mailman is sitting on his post until it's approved by a > list moderator, namely me. > > So far, so good, except that my uml-devel pass

Re: [uml-devel] linux-4.2-rc2/arch/um/drivers/net_user.c:258: possible missing call to va_end ?

2015-07-13 Thread Richard Weinberger
Hi! Can you please render this into a proper patch and re-send to the mailinglist? Thanks, //richard Am 13.07.2015 um 11:08 schrieb David Binderman: > Hello there, > > [linux-4.2-rc2/arch/um/drivers/net_user.c:258]: (error) va_list 'ap' was > opened but not closed by va_end(). > > Source code

Re: [uml-devel] linux-4.2-rc2/arch/um/drivers/net_user.c:258: possible missing call to va_end ?

2015-07-13 Thread Richard Weinberger
Am 13.07.2015 um 14:58 schrieb Geert Uytterhoeven: > Hi David, > > On Mon, Jul 13, 2015 at 2:52 PM, David Binderman wrote: >> >>> Can you please render this into a proper patch and re-send to the >>> mailinglist? >> >> I have a 100% failure rate with patc

Re: [uml-devel] uml_net zombie processes

2015-07-13 Thread Richard Weinberger
On Mon, Jul 13, 2015 at 3:41 PM, Thomas Meyer wrote: > Hi, > > The uml_net network setup "fails" on my computer with: > > [ 15.93] helper_wait : waitpid process 11673 failed, errno = 10 > [ 15.93] * modprobe tun >* ifconfig tap0 192.168.10.1 netmask 255.255.255.255 up >

Re: [uml-devel] uml_net zombie processes

2015-07-13 Thread Richard Weinberger
Am 13.07.2015 um 15:58 schrieb Thomas Meyer: > Am Montag, den 13.07.2015, 15:52 +0200 schrieb Richard Weinberger: >> On Mon, Jul 13, 2015 at 3:41 PM, Thomas Meyer >> wrote: >>> Hi, >>> >>> The uml_net network setup "fails" on my computer with:

Re: [uml-devel] uml_net zombie processes

2015-07-13 Thread Richard Weinberger
Am 13.07.2015 um 16:24 schrieb Thomas Meyer: >> Yeah. And please add a dump_stack() to figure out where it was >> called. > > I think calling dump_stack() somehow changed the errno to 25?! > > +extern __attribute__((regparm(0))) void dump_stack(void); Hmm, maybe the regparm(0) kills your stac

Re: [uml-devel] uml_net zombie processes

2015-07-13 Thread Richard Weinberger
Am 13.07.2015 um 17:08 schrieb Thomas Meyer: > Am Montag, den 13.07.2015, 16:41 +0200 schrieb Richard Weinberger: >> Am 13.07.2015 um 16:24 schrieb Thomas Meyer: >>>> Yeah. And please add a dump_stack() to figure out where it was >>>> called. >>> >&g

Re: [uml-devel] uml_net zombie processes

2015-07-15 Thread Richard Weinberger
On Mon, Jul 13, 2015 at 5:12 PM, Thomas Meyer wrote: > Am Montag, den 13.07.2015, 17:11 +0200 schrieb Richard Weinberger: >> Am 13.07.2015 um 17:08 schrieb Thomas Meyer: >> > Am Montag, den 13.07.2015, 16:41 +0200 schrieb Richard Weinberger: >> > > Am 13.07.2015

Re: [uml-devel] [PATCH v2] um: Do not rely on libc to provide modify_ldt()

2015-07-28 Thread Richard Weinberger
On Mon, Jul 27, 2015 at 1:30 PM, Hans-Werner Hilse wrote: > Hi, > > Richard, might I ping you about this one? > > Reading other mails on this ML, I reckon' you're quite busy - no > problem, it's not really critical anyway. Just want to make sure the > updated patch got noticed. Thanks for the hea

[uml-devel] unmet direct dependencies in -next

2015-08-09 Thread Richard Weinberger
Hi! -next faces some build issues on UML because of unmet direct dependencies. Mostly due to HAS_IOMEM and I2C. warning: (MEDIA_SUBDRV_AUTOSELECT && VIDEO_CX231XX && INV_MPU6050_IIO) selects I2C_MUX which has unmet direct dependencies (I2C && HAS_IOMEM) warning: (ST_IRQCHIP && HIP04_ETH && STMMA

Re: [uml-devel] [PATCH v2] um: Switch clocksource to hrtimers

2015-08-09 Thread Richard Weinberger
On Tue, Jul 14, 2015 at 1:45 PM, Thomas Meyer wrote: > Switch the UML clocksource from interval timers to posix interval timers and > move to a monotonic timer. > > This fixes suspend&resume related timer issues and improves network > performance > as TCP state machines are now fed with the correc

Re: [uml-devel] uml_net zombie processes

2015-08-09 Thread Richard Weinberger
On Wed, Jul 15, 2015 at 3:58 PM, Thomas Meyer wrote: > Am Mittwoch, den 15.07.2015, 12:12 +0200 schrieb Richard Weinberger: >> On Mon, Jul 13, 2015 at 5:12 PM, Thomas Meyer >> wrote: >> > Am Montag, den 13.07.2015, 17:11 +0200 schrieb Richard Weinberger: >> >

[uml-devel] [PATCH] um: Fix waitpid() usage in helper code

2015-08-09 Thread Richard Weinberger
n execve(). We have to use __WALL to wait for both clone()'ed and regular childs to detect the termination before and after an execve(). Reported-and-tested-by: Thomas Meyer Signed-off-by: Richard Weinberger --- arch/um/os-Linux/helper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deleti

[uml-devel] [PATCH] um: Fix kernel mode fault condition

2015-08-09 Thread Richard Weinberger
We have to exclude memory locations <= PAGE_SIZE from the condition and let the kernel mode fault path catch it. Otherwise a kernel NULL pointer exception will be reported as a kernel user space access. Fixes: d2313084e2c (um: Catch unprotected user memory access) Signed-off-by: Rich

Re: [uml-devel] [PATCH] um: Switch clocksource to hrtimers

2015-08-15 Thread Richard Weinberger
Am 09.08.2015 um 19:53 schrieb Thomas Meyer: > Switch the UML clocksource from interval timers to posix interval timers and > move to a monotonic timer. > > This fixes suspend&resume related timer issues and improves network > performance > as TCP state machines are now fed with the correct time;

Re: [uml-devel] [PATCH] um: Switch clocksource to hrtimers

2015-08-18 Thread Richard Weinberger
On Sat, Aug 15, 2015 at 6:27 PM, Anton Ivanov wrote: > On 15/08/15 09:15, Richard Weinberger wrote: >> Am 09.08.2015 um 19:53 schrieb Thomas Meyer: >>> Switch the UML clocksource from interval timers to posix interval timers and >>> move to a monotonic timer. >&g

Re: [uml-devel] [PATCH] um: Switch clocksource to hrtimers

2015-10-13 Thread Richard Weinberger
On Tue, Aug 18, 2015 at 6:04 PM, Thomas Meyer wrote: > Am 15.08.2015 10:15 vorm. schrieb Richard Weinberger : >> >> Am 09.08.2015 um 19:53 schrieb Thomas Meyer: >> > Switch the UML clocksource from interval timers to posix interval timers >> > and >> >

[uml-devel] [GIT PULL] UML fixes for 4.3-rc6

2015-10-19 Thread Richard Weinberger
Hilse (1): um: Do not rely on libc to provide modify_ldt() Richard Weinberger (3): um: Fix out-of-tree build um: Fix waitpid() usage in helper code um: Fix kernel mode fault condition arch/um/Makefile | 4 ++-- arch/um/kernel/trap.c | 2 +- arch/um/os-Linux

Re: [uml-devel] [uml-user] IRQ support?

2015-10-22 Thread Richard Weinberger
Hi! CC'ing -devel list. On Thu, Oct 22, 2015 at 1:29 PM, Ricardo Nunes wrote: > I'm trying to use a real hardware driver inside UML and I,ve come to the IRQ > suppor part. How do you map the hardware into UML? > Right now it's failing on request_irq call, so my question is if there is > any ma

[uml-devel] [PATCH 1/7] um: Define PTRACE_OLDSETOPTIONS

2015-10-26 Thread Richard Weinberger
...such that processes within UML can do a ptrace(PTRACE_OLDSETOPTIONS, ...) Signed-off-by: Richard Weinberger --- arch/um/include/asm/ptrace-generic.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/um/include/asm/ptrace-generic.h b/arch/um/include/asm/ptrace-generic.h index

[uml-devel] [PATCH 6/7] um: Simplify STUB_DATA loading

2015-10-26 Thread Richard Weinberger
As long STUB_DATA fits into 32bits we can use a plain mov. If it will grow at some point in future we will switch to movabsq. In any case the code is smaller and more easy to read than the current one Signed-off-by: Richard Weinberger --- arch/x86/um/stub_64.S | 5 + 1 file changed, 1

[uml-devel] [PATCH 3/7] um: Get rid of open coded NR_SYSCALLS

2015-10-26 Thread Richard Weinberger
We can use __NR_syscall_max. Signed-off-by: Richard Weinberger --- arch/um/kernel/skas/syscall.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/um/kernel/skas/syscall.c b/arch/um/kernel/skas/syscall.c index 64a8fe5..1683b8e 100644 --- a/arch/um/kernel/skas

[uml-devel] [PATCH 2/7] um: Store syscall number after syscall_trace_enter()

2015-10-26 Thread Richard Weinberger
To support changing syscall numbers we have to store it after syscall_trace_enter(). Signed-off-by: Richard Weinberger --- arch/um/include/shared/os.h | 1 + arch/um/kernel/skas/syscall.c | 13 +++-- arch/um/os-Linux/skas/process.c | 10 +++--- 3 files changed, 11 insertions

[uml-devel] [PATCH 5/7] um: Remove dead code from x86_64 syscall stub

2015-10-26 Thread Richard Weinberger
syscall_stub is dead code as um is using only batch_syscall_stub. Signed-off-by: Richard Weinberger --- arch/x86/um/stub_32.S | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/um/stub_32.S b/arch/x86/um/stub_32.S index b972649..9881680 100644 --- a/arch/x86/um/stub_32.S +++ b/arch/x86

[uml-devel] [PATCH 7/7] um: Report host OOM more nicely

2015-10-26 Thread Richard Weinberger
If UML runs on the host side out of memory, report this condition more nicely. Signed-off-by: Richard Weinberger --- arch/um/kernel/tlb.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/arch/um/kernel/tlb.c b/arch/um/kernel/tlb.c index 2077248..3777b82

[uml-devel] [PATCH 4/7] um: Remove dead code from x86_64 syscall stub

2015-10-26 Thread Richard Weinberger
syscall_stub is dead code as um is using only batch_syscall_stub. Signed-off-by: Richard Weinberger --- arch/x86/um/stub_64.S | 13 - 1 file changed, 13 deletions(-) diff --git a/arch/x86/um/stub_64.S b/arch/x86/um/stub_64.S index 7160b20..a212445 100644 --- a/arch/x86/um/stub_64.S

[uml-devel] [PATCH 5/7 v2] um: Remove dead symbol from i386 syscall stub

2015-10-26 Thread Richard Weinberger
syscall_stub is nowhere used these days. Signed-off-by: Richard Weinberger --- This time with the correct commit message. --- arch/x86/um/stub_32.S | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/um/stub_32.S b/arch/x86/um/stub_32.S index b972649..9881680 100644 --- a/arch/x86/um

Re: [uml-devel] [PATCH v3] um: Switch clocksource to hrtimers

2015-10-26 Thread Richard Weinberger
Hi! Am 25.10.2015 um 19:46 schrieb Anton Ivanov: > Hi List, hi Richard, > > I am going to sort out the UBD patchset next as that has no dependencies on > timer and the other stuff which is waiting in the queue behind the timers. > > That should give UML a significant boost. It is nothing partic

Re: [uml-devel] [uml-user] Any reason for a kernel thread not run after calling schedule()?

2015-10-28 Thread Richard Weinberger
On Wed, Oct 28, 2015 at 5:36 PM, Ricardo Nunes wrote: > Hi, > > I'm making a UML driver to adapt a real driver to UML and hardware > emulation. > > In this case I have a kernel thread trying to read a register, which is now > done through a netlink channel to a userspace application (asynchronous

<    1   2   3   4   5   6   7   8   9   >