Re: [RFC] driver core: add a virtual bus for use when a simple device/bus is needed

Greg Kroah-Hartman
2025-02-03T15:38:58Z

On Mon, Feb 03, 2025 at 04:32:36PM +0100, Simona Vetter wrote:
> On Mon, Feb 03, 2025 at 03:33:32PM +0100, Greg Kroah-Hartman wrote:
> > On Mon, Feb 03, 2025 at 12:25:23PM +0100, Greg Kroah-Hartman wrote:
> > > > The more I think about it, the less I think it's a good idea, since it'd
> > > > probably trick people into coming up with questionable constructs...
> > >
> > > No, I think it will work, let me do some replacements later today after
> > > I get some other work done, I think it does make sense, don't doubt
> > > yourself :)
> >
> > New version is now at:
> > https://lore.kernel.org/r/2025020324-thermal-quilt-1bae@gregkh
> >
> > I've renamed it from "virtual" to "faux" as virtual can easily get
> > confused with virtio stuff, and we already have a /sys/devices/virtual/
> > that is for something else at the moment.
> >
> > Let me know if there's anything I can change that would make a rust
> > binding simpler.
>
> I think this should work, for vkms we can prefix the names with "vkms-"
> and then add whatever the user used as name in configfs (the instance
> directory name or whatever it's called) and it should all work out. Unless
> the user does something stupid, in which case it's not our problem.

Sounds good!

And now you just reinforced Andy's complaint about me not checking the
length of the string passed into the api, as it sounds you want to take
user-provided names here. I'll go fix that up :)

thanks,

greg k-h