a.com/
The job of this selftest is to catch kernel bug, while such warnings will
unlikely disrupt its role. Mute the warning by force initializing the mfd
and add an ASSERT_GT().
Reviewed-by: Jason Gunthorpe
Signed-off-by: Nicolin Chen
---
tools/testing/selftests/iommu/iommufd.c | 8 ++--
1 fil
y: Nicolin Chen
---
tools/testing/selftests/iommu/iommufd.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/iommu/iommufd.c
b/tools/testing/selftests/iommu/iommufd.c
index e7eb11a94034..e61218c0537f 100644
--- a/tools/testing/selftests/iommu/iommufd.c
+++ b/too
Do not forget to close mfd in the error paths, since none of the callers
would close it when ASSERT_NE(MAP_FAILED, buf) fails.
Fixes: 0bcceb1f51c7 ("iommufd: Selftest coverage for IOMMU_IOAS_MAP_FILE")
Cc: sta...@vger.kernel.org
Reviewed-by: Jason Gunthorpe
Signed-off-by: Ni
1750049883.git.nicol...@nvidia.com/
Thanks
Nicolin
Nicolin Chen (4):
iommufd/selftest: Fix iommufd_dirty_tracking with large hugepage sizes
iommufd/selftest: Add missing close(mfd) in memfd_mmap()
iommufd/selftest: Add asserts testing global mfd
iommufd/selftest: Fix build warnings due to uni
On Mon, Jun 23, 2025 at 12:22 PM Muhammad Usama Anjum
wrote:
>
> On 6/20/25 7:55 PM, Chen Linxuan wrote:
> > On Fri, Jun 20, 2025 at 10:46 PM Muhammad Usama Anjum
> > wrote:
> >>
> >> On 6/20/25 8:50 AM, Chen Linxuan wrote:
> >>> When running `ma
("/");
| ^~
Signed-off-by: Chen Linxuan
---
Changes in v3:
- Apply changes suggested by Muhammad Usama Anjum
- Link to v2:
https://lore.kernel.org/all/20250620035125.2938774-2-chenlinx...@uniontech.com/
Changes in v2:
- Apply changes suggested by Shuah Khan
("/");
| ^~
Signed-off-by: Chen Linxuan
---
Changes in v3:
- Apply changes suggested by Muhammad Usama Anjum
- Link to v2:
https://lore.kernel.org/all/20250620035125.2938774-2-chenlinx...@uniontech.com/
Changes in v2:
- Apply changes suggested by Shuah Khan
On Fri, Jun 20, 2025 at 10:46 PM Muhammad Usama Anjum
wrote:
>
> On 6/20/25 8:50 AM, Chen Linxuan wrote:
> > When running `make kselftest`, the following compilation warning was
> > encountered:
> >
> > mount-notify_test.c: In function ‘fanotify_rmdir’:
> >
("/");
| ^~
Signed-off-by: Chen Linxuan
---
Changes in v2:
- Apply changes suggested by Shuah Khan
- Link to v1:
https://lore.kernel.org/all/20250610020758.2798787-2-chenlinx...@uniontech.com/
---
.../filesystems/mount-notify/mount-notify_te
;
| ^~~
Signed-off-by: Chen Linxuan
---
.../selftests/filesystems/mount-notify/mount-notify_test.c | 7 ---
.../filesystems/mount-notify/mount-notify_test_ns.c| 7 ---
2 files changed, 14 deletions(-)
diff --git
a/tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c
On Fri, Jun 20, 2025 at 1:02 AM Shuah Khan wrote:
>
> On 6/19/25 01:43, Chen Linxuan wrote:
> > On Thu, Jun 19, 2025 at 5:21 AM Shuah Khan
> > wrote:
> >>
> >> On 6/9/25 20:05, Chen Linxuan wrote:
> >>> When writing a test for fusectl, I re
On Fri, Jun 20, 2025 at 5:41 AM Shuah Khan wrote:
>
> On 6/19/25 13:00, John Hubbard wrote:
> > On 6/19/25 10:00 AM, Shuah Khan wrote:
> >> On 6/19/25 01:46, Chen Linxuan wrote:
> >>> On Thu, Jun 19, 2025 at 5:23 AM Shuah Khan
> >>> wrot
On Thu, Jun 19, 2025 at 5:23 AM Shuah Khan wrote:
>
> On 6/9/25 20:07, Chen Linxuan wrote:
> > When running `make kselftest`, the following compilation warning was
> > encountered:
> >
> > mount-notify_test.c: In function ‘fanotify_rmdir’:
> > mount-notify_tes
On Thu, Jun 19, 2025 at 5:21 AM Shuah Khan wrote:
>
> On 6/9/25 20:05, Chen Linxuan wrote:
> > When writing a test for fusectl, I referred to this Makefile as a
> > reference for creating a FUSE daemon in the selftests.
> > While doing so, I noticed that there is a min
On Thu, Jun 19, 2025 at 5:25 AM Shuah Khan wrote:
>
> On 6/9/25 20:08, Chen Linxuan wrote:
> > I failed to build this test on Ubuntu 24.04.
> > Compiler complained about undefined functions mount, umount and some
> > mount related flags.
> >
> > Signed-off-b
On Thu, Jun 19, 2025 at 5:25 AM Shuah Khan wrote:
>
> On 6/9/25 20:08, Chen Linxuan wrote:
> > I failed to build this test on Ubuntu 24.04.
> > Compiler complained about undefined functions mount, umount and some
> > mount related flags.
> >
> > Signed-off-b
On Tue, Jun 17, 2025 at 08:01:36PM -0300, Jason Gunthorpe wrote:
> On Tue, Jun 17, 2025 at 02:23:41PM -0700, Nicolin Chen wrote:
> > On Tue, Jun 17, 2025 at 08:59:48AM -0300, Jason Gunthorpe wrote:
> > > On Mon, Jun 16, 2025 at 07:02:08PM -0700, Nicolin Chen wrote:
&g
On Tue, Jun 17, 2025 at 08:59:48AM -0300, Jason Gunthorpe wrote:
> On Mon, Jun 16, 2025 at 07:02:08PM -0700, Nicolin Chen wrote:
> > ---breakdown---
> > After `posix_memalign()`:
> > [ posix_memalign() memory ] ← malloc thinks it owns this
> >
> > Then
Reviewed-by: Huacai Chen
On Wed, Jun 11, 2025 at 7:28 PM Thomas Weißschuh
wrote:
>
> Not all tasks have an ABI associated or vDSO mapped,
> for example kthreads never do.
> If such a task ever ends up calling stack_top(), it will derefence the
> NULL ABI pointer and crash.
&
On Mon, Jun 16, 2025 at 01:25:01PM -0300, Jason Gunthorpe wrote:
> On Sun, Jun 15, 2025 at 10:02:03PM -0700, Nicolin Chen wrote:
> > FIXTURE_TEARDOWN(iommufd_dirty_tracking)
> > {
> > - munmap(self->buffer, variant->buffer_size);
> > - munmap(self->bi
/aei8dv+ref3v3...@nvidia.com/
This is on github:
https://github.com/nicolinc/iommufd/commits/iommufd_selftest_fixes-v6.16
Thanks
Nicolin
Nicolin Chen (4):
iommufd/selftest: Fix iommufd_dirty_tracking with large hugepage sizes
iommufd/selftest: Add missing close(mfd) in memfd_mmap()
iommufd
a.com/
The job of this selftest is to catch kernel bug, while such warnings will
unlikely disrupt its role. Mute the warning by force initializing the mfd
and add an ASSERT_GT().
Signed-off-by: Nicolin Chen
---
tools/testing/selftests/iommu/iommufd.c | 8 ++--
1 file changed, 6 insertions(+), 2 d
T_GET_DIRTY_BITMAP")
Cc: sta...@vger.kernel.org
Signed-off-by: Nicolin Chen
---
tools/testing/selftests/iommu/iommufd.c | 28 -
1 file changed, 23 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/iommu/iommufd.c
b/tools/testing/selftests/iommu/iommu
Do not forget to close mfd in the error paths, since none of the callers
would close it when ASSERT_NE(MAP_FAILED, buf) fails.
Fixes: 0bcceb1f51c7 ("iommufd: Selftest coverage for IOMMU_IOAS_MAP_FILE")
Cc: sta...@vger.kernel.org
Signed-off-by: Nicolin Chen
---
tools/testing/selft
The mfd and mfd_buffer will be used in the tests directly without an extra
check. Test them in setup_sizes() to ensure they are safe to use.
Fixes: 0bcceb1f51c7 ("iommufd: Selftest coverage for IOMMU_IOAS_MAP_FILE")
Cc: sta...@vger.kernel.org
Signed-off-by: Nicolin Chen
---
too
On Thu, Jun 12, 2025 at 4:56 PM Miklos Szeredi wrote:
>
> On Tue, 10 Jun 2025 at 04:10, Chen Linxuan wrote:
> >
> > This patch add a simple functional test for the "abort" file
> > in fusectlfs (/sys/fs/fuse/connections/ID/about).
> >
>
On Thu, Jun 12, 2025 at 08:31:38PM -0300, Jason Gunthorpe wrote:
> On Thu, Jun 12, 2025 at 12:03:14PM -0700, Nicolin Chen wrote:
> > On Thu, Jun 12, 2025 at 03:56:13PM -0300, Jason Gunthorpe wrote:
> > > On Thu, Jun 12, 2025 at 11:53:24AM -0700, Nicolin Chen wrote:
> >
On Thu, Jun 12, 2025 at 03:56:13PM -0300, Jason Gunthorpe wrote:
> On Thu, Jun 12, 2025 at 11:53:24AM -0700, Nicolin Chen wrote:
> > @@ -2022,7 +2023,19 @@ FIXTURE_SETUP(iommufd_dirty_tracking)
> > self->fd = open("/dev/iommu", O_RDWR);
> &
On Thu, Jun 12, 2025 at 10:53:34AM -0700, Nicolin Chen wrote:
> On Thu, Jun 12, 2025 at 12:42:42PM -0300, Jason Gunthorpe wrote:
> > On Thu, Jun 12, 2025 at 05:23:01PM +0200, Thomas Weißschuh wrote:
> > > On Thu, Jun 12, 2025 at 11:58:01AM -0300, Jason Gunthorpe wrote:
> >
On Thu, Jun 12, 2025 at 12:42:42PM -0300, Jason Gunthorpe wrote:
> On Thu, Jun 12, 2025 at 05:23:01PM +0200, Thomas Weißschuh wrote:
> > On Thu, Jun 12, 2025 at 11:58:01AM -0300, Jason Gunthorpe wrote:
> > > On Thu, Jun 12, 2025 at 04:27:41PM +0200, Thomas Weißschuh wrote:
> > >
> > > > If the ass
g_OBhmSY=q...@mail.gmail.com/
Signed-off-by: Chen Linxuan
Acked-by: Shuah Khan
Reviewed-by: Amir Goldstein
Co-developed-by: Miklos Szeredi
Reviewed-by: Miklos Szeredi
---
Changes in v4:
- Apply patch suggested by Miklos Szeredi
- Setting up a userns environment for testing
- Fix a EBUSY on um
On Wed, Jun 11, 2025 at 08:51:17PM -0300, Jason Gunthorpe wrote:
> On Wed, Jun 11, 2025 at 04:43:00PM -0700, Nicolin Chen wrote:
> > So, the test case sets an alignment with HUGEPAGE_SIZE=512MB while
> > allocating buffer_size=64MB:
> > rc = posix_memalign(&self->bu
On Wed, Jun 11, 2025 at 02:48:16PM -0700, Nicolin Chen wrote:
> On Wed, Jun 11, 2025 at 10:19:56AM -0700, Nicolin Chen wrote:
> > On Wed, Jun 11, 2025 at 10:04:35AM +0200, Thomas Weißschuh wrote:
> > > On Wed, Jun 11, 2025 at 12:05:25AM -0700, Nicolin Chen wrote:
> > >
On Wed, Jun 11, 2025 at 10:19:56AM -0700, Nicolin Chen wrote:
> On Wed, Jun 11, 2025 at 10:04:35AM +0200, Thomas Weißschuh wrote:
> > On Wed, Jun 11, 2025 at 12:05:25AM -0700, Nicolin Chen wrote:
> > > 2) parent doesn't seem to wait for the setup() to complete..
> >
On Wed, Jun 11, 2025 at 10:04:35AM +0200, Thomas Weißschuh wrote:
> On Wed, Jun 11, 2025 at 12:05:25AM -0700, Nicolin Chen wrote:
> > On Tue, Jun 10, 2025 at 08:46:57PM -0300, Jason Gunthorpe wrote:
> > > On Tue, Jun 10, 2025 at 11:48:44AM -0700, Nicolin Chen wrote:
> > >
added to the bindings? I suggest that these should be
determined before officially merging this bindings.
Thanks,
Chen
Signed-off-by: Junhui Liu
---
.../bindings/remoteproc/sophgo,cv1800b-c906l.yaml | 68 ++
1 file changed, 68 insertions(+)
diff --git
a/Documentation
On Tue, Jun 10, 2025 at 08:46:57PM -0300, Jason Gunthorpe wrote:
> On Tue, Jun 10, 2025 at 11:48:44AM -0700, Nicolin Chen wrote:
> > On Tue, Jun 10, 2025 at 09:09:02AM -0300, Jason Gunthorpe wrote:
> > > On Tue, Jun 10, 2025 at 01:38:22PM +0200, Thom
On Tue, Jun 10, 2025 at 02:21:25PM +0200, Thomas Weißschuh wrote:
> The following diff *alone* also prevents the warning, but that doesn't
> make any sense either:
>
> --- a/tools/testing/selftests/iommu/iommufd_utils.h
> +++ b/tools/testing/selftests/iommu/iommufd_utils.h
> @@ -65,7 +65,7 @@ stat
On Tue, Jun 10, 2025 at 09:09:02AM -0300, Jason Gunthorpe wrote:
> On Tue, Jun 10, 2025 at 01:38:22PM +0200, Thomas Weißschuh wrote:
> > > --
> > > # RUN
> > > iommufd_dirty_tracking.domain_dirty128M_huge.enforce_dirty ...
add allocation tagging support for memory allocation
profiling")
Signed-off-by: Casey Chen
Reviewed-by: Yuanyuan Zhong
Acked-by: Suren Baghdasaryan
---
include/asm-generic/codetag.lds.h | 6 --
scripts/module.lds.S | 5 -
2 files changed, 11 deletions(-)
diff --git a
Hi Thomas,
CC += Jason
On Mon, May 05, 2025 at 05:15:27PM +0200, Thomas Weißschuh wrote:
> To get rid of setjmp()/longjmp(), the teardown logic needs to be usable
> from __bail(). To access the atomic teardown conditional from there,
> move it into the test metadata.
> This also allows the remova
Hi Thomas,
CC += Jason
On Mon, May 05, 2025 at 05:15:30PM +0200, Thomas Weißschuh wrote:
> Usage of longjmp() was added to ensure that teardown is always run in
> commit 63e6b2a42342 ("selftests/harness: Run TEARDOWN for ASSERT failures")
> However instead of calling longjmp() to the teardown han
g_OBhmSY=q...@mail.gmail.com/
Signed-off-by: Chen Linxuan
Acked-by: Shuah Khan
Reviewed-by: Amir Goldstein
---
Changes in v3:
- Apply changes suggested by Amir Goldstein
- Rename the test subdir to filesystems/fuse
- Verify errno when connection is aborted
- Apply changes suggested by Shuah Khan
I failed to build this test on Ubuntu 24.04.
Compiler complained about undefined functions mount, umount and some
mount related flags.
Signed-off-by: Chen Linxuan
---
tools/testing/selftests/pid_namespace/pid_max.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests
("/");
| ^~
This patch addresses the warning by
explicitly suppressing the unused result of the `chdir` function.
Signed-off-by: Chen Linxuan
---
.../selftests/filesystems/mount-notify/mount-notify_test.c| 4 +++-
1 file changed, 3 insertions(+),
takes effect.
The reason fuse_mnt compiles successfully is because CFLAGS is set
at the very beginning of the file.
Signed-off-by: Chen Linxuan
---
tools/testing/selftests/memfd/Makefile | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tools/testing/selftests/memfd/Makefile
b
The selftest can reproduce an issue where using bpf_msg_pop_data() in
ktls causes errors on the receiving end.
Signed-off-by: Jiayuan Chen
---
.../selftests/bpf/prog_tests/sockmap_ktls.c | 91 +++
.../selftests/bpf/progs/test_sockmap_ktls.c | 4 +
2 files changed, 95
transmission.
This causes uninitialized bytes to be appended after a complete
"Application Data" packet, leading to errors on the receiving end when
parsing TLS record.
Fixes: d3b18ad31f93 ("tls: add bpf support to sk_msg handling")
Reported-by: Cong Wang
Signed-off-by: Jiayu
eck and added Reviewed-by tag.
https://lore.kernel.org/bpf/20250605145529.3q3aqr6iygpa6...@gmail.com/
Jiayuan Chen (2):
bpf,ktls: Fix data corruption when using bpf_msg_pop_data() in ktls
selftests/bpf: Add test to cover ktls with bpf_msg_pop_data
net/tls/tls_sw.c
V3 has been sent. See
https://lore.kernel.org/all/20250526014226.14192-1-chenlinx...@uniontech.com/
On Tue, Jun 3, 2025 at 7:02 AM Shuah Khan wrote:
>
> On 5/25/25 19:41, Chen Linxuan wrote:
> > On Fri, May 23, 2025 at 6:50 AM Shuah Khan
> > wrote:
> >
> >>
2025/5/30 02:16, "Cong Wang" 写到:
>
> On Fri, May 23, 2025 at 09:18:58PM +0800, Jiayuan Chen wrote:
>
> >
> > When sending plaintext data, we initially calculated the corresponding
> >
> > ciphertext length. However, if we later reduced the plaint
from cgroup sockopt:OK
53 cgroup_get_classid:OK
Summary: 1/4 PASSED, 0 SKIPPED, 0 FAILED
Signed-off-by: Jiayuan Chen
---
.../selftests/bpf/prog_tests/cgroup_classid.c | 212 ++
.../selftests/bpf/progs/test_cgroup_classid.c | 51 +
2 files changed, 263 insertions
c7ed68b95cfa6...@syzkaller.appspotmail.com
Signed-off-by: Jiayuan Chen
---
include/linux/bpf-cgroup.h | 8
kernel/bpf/cgroup.c| 25 +
kernel/bpf/helpers.c | 4
3 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/include/linux/b
g_OBhmSY=q...@mail.gmail.com/
Cc: Amir Goldstein
Signed-off-by: Chen Linxuan
Acked-by: Shuah Khan
---
Changes in v3:
- Apply changes suggested by Amir Goldstein
- Rename the test subdir to filesystems/fuse
- Verify errno when connection is aborted
- Apply changes suggested by Shuah Khan
- Upd
On Fri, May 23, 2025 at 6:50 AM Shuah Khan wrote:
> Also if this test requires root previlege, add check for it.
Currently, this test does not require root privileges.
Thanks,
Chen Linxuan
The selftest can reproduce an issue where using bpf_msg_pop_data() in
ktls causes errors on the receiving end.
Signed-off-by: Jiayuan Chen
---
.../selftests/bpf/prog_tests/sockmap_ktls.c | 91 +++
.../selftests/bpf/progs/test_sockmap_ktls.c | 4 +
2 files changed, 95
transmission.
This causes uninitialized bytes to be appended after a complete
"Application Data" packet, leading to errors on the receiving end when
parsing TLS record.
Fixes: d3b18ad31f93 ("tls: add bpf support to sk_msg handling")
Reported-by: Cong Wang
Signed-off-by: Jiayua
sockhash:ktls:txmsg test push/pop data:OK
44/ 1 sockhash:ktls:txmsg test ingress parser:OK
45/ 0 sockhash:ktls:txmsg test ingress parser2:OK
Pass: 45 Fail: 0
[1]:
https://lore.kernel.org/bpf/CAM_iQpU7=4xjbefzoxndkox9gffmoe7fcwmq5thbsymbrnm...@mail.gmail.com/
Jiayuan Chen (2):
bpf,ktl
; profiling when this error happens, instead we fail to load the module.
>
> Fixes: 10075262888b ("alloc_tag: allocate percpu counters for module tags
> dynamically")
> Reported-by: Casey Chen
> Closes:
> https://lore.kernel.org/all/20250520231620.15259-1-cac...@purestor
On Thu, May 15, 2025 at 6:27 PM Amir Goldstein wrote:
>
> On Thu, May 15, 2025 at 9:35 AM Chen Linxuan
> wrote:
> >
> > + ret = read(test_fd, path_buf, sizeof(path_buf));
> > + ASSERT_LT(ret, 0);
>
> Nice!
> I guess you could also verify errno ==
g_OBhmSY=q...@mail.gmail.com/
Cc: Amir Goldstein
Signed-off-by: Chen Linxuan
---
Changes in v2:
- Apply changes suggested by Amir Goldstein
- Check errno
- Link to v1:
https://lore.kernel.org/all/20250515073449.346774-2-chenlinx...@uniontech.com/
---
MAINTAINERS
takes effect.
The reason fuse_mnt compiles successfully is because CFLAGS is set
at the very beginning of the file.
Signed-off-by: Chen Linxuan
---
tools/testing/selftests/memfd/Makefile | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tools/testing/selftests/memfd/Makefile
b
g_OBhmSY=q...@mail.gmail.com/
Cc: Amir Goldstein
Signed-off-by: Chen Linxuan
---
MAINTAINERS | 1 +
tools/testing/selftests/Makefile | 1 +
.../selftests/filesystems/fusectl/.gitignore | 3 +
.../selftests/filesystems/fusectl/Makefil
On Thu, May 15, 2025 at 3:35 PM Chen Linxuan wrote:
> This patch add a simple functional test for the "about" file
Sorry for the typo, it should be "abort".
I failed to build this test on Ubuntu 24.04. Compiler complains that
function sys_open_tree has already been defined in
"../filesystems/overlayfs/wrappers.h".
Signed-off-by: Chen Linxuan
---
tools/testing/selftests/mount_setattr/mount_setattr_test.c | 5 -
1 file changed, 5
I failed to build this test on Ubuntu 24.04.
Compiler complained about undefined functions mount, umount and some
mount related flags.
Signed-off-by: Chen Linxuan
---
tools/testing/selftests/pid_namespace/pid_max.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests
("/");
| ^~
This patch addresses the warning by
explicitly suppressing the unused result of the `chdir` function.
Signed-off-by: Chen Linxuan
---
.../selftests/filesystems/mount-notify/mount-notify_test.c| 4 +++-
1 file changed, 3 insertions(+),
; F: arch/loongarch/include/asm/kvm*
> F: arch/loongarch/include/uapi/asm/kvm*
> F: arch/loongarch/kvm/
> +F: tools/testing/selftests/kvm/*/loongarch/
> +F: tools/testing/selftests/kvm/lib/loongarch/
>
> KERNEL VIRTUAL MACHINE FOR MIPS (KVM/mips)
> M:
Hi, Bibo,
On Sun, Apr 27, 2025 at 2:45 PM Bibo Mao wrote:
>
> Add core KVM selftests support for LoongArch, it includes exception
> handler, mmu page table setup and vCPU startup entry support.
>
> Signed-off-by: Bibo Mao
> ---
> .../selftests/kvm/lib/loongarch/exception.S | 59 +++
> .../se
Hi, Bibo,
On Sun, Apr 27, 2025 at 2:45 PM Bibo Mao wrote:
>
> This patchset adds KVM selftests for LoongArch system, currently only
> some common test cases are supported and pass to run. These test cases
> are listed as following:
> coalesced_io_test
> demand_paging_test
> dirty_log_
On Tue, May 06, 2025 at 09:58:47AM -0300, Jason Gunthorpe wrote:
> On Mon, May 05, 2025 at 07:53:44PM -0700, Nicolin Chen wrote:
> > On Mon, May 05, 2025 at 02:08:07PM -0300, Jason Gunthorpe wrote:
> > > On Wed, Apr 30, 2025 at 12:58:47AM -0700, Nicolin Chen wrote:
> >
On Mon, May 05, 2025 at 02:08:07PM -0300, Jason Gunthorpe wrote:
> On Wed, Apr 30, 2025 at 12:58:47AM -0700, Nicolin Chen wrote:
>
> > > ... and I just hit a problem with it - this is basically guest BDFn
> > > and it works as long as I'm hotplugging the TEE-IO VF
2025/5/1 12:42, "Kuniyuki Iwashima" wrote:
>
> From: Jiayuan Chen
>
> Date: Thu, 1 May 2025 11:51:08 +0800
>
> >
> > For some services we are using "established-over-unconnected" model.
> >
> >
> >
> > ''
Add a new selftest, which uses UDP_STOP_RCV to make UDP simulate TCP's
listen and accept.
Signed-off-by: Jiayuan Chen
---
tools/testing/selftests/net/.gitignore| 1 +
tools/testing/selftests/net/Makefile | 1 +
.../testing/selftests/net/test_udp_stop_rcv.c
explicit boundaries, and we
receive a complete packet before creating a connected socket.)
Before this patch, the connected socket had to filter requests at recvmsg
time, acting as a dispatcher to some extent. With this patch, we can
consider the bind and connect operations to be atomic.
Signed-off-by:
On Wed, Apr 30, 2025 at 05:54:53PM +1000, Alexey Kardashevskiy wrote:
> On 4/10/24 21:41, Jason Gunthorpe wrote:
> > On Fri, Oct 04, 2024 at 02:32:28PM +1000, Alexey Kardashevskiy wrote:
> >
> > > > + __u32 __reserved;
> > > > + __aligned_u64 vdev_id;
>
> I believe this ended up being
2025/4/29 08:14, "Cong Wang" wrote:
>
> On Fri, Apr 25, 2025 at 01:59:57PM +0800, Jiayuan Chen wrote:
>
> >
> > net/tls/tls_sw.c | 7 +++
> >
> > 1 file changed, 7 insertions(+)
> >
> >
> >
> > diff --git
aAmIi0vlycHtbXeb@pop-os.localdomain/T/#t
Fixes: d3b18ad31f93 ("tls: add bpf support to sk_msg handling")
Signed-off-by: Jiayuan Chen
---
net/tls/tls_sw.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
index f3d7d19482da..fc88e34b7f33 10
? __list_add_valid_or_report+0x83/0xea
? srso_return_thunk+0x5/0x5f
? __list_add+0x45/0x52
process_scheduled_works+0x73/0x82
worker_thread+0x1ce/0x2ae
Signed-off-by: Jiayuan Chen
---
.../selftests/bpf/prog_tests/sockmap_ktls.c | 76 +++
.../selftests/bpf/progs
ogical changes, but only
fills in the missing uncharge places.
This issue has existed all along, until it was exposed after we added the
apply test in test_sockmap:
commit 3448ad23b34e ("selftests/bpf: Add apply_bytes test to
test_txmsg_redir_wait_sndmem in test_sockmap")
Jiayua
April 23, 2025 at 08:13, "Martin KaFai Lau" wrote:
>
> On 4/16/25 9:40 PM, Jiayuan Chen wrote:
>
> >
> > when we attach a prog without cgroup_storage map being used,
> >
> > cgroup_storage in struct bpf_prog_array_item is empty. Then, if we use
&g
Hi, Bibo,
On Wed, Apr 16, 2025 at 11:55 AM Bibo Mao wrote:
>
> Add core KVM selftests support for LoongArch, it includes exception
> handler, mmu page table setup and vCPU startup entry support.
>
> Signed-off-by: Bibo Mao
> ---
> .../selftests/kvm/lib/loongarch/exception.S | 59 +++
> .../s
Hi, Bibo,
On Wed, Apr 16, 2025 at 11:55 AM Bibo Mao wrote:
>
> Add KVM selftests header files for LoongArch, including processor.h
> and kvm_util_base.h. It mainly contains LoongArch CSR register
> definition and page table entry definition.
>
> Signed-off-by: Bibo Mao
> ---
> .../testing/selft
ing 0 nsec
test_cgroup_storage_update:PASS:third ping 0 nsec
61 cgroup_storage_update:OK
Summary: 1/0 PASSED, 0 SKIPPED, 0 FAILED
Signed-off-by: Jiayuan Chen
---
.../selftests/bpf/prog_tests/cgroup_storage.c | 45 +++
.../selftests/bpf/progs/cgroup_storage.c | 6 +++
2 fil
stroage in bpf_get_local_storage.
Reported-by: syzbot+e6e8f6618a2d4b35e...@syzkaller.appspotmail.com
Closes:
https://lore.kernel.org/all/67fc867e.050a0220.2970f9.03b8@google.com/T/
Fixes: 0c991ebc8c69 ("bpf: Implement bpf_prog replacement for an active
bpf_cgroup_link")
Signed-off-by: Ji
truct
bpf_prog_array_item is empty.
Then, if we use BPF_LINK_UPDATE to replace the old program with a new one
that uses the cgroup_storage map, we miss the cgroup_storage being
initialized.
This causes a panic when accessing storage in bpf_get_local_storage.
Jiayuan Chen (2):
bpf: Create cgroup st
Hi, Thomas,
On Tue, Apr 15, 2025 at 3:10 PM Thomas Weißschuh
wrote:
>
> Not all tasks have an ABI associated or vDSO mapped,
> for example kthreads never do.
> If such a task ever ends up calling stack_top(), it will derefence the
> NULL ABI pointer and crash.
>
> This can for example happen when
Hi, Bibo,
On Thu, Apr 10, 2025 at 11:57 AM Bibo Mao wrote:
>
> Add KVM selftests header files for LoongArch, including processor.h
> and kvm_util_base.h. It mainly contains LoongArch CSR register
> definition and page table entry definition.
>
> Signed-off-by: Bibo Mao
> ---
> .../testing/selft
Hi, Thomas,
On Mon, Apr 14, 2025 at 4:29 PM Thomas Weißschuh
wrote:
>
> Not all tasks have an ABI associated or vDSO mapped,
> for example kthreads never do.
> If such a task ever ends up calling stack_top(), it will derefence the
> NULL vdso pointer and crash.
>
> This can for example happen whe
e: in expansion of macro
'BUILD_BUG_ON'
401 | BUILD_BUG_ON(!is_power_of_2(virtvdev->bar0_virtual_buf_size));
| ^~~~
Signed-off-by: Winston Wen
Co-Developed-by: Chen Linxuan
Signed-off-by: Chen Linxuan
---
drivers/vfio/pci/virtio/legacy_io.c | 2 +-
equires maintainers to spare
some time from their busy schedules for review.
https://lore.kernel.org/bpf/20250317092257.68760-1-jiayuan.c...@linux.dev/T/#t
Jiayuan Chen (4):
bpf, sockmap: Fix data lost during EAGAIN retries
bpf, sockmap: fix duplicated data transmission
bpf, sockmap: Fix panic
dresses
the immediate issue.
Fixes: c63829182c37 ("af_unix: Implement ->psock_update_sk_prot()")
Reported-by: syzbot+dd90a702f518e0eac...@syzkaller.appspotmail.com
Closes:
https://lore.kernel.org/bpf/6734c033.050a0220.2a2fcc.0015@google.com/
Signed-off-by: Jiayuan Chen
---
net/core/skmsg.c | 1
selftest of edge case for TCP/UDP sockets.
3. Add Reviewed-by and Acked-by tag.
https://lore.kernel.org/bpf/20250226132242.52663-1-jiayuan.c...@linux.dev/T/#t
Jiayuan Chen (3):
bpf, sockmap: avoid using sk_socket after free when sending
bpf, sockmap: avoid using sk_socket after free when reading
Add edge case tests for sockmap.
Signed-off-by: Jiayuan Chen
---
.../selftests/bpf/prog_tests/socket_helpers.h | 13 +++-
.../selftests/bpf/prog_tests/sockmap_basic.c | 60 +++
2 files changed, 72 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/prog_tests
a0
? exc_general_protection+0x14c/0x230
? asm_exc_general_protection+0x26/0x30
? sock_sendmsg+0x21d/0x440
? sock_sendmsg+0x3e0/0x440
? __pfx_sock_sendmsg+0x10/0x10
__skb_send_sock+0x543/0xb70
sk_psock_backlog+0x247/0xb80
...
'''
Reported-by: Michal Luczaj
Fixes: 799aa7f98d53 (&qu
path
to resend the entire skb data instead of continuing from the previous
offset, resulting in data overlap at the receiver side.
Fixes: 405df89dd52c ("bpf, sockmap: Improved check for empty queue")
Signed-off-by: Jiayuan Chen
---
net/core/skmsg.c | 14 +-
1 file change
k can be run with:
'''
./bench sockmap -c 2 -p 1 -a --rx-verdict-ingress
'''
In the future, we plan to move socket_helpers.h out of the prog_tests
directory to make it accessible for the benchmark. This will enable
better support for various socket types.
Signed-off-b
sockmap'...
create socket fd c1:13 p1:14 c2:15 p2:16
Benchmark 'sockmap' started.
Send Speed 1347.236 MB/s, BPF Speed 1347.367 MB/s, Rcv Speed 65.402 MB/s
Send Speed 1353.320 MB/s, BPF Speed 1353.320 MB/s, Rcv Speed 65.536 MB/s
Send Speed 1353.186 MB/s, BPF Speed 1353.121 MB/s,
| sk_psock_skb_ingress_enqueue
sk_psock_verdict_apply_↑ skb_linearize
'''
Note that for verdict_apply path, the skb_get operation is unnecessary so
we add 'take_ref' param to control it's behavior.
Fixes: a454d84ee20b (&qu
run adjust head with size 20 cost 58 ns
run adjust head with size 40 cost 58 ns
run adjust head with size 200 cost 66 ns
Signed-off-by: Jiayuan Chen
---
.../selftests/bpf/prog_tests/xdp_perf.c | 52 ---
tools/testing/selftests/bpf/progs/xdp_dummy.c | 14 +
2 files changed
1 - 100 of 5184 matches
Mail list logo