From: Rob Herring <robh@kernel.org>
To: "Nícolas F. R. A. Prado" <nfraprado@collabora.com>
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
Frank Rowand <frowand.list@gmail.com>,
kernel@collabora.com, Mark Brown <broonie@kernel.org>,
Aishwarya TCV <aishwarya.tcv@arm.com>,
Rob Herring <robh+dt@kernel.org>,
Naresh Kamboju <naresh.kamboju@linaro.org>
Subject: Re: [PATCH] dt: dt-extract-compatibles: Don't follow symlinks when walking tree
Date: Thu, 9 Nov 2023 11:56:59 -0600 [thread overview]
Message-ID: <169955261140.1617124.16120515959862033493.robh@kernel.org> (raw)
In-Reply-To: <20231107225624.9811-1-nfraprado@collabora.com>
On Tue, 07 Nov 2023 17:55:28 -0500, Nícolas F. R. A. Prado wrote:
> The iglob function, which we use to find C source files in the kernel
> tree, always follows symbolic links. This can cause unintentional
> recursions whenever a symbolic link points to a parent directory. A
> common scenario is building the kernel with the output set to a
> directory inside the kernel tree, which will contain such a symlink.
>
> Instead of using the iglob function, use os.walk to traverse the
> directory tree, which by default doesn't follow symbolic links. fnmatch
> is then used to match the glob on the filename, as well as ignore hidden
> files (which were ignored by default with iglob).
>
> This approach runs just as fast as using iglob.
>
> Fixes: b6acf8073517 ("dt: Add a check for undocumented compatible strings in kernel")
> Reported-by: Aishwarya TCV <aishwarya.tcv@arm.com>
> Closes: https://lore.kernel.org/all/e90cb52f-d55b-d3ba-3933-6cc7b43fcfbc@arm.com
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
>
> ---
>
> scripts/dtc/dt-extract-compatibles | 14 ++++++++++++--
> 1 file changed, 12 insertions(+), 2 deletions(-)
>
Applied, thanks!
prev parent reply other threads:[~2023-11-09 17:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-07 22:55 Nícolas F. R. A. Prado
2023-11-09 17:56 ` Rob Herring [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=169955261140.1617124.16120515959862033493.robh@kernel.org \
--to=robh@kernel.org \
--cc=aishwarya.tcv@arm.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=naresh.kamboju@linaro.org \
--cc=nfraprado@collabora.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®