[PATCH v12 2/8] drm/xe/uapi: Introduce API for EU stall sampling
Chegondi, Harish
harish.chegondi at intel.com
Tue Apr 15 17:47:52 UTC 2025
I will send out a patch to replace __copy_from_user() with copy_from_user().
-Harish
PS: Having issues with mutt, hence replying from Outlook
-----Original Message-----
From: Kees Cook <kees at kernel.org>
Sent: Friday, April 4, 2025 10:56 AM
To: Chegondi, Harish <harish.chegondi at intel.com>
Cc: intel-xe at lists.freedesktop.org; Dixit, Ashutosh <ashutosh.dixit at intel.com>; Ausmus, James <james.ausmus at intel.com>; Degrood, Felix J <felix.j.degrood at intel.com>; Olson, Matthew <matthew.olson at intel.com>; Kumar, Shubham <shubham.kumar at intel.com>; Ranjan, Joshua Santhosh <joshua.santosh.ranjan at intel.com>; De Marchi, Lucas <lucas.demarchi at intel.com>; David Airlie <airlied at gmail.com>; Simona Vetter <simona at ffwll.ch>; dri-devel at lists.freedesktop.org
Subject: Re: [PATCH v12 2/8] drm/xe/uapi: Introduce API for EU stall sampling
On Tue, Feb 25, 2025 at 05:47:06PM -0800, Harish Chegondi wrote:
> +static int xe_eu_stall_user_ext_set_property(struct xe_device *xe, u64 extension,
> + struct eu_stall_open_properties *props) {
> + u64 __user *address = u64_to_user_ptr(extension);
> + struct drm_xe_ext_set_property ext;
> + int err;
> + u32 idx;
> +
> + err = __copy_from_user(&ext, address, sizeof(ext));
Why is this safe? (i.e. why is it not copy_from_user()?) I see no
access_ok() check anywhere in the ioctl call path to this function.
--
Kees Cook
More information about the dri-devel
mailing list