All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kirill Korotaev <dev@sw.ru>
To: Kyle McMartin <kyle@parisc-linux.org>
Cc: Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Fernando Vazquez <fernando@oss.ntt.co.jp>,
	"David S. Miller" <davem@davemloft.net>,
	tony.luck@intel.com, linux-ia64@vger.kernel.org,
	stable@kernel.org, xemul@openvz.org, devel@openvz.org
Subject: Re: [PATCH] IA64,sparc: local DoS with corrupted ELFs
Date: Tue, 05 Sep 2006 13:08:55 +0000	[thread overview]
Message-ID: <44FD76E7.10407@sw.ru> (raw)
In-Reply-To: <20060905113939.GA5130@tachyon.int.mcmartin.ca>

Andrew, Kyle,

> On Mon, Sep 04, 2006 at 04:17:00PM +0400, Kirill Korotaev wrote:
> 
>>--- a/include/asm-generic/mman.h
>>+++ b/include/asm-generic/mman.h
>>@@ -39,4 +39,10 @@ #define MADV_DOFORK	11		/* do inherit ac
>>#define MAP_ANON	MAP_ANONYMOUS
>>#define MAP_FILE	0
>>
>>+#ifdef __KERNEL__
>>+#ifndef arch_mmap_check
>>+#define arch_mmap_check(addr, len, flags)	(0)
>>+#endif
>>+#endif
>>+
>>#endif
> 
> 
> This breaks all arches that don't use asm-generic/mman.h, and that you
> didn't add arch_mmap_check to asm/mman.h for.

oops... You are right.

is define 
#define arch_mmap_check(addr, len, flags)	(0)
ok for you in such mman.h headers which do not include asm-generic/mman.h?
If yes, the following patch should help.

Though I didn't get the idea of include/asm-um/mman.h:
#include "asm/arch/mman.h"

This patch adds define of arch_mmap_check() to
archs which do not include include/asm-generic/mman.h

---

diff --git a/include/asm-alpha/mman.h b/include/asm-alpha/mman.h
index 5f24c75..51cf354 100644
--- a/include/asm-alpha/mman.h
+++ b/include/asm-alpha/mman.h
@@ -52,4 +52,10 @@ #define MADV_DOFORK	11		/* do inherit ac
 #define MAP_ANON	MAP_ANONYMOUS
 #define MAP_FILE	0
 
+#ifdef __KERNEL__
+#ifndef arch_mmap_check
+#define arch_mmap_check(addr, len, flags)	(0)
+#endif
+#endif
+
 #endif /* __ALPHA_MMAN_H__ */
diff --git a/include/asm-mips/mman.h b/include/asm-mips/mman.h
index 046cf68..f19e858 100644
--- a/include/asm-mips/mman.h
+++ b/include/asm-mips/mman.h
@@ -75,4 +75,10 @@ #define MADV_DOFORK	11		/* do inherit ac
 #define MAP_ANON	MAP_ANONYMOUS
 #define MAP_FILE	0
 
+#ifdef __KERNEL__
+#ifndef arch_mmap_check
+#define arch_mmap_check(addr, len, flags)	(0)
+#endif
+#endif
+
 #endif /* _ASM_MMAN_H */
diff --git a/include/asm-parisc/mman.h b/include/asm-parisc/mman.h
index 0ef15ee..9829b31 100644
--- a/include/asm-parisc/mman.h
+++ b/include/asm-parisc/mman.h
@@ -59,4 +59,10 @@ #define MAP_ANON	MAP_ANONYMOUS
 #define MAP_FILE	0
 #define MAP_VARIABLE	0
 
+#ifdef __KERNEL__
+#ifndef arch_mmap_check
+#define arch_mmap_check(addr, len, flags)	(0)
+#endif
+#endif
+
 #endif /* __PARISC_MMAN_H__ */


WARNING: multiple messages have this Message-ID (diff)
From: Kirill Korotaev <dev@sw.ru>
To: Kyle McMartin <kyle@parisc-linux.org>
Cc: Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Fernando Vazquez <fernando@oss.ntt.co.jp>,
	"David S. Miller" <davem@davemloft.net>,
	tony.luck@intel.com, linux-ia64@vger.kernel.org,
	stable@kernel.org, xemul@openvz.org, devel@openvz.org
Subject: Re: [PATCH] IA64,sparc: local DoS with corrupted ELFs
Date: Tue, 05 Sep 2006 17:08:55 +0400	[thread overview]
Message-ID: <44FD76E7.10407@sw.ru> (raw)
In-Reply-To: <20060905113939.GA5130@tachyon.int.mcmartin.ca>

Andrew, Kyle,

> On Mon, Sep 04, 2006 at 04:17:00PM +0400, Kirill Korotaev wrote:
> 
>>--- a/include/asm-generic/mman.h
>>+++ b/include/asm-generic/mman.h
>>@@ -39,4 +39,10 @@ #define MADV_DOFORK	11		/* do inherit ac
>>#define MAP_ANON	MAP_ANONYMOUS
>>#define MAP_FILE	0
>>
>>+#ifdef __KERNEL__
>>+#ifndef arch_mmap_check
>>+#define arch_mmap_check(addr, len, flags)	(0)
>>+#endif
>>+#endif
>>+
>>#endif
> 
> 
> This breaks all arches that don't use asm-generic/mman.h, and that you
> didn't add arch_mmap_check to asm/mman.h for.

oops... You are right.

is define 
#define arch_mmap_check(addr, len, flags)	(0)
ok for you in such mman.h headers which do not include asm-generic/mman.h?
If yes, the following patch should help.

Though I didn't get the idea of include/asm-um/mman.h:
#include "asm/arch/mman.h"

This patch adds define of arch_mmap_check() to
archs which do not include include/asm-generic/mman.h

---

diff --git a/include/asm-alpha/mman.h b/include/asm-alpha/mman.h
index 5f24c75..51cf354 100644
--- a/include/asm-alpha/mman.h
+++ b/include/asm-alpha/mman.h
@@ -52,4 +52,10 @@ #define MADV_DOFORK	11		/* do inherit ac
 #define MAP_ANON	MAP_ANONYMOUS
 #define MAP_FILE	0
 
+#ifdef __KERNEL__
+#ifndef arch_mmap_check
+#define arch_mmap_check(addr, len, flags)	(0)
+#endif
+#endif
+
 #endif /* __ALPHA_MMAN_H__ */
diff --git a/include/asm-mips/mman.h b/include/asm-mips/mman.h
index 046cf68..f19e858 100644
--- a/include/asm-mips/mman.h
+++ b/include/asm-mips/mman.h
@@ -75,4 +75,10 @@ #define MADV_DOFORK	11		/* do inherit ac
 #define MAP_ANON	MAP_ANONYMOUS
 #define MAP_FILE	0
 
+#ifdef __KERNEL__
+#ifndef arch_mmap_check
+#define arch_mmap_check(addr, len, flags)	(0)
+#endif
+#endif
+
 #endif /* _ASM_MMAN_H */
diff --git a/include/asm-parisc/mman.h b/include/asm-parisc/mman.h
index 0ef15ee..9829b31 100644
--- a/include/asm-parisc/mman.h
+++ b/include/asm-parisc/mman.h
@@ -59,4 +59,10 @@ #define MAP_ANON	MAP_ANONYMOUS
 #define MAP_FILE	0
 #define MAP_VARIABLE	0
 
+#ifdef __KERNEL__
+#ifndef arch_mmap_check
+#define arch_mmap_check(addr, len, flags)	(0)
+#endif
+#endif
+
 #endif /* __PARISC_MMAN_H__ */


  reply	other threads:[~2006-09-05 13:08 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-04 12:17 [PATCH] IA64,sparc: local DoS with corrupted ELFs Kirill Korotaev
2006-09-04 12:17 ` Kirill Korotaev
2006-09-05 11:39 ` Kyle McMartin
2006-09-05 11:39   ` Kyle McMartin
2006-09-05 13:08   ` Kirill Korotaev [this message]
2006-09-05 13:08     ` Kirill Korotaev
2006-09-06 18:24 ` Linus Torvalds
2006-09-06 18:24   ` Linus Torvalds
2006-09-06 18:27   ` Matthew Wilcox
2006-09-06 18:27     ` Matthew Wilcox
2006-09-06 18:45     ` [stable] " Greg KH
2006-09-06 18:45       ` Greg KH
2006-09-06 19:12       ` Matthew Wilcox
2006-09-06 19:12         ` Matthew Wilcox
2006-09-06 19:17         ` Christoph Lameter
2006-09-06 19:17           ` Christoph Lameter
2006-09-06 19:25         ` Greg KH
2006-09-06 19:25           ` Greg KH
2006-09-06 20:27           ` Willy Tarreau
2006-09-06 20:27             ` Willy Tarreau
2006-09-07 11:17           ` Marcel Holtmann
2006-09-07 13:11             ` Marcel Holtmann
2006-09-07 15:37             ` Greg KH
2006-09-07 15:37               ` Greg KH
2006-09-08  9:11           ` Jes Sorensen
2006-09-08  9:11             ` Jes Sorensen
2006-09-06 19:06     ` Arjan van de Ven
2006-09-06 19:06       ` Arjan van de Ven
2006-09-08  9:12       ` Jes Sorensen
2006-09-08  9:12         ` Jes Sorensen
2006-09-07 10:17   ` Kirill Korotaev
2006-09-07 10:17     ` Kirill Korotaev
2006-09-07 15:17     ` Linus Torvalds
2006-09-07 15:17       ` Linus Torvalds
2006-09-07 20:07       ` Willy Tarreau
2006-09-07 20:07         ` Willy Tarreau
2006-09-07 23:42         ` Andrew Morton
2006-09-07 23:42           ` Andrew Morton
2006-09-08  4:34           ` Willy Tarreau
2006-09-08  4:34             ` Willy Tarreau
2006-09-08 15:15       ` Kirill Korotaev
2006-09-08 15:15         ` Kirill Korotaev
2006-09-08 15:35         ` Linus Torvalds
2006-09-08 15:35           ` Linus Torvalds
2006-09-08 15:49           ` Dave Jones
2006-09-08 15:49             ` Dave Jones
2006-09-08 16:09           ` Kirill Korotaev
2006-09-08 16:09             ` Kirill Korotaev
2006-09-13 15:46             ` Randy.Dunlap
2006-09-13 15:46               ` Randy.Dunlap
2006-09-06 20:20 ` Linus Torvalds
2006-09-06 20:20   ` Linus Torvalds
2006-09-06 21:27   ` Luck, Tony
2006-09-06 21:27     ` Luck, Tony
2006-09-06 23:23   ` 
2006-09-06 23:23     ` Fernando Luis Vázquez Cao

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=44FD76E7.10407@sw.ru \
    --to=dev@sw.ru \
    --cc=akpm@osdl.org \
    --cc=davem@davemloft.net \
    --cc=devel@openvz.org \
    --cc=fernando@oss.ntt.co.jp \
    --cc=kyle@parisc-linux.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=torvalds@osdl.org \
    --cc=xemul@openvz.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.