Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp617575pxk; Wed, 23 Sep 2020 11:23:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDEbqHvY8XvyT24oy0TvUhiKJn1dW8N+qtY0vp/dmNDeL0oA9FdSkyttHfugzblOPAHQ+9 X-Received: by 2002:a50:ce09:: with SMTP id y9mr621459edi.91.1600885439606; Wed, 23 Sep 2020 11:23:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600885439; cv=none; d=google.com; s=arc-20160816; b=Vc3XK5TVRr0iitHT0MJ2oMOSF93UHBpDYX/Na2b47n2y+FgxxIfbNf7J/lkxkV0ydD UnLjpAyCPf1tbJHZIs3vr6d9kDbqgjM6U7K2CeHAxRvAUoBXEjf7rLON/x4OeGD5T3q8 RnlX8w75YrzWy+8NMft93HzYrnUzXPw07i7raTIch8i3WvTfo/r+ZW5x/H9KlVy7fHii C1hqzv6JUmnhjpUp7G9J0i7ggIivwP7MGz2SAKDQlgqTnL2fGVUgxyD+XtGX+13gUCO3 +xO85RxtW/39XxQQhwRCDLMjxkHCQajdgNj7CWM5fz57tUeIjJGDRB8xydzcS++XnVR4 RKiQ== 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:dkim-signature; bh=HKzL90mPBVyB4BFuLjfA3vDiSe9w+bx4riMJ/2lUYsI=; b=fVcum6OhWkDowDeYYliPA3WLl2JjoQIKAENWT9dmVRhIzV4S494orCQEecgMygg2sG F1Jx8VKnhrO23qOUxFiJll5Kb0VZ5iSUVYg4RGMfjSqat6wOd/ja5Sr8aa2gZxoCwsTK PmLHh6+YDmHJxWsv/yX4aD/zzeICrqt7TGaV4cMDw+oYfo+Jd3HWM4dnbytfsl6uz0U1 +rdEzGWzWInSWMuSsuaF0oLEPfB/PG+oG+1Gtl7HndT/zohhJMjKXaCajaHxfqmTX5Xa 30tL8aU7DAlWpfg/RKCKBkL5HpkaXbtLzQjeleXZbmK1DKKUhFf1+wTgf7q3cZkyqtSf nVzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=SaS3fMQ4; 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 o10si483670edt.499.2020.09.23.11.23.36; Wed, 23 Sep 2020 11:23:59 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=SaS3fMQ4; 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 S1726620AbgIWSTi (ORCPT + 99 others); Wed, 23 Sep 2020 14:19:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726419AbgIWSTi (ORCPT ); Wed, 23 Sep 2020 14:19:38 -0400 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7FAEC0613CE for ; Wed, 23 Sep 2020 11:19:37 -0700 (PDT) Received: by mail-lf1-x142.google.com with SMTP id u8so981517lff.1 for ; Wed, 23 Sep 2020 11:19:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HKzL90mPBVyB4BFuLjfA3vDiSe9w+bx4riMJ/2lUYsI=; b=SaS3fMQ4TAJGIV2uK+VYGwCnc06kLKp5cMIqKfSOXB/uM7x1omUGq53QTex0mvH2C6 SilqOUVmahXKC+gO2rkwizwFsmYaX6aN2AKtwHlRfJvr8PahTFw9AytRPIM5cEQld1pA RN+Qj1FNG/topCYovowX1nCso+SP7J+0/DQBU= 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=HKzL90mPBVyB4BFuLjfA3vDiSe9w+bx4riMJ/2lUYsI=; b=KISNIxwsO9KJmrXNfDZneY4T9/SyhvKvrr0kEN9Q29LVkQV0caYIyJa3UQqQq6kL08 Gumj12VegZ2Odla2Zjtl61ek2Zb4ZNBlPCFd2yppTI5V/3Sfqf/C1qxT5OKus2XSkf98 4OqqA7WURuVJquwClHABiNLh2QNjX+sHL0+Ixi5/h39wq//0pDLnQ39zJnibAOAturEV yIHuS7kxUYkG/hegliiqOCwI7YebDNRSIbnvbkPl2ve7aYBT4P9+wF02dccbbxC8oxEI /6jrLDRoCX2kdEdZ8OIJ0GhNlLhQnolPMyBTbqizwiLqZLrGL9PdNKV4R9eMDRunWH+d l1Wg== X-Gm-Message-State: AOAM530cdmsaqGlx3cGvZZ1GTVc6fDYzo3GlFB1w1sKI88ofqOciupMU X02oI3FAHfKDsB4uN2dqy6z2r9fNoeZ7mQ== X-Received: by 2002:ac2:5594:: with SMTP id v20mr379524lfg.344.1600885175838; Wed, 23 Sep 2020 11:19:35 -0700 (PDT) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com. [209.85.208.180]) by smtp.gmail.com with ESMTPSA id u22sm277111lfl.160.2020.09.23.11.19.31 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Sep 2020 11:19:32 -0700 (PDT) Received: by mail-lj1-f180.google.com with SMTP id u4so428874ljd.10 for ; Wed, 23 Sep 2020 11:19:31 -0700 (PDT) X-Received: by 2002:a05:651c:32e:: with SMTP id b14mr345723ljp.314.1600885171360; Wed, 23 Sep 2020 11:19:31 -0700 (PDT) MIME-Version: 1.0 References: <20200915140633.552502750@linuxfoundation.org> <20200915140636.861676717@linuxfoundation.org> <20200916075759.GC32537@duo.ucw.cz> <20200916082510.GB509119@kroah.com> <20200916090723.GA4151@duo.ucw.cz> <20200916091420.GF13670@1wt.eu> <20200923084427.GA32110@amd> In-Reply-To: <20200923084427.GA32110@amd> From: Linus Torvalds Date: Wed, 23 Sep 2020 11:19:15 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4.19 66/78] fbcon: remove soft scrollback code To: Pavel Machek Cc: Willy Tarreau , Greg Kroah-Hartman , jikos@suse.cz, vojtech@suse.cz, Linux Kernel Mailing List , stable , Yuan Ming , Bartlomiej Zolnierkiewicz , Daniel Vetter Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 23, 2020 at 1:44 AM Pavel Machek wrote: > > > > > https://www.openwall.com/lists/oss-security/2020/09/15/2 > > Thank you for the pointer! Note that for me to be willing to take the softscollback code back, it really would have to be more than just a revert and a trivial fix. It would have to be more along the lines of "this is simplified and verified". For example, at a minimum all the VT_RESIZE etc stuff would have to clearly and obviously reset the soft-scrollback, so that we simply can't have those kinds of issues. If you look at that commit 50145474f6ef ("fbcon: remove soft scrollback code") that removes the code, most of that code really doesn't make much sense. I dare anybody looking at that removed fbcon_redraw_softback() function (or the different cases in fbcon_scrolldelta(), for that matter) to claim they understand what it is doing. It's very odd code, and it handles a lot of odd special cases. So I wouldn't mind re-introducing the scrollback code, but the reintroduced version needs to be simple and fairly _obvious_. It would need to not have all those odd special cases, and it would need to clearly not have any subtle issues with things like font or screen resizing. I'd also suggest that it not even try to handle the multiple virtual console case. And yes, some of it may involve also clarifying the code in the VT code itself, so that the interactions with the cursor and VT switching is more obvious. Maybe instead of trying to deal with a SW cursor when scrollback is active, just hide the cursor entirely before doing scrollback. And make change_console (and all the resizing) explicitly reset scrollback etc. So the reason the code got removed was that it was just very grotty and hasn't really been maintained for over a decade. In order to resurrect it we'd not just have to have a maintainer, the whole "it's grotty and incomprehensible and has these nasty interactions with random other things" would need to be addressed too. Linus