From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751780AbbESWRs (ORCPT ); Tue, 19 May 2015 18:17:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51561 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750763AbbESWRr (ORCPT ); Tue, 19 May 2015 18:17:47 -0400 Message-ID: <555BB672.9050607@redhat.com> Date: Tue, 19 May 2015 18:17:22 -0400 From: Prarit Bhargava User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131028 Thunderbird/17.0.10 MIME-Version: 1.0 To: Borislav Petkov CC: Andy Lutomirski , "linux-kernel@vger.kernel.org" , Fenghua Yu , Dave Hansen , Thomas Gleixner , Denys Vlasenko , Ingo Molnar , Brian Gerst , "H. Peter Anvin" , Igor Mammedov , the arch/x86 maintainers Subject: Re: [PATCH] x86, cpuinfo x86_model_id whitespace cleanup References: <1432050210-32036-1-git-send-email-prarit@redhat.com> <20150519181334.GM4641@pd.tnic> <20150519192206.GN4641@pd.tnic> <20150519203148.GO4641@pd.tnic> In-Reply-To: <20150519203148.GO4641@pd.tnic> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/19/2015 04:31 PM, Borislav Petkov wrote: > On Tue, May 19, 2015 at 01:16:23PM -0700, Andy Lutomirski wrote: >> It's not just chunk size; it's the direction. If the dest starts >> after the source but overlaps it and you copy forwards, then you can >> clobber the end of the source before you read it. memmove is > > Some things should simply be done solely in userspace :-) > >> specifically intended to avoid this. >> >> Would it be possible to just use memmove directly? > > Yeah. > > Prarit, care to send a v2? Yep, I can do that. It'll have to wait until I get into the office in the morning so I can retest. P. > > Thanks. >