Re: [PATCH v2 00/19] iommufd: Add VIOMMU infrastructure (Part-1)

2024-09-26 Thread Nicolin Chen
On Fri, Sep 27, 2024 at 01:54:45PM +0800, Yi Liu wrote: > > > > Baolu told me that Intel may have the same: different domain IDs > > > > on different IOMMUs; multiple IOMMU instances on one chip: > > > > https://lore.kernel.org/linux-iommu/cf4fe15c-8bcb-4132-a1fd-b2c8ddf27...@linux.intel.com/ > > >

Re: [PATCH v2 04/19] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC

2024-09-26 Thread Nicolin Chen
On Fri, Sep 27, 2024 at 01:38:08PM +0800, Yi Liu wrote: > > > Does it mean each vIOMMU of VM can only have > > > one s2 HWPT? > > > > Giving some examples here: > > - If a VM has 1 vIOMMU, there will be 1 vIOMMU object in the > > kernel holding one S2 HWPT. > > - If a VM has 2 vIOMMUs, the

[PATCH] selftests/powerpc: Rm the unnecessary remove function.

2024-09-26 Thread zhangjiao2
From: zhang jiao Path is not initialized before use, remove the unnecessary remove function. Signed-off-by: zhang jiao --- tools/testing/selftests/powerpc/mm/tlbie_test.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/powerpc/mm/tlbie_test.c b/tools/testing/selftes

Re: [PATCH v2 00/19] iommufd: Add VIOMMU infrastructure (Part-1)

2024-09-26 Thread Yi Liu
On 2024/9/27 10:05, Baolu Lu wrote: On 9/27/24 4:03 AM, Nicolin Chen wrote: On Thu, Sep 26, 2024 at 04:47:02PM +0800, Yi Liu wrote: On 2024/9/26 02:55, Nicolin Chen wrote: On Wed, Sep 25, 2024 at 06:30:20PM +0800, Yi Liu wrote: Hi Nic, On 2024/8/28 00:59, Nicolin Chen wrote: This series int

[PATCH] selftests/net: Add missing va_end.

2024-09-26 Thread zhangjiao2
From: zhang jiao There is no va_end after va_copy, just add it. Signed-off-by: zhang jiao --- tools/testing/selftests/net/tcp_ao/lib/aolib.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/net/tcp_ao/lib/aolib.h b/tools/testing/selftests/net/tcp_ao/lib/aolib.h inde

Re: [PATCH v2 00/19] iommufd: Add VIOMMU infrastructure (Part-1)

2024-09-26 Thread Yi Liu
On 2024/9/27 04:03, Nicolin Chen wrote: On Thu, Sep 26, 2024 at 04:47:02PM +0800, Yi Liu wrote: On 2024/9/26 02:55, Nicolin Chen wrote: On Wed, Sep 25, 2024 at 06:30:20PM +0800, Yi Liu wrote: Hi Nic, On 2024/8/28 00:59, Nicolin Chen wrote: This series introduces a new VIOMMU infrastructure a

Re: [PATCH 19/20] treewide: Introduce kthread_run_worker[_on_cpu]()

2024-09-26 Thread Paul E. McKenney
On Fri, Sep 27, 2024 at 12:49:07AM +0200, Frederic Weisbecker wrote: > kthread_create() creates a kthread without running it yet. kthread_run() > creates a kthread and runs it. > > On the other hand, kthread_create_worker() creates a kthread worker and > runs it. > > This difference in behaviours

Re: [PATCH v2 04/19] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC

2024-09-26 Thread Yi Liu
On 2024/9/27 04:10, Nicolin Chen wrote: On Thu, Sep 26, 2024 at 04:50:46PM +0800, Yi Liu wrote: On 2024/8/28 00:59, Nicolin Chen wrote: Now a VIOMMU can wrap a shareable nested parent HWPT. So, it can act like a nested parent HWPT to allocate a nested HWPT. Support that in the IOMMU_HWPT_ALLOC

[PATCH] selftests/mm: Fixed incorrect buffer->mirror size in hmm2 double_map test

2024-09-26 Thread Donet Tom
The hmm2 double_map test was failing due to an incorrect buffer->mirror size. The buffer->mirror size was 6, while buffer->ptr size was 6 * PAGE_SIZE. The test failed because the kernel's copy_to_user function was attempting to copy a 6 * PAGE_SIZE buffer to buffer->mirror. Since the size of buffer

Re: [PATCH v8 8/8] clk: Add KUnit tests for clks registered with struct clk_parent_data

2024-09-26 Thread Guenter Roeck
On Thu, Sep 26, 2024 at 09:14:11PM -0700, Guenter Roeck wrote: > Hi Stephen, > > On Thu, Jul 18, 2024 at 02:05:07PM -0700, Stephen Boyd wrote: > > Test that clks registered with 'struct clk_parent_data' work as > > intended and can find their parents. > > > > When testing this on arm64, I see th

Re: [RFC PATCH 1/4] hazptr: Add initial implementation of hazard pointers

2024-09-26 Thread Boqun Feng
On Fri, Sep 27, 2024 at 03:20:40AM +0200, Mathieu Desnoyers wrote: > On 2024-09-26 18:12, Linus Torvalds wrote: > > On Thu, 26 Sept 2024 at 08:54, Jonas Oberhauser > > wrote: > > > > > > No, the issue introduced by the compiler optimization (or by your > > > original patch) is that the CPU can sp

Re: [RFC PATCH 1/4] hazptr: Add initial implementation of hazard pointers

2024-09-26 Thread Boqun Feng
On Fri, Sep 27, 2024 at 09:37:50AM +0800, Boqun Feng wrote: > > > On Fri, Sep 27, 2024, at 9:30 AM, Mathieu Desnoyers wrote: > > On 2024-09-27 02:01, Boqun Feng wrote: > >>#define ADDRESS_EQ(var, expr) > >> \ > >>({

Re: [PATCH v8 8/8] clk: Add KUnit tests for clks registered with struct clk_parent_data

2024-09-26 Thread Guenter Roeck
Hi Stephen, On Thu, Jul 18, 2024 at 02:05:07PM -0700, Stephen Boyd wrote: > Test that clks registered with 'struct clk_parent_data' work as > intended and can find their parents. > When testing this on arm64, I see the error below. The error is only seen if I boot through efi, i.e., with "-bios

[PATCH net] selftests: rds: move include.sh to TEST_FILES

2024-09-26 Thread Hangbin Liu
The include.sh file is generated for inclusion and should not be executable. Otherwise, it will be added to kselftest-list.txt. Additionally, add the executable bit for test.py at the same time to ensure proper functionality. Fixes: 3ade6ce1255e ("selftests: rds: add testing infrastructure") Signe

[PATCH] selftests/mm: Add missing free.

2024-09-26 Thread zhangjiao2
From: zhang jiao There is a memory leak in mkdirty, just free src before return. Signed-off-by: zhang jiao --- tools/testing/selftests/mm/mkdirty.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/mm/mkdirty.c b/tools/testing/selftests/mm/mkdirty.c index 1db134063c3

Re: [PATCH v2 04/19] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC

2024-09-26 Thread Nicolin Chen
On Fri, Sep 27, 2024 at 02:23:16AM +, Tian, Kevin wrote: > > > > > Does it mean each vIOMMU of VM can only have > > > > > one s2 HWPT? > > > > > > > > Giving some examples here: > > > > - If a VM has 1 vIOMMU, there will be 1 vIOMMU object in the > > > >kernel holding one S2 HWPT. > > > >

Re: [PATCH] remoteproc: virtio: Add synchronize_cbs to remoteproc_virtio

2024-09-26 Thread 蔡沛剛
Hi, Could someone help to review it or provide suggestions? Any comments are welcome. This patch is intended to allow the rproc driver to handle the following use-after-free issue: ### UAF log [ 337.540275][ T470] virtqueue_add.llvm.10153462284424984632+0xb48/0 xcc4 [ 337.546969][ T470] v

Re: [PATCH v2 04/19] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC

2024-09-26 Thread Nicolin Chen
On Fri, Sep 27, 2024 at 12:43:16AM +, Tian, Kevin wrote: > > From: Nicolin Chen > > Sent: Friday, September 27, 2024 4:11 AM > > > > On Thu, Sep 26, 2024 at 04:50:46PM +0800, Yi Liu wrote: > > > On 2024/8/28 00:59, Nicolin Chen wrote: > > > > Now a VIOMMU can wrap a shareable nested parent HWP

RE: [PATCH v2 04/19] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC

2024-09-26 Thread Tian, Kevin
> From: Nicolin Chen > Sent: Friday, September 27, 2024 9:26 AM > > On Fri, Sep 27, 2024 at 12:43:16AM +, Tian, Kevin wrote: > > > From: Nicolin Chen > > > Sent: Friday, September 27, 2024 4:11 AM > > > > > > On Thu, Sep 26, 2024 at 04:50:46PM +0800, Yi Liu wrote: > > > > On 2024/8/28 00:59,

Re: [PATCH v2 00/19] iommufd: Add VIOMMU infrastructure (Part-1)

2024-09-26 Thread Baolu Lu
On 9/27/24 4:03 AM, Nicolin Chen wrote: On Thu, Sep 26, 2024 at 04:47:02PM +0800, Yi Liu wrote: On 2024/9/26 02:55, Nicolin Chen wrote: On Wed, Sep 25, 2024 at 06:30:20PM +0800, Yi Liu wrote: Hi Nic, On 2024/8/28 00:59, Nicolin Chen wrote: This series introduces a new VIOMMU infrastructure a

Re: [RFC PATCH 1/4] hazptr: Add initial implementation of hazard pointers

2024-09-26 Thread Mathieu Desnoyers
On 2024-09-27 02:01, Boqun Feng wrote: #define ADDRESS_EQ(var, expr) \ ({ \ bool _cmp_res = (unsigned long)(var) == (unsigned long)

Re: [RFC PATCH 1/4] hazptr: Add initial implementation of hazard pointers

2024-09-26 Thread Boqun Feng
On Fri, Sep 27, 2024, at 9:30 AM, Mathieu Desnoyers wrote: > On 2024-09-27 02:01, Boqun Feng wrote: >> #define ADDRESS_EQ(var, expr) >> \ >> ({ >> \ >>

Re: [RFC PATCH 1/4] hazptr: Add initial implementation of hazard pointers

2024-09-26 Thread Mathieu Desnoyers
On 2024-09-26 18:12, Linus Torvalds wrote: On Thu, 26 Sept 2024 at 08:54, Jonas Oberhauser wrote: No, the issue introduced by the compiler optimization (or by your original patch) is that the CPU can speculatively load from the first pointer as soon as it has completed the load of that pointer

RE: [PATCH v2 04/19] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC

2024-09-26 Thread Tian, Kevin
> From: Nicolin Chen > Sent: Friday, September 27, 2024 4:11 AM > > On Thu, Sep 26, 2024 at 04:50:46PM +0800, Yi Liu wrote: > > On 2024/8/28 00:59, Nicolin Chen wrote: > > > Now a VIOMMU can wrap a shareable nested parent HWPT. So, it can act > like > > > a nested parent HWPT to allocate a nested

Re: [RFC PATCH 1/4] hazptr: Add initial implementation of hazard pointers

2024-09-26 Thread Boqun Feng
On Thu, Sep 26, 2024 at 09:54:33AM -0700, Linus Torvalds wrote: > On Thu, 26 Sept 2024 at 09:40, Jonas Oberhauser > wrote: > > > > Boqun seems to be unhappy with a barrier though, because it would > > theoretically also forbid unrelated optimizations. > > Well, doing a "barrier()" is kind of a bi

Re: [PATCH bpf-next v2 0/6] selftests/bpf: Various sockmap-related fixes

2024-09-26 Thread Michal Luczaj
On 9/24/24 12:25, Michal Luczaj wrote: > On 8/19/24 22:05, Jakub Sitnicki wrote: >> On Wed, Aug 14, 2024 at 06:14 PM +02, Michal Luczaj wrote: >>> On 8/6/24 19:45, Jakub Sitnicki wrote: On Tue, Aug 06, 2024 at 07:18 PM +02, Michal Luczaj wrote: > Great, thanks for the review. With this com

Re: [PATCH v5 00/16] Extended MODVERSIONS Support

2024-09-26 Thread Sami Tolvanen
Hi Matt, On Wed, Sep 25, 2024 at 11:39 PM Matthew Maurer wrote: > > This patch series is intended for use alongside the Implement > MODVERSIONS for RUST [1] series as a replacement for the symbol name > hashing approach used there to enable RUST and MODVERSIONS at the same > time. > > Elsewhere,

[PATCH 20/20] rcu: Use kthread preferred affinity for RCU exp kworkers

2024-09-26 Thread Frederic Weisbecker
Now that kthreads have an infrastructure to handle preferred affinity against CPU hotplug and housekeeping cpumask, convert RCU exp workers to use it instead of handling all the constraints by itself. Acked-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker --- kernel/rcu/tree.c | 105

[PATCH 19/20] treewide: Introduce kthread_run_worker[_on_cpu]()

2024-09-26 Thread Frederic Weisbecker
kthread_create() creates a kthread without running it yet. kthread_run() creates a kthread and runs it. On the other hand, kthread_create_worker() creates a kthread worker and runs it. This difference in behaviours is confusing. Also there is no way to create a kthread worker and affine it using

[PATCH 18/20] kthread: Unify kthread_create_on_cpu() and kthread_create_worker_on_cpu() automatic format

2024-09-26 Thread Frederic Weisbecker
kthread_create_on_cpu() uses the CPU argument as an implicit and unique printf argument to add to the format whereas kthread_create_worker_on_cpu() still relies on explicitly passing the printf arguments. This difference in behaviour is error prone and doesn't help standardizing per-CPU kthread nam

[PATCH 17/20] rcu: Use kthread preferred affinity for RCU boost

2024-09-26 Thread Frederic Weisbecker
Now that kthreads have an infrastructure to handle preferred affinity against CPU hotplug and housekeeping cpumask, convert RCU boost to use it instead of handling all the constraints by itself. Acked-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker --- kernel/rcu/tree.c| 27

[PATCH 16/20] kthread: Implement preferred affinity

2024-09-26 Thread Frederic Weisbecker
Affining kthreads follow either of four existing different patterns: 1) Per-CPU kthreads must stay affine to a single CPU and never execute relevant code on any other CPU. This is currently handled by smpboot code which takes care of CPU-hotplug operations. 2) Kthreads that _have_ to be aff

[PATCH 13/20] kthread: Default affine kthread to its preferred NUMA node

2024-09-26 Thread Frederic Weisbecker
Kthreads attached to a preferred NUMA node for their task structure allocation can also be assumed to run preferrably within that same node. A more precise affinity is usually notified by calling kthread_create_on_cpu() or kthread_bind[_mask]() before the first wakeup. For the others, a default a

[PATCH 12/20] kthread: Make sure kthread hasn't started while binding it

2024-09-26 Thread Frederic Weisbecker
Make sure the kthread is sleeping in the schedule_preempt_disabled() call before calling its handler when kthread_bind[_mask]() is called on it. This provides a sanity check verifying that the task is not randomly blocked later at some point within its function handler, in which case it could be ju

[PATCH 11/20] sched: Handle CPU isolation on last resort fallback rq selection

2024-09-26 Thread Frederic Weisbecker
When a kthread or any other task has an affinity mask that is fully offline or unallowed, the scheduler reaffines the task to all possible CPUs as a last resort. This default decision doesn't mix up very well with nohz_full CPUs that are part of the possible cpumask but don't want to be disturbed

Re: [PATCH v2 04/19] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC

2024-09-26 Thread Nicolin Chen
On Thu, Sep 26, 2024 at 04:50:46PM +0800, Yi Liu wrote: > On 2024/8/28 00:59, Nicolin Chen wrote: > > Now a VIOMMU can wrap a shareable nested parent HWPT. So, it can act like > > a nested parent HWPT to allocate a nested HWPT. > > > > Support that in the IOMMU_HWPT_ALLOC ioctl handler, and update

Re: [PATCH v2 00/19] iommufd: Add VIOMMU infrastructure (Part-1)

2024-09-26 Thread Nicolin Chen
On Thu, Sep 26, 2024 at 04:47:02PM +0800, Yi Liu wrote: > On 2024/9/26 02:55, Nicolin Chen wrote: > > On Wed, Sep 25, 2024 at 06:30:20PM +0800, Yi Liu wrote: > > > Hi Nic, > > > > > > On 2024/8/28 00:59, Nicolin Chen wrote: > > > > This series introduces a new VIOMMU infrastructure and related ioc

Re: [PATCH v3 0/2] Exposing nice CPU usage to userspace

2024-09-26 Thread Tejun Heo
Hello, Michal. On Thu, Sep 26, 2024 at 08:10:35PM +0200, Michal Koutný wrote: ... > On Tue, Sep 10, 2024 at 11:01:07AM GMT, Tejun Heo wrote: > > I think it's as useful as system-wide nice metric is. > > Exactly -- and I don't understand how that system-wide value (without > any cgroups) is usefu

Re: [RFC PATCH 1/4] hazptr: Add initial implementation of hazard pointers

2024-09-26 Thread Linus Torvalds
On Thu, 26 Sept 2024 at 08:54, Jonas Oberhauser wrote: > > No, the issue introduced by the compiler optimization (or by your > original patch) is that the CPU can speculatively load from the first > pointer as soon as it has completed the load of that pointer: You mean the compiler can do it. The

Re: [PATCH v5 14/16] modules: Support extended MODVERSIONS info

2024-09-26 Thread Sami Tolvanen
On Thu, Sep 26, 2024 at 5:22 AM Christophe Leroy wrote: > > > > Le 26/09/2024 à 01:38, Matthew Maurer a écrit : > > Adds a new format for MODVERSIONS which stores each field in a separate > > ELF section. This initially adds support for variable length names, but > > could later be used to add add

Re: [PATCH v3 0/2] Exposing nice CPU usage to userspace

2024-09-26 Thread Michal Koutný
On Mon, Sep 23, 2024 at 07:20:04AM GMT, Joshua Hahn wrote: > From: Joshua Hahn > > v2 -> v3: Signed-off-by & renamed subject for clarity. > v1 -> v2: Edited commit messages for clarity. Thanks for the version changelog, appreciated! ... > Exposing this metric will allow users to accurately pr

Re: [PATCH v3 1/2] cgroup/rstat: Tracking cgroup-level niced CPU time

2024-09-26 Thread Michal Koutný
On Mon, Sep 23, 2024 at 07:20:05AM GMT, Joshua Hahn wrote: > static void cgroup_base_stat_flush(struct cgroup *cgrp, int cpu) > @@ -535,7 +537,10 @@ void __cgroup_account_cputime_field(struct cgroup *cgrp, > > switch (index) { > case CPUTIME_USER: > + rstatc->bstat.cput

Re: [PATCH v3 2/2] cgroup/rstat: Selftests for niced CPU statistics

2024-09-26 Thread Michal Koutný
On Mon, Sep 23, 2024 at 07:20:06AM GMT, Joshua Hahn wrote: > +/* > + * Creates a nice process that consumes CPU and checks that the elapsed > + * usertime in the cgroup is close to the expected time. > + */ > +static int test_cpucg_nice(const char *root) > +{ > + int ret = KSFT_FAIL; > +

[PATCH] MAINTAINERS: update Alexey Makhalov's email address

2024-09-26 Thread Alexey Makhalov
Fix a typo in an email address. Reported-by: Konstantin Ryabitsev Closes: https://lore.kernel.org/all/20240925-rational-succinct-vulture-cca9fb@lemur/T/ Signed-off-by: Alexey Makhalov --- MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTA

[PATCH bpf-next/net v7 2/3] selftests/bpf: Add getsockopt to inspect mptcp subflow

2024-09-26 Thread Matthieu Baerts (NGI0)
From: Geliang Tang This patch adds a "cgroup/getsockopt" way to inspect the subflows of an MPTCP socket, and verify the modifications done by the same BPF program in the previous commit: a different mark per subflow, and a different TCP CC set on the second one. This new hook will be used by the

[PATCH bpf-next/net v7 3/3] selftests/bpf: Add mptcp subflow subtest

2024-09-26 Thread Matthieu Baerts (NGI0)
From: Geliang Tang This patch adds a subtest named test_subflow in test_mptcp to load and verify the newly added MPTCP subflow BPF program. To goal is to make sure it is possible to set different socket options per subflows, while the userspace socket interface only lets the application to set th

[PATCH bpf-next/net v7 1/3] selftests/bpf: Add mptcp subflow example

2024-09-26 Thread Matthieu Baerts (NGI0)
From: Nicolas Rybowski Move Nicolas' patch into bpf selftests directory. This example adds a different mark (SO_MARK) on each subflow, and changes the TCP CC only on the first subflow. >From the userspace, an application can do a setsockopt() on an MPTCP socket, and typically the same value will

[PATCH bpf-next/net v7 0/3] selftests/bpf: new MPTCP subflow subtest

2024-09-26 Thread Matthieu Baerts (NGI0)
In this series from Geliang, modifying MPTCP BPF selftests, we have: - A new MPTCP subflow BPF program setting socket options per subflow: it looks better to have this old test program in the BPF selftests to track regressions and to serve as example. Note: Nicolas is no longer working at T

Re: [GIT PULL v2] virtio: features, fixes, cleanups

2024-09-26 Thread pr-tracker-bot
The pull request you sent on Wed, 25 Sep 2024 07:09:49 -0400: > https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/0181f8c809d6116a8347d8beb25a8c35ed22f7d7 Thank you! -- Deet-doot-dot, I am a b

Re: [GIT PULL] slab updates for 6.11

2024-09-26 Thread Vlastimil Babka
On 9/26/24 18:40, Uladzislau Rezki wrote: > On Thu, Sep 26, 2024 at 06:35:27PM +0200, Vlastimil Babka wrote: >> On 9/18/24 16:40, Uladzislau Rezki wrote: >> >> >> > Thank you for valuable feedback! Indeed it is hard to follow, even >> > though it works correctly. >> > I will add the comment and als

Re: [PATCH 0/2] timers test fix and duplicate defines cleanup

2024-09-26 Thread Thomas Gleixner
On Tue, Sep 24 2024 at 09:56, Shuah Khan wrote: > The first patch in this two patch fixes warn_unused_result compile > time warning in posix_timers test. > > The second patch removes local NSEC_PER_SEC and USEC_PER_SEC defines. > NSEC_PER_SEC and USEC_PER_SEC are defines in several timers tests. >

Re: [GIT PULL] slab updates for 6.11

2024-09-26 Thread Uladzislau Rezki
On Thu, Sep 26, 2024 at 06:46:29PM +0200, Vlastimil Babka wrote: > On 9/26/24 18:40, Uladzislau Rezki wrote: > > On Thu, Sep 26, 2024 at 06:35:27PM +0200, Vlastimil Babka wrote: > >> On 9/18/24 16:40, Uladzislau Rezki wrote: > >> >> > >> > Thank you for valuable feedback! Indeed it is hard to follo

Re: [RFC PATCH 1/4] hazptr: Add initial implementation of hazard pointers

2024-09-26 Thread Linus Torvalds
On Thu, 26 Sept 2024 at 09:40, Jonas Oberhauser wrote: > > Boqun seems to be unhappy with a barrier though, because it would > theoretically also forbid unrelated optimizations. Well, doing a "barrier()" is kind of a big hammer thing, but honestly, I don't think we've ever seen any real situation

Re: [GIT PULL] slab updates for 6.11

2024-09-26 Thread Vlastimil Babka
On 9/18/24 16:40, Uladzislau Rezki wrote: >> > Thank you for valuable feedback! Indeed it is hard to follow, even > though it works correctly. > I will add the comment and also break the loop on first queuing as you > suggested! > > It does not make sense to loop further because following iteratio

Re: [PATCH v1 1/2] selftests/mm: hugetlb_fault_after_madv: use default hguetlb page size

2024-09-26 Thread David Hildenbrand
On 26.09.24 17:20, David Hildenbrand wrote: Of course, just after I sent it: Subject: s/hguetlb/hugetlb/ -- Cheers, David / dhildenb

Re: [RFC PATCH 1/4] hazptr: Add initial implementation of hazard pointers

2024-09-26 Thread Jonas Oberhauser
Am 9/26/2024 um 6:12 PM schrieb Linus Torvalds: On Thu, 26 Sept 2024 at 08:54, Jonas Oberhauser wrote: No, the issue introduced by the compiler optimization (or by your original patch) is that the CPU can speculatively load from the first pointer as soon as it has completed the load of that

Re: [GIT PULL] slab updates for 6.11

2024-09-26 Thread Uladzislau Rezki
On Thu, Sep 26, 2024 at 06:35:27PM +0200, Vlastimil Babka wrote: > On 9/18/24 16:40, Uladzislau Rezki wrote: > >> > > Thank you for valuable feedback! Indeed it is hard to follow, even > > though it works correctly. > > I will add the comment and also break the loop on first queuing as you > > sugg

[PATCH] vhost/vsock: specify module version

2024-09-26 Thread Alexander Mikhalitsyn
Add an explicit MODULE_VERSION("0.0.1") specification for a vhost_vsock module. It is useful because it allows userspace to check if vhost_vsock is there when it is configured as a built-in. Without this change, there is no /sys/module/vhost_vsock directory. With this change: $ ls -la /sys/module

RE: [PATCH 0/1] Add KUnit tests for lib/crc16.c

2024-09-26 Thread David Laight
... > The checksums for the randomly-generated test cases were calculated > using a reference implementation [1] and this test compares them against > the values yielded by the kernel's implementation. I'd just use a naïve implementation - doesn't really matter if it is a bit slow. Slow is relati

ARM64 Livepatch based on SFrame

2024-09-26 Thread Praveen Kumar
Hi Mark, Hope you are doing great. I am interested to work on ARM64 livepatching using SFrame, and thus, reinitiating the old thread (Link: https://lore.kernel.org/all/ZXxO43Xwn5GHsrO8@FVFF77S0Q05N/). Please do let me know if there anything which I can help with, in developing this feature. T

Re: [PATCH v1 1/2] selftests/mm: hugetlb_fault_after_madv: use default hguetlb page size

2024-09-26 Thread Shuah Khan
On 9/26/24 09:20, David Hildenbrand wrote: We currently assume that the hugetlb page size is 2 MiB, which is why we mmap() a 2 MiB range. Is the default hugetlb size is larger, mmap() will fail because the range is not suitable. If the default hugetlb size is smaller (e.g., s390x), mmap() will f

Re: [RFC PATCH 1/4] hazptr: Add initial implementation of hazard pointers

2024-09-26 Thread Jonas Oberhauser
Am 9/26/2024 um 8:16 AM schrieb Mathieu Desnoyers: On 2024-09-25 15:20, Mathieu Desnoyers wrote: [...] static inline bool same_ptr(void *a, void *b) { asm goto ( "cmpq %[a], %[b]\n\t" "jne %l[ne]\n\t" : : [a] "r" (a), [b] "r" (b) : : ne); return t

[PATCH v1 2/2] selftests/mm: hugetlb_fault_after_madv: improve test output

2024-09-26 Thread David Hildenbrand
Let's improve the test output. For example, print the proper test result. Install a SIGBUS handler to catch any SIGBUS instead of crashing the test on failure. With unsuitable hugetlb page count: $ ./hugetlb_fault_after_madv TAP version 13 1..1 # [INFO] detected default hugetlb page size:

[PATCH v1 0/2] selftests/mm: hugetlb_fault_after_madv improvements

2024-09-26 Thread David Hildenbrand
Mario brought to my attention that the hugetlb_fault_after_madv test is currently always skipped on s390x. Let's adjust the test to be independent of the default hugetlb page size and while at it, also improve the test output. Cc: Andrew Morton Cc: Shuah Khan Cc: Mario Casquero Cc: Breno Leita

[PATCH v1 1/2] selftests/mm: hugetlb_fault_after_madv: use default hguetlb page size

2024-09-26 Thread David Hildenbrand
We currently assume that the hugetlb page size is 2 MiB, which is why we mmap() a 2 MiB range. Is the default hugetlb size is larger, mmap() will fail because the range is not suitable. If the default hugetlb size is smaller (e.g., s390x), mmap() will fail because we would need more than one huget

Re: [PATCH v1] nvdimm: Correct some typos in comments

2024-09-26 Thread Dave Jiang
On 9/26/24 12:57 AM, Shen Lichuan wrote: > Fixed some confusing typos that were currently identified with codespell, > the details are as follows: > > -in the code comments: > drivers/nvdimm/nd_virtio.c:100: repsonse ==> response > drivers/nvdimm/pfn_devs.c:542: namepace ==> namespace > drivers

Re: [PATCH 0/3] KVM: x86: Fix Intel PT Host/Guest mode when host tracing also

2024-09-26 Thread Adrian Hunter
On 6/09/24 16:00, Adrian Hunter wrote: > Hi > > There is a long-standing problem whereby running Intel PT on host and guest > in Host/Guest mode, causes VM-Entry failure. > > The motivation for this patch set is to provide a fix for stable kernels > prior to the advent of the "Mediated Passthroug

Re: [PATCH v2 7/7] kunit, slub: add test_kfree_rcu() and test_leak_destroy()

2024-09-26 Thread Vlastimil Babka
On 9/25/24 14:56, Hyeonggon Yoo wrote: > On Sun, Sep 22, 2024 at 11:13 PM Guenter Roeck wrote: >> >> On 9/21/24 23:16, Hyeonggon Yoo wrote: >> > On Sun, Sep 22, 2024 at 6:25 AM Vlastimil Babka wrote: >> >> >> >> On 9/21/24 23:08, Guenter Roeck wrote: >> >>> On 9/21/24 13:40, Vlastimil Babka wrote

Re: [PATCH v5 14/16] modules: Support extended MODVERSIONS info

2024-09-26 Thread Christophe Leroy
Le 26/09/2024 à 01:38, Matthew Maurer a écrit : Adds a new format for MODVERSIONS which stores each field in a separate ELF section. This initially adds support for variable length names, but could later be used to add additional fields to MODVERSIONS in a backwards compatible way if needed. A

Re: [PATCH 0/2] livepatch: introduce 'stack_order' sysfs interface to klp_patch

2024-09-26 Thread zhang warden
> On Sep 25, 2024, at 21:08, Marcos Paulo de Souza wrote: > > On Wed, 2024-09-25 at 14:40 +0800, Wardenjohn wrote: >> As previous discussion, maintainers think that patch-level sysfs >> interface is the >> only acceptable way to maintain the information of the order that >> klp_patch is >> app

Re: [PATCH v6] ptp: Add support for the AMZNC10C 'vmclock' device

2024-09-26 Thread David Woodhouse
On Thu, 2024-09-26 at 11:22 +0200, Paolo Abeni wrote: > > Please have a better run at checkpatch before your next submission, > there are still a few ones - most relevant white-space damage. Oops, apparently I missed one. Sorry about that. I'll also add a MAINTAINERS entry, just to make checkpa

Re: [PATCH bpf-next v2] selftests/bpf: convert test_xdp_features.sh to test_progs

2024-09-26 Thread Alexis Lothoré
Hi Martin, On 9/25/24 22:01, Martin KaFai Lau wrote: > On 9/25/24 3:37 AM, Martin KaFai Lau wrote: >> I am not sure which case in xdp_features.c does not have existing coverage in >> test_progs. From a quick look, it seems only BPF_MAP_TYPE_CPUMAP is missing >> (please check)? > > Re: CPUMAP, I n

Re: [PATCH v2 1/4] selftests: add unshare_test and msg_oob to gitignore

2024-09-26 Thread Javier Carrasco
On 26/09/2024 11:32, Paolo Abeni wrote: > On 9/25/24 18:41, Shuah Khan wrote: >> On 9/25/24 06:23, Javier Carrasco wrote: >>> These executables are missing from their corresponding gitignore files. >>> Add them to the lists. >>> >>> Signed-off-by: Javier Carrasco >>> --- >>>    tools/testing/selft

Re: [PATCH v2 1/4] selftests: add unshare_test and msg_oob to gitignore

2024-09-26 Thread Paolo Abeni
On 9/25/24 18:41, Shuah Khan wrote: On 9/25/24 06:23, Javier Carrasco wrote: These executables are missing from their corresponding gitignore files. Add them to the lists. Signed-off-by: Javier Carrasco --- tools/testing/selftests/core/.gitignore | 1 + tools/testing/selftests/net/.gitign

Re: [PATCH v6] ptp: Add support for the AMZNC10C 'vmclock' device

2024-09-26 Thread Paolo Abeni
On 9/20/24 11:32, David Woodhouse wrote: From: David Woodhouse The vmclock device addresses the problem of live migration with precision clocks. The tolerances of a hardware counter (e.g. TSC) are typically around ±50PPM. A guest will use NTP/PTP/PPS to discipline that counter against an extern

Re: [RESEND PATCH v3] virtio_net: Fix mismatched buf address when unmapping for small packets

2024-09-26 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (main) by Paolo Abeni : On Thu, 19 Sep 2024 16:13:51 +0800 you wrote: > Currently, the virtio-net driver will perform a pre-dma-mapping for > small or mergeable RX buffer. But for small packets, a mismatched address > without VIRTNET_RX_PAD and xdp_

Re: [PATCH v2 04/19] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC

2024-09-26 Thread Yi Liu
On 2024/8/28 00:59, Nicolin Chen wrote: Now a VIOMMU can wrap a shareable nested parent HWPT. So, it can act like a nested parent HWPT to allocate a nested HWPT. Support that in the IOMMU_HWPT_ALLOC ioctl handler, and update its kdoc. Also, associate a viommu to an allocating nested HWPT. it

Re: [PATCH v2 00/19] iommufd: Add VIOMMU infrastructure (Part-1)

2024-09-26 Thread Yi Liu
On 2024/9/26 02:55, Nicolin Chen wrote: On Wed, Sep 25, 2024 at 06:30:20PM +0800, Yi Liu wrote: Hi Nic, On 2024/8/28 00:59, Nicolin Chen wrote: This series introduces a new VIOMMU infrastructure and related ioctls. IOMMUFD has been using the HWPT infrastructure for all cases, including a nest

[PATCH v1] nvdimm: Correct some typos in comments

2024-09-26 Thread Shen Lichuan
Fixed some confusing typos that were currently identified with codespell, the details are as follows: -in the code comments: drivers/nvdimm/nd_virtio.c:100: repsonse ==> response drivers/nvdimm/pfn_devs.c:542: namepace ==> namespace drivers/nvdimm/pmem.c:319: reenable ==> re-enable Signed-off-by:

Re: [RFC PATCH v1 2/2] KVM: arm64: Allow the RAS feature bit in ID_AA64PFR0_EL1 writable from userspace

2024-09-26 Thread Oliver Upton
On Wed, Sep 25, 2024 at 11:22:40PM -0400, Shaoqin Huang wrote: > Currently FEAT_RAS is not writable, this makes migration fail between > systems where this feature differ. Allow the FEAT_RAS writable in > ID_AA64PFR0_EL1 to let the migration possible when the RAS is differ > between two machines. >