From: Keith Packard <keithp@keithp.com>
To: intel-gfx <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH 2/2] drm/i915: properly prefault for pread/pwrite
Date: Thu, 17 Nov 2011 12:52:45 -0800 [thread overview]
Message-ID: <yunfwhmcvz6.fsf@aiko.keithp.com> (raw)
In-Reply-To: <1317203844-2930-2-git-send-email-daniel.vetter@ffwll.ch>
[-- Attachment #1.1: Type: text/plain, Size: 495 bytes --]
On Wed, 28 Sep 2011 11:57:24 +0200, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> + char __user *end = uaddr + size - 1;
...
> + if (ret == 0) {
> + if (((unsigned long)uaddr & PAGE_MASK) !=
> + ((unsigned long)end & PAGE_MASK))
> + ret = __put_user(0, end);
> + }
This is wrong -- if size == PAGE_SIZE, then we'll be doing an extra
write at 'end' every time (and, I imagine that's a common case).
And, you mentioned a 'better' fix?
--
keith.packard@intel.com
[-- Attachment #1.2: Type: application/pgp-signature, Size: 827 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2011-11-17 20:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-28 9:57 [PATCH 1/2] io-mapping: ensure io_mapping_map_atomic _is_ atomic Daniel Vetter
2011-09-28 9:57 ` [PATCH 2/2] drm/i915: properly prefault for pread/pwrite Daniel Vetter
2011-09-28 11:24 ` Chris Wilson
2011-10-23 10:18 ` Daniel Vetter
2011-10-23 10:19 ` Daniel Vetter
2011-10-23 19:23 ` Keith Packard
2011-10-23 22:11 ` Daniel Vetter
2011-11-03 21:06 ` [Intel-gfx] " Keith Packard
2011-11-03 21:06 ` Keith Packard
2011-11-03 22:10 ` [Intel-gfx] " Daniel Vetter
2011-11-03 22:10 ` Daniel Vetter
2011-11-17 20:52 ` Keith Packard [this message]
2011-11-18 9:12 ` Daniel Vetter
2011-11-18 17:42 ` Keith Packard
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=yunfwhmcvz6.fsf@aiko.keithp.com \
--to=keithp@keithp.com \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.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.