From: Jerome Glisse <j.glisse-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Felix Kuehling <Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
Cc: oded.gabbay-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
Ben Goz <ben.goz-5C7GfCeVMHo@public.gmane.org>,
Moses Reuben <moses.reuben-5C7GfCeVMHo@public.gmane.org>,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 22/24] drm/amdkfd: Adding new IOCTL for scratch memory v2
Date: Mon, 21 Aug 2017 13:39:19 -0400 [thread overview]
Message-ID: <20170821173918.GA4125@gmail.com> (raw)
In-Reply-To: <1502852422-19620-23-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
On Tue, Aug 15, 2017 at 11:00:20PM -0400, Felix Kuehling wrote:
> From: Moses Reuben <moses.reuben@amd.com>
>
> v2:
> * Renamed ALLOC_MEMORY_OF_SCRATCH to SET_SCRATCH_BACKING_VA
> * Removed size parameter from the ioctl, it was unused
> * Removed hole in ioctl number space
> * No more call to write_config_static_mem
> * Return correct error code from ioctl
What kind of memory is suppose to back this virtual address
range ? How big is the range suppose to be ? Can it be any
valid virtual address ?
My worry here is to ascertain that one can not abuse this
ioctl say to set the virtual address to some mmaped shared
library code/data section and write something malicious
there.
I am assuming that if it has to go through ATS/PASID of the
IOMMUv2 then the write protection will be asserted and we
will see proper COW (copy on write) due to mmap PRIVATE flags.
Idealy this area should be a special vma and the driver
should track its lifetime and cancel GPU jobs if it is
unmap. But i am unsure on how dynamic is that scratch
memory suppose to be (ie do you allocate new scratch memory
with every GPU job or is it allocated once and reuse for
every jobs).
Bigger commit message would be nice too. Like i had tons
of i believe valid questions.
Cheers,
Jérôme
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2017-08-21 17:39 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-16 2:59 [PATCH 00/24] KFD fixes, cleanups, features to make the runtime happy Felix Kuehling
[not found] ` <1502852422-19620-1-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2017-08-16 2:59 ` [PATCH 01/24] drm/amdkfd: Fix typo in dbgdev_wave_reset_wavefronts Felix Kuehling
2017-08-16 3:00 ` [PATCH 02/24] drm/radeon: Return dword offsets of address watch registers Felix Kuehling
[not found] ` <1502852422-19620-3-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2017-08-16 9:44 ` Oded Gabbay
2017-08-16 3:00 ` [PATCH 03/24] drm/amdkfd: Remove bogus divide-by-sizeof(uint32_t) Felix Kuehling
[not found] ` <1502852422-19620-4-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2017-08-16 9:44 ` Oded Gabbay
2017-08-16 3:00 ` [PATCH 04/24] drm/amdkfd: Fix allocated_queues bitmap initialization Felix Kuehling
2017-08-16 3:00 ` [PATCH 05/24] drm/amdgpu: Remove hard-coded assumptions about compute pipes Felix Kuehling
2017-08-16 3:00 ` [PATCH 06/24] drm/amdkfd: Clean up KFD style errors and warnings v2 Felix Kuehling
[not found] ` <1502852422-19620-7-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2017-08-18 17:35 ` Oded Gabbay
2017-08-16 3:00 ` [PATCH 07/24] drm/amdkfd: Consolidate and clean up log commands Felix Kuehling
2017-08-16 3:00 ` [PATCH 08/24] drm/amdkfd: Change x==NULL/false references to !x Felix Kuehling
2017-08-16 3:00 ` [PATCH 09/24] drm/amdkfd: Fix goto usage v2 Felix Kuehling
2017-08-16 3:00 ` [PATCH 10/24] drm/amdkfd: Remove usage of alloc(sizeof(struct Felix Kuehling
2017-08-16 3:00 ` [PATCH 11/24] drm/amdkfd: Remove BUG_ONs for NULL pointer arguments Felix Kuehling
2017-08-16 3:00 ` [PATCH 12/24] drm/amdkfd: Fix doorbell initialization and finalization Felix Kuehling
2017-08-16 3:00 ` [PATCH 13/24] drm/amdkfd: Allocate gtt_sa_bitmap in long units Felix Kuehling
2017-08-16 3:00 ` [PATCH 14/24] drm/amdkfd: Handle remaining BUG_ONs more gracefully v2 Felix Kuehling
[not found] ` <1502852422-19620-15-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2017-08-16 9:45 ` Oded Gabbay
2017-08-16 3:00 ` [PATCH 15/24] drm/amdkfd: Add more error printing to help bringup v2 Felix Kuehling
[not found] ` <1502852422-19620-16-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2017-08-16 9:45 ` Oded Gabbay
2017-08-16 3:00 ` [PATCH 16/24] drm/amdkfd: Clamp EOP queue size correctly on Gfx8 Felix Kuehling
2017-08-16 3:00 ` [PATCH 17/24] drm/amdkfd: Update PM4 packet headers Felix Kuehling
2017-08-16 3:00 ` [PATCH 18/24] drm/amdgpu: Disable GFX PG on CZ Felix Kuehling
2017-08-16 3:00 ` [PATCH 19/24] drm/amd: Update MEC HQD loading code for KFD Felix Kuehling
2017-08-16 3:00 ` [PATCH 20/24] drm/amdgpu: Program SH_STATIC_MEM_CONFIG globally, not per-VMID Felix Kuehling
[not found] ` <1502852422-19620-21-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2017-08-16 9:43 ` Oded Gabbay
2017-08-16 3:00 ` [PATCH 21/24] drm/amdgpu: Add kgd/kfd interface to support scratch memory v2 Felix Kuehling
[not found] ` <1502852422-19620-22-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2017-08-18 15:32 ` Oded Gabbay
2017-08-16 3:00 ` [PATCH 22/24] drm/amdkfd: Adding new IOCTL for " Felix Kuehling
[not found] ` <1502852422-19620-23-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2017-08-18 15:34 ` Oded Gabbay
2017-08-21 17:39 ` Jerome Glisse [this message]
[not found] ` <20170821173918.GA4125-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-08-21 19:21 ` Oded Gabbay
[not found] ` <CAFCwf10hhjmmoTv+3GP85FeyWYv4AyL1G+xBYmZfr_39N=wiOA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-21 20:01 ` Jerome Glisse
[not found] ` <20170821200104.GB4125-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-08-21 20:11 ` Felix Kuehling
[not found] ` <9b600e94-f3d7-d1de-90da-6e578ce8c108-5C7GfCeVMHo@public.gmane.org>
2017-08-22 6:21 ` Oded Gabbay
2017-08-21 20:06 ` Felix Kuehling
[not found] ` <3aaf8348-46b2-bff4-16fb-65f3fbc2fb48-5C7GfCeVMHo@public.gmane.org>
2017-08-22 8:52 ` Christian König
[not found] ` <f87ac8e2-8cf0-0729-87ed-de172af3499f-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-08-22 18:45 ` Felix Kuehling
2017-08-21 19:32 ` Felix Kuehling
2017-08-16 3:00 ` [PATCH 23/24] drm/amdgpu: Add kgd kfd interface get_tile_config() v2 Felix Kuehling
2017-08-16 3:00 ` [PATCH 24/24] drm/amdkfd: Implement image tiling mode support v2 Felix Kuehling
2017-08-16 7:51 ` [PATCH 00/24] KFD fixes, cleanups, features to make the runtime happy Christian König
[not found] ` <5c7f2140-0467-ebdb-87ca-0cd9d642ddbf-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-08-16 9:33 ` Oded Gabbay
2017-09-09 1:17 ` Felix Kuehling
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=20170821173918.GA4125@gmail.com \
--to=j.glisse-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=Felix.Kuehling-5C7GfCeVMHo@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=ben.goz-5C7GfCeVMHo@public.gmane.org \
--cc=moses.reuben-5C7GfCeVMHo@public.gmane.org \
--cc=oded.gabbay-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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.