Re: [PATCH 2/7] of: Create of_root if no dtb provided by firmware

2024-02-16 Thread Saurabh Singh Sengar
On Fri, Feb 16, 2024 at 05:05:51PM -0800, Frank Rowand wrote: > 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

[linux-next:master] BUILD REGRESSION d37e1e4c52bc60578969f391fb81f947c3e83118

2024-02-16 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: d37e1e4c52bc60578969f391fb81f947c3e83118 Add linux-next specific files for 20240216 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202402161359.furktcoz-...@intel.com https

Re: [PATCH v2] bpf: Replace bpf_lpm_trie_key 0-length array with flexible array

2024-02-16 Thread Kees Cook
On Fri, Feb 16, 2024 at 06:27:08PM -0600, Gustavo A. R. Silva wrote: > > > On 2/16/24 17:55, Kees Cook wrote: > > Replace deprecated 0-length array in struct bpf_lpm_trie_key with > > flexible array. Found with GCC 13: > > > > ../kernel/bpf/lpm_trie.c:207:51: warning: array subscript i is

Re: [RFC 0/7] selftests: kselftest_harness: use common result printing helper

2024-02-16 Thread Kees Cook
On February 16, 2024 5:26:21 PM PST, Jakub Kicinski wrote: >On Fri, 16 Feb 2024 16:33:04 -0800 Jakub Kicinski wrote: >> On Fri, 16 Feb 2024 16:31:19 -0800 Jakub Kicinski wrote: >> > Let's see if I can code this up in 30 min. While I do that can you >> > ELI5 what XPASS is for?! We'll never

Re: [PATCH net-next v2 0/4] selftests: kselftest_harness: support using xfail

2024-02-16 Thread Jakub Kicinski
On Thu, 15 Feb 2024 16:26:15 -0800 Jakub Kicinski wrote: > Hi! > > When running selftests for our subsystem in our CI we'd like all > tests to pass. Currently some tests use SKIP for cases they > expect to fail, because the kselftest_harness limits the return > codes to pass/fail/skip. > > Clean

Re: [RFC 0/7] selftests: kselftest_harness: use common result printing helper

2024-02-16 Thread Jakub Kicinski
On Fri, 16 Feb 2024 16:33:04 -0800 Jakub Kicinski wrote: > On Fri, 16 Feb 2024 16:31:19 -0800 Jakub Kicinski wrote: > > Let's see if I can code this up in 30 min. While I do that can you > > ELI5 what XPASS is for?! We'll never going to use it, right? > > Oh, it's UNexpected pass. Okay. So if

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

2024-02-16 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. We skip the test when CONFIG_OF_EARLY_FLATREE=n because in that case we know architecture code hasn't called unflatten_(and_copy_)?device_tree() which would

[PATCH v4 5/7] arm64: Unconditionally call unflatten_device_tree()

2024-02-16 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. When ACPI is in use, unflatten_device_tree() ignores the 'initial_boot_params' pointer so the live DT on those systems won't be whatever that's pointing to.

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

2024-02-16 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 v4 4/7] x86/of: Unconditionally call unflatten_and_copy_device_tree()

2024-02-16 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. There's no harm in calling unflatten_device_tree() unconditionally here. If there isn't a non-NULL 'initial_boot_params' pointer then

[PATCH v4 3/7] um: Unconditionally call unflatten_device_tree()

2024-02-16 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.

[PATCH v4 2/7] of: Create of_root if no dtb provided by firmware

2024-02-16 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

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

2024-02-16 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 v4 1/7] of: Always unflatten in unflatten_and_copy_device_tree()

2024-02-16 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

Re: [RFC 0/7] selftests: kselftest_harness: use common result printing helper

2024-02-16 Thread Jakub Kicinski
On Fri, 16 Feb 2024 16:31:19 -0800 Jakub Kicinski wrote: > Let's see if I can code this up in 30 min. While I do that can you > ELI5 what XPASS is for?! We'll never going to use it, right? Oh, it's UNexpected pass. Okay. So if we have a case on a list of expected failures and it passes we should

Re: [PATCH] selftests/mqueue: Set timeout to 100 seconds

2024-02-16 Thread SeongJae Park
On Fri, 16 Feb 2024 16:01:20 -0800 Kees Cook wrote: > On Wed, Feb 14, 2024 at 05:13:09PM -0800, SeongJae Park wrote: > > A gentle reminder. > > > > > > Thanks, > > SJ > > > > On Fri, 9 Feb 2024 09:42:43 -0800 SeongJae Park wrote: > > > > > On Fri, 9 Feb 2024 10:30:38 + "Mohamed

Re: [RFC 0/7] selftests: kselftest_harness: use common result printing helper

2024-02-16 Thread Jakub Kicinski
On Fri, 16 Feb 2024 13:32:12 -0800 Kees Cook wrote: > On Thu, Feb 15, 2024 at 04:41:15PM -0800, Jakub Kicinski wrote: > > First 3 patches rearrange kselftest_harness to use exit code > > as an enum rather than separate passed/skip/xfail members. > > One thought I was having here while porting

Re: [PATCH v2] bpf: Replace bpf_lpm_trie_key 0-length array with flexible array

2024-02-16 Thread Gustavo A. R. Silva
On 2/16/24 17:55, Kees Cook wrote: Replace deprecated 0-length array in struct bpf_lpm_trie_key with flexible array. Found with GCC 13: ../kernel/bpf/lpm_trie.c:207:51: warning: array subscript i is outside array bounds of 'const __u8[0]' {aka 'const unsigned char[]'} [-Warray-bounds=]

Re: [PATCH] selftests/mqueue: Set timeout to 100 seconds

2024-02-16 Thread Kees Cook
On Wed, Feb 14, 2024 at 05:13:09PM -0800, SeongJae Park wrote: > A gentle reminder. > > > Thanks, > SJ > > On Fri, 9 Feb 2024 09:42:43 -0800 SeongJae Park wrote: > > > On Fri, 9 Feb 2024 10:30:38 + "Mohamed Abuelfotoh, Hazem" > > wrote: > > > > > On 08/02/2024 21:29, SeongJae Park

[PATCH v2] bpf: Replace bpf_lpm_trie_key 0-length array with flexible array

2024-02-16 Thread Kees Cook
Replace deprecated 0-length array in struct bpf_lpm_trie_key with flexible array. Found with GCC 13: ../kernel/bpf/lpm_trie.c:207:51: warning: array subscript i is outside array bounds of 'const __u8[0]' {aka 'const unsigned char[]'} [-Warray-bounds=] 207 |

[PATCH net 2/2] selftests: ioam6: refactoring to align with the fix

2024-02-16 Thread Justin Iurman
ioam6_parser uses a packet socket. After the fix to prevent writing to cloned skb's, the receiver does not see its IOAM data anymore, which makes input/forward ioam-selftests to fail. As a workaround, ioam6_parser now uses an IPv6 raw socket and leverages ancillary data to get hop-by-hop options.

[PATCH net 1/2] ioam6: fix write to cloned skb in ipv6_hop_ioam()

2024-02-16 Thread Justin Iurman
ioam6_fill_trace_data() writes inside the skb payload without ensuring it's writeable (e.g., not cloned). This function is called both from the input and output path. The output path (ioam6_iptunnel) already does the check. This commit provides a fix for the input path, inside ipv6_hop_ioam().

[PATCH net 0/2] ioam6: fix write to cloned skb's

2024-02-16 Thread Justin Iurman
Make sure the IOAM data insertion is not applied on cloned skb's. As a consequence, ioam selftests needed a refactoring. Justin Iurman (2): ioam6: fix write to cloned skb in ipv6_hop_ioam() selftests: ioam6: refactoring to align with the fix net/ipv6/exthdrs.c | 8

[PATCH] Fix implicit cast warning in test_klp_state.c

2024-02-16 Thread Shresth Prasad
The function `klp_get_state` returns an `int` value, but the variable `loglevel_state` is of type `struct klp_state *` and thus does an implicit cast. Explicitly casting these values fixes: - warning: assignment to ‘struct klp_state *’ from ‘int’ makes pointer

Re: [PATCH v10 00/25] security: Move IMA and EVM to the LSM infrastructure

2024-02-16 Thread Eric Snowberg
> On Feb 15, 2024, at 3:30 AM, Roberto Sassu > wrote: > > From: Roberto Sassu > > The patch set applies on top of lsm/next, commit 97280fa1ed94 ("Automated > merge of 'dev' into 'next'"). I have tested the ima appraisal portion and have not observed any regressions with this series. For

[PATCH v3 0/2] KVM: s390: Fix AR parameter in ioctl

2024-02-16 Thread Eric Farman
Hi Christian, Janosch, Heiko, Here is a new version for the AR/MEM_OP issue I'm attempting to address. (Thank you, Heiko, for the offline chat!) Changes: v3: [HC] Drop the AR swap in MEM_OP path [HC] Remove WARN and don't do save_access_regs on !bool v2:

[PATCH v3 1/2] KVM: s390: fix access register usage in ioctls

2024-02-16 Thread Eric Farman
The routine ar_translation() can be reached by both the instruction intercept path (where the access registers had been loaded with the guest register contents), and the MEM_OP ioctls (which hadn't). Since this routine saves the current registers to vcpu->run, this routine erroneously saves host

[PATCH v3 2/2] KVM: s390: selftests: memop: add a simple AR test

2024-02-16 Thread Eric Farman
There is a selftest that checks for an (expected) error when an invalid AR is specified, but not one that exercises the AR path. Add a simple test that mirrors the vanilla write/read test while providing an AR. An AR that contains zero will direct the CPU to use the primary address space normally

Re: [RFC 0/7] selftests: kselftest_harness: use common result printing helper

2024-02-16 Thread Kees Cook
On Thu, Feb 15, 2024 at 04:41:15PM -0800, Jakub Kicinski wrote: > First 3 patches rearrange kselftest_harness to use exit code > as an enum rather than separate passed/skip/xfail members. One thought I was having here while porting other stuff to use XFAIL was that in the strictest sense, XFAIL

Re: [RFC 1/7] selftests: kselftest_harness: generate test name once

2024-02-16 Thread Kees Cook
On Thu, Feb 15, 2024 at 04:41:16PM -0800, Jakub Kicinski wrote: > Since we added variant support generating full test case > name takes 4 string arguments. We're about to need it > in another two places. Stop the duplication and print > once into a temporary buffer. > > Suggested-by: Jakub

Re: [PATCH v2 1/2] KVM: s390: load guest access registers in MEM_OP ioctl

2024-02-16 Thread Eric Farman
On Fri, 2024-02-16 at 11:33 -0500, Eric Farman wrote: > On Fri, 2024-02-16 at 10:40 +0100, Heiko Carstens wrote: > > On Thu, Feb 15, 2024 at 09:53:43PM +0100, Eric Farman wrote: > > > The routine ar_translation() can be reached by both the > > > instruction > > > intercept path (where the access

Re: [PATCH 08/10] selftests/sched: Migrate cs_prctl_test to kselfttest

2024-02-16 Thread Chris Hyser
On 2/16/24 13:31, Joel Fernandes (Google) wrote: This test begs to be a kselftest, is in the kselftest hierarchy and does not even use a single kselftest API. Convert it. It simplifies some of the code and the output also looks much nicer now: Totals: pass:17 fail:0 xfail:0 xpass:0 skip:0

Re: [RFC 4/7] selftests: openvswitch: delete previously allocated netns

2024-02-16 Thread Aaron Conole
Paolo Abeni writes: > On Fri, 2024-02-16 at 10:28 -0500, Aaron Conole wrote: >> Many openvswitch test cases reused netns and interface names. This works >> fine as long as the test case cleans up gracefully. However, if there is >> some kind of ungraceful termination (such as an external

[PATCH 08/10] selftests/sched: Migrate cs_prctl_test to kselfttest

2024-02-16 Thread Joel Fernandes (Google)
This test begs to be a kselftest, is in the kselftest hierarchy and does not even use a single kselftest API. Convert it. It simplifies some of the code and the output also looks much nicer now: Totals: pass:17 fail:0 xfail:0 xpass:0 skip:0 error:0 Signed-off-by: Joel Fernandes (Google) ---

[PATCH 07/10] selftests/sched: Add a test to verify that DL server works with core scheduling

2024-02-16 Thread Joel Fernandes (Google)
This test verifies that DL server infrastructure gives CFS tasks a fixed bandwidth even when RT tasks are being "core scheduled" on a core. Verify that they are getting the expected bandwidth (and thus not being starved). Also verified that not having core scheduling fixes makes the test fail as

Re: [PATCH] selftests/bpf: Move test_dev_cgroup to prog_tests

2024-02-16 Thread Daniel Borkmann
Hi Muhammad, Small nit, pls use $subj: [PATCH bpf-next] On 2/15/24 1:01 PM, Muhammad Usama Anjum wrote: Move test_dev_cgroup to prog_tests to be able to run it with test_progs. Replace dev_cgroup.bpf.o with skel header file, dev_cgroup.skel.h and load program from it accourdingly.

Re: [PATCH bpf-next] selftests: bpf: Remove empty TEST_CUSTOM_PROGS

2024-02-16 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to bpf/bpf-next.git (master) by Daniel Borkmann : On Fri, 16 Feb 2024 09:42:45 -0300 you wrote: > Commit f04a32b2c5b5 ("selftests/bpf: Do not use sign-file as testcase") > removed the TEST_CUSTOM_PROGS assignment, and removed it from being used > on TEST_GEN_FILES.

Re: [PATCH RFC bpf-next v2 02/10] bpf/helpers: introduce sleepable timers

2024-02-16 Thread Kui-Feng Lee
On 2/14/24 09:18, Benjamin Tissoires wrote: +static void bpf_timer_work_cb(struct work_struct *work) +{ + struct bpf_hrtimer *t = container_of(work, struct bpf_hrtimer, work); + struct bpf_map *map = t->map; + void *value = t->value; + bpf_callback_t callback_fn; + void *key; + u32 idx; + +

Re: [PATCH v2 1/2] KVM: s390: load guest access registers in MEM_OP ioctl

2024-02-16 Thread Eric Farman
On Fri, 2024-02-16 at 10:40 +0100, Heiko Carstens wrote: > On Thu, Feb 15, 2024 at 09:53:43PM +0100, Eric Farman wrote: > > The routine ar_translation() can be reached by both the instruction > > intercept path (where the access registers had been loaded with the > > guest register contents), and

Re: [RFC 4/7] selftests: openvswitch: delete previously allocated netns

2024-02-16 Thread Paolo Abeni
On Fri, 2024-02-16 at 10:28 -0500, Aaron Conole wrote: > Many openvswitch test cases reused netns and interface names. This works > fine as long as the test case cleans up gracefully. However, if there is > some kind of ungraceful termination (such as an external signal) the netns > or

Re: [PATCH 00/31] NT synchronization primitive driver

2024-02-16 Thread Alexey Dobriyan
> drivers/misc/ntsync.c | 1146 ++ Assuming this doesn't go into futex(2) or some other existing code... Can you start putting all of this into top-level "windows" directory? I suspect there will be more Windows stuff in the future. So those who don't care

Re: [PATCH v13 21/21] KVM: pfncache: rework __kvm_gpc_refresh() to fix locking issues

2024-02-16 Thread Sean Christopherson
On Fri, Feb 16, 2024, Paul Durrant wrote: > On 16/02/2024 13:04, David Woodhouse wrote: > > On Thu, 2024-02-15 at 15:29 +, Paul Durrant wrote: > > > From: David Woodhouse > > > > > > This function can race with kvm_gpc_deactivate(), which does not take > > > the ->refresh_lock. This means

Re: [PATCH v4 0/7] Split a folio to any lower order folios

2024-02-16 Thread Zi Yan
On 16 Feb 2024, at 5:06, Pankaj Raghav (Samsung) wrote: > Hi Zi Yan, > > On Tue, Feb 13, 2024 at 04:55:13PM -0500, Zi Yan wrote: >> From: Zi Yan >> >> Hi all, >> >> File folio supports any order and multi-size THP is upstreamed[1], so both >> file and anonymous folios can be >0 order. Currently,

[RFC 7/7] selftests: openvswitch: add config and timeout settings

2024-02-16 Thread Aaron Conole
In order for the ovs selftests to run, we need to introduce a sample configuration. This will get run under the kselftest runner for net, but given that environment can be limited process wise, the test can take longer than on bare metal or high availability VMs. So, also introduce a settings

[RFC 6/7] selftests: openvswitch: insert module when running the tests

2024-02-16 Thread Aaron Conole
The openvswitch tests do not attempt to insert the openvswitch module automatically. Now the test will auto load the module and try to unload it at the end. The test harness includes the option to not load the module, which is helpful when developing changes and loading the module from a

[RFC 5/7] selftests: openvswitch: make arping test a bit 'slower'

2024-02-16 Thread Aaron Conole
The arping test transmits a single packet and immediately tries to pull the log for upcall details. This works fine in practice on most systems but can fail under a slower VM where it can take a while for the log data to be written. By adding addtional transmits we give the system time to write,

[RFC 4/7] selftests: openvswitch: delete previously allocated netns

2024-02-16 Thread Aaron Conole
Many openvswitch test cases reused netns and interface names. This works fine as long as the test case cleans up gracefully. However, if there is some kind of ungraceful termination (such as an external signal) the netns or interfaces can be left lingering. This happens when the selftest

[RFC 2/7] selftests: openvswitch: be more verbose with selftest debugging

2024-02-16 Thread Aaron Conole
The openvswitch selftest is difficult to debug for anyone that isn't directly familiar with the openvswitch module and the specifics of the test cases. Many times when something fails, the debug log will be sparsely populated and it takes some time to understand where a failure occured. Increase

[RFC 1/7] selftests: openvswitch: add test case error directories to clean list

2024-02-16 Thread Aaron Conole
Normally, the openvswitch selftests don't keep error files around, but if debugging, there is an option to keep these files. The 'clean' target should be informed that they exist to ensure they are deleted properly. Signed-off-by: Aaron Conole ---

[RFC 3/7] selftests: openvswitch: use non-graceful kills when needed

2024-02-16 Thread Aaron Conole
Normally a spawned process under OVS is given a SIGTERM when the test ends as part of cleanup. However, in case the process is still lingering for some reason, we also send a SIGKILL to force it down faster. Signed-off-by: Aaron Conole --- tools/testing/selftests/net/openvswitch/openvswitch.sh

[RFC 0/7] selftests: openvswitch: cleanups for running as selftests

2024-02-16 Thread Aaron Conole
The series is a host of cleanups to the openvswitch selftest suite which should be ready to run under the netdev selftest runners using vng. For now, the testing has been done with RW directories, but additional testing will be done to try and keep it all as RO to be more friendly. There is one

Re: [PATCH RFC bpf-next v2 02/10] bpf/helpers: introduce sleepable timers

2024-02-16 Thread Benjamin Tissoires
On Feb 16 2024, Toke Høiland-Jørgensen wrote: > Benjamin Tissoires writes: > > > On Feb 15 2024, Martin KaFai Lau wrote: > >> On 2/14/24 9:18 AM, Benjamin Tissoires wrote: > >> > +static void bpf_timer_work_cb(struct work_struct *work) > >> > +{ > >> > +struct bpf_hrtimer *t =

Re: [PATCH RESEND] selftests/ftrace: Add test to exercize function tracer across cpu hotplug

2024-02-16 Thread Steven Rostedt
On Fri, 16 Feb 2024 15:26:26 +0530 Naveen N Rao wrote: > Add a test to exercize cpu hotplug with the function tracer active to > ensure that sensitive functions in idle path are excluded from being > traced. This helps catch issues such as the one fixed by commit > 4b3338aaa74d ("powerpc/ftrace:

Re: [PATCH RFC bpf-next v2 02/10] bpf/helpers: introduce sleepable timers

2024-02-16 Thread Toke Høiland-Jørgensen
Just one comment on one of your FIXMEs: > + rcu_assign_pointer(t->sleepable_cb_fn, NULL); > + /* FIXME: probably do something about the SLEEPABLE flag */ I guess we should store the flag in the timer struct somewhere, and then restrict the set_callback() functions so that the regular

Re: [PATCH RFC bpf-next v2 02/10] bpf/helpers: introduce sleepable timers

2024-02-16 Thread Toke Høiland-Jørgensen
Benjamin Tissoires writes: > On Feb 15 2024, Martin KaFai Lau wrote: >> On 2/14/24 9:18 AM, Benjamin Tissoires wrote: >> > +static void bpf_timer_work_cb(struct work_struct *work) >> > +{ >> > + struct bpf_hrtimer *t = container_of(work, struct bpf_hrtimer, work); >> > + struct bpf_map *map =

Re: [PATCH v13 21/21] KVM: pfncache: rework __kvm_gpc_refresh() to fix locking issues

2024-02-16 Thread Paul Durrant
On 16/02/2024 13:04, David Woodhouse wrote: On Thu, 2024-02-15 at 15:29 +, Paul Durrant wrote: From: David Woodhouse This function can race with kvm_gpc_deactivate(), which does not take the ->refresh_lock. This means kvm_gpc_deactivate() can wipe the ->pfn and ->khva fields, and unmap

Re: [PATCH v13 21/21] KVM: pfncache: rework __kvm_gpc_refresh() to fix locking issues

2024-02-16 Thread David Woodhouse
On Thu, 2024-02-15 at 15:29 +, Paul Durrant wrote: > From: David Woodhouse > > This function can race with kvm_gpc_deactivate(), which does not take > the ->refresh_lock. This means kvm_gpc_deactivate() can wipe the ->pfn > and ->khva fields, and unmap the latter, while hva_to_pfn_retry()

[PATCH bpf-next] selftests: bpf: Remove empty TEST_CUSTOM_PROGS

2024-02-16 Thread Marcos Paulo de Souza
Commit f04a32b2c5b5 ("selftests/bpf: Do not use sign-file as testcase") removed the TEST_CUSTOM_PROGS assignment, and removed it from being used on TEST_GEN_FILES. Remove two leftovers from that cleanup. Found by inspection. Signed-off-by: Marcos Paulo de Souza ---

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

2024-02-16 Thread Ilpo Järvinen
On Fri, 16 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 v6 3/5] selftests/resctrl: Split validate_resctrl_feature_request()

2024-02-16 Thread Ilpo Järvinen
On Fri, 16 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 v4 0/7] Split a folio to any lower order folios

2024-02-16 Thread Pankaj Raghav (Samsung)
Hi Zi Yan, On Tue, Feb 13, 2024 at 04:55:13PM -0500, Zi Yan wrote: > From: Zi Yan > > Hi all, > > File folio supports any order and multi-size THP is upstreamed[1], so both > file and anonymous folios can be >0 order. Currently, split_huge_page() > only splits a huge page to order-0 pages, but

[PATCH RESEND] selftests/ftrace: Add test to exercize function tracer across cpu hotplug

2024-02-16 Thread Naveen N Rao
Add a test to exercize cpu hotplug with the function tracer active to ensure that sensitive functions in idle path are excluded from being traced. This helps catch issues such as the one fixed by commit 4b3338aaa74d ("powerpc/ftrace: Fix stack teardown in ftrace_no_trace"). Signed-off-by: Naveen

Re: [PATCH RFC bpf-next v2 02/10] bpf/helpers: introduce sleepable timers

2024-02-16 Thread Benjamin Tissoires
On Feb 15 2024, Benjamin Tissoires wrote: > On Feb 14 2024, Benjamin Tissoires wrote: > > They are implemented as a kfunc, which means a little bit of tweaks in > > the verifier. > > > > Signed-off-by: Benjamin Tissoires > > > > --- > > > > changes in v2 (compared to the one attaches to v1

Re: [PATCH v2 1/2] KVM: s390: load guest access registers in MEM_OP ioctl

2024-02-16 Thread Heiko Carstens
On Thu, Feb 15, 2024 at 09:53:43PM +0100, Eric Farman wrote: > The routine ar_translation() can be reached by both the instruction > intercept path (where the access registers had been loaded with the > guest register contents), and the MEM_OP ioctls (which hadn't). > This latter case means that

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

2024-02-16 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 v6 4/5] selftests/resctrl: Add resource_info_file_exists()

2024-02-16 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 v6 2/5] selftests/resctrl: Add a helper for the non-contiguous test

2024-02-16 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

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

2024-02-16 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 v6 1/5] selftests/resctrl: Add test groups and name L3 CAT test L3_CAT

2024-02-16 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 v6 0/5] selftests/resctrl: Add non-contiguous CBMs in Intel CAT selftest

2024-02-16 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 RFC bpf-next v2 02/10] bpf/helpers: introduce sleepable timers

2024-02-16 Thread Benjamin Tissoires
On Feb 15 2024, Martin KaFai Lau wrote: > On 2/14/24 9:18 AM, Benjamin Tissoires wrote: > > +static void bpf_timer_work_cb(struct work_struct *work) > > +{ > > + struct bpf_hrtimer *t = container_of(work, struct bpf_hrtimer, work); > > + struct bpf_map *map = t->map; > > + void *value =