Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp206894pxb; Tue, 19 Oct 2021 00:49:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUrKjcRPqcTs7CEzmxuJWlcQIPFe8z8l0XBjLqbLiBcoB0vvfL7u7RCXs4elXyzL/BpukC X-Received: by 2002:a17:906:c015:: with SMTP id e21mr35966572ejz.113.1634629774199; Tue, 19 Oct 2021 00:49:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634629774; cv=none; d=google.com; s=arc-20160816; b=YCZE1u641D7IJvZbKYlsc+scRNjZzFw1RlEZHtuseS9t7gIJ5L40WFNwAT84O58Hwg js/sy6AbX7w3FcZPKdtIxDlYyOUavlcUdBLuceeiVYECkIbl7GoRIa//KQlSMHr+iAMl OGDmqOgFRYqpZfeFKuuClT0hprsm+s6WCcMYkappDuxVwoB2R8sOywNmuAOjYOneVOIa NWyq+MUx2ApvqYSYyo1IjXWSz766p+ja3AEDOGbuPIKWlOHgzeWk/AU6mVAnxgKRI/um 2Y4/QEkbNAXJYmoynFlwetiWFduVP7EybosT3HW/m4GUGopdUZgUrsBkxOxUgAIaEpRC 23dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=gvQqvgRehd1oxV4E9VaOG353OV8xOewLauaUhLvPf5E=; b=EN++3tzty5OWcn0E7s93WbHCRrxGdvO4Te+dKmzeDOW8eu9gV+qW+OY3pq8IDtPxFR nWvPARHegSxPOewO3vtGJXipAWilUJNI1+cosXxmhYOq/6kLmGBZKh9dwX79UfvzUhK/ X3sk1hOjNpME7KInXefFO3jE+nwPZM1YAhYluGwP0jLUpSDzUJf75w2SUrbeZQrjyL++ Sbv9GnlF8hmRPrahsktqMe4mr8usGZePw3FdB8nZtwoL1FWJHb4ClSe33i1D2sDo+51F tFmQKCvS4t3bKLAqvclaZ4Mjv/SMfkVp46rTsyaRWBvUte9+MSZ0tkIWSJorkITgtqH7 NeqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=X9m13Wol; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dt13si8503811ejc.250.2021.10.19.00.49.10; Tue, 19 Oct 2021 00:49:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@axis.com header.s=axis-central1 header.b=X9m13Wol; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=axis.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234519AbhJSHtf (ORCPT + 99 others); Tue, 19 Oct 2021 03:49:35 -0400 Received: from smtp2.axis.com ([195.60.68.18]:3156 "EHLO smtp2.axis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230365AbhJSHte (ORCPT ); Tue, 19 Oct 2021 03:49:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1634629642; x=1666165642; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=gvQqvgRehd1oxV4E9VaOG353OV8xOewLauaUhLvPf5E=; b=X9m13WolxCPlaBUFaA5aoeXQOFhDP4tGNO3PtFOxNH1osTQfb1xxGIcw vduncGO5WPlaYZjynRtVDm31MyssqucePezVWM33XWBLlhh1x9dZ+b3Qn ItxeAUPbpTHUUGq3HzZYBoi6391F233UToOzNAgXQcJnLAfB8jzoh2Ziy GOTIKQTdgHe7wA9KSjUqy1CWLRtFHyf7HcikPB92QKIoSxTiNDHaBJC6E Lcu7W9+KT350tCq2DS96cEVFzIjg3L+do3C1y+3kBKoy0qIYjF+jyWDn6 o4KF/wv1/2mg9fcXnbzjBi/I1MbBYQ5Bhpard1krveaC8z5q/1P5UxzYt g==; From: Vincent Whitchurch To: , , CC: , , , , Vincent Whitchurch Subject: [PATCH 0/2] virtio-i2c: Fix buffer handling Date: Tue, 19 Oct 2021 09:46:45 +0200 Message-ID: <20211019074647.19061-1-vincent.whitchurch@axis.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This fixes a couple of bugs in the buffer handling in virtio-i2c which can result in incorrect data on the I2C bus or memory corruption in the guest. I tested this on UML (virtio-uml needs a bug fix too, I will sent that out later) with the device implementation in rust-vmm/vhost-device. Vincent Whitchurch (2): i2c: virtio: disable timeout handling i2c: virtio: fix completion handling drivers/i2c/busses/i2c-virtio.c | 46 ++++++++++++++------------------- 1 file changed, 19 insertions(+), 27 deletions(-) -- 2.28.0