[PATCH stable v5.10 4/7] of: unittest: Add test for of_dma_get_max_cpu_address()

2021-03-03 Thread Jing Xiangfeng
From: Nicolas Saenz Julienne commit 07d13a1d6120d453c3c1f020578693d072deded5 upstream Introduce a test for of_dma_get_max_cup_address(), it uses the same DT data as the rest of dma-ranges unit tests. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Rob Herring Link: https://lore.kernel.org

Re: [PATCH] perf test: Test case 27 fails on s390 and non-x86 platforms

2021-03-02 Thread Liang, Kan
On 3/2/2021 12:08 PM, Thomas Richter wrote: On 3/2/21 4:23 PM, Liang, Kan wrote: On 3/2/2021 9:48 AM, Thomas Richter wrote: On 3/2/21 3:03 PM, Liang, Kan wrote: + Athira Rajeev On 3/2/2021 8:31 AM, Thomas Richter wrote: Executing perf test 27 fails on s390:    [root@t35lp46 perf

Re: [PATCH] perf test: Test case 27 fails on s390 and non-x86 platforms

2021-03-02 Thread Thomas Richter
On 3/2/21 4:23 PM, Liang, Kan wrote: > > > On 3/2/2021 9:48 AM, Thomas Richter wrote: >> On 3/2/21 3:03 PM, Liang, Kan wrote: >>> >>> + Athira Rajeev >>> >>> On 3/2/2021 8:31 AM, Thomas Richter wrote: >>>> Executing perf test 27

Re: [PATCH] perf test: Test case 27 fails on s390 and non-x86 platforms

2021-03-02 Thread Thomas Richter
On 3/2/21 3:03 PM, Liang, Kan wrote: > > + Athira Rajeev > > On 3/2/2021 8:31 AM, Thomas Richter wrote: >> Executing perf test 27 fails on s390: >>   [root@t35lp46 perf]# ./perf test -Fv 27 >>   27: Sample parsing >>   --- start --- >>   end --

Re: [PATCH] perf test: Test case 27 fails on s390 and non-x86 platforms

2021-03-02 Thread Liang, Kan
On 3/2/2021 9:48 AM, Thomas Richter wrote: On 3/2/21 3:03 PM, Liang, Kan wrote: + Athira Rajeev On 3/2/2021 8:31 AM, Thomas Richter wrote: Executing perf test 27 fails on s390:   [root@t35lp46 perf]# ./perf test -Fv 27   27: Sample parsing   --- start ---   end   Sample

Re: [PATCH] perf test: Test case 27 fails on s390 and non-x86 platforms

2021-03-02 Thread Liang, Kan
+ Athira Rajeev On 3/2/2021 8:31 AM, Thomas Richter wrote: Executing perf test 27 fails on s390: [root@t35lp46 perf]# ./perf test -Fv 27 27: Sample parsing --- start --- end Sample parsing: FAILED! [root@t35lp46 perf]# The root cause is commit c7444297fd3769 ("perf

[PATCH] perf test: Test case 27 fails on s390 and non-x86 platforms

2021-03-02 Thread Thomas Richter
Executing perf test 27 fails on s390: [root@t35lp46 perf]# ./perf test -Fv 27 27: Sample parsing --- start --- end Sample parsing: FAILED! [root@t35lp46 perf]# The root cause is commit c7444297fd3769 ("perf test: Support PERF_SAMPLE_WEIGHT_STRUCT") This commit introdu

Re: [PATCH 04/11] perf test: Fix cpu and thread map leaks in sw_clock_freq test

2021-03-02 Thread Jiri Olsa
long > > time ago, > > because there was no refcounting at that time, right? > > It seems my original patch just set the maps directly. > > bc96b361cbf9 perf tests: Add a test case for checking sw clock event > frequency > > And after that Adrian chang

[RFC PATCH v4 0/9] KVM: selftests: some improvement and a new test for kvm page table

2021-03-02 Thread Yanan Wang
for kinds of alignment or guest memory accessing of vcpus. In the second part, a new test is added: This test is added to serve as a performance tester and a bug reproducer for kvm page table code (GPA->HPA mappings), it gives guidance for the people trying to make some improvement for

[RFC PATCH v4 9/9] KVM: selftests: Add a test for kvm page table code

2021-03-02 Thread Yanan Wang
This test serves as a performance tester and a bug reproducer for kvm page table code (GPA->HPA mappings), so it gives guidance for people trying to make some improvement for kvm. The function guest_code() can cover the conditions where a single vcpu or multiple vcpus access guest pages wit

Re: [PATCH] perf buildid-cache: Add test for PE executable

2021-03-02 Thread Arnaldo Carvalho de Melo
rote: > > > > From 9fd0b3889f00ad13662879767d833309d8a035b6 Mon Sep 17 00:00:00 2001 > > > > From: Nicholas Fraser > > > > Date: Thu, 18 Feb 2021 13:24:03 -0500 > > > > Subject: [PATCH] perf buildid-cache: Add test for PE executable > > > >

[PATCH AUTOSEL 5.11 44/52] kasan: fix memory corruption in kasan_bitops_tags test

2021-03-02 Thread Sasha Levin
From: Andrey Konovalov [ Upstream commit e66e1799a76621003e5b04c9c057826a2152e103 ] Since the hardware tag-based KASAN mode might not have a redzone that comes after an allocated object (when kasan.mode=prod is enabled), the kasan_bitops_tags() test ends up corrupting the next object in memory

[PATCH AUTOSEL 5.10 39/47] kasan: fix memory corruption in kasan_bitops_tags test

2021-03-02 Thread Sasha Levin
From: Andrey Konovalov [ Upstream commit e66e1799a76621003e5b04c9c057826a2152e103 ] Since the hardware tag-based KASAN mode might not have a redzone that comes after an allocated object (when kasan.mode=prod is enabled), the kasan_bitops_tags() test ends up corrupting the next object in memory

[PATCH AUTOSEL 5.10 18/47] kunit: tool: fix unit test cleanup handling

2021-03-02 Thread Sasha Levin
From: Daniel Latypov [ Upstream commit cfd607e43da4a20753744f134e201310262b827a ] * Stop leaking file objects. * Use self.addCleanup() to ensure we call cleanup functions even if setUp() fails. * use mock.patch.stopall instead of more error-prone manual approach Signed-off-by: Daniel Latypov

[PATCH AUTOSEL 5.11 21/52] kunit: tool: fix unit test cleanup handling

2021-03-02 Thread Sasha Levin
From: Daniel Latypov [ Upstream commit cfd607e43da4a20753744f134e201310262b827a ] * Stop leaking file objects. * Use self.addCleanup() to ensure we call cleanup functions even if setUp() fails. * use mock.patch.stopall instead of more error-prone manual approach Signed-off-by: Daniel Latypov

Re: [PATCH 04/11] perf test: Fix cpu and thread map leaks in sw_clock_freq test

2021-03-01 Thread Namhyung Kim
gt; > > > Also change the goto label since it doesn't need to have two. > > > > # perf test -v 25 > > 25: Software clock events period values: > > --- start --- > > test child forked

[PATCH v2 3/5] userfaultfd/selftests: create alias mappings in the shmem test

2021-03-01 Thread Axel Rasmussen
, we'll leverage this setup to exercise minor fault handling support for shmem, just like we do in the hugetlb_shared test. Signed-off-by: Axel Rasmussen --- tools/testing/selftests/vm/userfaultfd.c | 29 +--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/tools

[PATCH v2 2/5] userfaultfd/selftests: use memfd_create for shmem test type

2021-03-01 Thread Axel Rasmussen
This is a preparatory commit. In the future, we want to be able to setup alias mappings for area_src and area_dst in the shmem test, like we do in the hugetlb_shared test. With a VMA obtained via mmap(MAP_ANONYMOUS | MAP_SHARED), it isn't clear how to do this. So, mmap() with an fd, so we can

[PATCH v2 4/5] userfaultfd/selftests: reinitialize test context in each test

2021-03-01 Thread Axel Rasmussen
Currently, the context (fds, mmap-ed areas, etc.) are global. Each test mutates this state in some way, in some cases really "clobbering it" (e.g., the events test mremap-ing area_dst over the top of area_src, or the minor faults tests overwriting the count_verify values in the test area

[PATCH v9 6/6] userfaultfd/selftests: add test exercising minor fault handling

2021-03-01 Thread Axel Rasmussen
Fix a dormant bug in userfaultfd_events_test(), where we did `return faulting_process(0)` instead of `exit(faulting_process(0))`. This caused the forked process to keep running, trying to execute any further test cases after the events test in parallel with the "real" process. Add a s

[PATCH 5.11 771/775] wireguard: selftests: test multiple parallel streams

2021-03-01 Thread Greg Kroah-Hartman
From: Jason A. Donenfeld commit d5a49aa6c3e264a93a7d08485d66e346be0969dd upstream. In order to test ndo_start_xmit being called in parallel, explicitly add separate tests, which should all run on different cores. This should help tease out bugs associated with queueing up packets from different

[PATCH 5.11 470/775] perf test: Fix unaligned access in sample parsing test

2021-03-01 Thread Greg Kroah-Hartman
... SUMMARY: UndefinedBehaviorSanitizer: misaligned-pointer-use util/synthetic-events.c:1539:4 in Fixes: 045f8cd8542d ("perf tests: Add a sample parsing test") Signed-off-by: Namhyung Kim Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jir

[PATCH 5.11 429/775] kunit: tool: fix unit test cleanup handling

2021-03-01 Thread Greg Kroah-Hartman
From: Daniel Latypov [ Upstream commit cfd607e43da4a20753744f134e201310262b827a ] * Stop leaking file objects. * Use self.addCleanup() to ensure we call cleanup functions even if setUp() fails. * use mock.patch.stopall instead of more error-prone manual approach Signed-off-by: Daniel Latypov

[PATCH 5.10 263/663] selftests/powerpc: Make the test check in eeh-basic.sh posix compliant

2021-03-01 Thread Greg Kroah-Hartman
From: Po-Hsu Lin [ Upstream commit 3db380570af7052620ace20c29e244938610ca71 ] The == operand is a bash extension, thus this will fail on Ubuntu with: ./eeh-basic.sh: 89: test: 2: unexpected operator As the /bin/sh on Ubuntu is pointed to DASH. Use -eq to fix this posix compatibility issue

[PATCH 5.10 354/663] kunit: tool: fix unit test cleanup handling

2021-03-01 Thread Greg Kroah-Hartman
From: Daniel Latypov [ Upstream commit cfd607e43da4a20753744f134e201310262b827a ] * Stop leaking file objects. * Use self.addCleanup() to ensure we call cleanup functions even if setUp() fails. * use mock.patch.stopall instead of more error-prone manual approach Signed-off-by: Daniel Latypov

[PATCH 5.10 659/663] wireguard: selftests: test multiple parallel streams

2021-03-01 Thread Greg Kroah-Hartman
From: Jason A. Donenfeld commit d5a49aa6c3e264a93a7d08485d66e346be0969dd upstream. In order to test ndo_start_xmit being called in parallel, explicitly add separate tests, which should all run on different cores. This should help tease out bugs associated with queueing up packets from different

[PATCH 5.10 388/663] perf test: Fix unaligned access in sample parsing test

2021-03-01 Thread Greg Kroah-Hartman
... SUMMARY: UndefinedBehaviorSanitizer: misaligned-pointer-use util/synthetic-events.c:1539:4 in Fixes: 045f8cd8542d ("perf tests: Add a sample parsing test") Signed-off-by: Namhyung Kim Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jir

[PATCH 5.11 311/775] selftests/powerpc: Make the test check in eeh-basic.sh posix compliant

2021-03-01 Thread Greg Kroah-Hartman
From: Po-Hsu Lin [ Upstream commit 3db380570af7052620ace20c29e244938610ca71 ] The == operand is a bash extension, thus this will fail on Ubuntu with: ./eeh-basic.sh: 89: test: 2: unexpected operator As the /bin/sh on Ubuntu is pointed to DASH. Use -eq to fix this posix compatibility issue

[PATCH 5.11 302/775] Input: da7280 - fix missing error test

2021-03-01 Thread Greg Kroah-Hartman
From: Dmitry Torokhov [ Upstream commit 1e2020aa0da00051d94c4690c023c45d8f3834bd ] An "if" testing for error condition has accidentally been dropped from the code. Reported-by: kernel test robot Fixes: cd3f609823a5 ("Input: new da7280 haptic driver") Reviewed-by:

[PATCH 5.4 198/340] perf test: Fix unaligned access in sample parsing test

2021-03-01 Thread Greg Kroah-Hartman
... SUMMARY: UndefinedBehaviorSanitizer: misaligned-pointer-use util/synthetic-events.c:1539:4 in Fixes: 045f8cd8542d ("perf tests: Add a sample parsing test") Signed-off-by: Namhyung Kim Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jir

[PATCH 5.4 130/340] selftests/powerpc: Make the test check in eeh-basic.sh posix compliant

2021-03-01 Thread Greg Kroah-Hartman
From: Po-Hsu Lin [ Upstream commit 3db380570af7052620ace20c29e244938610ca71 ] The == operand is a bash extension, thus this will fail on Ubuntu with: ./eeh-basic.sh: 89: test: 2: unexpected operator As the /bin/sh on Ubuntu is pointed to DASH. Use -eq to fix this posix compatibility issue

Re: [PATCH 04/11] perf test: Fix cpu and thread map leaks in sw_clock_freq test

2021-03-01 Thread Jiri Olsa
On Mon, Mar 01, 2021 at 11:04:02PM +0900, Namhyung Kim wrote: > The evlist has the maps with its own refcounts so we don't need to set > the pointers to NULL. Otherwise following error was reported by Asan. > > Also change the goto label since it doesn't need to have two. > >

[PATCH 5.4 002/340] kvm: x86: replace kvm_spec_ctrl_test_value with runtime test on the host

2021-03-01 Thread Greg Kroah-Hartman
host CPU supports STIBP mitigation but doesn't support IBRS (as is the case with some Zen2 AMD cpus), and in this case we were giving guest #GP when it tried to use STIBP The reason why can can do the host test is that IA32_SPEC_CTRL msr is passed to the guest, after the guest sets it to a non

[PATCH 4.19 151/247] perf test: Fix unaligned access in sample parsing test

2021-03-01 Thread Greg Kroah-Hartman
... SUMMARY: UndefinedBehaviorSanitizer: misaligned-pointer-use util/synthetic-events.c:1539:4 in Fixes: 045f8cd8542d ("perf tests: Add a sample parsing test") Signed-off-by: Namhyung Kim Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jir

[PATCH 4.14 100/176] perf test: Fix unaligned access in sample parsing test

2021-03-01 Thread Greg Kroah-Hartman
... SUMMARY: UndefinedBehaviorSanitizer: misaligned-pointer-use util/synthetic-events.c:1539:4 in Fixes: 045f8cd8542d ("perf tests: Add a sample parsing test") Signed-off-by: Namhyung Kim Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jir

[PATCH 4.9 071/134] perf test: Fix unaligned access in sample parsing test

2021-03-01 Thread Greg Kroah-Hartman
... SUMMARY: UndefinedBehaviorSanitizer: misaligned-pointer-use util/synthetic-events.c:1539:4 in Fixes: 045f8cd8542d ("perf tests: Add a sample parsing test") Signed-off-by: Namhyung Kim Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jir

[PATCH 4.4 50/93] perf test: Fix unaligned access in sample parsing test

2021-03-01 Thread Greg Kroah-Hartman
... SUMMARY: UndefinedBehaviorSanitizer: misaligned-pointer-use util/synthetic-events.c:1539:4 in Fixes: 045f8cd8542d ("perf tests: Add a sample parsing test") Signed-off-by: Namhyung Kim Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jir

[PATCH 11/11] perf test: Fix cpu and thread map leaks in perf_time_to_tsc test

2021-03-01 Thread Namhyung Kim
It should release the maps at the end. $ perf test -v 71 71: Convert perf time to TSC : --- start --- test child forked, pid 178744 mmap size 528384B 1st event perf time 59207256505278 tsc 13187166645142 rdtsc time 59207256542151 tsc 13187166723020 2nd

[PATCH 10/11] perf test: Fix cpu map leaks in cpu_map_print test

2021-03-01 Thread Namhyung Kim
It should be released after printing the map. $ perf test -v 52 52: Print cpu map : --- start --- test child forked, pid 172233 = ==172233==ERROR: LeakSanitizer: detected memory leaks

[PATCH 06/11] perf test: Fix cpu and thread map leaks in keep_tracking test

2021-03-01 Thread Namhyung Kim
The evlist and the cpu/thread maps should be released together. Otherwise following error was reported by Asan. $ perf test -v 28 28: Use a dummy software event to keep tracking: --- start --- test child forked, pid 156810 mmap size 528384B

[PATCH 08/11] perf test: Fix a thread map leak in thread_map_synthesize test

2021-03-01 Thread Namhyung Kim
It missed to call perf_thread_map__put() after using the map. $ perf test -v 43 43: Synthesize thread map : --- start --- test child forked, pid 162640 = ==162640==ERROR: LeakSanitizer: detected

[PATCH 02/11] perf test: Fix a memory leak in attr test

2021-03-01 Thread Namhyung Kim
The get_argv_exec_path() returns a dynamic memory so it should be freed after use. $ perf test -v 17 ... ==141682==ERROR: LeakSanitizer: detected memory leaks Direct leak of 33 byte(s) in 1 object(s) allocated from: #0 0x7f09107d2e8f in __interceptor_malloc ../../../../src

[PATCH 05/11] perf test: Fix cpu and thread map leaks in code_reading test

2021-03-01 Thread Namhyung Kim
The evlist and the cpu/thread maps should be released together. Otherwise following error was reported by Asan. Note that this test still has memory leaks in DSOs so it still fails even after this change. I'll take a look at that too. # perf test -v 26 26: Object code reading

[PATCH 03/11] perf test: Fix cpu and thread map leaks in task_exit test

2021-03-01 Thread Namhyung Kim
The evlist has the maps with its own refcounts so we don't need to set the pointers to NULL. Otherwise following error was reported by Asan. Also change the goto label since it doesn't need to have two. # perf test -v 24 24: Number of exit events of a simple workload : --- start

[PATCH 04/11] perf test: Fix cpu and thread map leaks in sw_clock_freq test

2021-03-01 Thread Namhyung Kim
The evlist has the maps with its own refcounts so we don't need to set the pointers to NULL. Otherwise following error was reported by Asan. Also change the goto label since it doesn't need to have two. # perf test -v 25 25: Software clock events period values: --- start

[PATCHSET 00/11] perf test: Fix cpu/thread map leaks

2021-03-01 Thread Namhyung Kim
Hi, This patchset fixes memory leaks in the perf test code. In my company setup, it runs daily with various sanitizers on, so I want to reduce the failures due to the leaks not the logic. This time I've focused on the cpu and thread maps as they are obvious and easy to fix. I'll take a look

[PATCH 01/11] perf test: Fix cpu and thread map leaks in basic mmap test

2021-03-01 Thread Namhyung Kim
The evlist has the maps with its own refcounts so we don't need to set the pointers to NULL. Otherwise following error was reported by Asan. # perf test -v 4 4: Read samples using the mmap interface : --- start --- test child forked, pid 139782 mmap size 528384B

[PATCH 09/11] perf test: Fix a memory leak in thread_map_remove test

2021-03-01 Thread Namhyung Kim
The str should be freed after creating a thread map. Also change the open-coded thread map deletion to a call to perf_thread_map__put(). $ perf test -v 44 44: Remove thread map : --- start --- test child forked, pid 165536 2 threads: 165535, 165536 1 thread

[PATCH 07/11] perf test: Fix cpu and thread map leaks in switch_tracking test

2021-03-01 Thread Namhyung Kim
The evlist and cpu/thread maps should be released together. Otherwise the following error was reported by Asan. $ perf test -v 35 35: Track with sched_switch: --- start --- test child forked, pid 159287 Using CPUID GenuineIntel-6-8E-C mmap size 528384B 1295

[PATCH 2/2] perf daemon: Allow test for non root user

2021-03-01 Thread Jiri Olsa
John reported that the daemon test is not working for non root user. Changing the tests configurations so it's allowed to run under normal user. Fixes: 2291bb915b55 ("perf tests: Add daemon 'list' command test") Reported-by: John Garry Tested-by: John Garry Signed-off-by: Jiri Olsa

[RFC PATCH v3 8/8] KVM: selftests: Add a test for kvm page table code

2021-02-28 Thread Yanan Wang
This test serves as a performance tester and a bug reproducer for kvm page table code (GPA->HPA mappings), so it gives guidance for people trying to make some improvement for kvm. The function guest_code() can cover the conditions where a single vcpu or multiple vcpus access guest pages wit

[RFC PATCH v3 0/7] KVM: selftests: some improvement and a new test for kvm page table

2021-02-28 Thread Yanan Wang
are listed, it's appropriate for all architectures. Besides, a helper that can get granularity of different backing src types(anonumous/thp/hugetlb) is added, so that we can use the accurate backing src granularity for kinds of alignment or guest memory accessing of vcpus. In the second part, a new test

[PATCH v6 6/6] selftest/x86/signal: Include test cases for validating sigaltstack

2021-02-27 Thread Chang S. Bae
The test measures the kernel's signal delivery with different (enough vs. insufficient) stack sizes. Signed-off-by: Chang S. Bae Reviewed-by: Len Brown Cc: x...@kernel.org Cc: linux-kselft...@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- Changes from v3: * Revised test messages again

Re: [PATCH] perf buildid-cache: Add test for PE executable

2021-02-27 Thread Jiri Olsa
00 2001 > > > From: Nicholas Fraser > > > Date: Thu, 18 Feb 2021 13:24:03 -0500 > > > Subject: [PATCH] perf buildid-cache: Add test for PE executable > > > > > > This builds on the previous changes to tests/shell/buildid.sh, adding > > > tests for

Re: [PATCH] perf buildid-cache: Add test for PE executable

2021-02-26 Thread Arnaldo Carvalho de Melo
> Subject: [PATCH] perf buildid-cache: Add test for PE executable > > > > This builds on the previous changes to tests/shell/buildid.sh, adding > > tests for a PE file. It adds it to the build-id cache manually and, if > > Wine is available, runs it under "perf

Re: perf test for daemon

2021-02-26 Thread John Garry
On 25/02/2021 19:35, Jiri Olsa wrote: On Thu, Feb 25, 2021 at 08:13:07PM +0100, Jiri Olsa wrote: On Thu, Feb 25, 2021 at 06:39:22PM +, John Garry wrote: Hi, I notice that "perf test" when run without root priviledges now hangs at the daemon test - is this expected behaviour? C

Re: [reiser4 SFRN 5.1.3] kernel [5.10.x] read not supported for file /test-exec \(pid: 10094 comm: debootstrap\)

2021-02-25 Thread Jose R Rodriguez
> > > > > VirtualBox 6.1.16: > > > > > > > ... > > > > > > > Dec 22 20:19:56 main-menu[330]: INFO: Menu item 'bootstrap- > > > > > > > base' selected > > > > > > > Dec 22 20:19:56 debootstrap: /usr/sbin/debootstrap

Re: [RFC PATCH v2 0/7] Some improvement and a new test for kvm page table

2021-02-25 Thread Ben Gardon
ugetlb page sizes are > listed, it's appropriate for all architectures. Besides, a helper that > can get granularity of different backing src types(anonumous/thp/hugetlb) > is added, so that we can use the accurate backing src granularity for > kinds of alignment or guest memory access

[PATCH v6 bpf-next 4/6] selftests/bpf: test deadlock from recursive bpf_task_storage_[get|delete]

2021-02-25 Thread Song Liu
Add a test with recursive bpf_task_storage_[get|delete] from fentry programs on bpf_local_storage_lookup and bpf_local_storage_update. Without proper deadlock prevent mechanism, this test would cause deadlock. Signed-off-by: Song Liu --- .../bpf/prog_tests/task_local_storage.c | 23

[PATCH v6 bpf-next 3/6] selftests/bpf: add non-BPF_LSM test for task local storage

2021-02-25 Thread Song Liu
Task local storage is enabled for tracing programs. Add two tests for task local storage without CONFIG_BPF_LSM. The first test stores a value in sys_enter and read it back in sys_exit. The second test checks whether the kernel allows allocating task local storage in exit_creds() (which

Re: [PATCH] perf buildid-cache: Add test for PE executable

2021-02-25 Thread Jiri Olsa
On Wed, Feb 24, 2021 at 02:59:16PM -0500, Nicholas Fraser wrote: > From 9fd0b3889f00ad13662879767d833309d8a035b6 Mon Sep 17 00:00:00 2001 > From: Nicholas Fraser > Date: Thu, 18 Feb 2021 13:24:03 -0500 > Subject: [PATCH] perf buildid-cache: Add test for PE executable >

Re: perf test for daemon

2021-02-25 Thread Jiri Olsa
On Thu, Feb 25, 2021 at 08:13:07PM +0100, Jiri Olsa wrote: > On Thu, Feb 25, 2021 at 06:39:22PM +, John Garry wrote: > > > > Hi, > > > > I notice that "perf test" when run without root priviledges now hangs at the > > daemon test - is this expect

Re: perf test for daemon

2021-02-25 Thread Jiri Olsa
On Thu, Feb 25, 2021 at 06:39:22PM +, John Garry wrote: > > Hi, > > I notice that "perf test" when run without root priviledges now hangs at the > daemon test - is this expected behaviour? Can we skip and warn the user > instead? > > I'm checking acme

perf test for daemon

2021-02-25 Thread John Garry
Hi, I notice that "perf test" when run without root priviledges now hangs at the daemon test - is this expected behaviour? Can we skip and warn the user instead? I'm checking acme perf/core today. Thanks Forwarded Message Subject: [GIT PULL] perf tools changes

[PATCH v9 8/9] ecdsa: Register NIST P384 and extend test suite

2021-02-25 Thread Stefan Berger
From: Saulo Alessandre * crypto/ecdsa.c - add ecdsa_nist_p384_init_tfm - register and unregister P384 tfm * crypto/testmgr.c - add test vector for P384 on vector of tests * crypto/testmgr.h - add test vector params for P384(sha1, sha224, sha256, sha384 and sha512) Signed-off

Re: [PATCH] mm: test page->flags directly in page_lru()

2021-02-25 Thread Matthew Wilcox
nk folio is absolutely more suitable even for this specific issue, > > > I'll go review and test the four patches you listed. Sounds good? > > > > Umm. It seems to me that no matter what you do, it'll be equivalent to > > this, only without the type-safety? > > I'm t

[PATCH 6/6] testing/selftest: test vDSO prefetch_page()

2021-02-24 Thread Nadav Amit
From: Nadav Amit Test prefetch_page() in cases of invalid pointer, file-mmap and anonymous memory. Partial checks are also done with mincore syscall to ensure the output of prefetch_page() is consistent with mincore (taking into account the different semantics of the two). The tests

[RFC PATCH v2 7/7] KVM: selftests: Add a test for kvm page table code

2021-02-24 Thread Yanan Wang
This test serves as a performance tester and a bug reproducer for kvm page table code (GPA->HPA mappings), so it gives guidance for people trying to make some improvement for kvm. The function guest_code() can cover the conditions where a single vcpu or multiple vcpus access guest pages wit

[RFC PATCH v2 0/7] Some improvement and a new test for kvm page table

2021-02-24 Thread Yanan Wang
of different backing src types(anonumous/thp/hugetlb) is added, so that we can use the accurate backing src granularity for kinds of alignment or guest memory accessing of vcpus. In the second part, a new test is added: This test is added to serve as a performance tester and a bug reproducer for kvm

Re: [PATCH] mm: test page->flags directly in page_lru()

2021-02-24 Thread Yu Zhao
t overkill, that really is the point of a folio! If you > think about it, only head pages can be on the LRU list (because the > compound_head is in the union with the lru list_head). So it > always makes sense to talk about folios on the LRU list. > > > Let me work out something *conc

Re: [PATCH] mm: test page->flags directly in page_lru()

2021-02-24 Thread Matthew Wilcox
not a criticism but a compliment. It's not overkill, that really is the point of a folio! If you think about it, only head pages can be on the LRU list (because the compound_head is in the union with the lru list_head). So it always makes sense to talk about folios on the LRU list. >

[PATCH 4/5] userfaultfd/selftests: reinitialize test context in each test

2021-02-24 Thread Axel Rasmussen
Currently, the context (fds, mmap-ed areas, etc.) are global. Each test mutates this state in some way, in some cases really "clobbering it" (e.g., the events test mremap-ing area_dst over the top of area_src, or the minor faults tests overwriting the count_verify values in the test area

[PATCH 3/5] userfaultfd/selftests: create alias mappings in the shmem test

2021-02-24 Thread Axel Rasmussen
, we'll leverage this setup to exercise minor fault handling support for shmem, just like we do in the hugetlb_shared test. Signed-off-by: Axel Rasmussen --- tools/testing/selftests/vm/userfaultfd.c | 29 +--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/tools

[PATCH 2/5] userfaultfd/selftests: use memfd_create for shmem test type

2021-02-24 Thread Axel Rasmussen
This is a preparatory commit. In the future, we want to be able to setup alias mappings for area_src and area_dst in the shmem test, like we do in the hugetlb_shared test. With a VMA obtained via mmap(MAP_ANONYMOUS | MAP_SHARED), it isn't clear how to do this. So, mmap() with an fd, so we can

[PATCH v8 6/6] userfaultfd/selftests: add test exercising minor fault handling

2021-02-24 Thread Axel Rasmussen
Fix a dormant bug in userfaultfd_events_test(), where we did `return faulting_process(0)` instead of `exit(faulting_process(0))`. This caused the forked process to keep running, trying to execute any further test cases after the events test in parallel with the "real" process. Add a s

Re: [PATCH] mm: test page->flags directly in page_lru()

2021-02-24 Thread Yu Zhao
not a criticism but a compliment. Let me work out something *conceptually* smaller first, and if you think folio is absolutely more suitable even for this specific issue, I'll go review and test the four patches you listed. Sounds good?

Re: [PATCH] mm: test page->flags directly in page_lru()

2021-02-24 Thread Matthew Wilcox
On Wed, Feb 24, 2021 at 03:34:16PM -0700, Yu Zhao wrote: > > If only somebody were working on a patch series to get rid of > > all those calls to compound_head()! Some reviews on > > https://lore.kernel.org/linux-mm/20210128070404.1922318-2-wi...@infradead.org/ > > would be nice. > > I'm on

Re: [PATCH] mm: test page->flags directly in page_lru()

2021-02-24 Thread Yu Zhao
ot;.popsection" : : "i" > > ("./include/linux/page-flags.h"), "i" (338), "i" (0), "i" (sizeof(struct > > bug_entry))); } while (0); do { ({ asm volatile("%c0:\n\t" ".pushsection > > .discard.unreachable\n\t" &q

Re: [PATCH] mm: test page->flags directly in page_lru()

2021-02-24 Thread Matthew Wilcox
c1" "\t# bug_entry::line\n" "\t.word %c2" "\t# > bug_entry::flags\n" "\t.org 2b+%c3\n" ".popsection" : : "i" > ("./include/linux/page-flags.h"), "i" (338), "i" (0), "i" (sizeof(struct

[PATCH] perf buildid-cache: Add test for PE executable

2021-02-24 Thread Nicholas Fraser
>From 9fd0b3889f00ad13662879767d833309d8a035b6 Mon Sep 17 00:00:00 2001 From: Nicholas Fraser Date: Thu, 18 Feb 2021 13:24:03 -0500 Subject: [PATCH] perf buildid-cache: Add test for PE executable This builds on the previous changes to tests/shell/buildid.sh, adding tests for a PE file. It a

Re: [PATCH] mm: test page->flags directly in page_lru()

2021-02-24 Thread Yu Zhao
e > > may be other cases that need compound_head(). This patch makes > > page_lru() and __clear_page_lru_flags(), which are used immediately > > before and after operations on page->lru, test > > PG_{active,unevictable} directly against page->flags instead. > > Oh geeze. > >

Re: [PATCH 2/2] perf buildid-cache: Add test for PE executable

2021-02-24 Thread Nicholas Fraser
On 2021-02-24 8:43 a.m., Jiri Olsa wrote: > On Fri, Feb 19, 2021 at 11:10:34AM -0500, Nicholas Fraser wrote: >> +# the build id must be rearranged into a GUID >> +id=`objcopy -O binary --only-section=.buildid $1 /dev/stdout | \ >> +cut -c 33-48 |

Re: [PATCH 2/2] perf buildid-cache: Add test for PE executable

2021-02-24 Thread Jiri Olsa
mp /tmp/perf.ex.SHA1.XXX) > +ex_pe=$(dirname $0)/../pe-file.exe > > echo 'int main(void) { return 0; }' | cc -Wl,--build-id=sha1 -o ${ex_sha1} > -x c - > echo 'int main(void) { return 0; }' | cc -Wl,--build-id=md5 -o ${ex_md5} -x > c - > > -echo "test binaries: ${

Re: [PATCH] mm: test page->flags directly in page_lru()

2021-02-24 Thread Andrew Morton
inlined many places. > And removing compound_head() entirely from Page{Active,Unevictable} > may not be the best option (for the moment) either because there > may be other cases that need compound_head(). This patch makes > page_lru() and __clear_page_lru_flags(), which are used immediately

[PATCH] Documentation: kselftest: fix path to test module files

2021-02-24 Thread Antonio Terceiro
b/Documentation/dev-tools/kselftest.rst index a901def730d9..dcefee707ccd 100644 --- a/Documentation/dev-tools/kselftest.rst +++ b/Documentation/dev-tools/kselftest.rst @@ -239,8 +239,8 @@ using a shell script test runner. ``kselftest/module.sh`` is designed to facilitate this process

[PATCH] mm: test page->flags directly in page_lru()

2021-02-24 Thread Yu Zhao
st option (for the moment) either because there may be other cases that need compound_head(). This patch makes page_lru() and __clear_page_lru_flags(), which are used immediately before and after operations on page->lru, test PG_{active,unevictable} directly against page->flags instead.

this is mail test since the mail also rejected

2021-02-23 Thread campion test

[PATCH v5 bpf-next 3/6] selftests/bpf: add non-BPF_LSM test for task local storage

2021-02-23 Thread Song Liu
Task local storage is enabled for tracing programs. Add two tests for task local storage without CONFIG_BPF_LSM. The first test stores a value in sys_enter and read it back in sys_exit. The second test checks whether the kernel allows allocating task local storage in exit_creds() (which

[PATCH v5 bpf-next 4/6] selftests/bpf: test deadlock from recursive bpf_task_storage_[get|delete]

2021-02-23 Thread Song Liu
Add a test with recursive bpf_task_storage_[get|delete] from fentry programs on bpf_local_storage_lookup and bpf_local_storage_update. Without proper deadlock prevent mechanism, this test would cause deadlock. Signed-off-by: Song Liu --- .../bpf/prog_tests/task_local_storage.c | 23

[PATCH v2 0/3] x86/entry: A compat syscall bugfix and some test stuff

2021-02-23 Thread Andy Lutomirski
The compat syscall argument fixup error path is wrong. Fix it. This also adds some sanity checks to the kernel that catch the bug when running selftests. Changes from v1: - The fix is actually correct this time, I hope Andy Lutomirski (3): entry: Check that syscall entries and syscall exits

[PATCH 0/3] x86/entry: A compat syscall bugfix and some test stuff

2021-02-22 Thread Andy Lutomirski
The compat syscall argument fixup error path is wrong. Fix it. This also adds some sanity checks to the kernel that catch the bug when running selftests. Andy Lutomirski (3): entry: Check that syscall entries and syscall exits match x86/entry: Fix entry/exit mismatch on failed fast 32-bit

[PATCH v4 bpf-next 3/6] selftests/bpf: add non-BPF_LSM test for task local storage

2021-02-22 Thread Song Liu
Task local storage is enabled for tracing programs. Add two tests for task local storage without CONFIG_BPF_LSM. The first test stores a value in sys_enter and read it back in sys_exit. The second test checks whether the kernel allows allocating task local storage in exit_creds() (which

[PATCH v4 bpf-next 4/6] selftests/bpf: test deadlock from recursive bpf_task_storage_[get|delete]

2021-02-22 Thread Song Liu
Add a test with recursive bpf_task_storage_[get|delete] from fentry programs on bpf_local_storage_lookup and bpf_local_storage_update. Without proper deadlock prevent mechanism, this test would cause deadlock. Signed-off-by: Song Liu --- .../bpf/prog_tests/task_local_storage.c | 23

[PATCH v7 7/7] kselftests: Add test to check for rlimit changes in different user namespaces

2021-02-22 Thread Alexey Gladkov
XITSTATUS(wstatus[i])); + else if (WIFSIGNALED(wstatus[i])) + warnx("(pid=%d): pid %d killed by signal %d", + pid, -child[i], WTERMSIG(wstatus[i])); + + if (WIFSIGNALED(wstatus[i]) && WTERMSIG(wstatus[i]) == SIGUSR1) + continue; + + warnx("(pid=%d): Test failed", pid); + exit(EXIT_FAILURE); + } + + warnx("(pid=%d): Test passed", pid); + exit(EXIT_SUCCESS); +} -- 2.29.2

[PATCH 3/4] tpm: Fix test for interrupts

2021-02-21 Thread Lino Sanfilippo
The current test for functional interrupts is broken in multiple ways: 1. The needed flag TPM_CHIP_FLAG_IRQ is never set, so the test is never executed. 2. The test includes the check for two variables and the check is done for each transmission which is unnecessarily complicated. 3. Part

[PATCH v4 20/22] selftest/x86/amx: Include test cases for the AMX state management

2021-02-21 Thread Chang S. Bae
initialized its AMX state. Collect the test cases of validating those operations together, as they share some common setup for the AMX state. These test cases do not depend on AMX compiler support, as they employ userspace-XSAVE directly to access AMX state. Signed-off-by: Chang S. Bae Reviewed

Re: [PATCH 3/3] crypto: hisilicon/sec - fixes shash test error

2021-02-20 Thread liulongfang
On 2021/2/5 19:44, Herbert Xu Wrote: > On Fri, Feb 05, 2021 at 06:10:57PM +0800, Longfang Liu wrote: >> If this configuration item is not turned on, >> the allocation of crypto_tfm will fail when >> the shash algorithm calculates the hash >> through the software. >> >> Signed-off-by: Longfang Liu

Re: [PATCH v2 3/3] crypto: hisilicon/sec - fixes shash test error

2021-02-20 Thread liulongfang
included that. > > Cheers, > On this kernel version, those modules set to Y will not use the sha512 algorithm. And our SEC module selects it "select CRYPTO_SHA512", so it is compiled into ko: "sha512_generic.ko". Because we did not load the "sha512_generic.ko" when we loaded the ko of SEC, the sha512 algorithm test failed, Therefore, before using SEC, we need to load this ko first, so this patch is not required, please ignore it. Thanks Longfang.

[RFC PATCH 3/3] selftests/seccomp: Add test for wait killable notifier

2021-02-20 Thread Sargun Dhillon
This adds a test for the positive case of the wait killable notifier, in testing that when the feature is activated the process acts as expected -- in not terminating on a non-fatal signal, and instead queueing it up. There is already a test case for normal handlers and preemption. Signed-off

[PATCH 2/2] perf buildid-cache: Add test for PE executable

2021-02-19 Thread Nicholas Fraser
This builds on the previous changes to tests/shell/buildid.sh, adding tests for a PE file. It adds it to the build-id cache manually and, if Wine is available, runs it under "perf record" and verifies that it was added automatically. If wine is not installed, only warnings are printed

<    2   3   4   5   6   7   8   9   10   11   >