Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <kees@kernel.org>
To: Harish Chegondi <harish.chegondi@intel.com>
Cc: intel-xe@lists.freedesktop.org, ashutosh.dixit@intel.com,
	james.ausmus@intel.com, felix.j.degrood@intel.com,
	matthew.olson@intel.com, shubham.kumar@intel.com,
	joshua.santosh.ranjan@intel.com, lucas.demarchi@intel.com,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v12 2/8] drm/xe/uapi: Introduce API for EU stall sampling
Date: Fri, 4 Apr 2025 10:55:32 -0700	[thread overview]
Message-ID: <202504041051.CF3111DD@keescook> (raw)
In-Reply-To: <bb707a27975c33e4a912b9839b023acb7a1f9c90.1740533885.git.harish.chegondi@intel.com>

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

  reply	other threads:[~2025-04-04 17:55 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-26  1:47 [PATCH v12 0/8] Add support for EU stall sampling Harish Chegondi
2025-02-26  1:47 ` [PATCH v12 1/8] drm/xe/topology: Add a function to find the index of the last enabled DSS in a mask Harish Chegondi
2025-02-26  1:47 ` [PATCH v12 2/8] drm/xe/uapi: Introduce API for EU stall sampling Harish Chegondi
2025-04-04 17:55   ` Kees Cook [this message]
2025-04-15 17:47     ` Chegondi, Harish
2025-02-26  1:47 ` [PATCH v12 3/8] drm/xe/eustall: Add support to init, enable and disable " Harish Chegondi
2025-02-26  1:47 ` [PATCH v12 4/8] drm/xe/eustall: Add support to read() and poll() EU stall data Harish Chegondi
2025-04-16  9:22   ` Matthew Auld
2025-04-17  4:50     ` Harish Chegondi
2025-02-26  1:47 ` [PATCH v12 5/8] drm/xe/eustall: Add support to handle dropped " Harish Chegondi
2025-02-26  1:47 ` [PATCH v12 6/8] drm/xe/eustall: Add EU stall sampling support for Xe2 Harish Chegondi
2025-02-26  1:47 ` [PATCH v12 7/8] drm/xe/uapi: Add a device query to get EU stall sampling information Harish Chegondi
2025-02-26  1:47 ` [PATCH v12 8/8] drm/xe/eustall: Add workaround 22016596838 which applies to PVC Harish Chegondi
2025-02-26  1:52 ` ✓ CI.Patch_applied: success for Add support for EU stall sampling Patchwork
2025-02-26  1:53 ` ✗ CI.checkpatch: warning " Patchwork
2025-02-26  1:54 ` ✓ CI.KUnit: success " Patchwork
2025-02-26  2:10 ` ✓ CI.Build: " Patchwork
2025-02-26  2:13 ` ✓ CI.Hooks: " Patchwork
2025-02-26  2:14 ` ✓ CI.checksparse: " Patchwork
2025-02-26  2:32 ` ✓ Xe.CI.BAT: " Patchwork
2025-02-26  2:34 ` [PATCH v12 0/8] " Dixit, Ashutosh
2025-02-26 19:43   ` Dixit, Ashutosh
2025-02-26  3:52 ` ✗ Xe.CI.Full: failure for " 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=202504041051.CF3111DD@keescook \
    --to=kees@kernel.org \
    --cc=airlied@gmail.com \
    --cc=ashutosh.dixit@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=felix.j.degrood@intel.com \
    --cc=harish.chegondi@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=james.ausmus@intel.com \
    --cc=joshua.santosh.ranjan@intel.com \
    --cc=lucas.demarchi@intel.com \
    --cc=matthew.olson@intel.com \
    --cc=shubham.kumar@intel.com \
    --cc=simona@ffwll.ch \
    /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