From: Matthew Brost <matthew.brost@intel.com>
To: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
Cc: Shuicheng Lin <shuicheng.lin@intel.com>,
<intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 0/2] Silence allocation warnings for sync arrays
Date: Mon, 24 Nov 2025 09:32:49 -0800 [thread overview]
Message-ID: <aSSWwcAtSjlNNWtq@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <f3a9603475e70d85368e5083046365eb507da502.camel@linux.intel.com>
On Mon, Nov 24, 2025 at 12:19:14PM +0100, Thomas Hellström wrote:
> On Thu, 2025-11-20 at 23:42 +0000, Shuicheng Lin wrote:
> > Suppress allocation warning as driver already return -ENOMEM safely.
>
> Even if the driver returns -ENOMEM, in practice a malicious user could
> allocate most or all of system memory.
>
> So IMO we need to restrict num_syncs to some reasonable number, and if
> the allocation is persistent we should add __GFP_ACCOUNT.
Neither allocation is persistent - the kmallocs here only live for
execution time of the IOCTL.
Matt
>
> /Thomas
>
>
> >
> > Shuicheng Lin (2):
> > drm/xe: Silence allocation warnings for sync arrays
> > drm/xe/oa: Silence allocation warnings for sync arrays
> >
> > drivers/gpu/drm/xe/xe_exec.c | 3 ++-
> > drivers/gpu/drm/xe/xe_oa.c | 3 ++-
> > drivers/gpu/drm/xe/xe_vm.c | 3 ++-
> > 3 files changed, 6 insertions(+), 3 deletions(-)
> >
>
next prev parent reply other threads:[~2025-11-24 17:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-20 23:42 [PATCH 0/2] Silence allocation warnings for sync arrays Shuicheng Lin
2025-11-20 23:42 ` [PATCH 1/2] drm/xe: " Shuicheng Lin
2025-11-20 23:42 ` [PATCH 2/2] drm/xe/oa: " Shuicheng Lin
2025-11-21 1:09 ` ✗ CI.checkpatch: warning for " Patchwork
2025-11-21 1:10 ` ✓ CI.KUnit: success " Patchwork
2025-11-21 1:49 ` ✓ Xe.CI.BAT: " Patchwork
2025-11-21 6:43 ` ✓ Xe.CI.Full: " Patchwork
2025-11-24 11:19 ` [PATCH 0/2] " Thomas Hellström
2025-11-24 17:32 ` Matthew Brost [this message]
2025-11-24 21:24 ` Lin, Shuicheng
2025-12-01 16:17 ` Lin, Shuicheng
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=aSSWwcAtSjlNNWtq@lstrano-desk.jf.intel.com \
--to=matthew.brost@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=shuicheng.lin@intel.com \
--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