From: Hugh Dickins <hugh@veritas.com>
To: Joel Becker <Joel.Becker@oracle.com>
Cc: linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] mm/mincore: Return EFAULT when passed an invalid address.
Date: Sat, 24 Feb 2007 01:05:27 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.4.64.0702240052360.9507@blonde.wat.veritas.com> (raw)
In-Reply-To: <20070223231112.GM7920@ca-server1.us.oracle.com>
On Fri, 23 Feb 2007, Joel Becker wrote:
> The locking fix to sys_mincore in commit
> 2f77d107050abc14bc393b34bdb7b91cf670c250 returns -ENOMEM when given a
> bad userspace address. It should return -EFAULT.
No, I think you're getting confused by the way Linus uses access_ok
on the address range given with the access_ok on the vector address.
Before and after, an access_ok failure on the output vector address
gives -EFAULT. Before and after, an invalid address in the range
to be inspected gives -ENOMEM.
Which is consistent with the other m* system calls: -EFAULT if
arguments are inaccessible, -ENOMEM if address range is invalid.
Hugh
next prev parent reply other threads:[~2007-02-24 1:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-23 22:58 mincore returning -ENOMEM instead of -EFAULT Joel Becker
2007-02-23 23:11 ` [PATCH] mm/mincore: Return EFAULT when passed an invalid address Joel Becker
2007-02-24 1:05 ` Hugh Dickins [this message]
2007-02-24 3:13 ` Joel Becker
2007-02-25 23:06 ` mincore returning -ENOMEM instead of -EFAULT Linus Torvalds
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=Pine.LNX.4.64.0702240052360.9507@blonde.wat.veritas.com \
--to=hugh@veritas.com \
--cc=Joel.Becker@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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
Powered by JetHome