From: Daniel fernandez <ergot86@gmail.com>
To: Chuck Ebbert <76306.1226@compuserve.com>
Cc: Andrew Morton <akpm@osdl.org>, Ingo Molnar <mingo@redhat.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@osdl.org>
Subject: Re: [PATCH] i386 - sys_clone from vsyscall
Date: Thu, 26 Jan 2006 15:12:08 +0000 [thread overview]
Message-ID: <401b11ae0601260712w7cfe88abm638dc7a459b3bb3a@mail.gmail.com> (raw)
In-Reply-To: <200601252247_MC3-1-B6BF-F209@compuserve.com>
Thanks for your work on the patch
> Your patch almost works but it copies the stack into the parent's address space.
> Using access_process_vm() fixes it. However, that still leaves unfixed the case
> where vsyscall-int80 is used.
I copy the stack into the parent's address space becuase in this case
the memory is shared, but access_process_vm() is more elegant :).
About vsyscall-int80, I don't know how to test that case in my
computer but I think a solution could be:
add a INT80H_RETURN symbol:
.LSTART_vsyscall:
int $0x80
.globl INT80H_RETURN
INT80H_RETURN:
ret
.LEND_vsyscall:
and then in process.c:
int size = 0 ;
childregs->eax = 0;
if ((void *)regs->eip == SYSENTER_RETURN)
size = sizeof(vsyscall_stack) ;
if ((void *)regs->eip == INT80H_RETURN)
size = sizeof(unsigned long) ;
if (regs->esp != esp && size) {
if (copy_from_user(vsyscall_stack, (void *)regs->esp, size))
return -EFAULT;
if (access_process_vm(p, esp - size, vsyscall_stack,
size, 1) != size)
return -EFAULT;
esp -= size;
}
childregs->esp = esp;
I hope somebody can test if it works that way.
Regards
next prev parent reply other threads:[~2006-01-26 15:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-26 3:43 Chuck Ebbert
2006-01-26 15:12 ` Daniel fernandez [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-01-26 16:41 Chuck Ebbert
2006-01-11 17:53 erg0t
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=401b11ae0601260712w7cfe88abm638dc7a459b3bb3a@mail.gmail.com \
--to=ergot86@gmail.com \
--cc=76306.1226@compuserve.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=torvalds@osdl.org \
/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
all inboxes | Powered by JetHome®