Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1385981 > unrolled thread

[PATCH 0/2] bfp tools: Couple Coverity fixes

Started byFlorian Fainelli <f.fainelli@gmail.com>
First post2016-04-25 04:40 +0200
Last post2016-04-27 16:30 +0200
Articles 11 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/2] bfp tools: Couple Coverity fixes Florian Fainelli <f.fainelli@gmail.com> - 2016-04-25 04:40 +0200
    [PATCH 1/2] bfp tools: Remove expression with no effect Florian Fainelli <f.fainelli@gmail.com> - 2016-04-25 04:40 +0200
      Re: [PATCH 1/2] bfp tools: Remove expression with no effect "Wangnan (F)" <wangnan0@huawei.com> - 2016-04-27 05:20 +0200
        Re: [PATCH 1/2] bfp tools: Remove expression with no effect Arnaldo Carvalho de Melo <acme@redhat.com> - 2016-04-27 16:40 +0200
    [PATCH 2/2] bfp tools: Fix syscall argument Florian Fainelli <f.fainelli@gmail.com> - 2016-04-25 04:40 +0200
      Re: [PATCH 2/2] bfp tools: Fix syscall argument "Wangnan (F)" <wangnan0@huawei.com> - 2016-04-27 05:10 +0200
        Re: [PATCH 2/2] bfp tools: Fix syscall argument Arnaldo Carvalho de Melo <acme@redhat.com> - 2016-04-27 16:40 +0200
    Re: [PATCH 0/2] bfp tools: Couple Coverity fixes Florian Fainelli <f.fainelli@gmail.com> - 2016-04-27 04:50 +0200
      Re: [PATCH 0/2] bfp tools: Couple Coverity fixes "Wangnan (F)" <wangnan0@huawei.com> - 2016-04-27 05:10 +0200
        Re: [PATCH 0/2] bfp tools: Couple Coverity fixes Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2016-04-27 05:10 +0200
          Re: [PATCH 0/2] bfp tools: Couple Coverity fixes Arnaldo Carvalho de Melo <acme@redhat.com> - 2016-04-27 16:30 +0200

#1385981 — [PATCH 0/2] bfp tools: Couple Coverity fixes

FromFlorian Fainelli <f.fainelli@gmail.com>
Date2016-04-25 04:40 +0200
Subject[PATCH 0/2] bfp tools: Couple Coverity fixes
Message-ID<rrEBk-6GB-15@gated-at.bofh.it>
Hi all,

Two trivial patches that were flagged by Coverity.

Thanks!

Florian Fainelli (2):
  bfp tools: Remove expression with no effect
  bfp tools: Fix syscall argument

 tools/build/feature/test-bpf.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

-- 
2.7.4

[toc] | [next] | [standalone]


#1385982 — [PATCH 1/2] bfp tools: Remove expression with no effect

FromFlorian Fainelli <f.fainelli@gmail.com>
Date2016-04-25 04:40 +0200
Subject[PATCH 1/2] bfp tools: Remove expression with no effect
Message-ID<rrEBk-6GB-17@gated-at.bofh.it>
In reply to#1385981
Assigning "attr" to "attr" does not have any effect, but was caught by
Coverity, so let's remove this.

Reported-by: coverity (CID 1354720)
Fixes: 1b76c13e4b36 ("bpf tools: Introduce 'bpf' library and add bpf feature check")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 tools/build/feature/test-bpf.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/build/feature/test-bpf.c b/tools/build/feature/test-bpf.c
index b389026839b9..8236df9a46ca 100644
--- a/tools/build/feature/test-bpf.c
+++ b/tools/build/feature/test-bpf.c
@@ -27,7 +27,6 @@ int main(void)
 	attr.log_level = 0;
 	attr.kern_version = 0;
 
-	attr = attr;
 	/*
 	 * Test existence of __NR_bpf and BPF_PROG_LOAD.
 	 * This call should fail if we run the testcase.
-- 
2.7.4

[toc] | [prev] | [next] | [standalone]


#1388623 — Re: [PATCH 1/2] bfp tools: Remove expression with no effect

From"Wangnan (F)" <wangnan0@huawei.com>
Date2016-04-27 05:20 +0200
SubjectRe: [PATCH 1/2] bfp tools: Remove expression with no effect
Message-ID<rsob7-2nW-5@gated-at.bofh.it>
In reply to#1385982

On 2016/4/25 10:34, Florian Fainelli wrote:
> Assigning "attr" to "attr" does not have any effect, but was caught by
> Coverity, so let's remove this.
>
> Reported-by: coverity (CID 1354720)
> Fixes: 1b76c13e4b36 ("bpf tools: Introduce 'bpf' library and add bpf feature check")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
>   tools/build/feature/test-bpf.c | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/tools/build/feature/test-bpf.c b/tools/build/feature/test-bpf.c
> index b389026839b9..8236df9a46ca 100644
> --- a/tools/build/feature/test-bpf.c
> +++ b/tools/build/feature/test-bpf.c
> @@ -27,7 +27,6 @@ int main(void)
>   	attr.log_level = 0;
>   	attr.kern_version = 0;
>   
> -	attr = attr;
>   	/*
>   	 * Test existence of __NR_bpf and BPF_PROG_LOAD.
>   	 * This call should fail if we run the testcase.

Tested-by: Wang Nan <wangnan0@huawei.com>

[toc] | [prev] | [next] | [standalone]


#1389134 — Re: [PATCH 1/2] bfp tools: Remove expression with no effect

FromArnaldo Carvalho de Melo <acme@redhat.com>
Date2016-04-27 16:40 +0200
SubjectRe: [PATCH 1/2] bfp tools: Remove expression with no effect
Message-ID<rsyNc-2L2-27@gated-at.bofh.it>
In reply to#1388623
Em Wed, Apr 27, 2016 at 11:11:26AM +0800, Wangnan (F) escreveu:
> 
> 
> On 2016/4/25 10:34, Florian Fainelli wrote:
> >Assigning "attr" to "attr" does not have any effect, but was caught by
> >Coverity, so let's remove this.
> >
> >Reported-by: coverity (CID 1354720)
> >Fixes: 1b76c13e4b36 ("bpf tools: Introduce 'bpf' library and add bpf feature check")
> >Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> >---
> >  tools/build/feature/test-bpf.c | 1 -
> >  1 file changed, 1 deletion(-)
> >
> >diff --git a/tools/build/feature/test-bpf.c b/tools/build/feature/test-bpf.c
> >index b389026839b9..8236df9a46ca 100644
> >--- a/tools/build/feature/test-bpf.c
> >+++ b/tools/build/feature/test-bpf.c
> >@@ -27,7 +27,6 @@ int main(void)
> >  	attr.log_level = 0;
> >  	attr.kern_version = 0;
> >-	attr = attr;
> >  	/*
> >  	 * Test existence of __NR_bpf and BPF_PROG_LOAD.
> >  	 * This call should fail if we run the testcase.
> 
> Tested-by: Wang Nan <wangnan0@huawei.com>

Applied

[toc] | [prev] | [next] | [standalone]


#1385983 — [PATCH 2/2] bfp tools: Fix syscall argument

FromFlorian Fainelli <f.fainelli@gmail.com>
Date2016-04-25 04:40 +0200
Subject[PATCH 2/2] bfp tools: Fix syscall argument
Message-ID<rrEBk-6GB-19@gated-at.bofh.it>
In reply to#1385981
Coverity flagged this under CID 1354884 as a sizeof mismatch, it turns
out that the argument "attr" passed to syscall should have been a
pointer to attr in the first place.

Reported-by: coverity (CID 1354884)
Fixes: 8f9e05fb298f ("perf tools: Fix PowerPC native building")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 tools/build/feature/test-bpf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/build/feature/test-bpf.c b/tools/build/feature/test-bpf.c
index 8236df9a46ca..e04ab89a1013 100644
--- a/tools/build/feature/test-bpf.c
+++ b/tools/build/feature/test-bpf.c
@@ -31,5 +31,5 @@ int main(void)
 	 * Test existence of __NR_bpf and BPF_PROG_LOAD.
 	 * This call should fail if we run the testcase.
 	 */
-	return syscall(__NR_bpf, BPF_PROG_LOAD, attr, sizeof(attr));
+	return syscall(__NR_bpf, BPF_PROG_LOAD, &attr, sizeof(attr));
 }
-- 
2.7.4

[toc] | [prev] | [next] | [standalone]


#1388618 — Re: [PATCH 2/2] bfp tools: Fix syscall argument

From"Wangnan (F)" <wangnan0@huawei.com>
Date2016-04-27 05:10 +0200
SubjectRe: [PATCH 2/2] bfp tools: Fix syscall argument
Message-ID<rso1s-2jQ-3@gated-at.bofh.it>
In reply to#1385983

On 2016/4/25 10:34, Florian Fainelli wrote:
> Coverity flagged this under CID 1354884 as a sizeof mismatch, it turns
> out that the argument "attr" passed to syscall should have been a
> pointer to attr in the first place.
>
> Reported-by: coverity (CID 1354884)
> Fixes: 8f9e05fb298f ("perf tools: Fix PowerPC native building")
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
>   tools/build/feature/test-bpf.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/build/feature/test-bpf.c b/tools/build/feature/test-bpf.c
> index 8236df9a46ca..e04ab89a1013 100644
> --- a/tools/build/feature/test-bpf.c
> +++ b/tools/build/feature/test-bpf.c
> @@ -31,5 +31,5 @@ int main(void)
>   	 * Test existence of __NR_bpf and BPF_PROG_LOAD.
>   	 * This call should fail if we run the testcase.
>   	 */
> -	return syscall(__NR_bpf, BPF_PROG_LOAD, attr, sizeof(attr));
> +	return syscall(__NR_bpf, BPF_PROG_LOAD, &attr, sizeof(attr));
>   }
Acked-by: Wang Nan <wangnan0@huawei.com>

[toc] | [prev] | [next] | [standalone]


#1389147 — Re: [PATCH 2/2] bfp tools: Fix syscall argument

FromArnaldo Carvalho de Melo <acme@redhat.com>
Date2016-04-27 16:40 +0200
SubjectRe: [PATCH 2/2] bfp tools: Fix syscall argument
Message-ID<rsyNe-2L2-65@gated-at.bofh.it>
In reply to#1388618
Em Wed, Apr 27, 2016 at 11:01:43AM +0800, Wangnan (F) escreveu:
> On 2016/4/25 10:34, Florian Fainelli wrote:
> >-	return syscall(__NR_bpf, BPF_PROG_LOAD, attr, sizeof(attr));
> >+	return syscall(__NR_bpf, BPF_PROG_LOAD, &attr, sizeof(attr));
> >  }
> Acked-by: Wang Nan <wangnan0@huawei.com>

Applied, thanks.

- Arnaldo

[toc] | [prev] | [next] | [standalone]


#1388605

FromFlorian Fainelli <f.fainelli@gmail.com>
Date2016-04-27 04:50 +0200
Message-ID<rsnI5-1SP-1@gated-at.bofh.it>
In reply to#1385981
Le 24/04/2016 19:34, Florian Fainelli a écrit :
> Hi all,
> 
> Two trivial patches that were flagged by Coverity.
> 
> Thanks!

Ping! Did I send this to the correct mailing-list?
-- 
Florian

[toc] | [prev] | [next] | [standalone]


#1388617

From"Wangnan (F)" <wangnan0@huawei.com>
Date2016-04-27 05:10 +0200
Message-ID<rso1s-2jQ-1@gated-at.bofh.it>
In reply to#1388605

On 2016/4/27 10:46, Florian Fainelli wrote:
> Le 24/04/2016 19:34, Florian Fainelli a écrit :
>> Hi all,
>>
>> Two trivial patches that were flagged by Coverity.
>>
>> Thanks!
> Ping! Did I send this to the correct mailing-list?

Sorry for the late. You are on the right list :)

[toc] | [prev] | [next] | [standalone]


#1388621

FromAlexei Starovoitov <alexei.starovoitov@gmail.com>
Date2016-04-27 05:10 +0200
Message-ID<rso1s-2jQ-11@gated-at.bofh.it>
In reply to#1388617
On Wed, Apr 27, 2016 at 11:00:23AM +0800, Wangnan (F) wrote:
> 
> 
> On 2016/4/27 10:46, Florian Fainelli wrote:
> >Le 24/04/2016 19:34, Florian Fainelli a écrit :
> >>Hi all,
> >>
> >>Two trivial patches that were flagged by Coverity.
> >>
> >>Thanks!
> >Ping! Did I send this to the correct mailing-list?
> 
> Sorry for the late. You are on the right list :)

Arnaldo, please take a look. They look good to me.

[toc] | [prev] | [next] | [standalone]


#1389126

FromArnaldo Carvalho de Melo <acme@redhat.com>
Date2016-04-27 16:30 +0200
Message-ID<rsyDx-2GX-37@gated-at.bofh.it>
In reply to#1388621
Em Tue, Apr 26, 2016 at 08:08:18PM -0700, Alexei Starovoitov escreveu:
> On Wed, Apr 27, 2016 at 11:00:23AM +0800, Wangnan (F) wrote:
> > 
> > 
> > On 2016/4/27 10:46, Florian Fainelli wrote:
> > >Le 24/04/2016 19:34, Florian Fainelli a écrit :
> > >>Hi all,
> > >>
> > >>Two trivial patches that were flagged by Coverity.
> > >>
> > >>Thanks!
> > >Ping! Did I send this to the correct mailing-list?
> > 
> > Sorry for the late. You are on the right list :)
> 
> Arnaldo, please take a look. They look good to me.

Will do, just readying it a 30-patch long pull req to Ingo, will collect
those for the next one, with your Acked-by tags.

- Arnaldo

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web