From patchwork Sat Jun 19 17:26:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 463882 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:102:0:0:0:0 with SMTP id x2csp1020855jao; Sat, 19 Jun 2021 10:32:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypATAUhWywhtPvUFaiaLgWxYrPhxqcQLbMRWfTPx+DkpBBcVrSO/HRCGjb0XF2ZwSoPxyv X-Received: by 2002:a92:c0cc:: with SMTP id t12mr1478561ilf.177.1624123974387; Sat, 19 Jun 2021 10:32:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624123974; cv=none; d=google.com; s=arc-20160816; b=J7QoKSZzVtPGVIvVn/474R9fC8cpwpCNHQ+dcjRGUMf9EjFJb/0qJGp5e7t3t3h5D8 lC6ithvQvHlS+HnHqjOu6sa3DT8d5nMVTAOY8V02AOd174WyV0RYbWvW4a78Rz+u/RVl qN36RE/NJ76uNGqNVVb1Uw2hJ7/mYSEFzX125XbH/KNxJMOgD2l12gDpSj0yi38y1P3K 9C3EoGjm7nZpPHXMN2kzi9iEflyc8bpekzUehQ/pRDk56hqZwKhwjzMjqThTmeEvgVug bbFg/Si7WvCzdL1/v7XW+BoOg5txiJULPk1BmBMMXxtUUOOWx8yXOmfu15a/jzwxUzKE h4gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=zpc1WrheeU5iNPnwpSE6u7zT/0eX+9soFRaS06BemqY=; b=tUjppWL+SflMqWsc3r85wlG+/gaT2T1KdV1+kOfiivQA3OcnVNMXp2fjMBfQ/E+Yuc cF+HwOADbxwMiS28DczpSdRicaYEQDFuU2WwA7IIicXHmr2NCe33utywMw47wYx207/d sgdhe7QEj/kR//2FRFLszHmI7K7/d+vvpiNZGuoe8uFuCpr/XKXRDH0Y52zF6Yz22PPv QdtXTEDQKfa4HoeT8rtWQ1XVRFLJb78DIRNG08X38zSwGmPKubkvrdvZVxAIg8Uwc2oN f7QJ4xydpVk7cN3iuFy4UiNOTb3ye4NbFHcM69l/yoVIjO0Itsmk8k16xW6/vvN4TSaO /NPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=MmZxdG3V; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z16si6580308ilo.50.2021.06.19.10.32.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 19 Jun 2021 10:32:54 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=MmZxdG3V; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:50630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1luepx-0006oS-O9 for patch@linaro.org; Sat, 19 Jun 2021 13:32:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55390) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luejs-0003Uf-MX for qemu-devel@nongnu.org; Sat, 19 Jun 2021 13:26:37 -0400 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]:39757) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1luejq-0003bC-N1 for qemu-devel@nongnu.org; Sat, 19 Jun 2021 13:26:36 -0400 Received: by mail-pj1-x102e.google.com with SMTP id o88-20020a17090a0a61b029016eeb2adf66so9823375pjo.4 for ; Sat, 19 Jun 2021 10:26:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zpc1WrheeU5iNPnwpSE6u7zT/0eX+9soFRaS06BemqY=; b=MmZxdG3VFzJYrwxXQxS6kQGjVu3v8j6Lc0WoXGnXj0lN8myoXPHEJYPlgEaPk30aAd nXMWgMlg6GY4k/nuxvhSNjSz8azECg1Iz0DAAuzkf5k4Sla3gAjRNR0Rcway22BRnnQs xSoOUkBEoaaAm1kr/fe7BxZvroEySADsbK4woo5PiyUvOEFbXWtztDL/lTiaV+j2RkVL 0b+scJCef4ecZTaEfV9TIJzOIt2CKVqi9iwZoNOrxe9iuUmc6Gb6YydLF8I6crEgl5WI jLed3dY8N2du01jg0BVKKGyE9zV3ltqSkahrXAap8V+qoPsAwZfXUXZCtCeBLZshyawR dmBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zpc1WrheeU5iNPnwpSE6u7zT/0eX+9soFRaS06BemqY=; b=q6pgOoOTEJWx6sKRQd2LhkMI6Ve0ys31urfIrekVcR3IAO1oOWGD5SS6ncq8bceAek MpWul2N2bUYviD/wI+H0zzTkoPYU9e6YRGTP45U/hkQElD02vgML0yxtzTZIxORUPwhr J3UfRPI9hl/AShwPRurElul4TtbIFFgCtHYxkWkY2vPp50vbdkQycPmSkwFwRrbVRUSt u8/JAHIxRtKKjl5nGwqbo43HimWXJbOLd1IUx4o8XhMIegjFW9jYetPov5Kmbs5I9ee4 0R8l8QEnhvuiG1kL9qQRO/kHAXlx6a2Dz3mcYZebVLWlQskpS22p/lcGB6IVYQdahhhH gZaQ== X-Gm-Message-State: AOAM53079BveoiHiS4sWBP4GzlzaRjq4ydtnIhq07F9ZLrWZQEF/KNjp pDu9L0dyOC2A36JDPqqXaRDbAbG1GKELYA== X-Received: by 2002:a17:90a:db98:: with SMTP id h24mr14283688pjv.62.1624123593511; Sat, 19 Jun 2021 10:26:33 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id co18sm2084241pjb.37.2021.06.19.10.26.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Jun 2021 10:26:33 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 09/15] hw/net/e1000e: Fix impl.min_access_size Date: Sat, 19 Jun 2021 10:26:20 -0700 Message-Id: <20210619172626.875885-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210619172626.875885-1-richard.henderson@linaro.org> References: <20210619172626.875885-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dmitry Fleytman , Jason Wang , mark.cave-ayland@ilande.co.uk, f4bug@amsat.org, pbonzini@redhat.com, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" There are certainly architectural 2 byte writes, as evidenced by the e1000e_set_16bit function. I also saw a 1 byte write, though that may have been the fuzzer. Cc: Jason Wang Cc: Dmitry Fleytman Signed-off-by: Richard Henderson --- hw/net/e1000e.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.25.1 diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c index ea3347fbb4..ad73e39ebc 100644 --- a/hw/net/e1000e.c +++ b/hw/net/e1000e.c @@ -185,7 +185,7 @@ static const MemoryRegionOps mmio_ops = { .write = e1000e_mmio_write, .endianness = DEVICE_LITTLE_ENDIAN, .impl = { - .min_access_size = 4, + .min_access_size = 1, .max_access_size = 4, }, }; @@ -195,7 +195,7 @@ static const MemoryRegionOps io_ops = { .write = e1000e_io_write, .endianness = DEVICE_LITTLE_ENDIAN, .impl = { - .min_access_size = 4, + .min_access_size = 1, .max_access_size = 4, }, };