From: Dan Carpenter <dan.carpenter@oracle.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [bug report] drm/i915: Engine discovery query
Date: Wed, 29 May 2019 15:20:40 +0300 [thread overview]
Message-ID: <20190529122039.GL24680@kadam> (raw)
In-Reply-To: <155913173961.13891.17214046858605031723@skylake-alporthouse-com>
On Wed, May 29, 2019 at 01:08:59PM +0100, Chris Wilson wrote:
> Quoting Dan Carpenter (2019-05-29 12:52:43)
> > Hello Tvrtko Ursulin,
> >
> > The patch c5d3e39caa45: "drm/i915: Engine discovery query" from May
> > 22, 2019, leads to the following static checker warning:
> >
> > drivers/gpu/drm/i915/i915_query.c:134 query_engine_info()
> > warn: calling '__copy_to_user()' without access_ok()
> >
> > drivers/gpu/drm/i915/i915_query.c
> > 97 query_engine_info(struct drm_i915_private *i915,
> > 98 struct drm_i915_query_item *query_item)
> > 99 {
> > 100 struct drm_i915_query_engine_info __user *query_ptr =
> > 101 u64_to_user_ptr(query_item->data_ptr);
> >
> > query_item->data_ptr comes from the ioctl and hasn't been checked.
>
> copy_query_items() does the access_ok() check for the data portion after
> the header.
Ah yeah. You're right. Thanks!
regards,
dan carpenter
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2019-05-29 12:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-29 11:52 [bug report] drm/i915: Engine discovery query Dan Carpenter
2019-05-29 12:08 ` Chris Wilson
2019-05-29 12:20 ` Dan Carpenter [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=20190529122039.GL24680@kadam \
--to=dan.carpenter@oracle.com \
--cc=chris@chris-wilson.co.uk \
--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.