mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alessio Belle <Alessio.Belle@imgtec.com>
To: "gye976@gmail.com" <gye976@gmail.com>
Cc: Luigi Santivetti <Luigi.Santivetti@imgtec.com>,
	"imagination@lists.freedesktop.org"
	<imagination@lists.freedesktop.org>,
	"simona@ffwll.ch" <simona@ffwll.ch>,
	Brajesh Gupta <Brajesh.Gupta@imgtec.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"airlied@gmail.com" <airlied@gmail.com>,
	"maarten.lankhorst@linux.intel.com"
	<maarten.lankhorst@linux.intel.com>,
	Alexandru Dadu <Alexandru.Dadu@imgtec.com>,
	"tzimmermann@suse.de" <tzimmermann@suse.de>,
	"mripard@kernel.org" <mripard@kernel.org>
Subject: Re: [PATCH v2 2/2] drm/imagination: Size page table preallocation by device address
Date: Thu, 8 Oct 2026 14:25:29 +0000	[thread overview]
Message-ID: <67ab8185350907d6fc6ff15ffcef4012902e0d96.camel@imgtec.com> (raw)
In-Reply-To: <CAKbEznvDanJtt8yEL2UmTeLpA1SZOT693E6AD1Xau+mU4Mztuw@mail.gmail.com>

Hi Gyeyoung,

On Tue, 2026-10-06 at 17:16 +0900, Gyeyoung Baek wrote:
> Hi Alessio, Brajesh,
> 
> > 
> > Somewhere in the description, could you also point out that the previous MMU
> > page count calculation could underflow when a mapping crossed a page table
> > boundary, that would lead to the driver preallocating a huge number of MMU
> > pages, exhausting system memory (so more or less what Sashiko pointed out in v1
> > of your VM_BIND series and in one of Brajesh's recent patches), and that the new
> > calculation also fixes that? I think it's ok to fix these together, or anyway
> > I'm fine with it in this case, but up to you if you'd rather split them.
> 
> Since it's all within one function, I think keeping it in a single
> patch makes more sense.
> 
> > Due to all of these and the fact that these errors are easy to trigger from
> > userspace, I think this patch needs Cc: stable@vger.kernel.org below.
> > 
> 
> Agreed, will add.
> 
> > > @@ -2337,7 +2337,7 @@ void pvr_mmu_op_context_destroy(struct pvr_mmu_op_context *op_ctx)
> > >   * @ctx: MMU context associated with owning VM context.
> > >   * @sgt: Scatter gather table containing pages pinned for use by this context.
> > >   * @device_addr: Virtual device address at the start of the requested mapping.
> > > - * @sgt_offset: Start offset of the requested device-virtual memory mapping.
> > > + * @sgt_offset: Offset into @sgt of the start of the requested mapping.
> > 
> > nit: could you also update the other similar description inside struct
> > pvr_mmu_op_context?
> 
> I'll address the rest in v3 as well.

Sorry for not waiting your v3, I wanted to be certain of having these bugs (OOM
panic in particular) fixed in the next release candidate or release, so I went
ahead and applied these patches to drm-misc-fixes. I've only updated the commit
message for this one and left the comment update for another time. Many thanks
for your patches.

Alessio

> 
> Thanks to both of you for the reviews!
> 


      reply	other threads:[~2026-10-08 14:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-01 13:39 [PATCH v2 0/2] drm/imagination: Fix pre-existing bugs flagged by Sashiko's review of a VM_BIND series Gyeyoung Baek
2026-10-01 13:39 ` [PATCH v2 1/2] drm/imagination: Fix reference and vm_bo handling in remap() Gyeyoung Baek
2026-10-01 13:39 ` [PATCH v2 2/2] drm/imagination: Size page table preallocation by device address Gyeyoung Baek
2026-10-01 14:31   ` Brajesh Gupta
2026-10-02  1:08     ` Gyeyoung Baek
2026-10-05 13:32       ` Brajesh Gupta
2026-10-05 15:14   ` Alessio Belle
2026-10-06  8:16     ` Gyeyoung Baek
2026-10-08 14:25       ` Alessio Belle [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=67ab8185350907d6fc6ff15ffcef4012902e0d96.camel@imgtec.com \
    --to=alessio.belle@imgtec.com \
    --cc=Alexandru.Dadu@imgtec.com \
    --cc=Brajesh.Gupta@imgtec.com \
    --cc=Luigi.Santivetti@imgtec.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gye976@gmail.com \
    --cc=imagination@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /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®