* [dpdk-dev] [PATCH] check-experimental-syms.sh: prevent symbol matches on substrings
@ 2018-10-10 14:29 Neil Horman
2018-10-10 14:43 ` Thomas Monjalon
0 siblings, 1 reply; 4+ messages in thread
From: Neil Horman @ 2018-10-10 14:29 UTC (permalink / raw)
To: dev; +Cc: Neil Horman, Thomas Monjalon, Ferruh Yigit
Thomas attempted to submit this:
https://patches.dpdk.org/patch/46311/
The other day, because the other patches being submitted with it were
breaking on a false positive from the check-experimental-syms check.
The problem was that the experimental symbol check script matched on the
regexs "\.text.*$SYM" and "\.text\.experimental.*$SYM" which allows for
substring matches, and librte_ethdev recently introduced symbols that
are leading substrings of one another (e.g. symbol foo is a substring of
symbol foobar), and so we would match on symbols when we shouldn't
Instead of dropping the check, fix this properly by matching
additionally on the end of line so that symbols are an exact match.
Confirmed to build properly on Thomas' submitted patch set with the
experimental check patch reverted (so that the checking actually
happens)
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: Thomas Monjalon <thomas@monjalon.net>
CC: Ferruh Yigit <ferruh.yigit@intel.com>
---
buildtools/check-experimental-syms.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/buildtools/check-experimental-syms.sh b/buildtools/check-experimental-syms.sh
index 5bc8cda17..d0915102d 100755
--- a/buildtools/check-experimental-syms.sh
+++ b/buildtools/check-experimental-syms.sh
@@ -16,9 +16,9 @@ for i in `awk 'BEGIN {found=0}
/.*;/ {if (found == 1) print $1}' $MAPFILE`
do
SYM=`echo $i | sed -e"s/;//"`
- objdump -t $OBJFILE | grep -q "\.text.*$SYM"
+ objdump -t $OBJFILE | grep -q "\.text.*$SYM$"
IN_TEXT=$?
- objdump -t $OBJFILE | grep -q "\.text\.experimental.*$SYM"
+ objdump -t $OBJFILE | grep -q "\.text\.experimental.*$SYM$"
IN_EXP=$?
if [ $IN_TEXT -eq 0 -a $IN_EXP -ne 0 ]
then
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] check-experimental-syms.sh: prevent symbol matches on substrings
2018-10-10 14:29 [dpdk-dev] [PATCH] check-experimental-syms.sh: prevent symbol matches on substrings Neil Horman
@ 2018-10-10 14:43 ` Thomas Monjalon
2018-10-10 20:19 ` Neil Horman
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Monjalon @ 2018-10-10 14:43 UTC (permalink / raw)
To: Neil Horman; +Cc: dev, Ferruh Yigit
10/10/2018 16:29, Neil Horman:
> Thomas attempted to submit this:
> https://patches.dpdk.org/patch/46311/
>
> The other day, because the other patches being submitted with it were
> breaking on a false positive from the check-experimental-syms check.
>
> The problem was that the experimental symbol check script matched on the
> regexs "\.text.*$SYM" and "\.text\.experimental.*$SYM" which allows for
> substring matches, and librte_ethdev recently introduced symbols that
> are leading substrings of one another (e.g. symbol foo is a substring of
> symbol foobar), and so we would match on symbols when we shouldn't
>
> Instead of dropping the check, fix this properly by matching
> additionally on the end of line so that symbols are an exact match.
>
> Confirmed to build properly on Thomas' submitted patch set with the
> experimental check patch reverted (so that the checking actually
> happens)
That's great Neil!
I would like to push it now.
May I suggest to remove the details of how I (baldly) reported it?
I suggest this text:
"
The experimental symbol check script matched on the regexes
"\.text.*$SYM" and "\.text\.experimental.*$SYM" which allows for
substring matches.
If a symbol is leading substring of another one (e.g. symbol foo
is a substring of symbol foobar), it would match on symbols
when it shouldn't.
It is fixed by matching additionally on the end of line
so that symbols are an exact match.
"
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] check-experimental-syms.sh: prevent symbol matches on substrings
2018-10-10 14:43 ` Thomas Monjalon
@ 2018-10-10 20:19 ` Neil Horman
2018-10-11 11:59 ` Thomas Monjalon
0 siblings, 1 reply; 4+ messages in thread
From: Neil Horman @ 2018-10-10 20:19 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev, Ferruh Yigit
On Wed, Oct 10, 2018 at 04:43:14PM +0200, Thomas Monjalon wrote:
> 10/10/2018 16:29, Neil Horman:
> > Thomas attempted to submit this:
> > https://patches.dpdk.org/patch/46311/
> >
> > The other day, because the other patches being submitted with it were
> > breaking on a false positive from the check-experimental-syms check.
> >
> > The problem was that the experimental symbol check script matched on the
> > regexs "\.text.*$SYM" and "\.text\.experimental.*$SYM" which allows for
> > substring matches, and librte_ethdev recently introduced symbols that
> > are leading substrings of one another (e.g. symbol foo is a substring of
> > symbol foobar), and so we would match on symbols when we shouldn't
> >
> > Instead of dropping the check, fix this properly by matching
> > additionally on the end of line so that symbols are an exact match.
> >
> > Confirmed to build properly on Thomas' submitted patch set with the
> > experimental check patch reverted (so that the checking actually
> > happens)
>
> That's great Neil!
> I would like to push it now.
> May I suggest to remove the details of how I (baldly) reported it?
>
> I suggest this text:
> "
> The experimental symbol check script matched on the regexes
> "\.text.*$SYM" and "\.text\.experimental.*$SYM" which allows for
> substring matches.
> If a symbol is leading substring of another one (e.g. symbol foo
> is a substring of symbol foobar), it would match on symbols
> when it shouldn't.
>
> It is fixed by matching additionally on the end of line
> so that symbols are an exact match.
> "
Sure, if you want to make that change on commit, I'm ok with it.
Neil
>
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] check-experimental-syms.sh: prevent symbol matches on substrings
2018-10-10 20:19 ` Neil Horman
@ 2018-10-11 11:59 ` Thomas Monjalon
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2018-10-11 11:59 UTC (permalink / raw)
To: Neil Horman; +Cc: dev, Ferruh Yigit
10/10/2018 22:19, Neil Horman:
> On Wed, Oct 10, 2018 at 04:43:14PM +0200, Thomas Monjalon wrote:
> > 10/10/2018 16:29, Neil Horman:
> > > Thomas attempted to submit this:
> > > https://patches.dpdk.org/patch/46311/
> > >
> > > The other day, because the other patches being submitted with it were
> > > breaking on a false positive from the check-experimental-syms check.
> > >
> > > The problem was that the experimental symbol check script matched on the
> > > regexs "\.text.*$SYM" and "\.text\.experimental.*$SYM" which allows for
> > > substring matches, and librte_ethdev recently introduced symbols that
> > > are leading substrings of one another (e.g. symbol foo is a substring of
> > > symbol foobar), and so we would match on symbols when we shouldn't
> > >
> > > Instead of dropping the check, fix this properly by matching
> > > additionally on the end of line so that symbols are an exact match.
> > >
> > > Confirmed to build properly on Thomas' submitted patch set with the
> > > experimental check patch reverted (so that the checking actually
> > > happens)
> >
> > That's great Neil!
> > I would like to push it now.
> > May I suggest to remove the details of how I (baldly) reported it?
> >
> > I suggest this text:
> > "
> > The experimental symbol check script matched on the regexes
> > "\.text.*$SYM" and "\.text\.experimental.*$SYM" which allows for
> > substring matches.
> > If a symbol is leading substring of another one (e.g. symbol foo
> > is a substring of symbol foobar), it would match on symbols
> > when it shouldn't.
> >
> > It is fixed by matching additionally on the end of line
> > so that symbols are an exact match.
> > "
> Sure, if you want to make that change on commit, I'm ok with it.
Applied, thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-10-11 12:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-10 14:29 [dpdk-dev] [PATCH] check-experimental-syms.sh: prevent symbol matches on substrings Neil Horman
2018-10-10 14:43 ` Thomas Monjalon
2018-10-10 20:19 ` Neil Horman
2018-10-11 11:59 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).