RE: [PATCH] [PATCH] amd_pstate: fix erroneous highest_perf value on some CPUs

2024-02-19 Thread Meng, Li (Jassmine)
[AMD Official Use Only - General] Hi Lucas: > -Original Message- > From: Lucas Lee Jing Yi > Sent: Monday, February 19, 2024 12:11 AM > To: raf...@kernel.org > Cc: Yuan, Perry ; Du, Xiaojian > ; Deucher, Alexander > ; b...@alien8.de; Sharma, Deepak > ; Meng, Li (Jassmine) ; > linux-a...@

Re: [PATCH v2 17/31] ntsync: Allow waits to use the REALTIME clock.

2024-02-19 Thread Arnd Bergmann
On Mon, Feb 19, 2024, at 23:38, Elizabeth Figura wrote: > NtWaitForMultipleObjects() can receive a timeout in two forms, relative or > absolute. Relative timeouts are unaffected by changes to the system time and > do > not count down while the system suspends; for absolute timeouts the opposite >

Re: [PATCH] Fix implicit cast warning in test_klp_state.c

2024-02-19 Thread zhang warden
Well, the repo location I use is git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git. It seem klp_get_state return struct klp_state. The definition of this function in my repo as follows: struct klp_state *klp_get_state(struct klp_patch *patch, unsigned long id) { struct klp_st

[RESEND PATCH] selftests/overlayfs: fix compilation error in overlayfs

2024-02-19 Thread Meng Li
make -C tools/testing/selftests, compiling dev_in_maps fail. In file included from dev_in_maps.c:10: /usr/include/x86_64-linux-gnu/sys/mount.h:35:3: error: expected identifier before numeric constant 35 | MS_RDONLY = 1,/* Mount read-only. */ | ^ That sys/moun

[PATCH bpf-next 5/5] selftests/bpf: add test cases for multiple attach of tracing program

2024-02-19 Thread Menglong Dong
In this commit, we add the testcases for multiple attaching of tracing, include FENTRY, FEXIT, MODIFY_RETURN. Signed-off-by: Menglong Dong --- .../selftests/bpf/bpf_testmod/bpf_testmod.c | 49 ++ .../bpf/prog_tests/tracing_multi_attach.c | 155 ++ .../selftests/bpf/pro

[PATCH bpf-next 4/5] libbpf: add the function libbpf_find_kernel_btf_id()

2024-02-19 Thread Menglong Dong
Add new function libbpf_find_kernel_btf_id() to find the btf type id of the kernel, including vmlinux and modules. Signed-off-by: Menglong Dong --- tools/lib/bpf/libbpf.c | 83 tools/lib/bpf/libbpf.h | 3 ++ tools/lib/bpf/libbpf.map | 1 + 3 files c

[PATCH bpf-next 3/5] libbpf: allow to set coookie when target_btf_id is set in bpf_link_create

2024-02-19 Thread Menglong Dong
As now we support to attach the tracing program to multiple target, we can set the bpf cookie even if the target btf id is offered in bpf_link_create(). Signed-off-by: Menglong Dong --- tools/lib/bpf/bpf.c | 17 - 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/too

[PATCH bpf-next 2/5] bpf: tracing: support to attach program to multi hooks

2024-02-19 Thread Menglong Dong
In this commit, we add the support to allow attaching a tracing BPF program to multi hooks. In the commit 4a1e7c0c63e0 ("bpf: Support attaching freplace programs to multiple attach points"), the freplace BPF program is made to support attach to multiple attach points. And in this commit, we extend

[PATCH bpf-next 1/5] bpf: tracing: add support to record and check the accessed args

2024-02-19 Thread Menglong Dong
In this commit, we add the 'accessed_args' field to struct bpf_prog_aux, which is used to record the accessed index of the function args in btf_ctx_access(). Meanwhile, we add the function btf_check_func_part_match() to compare the accessed function args of two function prototype. This function wi

[PATCH bpf-next 0/5] bpf: make tracing program support multi-attach

2024-02-19 Thread Menglong Dong
For now, the BPF program of type BPF_PROG_TYPE_TRACING is not allowed to be attached to multiple hooks, and we have to create a BPF program for each kernel function, for which we want to trace, even through all the program have the same (or similar) logic. This can consume extra memory, and make th

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

2024-02-19 Thread Gustavo A. R. Silva
On 2/19/24 17:41, 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=] 20

Re: [PATCH v8 35/38] selftests/arm64: Add GCS signal tests

2024-02-19 Thread Thiago Jung Bauermann
Mark Brown writes: > Do some testing of the signal handling for GCS, checking that a GCS > frame has the expected information in it and that the expected signals > are delivered with invalid operations. > > Signed-off-by: Mark Brown > --- > tools/testing/selftests/arm64/signal/.gitignore|

Re: [PATCH v8 33/38] kselftest/arm64: Add a GCS test program built with the system libc

2024-02-19 Thread Thiago Jung Bauermann
Mark Brown writes: > There are things like threads which nolibc struggles with which we want > to add coverage for, and the ABI allows us to test most of these even if > libc itself does not understand GCS so add a test application built > using the system libc. > > Signed-off-by: Mark Brown >

Re: [PATCH v8 23/38] arm64/signal: Set up and restore the GCS context for signal handlers

2024-02-19 Thread Thiago Jung Bauermann
Mark Brown writes: > +#ifdef CONFIG_ARM64_GCS > +static int gcs_restore_signal(void) > +{ > + u64 gcspr_el0, cap; > + int ret; > + > + if (!system_supports_gcs()) > + return 0; > + > + if (!(current->thread.gcs_el0_mode & PR_SHADOW_STACK_ENABLE)) > + retu

Re: [PATCH v8 20/38] arm64/gcs: Ensure that new threads have a GCS

2024-02-19 Thread Thiago Jung Bauermann
Mark Brown writes: > When a new thread is created by a thread with GCS enabled the GCS needs > to be specified along with the regular stack. clone3() has been > extended to support this case, allowing userspace to explicitly specify > the size and location of the GCS. The specified GCS must h

Re: [PATCH v8 00/38] arm64/gcs: Provide support for GCS in userspace

2024-02-19 Thread Thiago Jung Bauermann
Hello, Mark Brown writes: > Changes in v8: > - Invalidate signal cap token on stack when consuming. > - Typo and other trivial fixes. > - Don't try to use process_vm_write() on GCS, it intentionally does not > work. > - Fix leak of thread GCSs. > - Rebase onto latest clone3() series. > - Lin

Re: [PATCH RFC] kunit: tool: add 'mte=on' qemu arg on arm64

2024-02-19 Thread David Gow
On Wed, 14 Feb 2024 at 20:41, Paul Heidekrüger wrote: > > Hi! > > I was running some KASan tests with kunit.py recently and noticed that > when KASan is run in hw tags mode, we manually have to add the required > `mte=on` option to kunit_tool's qemu invocation, as the tests will > otherwise crash.

[PATCH v3] selftests/mqueue: Set timeout to 180 seconds

2024-02-19 Thread SeongJae Park
While mq_perf_tests runs with the default kselftest timeout limit, which is 45 seconds, the test takes about 60 seconds to complete on i3.metal AWS instances. Hence, the test always times out. Increase the timeout to 180 seconds. Fixes: 852c8cbf34d3 ("selftests/kselftest/runner.sh: Add 45 second

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

2024-02-19 Thread SeongJae Park
On Mon, 19 Feb 2024 16:02:43 -0800 SeongJae Park wrote: > While mq_perf_tests runs with the default kselftest timeout limit, which > is 45 seconds, the test takes about 60 seconds to complete on i3.metal > AWS instances. Hence, the test always times out. Increase the timeout > to 100 seconds.

[PATCH v2] selftests/mqueue: Set timeout to 180 seconds

2024-02-19 Thread SeongJae Park
While mq_perf_tests runs with the default kselftest timeout limit, which is 45 seconds, the test takes about 60 seconds to complete on i3.metal AWS instances. Hence, the test always times out. Increase the timeout to 100 seconds. Link: https://lore.kernel.org/r/20240208212925.68286-1...@kernel.o

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

2024-02-19 Thread SeongJae Park
On Mon, 19 Feb 2024 14:01:06 + "Mohamed Abuelfotoh, Hazem" wrote: > On 17/02/2024 00:31, SeongJae Park wrote: > > CAUTION: This email originated from outside of the organization. Do not > > click links or open attachments unless you can confirm the sender and know > > the content is safe.

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

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

Re: [PATCH] kunit: make kunit_bus_type const

2024-02-19 Thread David Gow
On Thu, 15 Feb 2024 at 03:14, Ricardo B. Marliere wrote: > > Since commit d492cc2573a0 ("driver core: device.h: make struct > bus_type a const *"), the driver core can properly handle constant > struct bus_type, move the kunit_bus_type variable to be a constant > structure as well, placing it into

Re: [PATCH net 3/5] tls: don't skip over different type records from the rx_list

2024-02-19 Thread Sabrina Dubroca
2024-02-19, 12:07:03 -0800, Jakub Kicinski wrote: > On Thu, 15 Feb 2024 17:17:31 +0100 Sabrina Dubroca wrote: > > @@ -1772,7 +1772,8 @@ static int process_rx_list(struct tls_sw_context_rx > > *ctx, > >u8 *control, > >size_t skip, > >

[PATCH v2 31/31] docs: ntsync: Add documentation for the ntsync uAPI.

2024-02-19 Thread Elizabeth Figura
Add an overall explanation of the driver architecture, and complete and precise specification for its intended behaviour. Signed-off-by: Elizabeth Figura --- Documentation/userspace-api/index.rst | 1 + Documentation/userspace-api/ntsync.rst | 399 + 2 files changed, 4

[PATCH v2 29/31] selftests: ntsync: Add a stress test for contended waits.

2024-02-19 Thread Elizabeth Figura
Test a more realistic usage pattern, and one with heavy contention, in order to actually exercise ntsync's internal synchronization. This test has several threads in a tight loop acquiring a mutex, modifying some shared data, and then releasing the mutex. At the end we check if the data is consist

[PATCH v2 23/31] selftests: ntsync: Add some tests for wakeup signaling with WINESYNC_IOC_WAIT_ALL.

2024-02-19 Thread Elizabeth Figura
Test contended "wait-for-all" waits, to make sure that scheduling and wakeup logic works correctly, and that the wait only exits once objects are all simultaneously signaled. Signed-off-by: Elizabeth Figura --- .../testing/selftests/drivers/ntsync/ntsync.c | 98 +++ 1 file change

[PATCH v2 30/31] maintainers: Add an entry for ntsync.

2024-02-19 Thread Elizabeth Figura
Add myself as maintainer, supported by CodeWeavers. Signed-off-by: Elizabeth Figura --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 9ed4d3868539..d83dd35d9f73 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -15595,6 +15595,15 @@ T: g

[PATCH v2 25/31] selftests: ntsync: Add some tests for auto-reset event state.

2024-02-19 Thread Elizabeth Figura
Test event-specific ioctls NTSYNC_IOC_EVENT_SET, NTSYNC_IOC_EVENT_RESET, NTSYNC_IOC_EVENT_PULSE, NTSYNC_IOC_EVENT_READ for auto-reset events, and waiting on auto-reset events. Signed-off-by: Elizabeth Figura --- .../testing/selftests/drivers/ntsync/ntsync.c | 59 +++ 1 file chang

[PATCH v2 20/31] selftests: ntsync: Add some tests for NTSYNC_IOC_WAIT_ANY.

2024-02-19 Thread Elizabeth Figura
Test basic synchronous functionality of NTSYNC_IOC_WAIT_ANY, when objects are considered signaled or not signaled, and how they are affected by a successful wait. Signed-off-by: Elizabeth Figura --- .../testing/selftests/drivers/ntsync/ntsync.c | 119 ++ 1 file changed, 119 inser

[PATCH v2 28/31] selftests: ntsync: Add some tests for wakeup signaling via alerts.

2024-02-19 Thread Elizabeth Figura
Expand the alert tests to cover alerting a thread mid-wait, to test that the relevant scheduling logic works correctly. Signed-off-by: Elizabeth Figura --- .../testing/selftests/drivers/ntsync/ntsync.c | 62 +++ 1 file changed, 62 insertions(+) diff --git a/tools/testing/selftes

[PATCH v2 26/31] selftests: ntsync: Add some tests for wakeup signaling with events.

2024-02-19 Thread Elizabeth Figura
Expand the contended wait tests, which previously only covered events and semaphores, to cover events as well. Signed-off-by: Elizabeth Figura --- .../testing/selftests/drivers/ntsync/ntsync.c | 151 +- 1 file changed, 147 insertions(+), 4 deletions(-) diff --git a/tools/testing

[PATCH v2 27/31] selftests: ntsync: Add tests for alertable waits.

2024-02-19 Thread Elizabeth Figura
Test the "alert" functionality of NTSYNC_IOC_WAIT_ALL and NTSYNC_IOC_WAIT_ANY, when a wait is woken with an alert and when it is woken by an object. Signed-off-by: Elizabeth Figura --- .../testing/selftests/drivers/ntsync/ntsync.c | 179 +- 1 file changed, 176 insertions(+), 3 de

[PATCH v2 05/31] ntsync: Introduce NTSYNC_IOC_WAIT_ALL.

2024-02-19 Thread Elizabeth Figura
This is similar to NTSYNC_IOC_WAIT_ANY, but waits until all of the objects are simultaneously signaled, and then acquires all of them as a single atomic operation. Signed-off-by: Elizabeth Figura --- drivers/misc/ntsync.c | 242 ++-- include/uapi/linux/ntsyn

[PATCH v2 19/31] selftests: ntsync: Add some tests for mutex state.

2024-02-19 Thread Elizabeth Figura
Test mutex-specific ioctls NTSYNC_IOC_MUTEX_UNLOCK and NTSYNC_IOC_MUTEX_READ, and waiting on mutexes. Signed-off-by: Elizabeth Figura --- .../testing/selftests/drivers/ntsync/ntsync.c | 196 ++ 1 file changed, 196 insertions(+) diff --git a/tools/testing/selftests/drivers/ntsync

[PATCH v2 24/31] selftests: ntsync: Add some tests for manual-reset event state.

2024-02-19 Thread Elizabeth Figura
Test event-specific ioctls NTSYNC_IOC_EVENT_SET, NTSYNC_IOC_EVENT_RESET, NTSYNC_IOC_EVENT_PULSE, NTSYNC_IOC_EVENT_READ for manual-reset events, and waiting on manual-reset events. Signed-off-by: Elizabeth Figura --- .../testing/selftests/drivers/ntsync/ntsync.c | 89 +++ 1 file c

[PATCH v2 22/31] selftests: ntsync: Add some tests for wakeup signaling with WINESYNC_IOC_WAIT_ANY.

2024-02-19 Thread Elizabeth Figura
Test contended "wait-for-any" waits, to make sure that scheduling and wakeup logic works correctly. Signed-off-by: Elizabeth Figura --- .../testing/selftests/drivers/ntsync/ntsync.c | 150 ++ 1 file changed, 150 insertions(+) diff --git a/tools/testing/selftests/drivers/ntsync/n

[PATCH v2 00/31] NT synchronization primitive driver

2024-02-19 Thread Elizabeth Figura
This patch series introduces a new char misc driver, /dev/ntsync, which is used to implement Windows NT synchronization primitives. This was previously submitted as an RFC [1]. Since there were no major changes requested to the last RFC revision, I've stripped the RFC prefix. [1] https://lore.ker

[PATCH v2 15/31] ntsync: Introduce NTSYNC_IOC_EVENT_READ.

2024-02-19 Thread Elizabeth Figura
This corresponds to the NT syscall NtQueryEvent(). This returns the signaled state of the event and whether it is manual-reset. Signed-off-by: Elizabeth Figura --- drivers/misc/ntsync.c | 21 + include/uapi/linux/ntsync.h | 1 + 2 files changed, 22 insertions(+) diff

[PATCH v2 10/31] ntsync: Introduce NTSYNC_IOC_EVENT_SET.

2024-02-19 Thread Elizabeth Figura
This corresponds to the NT syscall NtSetEvent(). This sets the event to the signaled state, and returns its previous state. Signed-off-by: Elizabeth Figura --- drivers/misc/ntsync.c | 37 + include/uapi/linux/ntsync.h | 1 + 2 files changed, 38 inserti

[PATCH v2 03/31] ntsync: Introduce NTSYNC_IOC_SEM_POST.

2024-02-19 Thread Elizabeth Figura
This corresponds to the NT syscall NtReleaseSemaphore(). This increases the semaphore's internal counter by the given value, and returns the previous value. If the counter would overflow the defined maximum, the function instead fails and returns -EOVERFLOW. Signed-off-by: Elizabeth Figura ---

[PATCH v2 18/31] selftests: ntsync: Add some tests for semaphore state.

2024-02-19 Thread Elizabeth Figura
Wine has tests for its synchronization primitives, but these are more accessible to kernel developers, and also allow us to test some edge cases that Wine does not care about. This patch adds tests for semaphore-specific ioctls NTSYNC_IOC_SEM_POST and NTSYNC_IOC_SEM_READ, and waiting on semaphores

[PATCH v2 21/31] selftests: ntsync: Add some tests for NTSYNC_IOC_WAIT_ALL.

2024-02-19 Thread Elizabeth Figura
Test basic synchronous functionality of NTSYNC_IOC_WAIT_ALL, and when objects are considered simultaneously signaled. Signed-off-by: Elizabeth Figura --- .../testing/selftests/drivers/ntsync/ntsync.c | 99 ++- 1 file changed, 97 insertions(+), 2 deletions(-) diff --git a/tools/t

[PATCH v2 01/31] ntsync: Introduce the ntsync driver and character device.

2024-02-19 Thread Elizabeth Figura
ntsync uses a misc device as the simplest and least intrusive uAPI interface. Each file description on the device represents an isolated NT instance, intended to correspond to a single NT virtual machine. Signed-off-by: Elizabeth Figura --- drivers/misc/Kconfig | 11 + drivers/misc/Mak

[PATCH v2 07/31] ntsync: Introduce NTSYNC_IOC_MUTEX_UNLOCK.

2024-02-19 Thread Elizabeth Figura
This corresponds to the NT syscall NtReleaseMutant(). This syscall decrements the mutex's recursion count by one, and returns the previous value. If the mutex is not owned by the given owner ID, the function instead fails and returns -EPERM. Signed-off-by: Elizabeth Figura --- drivers/misc/ntsy

[PATCH v2 11/31] ntsync: Introduce NTSYNC_IOC_EVENT_RESET.

2024-02-19 Thread Elizabeth Figura
This corresponds to the NT syscall NtResetEvent(). This sets the event to the unsignaled state, and returns its previous state. Signed-off-by: Elizabeth Figura --- drivers/misc/ntsync.c | 22 ++ include/uapi/linux/ntsync.h | 1 + 2 files changed, 23 insertions(+) dif

[PATCH v2 12/31] ntsync: Introduce NTSYNC_IOC_EVENT_PULSE.

2024-02-19 Thread Elizabeth Figura
This corresponds to the NT syscall NtPulseEvent(). This wakes up any waiters as if the event had been set, but does not set the event, instead resetting it if it had been signalled. Thus, for a manual-reset event, all waiters are woken, whereas for an auto-reset event, at most one waiter is woken.

[PATCH v2 06/31] ntsync: Introduce NTSYNC_IOC_CREATE_MUTEX.

2024-02-19 Thread Elizabeth Figura
This corresponds to the NT syscall NtCreateMutant(). An NT mutex is recursive, with a 32-bit recursion counter. When acquired via NtWaitForMultipleObjects(), the recursion counter is incremented by one. The OS records the thread which acquired it. However, in order to keep this driver self-contai

[PATCH v2 09/31] ntsync: Introduce NTSYNC_IOC_CREATE_EVENT.

2024-02-19 Thread Elizabeth Figura
This correspond to the NT syscall NtCreateEvent(). An NT event holds a single bit of state denoting whether it is signaled or unsignaled. There are two types of events: manual-reset and automatic-reset. When an automatic-reset event is acquired via a wait function, its state is reset to unsignale

[PATCH v2 08/31] ntsync: Introduce NTSYNC_IOC_MUTEX_KILL.

2024-02-19 Thread Elizabeth Figura
This does not correspond to any NT syscall. Rather, when a thread dies, it should be called by the NT emulator for each mutex. NT mutexes are robust (in the pthread sense). When an NT thread dies, any mutexes it owned are immediately released. Acquisition of those mutexes by other threads will ret

[PATCH v2 02/31] ntsync: Introduce NTSYNC_IOC_CREATE_SEM.

2024-02-19 Thread Elizabeth Figura
This corresponds to the NT syscall NtCreateSemaphore(). Semaphores are one of three types of object to be implemented in this driver, the others being mutexes and events. An NT semaphore contains a 32-bit counter, and is signaled and can be acquired when the counter is nonzero. The counter has a

[PATCH v2 04/31] ntsync: Introduce NTSYNC_IOC_WAIT_ANY.

2024-02-19 Thread Elizabeth Figura
This corresponds to part of the functionality of the NT syscall NtWaitForMultipleObjects(). Specifically, it implements the behaviour where the third argument (wait_any) is TRUE, and it does not handle alertable waits. Those features have been split out into separate patches to ease review. NTSYNC

[PATCH v2 16/31] ntsync: Introduce alertable waits.

2024-02-19 Thread Elizabeth Figura
NT waits can optionally be made "alertable". This is a special channel for thread wakeup that is mildly similar to SIGIO. A thread has an internal single bit of "alerted" state, and if a thread is made alerted while an alertable wait, the wait will return a special value, consume the "alerted" stat

[PATCH v2 17/31] ntsync: Allow waits to use the REALTIME clock.

2024-02-19 Thread Elizabeth Figura
NtWaitForMultipleObjects() can receive a timeout in two forms, relative or absolute. Relative timeouts are unaffected by changes to the system time and do not count down while the system suspends; for absolute timeouts the opposite is true. In order to make the interface and implementation simpler

[PATCH v2 14/31] ntsync: Introduce NTSYNC_IOC_MUTEX_READ.

2024-02-19 Thread Elizabeth Figura
This corresponds to the NT syscall NtQueryMutant(). This returns the recursion count, owner, and abandoned state of the mutex. Signed-off-by: Elizabeth Figura --- drivers/misc/ntsync.c | 23 +++ include/uapi/linux/ntsync.h | 1 + 2 files changed, 24 insertions(+) dif

[PATCH v2 13/31] ntsync: Introduce NTSYNC_IOC_SEM_READ.

2024-02-19 Thread Elizabeth Figura
This corresponds to the NT syscall NtQuerySemaphore(). This returns the current count and maximum count of the semaphore. Signed-off-by: Elizabeth Figura --- drivers/misc/ntsync.c | 21 + include/uapi/linux/ntsync.h | 1 + 2 files changed, 22 insertions(+) diff --git

Re: [PATCH v13 00/21] KVM: xen: update shared_info and vcpu_info handling

2024-02-19 Thread Sean Christopherson
On Thu, Feb 15, 2024, Paul Durrant wrote: > David Woodhouse (1): > KVM: pfncache: rework __kvm_gpc_refresh() to fix locking issues > > Paul Durrant (19): > KVM: pfncache: Add a map helper function > KVM: pfncache: remove unnecessary exports > KVM: x86/xen: mark guest pages dirty with the p

Re: [PATCH v13 18/21] KVM: x86/xen: don't block on pfncache locks in kvm_xen_set_evtchn_fast()

2024-02-19 Thread Sean Christopherson
On Thu, Feb 15, 2024, Paul Durrant wrote: > From: Paul Durrant > > As described in [1] compiling with CONFIG_PROVE_RAW_LOCK_NESTING shows that > kvm_xen_set_evtchn_fast() is blocking on pfncache locks in IRQ context. > There is only actually blocking with PREEMPT_RT because the locks will > turne

Re: [PATCH v13 12/21] KVM: x86/xen: allow shared_info to be mapped by fixed HVA

2024-02-19 Thread Sean Christopherson
On Thu, Feb 15, 2024, Paul Durrant wrote: > @@ -715,13 +731,23 @@ int kvm_xen_hvm_get_attr(struct kvm *kvm, struct > kvm_xen_hvm_attr *data) > break; > > case KVM_XEN_ATTR_TYPE_SHARED_INFO: > - if (kvm->arch.xen.shinfo_cache.active) > + if (kvm->arch.x

Re: [PATCH v13 09/21] KVM: pfncache: allow a cache to be activated with a fixed (userspace) HVA

2024-02-19 Thread Sean Christopherson
On Thu, Feb 15, 2024, Paul Durrant wrote: > @@ -319,7 +340,16 @@ static int __kvm_gpc_refresh(struct gfn_to_pfn_cache > *gpc, gpa_t gpa, > > int kvm_gpc_refresh(struct gfn_to_pfn_cache *gpc, unsigned long len) > { > - return __kvm_gpc_refresh(gpc, gpc->gpa, len); > + unsigned long uhva

Re: [PATCH v13 05/21] KVM: pfncache: remove KVM_GUEST_USES_PFN usage

2024-02-19 Thread Sean Christopherson
On Thu, Feb 15, 2024, Paul Durrant wrote: > From: Paul Durrant > > As noted in [1] the KVM_GUEST_USES_PFN usage flag is never set by any > callers of kvm_gpc_init(), which also makes the 'vcpu' argument redundant. The changelog should explicitly call out that not only is KVM_GUEST_USES_PFN unuse

Re: [PATCH v13 04/21] KVM: pfncache: add a mark-dirty helper

2024-02-19 Thread Sean Christopherson
On Thu, Feb 15, 2024, Paul Durrant wrote: > +/** > + * kvm_gpc_mark_dirty_in_slot - mark a cached guest page as dirty. > + * > + * @gpc:struct gfn_to_pfn_cache object. Meh, just omit the kerneldoc comment. > + */ > +static inline void kvm_gpc_mark_dirty_in_slot(struct gfn_to_pfn_cache *

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

2024-02-19 Thread Jakub Kicinski
On Fri, 16 Feb 2024 10:28:39 -0500 Aaron Conole wrote: > 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

Re: [PATCH net 3/5] tls: don't skip over different type records from the rx_list

2024-02-19 Thread Jakub Kicinski
On Thu, 15 Feb 2024 17:17:31 +0100 Sabrina Dubroca wrote: > @@ -1772,7 +1772,8 @@ static int process_rx_list(struct tls_sw_context_rx > *ctx, > u8 *control, > size_t skip, > size_t len, > -bool is_pe

Re: [PATCH] selftests: fuxex: Report a unique test name per run of futex_requeue_pi

2024-02-19 Thread Shuah Khan
On 2/19/24 08:58, Thomas Gleixner wrote: On Tue, Feb 13 2024 at 19:06, Mark Brown wrote: The futex_requeue_pi test program is run a number of times with different options to provide multiple test cases. Currently every time it runs it reports the result with a consistent string, meaning that aut

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

2024-02-19 Thread Kees Cook
On Mon, Feb 19, 2024 at 06:48:41PM +0100, Daniel Borkmann wrote: > On 2/17/24 4:03 AM, Kees Cook wrote: > > 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 > > > >

Re: [PATCH 02/31] ntsync: Introduce NTSYNC_IOC_CREATE_SEM.

2024-02-19 Thread Elizabeth Figura
On Saturday, 17 February 2024 02:03:15 CST Greg Kroah-Hartman wrote: > On Thu, Feb 15, 2024 at 01:22:01PM -0600, Elizabeth Figura wrote: > > On Thursday, 15 February 2024 01:28:32 CST Greg Kroah-Hartman wrote: > > > On Wed, Feb 14, 2024 at 05:36:38PM -0600, Elizabeth Figura wrote: > > > > This corr

Re: [PATCH net 03/13] mptcp: fix lockless access in subflow ULP diag

2024-02-19 Thread Eric Dumazet
On Mon, Feb 19, 2024 at 7:04 PM Paolo Abeni wrote: > > On Mon, 2024-02-19 at 18:35 +0100, Eric Dumazet wrote: > > On Mon, Feb 19, 2024 at 6:21 PM Eric Dumazet wrote: > > > > > > On Thu, Feb 15, 2024 at 7:25 PM Matthieu Baerts (NGI0) > > > wrote: > > > > > > > > From: Paolo Abeni > > > > > > > >

Re: [PATCH net 03/13] mptcp: fix lockless access in subflow ULP diag

2024-02-19 Thread Paolo Abeni
On Mon, 2024-02-19 at 18:35 +0100, Eric Dumazet wrote: > On Mon, Feb 19, 2024 at 6:21 PM Eric Dumazet wrote: > > > > On Thu, Feb 15, 2024 at 7:25 PM Matthieu Baerts (NGI0) > > wrote: > > > > > > From: Paolo Abeni > > > > > > Since the introduction of the subflow ULP diag interface, the > > >

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

2024-02-19 Thread Daniel Borkmann
On 2/17/24 4:03 AM, Kees Cook wrote: 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 subs

Re: [PATCH net 03/13] mptcp: fix lockless access in subflow ULP diag

2024-02-19 Thread Eric Dumazet
On Mon, Feb 19, 2024 at 6:21 PM Eric Dumazet wrote: > > On Thu, Feb 15, 2024 at 7:25 PM Matthieu Baerts (NGI0) > wrote: > > > > From: Paolo Abeni > > > > Since the introduction of the subflow ULP diag interface, the > > dump callback accessed all the subflow data with lockless. > > > > We need e

Re: [PATCH net 03/13] mptcp: fix lockless access in subflow ULP diag

2024-02-19 Thread Eric Dumazet
On Thu, Feb 15, 2024 at 7:25 PM Matthieu Baerts (NGI0) wrote: > > From: Paolo Abeni > > Since the introduction of the subflow ULP diag interface, the > dump callback accessed all the subflow data with lockless. > > We need either to annotate all the read and write operation accordingly, > or acqu

Re: [PATCH] selftests: fuxex: Report a unique test name per run of futex_requeue_pi

2024-02-19 Thread Thomas Gleixner
On Tue, Feb 13 2024 at 19:06, Mark Brown wrote: > The futex_requeue_pi test program is run a number of times with different > options to provide multiple test cases. Currently every time it runs it > reports the result with a consistent string, meaning that automated systems > parsing the TAP outpu

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

2024-02-19 Thread Mohamed Abuelfotoh, Hazem
On 17/02/2024 00:01, Kees Cook wrote: Should it be 100 or 180? Either way: Reviewed-by: Kees Cook -- Kees Cook Both options may work, I am more inclined to have this as 180 seconds by giving more time for the test to finish, this can be reduced later to 100 or something else if we start

Re: [PATCH] Fix implicit cast warning in test_klp_state.c

2024-02-19 Thread Marcos Paulo de Souza
On Sat, 17 Feb 2024 04:21:26 +0530 Shresth Prasad wrote: > 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: ass

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

2024-02-19 Thread Mohamed Abuelfotoh, Hazem
On 17/02/2024 00:31, SeongJae Park wrote: CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe. On Fri, 16 Feb 2024 16:01:20 -0800 Kees Cook wrote: On Wed, Feb 14, 2024 at 05:

Re: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR

2024-02-19 Thread Marcos Paulo de Souza
https://lore.kernel.org/r/20240215-lp-selftests-fixes-v1-1-89f4a6f5cddc%40suse.com > > patch subject: [PATCH 1/3] selftests: lib.mk: Do not process > > TEST_GEN_MODS_DIR > > compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 > > reproduce (this is a W=1 build): > > (https://downl

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

2024-02-19 Thread Muhammad Usama Anjum
Thank you for review. I'll fix. On 2/16/24 10:25 PM, Daniel Borkmann wrote: > Hi Muhammad, > > Small nit, pls use $subj: [PATCH bpf-next] Sure, I'll update. > > 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

Re: [PATCH 1/3] selftests: lib.mk: Do not process TEST_GEN_MODS_DIR

2024-02-19 Thread Marcos Paulo de Souza
mk: Do not process TEST_GEN_MODS_DIR > compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 > reproduce (this is a W=1 build): > (https://download.01.org/0day-ci/archive/20240219/202402191417.xulh88ct-...@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new

Re: [PATCH resend] selftests: timers: clocksource-switch: Adapt progress to kselftest framework

2024-02-19 Thread Thomas Gleixner
On Thu, Feb 15 2024 at 14:28, Geert Uytterhoeven wrote: > When adapting the test to the kselftest framework, a few printf() calls > indicating test progress were not updated. > > Fix this by replacing these printf() calls by ksft_print_msg() calls. > > Fixes: ce7d101750ff8450 ("selftests: timers:

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

2024-02-19 Thread Justin Iurman
On 2/19/24 10:05, Paolo Abeni wrote: On Sat, 2024-02-17 at 00:43 +0100, Justin Iurman wrote: 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) alr

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

2024-02-19 Thread Heiko Carstens
On Fri, Feb 16, 2024 at 10:36:15PM +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). > Since this routine saves the c

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

2024-02-19 Thread Paolo Abeni
On Sat, 2024-02-17 at 00:43 +0100, Justin Iurman wrote: > 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