lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADvQ+rFBeyhxLp21SON5h4BP1T-rW6FMCyU-JZ_d_0EKOHQgdw@mail.gmail.com>
Date:   Wed, 17 Oct 2018 20:16:14 -0300
From:   Leonardo Bras <leobras.c@...il.com>
To:     Andy Lutomirski <luto@...nel.org>
Cc:     mingo@...nel.org, lkcamp@...ts.libreplanetbr.org,
        Matthew Wilcox <willy6545@...il.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Michal Marek <michal.lkml@...kovi.net>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        linux-kbuild@...r.kernel.org
Subject: Re: [PATCH 2/4] Renames variable to fix shadow warning.

Hello Andy,
Thanks for the suggestion.
I renamed them as suggested and it will be available on v2.

Regards,

Leonardo

On Wed, Oct 17, 2018 at 2:54 PM Andy Lutomirski <luto@...nel.org> wrote:
>
> On Tue, Oct 16, 2018 at 11:01 PM Ingo Molnar <mingo@...nel.org> wrote:
> >
> >
> > * Leonardo Brás <leobras.c@...il.com> wrote:
> >
> > > Renames the char variable to avoid shadowing a variable previously
> > > declared on this function.
> > >
> > > Signed-off-by: Leonardo Brás <leobras.c@...il.com>
> > > ---
> > >  arch/x86/entry/vdso/vdso2c.h | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/arch/x86/entry/vdso/vdso2c.h b/arch/x86/entry/vdso/vdso2c.h
> > > index fa847a620f40..9466998d0f28 100644
> > > --- a/arch/x86/entry/vdso/vdso2c.h
> > > +++ b/arch/x86/entry/vdso/vdso2c.h
> > > @@ -93,11 +93,11 @@ static void BITSFUNC(go)(void *raw_addr, size_t raw_len,
> > >               int k;
> > >               ELF(Sym) *sym = raw_addr + GET_LE(&symtab_hdr->sh_offset) +
> > >                       GET_LE(&symtab_hdr->sh_entsize) * i;
> > > -             const char *name = raw_addr + GET_LE(&strtab_hdr->sh_offset) +
> > > +             const char *name2 = raw_addr + GET_LE(&strtab_hdr->sh_offset) +
> > >                       GET_LE(&sym->st_name);
> > >
> > >               for (k = 0; k < NSYMS; k++) {
> > > -                     if (!strcmp(name, required_syms[k].name)) {
> > > +                     if (!strcmp(name2, required_syms[k].name)) {
> > >                               if (syms[k]) {
> > >                                       fail("duplicate symbol %s\n",
> > >                                            required_syms[k].name);
> >
> > NAK.
> >
> > Please read and understand the code and rename both variables to
> > meaningful names, not just a mindless name/name2 ...
> >
>
> Maybe image_name and sym_name?
>
> --Andy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ