From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63D93C43214 for ; Mon, 30 Aug 2021 15:01:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4A9BC60E98 for ; Mon, 30 Aug 2021 15:01:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237363AbhH3PB5 (ORCPT ); Mon, 30 Aug 2021 11:01:57 -0400 Received: from mail-vs1-f48.google.com ([209.85.217.48]:33330 "EHLO mail-vs1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237123AbhH3PB4 (ORCPT ); Mon, 30 Aug 2021 11:01:56 -0400 Received: by mail-vs1-f48.google.com with SMTP id bf15so7486565vsb.0; Mon, 30 Aug 2021 08:01:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=u13jY3wSZM31fcmpr4GBs3113ESNVPQ9w7zIuFDRtqA=; b=S26MupTMB9lNp+e5CmUl21PLpFTAmE0SKz2wgO6NHFMjhxkQYKALAhKAv0IFFt9U5S bObtw7oPJiQxRQCxz/jg0p3gidQP8VsVmiIrJ99iEoeW2fNdhO/WONT7/IosJ9ZTqf3u ZTx3vk2tyuWs5pJ3mwrn/7ssMs9DxXrn8F5BiACPqU7ji2Srw5FYv3ozQhGJvnqoON3O 8aE6ZCytDW9tX/aoQfApzaa4qfpKS65ll++ppM/mCee8gzhlnREp/sgMnD0EMaC/vqMB 3yRW8oyebOVZMIRoavNBlDICwOZJLdzDnCN0eTT38fhAlvugREM/KbVXtWIjYmzR885q vkuw== X-Gm-Message-State: AOAM533yF3lMvv23mYatvcdpRVN5B5kMy23Gm4Xjr8BzNXKv+zYt3Wma OlVLTLDmWc1FLlAkLGiBAYTLoebQ8/HIuyBFxL4= X-Google-Smtp-Source: ABdhPJycXkCL/LhUbLlVUIVrKZgwucuUJ5aj2ffNWq+81tLkWAXOEw1KSPDM3UaKy+3i0pGmd6eAWJNnwA27a2ky+cc= X-Received: by 2002:a67:c789:: with SMTP id t9mr15437109vsk.60.1630335661896; Mon, 30 Aug 2021 08:01:01 -0700 (PDT) MIME-Version: 1.0 References: <000000000000815b9605c70e74f8@google.com> <131b24e5-ee31-6f7b-42b4-c34583711913@infradead.org> <2fccb5d3-191c-924e-159f-1c9d423e282f@i-love.sakura.ne.jp> <20210830130000.GW7722@kadam> <8ed0ca59-226b-2d0e-b1ae-82305202558d@i-love.sakura.ne.jp> <20210830134719.GI12231@kadam> <03d0f549-9731-8b06-1393-60d4bef27884@i-love.sakura.ne.jp> In-Reply-To: From: Geert Uytterhoeven Date: Mon, 30 Aug 2021 17:00:49 +0200 Message-ID: Subject: Re: [syzbot] BUG: unable to handle kernel paging request in vga16fb_fillrect To: Tetsuo Handa Cc: Dan Carpenter , Randy Dunlap , syzbot , Andrew Morton , Bartlomiej Zolnierkiewicz , Colin King , DRI Development , Linux Fbdev development list , Linux Kernel Mailing List , Masahiro Yamada , syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tetsuo, On Mon, Aug 30, 2021 at 4:53 PM Geert Uytterhoeven wrote: > On Mon, Aug 30, 2021 at 4:38 PM Tetsuo Handa > wrote: > > On 2021/08/30 23:30, Geert Uytterhoeven wrote: > > > The highest possible value of maxmem inside vga16fb_check_var() > > > is 65536. > > > > Yes. > > > > > > > > So I believe > > > > > > if (array_size(vxres, vyres) > maxmem) > > > > > > should work fine. > > > > My intent is to check at common path than individual module so that we don't > > need to add same check to every module. Same approach is proposed at > > https://lkml.kernel.org/r/1630294223-7225-1-git-send-email-tcs_kernel@tencent.com . > > Which I believe is wrong. > Thanks for the pointer, I will reply to the actual patch... Upon second look, that patch is not really wrong, as the check happens after calling into info->fbops->fb_check_var(). 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4AB0EC4320A for ; Mon, 30 Aug 2021 15:01:05 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E6FCC60E77 for ; Mon, 30 Aug 2021 15:01:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E6FCC60E77 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3DAB489971; Mon, 30 Aug 2021 15:01:04 +0000 (UTC) Received: from mail-vs1-f44.google.com (mail-vs1-f44.google.com [209.85.217.44]) by gabe.freedesktop.org (Postfix) with ESMTPS id B52A589971 for ; Mon, 30 Aug 2021 15:01:02 +0000 (UTC) Received: by mail-vs1-f44.google.com with SMTP id m19so10735697vsj.10 for ; Mon, 30 Aug 2021 08:01:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=u13jY3wSZM31fcmpr4GBs3113ESNVPQ9w7zIuFDRtqA=; b=TdIZejpdrDnVG/+pKfUsJTsoo7a9Y3CxJxv1x1C5yF7c88iUzHlTNZEDx0HF6J/tvt 5yHZVg37U0Z0ZMf7wKVSI7ayHXBFbYePrKtdbYNVexDDK1Vf0STgDzLLM8NVp7O6UeMM dacYrQoBnrTTv66nQHWMA5jaCVQDKihgmbwcsx4XC1niOlI9n9elexgYbJaWNB+FQ3rB vK+SaN6qy2vIBk0IO/H08dltue2ANSqrhNbmXBO1HPLMuqcxPqao5CC+jCXwbqJuqrvs lUCGan6TTj4q1paeuPzt08CFLCXR08BD2cL3EMM7RorfHuy761oKSl3cx4SdB/MLY/Ob 9U0A== X-Gm-Message-State: AOAM531Slnfiac3LT0CafaxZv1RYkZoxXKd5gNqGOljrWz07JE3oCPZ3 29tArz7B7ktA8MsrcFGUcs+8QA2rmE7PQXZ3/1A= X-Google-Smtp-Source: ABdhPJycXkCL/LhUbLlVUIVrKZgwucuUJ5aj2ffNWq+81tLkWAXOEw1KSPDM3UaKy+3i0pGmd6eAWJNnwA27a2ky+cc= X-Received: by 2002:a67:c789:: with SMTP id t9mr15437109vsk.60.1630335661896; Mon, 30 Aug 2021 08:01:01 -0700 (PDT) MIME-Version: 1.0 References: <000000000000815b9605c70e74f8@google.com> <131b24e5-ee31-6f7b-42b4-c34583711913@infradead.org> <2fccb5d3-191c-924e-159f-1c9d423e282f@i-love.sakura.ne.jp> <20210830130000.GW7722@kadam> <8ed0ca59-226b-2d0e-b1ae-82305202558d@i-love.sakura.ne.jp> <20210830134719.GI12231@kadam> <03d0f549-9731-8b06-1393-60d4bef27884@i-love.sakura.ne.jp> In-Reply-To: From: Geert Uytterhoeven Date: Mon, 30 Aug 2021 17:00:49 +0200 Message-ID: Subject: Re: [syzbot] BUG: unable to handle kernel paging request in vga16fb_fillrect To: Tetsuo Handa Cc: Dan Carpenter , Randy Dunlap , syzbot , Andrew Morton , Bartlomiej Zolnierkiewicz , Colin King , DRI Development , Linux Fbdev development list , Linux Kernel Mailing List , Masahiro Yamada , syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Tetsuo, On Mon, Aug 30, 2021 at 4:53 PM Geert Uytterhoeven wrote: > On Mon, Aug 30, 2021 at 4:38 PM Tetsuo Handa > wrote: > > On 2021/08/30 23:30, Geert Uytterhoeven wrote: > > > The highest possible value of maxmem inside vga16fb_check_var() > > > is 65536. > > > > Yes. > > > > > > > > So I believe > > > > > > if (array_size(vxres, vyres) > maxmem) > > > > > > should work fine. > > > > My intent is to check at common path than individual module so that we don't > > need to add same check to every module. Same approach is proposed at > > https://lkml.kernel.org/r/1630294223-7225-1-git-send-email-tcs_kernel@tencent.com . > > Which I believe is wrong. > Thanks for the pointer, I will reply to the actual patch... Upon second look, that patch is not really wrong, as the check happens after calling into info->fbops->fb_check_var(). 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