From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753390AbcD1JEf (ORCPT ); Thu, 28 Apr 2016 05:04:35 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:34908 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752378AbcD1JEd (ORCPT ); Thu, 28 Apr 2016 05:04:33 -0400 Date: Thu, 28 Apr 2016 11:04:27 +0200 From: Ingo Molnar To: Kees Cook Cc: Yinghai Lu , Baoquan He , Borislav Petkov , Ingo Molnar , "x86@kernel.org" , Andrew Morton , Andrey Ryabinin , Dmitry Vyukov , "H.J. Lu" , Josh Poimboeuf , Andy Lutomirski , LKML Subject: Re: [PATCH v2] x86/boot: Rename overlapping memcpy() to memmove() Message-ID: <20160428090427.GB5773@gmail.com> References: <20160426214606.GA5758@www.outflux.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160426214606.GA5758@www.outflux.net> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Kees Cook wrote: > +void *memcpy(void *dest, const void *src, size_t n) btw., if there's any doubt about other overlapping uses, we could add this to memcpy(): WARN_ON_ONCE(dest > src && dest-src < n); or so? Does printk() work so early on? Thanks, Ingo