WARNING: Prefer strscpy, strscpy_pad, or __nonstring over strncpy - see: https://github.com/KSPP/linux/issues/90 #49: FILE: tools/testing/selftests/bpf/prog_tests/bpf_iter.c:349: + strncpy(test_data, "test_data", 10); WARNING: line length of 94 exceeds 80 columns #169: FILE: tools/testing/selftests/bpf/progs/bpf_iter_tasks.c:98: + ret = bpf_copy_from_user_task_str((char *)task_str1, sizeof(task_str1), ptr, task, 0); WARNING: line length of 81 exceeds 80 columns #175: FILE: tools/testing/selftests/bpf/progs/bpf_iter_tasks.c:104: + /* Read an invalid pointer and ensure we get error with pad zeros flag */ WARNING: line length of 84 exceeds 80 columns #187: FILE: tools/testing/selftests/bpf/progs/bpf_iter_tasks.c:116: + ret = bpf_copy_from_user_task_str((char *)task_str2, 10, user_ptr, task, 0); WARNING: line length of 95 exceeds 80 columns #189: FILE: tools/testing/selftests/bpf/progs/bpf_iter_tasks.c:118: + if (bpf_strncmp(task_str2, 10, "test_data\0") != 0 || ret != 10 || task->tgid != pid) { WARNING: line length of 83 exceeds 80 columns #195: FILE: tools/testing/selftests/bpf/progs/bpf_iter_tasks.c:124: + ret = bpf_copy_from_user_task_str((char *)task_str3, 2, user_ptr, task, 0); WARNING: line length of 84 exceeds 80 columns #202: FILE: tools/testing/selftests/bpf/progs/bpf_iter_tasks.c:131: + ret = bpf_copy_from_user_task_str((char *)task_str4, 20, user_ptr, task, 0); CHECK: Logical continuations should be on the previous line #204: FILE: tools/testing/selftests/bpf/progs/bpf_iter_tasks.c:133: + if (bpf_strncmp(task_str4, 10, "test_data\0") != 0 || ret != 10 + || task_str4[sizeof(task_str4) - 1] != 'a') { WARNING: line length of 98 exceeds 80 columns #210: FILE: tools/testing/selftests/bpf/progs/bpf_iter_tasks.c:139: + ret = bpf_copy_from_user_task_str((char *)task_str4, 20, user_ptr, task, BPF_F_PAD_ZEROS); CHECK: Logical continuations should be on the previous line #212: FILE: tools/testing/selftests/bpf/progs/bpf_iter_tasks.c:141: + if (bpf_strncmp(task_str4, 10, "test_data\0") != 0 || ret != 10 + || task_str4[sizeof(task_str4) - 1] != '\0') { WARNING: line length of 96 exceeds 80 columns #225: FILE: tools/testing/selftests/bpf/progs/bpf_iter_tasks.c:154: + ret = bpf_copy_from_user_task_str(big_str1, 5000, user_ptr_long, task, BPF_F_PAD_ZEROS); CHECK: Logical continuations should be on the previous line #227: FILE: tools/testing/selftests/bpf/progs/bpf_iter_tasks.c:156: + if (bpf_strncmp(big_str1, 4, "baba") != 0 || ret != 5000 + || bpf_strncmp(big_str1 + 4996, 4, "bab\0") != 0) { WARNING: line length of 96 exceeds 80 columns #247: FILE: tools/testing/selftests/bpf/progs/bpf_iter_tasks.c:176: + ret = bpf_copy_from_user_task_str(big_str2, 5005, user_ptr_long, task, BPF_F_PAD_ZEROS); CHECK: Logical continuations should be on the previous line #249: FILE: tools/testing/selftests/bpf/progs/bpf_iter_tasks.c:178: + if (bpf_strncmp(big_str2, 4, "baba") != 0 || ret != 5000 + || bpf_strncmp(big_str2 + 4996, 5, "bab\0\0") != 0) { WARNING: line length of 82 exceeds 80 columns #255: FILE: tools/testing/selftests/bpf/progs/bpf_iter_tasks.c:184: + ret = bpf_copy_from_user_task_str(big_str3, 4996, user_ptr_long, task, 0); CHECK: Logical continuations should be on the previous line #257: FILE: tools/testing/selftests/bpf/progs/bpf_iter_tasks.c:186: + if (bpf_strncmp(big_str3, 4, "baba") != 0 || ret != 4996 + || bpf_strncmp(big_str3 + 4992, 4, "bab\0") != 0) { total: 0 errors, 11 warnings, 5 checks, 260 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. Commit e57262caac4c ("selftests/bpf: Add tests for bpf_copy_from_user_task_str") has style problems, please review. NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT BAD_REPORTED_BY_LINK CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. total: 0 errors, 11 warnings, 5 checks, 260 lines checked