All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
To: "David Hildenbrand (Arm)" <david@kernel.org>
Cc: "Liam R. Howlett" <liam@infradead.org>,
	 Vlastimil Babka <vbabka@kernel.org>,
	Mike Rapoport <rppt@kernel.org>,
	 Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>,
	 Andrew Morton <akpm@linux-foundation.org>,
	Willy Tarreau <w@1wt.eu>,
	 Jani Nikula <jani.nikula@linux.intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	 Rodrigo Vivi <rodrigo.vivi@intel.com>,
	Tvrtko Ursulin <tursulin@ursulin.net>,
	 David Airlie <airlied@gmail.com>,
	Simona Vetter <simona@ffwll.ch>,
	 Chris Wilson <chris@chris-wilson.co.uk>,
	Matthew Auld <matthew.auld@intel.com>,
	 Madhavan Srinivasan <maddy@linux.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	 Nicholas Piggin <npiggin@gmail.com>,
	"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
	 "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>,
	Shrikanth Hegde <sshegde@linux.ibm.com>,
	 Rik van Riel <riel@redhat.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	 linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	intel-gfx@lists.freedesktop.org,
	 dri-devel@lists.freedesktop.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 3/5] drm/i915/selftests: request read access for mmap access tests
Date: Sat, 14 Nov 2026 18:58:59 +0000	[thread overview]
Message-ID: <avivbKZSctYksFqd@gremlin> (raw)
In-Reply-To: <20261112-access_shite-v1-3-988a5c470db2@kernel.org>

On Thu, Nov 12, 2026 at 11:08:59PM +0100, David Hildenbrand (Arm) wrote:
> __igt_mmap_access() reads the buffer with access_process_vm() without
> FOLL_FORCE, but creates the mapping with only PROT_WRITE. Request
> PROT_READ as well so the test remains valid when we fix the ->access
> fallback to properly check VMA access permissions.
>
> Fixes: 9f909e215fea ("drm/i915: Implement vm_ops->access for gdb access into mmaps")
> Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>

Seems sensible so:

Acked-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>

> ---
>  drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
> index 303be698891fd..d9c828032a1aa 100644
> --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
> +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c
> @@ -1460,7 +1460,8 @@ static int __igt_mmap_access(struct drm_i915_private *i915,
>  	if (err)
>  		return err;
>
> -	addr = igt_mmap_offset(i915, offset, obj->base.size, PROT_WRITE, MAP_SHARED);
> +	addr = igt_mmap_offset(i915, offset, obj->base.size,
> +			       PROT_READ | PROT_WRITE, MAP_SHARED);
>  	if (IS_ERR_VALUE(addr))
>  		return addr;
>  	ptr = (unsigned long __user *)addr;
>
> --
> 2.43.0
>

--
Cheers, Lorenzo


  reply	other threads:[~2026-11-14 18:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 22:08 [PATCH 0/5] mm,drm/i915,powerpc/spufs: vm_ops->access related fixes David Hildenbrand (Arm)
2026-11-12 22:08 ` [PATCH 1/5] mm: do not call vm_ops->access with FOLL_ANON David Hildenbrand (Arm)
2026-11-14 18:56   ` Lorenzo Stoakes (ARM)
2026-11-12 22:08 ` [PATCH 2/5] drm/i915: consider vm_pgoff in vm_access() David Hildenbrand (Arm)
2026-11-14 18:58   ` Lorenzo Stoakes (ARM)
2026-11-12 22:08 ` [PATCH 3/5] drm/i915/selftests: request read access for mmap access tests David Hildenbrand (Arm)
2026-11-14 18:58   ` Lorenzo Stoakes (ARM) [this message]
2026-11-12 22:09 ` [PATCH 4/5] powerpc/spufs: consider vm_pgoff in spufs_mem_mmap_access() David Hildenbrand (Arm)
2026-11-14 18:59   ` Lorenzo Stoakes (ARM)
2026-11-12 22:09 ` [PATCH 5/5] mm: check permissions and bounds for vm_ops->access David Hildenbrand (Arm)
2026-11-13 20:25   ` Kuehling, Felix
2026-11-13 21:37     ` David Hildenbrand (Arm)
2026-11-13  1:50 ` ✓ i915.CI.BAT: success for mm,drm/i915,powerpc/spufs: vm_ops->access related fixes Patchwork
2026-11-14  3:28 ` ✗ i915.CI.Full: failure " Patchwork
2026-11-14 16:17 ` [PATCH 0/5] " David Hildenbrand (Arm)

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=avivbKZSctYksFqd@gremlin \
    --to=ljs@kernel.org \
    --cc=airlied@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=chleroy@kernel.org \
    --cc=chris@chris-wilson.co.uk \
    --cc=david@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=matthew.auld@intel.com \
    --cc=mhocko@suse.com \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=riel@redhat.com \
    --cc=ritesh.list@gmail.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=rppt@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=sshegde@linux.ibm.com \
    --cc=surenb@google.com \
    --cc=tursulin@ursulin.net \
    --cc=vbabka@kernel.org \
    --cc=w@1wt.eu \
    /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.