lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <lbxldb6hma3z7yl5d2irv4gb2yc26v6y2hndfcgzfriwh6v5lf@vy5qwuee2yu4>
Date: Thu, 18 Dec 2025 18:12:40 -0500
From: Aaron Tomlin <atomlin@...mlin.com>
To: Reinette Chatre <reinette.chatre@...el.com>
Cc: tony.luck@...el.com, Dave.Martin@....com, james.morse@....com, 
	babu.moger@....com, tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, 
	dave.hansen@...ux.intel.com, sean@...e.io, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/3] fs/resctrl: Return -EINVAL for a missing seq_show
 implementation

On Tue, Dec 16, 2025 at 09:02:27PM -0800, Reinette Chatre wrote:
> Hi Aaron,

Hi Reinette,

Thank you for your enquiry regarding the necessity of this specific change.

> How is this change required to support the feature of enabling user to
> set CBM across domains?

To be quite candid, this particular patch does not constitute a strict
prerequisite for the core functionality. The primary feature can, in
technical terms, operate without it.

However, it is important to note that this change was proposed as part of
the broader patchset.

> On 12/15/25 3:02 PM, Aaron Tomlin wrote:
> > The rdtgroup_seqfile_show() function, which is the sequence file handler
> > for reading data from resctrl files, previously returned 0 (success) if
> > the file's associated rftype did not define a .seq_show implementation.
> > 
> > This behavior is incorrect and confusing, as a read operation that
> > does not define a display function should be treated as an error.
> 
> Why should it be treated as an error? Not having rftype::seq_show() set when
> user is intended to be able to see data when reading from the file is a kernel
> bug. Otherwise it seems fine to return nothing when there is nothing to show
> and doing so be successful.

To provide some context on my initial reasoning, I found it somewhat
unorthodox to attempt to access an interface that effectively does not
exist (in this case, a missing seq_show callback) without the kernel
returning an explicit error, such as -EINVAL. My instinct was to signal
that the operation was invalid rather than allowing a silent, successful
"empty" read.

However, I take your point entirely. If the intention is that a lack of
data should simply result in a successful return with no output, then the
current behaviour is indeed acceptable.

I shall revert this change from the series.


Kind rgards,
-- 
Aaron Tomlin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ