public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Kazlauskas, Nicholas" <Nicholas.Kazlauskas@amd.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t 3/3] lib/fb: Clear framebuffer on amdgpu
Date: Fri, 8 Mar 2019 15:00:46 +0000	[thread overview]
Message-ID: <6cc618f5-a4a7-a63f-a126-f80b07d6ecdd@amd.com> (raw)
In-Reply-To: <155205603488.28502.11798965582789285958@skylake-alporthouse-com>

On 3/8/19 9:40 AM, Chris Wilson wrote:
> Quoting Nicholas Kazlauskas (2019-03-08 14:36:03)
>> IGT expects buffers returned from DRM_IOCTL_MODE_MAP_DUMB to be
>> cleared, but amdgpu retains the contents previously in memory
>> in the buffer - clear it on amdgpu by with a memset to 0.
> 
> How is this not a kernel information leak?
> -Chris
> 

I actually meant to write DRM_IOCTL_MODE_CREATE_DUMB, but it is an 
information leak for whatever was previously in VRAM anyway.

With AMDGPU you have to explicitly ask for the memory to be cleared when 
creating the BO with AMDGPU_GEM_CREATE_VRAM_CLEARED, but that flag isn't 
one of the flags used when creating buffers for amdgpu_mode_dumb_create.

Maybe it should be, but I'd be considered with any potential performance 
impact in doing so at least. I haven't done much driver benchmarking 
myself to know if it's a good idea or not.

Nicholas Kazlauskas
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-03-08 15:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-08 14:36 [igt-dev] [PATCH i-g-t 1/3] lib/drmtest: Add helpers to check and require amdgpu Nicholas Kazlauskas
2019-03-08 14:36 ` [igt-dev] [PATCH i-g-t 2/3] lib/debugfs: Don't do CRC sanity checks on amdgpu Nicholas Kazlauskas
2019-03-08 14:36 ` [igt-dev] [PATCH i-g-t 3/3] lib/fb: Clear framebuffer " Nicholas Kazlauskas
2019-03-08 14:40   ` Chris Wilson
2019-03-08 15:00     ` Kazlauskas, Nicholas [this message]
2019-03-08 15:08       ` Chris Wilson
2019-03-08 15:10         ` Kazlauskas, Nicholas
2019-03-08 17:45 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] lib/drmtest: Add helpers to check and require amdgpu Patchwork
2019-03-08 21:30 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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=6cc618f5-a4a7-a63f-a126-f80b07d6ecdd@amd.com \
    --to=nicholas.kazlauskas@amd.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=igt-dev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox