Re: [PATCH bpf 2/3] selftests/bpf: Double the size of test_loader log

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 1/2/24 11:30 AM, Ilya Leoshkevich wrote:
Testing long jumps requires having >32k instructions. That many
instructions require the verifier log buffer of 2 megabytes.

Signed-off-by: Ilya Leoshkevich <iii@xxxxxxxxxxxxx>
---
  tools/testing/selftests/bpf/test_loader.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/test_loader.c b/tools/testing/selftests/bpf/test_loader.c
index 37ffa57f28a1..b0bfcc8d4638 100644
--- a/tools/testing/selftests/bpf/test_loader.c
+++ b/tools/testing/selftests/bpf/test_loader.c
@@ -12,7 +12,7 @@
  #define str_has_pfx(str, pfx) \
  	(strncmp(str, pfx, __builtin_constant_p(pfx) ? sizeof(pfx) - 1 : strlen(pfx)) == 0)
-#define TEST_LOADER_LOG_BUF_SZ 1048576
+#define TEST_LOADER_LOG_BUF_SZ 2097152

I think this patch is not necessary.
If the log buffer size is not enough, the kernel
verifier will wrap around and overwrite some initial states,
but all later states are still preserved. In my opinion,
there is really no need to increase the buffer size in this case,
esp. it is a verification success case.

#define TEST_TAG_EXPECT_FAILURE "comment:test_expect_failure"
  #define TEST_TAG_EXPECT_SUCCESS "comment:test_expect_success"




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux