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 68285C433EF for ; Tue, 12 Apr 2022 18:11:00 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 79F9383B34; Tue, 12 Apr 2022 20:10:57 +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="cWcSgcrE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8DB8A83B42; Tue, 12 Apr 2022 20:10:55 +0200 (CEST) Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) (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 845BE83AE2 for ; Tue, 12 Apr 2022 20:10:52 +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-x82c.google.com with SMTP id z14so5572875qto.5 for ; Tue, 12 Apr 2022 11:10:52 -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=pI1p5wQxFMWkomz+aK05hJPVpizdt1kXGrvuXxVm9JA=; b=cWcSgcrE91E1CPbAiOzuOGGWJLZcM+LZ/iYhLRbm0rqBYUdqjreUklIUGJ7IST1TY4 t9AMH4Lf18ys+h5aovz9bZF55ViKYgUTPlaO7weIc/5N/VYDANQOInAfAA1ww2+2MCFz JhJZf28xsmDxfgU/I5Ljv3yoNFc3NFiOFPsNM= 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=pI1p5wQxFMWkomz+aK05hJPVpizdt1kXGrvuXxVm9JA=; b=GuDRyg3YDauhwSYHmsi+SU+OXV/w967iBRFseVWZ7Se2VWrAgcS65L7NsekjaragZd ob8VRxGe008tbjs0p/gO5knTZUMBqJLMauHREG0ZJdG7doVB9/eksyxZS0CBYa9S8Dyc QkXVOishMoIqSdXdvCDb74ejrvnD6D/Y3HstfX8bZu/smiR7NcwgoNGB1DAG4e6SQaJL HFcBl/+9V7gVQZJ1NqzRCsxwHSRWwtGDMzkZaZjp3wxT2eoE4k5j46FyQTAxN/7qMzNg LyHlpP2x7YCip1ppV4c+ogkzQAYrkFBfVuVMvTm90wmA5eTyaO2/ZTiRtOndydg/VhMH k0KA== X-Gm-Message-State: AOAM533uwNi7dTByrJS9Osg1dOqngsVW0PZr8XCTIXaDMaJRduQMQyms g34gngh2Biexmn8y9ZbB81wB7g== X-Google-Smtp-Source: ABdhPJyLR6GcHuNyGr/+paFkJPrezpgRCSHnSFdEviPsMYGiU79r5Nj2jLcW774u0FbBH54wl3cKBw== X-Received: by 2002:ac8:5bd6:0:b0:2e1:c841:35f6 with SMTP id b22-20020ac85bd6000000b002e1c84135f6mr4423881qtb.120.1649787051318; Tue, 12 Apr 2022 11:10:51 -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 d189-20020ae9efc6000000b0069be72be750sm8067574qkg.117.2022.04.12.11.10.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 11:10:50 -0700 (PDT) Date: Tue, 12 Apr 2022 14:10:48 -0400 From: Tom Rini To: Andrew Scull Cc: u-boot@lists.denx.de, sjg@chromium.org, bmeng.cn@gmail.com, adelva@google.com, keirf@google.com, ptosi@google.com Subject: Re: [PATCH 00/11] virtio: Harden and test vring Message-ID: <20220412181048.GA434359@bill-the-cat> References: <20220331100949.3637425-1-ascull@google.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="YZ5djTAD1cGYuMQK" Content-Disposition: inline In-Reply-To: <20220331100949.3637425-1-ascull@google.com> 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 --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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! >=20 > 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. >=20 > 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 device > drivers against a simulated device but the lack of an API to access the > virtqueues meant this ended up being a hack. I've included that hack and > the at the end of the series as an RFC. >=20 > 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 Thanks! --=20 Tom --YZ5djTAD1cGYuMQK Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmJVwKUACgkQFHw5/5Y0 tyzr9Qv/YOVUd0wE/6VzYkTOAvhgINkCog5wmId7VmfdZ4cYXt6N/aMPwWv4W3q1 HsbTFIwzMdPtc1kHJkQXYX0kNXbWxMXe8UV9tNuKHFNFZnOQghbqctsFXY1mp4dl yW7kOLTbXWKmU4J//GqtWP9USbJ1GIh/Z3vpEIFdmSpUTE6RqdWpNrq8F+1xwTEj n+mMXuJxMgpivz1OutUp9TwnFf0KMVeg+P17qreI4A+Z6ubk4lTwgwHvpjOEh8IC 8iWeIgQyDtc95k6YpMVeN0oK9lOjeOIN9RXYzgWCHehG2auoMvRAU+HFeGkMXJaB 9x0bcQPCqDUmBNtYKD9aWeFxcbkiCpXrE/g8lw9sENylDfJZW5W04ScQeBDJGE4X H4hm1Nd7BEzN4uxXDV/RU4asaJ0phHx0P9a/usUoiOLQG1QsthhpguJWjYSzJ2o1 wx1zToo54wDKSmaDbR65bSobkLyTDxqd18sfNqIqD/6sa7dp3ZYZsyfp4ft6+9DP ym2dBfV1 =Y8Fn -----END PGP SIGNATURE----- --YZ5djTAD1cGYuMQK--