All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Loeliger <jdl@jdl.com>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: David Gibson <david@gibson.dropbear.id.au>,
	devicetree-discuss@lists.ozlabs.org,
	linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	mmarek@suse.cz, rob.herring@calxeda.com,
	grant.likely@secretlab.ca, linux-kbuild@vger.kernel.org,
	Stephen Warren <swarren@nvidia.com>
Subject: Re: [PATCH V2] dtc: ensure #line directives don't consume data from the next line
Date: Mon, 03 Jun 2013 08:32:54 -0500	[thread overview]
Message-ID: <E1UjUsY-0008Td-Bj@jdl.com> (raw)
In-Reply-To: <1370025184-23808-1-git-send-email-swarren@wwwdotorg.org>

> 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.
> 
> Reported-by: Ian Campbell <Ian.Campbell@citrix.com>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
> v2: Convert all instances of {WS} in the regex.

Applied.

Thanks!

jdl

WARNING: multiple messages have this Message-ID (diff)
From: Jon Loeliger <jdl@jdl.com>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: mmarek@suse.cz, Stephen Warren <swarren@nvidia.com>,
	linux-kbuild@vger.kernel.org,
	devicetree-discuss@lists.ozlabs.org,
	linux-kernel@vger.kernel.org, rob.herring@calxeda.com,
	linuxppc-dev@lists.ozlabs.org,
	David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [PATCH V2] dtc: ensure #line directives don't consume data from the next line
Date: Mon, 03 Jun 2013 08:32:54 -0500	[thread overview]
Message-ID: <E1UjUsY-0008Td-Bj@jdl.com> (raw)
In-Reply-To: <1370025184-23808-1-git-send-email-swarren@wwwdotorg.org>

> 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.
> 
> Reported-by: Ian Campbell <Ian.Campbell@citrix.com>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
> v2: Convert all instances of {WS} in the regex.

Applied.

Thanks!

jdl

  parent reply	other threads:[~2013-06-03 13:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-31 18:33 [PATCH V2] dtc: ensure #line directives don't consume data from the next line Stephen Warren
2013-05-31 18:33 ` Stephen Warren
2013-06-01  5:30 ` David Gibson
2013-06-01  5:30   ` David Gibson
2013-06-03 13:32 ` Jon Loeliger [this message]
2013-06-03 13:32   ` Jon Loeliger

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=E1UjUsY-0008Td-Bj@jdl.com \
    --to=jdl@jdl.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --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 \
    --cc=swarren@wwwdotorg.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.