trinity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: "Toralf Förster" <toralf.foerster@gmx.de>
Cc: trinity@vger.kernel.org,
	UML devel <user-mode-linux-devel@lists.sourceforge.net>
Subject: Re: [uml-devel] trinity commit 23dc478aba breaks syscall "mremap" at a 32 bit user mode linux
Date: Thu, 01 May 2014 14:33:02 +0200	[thread overview]
Message-ID: <53623EFE.3040603@nod.at> (raw)
In-Reply-To: <536221F4.6000405@gmx.de>

[-- Attachment #1: Type: text/plain, Size: 730 bytes --]

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.foerster@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.
> I run trinity with "-C 2 -c mremap" within the guest, the logs are attached

Can you please try the attached pre-patch?
It looks like the panic() in that code is an overreaction.
I'm currently looking deeper in the issue.

BTW: If you hit "BUG: failure at mm/filemap.c:202/__delete_from_page_cache()!",
this is a known issue https://lkml.org/lkml/2014/4/15/577

Thanks,
//richard

[-- Attachment #2: fix.patch --]
[-- Type: text/x-patch, Size: 879 bytes --]

diff --git a/arch/um/os-Linux/skas/mem.c b/arch/um/os-Linux/skas/mem.c
index 689b18d..2ce5d49 100644
--- a/arch/um/os-Linux/skas/mem.c
+++ b/arch/um/os-Linux/skas/mem.c
@@ -65,14 +65,17 @@ static inline long do_syscall_stub(struct mm_id * mm_idp, void **addr)
 		printk(UM_KERN_ERR "Registers - \n");
 		for (i = 0; i < MAX_REG_NR; i++)
 			printk(UM_KERN_ERR "\t%d\t0x%lx\n", i, syscall_regs[i]);
-		panic("do_syscall_stub : PTRACE_SETREGS failed, errno = %d\n",
-		      -n);
+		printk(KERN_ERR "do_syscall_stub : PTRACE_SETREGS failed, pid = %d, errno = %d\n",
+		      pid, -n);
+		return -EFAULT;
 	}
 
 	err = ptrace(PTRACE_CONT, pid, 0, 0);
-	if (err)
-		panic("Failed to continue stub, pid = %d, errno = %d\n", pid,
+	if (err) {
+		printk(KERN_ERR "Failed to continue stub, pid = %d, errno = %d\n", pid,
 		      errno);
+		return -EFAULT;
+	}
 
 	wait_stub_done(pid);
 

  reply	other threads:[~2014-05-01 12:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-30 18:19 trinity commit 23dc478aba breaks syscall "mremap" at a 32 bit user mode linux Toralf Förster
2014-05-01  9:22 ` [uml-devel] " Richard Weinberger
2014-05-01 10:29   ` Toralf Förster
2014-05-01 12:33     ` Richard Weinberger [this message]
2014-05-01 15:15       ` Toralf Förster
2014-05-01 20:57         ` Richard Weinberger
2014-05-01 21:34           ` Toralf Förster
2014-05-02  7:21             ` Richard Weinberger
2014-05-02  7:46             ` Richard Weinberger
2014-05-02 14:07               ` Toralf Förster
2014-05-02 14:14                 ` Richard Weinberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53623EFE.3040603@nod.at \
    --to=richard@nod.at \
    --cc=toralf.foerster@gmx.de \
    --cc=trinity@vger.kernel.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).