Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3676655imm; Sat, 21 Jul 2018 00:22:33 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeY2y0bbhM9KTs/I5UodRTkQtU1X5lZt22Ocrlr3QbHwMkgWgRyWPaNIdnagDdYqZRDbSI7 X-Received: by 2002:a17:902:bd07:: with SMTP id p7-v6mr5027602pls.32.1532157753056; Sat, 21 Jul 2018 00:22:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532157753; cv=none; d=google.com; s=arc-20160816; b=flZkEVU8eK80N0RyCiln3sAuIf0OyBkmlAat2kUYmkQDplmwUhJZB3wiL2VHTdzXix oMyyalM0AnqG9lmEpqHUprN8PHOaRGfq9KsQHMYwe3Y+NV50vOD5XXPAknuWKrI0yUaB CxIILFUKamtGsF4T1R+V1iz1SiiLQ7C5dMuPLWu9afvNkVCJi64//BqDKbUWX5ZF75zc BmVRefvdu3HjiTFBNZPGn30qx/coFkHTcDk3EAuHEm2pvX4USiu1wca7Sevv2osQk4+U rR8Eu4oLZ/fLc5Icvp+MhPdA1jQ00wKu9jE8bJKWZ/MXNQ33MztHlcsFWZb0sMkMLxRT UB6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=0S0JQdeRyycnZi7kpNMTXT0uP10eOoMESbIfwmTet/I=; b=aHICOA9B9YM4ffjRJeySVCO2WsH40VV5UNF2v1jaLAQombzqZEnBHL4LzauY9shPym cz/cVtyN9NBAf7mqTS0IkMXFZqwvvL76zATiFIIBHqR+5reMTZqJzW9OpX72tiVFZ2Dl DI3FM4Eh0uHI5J1FkX30IiiPOEKLIu5YTL0Nr7v3iqGPjt0oD8bNc0Vom4OAg799XAHK BV/mRhRy7eC6Sccow3LIOavSXjHKK1drviXHJBCCooxc1eaayu3y1lwtiX7KebB1ItmR vONMx3hJi4npy/aDe6xt4/urW3be3aVDRPGFIxoa5V/SlFWnQLH47ieEcVOc8iU0GeQt ugpA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i64-v6si3297222pli.431.2018.07.21.00.22.05; Sat, 21 Jul 2018 00:22:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727331AbeGUIM2 (ORCPT + 99 others); Sat, 21 Jul 2018 04:12:28 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:48330 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727172AbeGUIM2 (ORCPT ); Sat, 21 Jul 2018 04:12:28 -0400 Received: from localhost (LFbn-1-12238-233.w90-92.abo.wanadoo.fr [90.92.53.233]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 6EE23B13; Sat, 21 Jul 2018 07:20:45 +0000 (UTC) Date: Sat, 21 Jul 2018 09:20:43 +0200 From: Greg Kroah-Hartman To: Nicolas Pitre Cc: Adam Borowski , Kees Cook , Geert Uytterhoeven , Dave Mielke , Samuel Thibault , linux-kernel@vger.kernel.org, linux-console@vger.kernel.org Subject: Re: [PATCH v2 1/3] vt: avoid a VLA in the unicode screen scroll function Message-ID: <20180721072043.GA26449@kroah.com> References: <20180718010242.5254-1-nicolas.pitre@linaro.org> <20180718010242.5254-2-nicolas.pitre@linaro.org> <20180718014813.ygcbgqxk4yo3ydbl@angband.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 19, 2018 at 12:05:25AM -0400, Nicolas Pitre wrote: > > The nr argument is typically small: most often nr == 1. However this > could be abused with a very large explicit scroll in a resized screen. > Make the code scroll lines by performing an array rotation operation to > avoid the need for a large temporary space. > > Requested-by: Kees Cook > Suggested-by: Adam Borowski > Signed-off-by: Nicolas Pitre I've now applied this v2 of the patch, thanks for this. greg k-h