From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753824AbbIWLkd (ORCPT ); Wed, 23 Sep 2015 07:40:33 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:35717 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753467AbbIWLkb (ORCPT ); Wed, 23 Sep 2015 07:40:31 -0400 Subject: Re: [PATCH v13 04/23] x86/stacktool: Compile-time stack metadata validation To: Josh Poimboeuf , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org References: <5904ee9a899cc4c0b3b9be9b96a3b82a278c9612.1442935712.git.jpoimboe@redhat.com> <56028F27.9040309@suse.cz> Cc: linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, Michal Marek , Peter Zijlstra , Andy Lutomirski , Borislav Petkov , Linus Torvalds , Andi Kleen , Pedro Alves , Namhyung Kim , Bernd Petrovitsch , Chris J Arges , Andrew Morton From: Jiri Slaby Message-ID: <56028FA1.1080801@suse.cz> Date: Wed, 23 Sep 2015 13:40:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <56028F27.9040309@suse.cz> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/23/2015, 01:38 PM, Jiri Slaby wrote: > On 09/22/2015, 05:46 PM, Josh Poimboeuf wrote: > ... >> --- /dev/null >> +++ b/tools/stacktool/elf.c >> @@ -0,0 +1,403 @@ > ... >> +static struct section *find_section_by_index(struct elf *elf, >> + unsigned int index) >> +{ > ... >> +} >> + >> +static struct symbol *find_symbol_by_index(struct elf *elf, unsigned int index) >> +{ > > Hi, on openSUSE, I am getting: > > elf.c:45: error: declaration of ‘index’ shadows a global declaration > /usr/include/string.h:487: error: shadowed declaration is here > elf.c: In function ‘find_symbol_by_index’: > elf.c:56: error: declaration of ‘index’ shadows a global declaration > /usr/include/string.h:487: error: shadowed declaration is here > > which is index(3): > extern char *index (__const char *__s, int __c) > __THROW __attribute_pure__ __nonnull ((1)); > > The same here: > >> --- /dev/null >> +++ b/tools/stacktool/special.c >> @@ -0,0 +1,199 @@ > ... >> +static int get_alt_entry(struct elf *elf, struct special_entry *entry, >> + struct section *sec, int index, >> + struct special_alt *alt) >> +{ > ... >> +int special_get_alts(struct elf *elf, struct list_head *alts) >> +{ I erased too much here. Index is a local var here: int index, ret; > > I fixed it obviously by s/index/idx/. > > thanks, -- js suse labs