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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0043AC433EF for ; Thu, 30 Jun 2022 15:18:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231254AbiF3PS3 (ORCPT ); Thu, 30 Jun 2022 11:18:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235824AbiF3PSV (ORCPT ); Thu, 30 Jun 2022 11:18:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D81464DE for ; Thu, 30 Jun 2022 08:18:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 71CBD60F1B for ; Thu, 30 Jun 2022 15:18:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5144AC34115; Thu, 30 Jun 2022 15:18:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656602293; bh=PdIQJJsnc4nBeLOxlJtfEmJmZ33t1MTFhwJmcl1cXMo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=zHjkKecnSpHYCW6EhTZ9oQ86e9OLULEXAHXc8U9uxF4kXUDV08NCKDbOd85eg4z1+ eHutQMTtE7hLeGonI1IApqVOLnIrTb/8e1ey1zEf7NS1OMyLG4o4SYQ49S+3Cx4wW8 vZHww0GtaA94kXT+UqeeLaduehtLW1KhuWzsr1+k= Date: Thu, 30 Jun 2022 17:18:11 +0200 From: Greg Kroah-Hartman To: Yangxi Xiang Cc: linux-kernel@vger.kernel.org, Jiri Slaby , Johan Hovold , Igor Matheus Andrade Torrente , Christian Borntraeger , nick black Subject: Re: [PATCH v3] vt: fix memory overlapping when deleting chars in the buffer Message-ID: References: <20220628093322.5688-1-xyangxi5@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220628093322.5688-1-xyangxi5@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 28, 2022 at 05:33:22PM +0800, Yangxi Xiang wrote: > A memory overlapping copy occurs when deleting a long line. This memory > overlapping copy can cause data corruption when scr_memcpyw is optimized > to memcpy because memcpy does not ensure its behavior if the destination > buffer overlaps with the source buffer. The line buffer is not always > broken, because the memcpy utilizes the hardware acceleration, whose > result is not deterministic. > > Fix this problem by using replacing the scr_memcpyw with scr_memmovew. > > Fixes: 81732c3b2fed ("Fix line garbage in virtual console") Nit, this should have been: Fixes: 81732c3b2fed ("tty vt: Fix line garbage in virtual console on command line edition") otherwise our tools complain. I've fixed it up when applying it. thanks, greg k-h