From: "David S. Miller" <davem@davemloft.net>
To: davej@redhat.com
Cc: linux-kernel@vger.kernel.org, hyoshiok@miraclelinux.com,
mm-commits@vger.kernel.org
Subject: Re: x86-cache-pollution-aware-__copy_from_user_ll.patch added to -mm tree
Date: Sun, 04 Sep 2005 21:08:48 -0700 (PDT) [thread overview]
Message-ID: <20050904.210848.43982827.davem@davemloft.net> (raw)
In-Reply-To: <20050904202333.GA4715@redhat.com>
From: Dave Jones <davej@redhat.com>
Subject: Re: x86-cache-pollution-aware-__copy_from_user_ll.patch added to -mm tree
Date: Sun, 4 Sep 2005 16:23:33 -0400
> On Sun, Sep 04, 2005 at 01:16:00PM -0700, Andrew Morton wrote:
> > unsigned long __copy_to_user_ll(void __user *to, const void *from, unsigned long n)
> > {
> > BUG_ON((long) n < 0);
>
> Ehh? It's unsigned. This will never be true.
It's to catch the user slipping in enormous lengths to
the user copy routines.
Sparc64 makes this check as well. From U3memcpy.S:
srlx %o2, 31, %g2
cmp %g2, 0
tne %xcc, 5
%o2 is the length, we make sure the upper 33-bits are clear.
prev parent reply other threads:[~2005-09-05 4:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200509042017.j84KHekQ032373@shell0.pdx.osdl.net>
2005-09-04 20:23 ` Dave Jones
2005-09-04 21:42 ` Andrew Morton
2005-09-05 3:19 ` Hiro Yoshioka
2005-09-05 4:15 ` David S. Miller
2005-09-05 4:08 ` David S. Miller [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=20050904.210848.43982827.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=davej@redhat.com \
--cc=hyoshiok@miraclelinux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mm-commits@vger.kernel.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
all inboxes | Powered by JetHome®