Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Liviu Dudau <liviu.dudau@arm.com>
To: "Adrián Larumbe" <adrian.larumbe@collabora.com>
Cc: Boris Brezillon <boris.brezillon@collabora.com>,
	Daniel Almeida <daniel.almeida@collabora.com>,
	Petri Latvala <adrinael@adrinael.net>,
	Arkadiusz Hiler <arek@hiler.eu>,
	Kamil Konieczny <kamil.konieczny@linux.intel.com>,
	Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>,
	Bhanuprakash Modem <bhanuprakash.modem@gmail.com>,
	Steven Price <steven.price@arm.com>,
	igt-dev@lists.freedesktop.org, kernel@collabora.com
Subject: Re: [PATCH 2/2] tests/panthor/panthor_vm: Add vm_bind intersect-with-kbo-range test
Date: Wed, 17 Jun 2026 16:54:00 +0100	[thread overview]
Message-ID: <ajLDGNEWqmDJWpDl@e142607> (raw)
In-Reply-To: <20260616-panthor-vmbind-checkaddr-v1-2-f35b1b067f7c@collabora.com>

On Tue, Jun 16, 2026 at 04:43:23PM +0100, Adrián Larumbe wrote:
> Users of vm_bind ioctl() should never specify a VA region that intersects
> with that reserved for internal kernel BOs.
> 
> Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>

Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>

Best regards,
Liviu

> ---
>  tests/panthor/panthor_vm.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/tests/panthor/panthor_vm.c b/tests/panthor/panthor_vm.c
> index 92b105b9e83a..9548dbcbaa45 100644
> --- a/tests/panthor/panthor_vm.c
> +++ b/tests/panthor/panthor_vm.c
> @@ -270,6 +270,23 @@ int igt_main() {
>  		igt_panthor_vm_destroy(fd, vm_id, 0);
>  	}
>  
> +	igt_describe("Perform a vm_bind in the VM's kernel BOs reserved range");
> +	igt_subtest("vm_bind_intersect_kbo_range") {
> +		uint32_t vm_id;
> +		struct panthor_bo bo;
> +		uint64_t bo_size = SZ_2M;
> +		uint64_t uva_range;
> +
> +		igt_panthor_vm_create_userva_range(fd, &vm_id, 0, &uva_range);
> +		igt_assert(vm_id != 0);
> +
> +		igt_panthor_bo_create(fd, &bo, bo_size, 0, 0);
> +		igt_panthor_vm_bind(fd, vm_id, bo.handle, ALIGN(uva_range, bo_size),
> +				    bo_size, DRM_PANTHOR_VM_BIND_OP_TYPE_MAP, EINVAL);
> +
> +		igt_panthor_vm_destroy(fd, vm_id, 0);
> +	}
> +
>  	igt_fixture() {
>  		drm_close_driver(fd);
>  	}
> 
> -- 
> 2.54.0
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯

  parent reply	other threads:[~2026-06-17 15:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-16 15:43 [PATCH 0/2] panthor: Test for checking vm_bind address range is legitimate Adrián Larumbe
2026-06-16 15:43 ` [PATCH 1/2] panthor: Provide a way to access user VA range when creating a VM Adrián Larumbe
2026-06-17 12:46   ` Kamil Konieczny
2026-06-17 14:33   ` Boris Brezillon
2026-06-17 15:54   ` Liviu Dudau
2026-06-16 15:43 ` [PATCH 2/2] tests/panthor/panthor_vm: Add vm_bind intersect-with-kbo-range test Adrián Larumbe
2026-06-17 12:49   ` Kamil Konieczny
2026-06-17 14:34   ` Boris Brezillon
2026-06-17 15:54   ` Liviu Dudau [this message]
2026-06-17 18:10   ` Kamil Konieczny
2026-06-16 23:32 ` ✓ Xe.CI.BAT: success for panthor: Test for checking vm_bind address range is legitimate Patchwork
2026-06-16 23:46 ` ✓ i915.CI.BAT: " Patchwork
2026-06-17  4:26 ` ✓ Xe.CI.FULL: " 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=ajLDGNEWqmDJWpDl@e142607 \
    --to=liviu.dudau@arm.com \
    --cc=adrian.larumbe@collabora.com \
    --cc=adrinael@adrinael.net \
    --cc=arek@hiler.eu \
    --cc=bhanuprakash.modem@gmail.com \
    --cc=boris.brezillon@collabora.com \
    --cc=daniel.almeida@collabora.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=juhapekka.heikkila@gmail.com \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=kernel@collabora.com \
    --cc=steven.price@arm.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