From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: "Serge E. Hallyn" <serue@us.ibm.com>,
Christoph Hellwig <hch@infradead.org>,
Arjan van de Ven <arjan@infradead.org>,
Mimi Zohar <zohar@us.ibm.com>,
akpm@osdl.org, kjhall@linux.vnet.ibm.com,
linux-kernel@vger.kernel.org, safford@saff.watson.ibm.com
Subject: Re: mprotect abuse in slim
Date: Fri, 12 Jan 2007 09:17:53 -0600 [thread overview]
Message-ID: <20070112151753.GD10619@sergelap.austin.ibm.com> (raw)
In-Reply-To: <84144f020701112343n1e398fc4r65fa83717f9e5f02@mail.gmail.com>
Quoting Pekka Enberg (penberg@cs.helsinki.fi):
> On 1/11/07, Serge E. Hallyn <serue@us.ibm.com> wrote:
> >Right, but is returning -EINVAL to userspace on munmap a problem?
>
> Yes, because an application has no way of reusing the revoked mapping
> range. The current patch should get this right, though.
Looks good.
> On 1/11/07, Serge E. Hallyn <serue@us.ibm.com> wrote:
> >Thanks for the tw other patches - I'll give them a shot and check
> >out current munmap behavior just as soon as I get a chance.
>
> I hacked the remaining open issues yesterday so please use this instead:
>
> http://www.cs.helsinki.fi/u/penberg/linux/revoke/revoke-2.6.20-rc4
>
> The one at kernel.org will be updated as well when mirroring catches up.
Great, this patch (with the attached trivial patch to implement the
syscalls on my z guest) passes all of your testcases.
I'll give it a another, closer read over the weekend, and start
basing something to help slim on this code.
-serge
Subject: [PATCH] revoke: s390 architecture
Implement the revoke syscalls for s390.
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
---
arch/s390/kernel/compat_wrapper.S | 11 +++++++++++
arch/s390/kernel/syscalls.S | 2 ++
include/asm-s390/unistd.h | 4 +++-
3 files changed, 16 insertions(+), 1 deletions(-)
24ebe37142572d388569851edf4b919b7f97cc2f
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S
index 71e54ef..b5c2bfa 100644
--- a/arch/s390/kernel/compat_wrapper.S
+++ b/arch/s390/kernel/compat_wrapper.S
@@ -1665,3 +1665,14 @@ sys_getcpu_wrapper:
llgtr %r3,%r3 # unsigned *
llgtr %r4,%r4 # struct getcpu_cache *
jg sys_getcpu
+
+ .globl sys_revokeat_wrapper
+sys_revokeat_wrapper:
+ lgfr %r2,%r2 # int
+ llgtr %r3,%r3 # const char *
+ jg sys_revokeat
+
+ .globl sys_frevoke_wrapper
+sys_frevoke_wrapper:
+ llgfr %r2,%r2 # unsigned int
+ jg sys_frevoke
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S
index a4ceae3..85a6673 100644
--- a/arch/s390/kernel/syscalls.S
+++ b/arch/s390/kernel/syscalls.S
@@ -321,3 +321,5 @@ SYSCALL(sys_vmsplice,sys_vmsplice,compat
NI_SYSCALL /* 310 sys_move_pages */
SYSCALL(sys_getcpu,sys_getcpu,sys_getcpu_wrapper)
SYSCALL(sys_epoll_pwait,sys_epoll_pwait,sys_ni_syscall)
+SYSCALL(sys_revokeat,sys_revokeat,sys_revokeat_wrapper)
+SYSCALL(sys_frevoke,sys_frevoke,sys_frevoke_wrapper)
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h
index fb6fef9..6651cb1 100644
--- a/include/asm-s390/unistd.h
+++ b/include/asm-s390/unistd.h
@@ -250,8 +250,10 @@
/* Number 310 is reserved for new sys_move_pages */
#define __NR_getcpu 311
#define __NR_epoll_pwait 312
+#define __NR_revokeat 313
+#define __NR_frevoke 314
-#define NR_syscalls 313
+#define NR_syscalls 315
/*
* There are some system calls that are not present on 64 bit, some
--
1.1.6
next prev parent reply other threads:[~2007-01-12 15:18 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-08 13:41 mprotect abuse in slim Christoph Hellwig
2007-01-08 22:38 ` Mimi Zohar
2007-01-09 3:07 ` Arjan van de Ven
2007-01-09 9:46 ` Christoph Hellwig
2007-01-09 20:54 ` Chris Wright
2007-01-09 23:14 ` Serge E. Hallyn
2007-01-10 7:21 ` Pekka J Enberg
2007-01-10 15:58 ` Serge E. Hallyn
2007-01-11 7:39 ` Pekka Enberg
2007-01-11 15:49 ` Serge E. Hallyn
2007-01-12 7:43 ` Pekka Enberg
2007-01-12 15:17 ` Serge E. Hallyn [this message]
2007-01-12 9:45 ` Pekka Enberg
2007-01-12 19:28 ` Serge E. Hallyn
2007-01-12 19:53 ` Pekka J Enberg
2007-01-09 21:30 ` Mimi Zohar
2007-01-09 19:27 ` Valdis.Kletnieks
2007-01-09 21:45 ` Mimi Zohar
2007-01-11 14:35 ` Pavel Machek
2007-01-12 20:08 ` Mimi Zohar
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=20070112151753.GD10619@sergelap.austin.ibm.com \
--to=serue@us.ibm.com \
--cc=akpm@osdl.org \
--cc=arjan@infradead.org \
--cc=hch@infradead.org \
--cc=kjhall@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
--cc=safford@saff.watson.ibm.com \
--cc=zohar@us.ibm.com \
/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