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] [day] [month] [year] [list]
Message-ID: <363063e09bace65c83bf04fd4d2c89c877eca581.camel@ibm.com>
Date: Tue, 10 Feb 2026 22:44:09 +0000
From: Viacheslav Dubeyko <Slava.Dubeyko@....com>
To: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
CC: "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "slava@...eyko.com"
	<slava@...eyko.com>,
        "linux-fsdevel@...r.kernel.org"
	<linux-fsdevel@...r.kernel.org>,
        "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>,
        "bpf@...r.kernel.org" <bpf@...r.kernel.org>
Subject: RE: [RFC PATCH v1 1/4] ml-lib: Introduce Machine Learning (ML)
 library declarations

On Tue, 2026-02-10 at 06:20 +0100, gregkh@...uxfoundation.org wrote:
> On Mon, Feb 09, 2026 at 08:48:17PM +0000, Viacheslav Dubeyko wrote:
> > On Sat, 2026-02-07 at 16:52 +0100, Greg KH wrote:
> > > On Fri, Feb 06, 2026 at 11:11:33AM -0800, Viacheslav Dubeyko wrote:
> > > > + * @kobj: /sys/<subsystem>/<ml_model>/ ML model object
> > > > + * @kobj_unregister: completion state for <ml_model> kernel object
> > > > + */
> > > > +struct ml_lib_model {
> > > > +	atomic_t mode;
> > > > +	atomic_t state;
> > > > +	const char *subsystem_name;
> > > > +	const char *model_name;
> > > > +
> > > > +	struct ml_lib_subsystem *parent;
> > > > +
> > > > +	spinlock_t parent_state_lock;
> > > > +	struct ml_lib_subsystem_state * __rcu parent_state;
> > > > +
> > > > +	spinlock_t options_lock;
> > > > +	struct ml_lib_model_options * __rcu options;
> > > > +
> > > > +	spinlock_t dataset_lock;
> > > > +	struct ml_lib_dataset * __rcu dataset;
> > > > +
> > > > +	struct ml_lib_model_operations *model_ops;
> > > > +	struct ml_lib_subsystem_state_operations *system_state_ops;
> > > > +	struct ml_lib_dataset_operations *dataset_ops;
> > > > +	struct ml_lib_request_config_operations *request_config_ops;
> > > > +
> > > > +	/* /sys/<subsystem>/<ml_model>/ */
> > > > +	struct kobject kobj;
> > > > +	struct completion kobj_unregister;
> > > > +};
> > > 
> > > Do NOT abuse sysfs for something like this.  Please make your own
> > > filesystem or char device or something else, but this is not what sysfs
> > > is for at all, sorry.
> > > 
> > 
> > Currently, sysfs entry is used for sending commands (start, stop,
> > prepare_dataset, discard_dataset) from user-space on the kernel-space side. And
> > the intention of using sysfs entries is the export information about kernel
> > subsystem and exchanging by commands and notifications between user-space and
> > kernel-space sides. Do you mean that it is wrong using of sysfs? Have I
> > misunderstood your point?
> 
> Yes, this is NOT the correct use of sysfs, do NOT use it for an api like
> this at all.  Use the correct ones instead.
> 
> 

So, to summarize your recommendations:
(1) Do not use sysfs;
(2) Do not use character device but misc device instead;
(3) Implement specialized file system;
(4) eBPF?

Would you like to share any other recommendations?

Thanks,
Slava.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ