Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932458AbdHWRrB (ORCPT ); Wed, 23 Aug 2017 13:47:01 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:48563 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932111AbdHWRrA (ORCPT ); Wed, 23 Aug 2017 13:47:00 -0400 From: Nathan Lynch To: Arnd Bergmann CC: Ard Biesheuvel , Nicolas Pitre , Mark Rutland , Arnd Bergmann , Will Deacon , Marc Zyngier , , , Russell King Subject: Re: [PATCH v2] ARM: vdso: Define vdso_{start,end} as array In-Reply-To: <20170823142419.1811665-1-arnd@arndb.de> References: <20170823142419.1811665-1-arnd@arndb.de> Date: Wed, 23 Aug 2017 12:46:28 -0500 Message-ID: <87tw0ytbwr.fsf@mentor.com> MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: svr-orw-mbx-02.mgc.mentorg.com (147.34.90.202) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 870 Lines: 24 Arnd Bergmann writes: > gcc-8 correctly points out that reading four bytes from a pointer to a > 'char' variable is wrong > > arch/arm/kernel/vdso.c: In function 'vdso_init': > arch/arm/kernel/vdso.c:200:6: error: '__builtin_memcmp_eq' reading 4 bytes from a region of size 1 [-Werror=stringop-overflow=] > > However, in this case the variable just stands for the beginning of the > vdso and is not actually a 'char', so the code is doing what it is meant > to do. > > This uses the same approach as arm64 and x86, declaring the addresses > as char arrays. > > See also: dbbb08f500d6 ("arm64, vdso: Define vdso_{start,end} as array") > > Suggested-by: Mark Rutland > Suggested-by: Ard Biesheuvel > Signed-off-by: Arnd Bergmann Acked-by: Nathan Lynch Thanks!