* [PATCH] selftests/bpf: fix flexible_array.cocci warnings
@ 2022-01-22 9:25 Julia Lawall
2022-01-22 10:49 ` Kumar Kartikeya Dwivedi
0 siblings, 1 reply; 10+ messages in thread
From: Julia Lawall @ 2022-01-22 9:25 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1126 bytes --]
From: kernel test robot <lkp@intel.com>
Zero-length and one-element arrays are deprecated, see
Documentation/process/deprecated.rst
Flexible-array members should be used instead.
Generated by: scripts/coccinelle/misc/flexible_array.cocci
CC: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---
url: https://github.com/0day-ci/linux/commits/Kumar-Kartikeya-Dwivedi/Introduce-unstable-CT-lookup-helpers/20220115-004219
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
:::::: branch date: 8 days ago
:::::: commit date: 8 days ago
Since this is a test, I don't know if you want to change it.
test_run.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/bpf/test_run.c
+++ b/net/bpf/test_run.c
@@ -293,7 +293,7 @@ struct prog_test_fail2 {
struct prog_test_fail3 {
int len;
char arr1[2];
- char arr2[0];
+ char arr2[];
};
noinline void bpf_kfunc_call_test_pass_ctx(struct __sk_buff *skb)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] selftests/bpf: fix flexible_array.cocci warnings
2022-01-22 9:25 [PATCH] selftests/bpf: fix flexible_array.cocci warnings Julia Lawall
@ 2022-01-22 10:49 ` Kumar Kartikeya Dwivedi
2022-01-25 7:05 ` kernel test robot
0 siblings, 1 reply; 10+ messages in thread
From: Kumar Kartikeya Dwivedi @ 2022-01-22 10:49 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1643 bytes --]
On Sat, 22 Jan 2022 at 14:55, Julia Lawall <julia.lawall@inria.fr> wrote:
>
> From: kernel test robot <lkp@intel.com>
>
> Zero-length and one-element arrays are deprecated, see
> Documentation/process/deprecated.rst
> Flexible-array members should be used instead.
>
> Generated by: scripts/coccinelle/misc/flexible_array.cocci
>
> CC: Kumar Kartikeya Dwivedi <memxor@gmail.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
> ---
>
> url: https://github.com/0day-ci/linux/commits/Kumar-Kartikeya-Dwivedi/Introduce-unstable-CT-lookup-helpers/20220115-004219
> base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
> :::::: branch date: 8 days ago
> :::::: commit date: 8 days ago
>
> Since this is a test, I don't know if you want to change it.
We can definitely change it. It is just used for testing a type check
in the verifier. Please resend this to bpf(a)vger.kernel.org, with
[PATCH bpf-next] in subject, and use bpf: as prefix instead of
selftests/bpf:, and add a Fixes: tag for the commit in bpf-next
introducing it
Fixes: c1ff181ffabc ("selftests/bpf: Extend kfunc selftests")
>
> test_run.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/net/bpf/test_run.c
> +++ b/net/bpf/test_run.c
> @@ -293,7 +293,7 @@ struct prog_test_fail2 {
> struct prog_test_fail3 {
> int len;
> char arr1[2];
> - char arr2[0];
> + char arr2[];
> };
>
> noinline void bpf_kfunc_call_test_pass_ctx(struct __sk_buff *skb)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH bpf-next] bpf: fix flexible_array.cocci warnings
@ 2022-01-22 11:09 ` Julia Lawall
0 siblings, 0 replies; 10+ messages in thread
From: Julia Lawall @ 2022-01-22 11:09 UTC (permalink / raw)
To: bpf; +Cc: Kumar Kartikeya Dwivedi, kbuild-all
From: kernel test robot <lkp@intel.com>
Zero-length and one-element arrays are deprecated, see
Documentation/process/deprecated.rst
Flexible-array members should be used instead.
Generated by: scripts/coccinelle/misc/flexible_array.cocci
Fixes: c1ff181ffabc ("selftests/bpf: Extend kfunc selftests")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
CC: Kumar Kartikeya Dwivedi <memxor@gmail.com>
---
url: https://github.com/0day-ci/linux/commits/Kumar-Kartikeya-Dwivedi/Introduce-unstable-CT-lookup-helpers/20220115-004219
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
:::::: branch date: 8 days ago
:::::: commit date: 8 days ago
test_run.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/bpf/test_run.c
+++ b/net/bpf/test_run.c
@@ -293,7 +293,7 @@ struct prog_test_fail2 {
struct prog_test_fail3 {
int len;
char arr1[2];
- char arr2[0];
+ char arr2[];
};
noinline void bpf_kfunc_call_test_pass_ctx(struct __sk_buff *skb)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH bpf-next] bpf: fix flexible_array.cocci warnings
@ 2022-01-22 11:09 ` Julia Lawall
0 siblings, 0 replies; 10+ messages in thread
From: Julia Lawall @ 2022-01-22 11:09 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]
From: kernel test robot <lkp@intel.com>
Zero-length and one-element arrays are deprecated, see
Documentation/process/deprecated.rst
Flexible-array members should be used instead.
Generated by: scripts/coccinelle/misc/flexible_array.cocci
Fixes: c1ff181ffabc ("selftests/bpf: Extend kfunc selftests")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
CC: Kumar Kartikeya Dwivedi <memxor@gmail.com>
---
url: https://github.com/0day-ci/linux/commits/Kumar-Kartikeya-Dwivedi/Introduce-unstable-CT-lookup-helpers/20220115-004219
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
:::::: branch date: 8 days ago
:::::: commit date: 8 days ago
test_run.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/bpf/test_run.c
+++ b/net/bpf/test_run.c
@@ -293,7 +293,7 @@ struct prog_test_fail2 {
struct prog_test_fail3 {
int len;
char arr1[2];
- char arr2[0];
+ char arr2[];
};
noinline void bpf_kfunc_call_test_pass_ctx(struct __sk_buff *skb)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH bpf-next] bpf: fix flexible_array.cocci warnings
2022-01-22 11:09 ` Julia Lawall
@ 2022-01-24 16:24 ` Daniel Borkmann
-1 siblings, 0 replies; 10+ messages in thread
From: Daniel Borkmann @ 2022-01-24 16:24 UTC (permalink / raw)
To: Julia Lawall, bpf; +Cc: Kumar Kartikeya Dwivedi, kbuild-all
On 1/22/22 12:09 PM, Julia Lawall wrote:
> From: kernel test robot <lkp@intel.com>
>
> Zero-length and one-element arrays are deprecated, see
> Documentation/process/deprecated.rst
> Flexible-array members should be used instead.
>
> Generated by: scripts/coccinelle/misc/flexible_array.cocci
>
> Fixes: c1ff181ffabc ("selftests/bpf: Extend kfunc selftests")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
> CC: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Applied, thanks!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH bpf-next] bpf: fix flexible_array.cocci warnings
@ 2022-01-24 16:24 ` Daniel Borkmann
0 siblings, 0 replies; 10+ messages in thread
From: Daniel Borkmann @ 2022-01-24 16:24 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 597 bytes --]
On 1/22/22 12:09 PM, Julia Lawall wrote:
> From: kernel test robot <lkp@intel.com>
>
> Zero-length and one-element arrays are deprecated, see
> Documentation/process/deprecated.rst
> Flexible-array members should be used instead.
>
> Generated by: scripts/coccinelle/misc/flexible_array.cocci
>
> Fixes: c1ff181ffabc ("selftests/bpf: Extend kfunc selftests")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
> CC: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Applied, thanks!
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH bpf-next] bpf: fix flexible_array.cocci warnings
2022-01-22 10:49 ` Kumar Kartikeya Dwivedi
@ 2022-01-25 7:05 ` kernel test robot
0 siblings, 0 replies; 10+ messages in thread
From: kernel test robot @ 2022-01-25 7:05 UTC (permalink / raw)
To: Kumar Kartikeya Dwivedi; +Cc: Julia Lawall, bpf, kbuild-all
From: kernel test robot <lkp@intel.com>
net/bpf/test_run.c:296:6-10: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays)
Zero-length and one-element arrays are deprecated, see
Documentation/process/deprecated.rst
Flexible-array members should be used instead.
Generated by: scripts/coccinelle/misc/flexible_array.cocci
Fixes: c1ff181ffabc ("selftests/bpf: Extend kfunc selftests")
CC: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
test_run.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/bpf/test_run.c
+++ b/net/bpf/test_run.c
@@ -293,7 +293,7 @@ struct prog_test_fail2 {
struct prog_test_fail3 {
int len;
char arr1[2];
- char arr2[0];
+ char arr2[];
};
noinline void bpf_kfunc_call_test_pass_ctx(struct __sk_buff *skb)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH bpf-next] bpf: fix flexible_array.cocci warnings
@ 2022-01-25 7:05 ` kernel test robot
0 siblings, 0 replies; 10+ messages in thread
From: kernel test robot @ 2022-01-25 7:05 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1026 bytes --]
From: kernel test robot <lkp@intel.com>
net/bpf/test_run.c:296:6-10: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays)
Zero-length and one-element arrays are deprecated, see
Documentation/process/deprecated.rst
Flexible-array members should be used instead.
Generated by: scripts/coccinelle/misc/flexible_array.cocci
Fixes: c1ff181ffabc ("selftests/bpf: Extend kfunc selftests")
CC: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
test_run.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/bpf/test_run.c
+++ b/net/bpf/test_run.c
@@ -293,7 +293,7 @@ struct prog_test_fail2 {
struct prog_test_fail3 {
int len;
char arr1[2];
- char arr2[0];
+ char arr2[];
};
noinline void bpf_kfunc_call_test_pass_ctx(struct __sk_buff *skb)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH bpf-next] bpf: fix flexible_array.cocci warnings
2022-01-25 7:05 ` kernel test robot
@ 2022-01-25 13:45 ` Daniel Borkmann
-1 siblings, 0 replies; 10+ messages in thread
From: Daniel Borkmann @ 2022-01-25 13:45 UTC (permalink / raw)
To: kernel test robot, Kumar Kartikeya Dwivedi; +Cc: Julia Lawall, bpf, kbuild-all
On 1/25/22 8:05 AM, kernel test robot wrote:
> From: kernel test robot <lkp@intel.com>
>
> net/bpf/test_run.c:296:6-10: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays)
>
>
> Zero-length and one-element arrays are deprecated, see
> Documentation/process/deprecated.rst
> Flexible-array members should be used instead.
>
> Generated by: scripts/coccinelle/misc/flexible_array.cocci
>
> Fixes: c1ff181ffabc ("selftests/bpf: Extend kfunc selftests")
> CC: Kumar Kartikeya Dwivedi <memxor@gmail.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
Duplicate? Already applied via:
https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=ed8bb03222c965290026c8ead5a902f4140f5440
> test_run.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/net/bpf/test_run.c
> +++ b/net/bpf/test_run.c
> @@ -293,7 +293,7 @@ struct prog_test_fail2 {
> struct prog_test_fail3 {
> int len;
> char arr1[2];
> - char arr2[0];
> + char arr2[];
> };
>
> noinline void bpf_kfunc_call_test_pass_ctx(struct __sk_buff *skb)
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH bpf-next] bpf: fix flexible_array.cocci warnings
@ 2022-01-25 13:45 ` Daniel Borkmann
0 siblings, 0 replies; 10+ messages in thread
From: Daniel Borkmann @ 2022-01-25 13:45 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1304 bytes --]
On 1/25/22 8:05 AM, kernel test robot wrote:
> From: kernel test robot <lkp@intel.com>
>
> net/bpf/test_run.c:296:6-10: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays)
>
>
> Zero-length and one-element arrays are deprecated, see
> Documentation/process/deprecated.rst
> Flexible-array members should be used instead.
>
> Generated by: scripts/coccinelle/misc/flexible_array.cocci
>
> Fixes: c1ff181ffabc ("selftests/bpf: Extend kfunc selftests")
> CC: Kumar Kartikeya Dwivedi <memxor@gmail.com>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
Duplicate? Already applied via:
https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=ed8bb03222c965290026c8ead5a902f4140f5440
> test_run.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/net/bpf/test_run.c
> +++ b/net/bpf/test_run.c
> @@ -293,7 +293,7 @@ struct prog_test_fail2 {
> struct prog_test_fail3 {
> int len;
> char arr1[2];
> - char arr2[0];
> + char arr2[];
> };
>
> noinline void bpf_kfunc_call_test_pass_ctx(struct __sk_buff *skb)
>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2022-01-25 13:49 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-22 9:25 [PATCH] selftests/bpf: fix flexible_array.cocci warnings Julia Lawall
2022-01-22 10:49 ` Kumar Kartikeya Dwivedi
2022-01-25 7:05 ` [PATCH bpf-next] bpf: " kernel test robot
2022-01-25 7:05 ` kernel test robot
2022-01-25 13:45 ` Daniel Borkmann
2022-01-25 13:45 ` Daniel Borkmann
-- strict thread matches above, loose matches on Subject: below --
2022-01-22 11:09 Julia Lawall
2022-01-22 11:09 ` Julia Lawall
2022-01-24 16:24 ` Daniel Borkmann
2022-01-24 16:24 ` Daniel Borkmann
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.