The variable are never referenced in the code, just remove it
that this problem was discovered by reading code
Signed-off-by: Zhu Jun
---
tools/testing/selftests/dma/dma_map_benchmark.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/testing/selftests/dma/dma_map_benchmark.c
b/tools/te
The opened file should be closed in main(), otherwise resource
leak will occur that this problem was discovered by reading code
Signed-off-by: Zhu Jun
---
tools/testing/selftests/dma/dma_map_benchmark.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/testing/selftests/dma/dma_map_be
The opened file should be closed before exit, otherwise resource leak
will occur that this problem was discovered by reading code
Signed-off-by: Zhu Jun
---
tools/testing/selftests/rtc/setdate.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/rtc/setdate.c
b/tools/te
'%u' in format string requires 'unsigned int' in __wait_for_test()
but the argument type is 'signed int'.
Signed-off-by: Zhu Jun
---
tools/testing/selftests/kselftest_harness.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kselftest_harness.h
b/tool
Hi Eduard,
On Mon, 2024-07-08 at 12:42 -0700, Eduard Zingerman wrote:
> On Fri, 2024-07-05 at 10:38 +0800, Geliang Tang wrote:
>
> [...]
>
> I think that this patch is an improvement independent of the patch-
> set.
> Please submit it separately.
>
> > .../selftests/bpf/prog_tests/bpf_tcp_ca.c
Main function return value is int type, so add return
value in the end that this problem was discovered by reading the code
Signed-off-by: Zhu Jun
---
Changes in v2:
- modify commit info
tools/testing/selftests/breakpoints/step_after_suspend_test.c | 4 +++-
1 file changed, 3 insertions(+),
This variable is never referenced in the code, just remove them
that this problem was discovered by reading the code
Signed-off-by: Zhu Jun
---
Changes in v2:
- modify commit info
tools/testing/selftests/breakpoints/step_after_suspend_test.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/
The requested resources should be closed before return
in main(), otherwise resource leak will occur
Signed-off-by: Zhu Jun
---
Changes in v2:
- check for cg_fd >= 0 and have just one out label
tools/testing/selftests/bpf/test_sockmap.c | 11 +++
1 file changed, 7 insertions(+), 4 dele
Add dmabuf information to page_pool stats:
$ ./cli.py --spec ../netlink/specs/netdev.yaml --dump page-pool-get
...
{'dmabuf': 10,
'id': 456,
'ifindex': 3,
'inflight': 1023,
'inflight-mem': 4190208},
{'dmabuf': 10,
'id': 455,
'ifindex': 3,
'inflight': 1023,
'inflight-mem': 4190208
ncdevmem is a devmem TCP netcat. It works similarly to netcat, but it
sends and receives data using the devmem TCP APIs. It uses udmabuf as
the dmabuf provider. It is compatible with a regular netcat running on
a peer, or a ncdevmem running on a peer.
In addition to normal netcat support, ncdevmem
Add documentation outlining the usage and details of devmem TCP.
Signed-off-by: Mina Almasry
Reviewed-by: Bagas Sanjaya
---
v16:
- Add documentation on unbinding the NIC from dmabuf (Donald).
- Add note that any dmabuf should work (Donald).
v9:
https://lore.kernel.org/netdev/20240403002053.2
Add an interface for the user to notify the kernel that it is done
reading the devmem dmabuf frags returned as cmsg. The kernel will
drop the reference on the frags to make them available for reuse.
Signed-off-by: Willem de Bruijn
Signed-off-by: Kaiyuan Zhang
Signed-off-by: Mina Almasry
Reviewe
In tcp_recvmsg_locked(), detect if the skb being received by the user
is a devmem skb. In this case - if the user provided the MSG_SOCK_DEVMEM
flag - pass it to tcp_recvmsg_devmem() for custom handling.
tcp_recvmsg_devmem() copies any data in the skb header to the linear
buffer, and returns a cmsg
For device memory TCP, we expect the skb headers to be available in host
memory for access, and we expect the skb frags to be in device memory
and unaccessible to the host. We expect there to be no mixing and
matching of device memory frags (unaccessible) with host memory frags
(accessible) in the
Implement a memory provider that allocates dmabuf devmem in the form of
net_iov.
The provider receives a reference to the struct netdev_dmabuf_binding
via the pool->mp_priv pointer. The driver needs to set this pointer for
the provider in the net_iov.
The provider obtains a reference on the netde
Make skb_frag_page() fail in the case where the frag is not backed
by a page, and fix its relevant callers to handle this case.
Signed-off-by: Mina Almasry
Reviewed-by: Eric Dumazet
---
v10:
- Fixed newly generated kdoc warnings found by patchwork. While we're
at it, fix the Return section
Convert netmem to be a union of struct page and struct netmem. Overload
the LSB of struct netmem* to indicate that it's a net_iov, otherwise
it's a page.
Currently these entries in struct page are rented by the page_pool and
used exclusively by the net stack:
struct {
unsigned long pp_mag
Implement netdev devmem allocator. The allocator takes a given struct
netdev_dmabuf_binding as input and allocates net_iov from that
binding.
The allocation simply delegates to the binding's genpool for the
allocation logic and wraps the returned memory region in a net_iov
struct.
Signed-off-by:
Add a netdev_dmabuf_binding struct which represents the
dma-buf-to-netdevice binding. The netlink API will bind the dma-buf to
rx queues on the netdevice. On the binding, the dma_buf_attach
& dma_buf_map_attachment will occur. The entries in the sg_table from
mapping will be inserted into a genpool
API takes the dma-buf fd as input, and binds it to the netdevice. The
user can specify the rx queues to bind the dma-buf to.
Suggested-by: Stanislav Fomichev
Signed-off-by: Mina Almasry
---
v16:
- Use subset-of: queue queue-id instead of queue-dmabuf (Jakub).
- Rename attribute 'bind-dmabuf' t
Add netdev_rx_queue_restart() function to netdev_rx_queue.h
Signed-off-by: David Wei
Signed-off-by: Mina Almasry
Reviewed-by: Pavel Begunkov
Reviewed-by: Jakub Kicinski
---
v13:
- Add reviewed-by from Pavel (thanks!)
- Fixed comment (Pavel)
v11:
- Fix not checking dev->queue_mgmt_ops (Pavel
v16: https://patchwork.kernel.org/project/netdevbpf/list/?series=866353&state=*
v15 got a thorough review and some testing, and this version addresses almost
all the feedback. Some more minor comments where the authors said it
could be done later, I left out.
Major changes:
- Addition of dma
The alloc/copy code pattern is better consolidated to single kstrdup (and
kstrndup) calls instead. This gets rid of deprecated[1] strncpy() uses as
well. Replace one other strncpy() use with the more idiomatic strscpy().
Link: https://github.com/KSPP/linux/issues/90 [1]
Signed-off-by: Kees Cook
-
On Mon, Jul 8, 2024 at 6:00 PM Liao Chang wrote:
>
> Reduce the runtime overhead for struct return_instance data managed by
> uretprobe. This patch replaces the dynamic allocation with statically
> allocated array, leverage two facts that are limited nesting depth of
> uretprobe (max 64) and the f
On 7/2/24 04:17, Muhammad Usama Anjum wrote:
On 6/10/24 10:19 AM, Muhammad Usama Anjum wrote:
Adding Borislav, Dave and x86 mailing list:
Please review the series.
Kind reminder
Usama,
As I mentioned another TAP conversion patch from you patch if the
following command gives you TAP
On 7/2/24 04:12, Muhammad Usama Anjum wrote:
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
The test has infinite loop to read the value of status_str. Break the
loop after getting the value once and finish
On 7/2/24 04:12, Muhammad Usama Anjum wrote:
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
The test has infitie loop to read the value of index_str. Break the loop
after successfully reading the value once
On 7/2/24 00:55, Muhammad Usama Anjum wrote:
The python unittest is being used for executing tests. TAP output
cannot be added in the unittest framework. The python unittest is being
run from a script. Add the output TAP logs to the script. Add "#"
prefix to the python unittest output which will
On 6/12/24 02:17, Muhammad Usama Anjum wrote:
On 6/12/24 1:32 AM, Shuah Khan wrote:
On 6/9/24 23:41, Muhammad Usama Anjum wrote:
Conform the layout, informational and status messages to TAP. No
functional change is intended other than the layout of output messages.
Use kselftest_harness.h to co
On 7/9/24 14:51, Shuah Khan wrote:
On 7/9/24 14:40, John Hubbard wrote:
On 7/9/24 1:34 PM, Shuah Khan wrote:
On 7/4/24 01:24, John Hubbard wrote:
...>> Muhammad Usama Anjum (1):
selftests: x86: test_FISTTP: use fisttps instead of ambiguous fisttp
Usama and John,
I am seeing checkpatch
On 7/9/24 14:40, John Hubbard wrote:
On 7/9/24 1:34 PM, Shuah Khan wrote:
On 7/4/24 01:24, John Hubbard wrote:
...>> Muhammad Usama Anjum (1):
selftests: x86: test_FISTTP: use fisttps instead of ambiguous fisttp
Usama and John,
I am seeing checkpatch warnings in this series.
v4-3-7
WAR
On 7/9/24 1:34 PM, Shuah Khan wrote:
On 7/4/24 01:24, John Hubbard wrote:
...>> Muhammad Usama Anjum (1):
selftests: x86: test_FISTTP: use fisttps instead of ambiguous fisttp
Usama and John,
I am seeing checkpatch warnings in this series.
v4-3-7
WARNING: externs should be avoided in .c
On 7/3/24 21:44, Andrei Vagin wrote:
On Wed, Jul 3, 2024 at 7:52 PM John Hubbard wrote:
When building with clang, via:
make LLVM=1 -C tools/testing/selftests
...clang warns about mismatches between the expected and required
integer length being supplied to abs(3).
Fix this by using the
On 7/4/24 01:24, John Hubbard wrote:
Changes since v3:
1) Rebased onto Linux 6.10-rc6+.
2) Added Muhammad's acks for the series.
Cover letter for v3:
Hi,
Dave Hansen, Muhammad Usama Anjum, here is the combined series that we
discussed yesterday [1].
As I mentioned then, this is a bit intrus
Quoting Jeff Johnson (2024-07-09 07:49:40)
> On 7/5/24 21:54, Stephen Boyd wrote:
> > Test the KUnit test managed overlay APIs. Confirm that platform devices
> > are created and destroyed properly. This provides us confidence that the
> > test managed APIs work correctly and can be relied upon to p
On 7/9/24 03:51, Zhu Jun wrote:
Main function return value is int type, so add return
value in the end
Signed-off-by: Zhu Jun
Please add information on how this problem was found. If you used a
tool, include which tool and warning from the tool.
thanks,
-- Shuah
On 7/9/24 03:44, Zhu Jun wrote:
This variable is never referenced in the code, just remove them.
Please add information on how this problem was found. If you used a
tool, include which tool and warning from the tool.
Signed-off-by: Zhu Jun
---
tools/testing/selftests/breakpoints/step_afte
From: Daniel Borkmann
Sent: Tuesday, July 9, 2024 10:44 AM
To: KP Singh
Cc: Puranjay Mohan ; Andrii Nakryiko ;
Eduard Zingerman ; Mykola Lysenko ; Alexei
Starovoitov ; Martin KaFai Lau ; Song
Liu ; Yonghong Song ; John Fastabend
; Stanislav Fomichev
Regression test for ae20eef5 ("KVM: SVM: Update SEV-ES shutdown intercepts
with more metadata"). Test confirms userspace is correctly indicated of
a guest shutdown not previous behavior of an EINVAL from KVM_RUN.
Cc: Paolo Bonzini
Cc: Sean Christopherson
Cc: Alper Gun
Cc: Tom Lendacky
Cc: Mich
From: Nikunj A Dadhania
Malicious guests can cause bus locks to degrade the performance of
a system. The Bus Lock Threshold feature is beneficial for
hypervisors aiming to restrict the ability of the guests to perform
excessive bus locks and slow down the system for all the tenants.
Add a test
Expose the Bus Lock Threshold in the guest CPUID and support its
functionality in nested guest.
Ensure proper restoration and saving of the bus_lock_counter at VM
Entry and VM Exit respectively in nested guest scenarios.
Case 1:
L0 supports buslock exit and L1 does not: use buslock counter from L
From: Nikunj A Dadhania
Malicious guests can cause bus locks to degrade the performance of
system. Non-WB(write-back) and misaligned locked RMW(read-modify-write)
instructions are referred to as "bus locks" and require system wide
synchronization among all processors to guarantee atomicity. Bus
Malicious guests can cause bus locks to degrade the performance of a
system. Non-WB (write-back) and misaligned locked RMW
(read-modify-write) instructions are referred to as "bus locks" and
require system wide synchronization among all processors to guarantee
the atomicity. The bus locks can impos
Malicious guests can cause bus locks to degrade the performance of
a system. Non-WB(write-back) and misaligned locked
RMW(read-modify-write) instructions are referred to as "bus locks" and
require system wide synchronization among all processors to guarantee
atomicity. The bus locks may incur sign
On 7/8/24 6:42 PM, KP Singh wrote:
On Mon, Jul 8, 2024 at 6:09 PM Daniel Borkmann wrote:
On 7/8/24 5:35 PM, Puranjay Mohan wrote:
Daniel Borkmann writes:
On 7/8/24 5:26 PM, KP Singh wrote:
On Mon, Jul 8, 2024 at 5:00 PM Puranjay Mohan wrote:
Daniel Borkmann writes:
On 7/5/24 4:50 PM, Pu
On Tue, Jul 9, 2024 at 8:37 AM Taehee Yoo wrote:
>
...
> And I found another bug.
>
> [ 236.625141] BUG: KASAN: slab-use-after-free in
> net_devmem_unbind_dmabuf+0x364/0x440
...
> Reproducer:
> ./ncdevmem -f -l -p 5201 -v 7 -t 0 -q 2 &
> sleep 10
> modprobe -rv bnxt_en
> killall ncdevmem
>
> I th
1e4e26ec.
git bisect start
# status: waiting for both good and bad commits
# bad: [82d01fe6ee52086035b201cfa1410a3b04384257] Add linux-next specific files
for 20240709
git bisect bad 82d01fe6ee52086035b201cfa1410a3b04384257
# status: waiting for good commit(s), bad commit known
# good: [037206cd4cb
On Tue, 9 Jul 2024 14:57:00 +0200
Christoph Schlameuss wrote:
> Add functions to simply print some basic state information in selftests.
>
> The output can be enabled by setting:
>
> #define TH_LOG_ENABLED 1
> #define DEBUG 1
>
> * print_psw: current SIE state description and VM run s
On Tue, 9 Jul 2024 14:57:03 +0200
Christoph Schlameuss wrote:
> Add a test case manipulating s390 storage keys from within the ucontrol
> VM.
>
> Signed-off-by: Christoph Schlameuss
> ---
> .../selftests/kvm/s390x/ucontrol_test.c | 83 +++
> 1 file changed, 83 insertions
On Tue, 9 Jul 2024 14:57:01 +0200
Christoph Schlameuss wrote:
> Add test case running code interacting with registers within a
> ucontrol VM.
>
> * Add uc_gprs test case
>
> The test uses the same VM setup using the fixture and debug macros
> introduced in earlier patches in this series.
>
>
On Tue, 9 Jul 2024 14:56:57 +0200
Christoph Schlameuss wrote:
> Subsequent tests do require direct manipulation of the SIE instruction.
> This commit introduces the SIE definition for the selftests.
>
> There are already definitions of this within the kernel.
> This differs in two ways.
> * Thi
On Tue, 9 Jul 2024 14:56:58 +0200
Christoph Schlameuss wrote:
> Add test suite to validate the s390x architecture specific ucontrol KVM
> interface.
>
> Make use of the selftest test harness.
>
> * uc_cap_hpage testcase verifies that a ucontrol VM cannot be run with
> hugepages.
>
> To allo
On Tue, 9 Jul 2024 14:56:56 +0200
Christoph Schlameuss wrote:
> Multiple test cases need page size and shift definitions.
> By moving the definitions to a single architecture specific header we
> limit the repetition.
>
> Make use of PAGE_SIZE, PAGE_SHIFT and PAGE_MASK defines in existing
> cod
On Tue, 9 Jul 2024 14:57:04 +0200
Christoph Schlameuss wrote:
> Add a test case verifying KVM_SET_USER_MEMORY_REGION and
> KVM_SET_USER_MEMORY_REGION2 cannot be executed on ucontrol VMs.
>
> Executing this test case on not patched kernels will cause a null
> pointer dereference in the host kern
On Tue, 9 Jul 2024 14:56:59 +0200
Christoph Schlameuss wrote:
> Add a uc_kvm fixture to create and destroy a ucontrol VM.
>
> * uc_sie_assertions asserts basic settings in the SIE as setup by the
> kernel.
> * uc_attr_mem_limit asserts the memory limit is max value and cannot be
> set (not
On Tue, Jul 9, 2024 at 5:08 AM Mina Almasry wrote:
>
Hi Mina, Thanks a lot for your reply!
> On Thu, Jul 4, 2024 at 10:57 AM Taehee Yoo wrote:
> >
> > I found several locking warnings while testing.
> >
>
> Thanks for Testing Taehee! And sorry for the late reply. I was off for
> a couple of day
The pull request you sent on Mon, 8 Jul 2024 16:42:13 -0600:
> git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
> tags/linux_kselftest-fixes-6.10
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/920bc844baa92fe508d9cb7c72765d6f54dfebe1
Thank you!
--
On 7/5/24 21:54, Stephen Boyd wrote:
Test the KUnit test managed overlay APIs. Confirm that platform devices
are created and destroyed properly. This provides us confidence that the
test managed APIs work correctly and can be relied upon to provide tests
with fake platform devices and device node
This adds two tests for vgetrandom. The first one, vdso_test_chacha,
simply checks that the assembly implementation of chacha20 matches that
of libsodium, a basic sanity check that should catch most errors. The
second, vdso_test_getrandom, is a full "libc-like" implementation of the
userspace side
Add a test case verifying KVM_SET_USER_MEMORY_REGION and
KVM_SET_USER_MEMORY_REGION2 cannot be executed on ucontrol VMs.
Executing this test case on not patched kernels will cause a null
pointer dereference in the host kernel.
Signed-off-by: Christoph Schlameuss
---
.../selftests/kvm/s390x/ucon
Add a test case manipulating s390 storage keys from within the ucontrol
VM.
Signed-off-by: Christoph Schlameuss
---
.../selftests/kvm/s390x/ucontrol_test.c | 83 +++
1 file changed, 83 insertions(+)
diff --git a/tools/testing/selftests/kvm/s390x/ucontrol_test.c
b/tools/te
Add a test case verifying basic running and interaction of ucontrol VMs.
Fill the segment and page tables for allocated memory and map memory on
first access.
* uc_map_unmap
Store and load data to mapped and unmapped memory and use pic segment
translation handling to map memory on access.
Sig
Add test case running code interacting with registers within a
ucontrol VM.
* Add uc_gprs test case
The test uses the same VM setup using the fixture and debug macros
introduced in earlier patches in this series.
Signed-off-by: Christoph Schlameuss
---
.../selftests/kvm/s390x/ucontrol_test.c
Add functions to simply print some basic state information in selftests.
The output can be enabled by setting:
#define TH_LOG_ENABLED 1
#define DEBUG 1
* print_psw: current SIE state description and VM run state
* print_hex_bytes: print memory with some counting markers
* print_hex: PRIN
Subsequent tests do require direct manipulation of the SIE instruction.
This commit introduces the SIE definition for the selftests.
There are already definitions of this within the kernel.
This differs in two ways.
* This is the first definition of this in userspace.
* This does not require atomi
Add a uc_kvm fixture to create and destroy a ucontrol VM.
* uc_sie_assertions asserts basic settings in the SIE as setup by the
kernel.
* uc_attr_mem_limit asserts the memory limit is max value and cannot be
set (not supported).
* uc_no_dirty_log asserts dirty log is not supported.
Signed-off
This patch series adds a selftest suite to validate the s390x
architecture specific ucontrol KVM interface.
When creating a VM on s390x it is possible to create it as userspace
controlled VM or in short ucontrol VM.
These VMs delegates the management of the VM to userspace instead
of handling most
Add test suite to validate the s390x architecture specific ucontrol KVM
interface.
Make use of the selftest test harness.
* uc_cap_hpage testcase verifies that a ucontrol VM cannot be run with
hugepages.
To allow testing of the ucontrol interface the kernel needs a
non-default config containin
Multiple test cases need page size and shift definitions.
By moving the definitions to a single architecture specific header we
limit the repetition.
Make use of PAGE_SIZE, PAGE_SHIFT and PAGE_MASK defines in existing
code.
Signed-off-by: Christoph Schlameuss
---
tools/testing/selftests/kvm/inc
On 2024-07-09 20:26, Stefan Wahren wrote:
> Hi Celeste,
>
> there is a typo in the subject line
>
> s/bcm2855/bcm2835
Will be included in next version.
>
> Am 09.07.24 um 01:49 schrieb Kevin Hilman:
>> Celeste Liu writes:
>>
>>> Commit 673ce00c5d6c ("ARM: omap2plus_defconfig: Add support fo
Hi Celeste,
there is a typo in the subject line
s/bcm2855/bcm2835
Am 09.07.24 um 01:49 schrieb Kevin Hilman:
Celeste Liu writes:
Commit 673ce00c5d6c ("ARM: omap2plus_defconfig: Add support for distros
with systemd") said it's because of recommendation from systemd. But
systemd changed their
On Tue, Jul 09, 2024 at 02:38:42AM -0700, Zhu Jun wrote:
> The requested resources should be closed before return
> in main(), otherwise resource leak will occur
>
> Signed-off-by: Zhu Jun
should have 'PATCHv2 bpf-next' (or bpf) in subject, other than that lgtm
Acked-by: Jiri Olsa
jirka
> --
On Fri, 2024-07-05 at 16:24 +0800, Liu Jing wrote:
> in randomize function, there is a open function, but there is no
> close function in the randomize, which is easy to cause memory leaks.
Please not that the file descriptor is not leaked, the kernel will
dispose it at process exit() time.
>
>
From: Geliang Tang
If bpf_object__load() fails in test_xdp_adjust_frags_tail_grow(), "obj"
opened before this should be closed. So use "goto out" to close it instead
of using "return" here.
Signed-off-by: Geliang Tang
---
tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c | 2 +-
1 file
From: Geliang Tang
Run dummy_st_ops selftests (./test_progs -t dummy_st_ops) on a Loongarch
platform, some "unexpected arg" errors occur:
'''
#78/1dummy_st_ops/dummy_st_ops_attach:OK
test_dummy_init_ret_value:FAIL:test_ret unexpected test_ret: \
actual 0 !=
From: Geliang Tang
Run bpf_tcp_ca selftests (./test_progs -t bpf_tcp_ca) on a Loongarch
platform, some "Segmentation fault" errors occur:
'''
test_dctcp:PASS:bpf_dctcp__open_and_load 0 nsec
test_dctcp:FAIL:bpf_map__attach_struct_ops unexpected error: -524
#29/1bpf_tcp_ca/dctcp:FAIL
test_
From: Geliang Tang
Resend patch 1 out of "skip ENOTSUPP BPF selftests" set as Eduard
suggested. Together with two other cleanups.
Geliang Tang (3):
selftests/bpf: Null checks for links in bpf_tcp_ca
selftests/bpf: Check ASSERT_OK(err) in dummy_st_ops
selftests/bpf: Close obj in error paths
Main function return value is int type, so add return
value in the end
Signed-off-by: Zhu Jun
---
tools/testing/selftests/breakpoints/step_after_suspend_test.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/breakpoints/step_after_suspend_test.c
b/
This variable is never referenced in the code, just remove them.
Signed-off-by: Zhu Jun
---
tools/testing/selftests/breakpoints/step_after_suspend_test.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/testing/selftests/breakpoints/step_after_suspend_test.c
b/tools/testing/selftests/br
The requested resources should be closed before return
in main(), otherwise resource leak will occur
Signed-off-by: Zhu Jun
---
v1 -> v2: check for cg_fd >= 0 and have just one out label
tools/testing/selftests/bpf/test_sockmap.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
+ Dave Miller, Jakub Kicinski, Paolo Abeni, Shuah Khan,
linux-kselftest@vger.kernel.org
On Mon, Jul 08, 2024 at 09:04:05PM +, zijianzh...@bytedance.com wrote:
> From: Zijian Zhang
>
> We update selftests/net/msg_zerocopy.c to accommodate the new mechanism,
> cfg_notification_limit has the
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 now.
make_client() returns normal "fd" instead of "-1" when connect() fails
but
From: Geliang Tang
This patch uses the new helper connect_fd_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
From: Geliang Tang
This patch uses public helper connect_fd_to_fd() exported in
network_helpers.h instead of using getsockname() + connect() in
run_lookup_prog() in prog_tests/sk_lookup.c. This can simplify
the code.
Signed-off-by: Geliang Tang
---
tools/testing/selftests/bpf/prog_tests/sk_loo
From: Geliang Tang
Similar to connect_fd_to_fd() helper to connect from a client fd to a
server fd, this patch adds a new helper connect_fd_to_addr_str() to connect
from a client fd to a server address. It accepts the server address string
"addr_str", together with the server family, type and por
From: Geliang Tang
This patch uses public helper start_server_addr() in udp_recv_send()
in prog_tests/sk_lookup.c to simplify the code.
And use ASSERT_OK_FD() to check fd returned by start_server_addr().
Acked-by: Eduard Zingerman
Signed-off-by: Geliang Tang
---
tools/testing/selftests/bpf/p
From: Geliang Tang
This patch uses public helper start_server_str() to simplify make_server()
in prog_tests/sk_lookup.c.
Add a callback setsockopts() to do all sockopts, set it to post_socket_cb
pointer of struct network_helper_opts. And add a new struct cb_opts to save
the data needed to pass t
From: Geliang Tang
In the error path when update_lookup_map() fails in drop_on_reuseport in
prog_tests/sk_lookup.c, "server1", the fd of server 1, should be closed.
This patch fixes this by using "goto close_srv1" lable instead of "detach"
to close "server1" in this case.
Acked-by: Eduard Zinger
From: Geliang Tang
Some callers expect __start_server() helper to pass their own "backlog"
value to listen() instead of the default of 1. So this patch adds struct
member "backlog" for network_helper_opts to allow callers to set "backlog"
value via start_server_str() helper.
listen(fd, 0 /* back
From: Geliang Tang
Add a new dedicated ASSERT macro ASSERT_OK_FD to test whether a socket
FD is valid or not. It can be used to replace macros ASSERT_GT(fd, 0, ""),
ASSERT_NEQ(fd, -1, "") or statements (fd < 0), (fd != -1).
Suggested-by: Martin KaFai Lau
Signed-off-by: Geliang Tang
---
tools/
From: Geliang Tang
v11:
- new patches 2, 4, 6.
- drop expect_errno from network_helper_opts as Eduard and Martin
suggested.
- drop sockmap_ktls patches from this set.
- add a new helper connect_fd_to_addr_str.
v10:
- a new patch 10 is added.
- patches 1-6, 8-9 unchanged, only commit log
Hello:
This patch was applied to bpf/bpf.git (master)
by Daniel Borkmann :
On Wed, 3 Jul 2024 16:39:31 +0800 you wrote:
> From: Geliang Tang
>
> Run this BPF selftests (./test_progs -t sockmap_basic) on a Loongarch
> platform, a kernel panic occurs:
>
> '''
> Oops[#1]:
> CPU: 22 PID: 2824 Com
Hello,
On 2024-07-08 at 09:39:02 -0700, Reinette Chatre wrote:
>Hi Maciej,
>
>On 7/4/24 12:23 AM, Maciej Wieczor-Retman wrote:
>> On 2024-07-03 at 13:51:03 -0700, Reinette Chatre wrote:
>> > On 7/3/24 12:43 AM, Maciej Wieczór-Retman wrote:
>> > > On 3.07.2024 00:21, Reinette Chatre wrote:
>> > > >
93 matches
Mail list logo