Message ID | 20240410091315.57241-3-philmd@linaro.org |
---|---|
State | Accepted |
Commit | ba28e0ff4d95b56dc334aac2730ab3651ffc3132 |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:adf:fdd2:0:b0:346:15ad:a2a with SMTP id i18csp598551wrs; Wed, 10 Apr 2024 02:16:56 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUoONcWYX3DtEtJK9k61WLvxCMbcYxz1AXCBxp95n3FAnDyyo12eC6V6Zypd+a3HMv8x/YocPX1SYuGf0V2EOzP X-Google-Smtp-Source: AGHT+IFuMv2riB1aqMh9LPxIWgZhn+jOsxCiEdFZMf47TknlqHJqi6qzg2DFLwS9mLcXuG5YAV8h X-Received: by 2002:a05:620a:164e:b0:78d:6c34:8d94 with SMTP id c14-20020a05620a164e00b0078d6c348d94mr1893103qko.20.1712740616167; Wed, 10 Apr 2024 02:16:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712740616; cv=none; d=google.com; s=arc-20160816; b=SO1S6BBRuQ3Ui5dC8p8qXteOVFgyWxPelgNQiOgad/M0r3E5gNQ1A0ncNYs99ktSIU U8wTh8r5reHYud8g9eKINnrHBPuTFiN/2U+ol3Eux0aEAgWHgGTYVQOsmVyWiFFYhw6J iiXBOt5q8H4sfIkRNUshSFyinhmFK0yUtVhziivSXTRjXVwLK9JjoYyP1EKDF+cFUv0o 41jwpQ3BBqWID7imdMNBOjmrR2YTGkOjcNrCXdJboOn+gbU2Is6c3djztbDBbnGnmWxA vXv4+uRkuSkAXrP70tBuGn3N421fOIcEbVBy8IvQa3EDlS1CrFOnqpsd+9aXYGStZI+s 76eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=Nl65Et5THn+WU6N1r23t/my2YFDQcyKHCHoGccvL7sA=; fh=Ur5hEYBPaH6Dgnc4uj1OlRo/FyfePqU7TRvBVu1TBLo=; b=YExQB+egt9cwbe31iu1lvZNEBcLpGakBAqJECOkyWHhUz7KJ9HlbR7fkR3rqSBJR4c 8i0pW9Wml+XsB7r2MXJqjO/gWUllPpTxNUki/Vgh9R94oafnU8jKlXn9G7ROkNmp50Pq 5GJAeDDLt63CvP14E7QqJTZisgFTUhE4TJw2M61gYF64AB6Ac6N77Of6eVThb9QUauiF 8jQ4Gr7HTuhz6qh4TsAw6IEe9ZlHCXAZdVgaUd7MSFcEIF+pnbXJ2POJItwksqsKrH+8 96AZ5VW74vrY1IcoeCctthpUFoynKs8q4E0U6/pvHcomRAKGJAs02zGyI2v+pCfY3DQt Wh3A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="j/1+OhJ9"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bm29-20020a05620a199d00b0078d6d70770csi3901575qkb.282.2024.04.10.02.16.55 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Apr 2024 02:16:56 -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=pass header.i=@linaro.org header.s=google header.b="j/1+OhJ9"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1ruU1d-0005lv-SE; Wed, 10 Apr 2024 05:13:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1ruU1P-0005it-Pm for qemu-devel@nongnu.org; Wed, 10 Apr 2024 05:13:37 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1ruU1N-0005Xs-9L for qemu-devel@nongnu.org; Wed, 10 Apr 2024 05:13:35 -0400 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-56fd7df9ea9so345059a12.0 for <qemu-devel@nongnu.org>; Wed, 10 Apr 2024 02:13:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712740411; x=1713345211; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Nl65Et5THn+WU6N1r23t/my2YFDQcyKHCHoGccvL7sA=; b=j/1+OhJ9StncvIxlCAeOeBhp2QrZcDLZXQock1V680UUeo7FVSiIzrrAiwuvajowta tyLKGNoCsRk0CTBZNx9OUmrRW0x+dW2qtBWu7wDac3dOklxdjvi/69mt0ybqU02Vf9R8 DuZWcOBbv+75PrYlrDyrLdXu78avdzW1oL+fS7e+BCqEV2bLDuPCjwb+ltHMVLJaU0Ar alECkI6vTNpd1xe2O7SJs1jwrB545OSrt/Ajqan5hrKdbOjyLpnDyUvDmUAocLrfNTDv lMQAPb7PyiVzT7vjzCTROxqYOSjcCNHVEsMlK1HAKCfXgTWuiGEZHtSXXSAogNqwqRzX JdWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712740411; x=1713345211; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Nl65Et5THn+WU6N1r23t/my2YFDQcyKHCHoGccvL7sA=; b=ktKheo2m10XibNJJaBZRh54ATJ5dSXciL2eYswFEMQTo8s0GxrEeBbf7pHdYqfd57U JHL+b+z9yAMFKQ5q4xnDQagL2QIji+hy43o9ZtDmpwLNy0mzqT23qTdJs8zVLjGv6LEL IfQNCLEAy2eF2CHTG8Zpn0FUhVRiKK4bdby/T04mFf1gLQqs+JqhfzpNa+Hn3N/2WQhg RmCaOCpKJOxgd7FOjmJi7qo86aKggq/5G4PS+q1eTqs1ifk+LJrOaKDFBtSty0G1UcG7 blrYfjiMqP0F7TVncqrhHkuP3MbFcnH3+AoEm7iYaWspGUQegCky9ZjK1ndy81jO77OS pA6Q== X-Gm-Message-State: AOJu0YwG17FqlSd/jNFJZaFSqyFTZq5M8kLRwMe0kMjayr6tFYgrPxpq PoAyMoQxXhv7RiYr768drUvyF7oz6obdUaD48N6Ov6tJFIJsFrcNpPFb12/pKDIz5vgmuqF4dYC f X-Received: by 2002:a50:a686:0:b0:56b:f5ae:ae58 with SMTP id e6-20020a50a686000000b0056bf5aeae58mr1251069edc.29.1712740411313; Wed, 10 Apr 2024 02:13:31 -0700 (PDT) Received: from m1x-phil.lan (arl95-h02-176-184-34-173.dsl.sta.abo.bbox.fr. [176.184.34.173]) by smtp.gmail.com with ESMTPSA id eh15-20020a0564020f8f00b0056e67f9f4c3sm2743207edb.72.2024.04.10.02.13.29 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 10 Apr 2024 02:13:30 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>, qemu-stable@nongnu.org, Alexander Bulekov <alxndr@bu.edu>, Yongkang Jia <kangel@zju.edu.cn>, Xiao Lei <nop.leixiao@gmail.com>, Yiming Tao <taoym@zju.edu.cn>, Gerd Hoffmann <kraxel@redhat.com>, "Michael S . Tsirkin" <mst@redhat.com> Subject: [PULL 02/16] hw/display/virtio-gpu: Protect from DMA re-entrancy bugs Date: Wed, 10 Apr 2024 11:13:01 +0200 Message-ID: <20240410091315.57241-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240410091315.57241-1-philmd@linaro.org> References: <20240410091315.57241-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=philmd@linaro.org; helo=mail-ed1-x52b.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.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
[PULL,01/16] hw/virtio: Introduce virtio_bh_new_guarded() helper
|
expand
|
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 78d5a4f164..ae831b6b3e 100644 --- a/hw/display/virtio-gpu.c +++ b/hw/display/virtio-gpu.c @@ -1492,10 +1492,8 @@ void virtio_gpu_device_realize(DeviceState *qdev, Error **errp) g->ctrl_vq = virtio_get_queue(vdev, 0); g->cursor_vq = virtio_get_queue(vdev, 1); - g->ctrl_bh = qemu_bh_new_guarded(virtio_gpu_ctrl_bh, g, - &qdev->mem_reentrancy_guard); - g->cursor_bh = qemu_bh_new_guarded(virtio_gpu_cursor_bh, g, - &qdev->mem_reentrancy_guard); + g->ctrl_bh = virtio_bh_new_guarded(qdev, virtio_gpu_ctrl_bh, g); + g->cursor_bh = virtio_bh_new_guarded(qdev, virtio_gpu_cursor_bh, g); g->reset_bh = qemu_bh_new(virtio_gpu_reset_bh, g); qemu_cond_init(&g->reset_cond); QTAILQ_INIT(&g->reslist);