Re: [PATCH 1/3] riscv: mm: Use hint address in mmap if available

2024-01-29 Thread Yangyu Chen
On Mon, 2024-01-29 at 18:50 -0800, Charlie Jenkins wrote: > On Tue, Jan 30, 2024 at 10:34:03AM +0800, Yangyu Chen wrote: > > > > > On Jan 30, 2024, at 08:37, Charlie Jenkins > > > wrote: > > > > > > On riscv it is guaranteed that the address returned by mmap is > > > less than > > > the hint add

Re: [PATCH bpf-next v4 2/3] selftests/bpf: Make install target copy test_progs extra files

2024-01-29 Thread Björn Töpel
Andrii Nakryiko writes: > On Sun, Jan 28, 2024 at 11:09 PM Björn Töpel wrote: >> >> From: Björn Töpel >> >> Currently, "make install" does not install the required test_progs >> "extra files" (e.g. kernel modules, helper shell scripts, etc.) for >> the BPF machine flavors (e.g. cpuv4). >> >> Ad

[PATCH v2 3/3] selftests/net: Repair RST passive reset selftest

2024-01-29 Thread Dmitry Safonov
Currently, the test is racy and seems to not pass anymore. In order to rectify it, aim on TCP_TW_RST. Doesn't seem way too good with this sleep() part, but it seems as a reasonable compromise for the test. There is a plan in-line comment on how-to improve it, going to do it on the top, at this mom

[PATCH v2 2/3] selftests/net: Rectify key counters checks

2024-01-29 Thread Dmitry Safonov
As the names of (struct test_key) members didn't reflect whether the key was used for TX or RX, the verification for the counters was done incorrectly for asymmetrical selftests. Rename these with _tx appendix and fix checks in verify_counters(). While at it, as the checks are now correct, introdu

[PATCH v2 1/3] selftests/net: Argument value mismatch when calling verify_counters()

2024-01-29 Thread Dmitry Safonov
From: Mohammad Nassiri The end_server() function only operates in the server thread and always takes an accept socket instead of a listen socket as its input argument. To align with this, invert the boolean values used when calling verify_counters() within the end_server() function. As a result

[PATCH v2 0/3] selftests/net: A couple of typos fixes in key-management/rst tests

2024-01-29 Thread Dmitry Safonov
Changes in v2: - Dropped "selftests/net: Clean-up double assignment", going to send it to net-next with other changes (Simon) - Added a patch to rectify RST selftests. - Link to v1: https://lore.kernel.org/r/20240118-tcp-ao-test-key-mgmt-v1-0-3583ca147...@arista.com Two typo fixes, noticed by M

Re: [PATCH 1/3] riscv: mm: Use hint address in mmap if available

2024-01-29 Thread Charlie Jenkins
On Tue, Jan 30, 2024 at 10:34:03AM +0800, Yangyu Chen wrote: > > > On Jan 30, 2024, at 08:37, Charlie Jenkins wrote: > > > > On riscv it is guaranteed that the address returned by mmap is less than > > the hint address. Allow mmap to return an address all the way up to > > addr, if provided, rat

Re: [PATCH net] selftests: net: add missing config for nftables-backed iptables

2024-01-29 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (main) by Jakub Kicinski : On Fri, 26 Jan 2024 12:13:08 -0800 you wrote: > Modern OSes use iptables implementation with nf_tables as a backend, > e.g.: > > $ iptables -V > iptables v1.8.8 (nf_tables) > > Pablo points out that we need CONFIG_NFT_CO

Re: [PATCH 1/3] riscv: mm: Use hint address in mmap if available

2024-01-29 Thread Yangyu Chen
> On Jan 30, 2024, at 08:37, Charlie Jenkins wrote: > > On riscv it is guaranteed that the address returned by mmap is less than > the hint address. Allow mmap to return an address all the way up to > addr, if provided, rather than just up to the lower address space. > > This provides a perfor

Re: [PATCH 0/3] riscv: mm: Use hint address in mmap if available

2024-01-29 Thread Charlie Jenkins
On Mon, Jan 29, 2024 at 09:04:50PM -0500, Stefan O'Rear wrote: > On Mon, Jan 29, 2024, at 7:36 PM, Charlie Jenkins wrote: > > On riscv, mmap currently returns an address from the largest address > > space that can fit entirely inside of the hint address. This makes it > > such that the hint address

Re: [PATCH 0/3] riscv: mm: Use hint address in mmap if available

2024-01-29 Thread Stefan O'Rear
On Mon, Jan 29, 2024, at 7:36 PM, Charlie Jenkins wrote: > On riscv, mmap currently returns an address from the largest address > space that can fit entirely inside of the hint address. This makes it > such that the hint address is almost never returned. This patch raises > the mappable area up to

Re: [PATCH 1/3] riscv: mm: Use hint address in mmap if available

2024-01-29 Thread Charlie Jenkins
On Mon, Jan 29, 2024 at 08:53:31PM -0500, Stefan O'Rear wrote: > On Mon, Jan 29, 2024, at 7:37 PM, Charlie Jenkins wrote: > > On riscv it is guaranteed that the address returned by mmap is less than > > the hint address. Allow mmap to return an address all the way up to > > addr, if provided, rathe

Re: [PATCH 1/3] riscv: mm: Use hint address in mmap if available

2024-01-29 Thread Stefan O'Rear
On Mon, Jan 29, 2024, at 7:37 PM, Charlie Jenkins wrote: > On riscv it is guaranteed that the address returned by mmap is less than > the hint address. Allow mmap to return an address all the way up to > addr, if provided, rather than just up to the lower address space. > > This provides a performa

[PATCH 6/9] selftets/damon: prepare for monitor_on file renaming

2024-01-29 Thread SeongJae Park
Following change will rename 'monitor_on' DAMON debugfs file to 'monitor_on_DEPRECATED', to make the deprecation unignorable in runtime. Since it could make DAMON selftests fail and disturb future bisects, update DAMON selftests to support the change. Signed-off-by: SeongJae Park --- tools/testi

[PATCH 0/9] mm/damon: make DAMON debugfs interface deprecation unignorable

2024-01-29 Thread SeongJae Park
DAMON debugfs interface is deprecated in February 2023, by commit 5445fcbc4cda ("Docs/admin-guide/mm/damon/usage: add DAMON debugfs interface deprecation notice"). Make the fact unable to be easily ignored by removing an example usage from the document (patch 1), renaming the config (patch 2), add

Re: [PATCH 3/3] selftests: add test for zswapin

2024-01-29 Thread Yosry Ahmed
On Mon, Jan 29, 2024 at 02:45:42PM -0800, Nhat Pham wrote: > We recently encountered a kernel crash on the zswapin path in our > internal kernel, which went undetected because of a lack of test > coverage for this path. Add a selftest to cover this code path, > allocating more memories than the cgr

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

2024-01-29 Thread Yosry Ahmed
On Mon, Jan 29, 2024 at 02:45:41PM -0800, Nhat Pham wrote: > 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/ > >

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

2024-01-29 Thread Yosry Ahmed
On Mon, Jan 29, 2024 at 02:45:40PM -0800, Nhat Pham wrote: > Make it easier for contributors to find the zswap maintainers when they > update the zswap tests. > > Signed-off-by: Nhat Pham I guess I had to check the zswap tests at some point :) Acked-by: Yosry Ahmed > --- > MAINTAINERS | 1 +

Re: [PATCH bpf-next v4 2/3] selftests/bpf: Make install target copy test_progs extra files

2024-01-29 Thread Andrii Nakryiko
On Sun, Jan 28, 2024 at 11:09 PM Björn Töpel wrote: > > From: Björn Töpel > > Currently, "make install" does not install the required test_progs > "extra files" (e.g. kernel modules, helper shell scripts, etc.) for > the BPF machine flavors (e.g. cpuv4). > > Add the missing "extra files" dependen

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

2024-01-29 Thread Stephen Boyd
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: David Gow Cc: Brendan Higgins Signed-off-by: Stephen Boyd --- drivers/of/.kunitconfig | 3 +++ drivers/of/Kconfig

[PATCH v2 6/7] of: unittest: treat missing of_root as error instead of fixing up

2024-01-29 Thread Stephen Boyd
From: Frank Rowand unflatten_device_tree() now ensures that the 'of_root' node is populated with the root of a default empty devicetree. Remove the unittest code that created 'of_root' if it was missing. Verify that 'of_root' is valid before attempting to attach the testcase-data subtree. Remove

[PATCH v2 5/7] of: Create of_root if no dtb provided by firmware

2024-01-29 Thread Stephen Boyd
From: Frank Rowand When enabling CONFIG_OF on a platform where 'of_root' is not populated by firmware, we end up without a root node. In order to apply overlays and create subnodes of the root node, we need one. Create this root node by unflattening an empty builtin dtb. If firmware provides a f

[PATCH v2 4/7] of: Always unflatten in unflatten_and_copy_device_tree()

2024-01-29 Thread Stephen Boyd
We want to populate an empty DT whenever CONFIG_OF is enabled so that overlays can be applied and the DT unit tests can be run. Make unflatten_and_copy_device_tree() stop printing a warning if the 'initial_boot_params' pointer is NULL. Instead, simply copy the dtb if there is one and then unflatten

[PATCH v2 3/7] x86/of: Unconditionally call unflatten_and_copy_device_tree()

2024-01-29 Thread Stephen Boyd
Call this function unconditionally so that we can populate an empty DTB on platforms that don't boot with a firmware provided or builtin DTB. Cc: Rob Herring Cc: Frank Rowand Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: Cc: "H. Peter Anvin" Cc: Saurabh Sengar

[PATCH v2 2/7] um: Unconditionally call unflatten_device_tree()

2024-01-29 Thread Stephen Boyd
Call this function unconditionally so that we can populate an empty DTB on platforms that don't boot with a command line provided DTB. There's no harm in calling unflatten_device_tree() unconditionally. If there isn't a valid initial_boot_params dtb then unflatten_device_tree() returns early. Cc:

[PATCH v2 1/7] arm64: Unconditionally call unflatten_device_tree()

2024-01-29 Thread Stephen Boyd
Call this function unconditionally so that we can populate an empty DTB on platforms that don't boot with a firmware provided or builtin DTB. Override 'initial_boot_params' to NULL when ACPI is in use but the bootloader has loaded a DTB so that we don't allow both ACPI and DT to be used during boot

[PATCH v2 0/7] of: populate of_root node if bootloader doesn't

2024-01-29 Thread Stephen Boyd
Arch maintainers, please ack/review patches. This is a resend of a series from Frank last year[1]. I worked in Rob's review comments to unconditionally call unflatten_device_tree() and fixup/audit calls to of_have_populated_dt() so that behavior doesn't change. I need this series so I can add DT

[PATCH 3/3] docs: riscv: Define behavior of mmap

2024-01-29 Thread Charlie Jenkins
Define mmap on riscv to not provide an address that uses more bits than the hint address, if provided. Signed-off-by: Charlie Jenkins --- Documentation/arch/riscv/vm-layout.rst | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/Documentation/arch/riscv/vm-layou

[PATCH 2/3] selftests: riscv: Generalize mm selftests

2024-01-29 Thread Charlie Jenkins
The behavior of mmap on riscv is defined to not provide an address that uses more bits than the hint address, if provided. Make the tests reflect that. Signed-off-by: Charlie Jenkins --- tools/testing/selftests/riscv/mm/mmap_bottomup.c | 20 + tools/testing/selftests/riscv/mm/mmap_default.c

[PATCH 1/3] riscv: mm: Use hint address in mmap if available

2024-01-29 Thread Charlie Jenkins
On riscv it is guaranteed that the address returned by mmap is less than the hint address. Allow mmap to return an address all the way up to addr, if provided, rather than just up to the lower address space. This provides a performance benefit as well, allowing mmap to exit after checking that the

[PATCH 0/3] riscv: mm: Use hint address in mmap if available

2024-01-29 Thread Charlie Jenkins
On riscv, mmap currently returns an address from the largest address space that can fit entirely inside of the hint address. This makes it such that the hint address is almost never returned. This patch raises the mappable area up to and including the hint address. This allows mmap to often return

Re: [PATCH v2] kselftest: dt: Stop relying on dirname to improve performance

2024-01-29 Thread Mark Brown
On Mon, Jan 22, 2024 at 09:40:43AM -0600, Rob Herring wrote: > On Mon, Jan 22, 2024 at 11:29:18AM -0300, Nícolas F. R. A. Prado wrote: > > When walking directory trees, instead of looking for specific files and > > running dirname to get the parent folder, traverse all folders and > > ignore the o

[PATCH 3/3] selftests: add test for zswapin

2024-01-29 Thread Nhat Pham
We recently encountered a kernel crash on the zswapin path in our internal kernel, which went undetected because of a lack of test coverage for this path. Add a selftest to cover this code path, allocating more memories than the cgroup limit to trigger swapout/zswapout, then reading the pages back

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

2024-01-29 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 writebac

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

2024-01-29 Thread Nhat Pham
Make it easier for contributors to find the zswap maintainers when they update the zswap tests. Signed-off-by: Nhat Pham --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index fecebfc4c0dc..5f60faaefaf2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2

[PATCH 0/3] fix and extend zswap kselftests

2024-01-29 Thread Nhat Pham
Fix a broken zswap kselftest due to cgroup zswap writeback counter renaming, and add a kselftest to cover the (z)swapin case. Also, add the zswap kselftest file to zswap maintainer entry so that get_maintainers script can find zswap maintainers. Nhat Pham (3): selftests: zswap: add zswap selfte

Re: [PATCH v7 0/4] Introduce mseal()

2024-01-29 Thread Jonathan Corbet
jef...@chromium.org writes: > Although the initial version of this patch series is targeting the > Chrome browser as its first user, it became evident during upstream > discussions that we would also want to ensure that the patch set > eventually is a complete solution for memory sealing and compa

Re: [PATCH] selftests/mm: run_vmtests.sh: add hugetlb test category

2024-01-29 Thread Joel Savitz
On Mon, Jan 29, 2024 at 6:53 AM Breno Leitao wrote: > > The usage of run_vmtests.sh does not include hugetlb, which is a valid > test category. > > Add the 'hugetlb' to the usage of run_vmtests.sh. > > Signed-off-by: Breno Leitao > --- > tools/testing/selftests/mm/run_vmtests.sh | 2 ++ > 1 file

Re: [PATCH 1/1] KVM: selftests: add kvmclock drift test

2024-01-29 Thread Dongli Zhang
Ping :) BTW, I see Vitaly Kuznetsov has a patch to generalize check_clocksource(), which is also used by this patch. [PATCH 1/5] KVM: selftests: Generalize check_clocksource() from kvm_clock_test https://lore.kernel.org/all/20240109141121.1619463-2-vkuzn...@redhat.com/ Thank you very much! Dong

[PATCH AUTOSEL 6.6 05/10] tools: selftests: riscv: Fix compile warnings in mm tests

2024-01-29 Thread Sasha Levin
From: Christoph Müllner [ Upstream commit 12c16919652b5873f524c8b361336ecfa5ce5e6b ] When building the mm tests with a riscv32 compiler, we see a range of shift-count-overflow errors from shifting 1UL by more than 32 bits in do_mmaps(). Since, the relevant code is only called from code that is g

[PATCH AUTOSEL 6.6 04/10] tools: selftests: riscv: Fix compile warnings in vector tests

2024-01-29 Thread Sasha Levin
From: Christoph Müllner [ Upstream commit e1baf5e68ed128c1e22ba43e5190526d85de323c ] GCC prints a couple of format string warnings when compiling the vector tests. Let's follow the recommendation in Documentation/printk-formats.txt to fix these warnings. Signed-off-by: Christoph Müllner Review

[PATCH AUTOSEL 6.7 07/12] tools: selftests: riscv: Fix compile warnings in mm tests

2024-01-29 Thread Sasha Levin
From: Christoph Müllner [ Upstream commit 12c16919652b5873f524c8b361336ecfa5ce5e6b ] When building the mm tests with a riscv32 compiler, we see a range of shift-count-overflow errors from shifting 1UL by more than 32 bits in do_mmaps(). Since, the relevant code is only called from code that is g

[PATCH AUTOSEL 6.7 06/12] tools: selftests: riscv: Fix compile warnings in vector tests

2024-01-29 Thread Sasha Levin
From: Christoph Müllner [ Upstream commit e1baf5e68ed128c1e22ba43e5190526d85de323c ] GCC prints a couple of format string warnings when compiling the vector tests. Let's follow the recommendation in Documentation/printk-formats.txt to fix these warnings. Signed-off-by: Christoph Müllner Review

[PATCH AUTOSEL 6.7 05/12] tools: selftests: riscv: Fix compile warnings in cbo

2024-01-29 Thread Sasha Levin
From: Christoph Müllner [ Upstream commit ac7b2a02d62faff8c6d45bacb5cb9ea565b47776 ] GCC prints a couple of format string warnings when compiling the cbo test. Let's follow the recommendation in Documentation/printk-formats.txt to fix these warnings. Signed-off-by: Christoph Müllner Reviewed-b

[PATCH AUTOSEL 6.7 04/12] tools: selftests: riscv: Fix compile warnings in hwprobe

2024-01-29 Thread Sasha Levin
From: Christoph Müllner [ Upstream commit b91c26fdb0e8150cdb610cdaadea62bb5e43bee0 ] GCC prints a couple of format string warnings when compiling the hwprobe test. Let's follow the recommendation in Documentation/printk-formats.txt to fix these warnings. Signed-off-by: Christoph Müllner Review

Re: [PATCH net] selftests: net: add missing config for big tcp tests

2024-01-29 Thread Jakub Kicinski
On Mon, 29 Jan 2024 17:31:33 +0100 Paolo Abeni wrote: > Uhm... while the self-test doesn't emit anymore the message related to > the missing modules, it still fails in the CI env and I can't reproduce > the failures in my local env (the same for the gro.sh script). > > If I understand correctly, t

Re: [PATCH net] selftests: net: add missing config for big tcp tests

2024-01-29 Thread Paolo Abeni
On Mon, 2024-01-29 at 10:11 +0100, Paolo Abeni wrote: > On Fri, 2024-01-26 at 11:55 -0800, Jakub Kicinski wrote: > > On Fri, 26 Jan 2024 16:32:36 +0100 Paolo Abeni wrote: > > > The big_tcp test-case requires a few kernel knobs currently > > > not specified in the net selftests config, causing the >

[PATCH] selftest/ftrace: fix typo in ftracetest script

2024-01-29 Thread Kousik Sanagavarapu
Fix a typo in ftracetest script which is run when running the kselftests for ftrace. s/faii/fail Signed-off-by: Kousik Sanagavarapu --- tools/testing/selftests/ftrace/ftracetest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/ftrace/ftracetest b/tool

Re: [PATCH bpf-next v2] selftests/bpf: Drop return in bpf_testmod_exit

2024-01-29 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to bpf/bpf-next.git (master) by Daniel Borkmann : On Sun, 28 Jan 2024 19:43:57 +0800 you wrote: > From: Geliang Tang > > bpf_testmod_exit() should not have a return value, so this patch drops this > useless 'return' in it. > > Acked-by: Jiri Olsa > Signed-off-by:

Re: [PATCH V14 0/7] amd-pstate preferred core

2024-01-29 Thread Borislav Petkov
On Mon, Jan 29, 2024 at 04:18:02PM +0100, Rafael J. Wysocki wrote: > You've had comments on the previous version of this. > > Have they all been addressed? Yeah, see patch 1. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette

Re: [PATCH V14 0/7] amd-pstate preferred core

2024-01-29 Thread Rafael J. Wysocki
On Fri, Jan 19, 2024 at 10:05 AM Meng Li wrote: > > Hi all: > > The core frequency is subjected to the process variation in semiconductors. > Not all cores are able to reach the maximum frequency respecting the > infrastructure limits. Consequently, AMD has redefined the concept of > maximum frequ

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

2024-01-29 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 b/tools/testing/selftests/ring-buffer

Re: [PATCH net-next] selftests: net: Add missing matchall classifier

2024-01-29 Thread Nikolay Aleksandrov
On 29/01/2024 14:37, Ido Schimmel wrote: > One of the test cases in the test_bridge_backup_port.sh selftest relies > on a matchall classifier to drop unrelated traffic so that the Tx drop > counter on the VXLAN device will only be incremented as a result of > traffic generated by the test. > > How

[PATCH net-next] selftests: net: Add missing matchall classifier

2024-01-29 Thread Ido Schimmel
One of the test cases in the test_bridge_backup_port.sh selftest relies on a matchall classifier to drop unrelated traffic so that the Tx drop counter on the VXLAN device will only be incremented as a result of traffic generated by the test. However, the configuration option for the matchall class

Re: [PATCH] selftests/mm: run_vmtests.sh: add hugetlb test category

2024-01-29 Thread Muhammad Usama Anjum
On 1/29/24 4:52 PM, Breno Leitao wrote: > The usage of run_vmtests.sh does not include hugetlb, which is a valid > test category. > > Add the 'hugetlb' to the usage of run_vmtests.sh. > > Signed-off-by: Breno Leitao Reviewed-by: Muhammad Usama Anjum > --- > tools/testing/selftests/mm/run_vmte

[PATCH] selftests/mm: run_vmtests.sh: add hugetlb test category

2024-01-29 Thread Breno Leitao
The usage of run_vmtests.sh does not include hugetlb, which is a valid test category. Add the 'hugetlb' to the usage of run_vmtests.sh. Signed-off-by: Breno Leitao --- tools/testing/selftests/mm/run_vmtests.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/mm/run_

Re: [PATCH net] selftests: net: add missing config for big tcp tests

2024-01-29 Thread Paolo Abeni
On Fri, 2024-01-26 at 11:55 -0800, Jakub Kicinski wrote: > On Fri, 26 Jan 2024 16:32:36 +0100 Paolo Abeni wrote: > > The big_tcp test-case requires a few kernel knobs currently > > not specified in the net selftests config, causing the > > following failure: > > > > # selftests: net: big_tcp.sh

Re: [PATCH v3 0/2] selftests/vDSO: Fix errors on LoongArch

2024-01-29 Thread Tiezhu Yang
On 12/27/2023 03:55 PM, Tiezhu Yang wrote: + Andrew Morton + Mark Brown On 12/13/2023 09:22 AM, Tiezhu Yang wrote: v3: Rebase on the next branch of linux-kselftest.git, modify the patch title and update the commit message v2: Rebase on 6.5-rc1 and update the commit message Tiezhu Yan