All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Cervesato via ltp <ltp@lists.linux.it>
To: "Piotr Kubaj" <piotr.kubaj@intel.com>
Cc: daniel.niestepski@intel.com, tomasz.ossowski@intel.com,
	helena.anna.dubel@intel.com, rafael.j.wysocki@intel.com,
	ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v5] rfim: add new test for verifying RFIM sysfs interface
Date: Thu, 30 Jul 2026 11:46:44 +0000	[thread overview]
Message-ID: <6a6b39a5.be490abf.19f263.7d13@mx.google.com> (raw)
In-Reply-To: <20260702134553.98581-2-piotr.kubaj@intel.com>

Hi Piotr,

sorry for the delay.

> +/*\
> + * Validate presence and permissions of RFIM attributes.
> + * The kernel exposes the dvfs, fivr and dlvr attribute groups
> + * independently, gated on per-device feature bits, so the test checks
> + * whichever of the three groups the hardware presents.
> + *
> + * Permissions are verified by opening each node: read-only attributes
> + * must accept O_RDONLY and reject a write open, while read-write ones
> + * must accept O_RDWR. For sysfs nodes the mode bits alone are not
> + * authoritative - the kernel can still refuse the open in the file's
> + * own syscall handler - so open() is what actually exercises access.

Pleae use :manpage:`open(2)` and `O_RDONLY` and `O_RDWR`.

> + *
> + * The test requires root because the read-write RFIM attributes are
> + * root-owned and created mode 0644, so only the owner holds the write
> + * bit. An unprivileged user could read them but would get EACCES when
> + * opening them O_RDWR, which the read-write check would misreport as a

Same here for EACCESS and O_RDWR.

In this way we will have a certain consistency inside LTP documentation.

The rest looks ok.

Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>

--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      parent reply	other threads:[~2026-07-30 11:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-02 13:45 [LTP] [PATCH v5] rfim: add new test for verifying RFIM sysfs interface Piotr Kubaj
2026-07-02 15:24 ` [LTP] " linuxtestproject.agent
2026-07-30 11:46 ` Andrea Cervesato via ltp [this message]

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=6a6b39a5.be490abf.19f263.7d13@mx.google.com \
    --to=ltp@lists.linux.it \
    --cc=andrea.cervesato@suse.com \
    --cc=daniel.niestepski@intel.com \
    --cc=helena.anna.dubel@intel.com \
    --cc=piotr.kubaj@intel.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=tomasz.ossowski@intel.com \
    /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.