From: Greg KH <greg@kroah.com>
To: Andi Shyti <andi.shyti@linux.intel.com>
Cc: stable@vger.kernel.org, Jann Horn <jannh@google.com>,
Chris Wilson <chris.p.wilson@linux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Matthew Auld <matthew.auld@intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Jonathan Cavitt <Jonathan.cavitt@intel.com>
Subject: Re: [PATCH 4.19.y] drm/i915/gem: Fix Virtual Memory mapping boundaries calculation
Date: Tue, 13 Aug 2024 18:09:04 +0200 [thread overview]
Message-ID: <2024081308-olive-fondness-db98@gregkh> (raw)
In-Reply-To: <2024081306-tasty-spoof-62c6@gregkh>
On Tue, Aug 13, 2024 at 05:28:15PM +0200, Greg KH wrote:
> On Tue, Aug 13, 2024 at 04:14:36PM +0200, Andi Shyti wrote:
> > Commit 8bdd9ef7e9b1b2a73e394712b72b22055e0e26c3 upstream.
> >
> > Calculating the size of the mapped area as the lesser value
> > between the requested size and the actual size does not consider
> > the partial mapping offset. This can cause page fault access.
> >
> > Fix the calculation of the starting and ending addresses, the
> > total size is now deduced from the difference between the end and
> > start addresses.
> >
> > Additionally, the calculations have been rewritten in a clearer
> > and more understandable form.
> >
> > Fixes: c58305af1835 ("drm/i915: Use remap_io_mapping() to prefault all PTE in a single pass")
> > Reported-by: Jann Horn <jannh@google.com>
> > Co-developed-by: Chris Wilson <chris.p.wilson@linux.intel.com>
> > Signed-off-by: Chris Wilson <chris.p.wilson@linux.intel.com>
> > Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > Cc: Matthew Auld <matthew.auld@intel.com>
> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > Cc: <stable@vger.kernel.org> # v4.9+
> > Reviewed-by: Jann Horn <jannh@google.com>
> > Reviewed-by: Jonathan Cavitt <Jonathan.cavitt@intel.com>
> > [Joonas: Add Requires: tag]
> > Requires: 60a2066c5005 ("drm/i915/gem: Adjust vma offset for framebuffer mmap offset")
> > Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > Link: https://patchwork.freedesktop.org/patch/msgid/20240802083850.103694-3-andi.shyti@linux.intel.com
> > (cherry picked from commit 97b6784753da06d9d40232328efc5c5367e53417)
> > Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > ---
> > drivers/gpu/drm/i915/i915_gem.c | 48 +++++++++++++++++++++++++++++----
> > 1 file changed, 43 insertions(+), 5 deletions(-)
>
> Both now applied, thanks.
Wait, did you build this? I get the following error:
CC [M] drivers/gpu/drm/i915/i915_gem.o
drivers/gpu/drm/i915/i915_gem.c: In function ‘set_address_limits’:
drivers/gpu/drm/i915/i915_gem.c:2034:18: error: ‘obj_offset’ undeclared (first use in this function); did you mean ‘iova_offset’?
2034 | start -= obj_offset;
| ^~~~~~~~~~
| iova_offset
I'll drop this now.
Can you fix this up and provide a working version?
thanks,
greg k-h
next prev parent reply other threads:[~2024-08-13 16:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-12 9:26 FAILED: patch "[PATCH] drm/i915/gem: Fix Virtual Memory mapping boundaries" failed to apply to 4.19-stable tree gregkh
2024-08-13 14:14 ` [PATCH 4.19.y] drm/i915/gem: Fix Virtual Memory mapping boundaries calculation Andi Shyti
2024-08-13 15:28 ` Greg KH
2024-08-13 16:09 ` Greg KH [this message]
2024-08-13 16:57 ` Andi Shyti
2024-08-13 17:09 ` [PATCH 4.19.y v2] " Andi Shyti
2024-08-13 17:25 ` Greg KH
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=2024081308-olive-fondness-db98@gregkh \
--to=greg@kroah.com \
--cc=Jonathan.cavitt@intel.com \
--cc=andi.shyti@linux.intel.com \
--cc=chris.p.wilson@linux.intel.com \
--cc=jannh@google.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=matthew.auld@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=stable@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