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: <o5dabgse26d5vn4lzf6hllslfr4h4wdzep7jonkmhtq6njenjy@vmnsshcve6dm>
Date: Mon, 17 Feb 2025 17:06:27 +0100
From: Uwe Kleine-König <u.kleine-koenig@...libre.com>
To: Amit Shah <amit@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>, 
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>, virtualization@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] virtio: console: Prepare for making REMOTEPROC modular

On Mon, Feb 17, 2025 at 11:53:01AM +0100, Amit Shah wrote:
> On Fri, 2025-02-14 at 18:47 +0100, Uwe Kleine-König wrote:
> > On Fri, Feb 14, 2025 at 05:55:41PM +0100, Amit Shah wrote:
> > > On Fri, 2025-02-14 at 17:52 +0100, Uwe Kleine-König wrote:
> > > > Hello Amit,
> > > > 
> > > > On Fri, Feb 14, 2025 at 05:37:52PM +0100, Amit Shah wrote:
> > > > > I'm thinking of the two combinations of interest: REMOTEPROC=m,
> > > > > VIRTIO_CONSOLE can be y or m.  Say virtcons_probe() happens
> > > > > when
> > > > > the
> > > > > remoteproc module isn't yet loaded.  Even after later loading
> > > > > remoteproc, virtio console won't do anything interesting with
> > > > > remoteproc.
> > > > 
> > > > Where does the interesting thing happen if remoteproc is already
> > > > loaded
> > > > at that time? I'm not seeing anything interesting in that case
> > > > either
> > > > ...
> > > 
> > > The code I pointed to,
> > > 
> > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/char/virtio_console.c#n1993
> > > 
> > > either enables remoteproc if the module is present; or it enables
> > > multiport, but not both at the same time.  If remoteproc isn't
> > > present
> > > when this probe routine is executed, multiport might get enabled. 
> > > And
> > > then there's no chance for remoteproc to get enabled.
> > 
> > The only case where there is a difference between IS_REACHABLE and
> > IS_ENABLED is:
> > 
> > 	CONFIG_REMOTEPROC=m
> > 	CONFIG_VIRTIO_CONSOLE=y
> 
> Well, also if CONFIG_VIRTIO_CONSOLE=m; and virtio_console.ko is loaded
> before remoteproc.ko.

There is nothing about module load ordering in my patch. What
virtio_console does or does not doesn't depend on the remoteproc module
being loaded or not. It only depends on .config.

This is true for both IS_ENABLED() and IS_REACHABLE() which both
evaluate to a constant known at compile time.

And already now it can happen that the virtio_console init code runs
before remoteproc is properly loaded.

Having said that your mail just confuses me more than it helps.

The problem I thought there is and that made me propose my patch doesn't
exist. So I suggest we just drop the patch and the discussion.

Best regards
Uwe

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ