Re: [uml-devel] negative pid -516 possible ?

2014-01-12 Thread Richard Weinberger
On Sat, Jan 11, 2014 at 11:47 AM, Toralf Förster toralf.foers...@gmx.de wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 I do fuzz testing with trinity (latest git version) a stable 32 bit Gentoo Linux user mode linux image. The host is a stable 32 bit vanilla 3.12.7 kernel, the guest

[uml-devel] [PATCH] um: Include generic barrier.h

2014-01-15 Thread Richard Weinberger
...to get smp_store_release(). Reported-by: Randy Dunlap rdun...@infradead.org Signed-off-by: Richard Weinberger rich...@nod.at --- arch/um/include/asm/Kbuild | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/um/include/asm/Kbuild b/arch/um/include/asm/Kbuild index fdde187..fb3a6cc 100644

Re: [uml-devel] [PATCH] uml: Simplify tempdir logic.

2014-01-26 Thread Richard Weinberger
On Sun, Nov 17, 2013 at 1:57 PM, Richard Weinberger rich...@nod.at wrote: Am 11.11.2013 19:03, schrieb Tristan Schmelcher: From: Tristan Schmelcher tschmelc...@google.com Inferring the mount hierarchy correctly from /proc/mounts is hard when MS_MOVE may have been used, and the previous code

[uml-devel] [GIT PULL] UML changes for 3.14-rc1

2014-01-26 Thread Richard Weinberger
. - James Hogan (1): um: hostfs: make functions static Richard Weinberger (2): um: Removed unused attributes from thread_struct um: Include generic barrier.h arch/um/include/asm/Kbuild | 1 + arch/um/include/asm/processor-generic.h | 3 -- fs

Re: [uml-devel] sysreq t back traces stopped working please help

2014-02-27 Thread Richard Weinberger
Am 27.02.2014 20:05, schrieb Boaz Harrosh: Hi Richard, uml hackers Since some time my echo t /proc/sysrq-trigger stopped producing the proper global back-traces for all Kernel threads. All I get is: I have an idea, do you see this regression starting with v3.12? Thanks, //richard

Re: [uml-devel] Contribution - Bug fixes and contributions to UML

2014-02-28 Thread Richard Weinberger
Am 28.02.2014 09:27, schrieb Anton Ivanov (antivano): Hi Richard, Hi Jeff, hi list, On behalf of Cisco systems, I am authorized to make a offer a set bug fixes as well as contribute several additional features and performance improvements to UML. All of these have been used internally for a

Re: [uml-devel] [info] syscall mremap can't be tested at a UML w/ fuzzy tool trinity

2014-03-01 Thread Richard Weinberger
On Sat, Mar 1, 2014 at 10:28 AM, Toralf Förster toralf.foers...@gmx.de wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Today I tested if I can activate that syscall again here (munmap works fine since few days). Testing a 32 bit user mode linux image with $trinity -q -N 10 -C 8

Re: [uml-devel] [PATCH 3/3] BUG: Inapprorpiate choice of IPC

2014-03-08 Thread Richard Weinberger
Am 07.03.2014 19:37, schrieb anton.iva...@kot-begemot.co.uk: From: Anton Ivanov antiv...@cisco.com PIPE is the wrong IPC for this type of inter-thread communication. For more details see: http://stackoverflow.com/questions/4624071/pipe-buffer-size-is-4k-or-64k The observations on

[uml-devel] [GIT PULL] UML fixes

2014-04-20 Thread Richard Weinberger
Linus, The following changes since commit a798c10faf62a505d24e5f6213fbaf904a39623f: Linux 3.15-rc2 (2014-04-20 11:08:50 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml.git for-linus for you to fetch changes up to

Re: [uml-devel] [PATCH 3/3] BUG: Inapprorpiate choice of IPC

2014-04-20 Thread Richard Weinberger
Am 07.03.2014 19:37, schrieb anton.iva...@kot-begemot.co.uk: From: Anton Ivanov antiv...@cisco.com PIPE is the wrong IPC for this type of inter-thread communication. For more details see: http://stackoverflow.com/questions/4624071/pipe-buffer-size-is-4k-or-64k The observations on that

Re: [uml-devel] trinity commit 23dc478aba breaks syscall mremap at a 32 bit user mode linux

2014-05-01 Thread Richard Weinberger
On Wed, Apr 30, 2014 at 8:19 PM, Toralf Förster toralf.foers...@gmx.de wrote: -or- it uncovers a bug in kernel v3.15-rc3 for UML: UML most not panic. :) Do you have the trinity logs? I'd like to know the syscalls parameters. It looks like trinity managed it to crash a thread on the host side.

Re: [uml-devel] trinity commit 23dc478aba breaks syscall mremap at a 32 bit user mode linux

2014-05-01 Thread Richard Weinberger
Am 01.05.2014 12:29, schrieb Toralf Förster: On 05/01/2014 11:22 AM, Richard Weinberger wrote: On Wed, Apr 30, 2014 at 8:19 PM, Toralf Förster toralf.foers...@gmx.de wrote: -or- it uncovers a bug in kernel v3.15-rc3 for UML: UML most not panic. :) Do you have the trinity logs? I'd like

Re: [uml-devel] trinity commit 23dc478aba breaks syscall mremap at a 32 bit user mode linux

2014-05-01 Thread Richard Weinberger
Toralf, Am 01.05.2014 17:15, schrieb Toralf Förster: On 05/01/2014 02:33 PM, Richard Weinberger wrote: Am 01.05.2014 12:29, schrieb Toralf Förster: On 05/01/2014 11:22 AM, Richard Weinberger wrote: On Wed, Apr 30, 2014 at 8:19 PM, Toralf Förster toralf.foers...@gmx.de wrote

Re: [uml-devel] trinity commit 23dc478aba breaks syscall mremap at a 32 bit user mode linux

2014-05-02 Thread Richard Weinberger
Am 01.05.2014 23:34, schrieb Toralf Förster: On 05/01/2014 10:57 PM, Richard Weinberger wrote: Toralf, Yeah, this is because trinity destroys the UML stub code. Please test the attached patch, it should fix the root cause of the problem. Thanks, //richard If I do just apply fix2.patch

Re: [uml-devel] trinity commit 23dc478aba breaks syscall mremap at a 32 bit user mode linux

2014-05-02 Thread Richard Weinberger
Am 01.05.2014 23:34, schrieb Toralf Förster: On 05/01/2014 10:57 PM, Richard Weinberger wrote: Toralf, Yeah, this is because trinity destroys the UML stub code. Please test the attached patch, it should fix the root cause of the problem. Thanks, //richard If I do just apply fix2.patch

Re: [uml-devel] trinity commit 23dc478aba breaks syscall mremap at a 32 bit user mode linux

2014-05-02 Thread Richard Weinberger
On Fri, May 2, 2014 at 8:43 AM, st...@nixia.no wrote: Yeah, this is because trinity destroys the UML stub code. Please test the attached patch, it should fix the root cause of the problem. @@ -124,6 +125,9 @@ static int add_munmap(unsigned long addr, unsigned long len, struct

Re: [uml-devel] trinity commit 23dc478aba breaks syscall mremap at a 32 bit user mode linux

2014-05-02 Thread Richard Weinberger
Am 02.05.2014 16:07, schrieb Toralf Förster: On 05/02/2014 09:46 AM, Richard Weinberger wrote: Am 01.05.2014 23:34, schrieb Toralf Förster: On 05/01/2014 10:57 PM, Richard Weinberger wrote: Toralf, Yeah, this is because trinity destroys the UML stub code. Please test the attached patch

[uml-devel] [PATCH 2/2] um: Ensure that nobody remaps the stub vma

2014-05-03 Thread Richard Weinberger
This fixes a long standing problem that UML crashes or locks up if a task messes with it' stub vma. Reported-by: toralf.foers...@gmx.de Signed-off-by: Richard Weinberger rich...@nod.at --- arch/um/kernel/tlb.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git

[uml-devel] [PATCH 1/2] Revert um: Fix wait_stub_done() error handling

2014-05-03 Thread Richard Weinberger
This reverts commit 0974a9cadc7886f7baaa458bb0c89f5c5f9d458e. It was a bad idea and was only papering over the real issue. Signed-off-by: Richard Weinberger rich...@nod.at --- arch/um/os-Linux/skas/process.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/arch/um/os

Re: [uml-devel] kernel BUG: while fuzzying a 32 bit Linux user mode guest with trinity

2014-05-03 Thread Richard Weinberger
On Sat, May 3, 2014 at 6:04 PM, Toralf Förster toralf.foers...@gmx.de wrote: I could force a crash using latest kernel tree (v3.15-rc3-159-g6c6ca9c with applied fix3.patch for the mremap syscall) and latest trinity tree (1.1-1349-g18ebf71). The backtrace of the core dump gives :

Re: [uml-devel] [PATCH 0/4] UserModeLinux: Message logging neatening

2014-05-14 Thread Richard Weinberger
Am 10.05.2014 01:43, schrieb Joe Perches: Joe Perches (4): UserModeLinux: Convert UM_KERN_LEVEL to KERN_LEVEL UserModeLinux: Remove unused #defines of UM_KERN_LEVEL UserModeLinux: Use a more current logging style UserModeLinux: Convert printks to pr_level

Re: [uml-devel] [PATCH 0/4] UserModeLinux: Message logging neatening

2014-05-14 Thread Richard Weinberger
Am 14.05.2014 22:07, schrieb Joe Perches: On Wed, 2014-05-14 at 21:52 +0200, Richard Weinberger wrote: Am 10.05.2014 01:43, schrieb Joe Perches: Joe Perches (4): UserModeLinux: Convert UM_KERN_LEVEL to KERN_LEVEL UserModeLinux: Remove unused #defines of UM_KERN_LEVEL UserModeLinux: Use

[uml-devel] [PATCH 1/2] um: Detect NULL dereferences earlier

2014-05-29 Thread Richard Weinberger
There is no need to go through handle_page_fault(). If we try to access the zero page in kernel mode just panic(). Signed-off-by: Richard Weinberger rich...@nod.at --- arch/um/kernel/trap.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/um/kernel/trap.c b/arch

[uml-devel] [PATCH 2/2] um: Detect kernel userspace access

2014-05-29 Thread Richard Weinberger
handler is not designed to fix such faults the SIGSEGV stays and UML consumes all CPU handling SIGSEGV. The only sane thing we can do here is calling panic(). This patch helps to detect bad memory access from the kernel side. Signed-off-by: Richard Weinberger rich...@nod.at --- arch/um/kernel/trap.c

Re: [uml-devel] duplicated mem_map (struct page) array?

2014-05-30 Thread Richard Weinberger
On Fri, May 30, 2014 at 10:24 AM, enjoy mindful enjoymind...@gmail.com wrote: Hi, When I'm trace uml kernel with gdb, I found there are two mem_map (struct page) arrays. 1) the first one created in init_maps function, and pointed by *local* pointer struct page *map in init_maps function

Re: [uml-devel] duplicated mem_map (struct page) array?

2014-05-31 Thread Richard Weinberger
On Fri, May 30, 2014 at 11:17 AM, Richard Weinberger richard.weinber...@gmail.com wrote: On Fri, May 30, 2014 at 10:24 AM, enjoy mindful enjoymind...@gmail.com wrote: Hi, When I'm trace uml kernel with gdb, I found there are two mem_map (struct page) arrays. 1) the first one created

Re: [uml-devel] [PATCH] delete unnecessary bootmem struct page array

2014-06-01 Thread Richard Weinberger
Am 01.06.2014 15:08, schrieb Real Name: From: Honggang Li enjoymind...@gmail.com 1) uml kernel bootmem managed through bootmem_data-node_bootmem_map, not the struct page array, so the array is unnecessary. 2) the bootmem struct page array has been pointed by a *local* pointer, struct page

Re: [uml-devel] [PATCH] remove csum_partial_copy_generic_i386 to clean up exception table

2014-06-05 Thread Richard Weinberger
Am 05.06.2014 06:15, schrieb Honggang Li: arch/x86/um/checksum_32.S had been copy paste from x86. When build x86 uml, csum_partial_copy_generic_i386 mess up the exception table. In fact, exception table dose not work in uml kernel. Are you sure that exception tables do not work on UML? I

Re: [uml-devel] [PATCH v2] delete unnecessary bootmem struct page array

2014-06-14 Thread Richard Weinberger
Hi! Am 03.06.2014 07:30, schrieb Real Name: From: Honggang Li enjoymind...@gmail.com The patch based on linux-next-2014-06-02. The old init_maps function does two things: 1) allocates and initializes one struct page array for bootmem 2) count the number of total pages After removed

Re: [uml-devel] [PATCH v2] delete unnecessary bootmem struct page array

2014-06-16 Thread Richard Weinberger
Am 16.06.2014 05:28, schrieb Real Name: On Sat, Jun 14, 2014 at 11:44:04AM +0200, Richard Weinberger wrote: Hi! Am 03.06.2014 07:30, schrieb Real Name: From: Honggang Li enjoymind...@gmail.com The patch based on linux-next-2014-06-02. The old init_maps function does two things: 1

Re: [uml-devel] [PATCH] checkstack: use $UTS_MACHINE as target architecture

2014-07-08 Thread Richard Weinberger
Am 08.07.2014 10:16, schrieb Konstantin Khlebnikov: On Tue, Jul 8, 2014 at 12:01 PM, Richard Weinberger richard.weinber...@gmail.com wrote: On Tue, Jul 8, 2014 at 7:48 AM, Konstantin Khlebnikov koc...@gmail.com wrote: On Tue, Jul 8, 2014 at 2:05 AM, Andrew Morton a...@linux-foundation.org

Re: [uml-devel] [PATCH] checkstack: use $UTS_MACHINE as target architecture

2014-07-08 Thread Richard Weinberger
Am 08.07.2014 10:47, schrieb Konstantin Khlebnikov: On Tue, Jul 8, 2014 at 12:33 PM, Richard Weinberger rich...@nod.at wrote: Am 08.07.2014 10:30, schrieb Konstantin Khlebnikov: On Tue, Jul 8, 2014 at 12:20 PM, Richard Weinberger rich...@nod.at wrote: Am 08.07.2014 10:16, schrieb Konstantin

Re: [uml-devel] [PATCH] checkstack: use $UTS_MACHINE as target architecture

2014-07-08 Thread Richard Weinberger
Am 08.07.2014 11:03, schrieb Konstantin Khlebnikov: I know. But debugging/profiling of kernel code is much easier when it runs in userspace. I think this is the last use case where uml might beat normal hardware accelerated qemu/kvm. But without SMP and with that high overhead on each syscall

Re: [uml-devel] [PATCH] checkstack: use $UTS_MACHINE as target architecture

2014-07-08 Thread Richard Weinberger
Am 08.07.2014 11:09, schrieb Geert Uytterhoeven: On Tue, Jul 8, 2014 at 11:06 AM, Richard Weinberger rich...@nod.at wrote: Am 08.07.2014 11:03, schrieb Konstantin Khlebnikov: I know. But debugging/profiling of kernel code is much easier when it runs in userspace. I think this is the last use

Re: [uml-devel] [PATCH] checkstack: use $UTS_MACHINE as target architecture

2014-07-08 Thread Richard Weinberger
Am 08.07.2014 11:22, schrieb Geert Uytterhoeven: On Tue, Jul 8, 2014 at 11:14 AM, Richard Weinberger rich...@nod.at wrote: And that you don't need root permissions to run it. You can use KVM also without being root. It depends on the rights of /dev/kvm. Which are controlled by... root

Re: [uml-devel] trinity commit 23dc478aba breaks syscall mremap at a 32 bit user mode linux

2014-07-12 Thread Richard Weinberger
Am 12.07.2014 19:16, schrieb Toralf Förster: On 05/02/2014 04:14 PM, Richard Weinberger wrote: Am 02.05.2014 16:07, schrieb Toralf Förster: On 05/02/2014 09:46 AM, Richard Weinberger wrote: Am 01.05.2014 23:34, schrieb Toralf Förster: On 05/01/2014 10:57 PM, Richard Weinberger wrote: Toralf

Re: [uml-devel] [PATCH] remove csum_partial_copy_generic_i386 to clean up exception table

2014-07-18 Thread Richard Weinberger
Am 18.07.2014 01:13, schrieb Real Name: On Sat, Jun 28, 2014 at 12:06:28PM +0800, Real Name wrote: On Sat, Jun 21, 2014 at 03:28:52PM +0800, Real Name wrote: On Thu, Jun 05, 2014 at 11:49:49PM +0200, Richard Weinberger wrote: Am 05.06.2014 06:15, schrieb Honggang Li: arch/x86/um/checksum_32.S

[uml-devel] [PULL] UML fixes

2014-07-20 Thread Richard Weinberger
. Richard Weinberger (4): Revert um: Fix wait_stub_done() error handling um: Ensure that a stub page cannot get unmapped um: Fix hung task in fix_range_common() um: segv: Save regs only in case of a kernel mode fault

[uml-devel] [PATCH 21/43] um: Use get_signal() signal_setup_done()

2014-07-21 Thread Richard Weinberger
From: Richard Weinberger rich...@nod.at Use the more generic functions get_signal() signal_setup_done() for signal delivery. Signed-off-by: Richard Weinberger rich...@nod.at --- arch/um/include/shared/frame_kern.h | 12 -- arch/um/kernel/signal.c | 27

Re: [uml-devel] [PATCH] uml/net_kern: Eliminate NULL test after alloc_bootmem

2014-07-23 Thread Richard Weinberger
Himangi, Am 19.07.2014 13:34, schrieb Himangi Saraogi: alloc_bootmem and related functions never return NULL. Thus a NULL test or memset after calls to these functions is unnecessary. The following Coccinelle semantic patch was used for making the change: @@ expression E; statement S;

[uml-devel] resource: provide new functions to walk through resources breaks UML

2014-08-10 Thread Richard Weinberger
Hi Vivek, Daniel Walter reported that UML is currently broken. The offending commit is: commit 8c86e70acead629aacb4afcd818add66bf6844d9 Author: Vivek Goyal vgo...@redhat.com Date: Fri Aug 8 14:25:50 2014 -0700 resource: provide new functions to walk through resources It dies in

Re: [uml-devel] resource: provide new functions to walk through resources breaks UML

2014-08-11 Thread Richard Weinberger
Hi Vivek, Am 11.08.2014 14:22, schrieb Vivek Goyal: On Sun, Aug 10, 2014 at 06:56:14PM +0200, Richard Weinberger wrote: Hi Vivek, Daniel Walter reported that UML is currently broken. The offending commit is: Hi Richard, Thanks for pointing it out. I will look into it. Would you

Re: [uml-devel] resource: provide new functions to walk through resources breaks UML

2014-08-11 Thread Richard Weinberger
Am 11.08.2014 20:44, schrieb Vivek Goyal: On Mon, Aug 11, 2014 at 02:25:56PM +0200, Richard Weinberger wrote: Hi Vivek, Am 11.08.2014 14:22, schrieb Vivek Goyal: On Sun, Aug 10, 2014 at 06:56:14PM +0200, Richard Weinberger wrote: Hi Vivek, Daniel Walter reported that UML is currently

Re: [uml-devel] [PATCH] resource: Fix the case of null pointer access

2014-08-12 Thread Richard Weinberger
Am 12.08.2014 16:46, schrieb Vivek Goyal: Richard and Daniel reported that UML is broken due to changes to resource traversal functions. Problem is that iomem_resource.child can be null and new code does not consider that possibility. Old code used a for loop and that loop will not even

Re: [uml-devel] [PATCH] resource: Fix the case of null pointer access

2014-08-12 Thread Richard Weinberger
Am 12.08.2014 17:04, schrieb Vivek Goyal: On Tue, Aug 12, 2014 at 04:49:35PM +0200, Richard Weinberger wrote: Am 12.08.2014 16:46, schrieb Vivek Goyal: Richard and Daniel reported that UML is broken due to changes to resource traversal functions. Problem is that iomem_resource.child can

Re: [uml-devel] How can I enable the config option STACKTRACE_SUPPORT for an UML guest ? [was: Fwd: Re: trinity seems not to reap all childs]

2014-08-14 Thread Richard Weinberger
On Wed, Aug 13, 2014 at 9:11 PM, Toralf Förster toralf.foers...@gmx.de wrote: The long story is below. As of now UML has no CONFIG_STACKTRACE_SUPPORT. But Daniel (CC'd) is working on it. Forwarded Message Subject: Re: trinity seems not to reap all childs Date: Wed, 13 Aug

Re: [uml-devel] UML Performance improvement patchset

2014-09-04 Thread Richard Weinberger
On Thu, Sep 4, 2014 at 9:00 PM, anton.iva...@kot-begemot.co.uk wrote: Patch dependencies: [PATCH v3 01/10] Epoll based interrupt controller Full redesign of the existing UML poll based controller. The old poll controller incurs huge penalties for IRQ sharing and many devices setup due to

Re: [uml-devel] [PATCH] um: Register UML with systemd-machined

2014-09-14 Thread Richard Weinberger
On Sun, Sep 14, 2014 at 12:42 PM, Thomas Meyer tho...@m3y3r.de wrote: Call machined's CreateMachine to create a scope unit for the current uml instance. Can you please describe in detail why we need this feature? In general I'm fine with adding such functionality but please make it optional.

Re: [uml-devel] Fwd: Mail delivery failed: returning message to sender

2014-09-23 Thread Richard Weinberger
Rob, Am 23.09.2014 16:58, schrieb Rob Landley: As long as somebody's paying attention to UML again: what would be involved in adding support for arm/mips/sh4/sparc... I've mostly wandered off to use qemu these days, and I package system images with native compilers you can boot up and

Re: [uml-devel] [PATCH] Fix for occasional userspace process in D/Z state bug

2014-09-26 Thread Richard Weinberger
Am 26.09.2014 13:49, schrieb anton.iva...@kot-begemot.co.uk: From: Anton Ivanov antiv...@cisco.com This is a fix for a very old UML bug which can be triggered with stock UML. It takes a lot of effort to trigger it there because the lseek()/read() | write() mechanics of the UBD driver

Re: [uml-devel] Remove default root?

2014-09-29 Thread Richard Weinberger
On Mon, Sep 29, 2014 at 7:36 PM, Thomas Meyer tho...@m3y3r.de wrote: Hi, I tried to install the latest Fedora 21 from the Network Install Image DVD ( https://fedoraproject.org/get-prerelease#server

Re: [uml-devel] [systemd-devel] Timed out waiting for device dev-disk-by...

2014-09-29 Thread Richard Weinberger
On Mon, Sep 29, 2014 at 8:29 PM, Thomas Meyer tho...@m3y3r.de wrote: Hi, I get a timeout in the Fedora 21 alpha: [ TIME ] Timed out waiting for device dev-disk-by\x2duuid-008af19d\x2d2562\x2d49bd\x2d8907\x2d721ea08f3e14.device. But all devices are available from early kernel start: # ls

Re: [uml-devel] panic() call from non-kernel stack in uml_postsetup

2014-10-03 Thread Richard Weinberger
On Fri, Oct 3, 2014 at 1:21 AM, Thomas Meyer tho...@m3y3r.de wrote: Hi, When you pass an initrd to UML and the size of the initrd is too big for the current kernel memory, a panic() call is done with the message(Out of memory). But this message never hits the stdout as the following stack

Re: [uml-devel] [PATCH 08/44] kernel: Move pm_power_off to common code

2014-10-07 Thread Richard Weinberger
Am 07.10.2014 07:28, schrieb Guenter Roeck: arch/um/kernel/reboot.c| 2 -- Acked-by: Richard Weinberger rich...@nod.at Thanks, //richard -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer

Re: [uml-devel] [PATCH] um: always use the same type for __syscall_stub_start

2014-10-11 Thread Richard Weinberger
Am 11.10.2014 um 13:29 schrieb Nicolas Iooss: syscall_stub_start is declared with different types in C files: arch/um/kernel/physmem.c: extern int __syscall_stub_start; arch/um/kernel/skas/mmu.c: extern int __syscall_stub_start; arch/um/os-Linux/skas/mem.c: extern unsigned long

Re: [uml-devel] [PATCH] um: always use the same type for __syscall_stub_start

2014-10-11 Thread Richard Weinberger
Am 11.10.2014 um 14:15 schrieb Nicolas Iooss: 2014-10-11 13:42 GMT+02:00 Richard Weinberger: Am 11.10.2014 um 13:29 schrieb Nicolas Iooss: syscall_stub_start is declared with different types in C files: arch/um/kernel/physmem.c: extern int __syscall_stub_start; arch/um/kernel/skas/mmu.c

[uml-devel] [GIT PULL] UML changes for v3.18-rc1

2014-10-13 Thread Richard Weinberger
Linus, The following changes since commit c798360cd1438090d51eeaa8e67985da11362eba: Merge branch 'for-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu (2014-10-10 07:26:02 -0400) are available in the git repository at:

Re: [uml-devel] [PATCH] um: Remove unused bp stack-frame pointer

2014-10-18 Thread Richard Weinberger
Am 18.10.2014 um 16:23 schrieb Manfred Schlaegl: The pointer to bp stack-frame is no longer used. Removed it. Good catch! This also removes a corresponding compiler-warning. Which warning exactly? Thanks, //richard

Re: [uml-devel] [PATCH] um: Remove unused bp stack-frame pointer

2014-10-18 Thread Richard Weinberger
Am 18.10.2014 um 17:12 schrieb Manfred Schlaegl: On 2014-10-18 16:42, Richard Weinberger wrote: Am 18.10.2014 um 16:23 schrieb Manfred Schlaegl: The pointer to bp stack-frame is no longer used. Removed it. Good catch! Thank you. This also removes a corresponding compiler-warning. Which

Re: [uml-devel] [PATCH] um: Remove unused bp stack-frame pointer

2014-10-18 Thread Richard Weinberger
Am 18.10.2014 um 17:24 schrieb Manfred Schlaegl: On 2014-10-18 17:19, Richard Weinberger wrote: Am 18.10.2014 um 17:12 schrieb Manfred Schlaegl: On 2014-10-18 16:42, Richard Weinberger wrote: Am 18.10.2014 um 16:23 schrieb Manfred Schlaegl: The pointer to bp stack-frame is no longer used

Re: [uml-devel] [PATCH v3 3/3] um: enable trace irqflags support

2014-10-20 Thread Richard Weinberger
On Mon, Oct 20, 2014 at 1:18 PM, Thomas Meyer tho...@m3y3r.de wrote: Am 20.10.2014 11:28 schrieb Daniel Walter sa...@0x90.at: - Original Message - From: Thomas Meyer tho...@m3y3r.de To: user-mode-linux-devel user-mode-linux-devel@lists.sourceforge.net Sent: Sunday, October 19,

Re: [uml-devel] kernel stalls in balance_dirty_pages_ratelimited()

2014-10-23 Thread Richard Weinberger
Anton, Am 23.10.2014 um 09:34 schrieb Anton Ivanov: Hi Richard, I have had a question in my mind on this for quite a while around this bug (and a quite a few others). Fell free to ask, I'll try hand to find time to answer. UML by the nature of being UP includes the generic spinlock

Re: [uml-devel] Build regressions/improvements in v3.18-rc4

2014-11-12 Thread Richard Weinberger
Geert, On Wed, Nov 12, 2014 at 10:48 AM, Geert Uytterhoeven ge...@linux-m68k.org wrote: On Wed, Nov 12, 2014 at 10:46 AM, Geert Uytterhoeven ge...@linux-m68k.org wrote: JFYI, when comparing v3.18-rc4[1] to v3.18-rc3[3], the summaries are: - build errors: +5/-6 +

Re: [uml-devel] Build regressions/improvements in v3.18-rc4

2014-11-12 Thread Richard Weinberger
Am 12.11.2014 um 11:22 schrieb Geert Uytterhoeven: On Wed, Nov 12, 2014 at 11:19 AM, Richard Weinberger richard.weinber...@gmail.com wrote: + /home/kisskb/slave/src/fs/hostfs/hostfs_user.c: error: 'AT_FDCWD' undeclared (first use in this function): = 378 + /home/kisskb/slave/src/fs

Re: [uml-devel] starting an UML image sometimes failed, next (identical) attempt works

2014-11-19 Thread Richard Weinberger
On Wed, Nov 19, 2014 at 6:06 PM, Toralf Förster toralf.foers...@gmx.de wrote: console [mc-1] enabled Failed to initialize ubd device 0 :Couldn't determine size of device's file This is ubd_file_size(). Can you find out where exactly it is failing? Just add a few printk()s into it. -- Thanks,

Re: [uml-devel] Fwd: Re: trinity doesn't exit after its finished

2014-11-20 Thread Richard Weinberger
On Thu, Nov 20, 2014 at 8:01 PM, Toralf Förster toralf.foers...@gmx.de wrote: A recent question at trinity's mailing list (http://news.gmane.org/gmane.comp.security.fuzzing.trinity) points probably to a hostfs issue - therefore I'd like to forward the answer f Dave Jones here. ANd /me

Re: [uml-devel] [BUG] uml panics with Segfault with no mm in v3.19-rc

2014-12-10 Thread Richard Weinberger
Hi! Am 10.12.2014 um 11:46 schrieb Miklos Szeredi: The guilty commit is: 00f634bc522d asm-generic: add generic futex for !CONFIG_SMP Thanks a lot Miklos! Your bisecting faster than I do. Let's dig into the issue! Thanks, //richard And the backtrace: #0 0x77866457 in kill ()

Re: [uml-devel] [BUG] uml panics with Segfault with no mm in v3.19-rc

2014-12-10 Thread Richard Weinberger
Am 10.12.2014 um 12:03 schrieb Arnd Bergmann: On Wednesday 10 December 2014 11:49:23 Richard Weinberger wrote: Hi! Am 10.12.2014 um 11:46 schrieb Miklos Szeredi: The guilty commit is: 00f634bc522d asm-generic: add generic futex for !CONFIG_SMP Thanks a lot Miklos! Your bisecting faster

Re: [uml-devel] [BUG] uml panics with Segfault with no mm in v3.19-rc

2014-12-10 Thread Richard Weinberger
Am 10.12.2014 um 12:59 schrieb Geert Uytterhoeven: On Wed, Dec 10, 2014 at 11:49 AM, Richard Weinberger rich...@nod.at wrote: Am 10.12.2014 um 11:46 schrieb Miklos Szeredi: The guilty commit is: 00f634bc522d asm-generic: add generic futex for !CONFIG_SMP Thanks a lot Miklos! Your

[uml-devel] [PATCH] um: Skip futex_atomic_cmpxchg_inatomic() test

2014-12-10 Thread Richard Weinberger
...@szeredi.hu Suggested-by: Geert Uytterhoeven ge...@linux-m68k.org Signed-off-by: Richard Weinberger rich...@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

Re: [uml-devel] Kmsg dumper patches?

2015-01-26 Thread Richard Weinberger
On Sun, Jan 18, 2015 at 1:27 PM, Thomas Meyer tho...@m3y3r.de wrote: Hi, Any news. On this? http://sourceforge.net/p/user-mode-linux/mailman/message/32947218/ http://sourceforge.net/p/user-mode-linux/mailman/message/32947219/

[uml-devel] [PATCH] um: x86: Removed orphaned barrier.h

2015-01-18 Thread Richard Weinberger
Since commit 9af2452a1839 (um: Include generic barrier.h) UML uses the generic barrier.h, remove this orphaned file. Reported-by: Borislav Petkov b...@suse.de Signed-off-by: Richard Weinberger rich...@nod.at --- arch/x86/um/asm/barrier.h | 71 --- 1

Re: [uml-devel] was is the max. memory for a 32 bit UML decreased ?

2015-01-05 Thread Richard Weinberger
On Tue, Jun 24, 2014 at 10:52 PM, Toralf Förster toralf.foers...@gmx.de wrote: IIRC in former times I could assign an UML instance 2047M, but nowadays even 2044M is too big. This depends on the host side. UML heavily depends on the host memory layout. Now with ASLR and such stuff the layout

Re: [uml-devel] was is the max. memory for a 32 bit UML decreased ?

2015-01-10 Thread Richard Weinberger
Am 10.01.2015 um 17:08 schrieb Toralf Förster: yes, it never worked with values above 2026M (tested at an old ThinkPad T420, running a 32 bit Gentoo Linux with host kernel 3.17.4 ) The theoretical max. was always 2GiB due to the limited address space on ia32. 2GiB - UML binary - ASLR

Re: [uml-devel] was is the max. memory for a 32 bit UML decreased ?

2015-01-10 Thread Richard Weinberger
Am 10.01.2015 um 19:11 schrieb Toralf Förster: On 01/10/2015 06:45 PM, Richard Weinberger wrote: Am 10.01.2015 um 18:37 schrieb Toralf Förster: On 01/10/2015 06:25 PM, Richard Weinberger wrote: Am 10.01.2015 um 17:08 schrieb Toralf Förster: yes, it never worked with values above 2026M (tested

[uml-devel] [GIT PULL] UML fixes for v3.19-rc3

2015-01-04 Thread Richard Weinberger
. Daniel Borkmann (1): x86, um: actually mark system call tables readonly Richard Weinberger (1): um: Skip futex_atomic_cmpxchg_inatomic() test arch/um/Kconfig.common | 1 + arch/x86/um/sys_call_table_32.c | 2 +- arch/x86/um

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

2015-03-15 Thread Richard Weinberger
Am 15.03.2015 um 13:07 schrieb Toralf Förster: On 03/15/2015 12:27 PM, Richard Weinberger wrote: found the culprit : CONFIG_MPENTIUMM=y works where CONFIG_MCORE2=y do not work I do have an i5: I have to double check this. Maybe you hint an UML bug. processor : 3 vendor_id

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

2015-03-15 Thread Richard Weinberger
Am 15.03.2015 um 13:07 schrieb Toralf Förster: On 03/15/2015 12:27 PM, Richard Weinberger wrote: found the culprit : CONFIG_MPENTIUMM=y works where CONFIG_MCORE2=y do not work BTW: Just ran a x86 UML with CONFIG_MCORE2=y. Works perfectly fine. But I have a different CPU. Thanks, //richard

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

2015-03-15 Thread Richard Weinberger
Am 15.03.2015 um 11:54 schrieb Toralf Förster: On 03/13/2015 03:31 PM, Richard Weinberger wrote: And what about a regular unhardened host? Does it work if you boot a random x86_64 livecd? tested with GRML - failed too. BTW: In GRML you need to remount /dev/shm with exec. Did you? Thanks

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

2015-03-15 Thread Richard Weinberger
Am 15.03.2015 um 11:54 schrieb Toralf Förster: On 03/13/2015 03:31 PM, Richard Weinberger wrote: And what about a regular unhardened host? Does it work if you boot a random x86_64 livecd? tested with GRML - failed too. (And I switched the compiler to gcc-4.8.3-vanilla before and compiled

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 rich...@nod.at 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) This code looks

[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 d.wal...@0x90.at Signed-off-by: Richard Weinberger rich...@nod.at --- fs/hostfs/hostfs.h | 3 +-- fs/hostfs/hostfs_kern.c | 5 + fs/hostfs/hostfs_user.c | 17 +++-- 3 files changed

[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 rich...@nod.at --- 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

[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 rich...@nod.at --- 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

[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 rich...@nod.at --- fs/hostfs/hostfs_kern.c | 7

[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 d...@darkboxed.org Signed-off-by: Richard Weinberger

[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 rich...@nod.at --- 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

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

2015-03-16 Thread Richard Weinberger
Signed-off-by: Richard Weinberger rich...@nod.at --- 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

[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 rich...@nod.at --- 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

[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 rich...@nod.at --- 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/fs

[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 rich...@nod.at --- 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

[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 rich...@nod.at --- fs/hostfs/hostfs_kern.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs

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

2015-03-16 Thread Richard Weinberger
Signed-off-by: Richard Weinberger rich...@nod.at --- 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

[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 rich...@nod.at --- 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

[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 rich...@nod.at --- fs/hostfs/hostfs_kern.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs

[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

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

2015-03-15 Thread Richard Weinberger
Am 15.03.2015 um 17:51 schrieb Toralf Förster: On 03/15/2015 03:36 PM, Richard Weinberger wrote: BTW: Just ran a x86 UML with CONFIG_MCORE2=y. Works perfectly fine. The picture isn't clear. After twiddling with the kernel config I got a working .config with CORE2=y. This runs fine

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 (and

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 think of a solution

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

2015-03-08 Thread Richard Weinberger
On Sun, Mar 8, 2015 at 10:13 PM, Toralf Förster toralf.foers...@gmx.de wrote: Well, in fact, since I switched from x86 to amd64 under Gentoo, I never managed to get that chroot to be booted. During boot of the UML guest it just hangs around devtmpfs: mounted w/o any output Booting a

<    1   2   3   4   5   6   7   8   >