All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Riana Tauro" <riana.tauro@intel.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v5 1/3] drm/drm_ras: Add drm_ras netlink error event
Date: Tue, 21 Jul 2026 08:26:29 +0000	[thread overview]
Message-ID: <20260721082629.841EF1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260720082208.2648279-6-riana.tauro@intel.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] The 'error-report' multicast group lacks the admin-perm flag, allowing unprivileged users to listen to sensitive hardware events.
- [Medium] The exported API drm_ras_nl_error_event() unconditionally uses GFP_KERNEL for netlink message allocation, making it unsafe to call from atomic context.
--

--- Patch [1]: [PATCH v5 1/3] drm/drm_ras: Add drm_ras netlink error event ---
commit 50118022fc58ae5076236cbd29a79d06fb22c201
Author: Riana Tauro <riana.tauro@intel.com>
drm/drm_ras: Add drm_ras netlink error event

This commit defines a new netlink event error-event and a new multicast
group error-report in drm_ras to report hardware errors to userspace.
It also adds the exported function drm_ras_nl_error_event() to trigger
these events from drivers.

> diff --git a/Documentation/netlink/specs/drm_ras.yaml b/Documentation/netlink/specs/drm_ras.yaml
> index e113056f8c016..8aed3d4515e5a 100644
> --- a/Documentation/netlink/specs/drm_ras.yaml
> +++ b/Documentation/netlink/specs/drm_ras.yaml
[ ... ]
> +mcast-groups:
> +  list:
> +    -
> +      name: error-report

[Severity: High]
Should this multicast group include flags: [admin-perm]?

The netlink commands for this family explicitly require GENL_ADMIN_PERM, but
this multicast group omits the flag. Without it, unprivileged users can open
a netlink socket and subscribe to the error-report group, potentially
observing sensitive hardware reliability events that could be used in
side-channel attacks.

> diff --git a/drivers/gpu/drm/drm_ras.c b/drivers/gpu/drm/drm_ras.c
> index d6eab29a1394c..0b77e4358ea8f 100644
> --- a/drivers/gpu/drm/drm_ras.c
> +++ b/drivers/gpu/drm/drm_ras.c
[ ... ]
> +int drm_ras_nl_error_event(struct drm_ras_node *node, u32 error_id, const char *error_name,
> +			   u32 value)
> +{
> +	struct genl_info info;
> +	struct sk_buff *msg;
> +	struct nlattr *hdr;
> +	int ret;
> +
> +	if (!error_name)
> +		return -EINVAL;
> +
> +	genl_info_init_ntf(&info, &drm_ras_nl_family, DRM_RAS_CMD_ERROR_EVENT);
> +
> +	msg = genlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL);

[Severity: Medium]
Will this function be called from atomic contexts?

Hardware RAS errors are frequently detected and reported from interrupt
handlers or while holding spinlocks. If a driver calls this API from an atomic
context, the unconditional GFP_KERNEL allocation will cause a sleep-in-atomic
panic.

Would it be safer to accept a gfp_t mask as a parameter, or default to
GFP_ATOMIC, to support reporting from these contexts?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260720082208.2648279-5-riana.tauro@intel.com?part=1

  parent reply	other threads:[~2026-07-21  8:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-20  8:22 [PATCH v5 0/3] Add drm_ras netlink error event support Riana Tauro
2026-07-20  8:22 ` [PATCH v5 1/3] drm/drm_ras: Add drm_ras netlink error event Riana Tauro
2026-07-21  6:02   ` Raag Jadav
2026-07-21  6:19     ` Tauro, Riana
2026-07-21  8:26   ` sashiko-bot [this message]
2026-07-20  8:22 ` [PATCH v5 2/3] drm/xe/xe_ras: Report correctable error events to userspace Riana Tauro
2026-07-21  8:26   ` sashiko-bot
2026-07-21  8:37   ` Raag Jadav
2026-07-21 13:22     ` Tauro, Riana
2026-07-21 17:08       ` Raag Jadav
2026-07-22  4:38         ` Tauro, Riana
2026-07-20  8:22 ` [PATCH v5 3/3] drm/xe/xe_ras: Report uncorrectable " Riana Tauro
2026-07-21  8:26   ` sashiko-bot
2026-07-21  8:40   ` Raag Jadav
2026-07-20 12:01 ` ✓ CI.KUnit: success for Add drm_ras netlink error event support (rev5) Patchwork
2026-07-20 12:48 ` ✓ Xe.CI.BAT: " Patchwork
2026-07-20 14:50 ` ✓ 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=20260721082629.841EF1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=riana.tauro@intel.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.