Message ID | tencent_9E786E6C4C2DF96F4097BCEA5AED66CEBC0A@qq.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-61530-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp2387467dyd; Mon, 12 Feb 2024 04:15:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IH8sk7HKfieEB3eTElnWsMBkRLA+BppGE/Qix5DrcL37pd7Xsov65gRMNue9QA7xOeQPAhF X-Received: by 2002:a17:907:1183:b0:a3b:bf5d:1089 with SMTP id uz3-20020a170907118300b00a3bbf5d1089mr5298570ejb.20.1707740147733; Mon, 12 Feb 2024 04:15:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707740147; cv=pass; d=google.com; s=arc-20160816; b=PqjsYeY6l1aUeoFfShfY8PkBoLsLBT6bx0wbpAqzHdvvildGUfUQISX4JHSViYj2wn DM8SxIIAWtfyKnqBGarVn2ZuSU50OJ50rlRdEhPcgsJFuwlywf0MvsY8lZ9tEiYUAYo+ RoJQth6ozh7CwkJFpA/J/CgGF7pgFKGWEwDbr4lZIw4rSmZXcnrIAG5r/9q9oSi4VIYZ MrXB/XTlc6K4+RZgXGlXyNe9vAWkCRvrOGNoMWpZOfINNC2ZKhlmYPMGfDpc4rgYxl7O VJIx/wTrvripR44zdBWfYLXEbojCfWpr2oHTnFyb8lJJ6QrCC1F1B93DYziRaYk+1gWd pv8Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:date :subject:cc:to:from:message-id:dkim-signature; bh=xTQJRPDMPKxwfMQecLLy0zy3Z6oeJK5jbhqCH22xWW8=; fh=FoVjr/i33FcDkO+7NY/3k6zN3srDR0smJrTqBL8XqWo=; b=imwkEW/0cJCtcuIhyH4S1pPyUriF6EGdvWO885YiFl1nrfTnSeXm8vJjy4KuncJ/y+ pTvP6nCqC+7ANgOam7sYSLx6c74s87yqaKd6Sdxf6KlaginWGzuUzZfGY96Jj0r2INDJ L9zi1mfd59D0Sj9/aEeSCU1RuPJW9XJfxeDPyrDAPrTluxDiVyLc84l3gimh0V72gjyw 2EhcxKzyFYjJqESVsj/Qrod3fBYWAS0Ay/K3cB5dVfta2DUtFoGG0+3Qro7wBkbmi7Gc Lk91iBLDYxEcJ3gXRrawzHG5mjB+ZYk4mwxBlEmCzgvPq9mhIH2NNgx83TlwbmS8gn68 gi1g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@qq.com header.s=s201512 header.b=r+reU0DV; arc=pass (i=1 spf=pass spfdomain=qq.com dkim=pass dkdomain=qq.com dmarc=pass fromdomain=qq.com); spf=pass (google.com: domain of linux-kernel+bounces-61530-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61530-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=qq.com X-Forwarded-Encrypted: i=2; AJvYcCVhFqtdcbI7nEToEOEctZhimw/ws0DMgv/HT8hcFqpP2ujWrLk1t/GvHfoNQsCqtpnVu76jLFZM/x6FXmJZ2+orSS9F4g== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id bo3-20020a170906d04300b00a3c963a564fsi129576ejb.800.2024.02.12.04.15.47 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 04:15:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61530-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@qq.com header.s=s201512 header.b=r+reU0DV; arc=pass (i=1 spf=pass spfdomain=qq.com dkim=pass dkdomain=qq.com dmarc=pass fromdomain=qq.com); spf=pass (google.com: domain of linux-kernel+bounces-61530-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61530-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=qq.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 55D671F23C0C for <ouuuleilei@gmail.com>; Mon, 12 Feb 2024 12:15:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6868B3B2A1; Mon, 12 Feb 2024 12:13:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=qq.com header.i=@qq.com header.b="r+reU0DV" Received: from out203-205-221-239.mail.qq.com (out203-205-221-239.mail.qq.com [203.205.221.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 18CD13A8EB for <linux-kernel@vger.kernel.org>; Mon, 12 Feb 2024 12:13:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.205.221.239 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707740021; cv=none; b=g8X9MbKAr2hDVFTR1Ecso0izmglcsFairNOIVBMhruWGblFksSXIMiEg+GaPJ0W23dlWKloe2G2Viu4TPFlu/9QZLH2BDr39AtI21CWxGXH5O7AlQXG+i+O5vYV8qxdqK2hw/Y0vFXCPA9i2P2hgGmA0brXXVKpcS41mtSlncas= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707740021; c=relaxed/simple; bh=xKohLmgszB47qEXbhAej0mnn6ushwhKQLMYAMblD060=; h=Message-ID:From:To:Cc:Subject:Date:In-Reply-To:References: MIME-Version; b=VojJOe8c/o5tIN9fLdhQ9L0ofaajVN1y4vGXl2S+SzKcV43AkuC/8MqWdM7qPqArpft0HPgn1e6+mHClLTnqh8S/Vtre2i22vKiJpjjrRQbK7espEFsqS8IyAKeEn34Hycb6XxAQHjTFbx40uWLEOrHOzLXbotcIYDUZR0GcAaY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=qq.com; spf=pass smtp.mailfrom=qq.com; dkim=pass (1024-bit key) header.d=qq.com header.i=@qq.com header.b=r+reU0DV; arc=none smtp.client-ip=203.205.221.239 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=qq.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qq.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1707740010; bh=xTQJRPDMPKxwfMQecLLy0zy3Z6oeJK5jbhqCH22xWW8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=r+reU0DVh10JDI2PRzL0hO2b54uB0eMa5du08NBmr+5yK96l2mbEH8zsMxFz/G3hi WOm3146KjxugmJ7ZxM53r9Qtd3QvVHJMhi/DdQn8/UNi7JBGUuahGdDjPEjGm0Tk4B 5z9tmPrv89v1LeJzryjHs6pSqFHXQ19rV6obS7qQ= Received: from pek-lxu-l1.wrs.com ([36.129.58.158]) by newxmesmtplogicsvrszc5-2.qq.com (NewEsmtp) with SMTP id 1D42E6B0; Mon, 12 Feb 2024 20:07:20 +0800 X-QQ-mid: xmsmtpt1707739640t7f1xmzly Message-ID: <tencent_9E786E6C4C2DF96F4097BCEA5AED66CEBC0A@qq.com> X-QQ-XMAILINFO: N5sfBKY/oC4k2pZio3FMLYvCCX1tGL5fDqcEh+KzrsHvTELLJEQRN05gdsY9Uy kqxqJkdOkKGeWbLLopMaf2/Ak6JDGcMRQ1bvbS1fqJKOZqsSCJsXVGxIH7L4XOYS64mpfSjqUw9Q DZ7mk/OnWi/qR+C/poOxLrn9l1iAXYijPbByxFP2cdPBrpistSzxFf2QTZwqvJ9Urhjty8qz7x0w ViWogcZdzY3Go30mu2Hn85VqF5JLbHhVDItEZEbR117GUUWz4nLuYTAueuvVfsRjDrXj4EGgC7mG 9gVsC29TB93CufcLAAnMajowE9RE+2cgyugbFesStEZ6dxWC2r4Um7ZfBgBz8pifbJ7UE08FutYt 85pApXai4DUywAWUN15Th/UyYPLpYAy/Ag5Gu7ezauZKotSTAY60s+zU87hv1DmBUfRTiZmAux79 CDfPIx7tMHJGBkZ4htxt9hBCRqSQm8XcCa/B/IeO8PcI3uN3WsCmJSQQ4ybenRaTAubb1YiptJJ0 sWOrX+Blw1tKSHo73+oy4Ue7rfw/esygIA9LRhah1mzTnfWpkSi7Jc0nZFfs7QbvQSoyul3Lswkm MxpA+PLg049cJ3MIxXZpO2s1H4+b+PgeB7rnReAd0DUnXwjoq+GpxDUCpj2MI+Rpoa0ap7mNgu24 AxGvv5iAocChYBmMSm32fFWTIkhVGJAAHyyQErJLsrZfkj99pIHIzun7WrozV8ZMCAGDMqyX4HFq h2wE1WVprEDahR3bvXGhqdCfsXSgUXn/vRTtfn+wjNM4Ne5jUfOE1y9t2ltxbc1qwiZ3WV03Ir71 7X6Ai1DiJG1K0vDuqwn1ABGlUZyovgJHOpOsaX2c2wQRleouc2KW7DhBDUyO8hsW8ReQCGvedi0g FuuQd9K425XaIceePkHZK179+YTyNdTyKSJu4PrDsUI/iCp+caL9U= X-QQ-XMRINFO: M/715EihBoGSf6IYSX1iLFg= From: Edward Adam Davis <eadavis@qq.com> To: syzbot+0d7a3627fb6a42cf0863@syzkaller.appspotmail.com Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: [PATCH] Test divide err in drm Date: Mon, 12 Feb 2024 20:07:20 +0800 X-OQ-MSGID: <20240212120720.120067-2-eadavis@qq.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <000000000000587e0f06112cd973@google.com> References: <000000000000587e0f06112cd973@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790695333528833283 X-GMAIL-MSGID: 1790695333528833283 |
Series |
Test divide err in drm
|
|
Commit Message
Edward Adam Davis
Feb. 12, 2024, 12:07 p.m. UTC
please test divide err in drm #syz test https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
Comments
Hello, syzbot has tested the proposed patch and the reproducer did not trigger any issue: Reported-and-tested-by: syzbot+0d7a3627fb6a42cf0863@syzkaller.appspotmail.com Tested on: commit: ae00c445 Add linux-next specific files for 20240212 git tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master console output: https://syzkaller.appspot.com/x/log.txt?x=154105ec180000 kernel config: https://syzkaller.appspot.com/x/.config?x=4eb3a27eddb32a14 dashboard link: https://syzkaller.appspot.com/bug?extid=0d7a3627fb6a42cf0863 compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 patch: https://syzkaller.appspot.com/x/patch.diff?x=160d0724180000 Note: testing is done by a robot and is best-effort only.
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index ac9a406250c5..60739d861da2 100644 --- a/drivers/gpu/drm/drm_modes.c +++ b/drivers/gpu/drm/drm_modes.c @@ -36,6 +36,7 @@ #include <linux/list.h> #include <linux/list_sort.h> #include <linux/of.h> +#include <linux/overflow.h> #include <video/of_display_timing.h> #include <video/of_videomode.h> @@ -1297,8 +1298,10 @@ int drm_mode_vrefresh(const struct drm_display_mode *mode) num *= 2; if (mode->flags & DRM_MODE_FLAG_DBLSCAN) den *= 2; - if (mode->vscan > 1) - den *= mode->vscan; + if (mode->vscan > 1) { + if (unlikely(check_mul_overflow(den, mode->vscan, &den))) + return 0; + } return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(num, 1000), den); }