From: Russell King <rmk@arm.linux.org.uk>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Andrew Morton <akpm@osdl.org>,
dwmw2@infradead.org, Linux Arch list <linux-arch@vger.kernel.org>
Subject: Re: [patch 19/24] TASK_SIZE is variable.
Date: Sat, 5 Feb 2005 09:06:19 +0000 [thread overview]
Message-ID: <20050205090619.C30866@flint.arm.linux.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.58.0502041919300.2165@ppc970.osdl.org>; from torvalds@osdl.org on Fri, Feb 04, 2005 at 07:29:17PM -0800
On Fri, Feb 04, 2005 at 07:29:17PM -0800, Linus Torvalds wrote:
> For example, replacing TASK_SIZE in fs/namei.c with "thread->addr_limit"
> would actually clean up the code: it would mean that the games with
> "get_fs()" etc would just go away, to be replaced with something like
>
> unsigned long len;
> unsigned long limit = current_thread_info()->addr_limit;
>
> if ((unsigned long) filename >= limit)
> return -EFAULT;
> len = limit - (unsigned long) filename;
> if (len > PATH_MAX)
> len = PATH_MAX;
>
> which looks cleaner.
Except that "addr_limit" may be defined by an architecture to be zero
(which can be interpreted as 4GB by the arch specific code) for the
case where we allow kernel mode access.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
next prev parent reply other threads:[~2005-02-05 9:06 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200502050150.j151osl11380@mail.osdl.org>
2005-02-05 2:16 ` [patch 19/24] TASK_SIZE is variable Linus Torvalds
2005-02-05 3:29 ` Linus Torvalds
2005-02-05 5:52 ` David S. Miller
2005-02-07 10:59 ` David Howells
2005-02-07 19:30 ` David S. Miller
2005-02-08 9:05 ` Martin Schwidefsky
2005-02-08 19:09 ` David S. Miller
2005-02-05 9:06 ` Russell King [this message]
2005-02-05 23:44 ` David S. Miller
2005-02-06 10:50 ` Andi Kleen
2005-02-06 21:19 ` David S. Miller
2005-02-06 21:31 ` Andi Kleen
2005-02-06 21:31 ` David S. Miller
2005-02-06 21:50 ` Andi Kleen
2005-02-06 22:25 ` David S. Miller
2005-02-06 22:31 ` David S. Miller
2005-02-07 8:11 ` Andi Kleen
2005-02-07 19:28 ` David S. Miller
2005-02-07 20:15 ` Andi Kleen
2005-02-07 20:13 ` David S. Miller
2005-02-05 6:54 ` Andi Kleen
2005-02-05 7:18 ` Andrew Morton
2005-02-05 7:40 ` Andi Kleen
2005-02-05 23:27 ` David S. Miller
2005-02-06 10:38 ` Andi Kleen
2005-02-06 13:05 ` Matthew Wilcox
2005-02-05 23:15 ` David S. Miller
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=20050205090619.C30866@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--cc=akpm@osdl.org \
--cc=dwmw2@infradead.org \
--cc=linux-arch@vger.kernel.org \
--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