From: Vladimir Murzin <murzin.v@gmail.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: linux-arch@vger.kernel.org, tglx@linutronix.de,
davem@davemloft.net, lethal@linux-sh.org
Subject: Re: [PATCH 0/6] get rid of extra check for TASK_SIZE in get_unmapped_area
Date: Thu, 10 May 2012 22:08:49 +0400 [thread overview]
Message-ID: <20120510180842.GA3808@pinguin> (raw)
In-Reply-To: <20120510075504.GB3190@n2100.arm.linux.org.uk>
On Thu, May 10, 2012 at 08:55:04AM +0100, Russell King - ARM Linux wrote:
> On Thu, May 10, 2012 at 07:01:46AM +0400, Vladimir Murzin wrote:
> > I was thinking about your suggestion. We are speaking about the same
> > problem but different solutions. Let me summarize shortly why I came
> > up with current solution:
>
> I don't think there is a problem here. I think there's just redundant
> code in every arch apart from Sparc.
>
> > * leaving check in arches make them isolated, so
> > mm->get_unmapped_area could be called safely anywhere (currently it
> > is done in hugetlb and get_fb_unmapped_area stuff)
>
> Right. So is get_fb_unmapped_area() called without first going through
> get_unmapped_area() ? As far as I can see, it isn't. Same for hugetlbfs.
D'0h I've missed f_op there.. Thanks for pointing that.
>
> I don't think you've analysed the issue you are trying to address correctly.
> As such I will *not* be giving you an ACK for your current changes to
> arch/arm.
I should have analysed this more carefully. By now I can see even more
redundant code. Actually, for some arches test for length has already
done in arch_mmap_check(). For instance, sparc32 and sparc64 do the
same check in sparc_mmap_check() as in arch_get_unmapped_area(). The
only one difference in return value: -EINVAL in lieu of -ENOMEM.
The same case for ia64.
Hmmm... What about extending generic arch_mmap_check with check (len >
TASK_SIZE) and updating arches which are coping with special cases?
Best wishes
Vladimir Murzin
prev parent reply other threads:[~2012-05-10 18:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-08 14:40 [PATCH 0/6] get rid of extra check for TASK_SIZE in get_unmapped_area Vladimir Murzin
2012-05-08 14:40 ` [PATCH 1/6] get_unmapped_area checks for TASK_SIZE before MAP_FIXED on arm Vladimir Murzin
2012-05-08 14:40 ` [PATCH 2/6] get_unmapped_area checks for TASK_SIZE before MAP_FIXED on sh Vladimir Murzin
2012-05-08 14:40 ` [PATCH 3/6] get_unmapped_area checks for TASK_SIZE before MAP_FIXED on sparc32 Vladimir Murzin
2012-05-08 16:27 ` Sam Ravnborg
2012-05-09 8:07 ` Vladimir Murzin
2012-05-09 16:18 ` Sam Ravnborg
2012-05-09 18:04 ` Vladimir Murzin
2012-05-08 17:00 ` David Miller
2012-05-08 14:40 ` [PATCH 4/6] get_unmapped_area checks for TASK_SIZE before MAP_FIXED on sparc64 Vladimir Murzin
2012-05-08 17:00 ` David Miller
2012-05-08 14:40 ` [PATCH 5/6] get_unmapped_area checks for TASK_SIZE before MAP_FIXED on x86_64 Vladimir Murzin
2012-05-08 14:40 ` [PATCH 6/6] get_unmapped_area remove extra check for TASK_SIZE Vladimir Murzin
2012-05-09 16:26 ` [PATCH 0/6] get rid of extra check for TASK_SIZE in get_unmapped_area Russell King - ARM Linux
2012-05-09 17:56 ` Vladimir Murzin
2012-05-09 18:07 ` Russell King - ARM Linux
2012-05-10 3:01 ` Vladimir Murzin
2012-05-10 7:55 ` Russell King - ARM Linux
2012-05-10 18:08 ` Vladimir Murzin [this message]
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=20120510180842.GA3808@pinguin \
--to=murzin.v@gmail.com \
--cc=davem@davemloft.net \
--cc=lethal@linux-sh.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).