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: <81C3A93C17462B4BBD7E272753C1057924576E500F@EXDCVYMBSTM005.EQ1STM.local>
Date:	Fri, 21 Dec 2012 13:20:02 +0100
From:	Sjur BRENDELAND <sjur.brandeland@...ricsson.com>
To:	Ido Yariv <ido@...ery.com>
Cc:	Ohad Ben-Cohen <ohad@...ery.com>,
	Linus Walleij <linus.walleij@...aro.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Sjur Brændeland <sjur@...ndeland.net>
Subject: RE: [RFCv2 07/11] remoteproc: Register virtio devices after vring
 allocation

Hi Ido,

> From: Ido Yariv [mailto:ido@...ery.com]
> > Postpone the registration of virtio devices until all
> > vritio ring resource has been allocated.
> > This fixes the following bug: The driver's start callback
> > is called before all vring notify ids are allocated and
> > max_notifyid will be increased after starting the remoteproc.
> 
> It seems that this patch wont solve this issue, since
> rproc_add_virtio_dev eventually increases max_notifyid, so the same
> problem will simply occur at a later stage.
> 
> Also, it seems that the original rproc_add_virtio_dev calls were not
> removed, so devices would be added twice.

Indeed. This was introduced by a faulty merge - I'll fix this up.

> If max_notifyid needs to be set before the first virtio device is added,
> how about counting the number of notification ids in advance before
> adding the devices, by traversing the resource list twice?

Ugh, thanks I missed this. How about calling rproc_alloc_vring from
rproc_parse_vring so that the resource allocation are done before
the virtio devices are started? 

BTW, I think most of the other review comments from you are OK. I'll
try to address them in my next patch-set sometime early next year.

Regards,
Sjur
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ