Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1313059pxb; Thu, 28 Oct 2021 01:08:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4acdnPMx6LmQMAbbl2YmtPf/asGNqpZW7KV+BZ2p0BdZgNyyiTtaVsAOSiTYMKHefHYF+ X-Received: by 2002:a17:902:d703:b0:140:e3a:cc7e with SMTP id w3-20020a170902d70300b001400e3acc7emr2344699ply.65.1635408490538; Thu, 28 Oct 2021 01:08:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635408490; cv=none; d=google.com; s=arc-20160816; b=tTe+O9HXTW3LtyiAVtOPN2lFqkCtSdp+2paNb57oEpdNlLH3IYunFP9aN6Bd2nkOkJ SpzqQg+zLRgjXmQI4CnLjzCTwyDmhFP8SwVfz1YNxos0he6ahz1wl3flhagDCK06Y+6P xjt0rDf9/puhe2txYWpu2Ps5lhXpXRXXb4kPsJTKlxo6/43MB5s9jVIExc29tnTKF+pe bzeOvYnR8v5HVzmaYekpu4waSFNIHzBH7iKbpiUXnmPU/g0xhcdQFczqMyCqbLPFj0h2 vficXQPF0IRrsviqvxhNOLlYRsmE5fG1C3cSv8ZYx+Tn1NaeiG+nhiA6J4FW6iBhaPCG nVcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=8hX6YWh2Qu9VP/L6RLPs/omkiX7ZNKmtW4SWOeHX3y0=; b=f3BWoon5g200s8ou2GFKYYTq8kI1MOnZqTQlsH0Ajd3r/5BYgwAv73O2rgv0l24joZ 2UfaKcjhtGlv8FhGXJaysyLP+kGkBfMI1MRdK5C+5FaZrDoA5lGQ43Lb8N5zXLHsTVTp XdGyC3NYP5YzYQmewLl7vjK2N8yA4N3zuL2uyjAf25ObQtzIJrsljvvIggUDS6xMI5ur ZlyYQHobWuPeUaWHV19A8w5cVZ5qt8dxseEPXjGjjJQIaTF7PeBMuAYQJxw65Y5gNxle egyiR/yY3GO01Wt23OFz5nk2OtTV9ZpY9PiP4KU8OSnOUp3aHxEKNQTm2nqgvgEemNYA /sIg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d191si2832158pgc.410.2021.10.28.01.07.33; Thu, 28 Oct 2021 01:08:10 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229974AbhJ1IHk (ORCPT + 99 others); Thu, 28 Oct 2021 04:07:40 -0400 Received: from mail-ua1-f51.google.com ([209.85.222.51]:40614 "EHLO mail-ua1-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229626AbhJ1IHj (ORCPT ); Thu, 28 Oct 2021 04:07:39 -0400 Received: by mail-ua1-f51.google.com with SMTP id e2so9924732uax.7; Thu, 28 Oct 2021 01:05:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8hX6YWh2Qu9VP/L6RLPs/omkiX7ZNKmtW4SWOeHX3y0=; b=0D452tJFovFsb28l7v8CzT1Pao9gaPuuh8ggUyZSvjyNtzhi6qYGi3DWYDq6ag5Lh9 Ibwehkvvj+Wiie9e8TX474wlJAk29NT7gMLJTQvgzc5tzO6lDx3YsE5Y6Pn4gK7mrkY2 pngMokbYHJhR/p1hwDWOzXQvDAW+YAOD5EGnBRwHc84r8iGFrO8Z2U5BxeEVK/A7EjvL G7KVzFONOH/kTbf+ZSAW+1Z05FVZJJ/EwSfm/9c0e9zeJS7FyoOYuiBvUbcmmlZTVW45 x9Y4kCcbo4RKzTlAvopz5t7p7DdNVm92Sy+z21i3Y8TNNOLmNggDLt1BPVK9qNHXkuQy xQTQ== X-Gm-Message-State: AOAM532odL91nfi74V7Yrb+wKmu7EQ4G09Kt0fI+7w0nyUcrXRmQotPg 68AJqHtWFx7Jg6tgJlzvKkme6lMnjHIgng== X-Received: by 2002:a67:2c95:: with SMTP id s143mr2916623vss.0.1635408312403; Thu, 28 Oct 2021 01:05:12 -0700 (PDT) Received: from mail-vk1-f178.google.com (mail-vk1-f178.google.com. [209.85.221.178]) by smtp.gmail.com with ESMTPSA id y25sm343891vkb.42.2021.10.28.01.05.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 Oct 2021 01:05:12 -0700 (PDT) Received: by mail-vk1-f178.google.com with SMTP id h133so2564703vke.10; Thu, 28 Oct 2021 01:05:11 -0700 (PDT) X-Received: by 2002:a1f:1604:: with SMTP id 4mr2695337vkw.11.1635408311641; Thu, 28 Oct 2021 01:05:11 -0700 (PDT) MIME-Version: 1.0 References: <1635366613-22507-1-git-send-email-george.kennedy@oracle.com> In-Reply-To: <1635366613-22507-1-git-send-email-george.kennedy@oracle.com> From: Geert Uytterhoeven Date: Thu, 28 Oct 2021 10:05:00 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] video: fbdev: cirrusfb: check pixclock to avoid divide by zero To: George Kennedy Cc: Greg KH , Thomas Zimmermann , Sam Ravnborg , DRI Development , Linux Fbdev development list , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 27, 2021 at 10:32 PM George Kennedy wrote: > Do a sanity check on pixclock value to avoid divide by zero. > > If the pixclock value is zero, the cirrusfb driver will round up > pixclock to get the derived frequency as close to maxclock as > possible. > > Syzkaller reported a divide error in cirrusfb_check_pixclock. > > divide error: 0000 [#1] SMP KASAN PTI > CPU: 0 PID: 14938 Comm: cirrusfb_test Not tainted 5.15.0-rc6 #1 > Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-2 > RIP: 0010:cirrusfb_check_var+0x6f1/0x1260 > > Call Trace: > fb_set_var+0x398/0xf90 > do_fb_ioctl+0x4b8/0x6f0 > fb_ioctl+0xeb/0x130 > __x64_sys_ioctl+0x19d/0x220 > do_syscall_64+0x3a/0x80 > entry_SYSCALL_64_after_hwframe+0x44/0xae > > Signed-off-by: George Kennedy Reviewed-by: Geert Uytterhoeven Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds