From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752002AbdBOLeA (ORCPT ); Wed, 15 Feb 2017 06:34:00 -0500 Received: from foss.arm.com ([217.140.101.70]:54358 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751557AbdBOLd7 (ORCPT ); Wed, 15 Feb 2017 06:33:59 -0500 Date: Wed, 15 Feb 2017 11:33:59 +0000 From: Will Deacon To: Arnd Bergmann Cc: Catalin Marinas , Ard Biesheuvel , Mark Rutland , Laura Abbott , Kefeng Wang , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm64: fix warning about swapper_pg_dir overflow Message-ID: <20170215113358.GC9630@arm.com> References: <20170214212718.2792194-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170214212718.2792194-1-arnd@arndb.de> 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 On Tue, Feb 14, 2017 at 10:27:01PM +0100, Arnd Bergmann wrote: > With 4 levels of 16KB pages, we get this warning about the fact that we are > copying a whole page into an array that is declared as having only two pointers > for the top level of the page table: > > arch/arm64/mm/mmu.c: In function 'paging_init': > arch/arm64/mm/mmu.c:528:2: error: 'memcpy' writing 16384 bytes into a region of size 16 overflows the destination [-Werror=stringop-overflow=] > > This is harmless since we actually reserve a whole page in the definition of the > array that comes from, and just the extern declaration is short. The pgdir > is initialized to zero either way, so copying the actual entries here seems > like the best solution. Thanks, I'll queue this up for 4.11 with the acks. Will