Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1098649pxj; Sat, 15 May 2021 03:57:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz07/lTrtnsn9GgF+dwg07HpNLkiLm6jnfZ9yAl4/PXqT+cI4S4v8dVH4T9OBydXSpE/C2P X-Received: by 2002:a02:660e:: with SMTP id k14mr46930427jac.9.1621076231606; Sat, 15 May 2021 03:57:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621076231; cv=none; d=google.com; s=arc-20160816; b=mBEaJu7ouvN9IHXSZtO9Q6kS7OirqidZObCAji0J40vkh8yNeKKNLtXx/giuTDhKyJ 4STjdW+x3IVq/FdLZZFpUCdfB3ctYeY2vWCPP8T0je5sKSCHwMheH2reOUaQY69BZznA txNHixVzolcciajCm5qz+Eo1PCfAYtWwL4DuTsvzbUGmYLr6ey9xQ6upwP1qb6hPg1XN o0wq/1pA5mB4DDmggcWocM6jMOp9TBu9SnpfBzys+XBsfwlP0Lmg3kHXQY3I+FgSy3kn +nXuDhuSc9QInp9+apF7963I1P/VQmPsanA2LWN36U8dhT0839dKn51OlycU226Q7F4H vN6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=NedTDiuG+kP3p7f820Ou/6lHD4tZ5Jt03qAacc1wbGs=; b=Hgn6x5IoaQkW8JRXQTkIpubUbY7EICKYRwybfgED9iMv+YgVIHNFIcYvqZ045CjRxQ /vVTSc/JWZbP6L2c81wz5SVdsL7ALUnPPEAZDohhkPxrKcNUO7+eFz0qfqIkOHFA9Xml w0Q4sXk7hXx8qiijG7PBikaTaDtgNaJFA2LoRVXSVtbV8chObrNxdb7x1nE6sVie3RCb B2D/9KRN8gUYG9h4xYV9LZpRE7+G421ZrNyp/jvKsDCIAPcY5AXs7WMp1S/Yf2sF14ZP 9olCz5pU9KuH+pIcUwNv3MtGeN21SYIW3wszzomCBGqawlnT5kcZlgNS2T1gblnkN0ni 4Q5A== 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 k15si9749918ilr.47.2021.05.15.03.56.59; Sat, 15 May 2021 03:57:11 -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 S234570AbhEOAqc (ORCPT + 99 others); Fri, 14 May 2021 20:46:32 -0400 Received: from www262.sakura.ne.jp ([202.181.97.72]:49200 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233855AbhEOAqa (ORCPT ); Fri, 14 May 2021 20:46:30 -0400 Received: from fsav303.sakura.ne.jp (fsav303.sakura.ne.jp [153.120.85.134]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 14F0jFEm090525; Sat, 15 May 2021 09:45:15 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav303.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav303.sakura.ne.jp); Sat, 15 May 2021 09:45:15 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav303.sakura.ne.jp) Received: from [192.168.1.9] (M106072142033.v4.enabler.ne.jp [106.72.142.33]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 14F0jFti090520 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Sat, 15 May 2021 09:45:15 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Subject: Re: [PATCH] video: fbdev: vga16fb: fix OOB write in vga16fb_imageblit() To: "Maciej W. Rozycki" , Linus Torvalds Cc: dri-devel , Linux Fbdev development list , Linux Kernel Mailing List , Daniel Vetter , syzbot , Bartlomiej Zolnierkiewicz , Colin King , Greg Kroah-Hartman , Jani Nikula , Jiri Slaby , syzkaller-bugs , "Antonino A. Daplas" References: <0000000000006bbd0c05c14f1b09@google.com> <6e21483c-06f6-404b-4018-e00ee85c456c@i-love.sakura.ne.jp> <87d928e4-b2b9-ad30-f3f0-1dfb8e4e03ed@i-love.sakura.ne.jp> <05acdda8-dc1c-5119-4326-96eed24bea0c@i-love.sakura.ne.jp> From: Tetsuo Handa Message-ID: <543ead9f-08d2-cc9d-e569-78a479378e62@i-love.sakura.ne.jp> Date: Sat, 15 May 2021 09:45:11 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/05/15 5:25, Maciej W. Rozycki wrote: > NB for fbcon the usual ioctl to resize the console is FBIOPUT_VSCREENINFO > rather than VT_RESIZEX; fbset(8) uses it, and I actually experimented with > it and a TGA-like (SFB+) framebuffer when at my lab last time, as Linux is > kind enough to know how to fiddle with its clockchip. It works just fine. fbcon_update_vcs() from FBIOPUT_VSCREENINFO is no-op if vc->vc_mode != KD_TEXT (which is equivalent to "if vc->vc_mode == KD_GRAPHICS" because KD_TEXT0/KD_TEXT1 are treated as KD_TEXT). Then, maybe it is OK to let resize_screen() return -EINVAL in order to make vc_do_resize() request fail if vc->vc_mode == KD_GRAPHICS. > Overall I think it does make sense to resize the text console at any > time, even if the visible console (VT) chosen is in the graphics mode, as > my understanding (and experience at least with vgacon) is that resizing > the console applies globally across all the VTs. So the intent of the > original change appears valid to me, and the choice not to reprogram the > visible console and only store the settings for a future use if it's in > the graphics mode correct. > > Which means any bug triggered here needs to be fixed elsewhere rather > than by making the request fail. Since syzbot does not trigger this problem with Linus's patch, I think we can try Linus's patch with pr_info_once("Resizing text console while in graphical mode is ignored. Please report if you need this.\n"); added in order to see if somebody wants "only store the settings for a future use".