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: <CAL_JsqLs7P81KiT3b3W5G=qt6JfU0tvM1TKdtJJ5Vq1HSzRW3w@mail.gmail.com>
Date:   Fri, 9 Nov 2018 14:30:01 -0600
From:   Rob Herring <robh@...nel.org>
To:     David Miller <davem@...emloft.net>
Cc:     Frank Rowand <frowand.list@...il.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        sparclinux@...r.kernel.org
Subject: Re: [PATCH 2/8] of: Drop full path from Sparc PDT full_name

On Thu, Nov 8, 2018 at 9:11 PM David Miller <davem@...emloft.net> wrote:
>
> From: Rob Herring <robh@...nel.org>
> Date: Wed,  7 Nov 2018 16:31:45 -0600
>
> > @@ -32,24 +32,7 @@ unsigned int of_pdt_unique_id __initdata;
> >
> >  static char * __init of_pdt_build_full_name(struct device_node *dp)
> >  {
> > -     int len, ourlen, plen;
> > -     char *n;
> > -
> > -     dp->path_component_name = build_path_component(dp);
> > -
> > -     plen = strlen(dp->parent->full_name);
> > -     ourlen = strlen(dp->path_component_name);
> > -     len = ourlen + plen + 2;
> > -
> > -     n = prom_early_alloc(len);
> > -     strcpy(n, dp->parent->full_name);
> > -     if (!of_node_is_root(dp->parent)) {
> > -             strcpy(n + plen, "/");
> > -             plen++;
> > -     }
> > -     strcpy(n + plen, dp->path_component_name);
> > -
> > -     return n;
> > +     return build_path_component(dp);
> >  }
> >
> >  #else /* CONFIG_SPARC */
>
> Hmmm, shouldn't this be doing what the non-SPARC version of
> of_pdt_build_full_name() does which is to return the component string
> appended to the parent's full_name?
>
> You're just returning the component string here.

That is the intent. With this change we stop storing the full path for
every node. Everywhere that needs the full path, generates it with the
%pOF printf specifier. Other than users in arch/sparc converted in
this series all the users of full_name have been converted already or
use kbasename(full_name) so they work either way. BTW, I've found a
couple more, so I'll be sending you a v2.

And of_pdt_build_full_name for !SPARC does need to be converted too,
but I'll do that separately.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ