* [PATCH] selftests/bpf: Fix incorrect parameters in NULL pointer checking
@ 2024-08-20 2:36 Hao Ge
2024-08-20 2:47 ` Hao Ge
2024-08-28 16:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 10+ messages in thread
From: Hao Ge @ 2024-08-20 2:36 UTC (permalink / raw)
To: ast, daniel, andrii, martin.lau, eddyz87, song, yonghong.song,
john.fastabend, kpsingh, sdf, haoluo, jolsa, mykolal, shuah
Cc: bpf, linux-kselftest, linux-kernel, hao.ge, Hao Ge, Dan Carpenter
From: Hao Ge <gehao@kylinos.cn>
Smatch reported the following warning:
./tools/testing/selftests/bpf/testing_helpers.c:455 get_xlated_program()
warn: variable dereferenced before check 'buf' (see line 454)
It seems correct,so let's modify it based on it's suggestion.
Actually,commit b23ed4d74c4d ("selftests/bpf: Fix invalid pointer
check in get_xlated_program()") fixed an issue in the test_verifier.c
once,but it was reverted this time.
Let's solve this issue with the minimal changes possible.
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/1eb3732f-605a-479d-ba64-cd14250cbf91@stanley.mountain/
Fixes: b4b7a4099b8c ("selftests/bpf: Factor out get_xlated_program() helper")
Signed-off-by: Hao Ge <gehao@kylinos.cn>
---
tools/testing/selftests/bpf/testing_helpers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/testing_helpers.c b/tools/testing/selftests/bpf/testing_helpers.c
index d5379a0e6da8..34dfea295c8e 100644
--- a/tools/testing/selftests/bpf/testing_helpers.c
+++ b/tools/testing/selftests/bpf/testing_helpers.c
@@ -451,7 +451,7 @@ int get_xlated_program(int fd_prog, struct bpf_insn **buf, __u32 *cnt)
*cnt = xlated_prog_len / buf_element_size;
*buf = calloc(*cnt, buf_element_size);
- if (!buf) {
+ if (!*buf) {
perror("can't allocate xlated program buffer");
return -ENOMEM;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH] selftests/bpf: Fix incorrect parameters in NULL pointer checking
2024-08-20 2:36 [PATCH] selftests/bpf: Fix incorrect parameters in NULL pointer checking Hao Ge
@ 2024-08-20 2:47 ` Hao Ge
2024-08-28 16:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 10+ messages in thread
From: Hao Ge @ 2024-08-20 2:47 UTC (permalink / raw)
To: ast, daniel, andrii, martin.lau, eddyz87, song, yonghong.song,
john.fastabend, kpsingh, sdf, haoluo, jolsa, mykolal, shuah
Cc: bpf, linux-kselftest, linux-kernel, Hao Ge, Dan Carpenter
Hi
I apologize for the confusion.
I mistakenly thought that my previous email
(https://lore.kernel.org/all/20240820023447.29002-1-hao.ge@linux.dev/)
didn't send due to network issues on my computer, so I resent it.
However, it seems that was not the case.
Please kindly disregard this patch as it is identical to the previous one.
I sincerely apologize for wasting everyone's time
On 8/20/24 10:36, Hao Ge wrote:
> From: Hao Ge <gehao@kylinos.cn>
>
> Smatch reported the following warning:
> ./tools/testing/selftests/bpf/testing_helpers.c:455 get_xlated_program()
> warn: variable dereferenced before check 'buf' (see line 454)
>
> It seems correct,so let's modify it based on it's suggestion.
>
> Actually,commit b23ed4d74c4d ("selftests/bpf: Fix invalid pointer
> check in get_xlated_program()") fixed an issue in the test_verifier.c
> once,but it was reverted this time.
>
> Let's solve this issue with the minimal changes possible.
>
> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> Closes: https://lore.kernel.org/all/1eb3732f-605a-479d-ba64-cd14250cbf91@stanley.mountain/
> Fixes: b4b7a4099b8c ("selftests/bpf: Factor out get_xlated_program() helper")
> Signed-off-by: Hao Ge <gehao@kylinos.cn>
> ---
> tools/testing/selftests/bpf/testing_helpers.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/bpf/testing_helpers.c b/tools/testing/selftests/bpf/testing_helpers.c
> index d5379a0e6da8..34dfea295c8e 100644
> --- a/tools/testing/selftests/bpf/testing_helpers.c
> +++ b/tools/testing/selftests/bpf/testing_helpers.c
> @@ -451,7 +451,7 @@ int get_xlated_program(int fd_prog, struct bpf_insn **buf, __u32 *cnt)
>
> *cnt = xlated_prog_len / buf_element_size;
> *buf = calloc(*cnt, buf_element_size);
> - if (!buf) {
> + if (!*buf) {
> perror("can't allocate xlated program buffer");
> return -ENOMEM;
> }
Thanks
Best regards
Hao
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH] selftests/bpf: Fix incorrect parameters in NULL pointer checking
2024-08-20 2:36 [PATCH] selftests/bpf: Fix incorrect parameters in NULL pointer checking Hao Ge
2024-08-20 2:47 ` Hao Ge
@ 2024-08-28 16:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 10+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-08-28 16:00 UTC (permalink / raw)
To: Hao Ge
Cc: ast, daniel, andrii, martin.lau, eddyz87, song, yonghong.song,
john.fastabend, kpsingh, sdf, haoluo, jolsa, mykolal, shuah, bpf,
linux-kselftest, linux-kernel, gehao, dan.carpenter
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:
On Tue, 20 Aug 2024 10:36:22 +0800 you wrote:
> From: Hao Ge <gehao@kylinos.cn>
>
> Smatch reported the following warning:
> ./tools/testing/selftests/bpf/testing_helpers.c:455 get_xlated_program()
> warn: variable dereferenced before check 'buf' (see line 454)
>
> It seems correct,so let's modify it based on it's suggestion.
>
> [...]
Here is the summary with links:
- selftests/bpf: Fix incorrect parameters in NULL pointer checking
https://git.kernel.org/bpf/bpf-next/c/c264487e5410
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] selftests/bpf: Fix incorrect parameters in NULL pointer checking
@ 2024-08-20 2:34 Hao Ge
2024-08-21 21:03 ` Yonghong Song
0 siblings, 1 reply; 10+ messages in thread
From: Hao Ge @ 2024-08-20 2:34 UTC (permalink / raw)
To: ast, daniel, andrii, martin.lau, eddyz87, song, yonghong.song,
john.fastabend, kpsingh, sdf, haoluo, jolsa, mykolal, shuah
Cc: bpf, linux-kselftest, linux-kernel, Hao Ge, Dan Carpenter
From: Hao Ge <gehao@kylinos.cn>
Smatch reported the following warning:
./tools/testing/selftests/bpf/testing_helpers.c:455 get_xlated_program()
warn: variable dereferenced before check 'buf' (see line 454)
It seems correct,so let's modify it based on it's suggestion.
Actually,commit b23ed4d74c4d ("selftests/bpf: Fix invalid pointer
check in get_xlated_program()") fixed an issue in the test_verifier.c
once,but it was reverted this time.
Let's solve this issue with the minimal changes possible.
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/1eb3732f-605a-479d-ba64-cd14250cbf91@stanley.mountain/
Fixes: b4b7a4099b8c ("selftests/bpf: Factor out get_xlated_program() helper")
Signed-off-by: Hao Ge <gehao@kylinos.cn>
---
tools/testing/selftests/bpf/testing_helpers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/testing_helpers.c b/tools/testing/selftests/bpf/testing_helpers.c
index d5379a0e6da8..34dfea295c8e 100644
--- a/tools/testing/selftests/bpf/testing_helpers.c
+++ b/tools/testing/selftests/bpf/testing_helpers.c
@@ -451,7 +451,7 @@ int get_xlated_program(int fd_prog, struct bpf_insn **buf, __u32 *cnt)
*cnt = xlated_prog_len / buf_element_size;
*buf = calloc(*cnt, buf_element_size);
- if (!buf) {
+ if (!*buf) {
perror("can't allocate xlated program buffer");
return -ENOMEM;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH] selftests/bpf: Fix incorrect parameters in NULL pointer checking
2024-08-20 2:34 Hao Ge
@ 2024-08-21 21:03 ` Yonghong Song
2024-08-21 21:50 ` Dan Carpenter
2024-08-23 7:04 ` Hao Ge
0 siblings, 2 replies; 10+ messages in thread
From: Yonghong Song @ 2024-08-21 21:03 UTC (permalink / raw)
To: Hao Ge, ast, daniel, andrii, martin.lau, eddyz87, song,
john.fastabend, kpsingh, sdf, haoluo, jolsa, mykolal, shuah
Cc: bpf, linux-kselftest, linux-kernel, Hao Ge, Dan Carpenter
On 8/19/24 7:34 PM, Hao Ge wrote:
> From: Hao Ge <gehao@kylinos.cn>
>
> Smatch reported the following warning:
> ./tools/testing/selftests/bpf/testing_helpers.c:455 get_xlated_program()
> warn: variable dereferenced before check 'buf' (see line 454)
>
> It seems correct,so let's modify it based on it's suggestion.
>
> Actually,commit b23ed4d74c4d ("selftests/bpf: Fix invalid pointer
> check in get_xlated_program()") fixed an issue in the test_verifier.c
> once,but it was reverted this time.
>
> Let's solve this issue with the minimal changes possible.
>
> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> Closes: https://lore.kernel.org/all/1eb3732f-605a-479d-ba64-cd14250cbf91@stanley.mountain/
> Fixes: b4b7a4099b8c ("selftests/bpf: Factor out get_xlated_program() helper")
> Signed-off-by: Hao Ge <gehao@kylinos.cn>
In the future, please change subject '[PATCH] ...' to '[PATCH bpf-next] ...'
so CI can properly test it.
Acked-by: Yonghong Song <yonghong.song@linux.dev>
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH] selftests/bpf: Fix incorrect parameters in NULL pointer checking
2024-08-21 21:03 ` Yonghong Song
@ 2024-08-21 21:50 ` Dan Carpenter
2024-08-21 22:07 ` Alexei Starovoitov
2024-08-23 7:04 ` Hao Ge
1 sibling, 1 reply; 10+ messages in thread
From: Dan Carpenter @ 2024-08-21 21:50 UTC (permalink / raw)
To: Yonghong Song
Cc: Hao Ge, ast, daniel, andrii, martin.lau, eddyz87, song,
john.fastabend, kpsingh, sdf, haoluo, jolsa, mykolal, shuah, bpf,
linux-kselftest, linux-kernel, Hao Ge
On Wed, Aug 21, 2024 at 02:03:17PM -0700, Yonghong Song wrote:
>
> On 8/19/24 7:34 PM, Hao Ge wrote:
> > From: Hao Ge <gehao@kylinos.cn>
> >
> > Smatch reported the following warning:
> > ./tools/testing/selftests/bpf/testing_helpers.c:455 get_xlated_program()
> > warn: variable dereferenced before check 'buf' (see line 454)
> >
> > It seems correct,so let's modify it based on it's suggestion.
> >
> > Actually,commit b23ed4d74c4d ("selftests/bpf: Fix invalid pointer
> > check in get_xlated_program()") fixed an issue in the test_verifier.c
> > once,but it was reverted this time.
> >
> > Let's solve this issue with the minimal changes possible.
> >
> > Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> > Closes: https://lore.kernel.org/all/1eb3732f-605a-479d-ba64-cd14250cbf91@stanley.mountain/
> > Fixes: b4b7a4099b8c ("selftests/bpf: Factor out get_xlated_program() helper")
> > Signed-off-by: Hao Ge <gehao@kylinos.cn>
>
> In the future, please change subject '[PATCH] ...' to '[PATCH bpf-next] ...'
> so CI can properly test it.
It feels like there should be a technical solution to this. The CI system is
something on AWS and it's too expensive to just check every patch that's sent to
the bpf list? My understanding is that there are only two bpf trees.
if [ "$FIXES_HASH" == "" ] ; then
TREE=next
elif git merge-base --is-ancestor $FIXES_HASH origin/master ; then
TREE=linus
else
TREE=next
fi
These days the zero day bot people are checking around a thousand git trees.
They pull emails off the various lists and apply them to the right places. It's
a doable thing.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH] selftests/bpf: Fix incorrect parameters in NULL pointer checking
2024-08-21 21:50 ` Dan Carpenter
@ 2024-08-21 22:07 ` Alexei Starovoitov
2024-08-21 22:31 ` Dan Carpenter
0 siblings, 1 reply; 10+ messages in thread
From: Alexei Starovoitov @ 2024-08-21 22:07 UTC (permalink / raw)
To: Dan Carpenter
Cc: Yonghong Song, Hao Ge, Alexei Starovoitov, Daniel Borkmann,
Andrii Nakryiko, Martin KaFai Lau, Eddy Z, Song Liu,
John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
Mykola Lysenko, Shuah Khan, bpf,
open list:KERNEL SELFTEST FRAMEWORK, LKML, Hao Ge
On Wed, Aug 21, 2024 at 2:50 PM Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> On Wed, Aug 21, 2024 at 02:03:17PM -0700, Yonghong Song wrote:
> >
> > On 8/19/24 7:34 PM, Hao Ge wrote:
> > > From: Hao Ge <gehao@kylinos.cn>
> > >
> > > Smatch reported the following warning:
> > > ./tools/testing/selftests/bpf/testing_helpers.c:455 get_xlated_program()
> > > warn: variable dereferenced before check 'buf' (see line 454)
> > >
> > > It seems correct,so let's modify it based on it's suggestion.
> > >
> > > Actually,commit b23ed4d74c4d ("selftests/bpf: Fix invalid pointer
> > > check in get_xlated_program()") fixed an issue in the test_verifier.c
> > > once,but it was reverted this time.
> > >
> > > Let's solve this issue with the minimal changes possible.
> > >
> > > Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> > > Closes: https://lore.kernel.org/all/1eb3732f-605a-479d-ba64-cd14250cbf91@stanley.mountain/
> > > Fixes: b4b7a4099b8c ("selftests/bpf: Factor out get_xlated_program() helper")
> > > Signed-off-by: Hao Ge <gehao@kylinos.cn>
> >
> > In the future, please change subject '[PATCH] ...' to '[PATCH bpf-next] ...'
> > so CI can properly test it.
>
> It feels like there should be a technical solution to this. The CI system is
> something on AWS and it's too expensive to just check every patch that's sent to
> the bpf list? My understanding is that there are only two bpf trees.
>
> if [ "$FIXES_HASH" == "" ] ; then
> TREE=next
> elif git merge-base --is-ancestor $FIXES_HASH origin/master ; then
> TREE=linus
> else
> TREE=next
> fi
>
> These days the zero day bot people are checking around a thousand git trees.
> They pull emails off the various lists and apply them to the right places. It's
> a doable thing.
Dan,
Various people pointed out that you need to use the proper subject in
the patches.
You clearly knew that rule and yet you ignored it,
and worse still you keep coming up with these excuses.
Don't be surprised that people who are supposed to review your patches
will take a long time to reply or "forget" about them as you "forget"
about patch submission rules.
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH] selftests/bpf: Fix incorrect parameters in NULL pointer checking
2024-08-21 22:07 ` Alexei Starovoitov
@ 2024-08-21 22:31 ` Dan Carpenter
2024-08-23 7:12 ` Hao Ge
0 siblings, 1 reply; 10+ messages in thread
From: Dan Carpenter @ 2024-08-21 22:31 UTC (permalink / raw)
To: Alexei Starovoitov
Cc: Yonghong Song, Hao Ge, Alexei Starovoitov, Daniel Borkmann,
Andrii Nakryiko, Martin KaFai Lau, Eddy Z, Song Liu,
John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
Mykola Lysenko, Shuah Khan, bpf,
open list:KERNEL SELFTEST FRAMEWORK, LKML, Hao Ge
On Wed, Aug 21, 2024 at 03:07:27PM -0700, Alexei Starovoitov wrote:
> On Wed, Aug 21, 2024 at 2:50 PM Dan Carpenter <dan.carpenter@linaro.org> wrote:
> >
> > On Wed, Aug 21, 2024 at 02:03:17PM -0700, Yonghong Song wrote:
> > >
> > > On 8/19/24 7:34 PM, Hao Ge wrote:
> > > > From: Hao Ge <gehao@kylinos.cn>
> > > >
> > > > Smatch reported the following warning:
> > > > ./tools/testing/selftests/bpf/testing_helpers.c:455 get_xlated_program()
> > > > warn: variable dereferenced before check 'buf' (see line 454)
> > > >
> > > > It seems correct,so let's modify it based on it's suggestion.
> > > >
> > > > Actually,commit b23ed4d74c4d ("selftests/bpf: Fix invalid pointer
> > > > check in get_xlated_program()") fixed an issue in the test_verifier.c
> > > > once,but it was reverted this time.
> > > >
> > > > Let's solve this issue with the minimal changes possible.
> > > >
> > > > Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> > > > Closes: https://lore.kernel.org/all/1eb3732f-605a-479d-ba64-cd14250cbf91@stanley.mountain/
> > > > Fixes: b4b7a4099b8c ("selftests/bpf: Factor out get_xlated_program() helper")
> > > > Signed-off-by: Hao Ge <gehao@kylinos.cn>
> > >
> > > In the future, please change subject '[PATCH] ...' to '[PATCH bpf-next] ...'
> > > so CI can properly test it.
> >
> > It feels like there should be a technical solution to this. The CI system is
> > something on AWS and it's too expensive to just check every patch that's sent to
> > the bpf list? My understanding is that there are only two bpf trees.
> >
> > if [ "$FIXES_HASH" == "" ] ; then
> > TREE=next
> > elif git merge-base --is-ancestor $FIXES_HASH origin/master ; then
> > TREE=linus
> > else
> > TREE=next
> > fi
> >
> > These days the zero day bot people are checking around a thousand git trees.
> > They pull emails off the various lists and apply them to the right places. It's
> > a doable thing.
>
> Dan,
>
> Various people pointed out that you need to use the proper subject in
> the patches.
> You clearly knew that rule and yet you ignored it,
> and worse still you keep coming up with these excuses.
> Don't be surprised that people who are supposed to review your patches
> will take a long time to reply or "forget" about them as you "forget"
> about patch submission rules.
You're emailing the wrong person. This isn't my patch. I don't send BPF
patches.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH] selftests/bpf: Fix incorrect parameters in NULL pointer checking
2024-08-21 22:31 ` Dan Carpenter
@ 2024-08-23 7:12 ` Hao Ge
0 siblings, 0 replies; 10+ messages in thread
From: Hao Ge @ 2024-08-23 7:12 UTC (permalink / raw)
To: Dan Carpenter, Alexei Starovoitov
Cc: Yonghong Song, Alexei Starovoitov, Daniel Borkmann,
Andrii Nakryiko, Martin KaFai Lau, Eddy Z, Song Liu,
John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
Mykola Lysenko, Shuah Khan, bpf,
open list:KERNEL SELFTEST FRAMEWORK, LKML, Hao Ge
Hi Dan and Alexei
I apologize for any inconvenience my mistake may have caused to both of you.
On 8/22/24 06:31, Dan Carpenter wrote:
> On Wed, Aug 21, 2024 at 03:07:27PM -0700, Alexei Starovoitov wrote:
>> On Wed, Aug 21, 2024 at 2:50 PM Dan Carpenter <dan.carpenter@linaro.org> wrote:
>>> On Wed, Aug 21, 2024 at 02:03:17PM -0700, Yonghong Song wrote:
>>>> On 8/19/24 7:34 PM, Hao Ge wrote:
>>>>> From: Hao Ge <gehao@kylinos.cn>
>>>>>
>>>>> Smatch reported the following warning:
>>>>> ./tools/testing/selftests/bpf/testing_helpers.c:455 get_xlated_program()
>>>>> warn: variable dereferenced before check 'buf' (see line 454)
>>>>>
>>>>> It seems correct,so let's modify it based on it's suggestion.
>>>>>
>>>>> Actually,commit b23ed4d74c4d ("selftests/bpf: Fix invalid pointer
>>>>> check in get_xlated_program()") fixed an issue in the test_verifier.c
>>>>> once,but it was reverted this time.
>>>>>
>>>>> Let's solve this issue with the minimal changes possible.
>>>>>
>>>>> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
>>>>> Closes: https://lore.kernel.org/all/1eb3732f-605a-479d-ba64-cd14250cbf91@stanley.mountain/
>>>>> Fixes: b4b7a4099b8c ("selftests/bpf: Factor out get_xlated_program() helper")
>>>>> Signed-off-by: Hao Ge <gehao@kylinos.cn>
>>>> In the future, please change subject '[PATCH] ...' to '[PATCH bpf-next] ...'
>>>> so CI can properly test it.
>>> It feels like there should be a technical solution to this. The CI system is
>>> something on AWS and it's too expensive to just check every patch that's sent to
>>> the bpf list? My understanding is that there are only two bpf trees.
>>>
>>> if [ "$FIXES_HASH" == "" ] ; then
>>> TREE=next
>>> elif git merge-base --is-ancestor $FIXES_HASH origin/master ; then
>>> TREE=linus
>>> else
>>> TREE=next
>>> fi
>>>
>>> These days the zero day bot people are checking around a thousand git trees.
>>> They pull emails off the various lists and apply them to the right places. It's
>>> a doable thing.
>> Dan,
>>
>> Various people pointed out that you need to use the proper subject in
>> the patches.
>> You clearly knew that rule and yet you ignored it,
>> and worse still you keep coming up with these excuses.
>> Don't be surprised that people who are supposed to review your patches
>> will take a long time to reply or "forget" about them as you "forget"
>> about patch submission rules.
Perhaps it was referring to me? Regardless, I will reflect on myself and
make improvements.
> You're emailing the wrong person. This isn't my patch. I don't send BPF
> patches.
>
> regards,
> dan carpenter
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] selftests/bpf: Fix incorrect parameters in NULL pointer checking
2024-08-21 21:03 ` Yonghong Song
2024-08-21 21:50 ` Dan Carpenter
@ 2024-08-23 7:04 ` Hao Ge
1 sibling, 0 replies; 10+ messages in thread
From: Hao Ge @ 2024-08-23 7:04 UTC (permalink / raw)
To: Yonghong Song
Cc: bpf, linux-kselftest, linux-kernel, Hao Ge, Dan Carpenter, andrii,
martin.lau, eddyz87, song, john.fastabend, kpsingh, haoluo,
mykolal, shuah, jolsa, sdf, ast, daniel
Hi Yonghong
Thank you very much for taking the time to review my patch.
On 8/22/24 05:03, Yonghong Song wrote:
>
> On 8/19/24 7:34 PM, Hao Ge wrote:
>> From: Hao Ge <gehao@kylinos.cn>
>>
>> Smatch reported the following warning:
>> ./tools/testing/selftests/bpf/testing_helpers.c:455
>> get_xlated_program()
>> warn: variable dereferenced before check 'buf' (see line 454)
>>
>> It seems correct,so let's modify it based on it's suggestion.
>>
>> Actually,commit b23ed4d74c4d ("selftests/bpf: Fix invalid pointer
>> check in get_xlated_program()") fixed an issue in the test_verifier.c
>> once,but it was reverted this time.
>>
>> Let's solve this issue with the minimal changes possible.
>>
>> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
>> Closes:
>> https://lore.kernel.org/all/1eb3732f-605a-479d-ba64-cd14250cbf91@stanley.mountain/
>> Fixes: b4b7a4099b8c ("selftests/bpf: Factor out get_xlated_program()
>> helper")
>> Signed-off-by: Hao Ge <gehao@kylinos.cn>
>
> In the future, please change subject '[PATCH] ...' to '[PATCH
> bpf-next] ...'
> so CI can properly test it.
>
OK, I understand. I will follow this rule in the future.
> Acked-by: Yonghong Song <yonghong.song@linux.dev>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2024-08-28 16:00 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-20 2:36 [PATCH] selftests/bpf: Fix incorrect parameters in NULL pointer checking Hao Ge
2024-08-20 2:47 ` Hao Ge
2024-08-28 16:00 ` patchwork-bot+netdevbpf
-- strict thread matches above, loose matches on Subject: below --
2024-08-20 2:34 Hao Ge
2024-08-21 21:03 ` Yonghong Song
2024-08-21 21:50 ` Dan Carpenter
2024-08-21 22:07 ` Alexei Starovoitov
2024-08-21 22:31 ` Dan Carpenter
2024-08-23 7:12 ` Hao Ge
2024-08-23 7:04 ` Hao Ge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox