From: Stephen Warren <swarren@wwwdotorg.org>
To: Grant Likely <grant.likely@linaro.org>,
Rob Herring <rob.herring@calxeda.com>
Cc: devicetree-discuss@lists.ozlabs.org,
Ian Campbell <Ian.Campbell@citrix.com>,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
Michal Marek <mmarek@suse.cz>,
linux-kbuild@vger.kernel.org, jdl@jdl.com,
Stephen Warren <swarren@nvidia.com>
Subject: Re: [PATCH] dtc: ensure #line directives don't consume data from the next line
Date: Wed, 05 Jun 2013 10:50:02 -0600 [thread overview]
Message-ID: <51AF6C3A.5020609@wwwdotorg.org> (raw)
In-Reply-To: <1370273816-19411-1-git-send-email-swarren@wwwdotorg.org>
On 06/03/2013 09:36 AM, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
>
> Previously, the #line parsing regex ended with ({WS}+[0-9]+)?. The {WS}
> could match line-break characters. If the #line directive did not contain
> the optional flags field at the end, this could cause any integer data on
> the next line to be consumed as part of the #line directive parsing. This
> could cause syntax errors (i.e. #line parsing consuming the leading 0
> from a hex literal 0x1234, leaving x1234 to be parsed as cell data,
> which is a syntax error), or invalid compilation results (i.e. simply
> consuming literal 1234 as part of the #line processing, thus removing it
> from the cell data).
>
> Fix this by replacing {WS} with [ \t] so that it can't match line-breaks.
>
> Convert all instances of {WS}, even though the other instances should be
> irrelevant for any well-formed #line directive. This is done for
> consistency and ultimate safety.
>
> This is a port of upstream dtc commit a1ee6f0 (with same subject) to the
> kernel's copy of dtc.
Rob, Grant, does this look OK to apply for v3.10-rc*?
next prev parent reply other threads:[~2013-06-05 16:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-03 15:36 [PATCH] dtc: ensure #line directives don't consume data from the next line Stephen Warren
2013-06-03 16:02 ` Ian Campbell
2013-06-05 16:50 ` Stephen Warren [this message]
2013-06-14 22:01 ` Grant Likely
-- strict thread matches above, loose matches on Subject: below --
2013-05-31 17:14 [PATCH] dtc: Ensure " Stephen Warren
2013-05-31 17:38 ` Andreas Schwab
2013-05-31 17:42 ` Stephen Warren
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=51AF6C3A.5020609@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=Ian.Campbell@citrix.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@linaro.org \
--cc=jdl@jdl.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mmarek@suse.cz \
--cc=rob.herring@calxeda.com \
--cc=swarren@nvidia.com \
/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