Re: [PATCH bpf-next v2 1/4] selftests/bpf: Add some null pointer checks

2024-05-13 Thread Kunwu Chan
On 2024/5/10 19:20, Muhammad Usama Anjum wrote: On 5/10/24 2:58 PM, kunwu.c...@linux.dev wrote: From: Kunwu Chan There is a 'malloc' call, which can be unsuccessful. This patch will add the malloc failure checking to avoid possible null dereference. Signed-off-by: Kunwu Chan -

[PATCH bpf-next v2 4/4] selftests/bpf: Add a null pointer check for the serial_test_tp_attach_query

2024-05-10 Thread kunwu . chan
From: Kunwu Chan There is a 'malloc' call, which can be unsuccessful. Add the malloc failure checking to avoid possible null dereference. Signed-off-by: Kunwu Chan Suggested-by: Daniel Borkmann --- Changes in v2: - Use ASSERT* instead of CHECK - Add suggested-by tag

[PATCH bpf-next v2 3/4] selftests/bpf: Add a null pointer check for the load_btf_spec

2024-05-10 Thread kunwu . chan
From: Kunwu Chan There is a 'malloc' call, which can be unsuccessful. Add the malloc failure checking to avoid possible null dereference. Signed-off-by: Kunwu Chan --- tools/testing/selftests/bpf/test_verifier.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/sel

[PATCH bpf-next v2 2/4] selftests/bpf/sockopt: Add a null pointer check for the run_test

2024-05-10 Thread kunwu . chan
From: Kunwu Chan There is a 'malloc' call, which can be unsuccessful. Add the malloc failure checking to avoid possible null dereference and give more information about test fail reasons. Signed-off-by: Kunwu Chan --- tools/testing/selftests/bpf/prog_tests/sockopt.c | 6 ++ 1 fi

[PATCH bpf-next v2 1/4] selftests/bpf: Add some null pointer checks

2024-05-10 Thread kunwu . chan
From: Kunwu Chan There is a 'malloc' call, which can be unsuccessful. This patch will add the malloc failure checking to avoid possible null dereference. Signed-off-by: Kunwu Chan --- tools/testing/selftests/bpf/test_progs.c | 7 +++ 1 file changed, 7 insertions(+) diff --g

[PATCH bpf-next v2 0/4] Add some 'malloc' failure checks

2024-05-10 Thread kunwu . chan
From: Kunwu Chan The "malloc" call may not be successful.Add the malloc failure checking to avoid possible null dereference. Changes since v1 [1]: - As Daniel Borkmann suggested, change patch 4/4 only - Other 3 patches no changes. [1] https://lore.kern

Re: [PATCH] KVM: selftests: Add 'malloc' failure check in test_vmx_nested_state

2024-05-10 Thread Kunwu Chan
Thanks for reply. On 2024/4/26 00:25, Sean Christopherson wrote: On Wed, Apr 24, 2024, Oliver Upton wrote: Hey, On Wed, Apr 24, 2024 at 07:51:44AM -0700, Sean Christopherson wrote: On Wed, Apr 24, 2024, Andrew Jones wrote: On Tue, Apr 23, 2024 at 12:15:47PM -0700, Sean Christopherson wrote:

Re: [PATCH bpf-next 4/4] selftests/bpf: Add a null pointer check for the serial_test_tp_attach_query

2024-05-10 Thread Kunwu Chan
Thanks all for your reply. On 2024/5/3 23:47, Daniel Borkmann wrote: On 4/24/24 4:04 AM, Kunwu Chan wrote: There is a 'malloc' call, which can be unsuccessful. Add the malloc failure checking to avoid possible null dereference. Signed-off-by: Kunwu Chan ---   tools/testing/sel

Re: [PATCH] KVM: selftests: Add 'malloc' failure check in test_vmx_nested_state

2024-04-23 Thread Kunwu Chan
Thanks all for the reply. On 2024/4/24 03:15, Sean Christopherson wrote: On Tue, Apr 23, 2024, Andrew Jones wrote: On Tue, Apr 23, 2024 at 07:56:01AM -0700, Sean Christopherson wrote: +others On Tue, Apr 23, 2024, Markus Elfring wrote: … This patch will add the malloc failure checking … *

[PATCH bpf-next 4/4] selftests/bpf: Add a null pointer check for the serial_test_tp_attach_query

2024-04-23 Thread Kunwu Chan
There is a 'malloc' call, which can be unsuccessful. Add the malloc failure checking to avoid possible null dereference. Signed-off-by: Kunwu Chan --- tools/testing/selftests/bpf/prog_tests/tp_attach_query.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/sel

[PATCH bpf-next 3/4] selftests/bpf: Add a null pointer check for the load_btf_spec

2024-04-23 Thread Kunwu Chan
There is a 'malloc' call, which can be unsuccessful. Add the malloc failure checking to avoid possible null dereference. Signed-off-by: Kunwu Chan --- tools/testing/selftests/bpf/test_verifier.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/bpf/test_ver

[PATCH bpf-next 2/4] selftests/bpf/sockopt: Add a null pointer check for the run_test

2024-04-23 Thread Kunwu Chan
There is a 'malloc' call, which can be unsuccessful. Add the malloc failure checking to avoid possible null dereference and give more information about test fail reasons. Signed-off-by: Kunwu Chan --- tools/testing/selftests/bpf/prog_tests/sockopt.c | 6 ++ 1 file changed, 6

[PATCH bpf-next 1/4] selftests/bpf: Add some null pointer checks

2024-04-23 Thread Kunwu Chan
There is a 'malloc' call, which can be unsuccessful. This patch will add the malloc failure checking to avoid possible null dereference. Signed-off-by: Kunwu Chan --- tools/testing/selftests/bpf/test_progs.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tools/testing/sel

[PATCH bpf-next 0/4] Add some 'malloc' failure checks

2024-04-23 Thread Kunwu Chan
The "malloc" call may not be successful.Add the malloc failure checking to avoid possible null dereference. Kunwu Chan (4): selftests/bpf: Add some null pointer checks selftests/bpf/sockopt: Add a null pointer check for the run_test selftests/bpf: Add a null pointer che

[PATCH] kselftest: arm64: Add a null pointer check

2024-04-23 Thread Kunwu Chan
There is a 'malloc' call, which can be unsuccessful. This patch will add the malloc failure checking to avoid possible null dereference and give more information about test fail reasons. Signed-off-by: Kunwu Chan --- tools/testing/selftests/arm64/tags/tags_test.c | 4 1 file

[PATCH] KVM: selftests: Add 'malloc' failure check in test_vmx_nested_state

2024-04-23 Thread Kunwu Chan
There is a 'malloc' call in test_vmx_nested_state function, which can be unsuccessful. This patch will add the malloc failure checking to avoid possible null dereference and give more information about test fail reasons. Signed-off-by: Kunwu Chan --- tools/testing/selftests/

[PATCH] KVM: selftests: Add 'malloc' failure check in config_name

2024-04-23 Thread Kunwu Chan
There is a 'malloc' call in config_name function, which can be unsuccessful. This patch will add the malloc failure checking to avoid possible null dereference and give more information about test fail reasons. Signed-off-by: Kunwu Chan --- tools/testing/selftests/kvm/get-reg-list.