From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 69E07C433EF for ; Tue, 12 Apr 2022 23:11:38 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BBE34807E1; Wed, 13 Apr 2022 01:11:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="VDsukSU5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 531968027D; Wed, 13 Apr 2022 01:11:33 +0200 (CEST) Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 43C8F8027D for ; Wed, 13 Apr 2022 01:11:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x82e.google.com with SMTP id bb38so228298qtb.3 for ; Tue, 12 Apr 2022 16:11:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=4B8A+3ATBxqfXVIp0ootsVLD1WwIvouRBVeKd3/4aDY=; b=VDsukSU52WD3dUdbN5clKQ02J+VTvxLpZ/eDP5WMzFW1t2127smWb2IcFt22M3WH4B 7zsjLKfavmDQaslLdX21iYoOOc3l42bE6Fq7aErOzN+/rKyD96+MwIUUly0i5MA9COUC cNMbOPwtHgkw/+i6FdY1paN793Yg2c6/3iCVs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=4B8A+3ATBxqfXVIp0ootsVLD1WwIvouRBVeKd3/4aDY=; b=iFRATVxWKUMlNjvAU9CfEP4qhCskWLOMz53B237s1fOjL3dBOoCEPRt7kjnr9VKtuQ VB6lBEfAfX0+8CIj+9ijlV0RRkrDa5ym4cdi5B6E1P/ZJmAB5aTM1vyqR02W1XpGDjiM wN4U6ohfoSfSCnStD6bgJUiK1jiafzIWsyC54LwzCZBS04S+llQEAWKxDJdc5FQEPYVC q1L8jZaQ2vlFLtdUcdkBkYRAiWf8Nq3y3jn2B65hEviZiXaKYiYwR9Qi/LoNRTpIyXEP k0LFFAyD7N+scNn/G7Dbjlumo6pOTvZWtCt/NlGvFh6uZfhrUdrq+1hNCKexh9LBMH0f sDMg== X-Gm-Message-State: AOAM532og050HXwY7gQLAVDDVQASz//F0XvJcuwWredox/Lu/hj9oYfg fAS5CKYWqLvNbuEH6usN4V/6ZQ== X-Google-Smtp-Source: ABdhPJyxQm42/ifOg6bWGn+F4auVyt6jJuHjwP+67oYKYXd3pX+TK2qQY2Ga27Z9tlA3V77yiW3toQ== X-Received: by 2002:ac8:66d8:0:b0:2f1:c6ea:38a6 with SMTP id m24-20020ac866d8000000b002f1c6ea38a6mr677441qtp.380.1649805089057; Tue, 12 Apr 2022 16:11:29 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-2ef0-5dff-fedb-a8ba.res6.spectrum.com. [2603:6081:7b01:cbda:2ef0:5dff:fedb:a8ba]) by smtp.gmail.com with ESMTPSA id br35-20020a05620a462300b0067e890073cbsm24320935qkb.6.2022.04.12.16.11.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 16:11:27 -0700 (PDT) Date: Tue, 12 Apr 2022 19:11:25 -0400 From: Tom Rini To: Andrew Scull Cc: U-Boot Mailing List , Simon Glass , Bin Meng , Alistair Delva , Keir Fraser , =?iso-8859-1?Q?Pierre-Cl=E9ment?= Tosi Subject: Re: [PATCH 00/11] virtio: Harden and test vring Message-ID: <20220412231125.GQ14282@bill-the-cat> References: <20220331100949.3637425-1-ascull@google.com> <20220412181048.GA434359@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="xSlMoMuWs5EShQ41" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean --xSlMoMuWs5EShQ41 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 12, 2022 at 11:49:12PM +0100, Andrew Scull wrote: > On Tue, 12 Apr 2022 at 19:10, Tom Rini wrote: > > > > On Thu, Mar 31, 2022 at 10:09:38AM +0000, Andrew Scull wrote: > > > > > Continuing the theme of making the virtio code resilient against > > > corruption of the buffers shared with the device, this series focusses > > > on the vring. This series is simpler and more self-contained than the > > > series for virtio-pci! > > > > > > It follows the example of Linux by keeping a private copy of the > > > descriptors and metadata for state tracking and only ever writing to = the > > > descriptors that are shared with the device. > > > > > > I was able to test these hardening steps in the sandbox by simulating > > > device writes to the queues. I was also looking into testing the devi= ce > > > drivers against a simulated device but the lack of an API to access t= he > > > virtqueues meant this ended up being a hack. I've included that hack = and > > > the at the end of the series as an RFC. > > > > > > Andrew Scull (11): > > > virtio_ring: Merge identical variables > > > virtio_ring: Add helper to attach vring descriptor > > > virtio_ring: Maintain a shadow copy of descriptors > > > virtio_ring: Check used descriptors are chain heads > > > dm: test: virtio: Test the virtio ring > > > virtio: sandbox: Fix device features bitfield > > > test: dm: virtio: Test notify before del_vqs > > > virtio: sandbox: Bind RNG rather than block device > > > test: dm: virtio: Test virtio device driver probing > > > virtio: rng: Check length before copying > > > RFC: test: dm: virtio: Test virtio-rng with faked device > > > > What does this series depend on? I got a failure to build on sandbox: > > https://source.denx.de/u-boot/u-boot/-/jobs/422500#L104 >=20 > Problem is from the final, RFC, patch on SPL where CONFIG_DM_RNG is > not set so `dm_rng_read` isn't defined. I don't really understand the > difference with SPL just yet, but I expect CONFIG_DM_RNG can be set. > But in the meantime, it's also fine to drop that final patch from the > series. I'd like to have the test included. SPL (and TPL) are special builds of U-Boot used earlier on in the boot process so that we can load full U-Boot, but have less resources and subsystems available. Can you please take a look at modifying the patch so that we only try and test on full U-Boot? There should be some other examples in the tests directory doing what you need to do here. Thanks! --=20 Tom --xSlMoMuWs5EShQ41 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmJWBxoACgkQFHw5/5Y0 tyw/tQv/YZMD68dk6Tci5Ku8fTUMALfdB3hrj6dc9Jx0VCkt5FttlE+tHVB5UJD5 Y3mlTkPaM28F8gbyYbpLWaHR0uCKhjeQ2gL+AIzxSn8w+u11b/5cSzBu/R++J7vy KQMRNXdywnCHQh0aWQ5PAzM/jwkl4a0rf2I/mAro8Sxe7STer0gsElsTs2CzUI4N zGH0YnBMiTD/Q5/NVPdCGO8A1AnegP7IkMA4W1wsJ1NfigwrvOeGjp8XLDTpNjOq n250rj4z59OtpCSqil5iZjXLT6qOg9OGAWs9wXXbnSWkPn7O507Ml3so/0WQuxpK dkTcQo/Z/ZCaUBx8c8kUCA5wQgUejCOZ4NqDlMMdUfIuL5yzw9A5WCODBRsmVYFS 3P76WmM70aigmoyCB3hF3q0POrBP6MTCLU1MCyQqZmq8GD6S7/h1ehorYugdafz/ a97b+fHpyr46VRLT4j5B2/Vv3IQ7qOWQSGbJ2Ra2wZc/BHoLSi8d6Sf+0XvGyQyh /qubB1+m =DDP/ -----END PGP SIGNATURE----- --xSlMoMuWs5EShQ41--