From: Geliang Tang
v2:
- update patch 2 as Martin suggested.
This is the 9th part of series "use network helpers" all BPF selftests
wide.
Patches 1-2 update network helpers interfaces suggested by Martin.
Patch 3 adds a new helper connect_to_addr_str() as Martin suggested
instead of adding con
From: Geliang Tang
The "type" parameter of connect_to_fd_opts() is redundant of "server_fd".
Since the "type" can be obtained inside by invoking getsockopt(SO_TYPE),
without passing it in as a parameter.
This patch drops the "type" parameter of connect_to_fd_opts() and updates
its callers.
Sugg
From: Geliang Tang
The struct member "must_fail" of network_helper_opts() is only used in
cgroup_v1v2 tests, it makes sense to drop it from network_helper_opts.
Return value (fd) of connect_to_fd_opts() and the expect errno (EPERM)
can be checked in cgroup_v1v2.c directly, no need to check them
From: Geliang Tang
Similar to connect_to_addr() helper for connecting to a server with the
given sockaddr_storage type address, this patch adds a new helper named
connect_to_addr_str() for connecting to a server with the given string
type address "addr_str", together with its "family" and "port"
From: Geliang Tang
This patch uses the new helper connect_to_addr_str() in make_client()
instead of using local defined function make_socket() + connect(). This
local function can be dropped latter.
A new parameter "expect_errno" is added for make_client() too to allow
different "expect_errno" i
From: Geliang Tang
Use local helper make_client() in drop_on_lookup(), drop_on_reuseport()
and run_multi_prog_lookup() instead of using make_socket() + connect().
Then make_socket() and inetaddr_len() can be dropped.
Signed-off-by: Geliang Tang
---
.../selftests/bpf/prog_tests/sk_lookup.c
On 7/11/24 9:39 PM, Shuah Khan wrote:
> On 7/11/24 00:52, Muhammad Usama Anjum wrote:
>> On 7/10/24 9:16 PM, Shuah Khan wrote:
>>> On 7/10/24 03:37, Muhammad Usama Anjum wrote:
This patch brings just readability implements by using kselftests wrappers
instead of manual pass/fail test case
Use kselftest wrapper to mark tests pass/fail instead of manually
counting. This is needed to return correct exit status. This also
improves readability and mainability.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/x86/vdso_restorer.c | 20 +++-
1 file changed,
Return correct exit status, KSFT_SKIP if the pre-conditions aren't met.
Return KSFT_FAIL if error occurs. Use ksft_finished() which will
compmare the total planned tests with passed tests to return the exit
value.
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/x86/vdso_restorer.
> The requested resources should be closed before return in main(), otherwise
> resource leak will occur. Add a check of cg_fd before close().
>
> Fixes: 435f90a338ae ("selftests/bpf: add a test case for sock_ops perf-event
> notification")
> Signed-off-by: Ma Ke
Please reconsider such informati
On Thu, 11 Jul 2024 18:19:25 +0200,
Mark Brown wrote:
>
> On Thu, Jul 11, 2024 at 06:08:38PM +0200, Jaroslav Kysela wrote:
> > On 11. 07. 24 16:33, Mark Brown wrote:
>
> > > Address this by replacing our use of card numbers with card names which
> > > are
> > > more likely to be stable across ru
Update the get-reg-list test to test the Svade and Svadu Extensions are
available for guest OS.
Signed-off-by: Yong-Xuan Wang
Reviewed-by: Andrew Jones
---
tools/testing/selftests/kvm/riscv/get-reg-list.c | 8
1 file changed, 8 insertions(+)
diff --git a/tools/testing/selftests/kvm/ri
In this series, 4 tests are being conformed to TAP.
Changes since v1:
- Correct the description of patches with what improvements they are
bringing and why they are required
Muhammad Usama Anjum (4):
selftests: x86: check_initial_reg_state: remove manual counting and
increase maintainabil
- Removes manual counting of pass and fail tests
- Increase readability and maintainability of tests
- Print logs in standard format (without [RUN], [OK] tags)
Signed-off-by: Muhammad Usama Anjum
---
.../selftests/x86/check_initial_reg_state.c | 24 +--
1 file changed, 11 inser
- Correct the skip, pass and fail return codes. Otherwise the test
always return 0
- Returns correct number of stats about passed/failed tests
- Print logs in standard format
Signed-off-by: Muhammad Usama Anjum
---
.../selftests/x86/corrupt_xstate_header.c | 30 +++
1 file
- Add test skip support instead of returning success at skip time for the
kselftest script to understand correct exit status
- Print details about errno if error occurs
- Increase readability and maintainability
- Print logs in standard format
Signed-off-by: Muhammad Usama Anjum
---
.../testin
- Remove manual pass/fail tests counting
- Increase readability
- Print details about errno if error occurs
- Print logs in standard format
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/x86/entry_from_vm86.c | 109 +-
1 file changed, 53 insertions(+), 56 deletio
In this series, 4 tests are being conformed to TAP.
Changes since v1:
- Correct the description of patches with what improvements they are
bringing and why they are required
Changes since v2:
- Correct the subject of series
Muhammad Usama Anjum (4):
selftests: x86: check_initial_reg_state: r
- Removes manual counting of pass and fail tests
- Increase readability and maintainability of tests
- Print logs in standard format (without [RUN], [OK] tags)
Signed-off-by: Muhammad Usama Anjum
---
.../selftests/x86/check_initial_reg_state.c | 24 +--
1 file changed, 11 inser
- Correct the skip, pass and fail return codes. Otherwise the test
always return 0
- Returns correct number of stats about passed/failed tests
- Print logs in standard format
Signed-off-by: Muhammad Usama Anjum
---
.../selftests/x86/corrupt_xstate_header.c | 30 +++
1 file
- Add test skip support instead of returning success at skip time for the
kselftest script to understand correct exit status
- Print details about errno if error occurs
- Increase readability and maintainability
- Print logs in standard format
Signed-off-by: Muhammad Usama Anjum
---
.../testin
- Remove manual pass/fail tests counting
- Increase readability
- Print details about errno if error occurs
- Print logs in standard format
Signed-off-by: Muhammad Usama Anjum
---
tools/testing/selftests/x86/entry_from_vm86.c | 109 +-
1 file changed, 53 insertions(+), 56 deletio
On Thu, Jul 11, 2024 at 03:56:25PM -0600, Shuah Khan wrote:
> On 7/11/24 15:44, Nícolas F. R. A. Prado wrote:
> > On Thu, Jul 11, 2024 at 01:53:37PM -0600, Shuah Khan wrote:
> > > On 7/10/24 15:49, Shuah Khan wrote:
> > > > On 7/10/24 07:11, Greg Kroah-Hartman wrote:
> > > > > On Fri, Jul 05, 2024
Changes v4:
- Printing SNC warnings at the start of every test.
- Printing SNC warnings at the end of every relevant test.
- Remove global snc_mode variable, consolidate snc detection functions
into one.
- Correct minor mistakes.
Changes v3:
- Reworked patch 2.
- Changed minor things in patch 1
Sub-NUMA Cluster divides CPUs sharing an L3 cache into separate NUMA
nodes. Systems may support splitting into either two, three or four
nodes.
When SNC mode is enabled the effective amount of L3 cache available
for allocation is divided by the number of nodes per L3.
Detect which SNC mode is act
Resctrl selftest prints a message on test failure that Sub-Numa
Clustering (SNC) could be enabled and points the user to check their BIOS
settings. No actual check is performed before printing that message so
it is not very accurate in pinpointing a problem.
Figuring out if SNC is enabled is only
Hello,
KernelCI is hosting a bi-weekly call on Thursday to discuss improvements to
existing upstream tests, the development of new tests to increase kernel
testing coverage, and the enablement of these tests in KernelCI. In recent
months, we at Collabora have focused on various kernel areas, asses
On 12. 07. 24 10:21, Takashi Iwai wrote:
On Thu, 11 Jul 2024 18:19:25 +0200,
Mark Brown wrote:
On Thu, Jul 11, 2024 at 06:08:38PM +0200, Jaroslav Kysela wrote:
On 11. 07. 24 16:33, Mark Brown wrote:
Address this by replacing our use of card numbers with card names which are
more likely to b
then
+ mptcp_lib_pr_fail "Failed to setup namespaces ${*}"
exit ${KSFT_FAIL}
fi
---
base-commit: 2146b7dd354c2a1384381ca3cd5751bfff6137d6
change-id:
20240712-upstream-net-next-20240712-selftests-mptcp-fix-shellcheck-6f17e65c6c1b
Best regards,
--
Matthieu Baerts (NGI0)
On Fri, Jul 12, 2024 at 11:20:05AM +0200, Jaroslav Kysela wrote:
> On 12. 07. 24 10:21, Takashi Iwai wrote:
> > OTOH, longname can be really ugly to read, and it can vary because it
> > often embeds address or irq numbers in the string.
Capturing that variation is one of the goals - it should mos
On Thu, Jul 11, 2024 at 07:18:51PM +0800, Xu Kuohai wrote:
> From: Xu Kuohai
>
> To be consistent with most LSM hooks, convert the return value of
> hook inode_getsecurity to 0 or a negative error code.
>
> Before:
> - Hook inode_getsecurity returns size of buffer on success or a
> negative er
Hi Puranjay,
On 7/11/24 4:00 PM, Puranjay Mohan wrote:
[...]
I was able find the root cause of this bug and will send a fix soon!
Unable to handle kernel paging request at virtual address c2a80e68
We are running this test on Qemu with '-cpu max', this means 52-bit
virtual addresses a
From: Geliang Tang
v2:
- patch 1, only commit log updated
- update patch 2
- add an unsigned variable
- use "switch-case"
- only "Operation not supported", no (-524) in string
- patch 3, a now one
This patchset contains three fixes for handling errno ENOTSUPP.
Patch 1 fixes the retu
From: Geliang Tang
Errno 95 (ENOTSUP or EOPNOTSUPP) can be recognized by libbpf_strerror_r(),
but 524 (ENOTSUPP) can't:
prog 'basic_alloc3': BPF program load failed: Operation not supported
prog 'basic_alloc3': failed to load: -95
failed to load object 'verifier_arena'
FAIL:unexpected_load_f
From: Geliang Tang
Run bloom_filter_map selftests (./test_progs -t bloom_filter_map) on a
Loongarch platform, an error message "JIT doesn't support bpf-to-bpf calls"
is got in user space, together with an unexpected errno EINVAL (22), not
ENOTSUPP (524):
libbpf: prog 'inner_map': BPF program lo
From: Geliang Tang
ENOTSUPP is defined in bpf/str_error.h now, so no need to redefine it
in so many places in bpf selftests.
This patch includes in testing_helpers.h, which is
almost included by each tests. And drop all duplicate definitions.
Signed-off-by: Geliang Tang
---
tools/testing/sel
On Wed, Jul 10, 2024, Xin3 Li wrote:
> > On Wed, Feb 07, 2024, Xin Li wrote:
> > > Switch MSR_IA32_FRED_RSP0 between host and guest in
> > > vmx_prepare_switch_to_{host,guest}().
> > >
> > > MSR_IA32_FRED_RSP0 is used during ring 3 event delivery only, thus
> > > KVM, running on ring 0, can run saf
On Thu, Jul 11, 2024 at 7:13 AM Xu Kuohai wrote:
>
> From: Xu Kuohai
>
> LSM BPF prog returning a positive number attached to the hook
> file_alloc_security makes kernel panic.
...
> Xu Kuohai (20):
> lsm: Refactor return value of LSM hook vm_enough_memory
> lsm: Refactor return value of LS
On Fri, Jul 12, 2024 at 11:56 AM Paul Moore wrote:
> On Thu, Jul 11, 2024 at 7:13 AM Xu Kuohai wrote:
> >
> > From: Xu Kuohai
> >
> > LSM BPF prog returning a positive number attached to the hook
> > file_alloc_security makes kernel panic.
>
> ...
>
> > Xu Kuohai (20):
> > lsm: Refactor return
On Fri, Jul 12, 2024 at 6:50 AM Daniel Borkmann wrote:
>
> Hi Puranjay,
>
> On 7/11/24 4:00 PM, Puranjay Mohan wrote:
> [...]
> > I was able find the root cause of this bug and will send a fix soon!
> >
> >> Unable to handle kernel paging request at virtual address c2a80e68
> >
> > We are
> > > > Switch MSR_IA32_FRED_RSP0 between host and guest in
> > > > vmx_prepare_switch_to_{host,guest}().
> > > >
> > > > MSR_IA32_FRED_RSP0 is used during ring 3 event delivery only, thus
> > > > KVM, running on ring 0, can run safely with guest FRED RSP0, i.e., no
> > > > need to switch between h
On 7/12/24 6:07 PM, Alexei Starovoitov wrote:
On Fri, Jul 12, 2024 at 6:50 AM Daniel Borkmann wrote:
On 7/11/24 4:00 PM, Puranjay Mohan wrote:
[...]
I was able find the root cause of this bug and will send a fix soon!
Unable to handle kernel paging request at virtual address c2a80e68
On 12. 07. 24 15:00, Mark Brown wrote:
On Fri, Jul 12, 2024 at 11:20:05AM +0200, Jaroslav Kysela wrote:
On 12. 07. 24 10:21, Takashi Iwai wrote:
OTOH, longname can be really ugly to read, and it can vary because it
often embeds address or irq numbers in the string.
Capturing that variation
On Fri, Jul 12, 2024, Xin3 Li wrote:
> > > > > Switch MSR_IA32_FRED_RSP0 between host and guest in
> > Alternatively, is the desired RSP0 value tracked anywhere other than the
> > MSR?
>
> Yes, It's simply "(unsigned long)task_stack_page(task) + THREAD_SIZE".
>
> > E.g. if it's somewhere in task
> > > E.g. if it's somewhere in task_struct, then kvm_on_user_return()
> > > would restore the current task's desired RSP0.
> >
> > So you're suggesting to extend the framework to allow per task constants?
>
> Yeah, or more likely, special case MSR_IA32_FRED_RSP0. If KVM didn't already
> have the
From: Puranjay Mohan
Sent: Thursday, July 11, 2024 7:00 AM
To: Manu Bretelle; Daniel Borkmann; KP Singh
Cc: Andrii Nakryiko; Eduard Zingerman; Mykola Lysenko; Alexei Starovoitov;
Martin KaFai Lau; Song Liu; Yonghong Song; John Fastabend; Stanislav Fomi
On 7/12/24 12:04 AM, Geliang Tang wrote:
From: Geliang Tang
The struct member "must_fail" of network_helper_opts() is only used in
cgroup_v1v2 tests, it makes sense to drop it from network_helper_opts.
Return value (fd) of connect_to_fd_opts() and the expect errno (EPERM)
can be checked in cgr
On Thu, Jul 11, 2024 at 07:18:59PM +0800, Xu Kuohai wrote:
> From: Xu Kuohai
>
> Add a disabled hooks list for BPF LSM. progs being attached to the
> listed hooks will be rejected by the verifier.
>
> Suggested-by: KP Singh
> Signed-off-by: Xu Kuohai
Xu,
The patches 11 and higher are mostly
Hi Manu,
>
> I was able to confirm the fix using the artifacts from
> https://github.com/kernel-patches/bpf/actions/runs/9905842936
> Thanks
>
Thanks for testing the fix.
This bug has been resolved now but the test still hangs sometimes.
Unfortunately, I am not able to reproduce this hang
using
On Fri, Jul 12, 2024 at 06:25:21PM +0200, Jaroslav Kysela wrote:
> On 12. 07. 24 15:00, Mark Brown wrote:
> > The trouble with the ID field is that it's too short and seems likely to
> > create collisions, for example HDA stuff just seems to default to NVidia
> > for nVidia cards which seems very
On Fri, Jul 12, 2024 at 12:00:15PM +0200, Matthieu Baerts (NGI0) wrote:
> It looks like we missed these two errors recently:
>
> - SC2068: Double quote array expansions to avoid re-splitting elements.
> - SC2145: Argument mixes string and array. Use * or separate argument.
>
> Two simple fixe
> -Original Message-
> From: Nícolas F. R. A. Prado
> On Thu, Jul 11, 2024 at 01:53:37PM -0600, Shuah Khan wrote:
> > On 7/10/24 15:49, Shuah Khan wrote:
> > > On 7/10/24 07:11, Greg Kroah-Hartman wrote:
> > > > On Fri, Jul 05, 2024 at 07:29:53PM -0400, Nícolas F. R. A. Prado wrote:
> >
On Fri, Jul 12, 2024, Xin3 Li wrote:
> > > > E.g. if it's somewhere in task_struct, then kvm_on_user_return()
> > > > would restore the current task's desired RSP0.
> > >
> > > So you're suggesting to extend the framework to allow per task constants?
> >
> > Yeah, or more likely, special case MSR_
> On Jul 12, 2024, at 11:08 AM, Puranjay Mohan wrote:
>
> Thanks for testing the fix.
>
> This bug has been resolved now but the test still hangs sometimes.
> Unfortunately, I am not able to reproduce this hang
> using vmtest.
I have not able to reproduce the original error either. I will try
On Thu, 2024-06-27 at 16:32 -0700, Jakub Kicinski wrote:
> On Tue, 25 Jun 2024 18:28:34 -0700
> allison.hender...@oracle.com wrote:
> > From: Vegard Nossum
> >
> > This adds some basic self-testing infrastructure for RDS-TCP.
> >
> > Signed-off-by: Vegard Nossum
> > Signed-off-by: Chuck Lever
On Fri, Jul 12, 2024 at 05:48:14PM +, Bird, Tim wrote:
>
>
> > -Original Message-
> > From: Nícolas F. R. A. Prado
> > On Thu, Jul 11, 2024 at 01:53:37PM -0600, Shuah Khan wrote:
> > > On 7/10/24 15:49, Shuah Khan wrote:
> > > > On 7/10/24 07:11, Greg Kroah-Hartman wrote:
> > > > > O
On Thu, Jul 11, 2024 at 7:13 AM Xu Kuohai wrote:
>
> From: Xu Kuohai
>
> LSM BPF prog returning a positive number attached to the hook
> file_alloc_security makes kernel panic.
>
> Here is a panic log:
>
> [ 441.235774] BUG: kernel NULL pointer dereference, address: 09
> [ 441.23674
The string passed to ksft_test_result_skip is missing the `type_name`
Signed-off-by: Remington Brasga
---
clang-tidy reported clang-diagnostic-format-insufficient-args warning
on this line, so I am fixing it.
tools/testing/selftests/arm64/abi/ptrace.c | 2 +-
1 file changed, 1 insertion(+), 1 d
Here’s an update from the Linux MM Alignment Session on July 10 2024, 9-10am
PDT:
The current direction is:
+ Allow mmap() of ranges that cover both shared and private memory, but disallow
faulting in of private pages
+ On access to private pages, userspace will get some error, perhaps SIGBUS
Linux 6.6 does not have an opt_ipproto_off variable in gro.c at all (it
was added in later kernel versions), so attempting to initialize one
breaks the build.
Fixes: c80d53c484e8 ("selftests/net: fix uninitialized variables")
Cc: # 6.6
Reported-by: Ignat Korchagin
Closes:
https://lore.kernel.or
On 7/12/24 4:51 PM, John Hubbard wrote:
Linux 6.6 does not have an opt_ipproto_off variable in gro.c at all (it
was added in later kernel versions), so attempting to initialize one
breaks the build.
This is the first time I've tried to fix something in linux-stable, and
I'm not sure that I've m
On 07/12, Markus Elfring wrote:
> > The requested resources should be closed before return in main(), otherwise
> > resource leak will occur. Add a check of cg_fd before close().
> >
> > Fixes: 435f90a338ae ("selftests/bpf: add a test case for sock_ops
> > perf-event notification")
> > Signed-off-
On Fri, 12 Jul 2024 20:19:33 +0200,
Mark Brown wrote:
>
> On Fri, Jul 12, 2024 at 06:25:21PM +0200, Jaroslav Kysela wrote:
> > On 12. 07. 24 15:00, Mark Brown wrote:
>
> > > The trouble with the ID field is that it's too short and seems likely to
> > > create collisions, for example HDA stuff jus
63 matches
Mail list logo