Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp321837pxb; Wed, 3 Feb 2021 06:30:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJymxhIRBFeTWwMWsXFSIK42BoQZ6zqBbr7RpXtvc+OKnDrNm5gO4zQ+5rsJ4FbjokiLVmtQ X-Received: by 2002:a50:9f4e:: with SMTP id b72mr3316290edf.4.1612362633893; Wed, 03 Feb 2021 06:30:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612362633; cv=none; d=google.com; s=arc-20160816; b=q8x1cC23yrmvO6luuvRqgom88YBLWGD9CFM6ZK9aQBTNybZsgnvOW49KVjtX2dpVan 8s5M2CDm6bVOc99E+ciD85jpjeBFIkD/nLfyRU3f4kj1ZHr0FUWA2jdfxNsNR1+WPhwy D5ZZq5DretxRXdxRR+p7xxu9TIfBh4H29BO+fI26IV5DZ9cTtmxALBhFk3JLGmUT/8Ha bSCvcjoEw6fpTIkP+ODIAz+z55yQ2SHtf28NYcFCgN35ta9DglH1BViiuWUrO+BqkVFz HFAMzlNNsDkKQugX36nzHLYysDkYa9hFT/Zg8YBiDPKv2Wvm9sr3SvPpl5hI82Ny1wDS GzgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=OxfTFr0q8Tf9h3gAFIf04FpqXe2AG8QXR8Ik/VWm3BI=; b=wlePq+hhHQ1SX/4+cjS8c3Yefkf1v8qL6lPvWfv4SAcGax3OePnoRtcLLI6zibNV0v yKn8/SzkQioTO9TF8xgpw8FE25qnYEVaNdhd41lwNEm/NuTt5mNfdY+lH9/HqrEutc8F f8o7nUPk57TmcfmwJ5Z+m2zD2Fr8pSm+hypBKV/sH9bvTi0tXXFP7Jr6DQhzvS6ZZvP0 mJWa5VDNxs5vppIipgxosDeF1VDkxLNcxLzdfj7Mc2Wr3tIatu2aM6CE3RWdUEHJLtS3 Rd16kaKIEM3JiG0ki07KH209tn9xopfveCsNqiTnkkWx96bM3ExUMrJzQ37HqwyCYUR0 D+Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AvDsFtac; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ay8si453939ejb.612.2021.02.03.06.30.02; Wed, 03 Feb 2021 06:30:33 -0800 (PST) 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 header.i=@redhat.com header.s=mimecast20190719 header.b=AvDsFtac; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232538AbhBCO0w (ORCPT + 99 others); Wed, 3 Feb 2021 09:26:52 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:58312 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232014AbhBCO0v (ORCPT ); Wed, 3 Feb 2021 09:26:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612362326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OxfTFr0q8Tf9h3gAFIf04FpqXe2AG8QXR8Ik/VWm3BI=; b=AvDsFtacvPgvxY/rJaw2d/pWPvXc9h2yvn01FZGLJjN5IpaIeKzcUMoKX4/6qx59AsUkty 5duuKoa8qLaNU9je0mtqoN/wkhxJSnS4GtF4SoXHaN00SMNdGKKjKekjnz/VaC7iUx1ncj Q1qGnknuFlooj4AttIgLYawn50BqieE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-565-o1In-4mkPJKDqZcQ64ryKg-1; Wed, 03 Feb 2021 09:25:22 -0500 X-MC-Unique: o1In-4mkPJKDqZcQ64ryKg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1C661196632D; Wed, 3 Feb 2021 14:25:21 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-113-27.ams2.redhat.com [10.36.113.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B7FE95B692; Wed, 3 Feb 2021 14:25:17 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 0A44A1800853; Wed, 3 Feb 2021 15:25:16 +0100 (CET) Date: Wed, 3 Feb 2021 15:25:16 +0100 From: Gerd Hoffmann To: Colin Xu Cc: mst@redhat.com, jasowang@redhat.com, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V2] virtio_input: Prevent EV_MSC/MSC_TIMESTAMP loop storm for MT. Message-ID: <20210203142516.uzinnnkngahqfhdn@sirius.home.kraxel.org> References: <20210202001923.6227-1-colin.xu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210202001923.6227-1-colin.xu@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > + /* > + * Since 29cc309d8bf1 (HID: hid-multitouch: forward MSC_TIMESTAMP), > + * EV_MSC/MSC_TIMESTAMP is added to each before EV_SYN event. > + * EV_MSC is configured as INPUT_PASS_TO_ALL. > + * In case of touch device: > + * BE pass EV_MSC/MSC_TIMESTAMP to FE on receiving event from evdev. > + * FE pass EV_MSC/MSC_TIMESTAMP back to BE. > + * BE writes EV_MSC/MSC_TIMESTAMP to evdev due to INPUT_PASS_TO_ALL. > + * BE receives extra EV_MSC/MSC_TIMESTAMP and pass to FE. > + * >>> Each new frame becomes larger and larger. > + * Disable EV_MSC/MSC_TIMESTAMP forwarding for MT. > + */ > + if (vi->idev->mt && type == EV_MSC && code == MSC_TIMESTAMP) > + return 0; > + Reviewed-by: Gerd Hoffmann take care, Gerd