linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* revoke: no revoke for nommu
@ 2007-03-26 12:12 Pekka J Enberg
  2007-03-26 12:25 ` David Howells
  2007-03-28  6:09 ` Wu, Bryan
  0 siblings, 2 replies; 7+ messages in thread
From: Pekka J Enberg @ 2007-03-26 12:12 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, bryan.wu, dhowells, alan

From: Pekka Enberg <penberg@cs.helsinki.fi>

There's just no sane way to revoke shared memory mappings for NOMMU so lets
disable the thing completely when CONFIG_MMU=n.

Cc: Bryan Wu <bryan.wu@analog.com> 
Cc: David Howells <dhowells@redhat.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
 fs/Makefile |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: uml-2.6/fs/Makefile
===================================================================
--- uml-2.6.orig/fs/Makefile	2007-03-26 15:08:42.000000000 +0300
+++ uml-2.6/fs/Makefile	2007-03-26 15:09:03.000000000 +0300
@@ -11,7 +11,7 @@ obj-y :=	open.o read_write.o file_table.
 		attr.o bad_inode.o file.o filesystems.o namespace.o aio.o \
 		seq_file.o xattr.o libfs.o fs-writeback.o \
 		pnode.o drop_caches.o splice.o sync.o utimes.o \
-		stack.o revoke.o revoked_inode.o
+		stack.o
 
 ifeq ($(CONFIG_BLOCK),y)
 obj-y +=	buffer.o bio.o block_dev.o direct-io.o mpage.o ioprio.o
@@ -19,6 +19,7 @@ else
 obj-y +=	no-block.o
 endif
 
+obj-$(CONFIG_MMU)		+= revoke.o revoked_inode.o
 obj-$(CONFIG_INOTIFY)		+= inotify.o
 obj-$(CONFIG_INOTIFY_USER)	+= inotify_user.o
 obj-$(CONFIG_EPOLL)		+= eventpoll.o

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: revoke: no revoke for nommu
  2007-03-26 12:12 revoke: no revoke for nommu Pekka J Enberg
@ 2007-03-26 12:25 ` David Howells
  2007-03-27  3:42   ` Wu, Bryan
  2007-03-28  6:09 ` Wu, Bryan
  1 sibling, 1 reply; 7+ messages in thread
From: David Howells @ 2007-03-26 12:25 UTC (permalink / raw)
  To: Pekka J Enberg; +Cc: akpm, linux-kernel, bryan.wu, alan

Pekka J Enberg <penberg@cs.helsinki.fi> wrote:

> There's just no sane way to revoke shared memory mappings for NOMMU so lets
> disable the thing completely when CONFIG_MMU=n.

I think that's reasonable for now - we can always add support as far as
possible later.

David

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: revoke: no revoke for nommu
  2007-03-26 12:25 ` David Howells
@ 2007-03-27  3:42   ` Wu, Bryan
  0 siblings, 0 replies; 7+ messages in thread
From: Wu, Bryan @ 2007-03-27  3:42 UTC (permalink / raw)
  To: David Howells; +Cc: Pekka J Enberg, akpm, linux-kernel, bryan.wu, alan

On Mon, 2007-03-26 at 13:25 +0100, David Howells wrote:
> Pekka J Enberg <penberg@cs.helsinki.fi> wrote:
> 
> > There's just no sane way to revoke shared memory mappings for NOMMU so lets
> > disable the thing completely when CONFIG_MMU=n.
> 
> I think that's reasonable for now - we can always add support as far as
> possible later.
> 

Yes, we can test this on Blackfin arch and maybe add support later with
Blackfin MPU.

Thanks
-Bryan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: revoke: no revoke for nommu
  2007-03-26 12:12 revoke: no revoke for nommu Pekka J Enberg
  2007-03-26 12:25 ` David Howells
@ 2007-03-28  6:09 ` Wu, Bryan
  2007-03-28  6:24   ` [PATCH] revoke: generic_file_revoke stub for NOMMU Pekka J Enberg
  1 sibling, 1 reply; 7+ messages in thread
From: Wu, Bryan @ 2007-03-28  6:09 UTC (permalink / raw)
  To: Pekka J Enberg; +Cc: akpm, linux-kernel, bryan.wu, dhowells, alan

On Mon, 2007-03-26 at 15:12 +0300, Pekka J Enberg wrote:
> From: Pekka Enberg <penberg@cs.helsinki.fi>
> 
> There's just no sane way to revoke shared memory mappings for NOMMU so lets
> disable the thing completely when CONFIG_MMU=n.
> 
> Cc: Bryan Wu <bryan.wu@analog.com> 
> Cc: David Howells <dhowells@redhat.com>
> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
> ---
>  fs/Makefile |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> Index: uml-2.6/fs/Makefile
> ===================================================================
> --- uml-2.6.orig/fs/Makefile	2007-03-26 15:08:42.000000000 +0300
> +++ uml-2.6/fs/Makefile	2007-03-26 15:09:03.000000000 +0300
> @@ -11,7 +11,7 @@ obj-y :=	open.o read_write.o file_table.
>  		attr.o bad_inode.o file.o filesystems.o namespace.o aio.o \
>  		seq_file.o xattr.o libfs.o fs-writeback.o \
>  		pnode.o drop_caches.o splice.o sync.o utimes.o \
> -		stack.o revoke.o revoked_inode.o
> +		stack.o
>  
>  ifeq ($(CONFIG_BLOCK),y)
>  obj-y +=	buffer.o bio.o block_dev.o direct-io.o mpage.o ioprio.o
> @@ -19,6 +19,7 @@ else
>  obj-y +=	no-block.o
>  endif
>  
> +obj-$(CONFIG_MMU)		+= revoke.o revoked_inode.o
>  obj-$(CONFIG_INOTIFY)		+= inotify.o
>  obj-$(CONFIG_INOTIFY_USER)	+= inotify_user.o
>  obj-$(CONFIG_EPOLL)		+= eventpoll.o

This solution is not completed in NOMMU.
at least ext2 fs can't find generic_file_revoke():

Log from 2.6.21-rc5-mm2
---
  LD      init/built-in.o
  LD      .tmp_vmlinux1
fs/built-in.o:(.rodata+0x2c1c): undefined reference to `generic_file_revoke'
make[1]: *** [.tmp_vmlinux1] Error 1
make[1]: Leaving directory `/opt/git-tree/linux-2.6'
make: *** [linux] Error 1

$ grep -r generic_file_revoke fs/
fs/ext2/file.c: .revoke         = generic_file_revoke,
Binary file fs/ext2/file.o matches
Binary file fs/ext2/ext2.o matches
Binary file fs/ext2/built-in.o matches
fs/ext3/file.c: .revoke         = generic_file_revoke,
fs/revoke.c:int generic_file_revoke(struct file *file)
fs/revoke.c:EXPORT_SYMBOL(generic_file_revoke);
fs/ext4/file.c: .revoke         = generic_file_revoke,
Binary file fs/built-in.o matches
_

Thanks
-Bryan Wu

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] revoke: generic_file_revoke stub for NOMMU
  2007-03-28  6:09 ` Wu, Bryan
@ 2007-03-28  6:24   ` Pekka J Enberg
  2007-03-28  7:15     ` Wu, Bryan
  0 siblings, 1 reply; 7+ messages in thread
From: Pekka J Enberg @ 2007-03-28  6:24 UTC (permalink / raw)
  To: akpm; +Cc: bryan.wu, linux-kernel, dhowells, alan

From: Pekka Enberg <penberg@cs.helsinki.fi>

As NOMMU does not include fs/revoke.c, we need to provide a stub for
generic_file_revoke() so that filesystems using it compile.

Cc: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
 include/linux/fs.h |    4 ++++
 1 file changed, 4 insertions(+)

Index: uml-2.6/include/linux/fs.h
===================================================================
--- uml-2.6.orig/include/linux/fs.h	2007-03-28 09:18:57.000000000 +0300
+++ uml-2.6/include/linux/fs.h	2007-03-28 09:20:48.000000000 +0300
@@ -1741,7 +1741,11 @@ extern long do_splice_direct(struct file
 		size_t len, unsigned int flags);
 
 /* fs/revoke.c */
+#ifdef CONFIG_MMU
 extern int generic_file_revoke(struct file *);
+#else
+#define generic_file_revoke NULL
+#endif
 
 extern void
 file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping);

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] revoke: generic_file_revoke stub for NOMMU
  2007-03-28  6:24   ` [PATCH] revoke: generic_file_revoke stub for NOMMU Pekka J Enberg
@ 2007-03-28  7:15     ` Wu, Bryan
  2007-03-28  7:17       ` Pekka J Enberg
  0 siblings, 1 reply; 7+ messages in thread
From: Wu, Bryan @ 2007-03-28  7:15 UTC (permalink / raw)
  To: Pekka J Enberg; +Cc: akpm, bryan.wu, linux-kernel, dhowells, alan

On Wed, 2007-03-28 at 09:24 +0300, Pekka J Enberg wrote:
> From: Pekka Enberg <penberg@cs.helsinki.fi>
> 
> As NOMMU does not include fs/revoke.c, we need to provide a stub for
> generic_file_revoke() so that filesystems using it compile.
> 
> Cc: Bryan Wu <bryan.wu@analog.com>
> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
> ---
>  include/linux/fs.h |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> Index: uml-2.6/include/linux/fs.h
> ===================================================================
> --- uml-2.6.orig/include/linux/fs.h	2007-03-28 09:18:57.000000000 +0300
> +++ uml-2.6/include/linux/fs.h	2007-03-28 09:20:48.000000000 +0300
> @@ -1741,7 +1741,11 @@ extern long do_splice_direct(struct file
>  		size_t len, unsigned int flags);
>  
>  /* fs/revoke.c */
> +#ifdef CONFIG_MMU
>  extern int generic_file_revoke(struct file *);
> +#else
> +#define generic_file_revoke NULL
> +#endif
>  
>  extern void
>  file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping);

Cool, you are so quick and your patchbomb tool is very efficient. I will
test it on my side ASAP.

Thanks
-Bryan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] revoke: generic_file_revoke stub for NOMMU
  2007-03-28  7:15     ` Wu, Bryan
@ 2007-03-28  7:17       ` Pekka J Enberg
  0 siblings, 0 replies; 7+ messages in thread
From: Pekka J Enberg @ 2007-03-28  7:17 UTC (permalink / raw)
  To: Wu, Bryan; +Cc: akpm, linux-kernel, dhowells, alan

On Wed, 28 Mar 2007, Wu, Bryan wrote:
> Cool, you are so quick and your patchbomb tool is very efficient.

Yeah, quilt + pine = a deadly combination =)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-03-28  7:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-26 12:12 revoke: no revoke for nommu Pekka J Enberg
2007-03-26 12:25 ` David Howells
2007-03-27  3:42   ` Wu, Bryan
2007-03-28  6:09 ` Wu, Bryan
2007-03-28  6:24   ` [PATCH] revoke: generic_file_revoke stub for NOMMU Pekka J Enberg
2007-03-28  7:15     ` Wu, Bryan
2007-03-28  7:17       ` Pekka J Enberg

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).