All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: "Liang, Prike" <Prike.Liang@amd.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Cc: "Deucher, Alexander" <Alexander.Deucher@amd.com>
Subject: Re: [PATCH v6 04/11] drm/amdgpu: validate userq buffer virtual address and size
Date: Tue, 15 Jul 2025 10:41:08 +0200	[thread overview]
Message-ID: <1ac476ca-a12a-4ca4-bc8c-b44186fe8ef9@amd.com> (raw)
In-Reply-To: <DS7PR12MB6005D9F97038D8E42C79656BFB57A@DS7PR12MB6005.namprd12.prod.outlook.com>

On 15.07.25 10:19, Liang, Prike wrote:
>>> +   /* Validate the userq virtual address.*/
>>> +   if (amdgpu_userq_input_va_validate(&fpriv->vm, args->in.queue_va, args-
>>> in.queue_size) ||
>>> +       amdgpu_userq_input_va_validate(&fpriv->vm, args->in.rptr_va,
>> PAGE_SIZE) ||
>>> +       amdgpu_userq_input_va_validate(&fpriv->vm, args->in.wptr_va,
>> PAGE_SIZE)) {
>>> +           drm_file_err(uq_mgr->file, "Usermode queue input virt address is
>>> +invalid\n");
>>
>> No error message on invalid userspace parameters please.
> OK, why can't give the alert log for the invalid user case?
> It's useful for catching the userq invalid VA/size case, how about change the error message to a debug level?

Never ever write into the system log that userspace did something wrong. That allows userspace to spam the log.

Only every write when the HW or the kernel detects that something is wrong. E.g. not responding HW or similar.

Regards,
Christian.

> 
>> Apart from those comments looks like the right thing to do to me.
>>
>> Regards,
>> Christian.

  reply	other threads:[~2025-07-15  8:41 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-11  9:39 [PATCH v6 01/11] drm/amdgpu: validate userq input args Prike Liang
2025-07-11  9:39 ` [PATCH v6 02/11] drm/amdgpu: validate userq hw unmap status for destroying userq Prike Liang
2025-07-11  9:39 ` [PATCH v6 03/11] drm/amdgpu: rework the userq doorbell object destroy Prike Liang
2025-07-11 12:00   ` Christian König
2025-07-15  8:07     ` Liang, Prike
2025-07-15  8:49       ` Christian König
2025-07-16  7:03         ` Liang, Prike
2025-07-11  9:39 ` [PATCH v6 04/11] drm/amdgpu: validate userq buffer virtual address and size Prike Liang
2025-07-11 12:08   ` Christian König
2025-07-15  8:19     ` Liang, Prike
2025-07-15  8:41       ` Christian König [this message]
2025-07-11  9:39 ` [PATCH v6 05/11] drm/amdgpu: add userq object va track helpers Prike Liang
2025-07-11  9:39 ` [PATCH v6 06/11] drm/amdgpu: track the userq bo va for its obj management Prike Liang
2025-07-11 12:11   ` Christian König
2025-07-15 12:05     ` Liang, Prike
2025-07-15 12:17       ` Christian König
2025-07-16  6:54         ` Liang, Prike
2025-07-11  9:39 ` [PATCH v6 07/11] drm/amdgpu: validate userq's last fence prior to destroying Prike Liang
2025-07-11 12:12   ` Christian König
2025-07-15 11:50     ` Liang, Prike
2025-07-15 12:15       ` Christian König
2025-07-11  9:39 ` [PATCH v6 08/11] drm/amdgpu: clean up the amdgpu_userq_active() Prike Liang
2025-07-11  9:39 ` [PATCH v6 09/11] drm/amdgpu: validate the shared bo for tracking usage size Prike Liang
2025-07-11 12:14   ` Christian König
2025-07-11 13:43     ` Liang, Prike
2025-07-11  9:39 ` [PATCH v6 10/11] drm/amdgpu: validate the queue va for resuming the queue Prike Liang
2025-07-11 12:18   ` Christian König
2025-07-11  9:39 ` [PATCH v6 11/11] drm/amdgpu: validate userq va for GEM unmap Prike Liang

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=1ac476ca-a12a-4ca4-bc8c-b44186fe8ef9@amd.com \
    --to=christian.koenig@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Prike.Liang@amd.com \
    --cc=amd-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.