Re: [PATCH v4 4/5] selftests/resctrl: Add resource_info_file_exists()

2024-02-05 Thread Maciej Wieczor-Retman
Hi Reinette! On 2024-02-05 at 20:17:48 -0800, Reinette Chatre wrote: >Hi Maciej, > >On 2/5/2024 4:08 AM, Maciej Wieczor-Retman wrote: >> Feature checking done by resctrl_mon_feature_exists() covers features >> represented by the feature name presence inside the 'mon_features' file >> in

[broonie-misc:kselftest-seccomp-benchmark-ktap] [kselftest/seccomp] 626fa92237: kernel-selftests.seccomp.seccomp_benchmark.fail

2024-02-05 Thread kernel test robot
Hello, kernel test robot noticed "kernel-selftests.seccomp.seccomp_benchmark.fail" on: commit: 626fa9223749db85f03678573dd49ba2c7b6cd8b ("kselftest/seccomp: Report each expectation we assert as a KTAP test") https://git.kernel.org/cgit/linux/kernel/git/broonie/misc.git

Re: [PATCH v4 5/5] selftests/resctrl: Add non-contiguous CBMs CAT test

2024-02-05 Thread Reinette Chatre
Hi Maciej, On 2/5/2024 4:08 AM, Maciej Wieczor-Retman wrote: > Add tests for both L2 and L3 CAT to verify the return values > generated by writing non-contiguous CBMs don't contradict the > reported non-contiguous support information. > > Use a logical XOR to confirm return value of

Re: [PATCH v4 4/5] selftests/resctrl: Add resource_info_file_exists()

2024-02-05 Thread Reinette Chatre
Hi Maciej, On 2/5/2024 4:08 AM, Maciej Wieczor-Retman wrote: > Feature checking done by resctrl_mon_feature_exists() covers features > represented by the feature name presence inside the 'mon_features' file > in /sys/fs/resctrl/info/L3_MON directory. There exists a different way > to represent

Re: [PATCH v4 3/5] selftests/resctrl: Split validate_resctrl_feature_request()

2024-02-05 Thread Reinette Chatre
On 2/5/2024 5:24 AM, Maciej Wieczor-Retman wrote: > On 2024-02-05 at 14:41:30 +0200, Ilpo Järvinen wrote: >> On Mon, 5 Feb 2024, Maciej Wieczor-Retman wrote: >> >>> validate_resctrl_feature_request() is used to test both if a resource is >>> present in the info directory, and if a passed

Re: [PATCH v4 2/5] selftests/resctrl: Add helpers for the non-contiguous test

2024-02-05 Thread Reinette Chatre
Hi Maciej, The subject mentions "helpers" (plural) that may not be accurate anymore. On 2/5/2024 4:08 AM, Maciej Wieczor-Retman wrote: > The CAT non-contiguous selftests have to read the file responsible for > reporting support of non-contiguous CBMs in kernel (resctrl). Then the > test compares

Re: [PATCH v4 1/5] selftests/resctrl: Add test groups and name L3 CAT test L3_CAT

2024-02-05 Thread Reinette Chatre
Hi Maciej, On 2/5/2024 4:07 AM, Maciej Wieczor-Retman wrote: > From: Ilpo Järvinen > > To select test to run -t parameter can be used. However, -t cat > currently maps to L3 CAT test which will be confusing after more CAT > related tests will be added. > > Allow selecting tests as groups and

Re: [KTAP V2 PATCH v2] ktap_v2: add test metadata

2024-02-05 Thread Rae Moar
On Sun, Feb 4, 2024 at 8:03 AM Kees Cook wrote: > > > > On January 26, 2024 11:14:26 PM GMT+01:00, Rae Moar wrote: > > KTAP version 2 > > # ktap_test: main > > # ktap_arch: uml > > 1..1 > > KTAP version 2 > > # ktap_test: suite_1 > > # ktap_subsystem: example > > #

Re: [KTAP V2 PATCH v2] ktap_v2: add test metadata

2024-02-05 Thread Rae Moar
On Sat, Feb 3, 2024 at 1:50 AM David Gow wrote: > > On Sat, 27 Jan 2024 at 06:15, Rae Moar wrote: > > > > Add specification for test metadata to the KTAP v2 spec. > > > > KTAP v1 only specifies the output format of very basic test information: > > test result and test name. Any additional test

Re: [KTAP V2 PATCH v2] ktap_v2: add test metadata

2024-02-05 Thread Rae Moar
On Wed, Jan 31, 2024 at 5:22 PM Bird, Tim wrote: > > > > > -Original Message- > > From: Rae Moar > > Add specification for test metadata to the KTAP v2 spec. > > > > KTAP v1 only specifies the output format of very basic test information: > > test result and test name. Any additional

Re: [PATCH v5 00/12] RISCV: Add kvm Sstc timer selftests

2024-02-05 Thread Haibo Xu
On Tue, Feb 6, 2024 at 12:24 AM Marc Zyngier wrote: > > On Mon, 05 Feb 2024 13:10:26 +, > Haibo Xu wrote: > > > > Hi Marc, > > > > Could you help review the first 3 patches in this series? > > For these 3 patches: > > Reviewed-by: Marc Zyngier > Thanks for the review! > Thanks, > >

Re: [PATCH v3 3/3] selftests: add zswapin and no zswap tests

2024-02-05 Thread Nhat Pham
On Mon, Feb 5, 2024 at 3:05 PM Yosry Ahmed wrote: > > On Mon, Feb 05, 2024 at 02:56:08PM -0800, Nhat Pham wrote: > > Add a selftest to cover the zswapin code path, allocating more memory > > than the cgroup limit to trigger swapout/zswapout, then reading the > > pages back in memory several

Re: [PATCH] bpf: Separate bpf_local_storage_lookup() fast and slow paths

2024-02-05 Thread Martin KaFai Lau
On 2/5/24 7:00 AM, Marco Elver wrote: On Wed, 31 Jan 2024 at 20:52, Martin KaFai Lau wrote: [...] | num_maps: 1000 | local_storage cache sequential get: | | | hits throughput: 0.357 ± 0.005 M ops/s | 0.325 ± 0.005 M ops/s

Re: [PATCH v3 3/3] selftests: add zswapin and no zswap tests

2024-02-05 Thread Yosry Ahmed
On Mon, Feb 05, 2024 at 02:56:08PM -0800, Nhat Pham wrote: > Add a selftest to cover the zswapin code path, allocating more memory > than the cgroup limit to trigger swapout/zswapout, then reading the > pages back in memory several times. This is inspired by a recently > encountered kernel crash

Re: [PATCH] bpf: Separate bpf_local_storage_lookup() fast and slow paths

2024-02-05 Thread Song Liu
On Wed, Jan 31, 2024 at 6:19 AM Marco Elver wrote: > [...] > > Signed-off-by: Marco Elver > --- > include/linux/bpf_local_storage.h | 17 - > kernel/bpf/bpf_local_storage.c | 14 -- > .../selftests/bpf/progs/cgrp_ls_recursion.c | 2

[PATCH v3 3/3] selftests: add zswapin and no zswap tests

2024-02-05 Thread Nhat Pham
Add a selftest to cover the zswapin code path, allocating more memory than the cgroup limit to trigger swapout/zswapout, then reading the pages back in memory several times. This is inspired by a recently encountered kernel crash on the zswapin path in our internal kernel, which went undetected

[PATCH v3 2/3] selftests: fix the zswap invasive shrink test

2024-02-05 Thread Nhat Pham
The zswap no invasive shrink selftest breaks because we rename the zswap writeback counter (see [1]). Fix the test. [1]: https://patchwork.kernel.org/project/linux-kselftest/patch/20231205193307.2432803-1-npha...@gmail.com/ Fixes: a697dc2be925 ("selftests: cgroup: update per-memcg zswap

[PATCH v3 1/3] selftests: zswap: add zswap selftest file to zswap maintainer entry

2024-02-05 Thread Nhat Pham
Make it easier for contributors to find the zswap maintainers when they update the zswap tests. Signed-off-by: Nhat Pham Acked-by: Yosry Ahmed --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 6527850f24d1..126090f0e418 100644 --- a/MAINTAINERS

[PATCH v3 0/3] fix and extend zswap kselftests

2024-02-05 Thread Nhat Pham
Changelog: v3: * More cleanup (patch 3) (suggested by Yosry Ahmed). * Check swap peak in swapin test v2: * Make the swapin test also checks for zswap usage (patch 3) (suggested by Yosry Ahmed) * Some test simplifications/cleanups (patch 3)

Re: [PATCH v8 0/4] Introduce mseal

2024-02-05 Thread Suren Baghdasaryan
On Fri, Feb 2, 2024 at 8:46 PM Liam R. Howlett wrote: > > * Linus Torvalds [240202 18:36]: > > On Fri, 2 Feb 2024 at 13:18, Liam R. Howlett > > wrote: > > > > > > There will be a larger performance cost to checking up front without > > > allowing the partial completion. > > > > I suspect that

Re: [PATCH v3 7/7] of: Add KUnit test to confirm DTB is loaded

2024-02-05 Thread Geert Uytterhoeven
Hi Stephen, On Mon, Feb 5, 2024 at 8:19 PM Stephen Boyd wrote: > Quoting David Gow (2024-02-02 20:10:17) > > On Sat, 3 Feb 2024 at 03:59, Stephen Boyd wrote: > > > Add a KUnit test that confirms a DTB has been loaded, i.e. there is a > > > root node, and that the of_have_populated_dt() API

Re: [PATCH v3 7/7] of: Add KUnit test to confirm DTB is loaded

2024-02-05 Thread Stephen Boyd
Quoting David Gow (2024-02-02 20:10:17) > On Sat, 3 Feb 2024 at 03:59, Stephen Boyd wrote: > > > > Add a KUnit test that confirms a DTB has been loaded, i.e. there is a > > root node, and that the of_have_populated_dt() API works properly. > > > > Cc: Rob Herring > > Cc: Frank Rowand > > Cc:

[PATCH v2 2/2] selftests/mm: run_vmtests.sh: add hugetlb_madv_vs_map

2024-02-05 Thread Breno Leitao
hugetlb_madv_vs_map selftest was not part of the mm test-suite since we didn't have a fix for the problem it found. Now that the problem is already fixed (see previous commit), let's enable this selftest in the default test-suite. Signed-off-by: Breno Leitao ---

Re: [PATCH bpf-next v4 0/3] Annotate kfuncs in .BTF_ids section

2024-02-05 Thread Viktor Malik
On 2/3/24 19:45, Manu Bretelle wrote: > On Sat, Feb 03, 2024 at 03:40:24PM +0100, Jiri Olsa wrote: >> On Fri, Feb 02, 2024 at 03:09:05PM -0800, Manu Bretelle wrote: >>> On Sun, Jan 28, 2024 at 06:24:05PM -0700, Daniel Xu wrote: === Description === This is a bpf-treewide change that

Re: [PATCH v8 13/38] KVM: arm64: Manage GCS registers for guests

2024-02-05 Thread Mark Brown
On Mon, Feb 05, 2024 at 03:34:05PM +, Marc Zyngier wrote: > Mark Brown wrote: > > On Mon, Feb 05, 2024 at 09:46:16AM +, Marc Zyngier wrote: > > > We have had this discussion in the past. This must be based on the > > > VM's configuration. Guarding the check with the host capability is a

[PATCH v14 6/6] ring-buffer/selftest: Add ring-buffer mapping test

2024-02-05 Thread Vincent Donnefort
This test maps a ring-buffer and validate the meta-page after reset and after emitting few events. Cc: Shuah Khan Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Signed-off-by: Vincent Donnefort diff --git a/tools/testing/selftests/ring-buffer/Makefile

Re: [PATCH v5 00/12] RISCV: Add kvm Sstc timer selftests

2024-02-05 Thread Marc Zyngier
On Mon, 05 Feb 2024 13:10:26 +, Haibo Xu wrote: > > Hi Marc, > > Could you help review the first 3 patches in this series? For these 3 patches: Reviewed-by: Marc Zyngier Thanks, M. -- Without deviation from the norm, progress is not possible.

Re: [PATCH v3] KVM: selftests: Fix the dirty_log_test semaphore imbalance

2024-02-05 Thread Sean Christopherson
On Mon, Feb 05, 2024, Peter Xu wrote: > Shaoqin, Sean, > > Apologies for a late comment. I'm trying to remember what I wrote.. > > On Fri, Feb 02, 2024 at 01:43:32AM -0500, Shaoqin Huang wrote: > > Why sem_vcpu_cont and sem_vcpu_stop can be non-zero value? It's because > > the

Re: [PATCH v8 13/38] KVM: arm64: Manage GCS registers for guests

2024-02-05 Thread Marc Zyngier
On Mon, 05 Feb 2024 12:35:53 +, Mark Brown wrote: > > On Mon, Feb 05, 2024 at 09:46:16AM +, Marc Zyngier wrote: > > On Sat, 03 Feb 2024 12:25:39 +, > > Mark Brown wrote: > > > > +++ b/arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h > > > @@ -25,6 +25,8 @@ static inline void

Re: [PATCH] bpf: Separate bpf_local_storage_lookup() fast and slow paths

2024-02-05 Thread Marco Elver
On Wed, 31 Jan 2024 at 20:52, Martin KaFai Lau wrote: [...] > > | num_maps: 1000 > > | local_storage cache sequential get: > > | | > > | hits throughput: 0.357 ± 0.005 M ops/s | 0.325 ± 0.005 M > > ops/s(-9.0%) > > | hits

[PATCH] selftests/mm: uffd-unit-test check if huge page size is 0

2024-02-05 Thread Terry Tritton
If HUGETLBFS is not enabled then the default_huge_page_size function will return 0 and cause a divide by 0 error. Add a check to see if the huge page size is 0 and skip the hugetlb tests if it is. Signed-off-by: Terry Tritton --- tools/testing/selftests/mm/uffd-unit-tests.c | 6 ++ 1 file

Re: [PATCH v4 2/5] selftests/resctrl: Add helpers for the non-contiguous test

2024-02-05 Thread Maciej Wieczor-Retman
On 2024-02-05 at 15:16:27 +0200, Ilpo Järvinen wrote: >On Mon, 5 Feb 2024, Maciej Wieczor-Retman wrote: > >> The CAT non-contiguous selftests have to read the file responsible for >> reporting support of non-contiguous CBMs in kernel (resctrl). Then the >> test compares if that information matches

Re: [PATCH v4 5/5] selftests/resctrl: Add non-contiguous CBMs CAT test

2024-02-05 Thread Maciej Wieczor-Retman
On 2024-02-05 at 15:11:22 +0200, Ilpo Järvinen wrote: >On Mon, 5 Feb 2024, Maciej Wieczor-Retman wrote: > >> Add tests for both L2 and L3 CAT to verify the return values >> generated by writing non-contiguous CBMs don't contradict the >> reported non-contiguous support information. >> >> Use a

Re: [PATCH v4 3/5] selftests/resctrl: Split validate_resctrl_feature_request()

2024-02-05 Thread Maciej Wieczor-Retman
On 2024-02-05 at 14:41:30 +0200, Ilpo Järvinen wrote: >On Mon, 5 Feb 2024, Maciej Wieczor-Retman wrote: > >> validate_resctrl_feature_request() is used to test both if a resource is >> present in the info directory, and if a passed monitoring feature is >> present in the mon_features file. >> >>

Re: [PATCH] selftests/ftrace: Limit length in subsystem-enable tests

2024-02-05 Thread Steven Rostedt
On Mon, 5 Feb 2024 21:12:33 +0800 Yuanhe Shu wrote: > While sched* events being traced and sched* events continuously happen, > "[xx] event tracing - enable/disable with subsystem level files" would > never stop as it cat an endless output. > Select the first 100 lines of output would be enough

Re: [PATCH v4 2/5] selftests/resctrl: Add helpers for the non-contiguous test

2024-02-05 Thread Ilpo Järvinen
On Mon, 5 Feb 2024, Maciej Wieczor-Retman wrote: > The CAT non-contiguous selftests have to read the file responsible for > reporting support of non-contiguous CBMs in kernel (resctrl). Then the > test compares if that information matches what is reported by CPUID > output. > > Add a generic

Re: [PATCH v4 5/5] selftests/resctrl: Add non-contiguous CBMs CAT test

2024-02-05 Thread Ilpo Järvinen
On Mon, 5 Feb 2024, Maciej Wieczor-Retman wrote: > Add tests for both L2 and L3 CAT to verify the return values > generated by writing non-contiguous CBMs don't contradict the > reported non-contiguous support information. > > Use a logical XOR to confirm return value of write_schemata() and >

Re: [PATCH v5 00/12] RISCV: Add kvm Sstc timer selftests

2024-02-05 Thread Haibo Xu
Hi Marc, Could you help review the first 3 patches in this series? Thanks, Haibo On Mon, Jan 22, 2024 at 5:45 PM Haibo Xu wrote: > > The RISC-V arch_timer selftests is used to validate Sstc timer > functionality in a guest, which sets up periodic timer interrupts > and check the basic

Re: [PATCH v4 3/5] selftests/resctrl: Split validate_resctrl_feature_request()

2024-02-05 Thread Ilpo Järvinen
On Mon, 5 Feb 2024, Maciej Wieczor-Retman wrote: > validate_resctrl_feature_request() is used to test both if a resource is > present in the info directory, and if a passed monitoring feature is > present in the mon_features file. > > Refactor validate_resctrl_feature_request() into two smaller

Re: [PATCH net] selftests: net: let big_tcp test cope with slow env

2024-02-05 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (main) by David S. Miller : On Fri, 2 Feb 2024 17:06:59 +0100 you wrote: > In very slow environments, most big TCP cases including > segmentation and reassembly of big TCP packets have a good > chance to fail: by default the TCP client uses write

Re: [PATCH v8 13/38] KVM: arm64: Manage GCS registers for guests

2024-02-05 Thread Mark Brown
On Mon, Feb 05, 2024 at 09:46:16AM +, Marc Zyngier wrote: > On Sat, 03 Feb 2024 12:25:39 +, > Mark Brown wrote: > > +++ b/arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h > > @@ -25,6 +25,8 @@ static inline void __sysreg_save_user_state(struct > > kvm_cpu_context *ctxt) > > { > >

[PATCH 2/3] Documentation: adjust pstore backend related document

2024-02-05 Thread Yuanhe Shu
Pstore now supports multiple backends, adjust related document. Signed-off-by: Yuanhe Shu --- Documentation/ABI/testing/pstore| 8 Documentation/admin-guide/kernel-parameters.txt | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git

[PATCH 3/3] tools/testing: adjust pstore backend related selftest

2024-02-05 Thread Yuanhe Shu
Pstore now supports multiple backends, the module parameter pstore.backend varies from 'registered backend' to 'backends that are allowed to register'. Adjust selftests to match the change. Signed-off-by: Yuanhe Shu --- tools/testing/selftests/pstore/common_tests | 8 +--

[PATCH 1/3] pstore: add multi-backend support

2024-02-05 Thread Yuanhe Shu
Currently, pstore supports only one backend open at a time. Specifically, due to the global variable "psinfo", pstore only accepts the first registered backend. If a new backend wants to register later, pstore will simply reject it and return an error. This design forced us to close existing

[PATCH v2 0/3] pstore: add multi-backend support

2024-02-05 Thread Yuanhe Shu
I have been steadily working but struggled to find a seamlessly integrated way to implement tty frontend until Guilherme inspired me that multi-backend and tty frontend are actually two separate entities. This submission presents the second iteration of my efforts, listing notable changes form the

[PATCH v4 5/5] selftests/resctrl: Add non-contiguous CBMs CAT test

2024-02-05 Thread Maciej Wieczor-Retman
Add tests for both L2 and L3 CAT to verify the return values generated by writing non-contiguous CBMs don't contradict the reported non-contiguous support information. Use a logical XOR to confirm return value of write_schemata() and non-contiguous CBMs support information match. Signed-off-by:

[PATCH v4 4/5] selftests/resctrl: Add resource_info_file_exists()

2024-02-05 Thread Maciej Wieczor-Retman
Feature checking done by resctrl_mon_feature_exists() covers features represented by the feature name presence inside the 'mon_features' file in /sys/fs/resctrl/info/L3_MON directory. There exists a different way to represent feature support and that is by the presence of 0 or 1 in a single file

[PATCH v4 3/5] selftests/resctrl: Split validate_resctrl_feature_request()

2024-02-05 Thread Maciej Wieczor-Retman
validate_resctrl_feature_request() is used to test both if a resource is present in the info directory, and if a passed monitoring feature is present in the mon_features file. Refactor validate_resctrl_feature_request() into two smaller functions that each accomplish one check to give feature

[PATCH v4 2/5] selftests/resctrl: Add helpers for the non-contiguous test

2024-02-05 Thread Maciej Wieczor-Retman
The CAT non-contiguous selftests have to read the file responsible for reporting support of non-contiguous CBMs in kernel (resctrl). Then the test compares if that information matches what is reported by CPUID output. Add a generic helper function to read an unsigned number from a file in

[PATCH v4 1/5] selftests/resctrl: Add test groups and name L3 CAT test L3_CAT

2024-02-05 Thread Maciej Wieczor-Retman
From: Ilpo Järvinen To select test to run -t parameter can be used. However, -t cat currently maps to L3 CAT test which will be confusing after more CAT related tests will be added. Allow selecting tests as groups and call L3 CAT test "L3_CAT", "CAT" group will enable all CAT related tests.

[PATCH v4 0/5] selftests/resctrl: Add non-contiguous CBMs in Intel CAT selftest

2024-02-05 Thread Maciej Wieczor-Retman
Non-contiguous CBM support for Intel CAT has been merged into the kernel with Commit 0e3cd31f6e90 ("x86/resctrl: Enable non-contiguous CBMs in Intel CAT") but there is no selftest that would validate if this feature works correctly. The selftest needs to verify if writing non-contiguous CBMs to

Re: [PATCH v3] KVM: selftests: Fix the dirty_log_test semaphore imbalance

2024-02-05 Thread Peter Xu
On Mon, Feb 05, 2024 at 06:05:02PM +0800, Peter Xu wrote: > Shaoqin, Sean, > > Apologies for a late comment. I'm trying to remember what I wrote.. > > On Fri, Feb 02, 2024 at 01:43:32AM -0500, Shaoqin Huang wrote: > > Why sem_vcpu_cont and sem_vcpu_stop can be non-zero value? It's because > >

Re: [PATCH v3] KVM: selftests: Fix the dirty_log_test semaphore imbalance

2024-02-05 Thread Peter Xu
Shaoqin, Sean, Apologies for a late comment. I'm trying to remember what I wrote.. On Fri, Feb 02, 2024 at 01:43:32AM -0500, Shaoqin Huang wrote: > Why sem_vcpu_cont and sem_vcpu_stop can be non-zero value? It's because > the dirty_ring_before_vcpu_join() execute the sem_post(_vcpu_cont) > at

Re: [PATCH net-next v2] net: ctnetlink: support filtering by zone

2024-02-05 Thread Felix Huettner
> > > > > > Hi, Felix and Pablo. > > > > > > I was looking through the code and the following part is bothering me: > > > > > > diff --git a/net/netfilter/nf_conntrack_netlink.c > > > b/net/netfilter/nf_conntrack_netlink.c > > > index fb0ae15e96df..4e9133f61251 100644 > > > ---

[PATCH net] net: ctnetlink: fix filtering for zone 0

2024-02-05 Thread Felix Huettner
previously filtering for the default zone would actually skip the zone filter and flush all zones. Fixes: eff3c558bb7e ("netfilter: ctnetlink: support filtering by zone") Reported-by: Ilya Maximets Closes: https://lore.kernel.org/netdev/2032238f-31ac-4106-8f22-522e76df5...@ovn.org/

Re: [PATCH v8 13/38] KVM: arm64: Manage GCS registers for guests

2024-02-05 Thread Marc Zyngier
On Sat, 03 Feb 2024 12:25:39 +, Mark Brown wrote: > > GCS introduces a number of system registers for EL1 and EL0, on systems and EL2. > with GCS we need to context switch them and expose them to VMMs to allow > guests to use GCS, as well as describe their fine grained traps to > nested