[igt-dev] [PATCH 2/2] i915/perf: Add tests for mapped OA buffer

Chris Wilson chris.p.wilson at intel.com
Thu Jul 30 09:53:52 UTC 2020


Quoting Umesh Nerlige Ramappa (2020-07-30 01:46:03)
> +static void map_oa_buffer_unprivilege_access(void)
> +{
> +       void *vaddr;
> +       uint32_t size;
> +
> +       vaddr = map_oa_buffer(&size);
> +
> +       igt_fork(child, 1) {
> +               igt_drop_root();
> +               try_invalid_access(vaddr);
> +       }
> +       igt_waitchildren();
> +
> +       unmap_oa_buffer(vaddr, size);
> +}

You've also defined the ABI to disallow mmapped access after forking,
even for the privileged user. One more trivial variant to ensure that
holds.
-Chris
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


More information about the igt-dev mailing list