lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 12 Jan 2007 09:17:53 -0600
From:	"Serge E. Hallyn" <serue@...ibm.com>
To:	Pekka Enberg <penberg@...helsinki.fi>
Cc:	"Serge E. Hallyn" <serue@...ibm.com>,
	Christoph Hellwig <hch@...radead.org>,
	Arjan van de Ven <arjan@...radead.org>,
	Mimi Zohar <zohar@...ibm.com>, akpm@...l.org,
	kjhall@...ux.vnet.ibm.com, linux-kernel@...r.kernel.org,
	safford@...f.watson.ibm.com
Subject: Re: mprotect abuse in slim

Quoting Pekka Enberg (penberg@...helsinki.fi):
> On 1/11/07, Serge E. Hallyn <serue@...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@...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@...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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ