From: Ramesh Adhikari <adhikari.resume@gmail.com>
To: matthew.brost@intel.com
Cc: thomas.hellstrom@linux.intel.com, intel-xe@lists.freedesktop.org,
rodrigo.vivi@intel.com, stable@vger.kernel.org
Subject: Re: [PATCH v2] drm/xe: Add bounds check for num_binds to prevent memory exhaustion
Date: Sat, 9 May 2026 21:12:37 +0530 [thread overview]
Message-ID: <20260509154237.57082-1-adhikari.resume@gmail.com> (raw)
In-Reply-To: <20260507055352.61017-1-adhikari.resume@gmail.com>
Hi Matthew and Thomas,
I apologize if you're receiving this message multiple times - I've tried
sending replies twice before but they don't appear in the mailing list
archives or on Patchwork, so I'm not sure if they reached you. I also
attempted to send a v3 patch which similarly didn't appear. If you did
receive my previous emails, I sincerely apologize for the duplicate messages.
When I was tracing through the code, I found that vm_bind_ioctl_ops_create
allocates about 160 bytes per bind (drm_gpuva_ops + xe_vma_op) in the loop,
and those allocations use GFP_KERNEL without __GFP_ACCOUNT. That's separate
from the main arrays you already have protected with __GFP_ACCOUNT.
At 2048 binds that's only 320KB unaccounted, which is why I thought it was
safe to start conservative. But you're right - at 64k binds it would still
only be about 10MB unaccounted, which is probably fine and won't force
unnecessary fallbacks.
Should I send a v4 with 64k? Or do you think the loop allocations I found
need a different approach?
Thanks,
Ramesh
next prev parent reply other threads:[~2026-05-09 15:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 5:53 [PATCH v2] drm/xe: Add bounds check for num_binds to prevent memory exhaustion Ramesh Adhikari
2026-05-07 6:47 ` Thomas Hellström
2026-05-07 14:28 ` Matthew Brost
2026-05-08 6:48 ` Ramesh Adhikari
2026-05-09 15:42 ` Ramesh Adhikari [this message]
2026-05-09 17:14 ` Ramesh Adhikari
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=20260509154237.57082-1-adhikari.resume@gmail.com \
--to=adhikari.resume@gmail.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=stable@vger.kernel.org \
--cc=thomas.hellstrom@linux.intel.com \
/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