On Thu, Feb 01, 2024 at 09:56:51PM -0500, Shaoqin Huang wrote:
> -static uint64_t get_pmcr_n(uint64_t pmcr)
> -{
> - return FIELD_GET(ARMV8_PMU_PMCR_N, pmcr);
> -}
> -
> -static void set_pmcr_n(uint64_t *pmcr, uint64_t pmcr_n)
> -{
> - u64p_replace_bits((__u64 *) pmcr, pmcr_n, ARMV8_PMU_PMC
On Thu, Feb 01, 2024 at 09:56:50PM -0500, Shaoqin Huang wrote:
[...]
> diff --git a/tools/testing/selftests/kvm/include/aarch64/vpmu.h
> b/tools/testing/selftests/kvm/include/aarch64/vpmu.h
> new file mode 100644
> index ..0a56183644ee
> --- /dev/null
> +++ b/tools/testing/selftests/
When execute the dirty_log_test on some aarch64 machine, it sometimes
trigger the ASSERT:
Test Assertion Failure
dirty_log_test.c:384: dirty_ring_vcpu_ring_full
pid=14854 tid=14854 errno=22 - Invalid argument
1 0x004033eb: dirty_ring_collect_dirty_pages at
dirty_log_te
Jeff Xu wrote:
> Even without free.
> I personally do not like the heap getting sealed like that.
>
> Component A.
> p=malloc(4096);
> writing something to p.
>
> Component B:
> mprotect(p,4096, RO)
> mseal(p,4096)
>
> This will split the heap VMA, and prevent the heap from shrinking, if
> thi
On Thu, Feb 1, 2024 at 8:05 PM Theo de Raadt wrote:
>
> Jeff Xu wrote:
>
> > To me, the most important thing is to deliver a feature that's easy to
> > use and works well. I don't want users to mess things up, so if I'm
> > the one giving them the tools, I'm going to make sure they have all
> > t
On Thu, Feb 1, 2024 at 8:10 PM Theo de Raadt wrote:
>
> Jeff Xu wrote:
>
> > On Thu, Feb 1, 2024 at 7:54 PM Theo de Raadt wrote:
> > >
> > > Jeff Xu wrote:
> > >
> > > > On Thu, Feb 1, 2024 at 3:11 PM Eric Biggers wrote:
> > > > >
> > > > > On Wed, Jan 31, 2024 at 05:50:24PM +, jef...@chro
From: Tianrui Zhao
Some common KVM testcases are supported on LoongArch now as following:
demand_paging_test
dirty_log_perf_test
dirty_log_test
guest_print_test
hardware_disable_test
kvm_binary_stats_test
kvm_create_max_vcpus
kvm_pag
From: Tianrui Zhao
Add core KVM selftests support for LoongArch, it includes exception
handler, mmu page table setup and vcpu startup entry supporting etc.
Signed-off-by: Tianrui Zhao
Signed-off-by: Bibo Mao
---
.../selftests/kvm/lib/loongarch/exception.S | 59
.../selftests/kvm/lib/l
From: Tianrui Zhao
Add ucall test support for LoongArch, ucall method on LoongArch uses
undefined mmio area. It will cause causes vcpu exits to hypervisor so
that hypervisor can communicate with vcpu.
Signed-off-by: Tianrui Zhao
Signed-off-by: Bibo Mao
---
.../selftests/kvm/include/loongarch/
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: Tianrui Zhao
Signed-off-by: Bibo Mao
---
.../selftests/kvm/include/kvm_util_base.h | 5 +
.../kvm/i
This patchset adds KVM selftests for LoongArch system, currently only
some common test cases are supported and pass to run. These testcase
are listed as following:
demand_paging_test
dirty_log_perf_test
dirty_log_test
guest_print_test
hardware_disable_test
Jeff Xu wrote:
> On Thu, Feb 1, 2024 at 7:54 PM Theo de Raadt wrote:
> >
> > Jeff Xu wrote:
> >
> > > On Thu, Feb 1, 2024 at 3:11 PM Eric Biggers wrote:
> > > >
> > > > On Wed, Jan 31, 2024 at 05:50:24PM +, jef...@chromium.org wrote:
> > > > > [PATCH v8 2/4] mseal: add mseal syscall
> > >
Jeff Xu wrote:
> To me, the most important thing is to deliver a feature that's easy to
> use and works well. I don't want users to mess things up, so if I'm
> the one giving them the tools, I'm going to make sure they have all
> the information they need and that there are safeguards in place.
>
On Thu, Feb 1, 2024 at 7:54 PM Theo de Raadt wrote:
>
> Jeff Xu wrote:
>
> > On Thu, Feb 1, 2024 at 3:11 PM Eric Biggers wrote:
> > >
> > > On Wed, Jan 31, 2024 at 05:50:24PM +, jef...@chromium.org wrote:
> > > > [PATCH v8 2/4] mseal: add mseal syscall
> > > [...]
> > > > +/*
> > > > + * The
Jeff Xu wrote:
> On Thu, Feb 1, 2024 at 3:11 PM Eric Biggers wrote:
> >
> > On Wed, Jan 31, 2024 at 05:50:24PM +, jef...@chromium.org wrote:
> > > [PATCH v8 2/4] mseal: add mseal syscall
> > [...]
> > > +/*
> > > + * The PROT_SEAL defines memory sealing in the prot argument of mmap().
> > >
On Thu, Feb 1, 2024 at 7:29 PM Linus Torvalds
wrote:
>
> On Thu, 1 Feb 2024 at 19:24, Jeff Xu wrote:
> >
> > The patch Stephan developed was based on V1 of the patch, IIRC, which
> > is really ancient, and it is not based on MAP_SEALABLE, which is a
> > more recent development entirely from me.
>
On Thu, Feb 1, 2024 at 3:11 PM Eric Biggers wrote:
>
> On Wed, Jan 31, 2024 at 05:50:24PM +, jef...@chromium.org wrote:
> > [PATCH v8 2/4] mseal: add mseal syscall
> [...]
> > +/*
> > + * The PROT_SEAL defines memory sealing in the prot argument of mmap().
> > + */
> > +#define PROT_SEAL0x
On Thu, 1 Feb 2024 at 19:24, Jeff Xu wrote:
>
> The patch Stephan developed was based on V1 of the patch, IIRC, which
> is really ancient, and it is not based on MAP_SEALABLE, which is a
> more recent development entirely from me.
So the problem with this whole patch series from the very beginnin
On Thu, Feb 1, 2024 at 5:06 PM Greg KH wrote:
>
> On Thu, Feb 01, 2024 at 03:24:40PM -0700, Theo de Raadt wrote:
> > As an outsider, Linux development is really strange:
> >
> > Two sub-features are being pushed very hard, and the primary developer
> > doesn't have code which uses either of them.
On Thu, Feb 1, 2024 at 3:15 PM Linus Torvalds
wrote:
>
> On Thu, 1 Feb 2024 at 14:54, Theo de Raadt wrote:
> >
> > Linus, you are in for a shock when the proposal doesn't work for glibc
> > and all the applications!
>
> Heh. I've enjoyed seeing your argumentative style that made you so
> famous b
On Thu, Feb 1, 2024 at 12:45 PM Liam R. Howlett wrote:
>
> * Jeff Xu [240131 20:27]:
> > On Wed, Jan 31, 2024 at 11:34 AM Liam R. Howlett
> > wrote:
> > >
>
> Having to opt-in to allowing mseal will probably not work well.
I'm leaving the opt-in discussion in Linus's thread.
> Initial library m
On Fri, 2 Feb 2024 02:30:52 + Dmitry Safonov wrote:
> > Actually, I think there may be an easier fix:
> >
> > 4. Make sure that client close()s TCP-AO first, making it twsk.
> >And also make sure that net-ns counters read post server's close().
> >
> > Will do this, let's see if this fixe
Add the invalid filter test includes sets the filter beyond the event
space and sets the invalid action to double check if the
KVM_ARM_VCPU_PMU_V3_FILTER will return the expected error.
Signed-off-by: Shaoqin Huang
---
.../kvm/aarch64/pmu_event_filter_test.c | 36 +++
1 fil
Introduce pmu_event_filter_test for arm64 platforms. The test configures
PMUv3 for a vCPU, and sets different pmu event filters for the vCPU, and
check if the guest can see those events which user allow and can't use
those events which use deny.
This test refactor the create_vpmu_vm() and make it
In general, the set/clr registers should always be used in their
write form, never in a RMW form (imagine an interrupt disabling
a counter between the read and the write...).
The current implementation of [enable|disable]_counter both use the RMW
form, fix them by directly write to the set/clr reg
Move the implementation of [create|destroy]_vpmu_vm() into
lib/aarch64/pmu.c and export their declaration in a header so they can
be reused by other tests.
The sync exception handler install is test specific so we move it out of
the helper function.
No functional change intended.
Reviewed-by: Er
Move those pmu helper functions into include/aarch64/vpmu.h, thus
it can be used by other pmu test.
No functional change intended.
Reviewed-by: Eric Auger
Signed-off-by: Shaoqin Huang
---
.../kvm/aarch64/vpmu_counter_access.c | 117 -
.../selftests/kvm/include/aarch64/v
The test is inspired by the pmu_event_filter_test which implemented by x86. On
the arm64 platform, there is the same ability to set the pmu_event_filter
through the KVM_ARM_VCPU_PMU_V3_FILTER attribute. So add the test for arm64.
The series first move some pmu common code from vpmu_counter_access
On 2/1/24 23:37, Dmitry Safonov wrote:
> On 2/1/24 22:25, Dmitry Safonov wrote:
>> Hi Jakub,
>>
>> On 2/1/24 21:21, Jakub Kicinski wrote:
>>> On Thu, 1 Feb 2024 00:50:46 + Dmitry Safonov wrote:
Please, let me know if there will be other issues with tcp-ao tests :)
Going to work o
On Wed, Jan 31, 2024 at 11:59:43PM +0800, Yangyu Chen wrote:
> On Wed, 2024-01-31 at 22:41 +0800, Yangyu Chen wrote:
> > On Tue, 2024-01-30 at 17:07 -0800, Charlie Jenkins wrote:
> > > On riscv it is guaranteed that the address returned by mmap is less
> > > than
> > > the hint address. Allow mmap
Selftests here check not only that connect()/accept() for
TCP-AO/TCP-MD5/non-signed-TCP combinations do/don't establish
connections, but also counters: those are per-AO-key, per-socket and
per-netns.
The counters are checked on the server's side, as the server listener
has TCP-AO/TCP-MD5/no keys f
On 2/1/24 11:42 AM, Paolo Abeni wrote:
> Another small bunch of fixes, addressing issues outlined by the
> netdev CI.
>
> The first 2 patches are just rebased.
>
> The following 2 are new fixes, for even more problems that surfaced
> meanwhile.
>
> Paolo Abeni (4):
> selftests: net: cut more s
On Thu, Feb 01, 2024 at 03:24:40PM -0700, Theo de Raadt wrote:
> As an outsider, Linux development is really strange:
>
> Two sub-features are being pushed very hard, and the primary developer
> doesn't have code which uses either of them. And once it goes in, it
> cannot be changed.
>
> It's ve
Linus Torvalds wrote:
> and using PROT_SEAL at mmap() time is similarly the same obvious
> notion of "map this, and then seal that mapping".
The usual way is:
ptr = mmap(NULL, len PROT_READ|PROT_WRITE, ...)
initialize region between ptr, ptr+len
mprotect(ptr, len, PROT_READ)
m
Paolo points out that ifconfig is legacy and we should not use it.
Signed-off-by: Jakub Kicinski
---
CC: sh...@kernel.org
CC: ho...@kernel.org
CC: linux-kselftest@vger.kernel.org
---
.../drivers/net/netdevsim/udp_tunnel_nic.sh | 40 +--
1 file changed, 20 insertions(+), 20 dele
Linus Torvalds wrote:
> So yes, to my mind
>
> mprotect(addr, len, PROT_READ);
> mseal(addr, len, 0);
>
> should basically give identical results to
>
> mprotect(addr, len, PROT_READ | PROT_SEAL);
>
> and using PROT_SEAL at mmap() time is similarly the same obvious
> notion of "ma
On 2/1/24 22:25, Dmitry Safonov wrote:
> Hi Jakub,
>
> On 2/1/24 21:21, Jakub Kicinski wrote:
>> On Thu, 1 Feb 2024 00:50:46 + Dmitry Safonov wrote:
>>> Please, let me know if there will be other issues with tcp-ao tests :)
>>>
>>> Going to work on tracepoints and some other TCP-AO stuff for n
On Thu, 1 Feb 2024 at 14:54, Theo de Raadt wrote:
>
> Linus, you are in for a shock when the proposal doesn't work for glibc
> and all the applications!
Heh. I've enjoyed seeing your argumentative style that made you so
famous back in the days. Maybe it's always been there, but I haven't
seen the
On Wed, Jan 31, 2024 at 05:50:24PM +, jef...@chromium.org wrote:
> [PATCH v8 2/4] mseal: add mseal syscall
[...]
> +/*
> + * The PROT_SEAL defines memory sealing in the prot argument of mmap().
> + */
> +#define PROT_SEAL0x0400 /* _BITUL(26) */
> +
> /* 0x01 - 0x03 are defined in
> To me, this means Linus is OK with the general signatures of the APIs.
Linus, you are in for a shock when the proposal doesn't work for glibc
and all the applications!
On Thu, Feb 1, 2024 at 12:45 PM Liam R. Howlett wrote:
> >
> > I would love to hear more from Linux developers on this.
>
> Linus said it was really important to get the semantics correct, but you
> took his (unfinished) list and kept going. I think there are some
> unanswered questions and that'
Hi Jakub,
On 2/1/24 21:21, Jakub Kicinski wrote:
> On Thu, 1 Feb 2024 00:50:46 + Dmitry Safonov wrote:
>> Please, let me know if there will be other issues with tcp-ao tests :)
>>
>> Going to work on tracepoints and some other TCP-AO stuff for net-next.
>
> Since you're being nice and helpful
There is another problem with adding PROT_SEAL to the mprotect()
call.
What are the precise semantics?
If one reviews how mprotect() behaves, it is quickly clear that
it is very sloppy specification. We spent quite a bit of effort
making our manual page as clear as possible to the most it gauran
On Thu, 1 Feb 2024 00:50:46 + Dmitry Safonov wrote:
> Please, let me know if there will be other issues with tcp-ao tests :)
>
> Going to work on tracepoints and some other TCP-AO stuff for net-next.
Since you're being nice and helpful I figured I'll try testing TCP-AO
with debug options enab
* Jeff Xu [240131 20:27]:
> On Wed, Jan 31, 2024 at 11:34 AM Liam R. Howlett
> wrote:
> >
> > Please add me to the Cc list of these patches.
> Ok.
> >
> > * jef...@chromium.org [240131 12:50]:
> > > From: Jeff Xu
> > >
> > > This patchset proposes a new mseal() syscall for the Linux kernel.
> >
Hi Maciej,
On 1/31/2024 4:55 AM, Maciej Wieczor-Retman wrote:
> On 2024-01-26 at 13:10:18 -0800, Reinette Chatre wrote:
>> On 1/25/2024 3:13 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 contradi
Using hard-coded constant timeout to wait for some expected
event is deemed to fail sooner or later, especially in slow
env.
Our CI has spotted another of such race:
# TEST: ipv6: cleanup of cached exceptions - nexthop objects [FAIL]
# can't delete veth device in a timely manner,
The pmtu.sh test uses a few TCP listener in a problematic way:
It hard-codes a constant timeout to wait for the listener starting-up
in background. That introduces unneeded latency and on very slow and
busy host it can fail.
Additionally the test starts again the same listener in the same
namespac
The setup_ns helper marks the testns global variable as
readonly. Later attempts to set such variable are unsuccessful,
causing a couple test failures.
Avoid completely the variable re-initialization and let the
function access the global value.
Fixes: ("selftests: rtnetlink: use setup_ns in bond
The udpgro_fwd.sh self-tests are somewhat unstable. There are
a few timing constraints the we struggle to meet on very slow
environments.
Instead of skipping the whole tests in such envs, increase the
test resilience WRT very slow hosts: increase the inter-packets
timeouts, avoid resetting the cou
Another small bunch of fixes, addressing issues outlined by the
netdev CI.
The first 2 patches are just rebased.
The following 2 are new fixes, for even more problems that surfaced
meanwhile.
Paolo Abeni (4):
selftests: net: cut more slack for gro fwd tests.
selftests: net: fix setup_ns usag
On Thu, Feb 01, 2024, Shaoqin Huang wrote:
> > > /*
> > >* We reserve page table for 2 times of extra dirty mem which
> > >* will definitely cover the original (1G+) test range. Here
> > > @@ -825,6 +832,13 @@ static void run_test(enum vm_guest_mode mode, void
>
Hello:
This series was applied to netdev/net.git (main)
by Jakub Kicinski :
On Wed, 31 Jan 2024 22:49:45 +0100 you wrote:
> This series of 9 patches fixes issues mostly identified by CI's not
> managed by the MPTCP maintainers. Thank you Linero (LKFT) and Netdev
> maintainers (NIPA) for running o
> -Original Message-
> From: Theo de Raadt
> > I would love to hear more from Linux developers on this.
>
> I'm not sure you are capable of listening.
>
Theo,
It is possible to make your technical points, and even to express frustration
that it has
been difficult to get them across,
On Wed, 31 Jan 2024 18:52:26 +0100 Paolo Abeni wrote:
> Another small bunch of fixes, addressing issues outlined by the
> netdev CI.
>
> Paolo Abeni (3):
> selftests: net: cut more slack for gro fwd tests.
> selftests: net: fix setup_ns usage in rtnetlink.sh
> selftests: net: enable some mor
Hello:
This series was applied to netdev/net.git (main)
by Jakub Kicinski :
On Wed, 31 Jan 2024 09:08:43 -0500 you wrote:
> Some small fixes for net selftests which follow from these recent commits:
> dd2d40acdbb2 ("selftests: bonding: Add more missing config options")
> 49078c1b80b6 ("selftests:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski :
On Wed, 31 Jan 2024 08:56:05 -0800 you wrote:
> amt test uses the TTL iptables module:
>
> ip netns exec "${RELAY}" iptables -t mangle -I PREROUTING \
> -d 239.0.0.1 -j TTL --ttl-set 2
>
> Fixes: c08e8baea78e ("s
From: Willem de Bruijn
This test is time sensitive. It may fail on virtual machines and for
debug builds.
Continue to run in these environments to get code coverage. But
optionally suppress failure for timing errors (only). This is
controlled with environment variable KSFT_MACHINE_SLOW.
The tes
Use correct -d flag as mentioned in comments for destructive tests.
Rename variable and update comment for some clarification.
Fixes: cc7b9955344c ("selftests/mm: run_vmtests.sh: add missing tests")
Signed-off-by: Muhammad Usama Anjum
---
Please fold this patch in the Fixes patch if needed.
---
The mmap() respects rlimit only for normal users. This test should be
run as normal user, without root privileges. Also add back the sudo -u
nobody as run_vmtests.sh is run as root most of the times. Skip the test
instead if sudo isn't present to lower the privileges.
Fixes: b6221771d468 ("selftes
On 01/02/2024 12:24, Muhammad Usama Anjum wrote:
> On 2/1/24 5:04 PM, Ryan Roberts wrote:
>> On 25/01/2024 15:46, Muhammad Usama Anjum wrote:
>>> Remove sudo as some test running environments may not have sudo
>>> available. Instead skip the test if root privileges aren't available in
>>> the test.
On Thu, 2024-02-01 at 13:16 +0200, Ido Schimmel wrote:
> On Thu, Feb 01, 2024 at 10:34:52AM +0100, Paolo Abeni wrote:
> > What about adding an helper alike wait_local_port_listen(), checking
> > for bridge link status in short intervals, to likely reduce the overall
> > wait time?
>
> What about t
Please disregard this patch. I'll send another patch to fix another thing.
On 2/1/24 12:13 PM, Muhammad Usama Anjum wrote:
> The mmap() respects rlimit only for normal users. This test should be
> run as normal user, without root privileges.
>
> Fixes: b6221771d468 ("selftests/mm: run_vmtests: re
On 2/1/24 5:11 PM, Ryan Roberts wrote:
> On 25/01/2024 15:46, Muhammad Usama Anjum wrote:
>> Add missing tests to run_vmtests.sh. The mm kselftests are run through
>> run_vmtests.sh. If a test isn't present in this script, it'll not run
>> with run_tests or `make -C tools/testing/selftests/mm run_t
On 2/1/24 5:04 PM, Ryan Roberts wrote:
> On 25/01/2024 15:46, Muhammad Usama Anjum wrote:
>> Remove sudo as some test running environments may not have sudo
>> available. Instead skip the test if root privileges aren't available in
>> the test.
>>
>> Signed-off-by: Muhammad Usama Anjum
>> ---
>> C
On 25/01/2024 15:46, Muhammad Usama Anjum wrote:
> Add missing tests to run_vmtests.sh. The mm kselftests are run through
> run_vmtests.sh. If a test isn't present in this script, it'll not run
> with run_tests or `make -C tools/testing/selftests/mm run_tests`.
>
> Cc: Ryan Roberts
> Signed-off-b
On 25/01/2024 15:46, Muhammad Usama Anjum wrote:
> Remove sudo as some test running environments may not have sudo
> available. Instead skip the test if root privileges aren't available in
> the test.
>
> Signed-off-by: Muhammad Usama Anjum
> ---
> Changes since v1:
> - Added this patch in v2
>
On Thu, Feb 01, 2024 at 10:34:52AM +0100, Paolo Abeni wrote:
> What about adding an helper alike wait_local_port_listen(), checking
> for bridge link status in short intervals, to likely reduce the overall
> wait time?
What about the below?
diff --git a/tools/testing/selftests/net/test_bridge_bac
Hi,
Ali Zahraee wrote:
> This is just another trivial typo fix. The typo shows up in the final
> report after tests are done.
>
> Signed-off-by: Ali Zahraee
I sent a patch regarding this already which has been acked,
https://lore.kernel.org/linux-trace-kernel/20240129162841.57979-1-
On Thu, 2024-02-01 at 10:05 +0200, Ido Schimmel wrote:
> The test toggles the carrier of a bridge port in order to test the
> bridge backup port feature.
>
> Due to the linkwatch delayed work the carrier change is not always
> reflected fast enough to the bridge driver and packets are not forwarde
Hey Nhat,
I have a few more comments, sorry for not catching everything the first
time around.
Adding Roman to CC.
On Wed, Jan 31, 2024 at 07:27:18PM -0800, Nhat Pham wrote:
> Add a selftest to cover the zswapin code path, allocating more memory
> than the cgroup limit to trigger swapout/zswapou
Hi Sean,
Thanks for your reviewing.
On 1/27/24 04:25, Sean Christopherson wrote:
+Peter
On Fri, Nov 17, 2023, Shaoqin Huang wrote:
When execute the dirty_log_test on some aarch64 machine, it sometimes
trigger the ASSERT:
Test Assertion Failure
dirty_log_test.c:384: dirty_ring_vc
This is just another trivial typo fix. The typo shows up in the final
report after tests are done.
Signed-off-by: Ali Zahraee
---
tools/testing/selftests/ftrace/ftracetest | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/ftrace/ftracetest
b/tools/testi
The test toggles the carrier of a bridge port in order to test the
bridge backup port feature.
Due to the linkwatch delayed work the carrier change is not always
reflected fast enough to the bridge driver and packets are not forwarded
as the test expects, resulting in failures [1].
Fix by adding
74 matches
Mail list logo