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 <[email protected]> Sent: Friday, April 4, 2025 10:56 AM To: Chegondi, Harish <[email protected]> Cc: [email protected]; Dixit, Ashutosh <[email protected]>; Ausmus, James <[email protected]>; Degrood, Felix J <[email protected]>; Olson, Matthew <[email protected]>; Kumar, Shubham <[email protected]>; Ranjan, Joshua Santhosh <[email protected]>; De Marchi, Lucas <[email protected]>; David Airlie <[email protected]>; Simona Vetter <[email protected]>; [email protected] 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
