From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752828AbbE0RTZ (ORCPT ); Wed, 27 May 2015 13:19:25 -0400 Received: from terminus.zytor.com ([198.137.202.10]:39449 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751478AbbE0RTY (ORCPT ); Wed, 27 May 2015 13:19:24 -0400 Message-ID: <5565FC7E.7080805@zytor.com> Date: Wed, 27 May 2015 10:18:54 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Borislav Petkov , Andy Lutomirski CC: "linux-kernel@vger.kernel.org" , Fenghua Yu , Dave Hansen , Thomas Gleixner , Denys Vlasenko , Ingo Molnar , Brian Gerst , Igor Mammedov , the arch/x86 maintainers , Prarit Bhargava 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> In-Reply-To: <20150519192206.GN4641@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 12:22 PM, Borislav Petkov wrote: > > I guess I'm trying to find out why don't we have a BIG FAT WARNING over > memcpy saying not to use it with overlapping buffers and larger than > byte sizes. Or maybe this is something everyone, except me, just knows > and that's a "Doh, Boris, of course!". > It kind of is, and doesn't just apply to kernel programming. In C99+ the memcpy() prototype has "restrict" in it to denote that memcpy() buffers have to be non-overlapping. -hpa