Re: [PATCH v2 3/7] vhost: Add kthread support in function vhost_workers_free()

2024-10-14 Thread Stefano Garzarella
On Tue, Oct 15, 2024 at 02:05:47PM +0800, Cindy Lu wrote: On Tue, 15 Oct 2024 at 05:06, Mike Christie wrote: On 10/3/24 8:58 PM, Cindy Lu wrote: > +static void vhost_workers_free(struct vhost_dev *dev) > +{ > + if (enforce_inherit_owner) > + vhost_workers_free_task(dev); > +

Re: [PATCH v2 6/7] vhost: Add kthread support in function vhost_worker_create

2024-10-14 Thread Cindy Lu
On Tue, 15 Oct 2024 at 05:02, Mike Christie wrote: > > On 10/3/24 8:58 PM, Cindy Lu wrote: > > +static struct vhost_worker *vhost_worker_create(struct vhost_dev *dev) > > +{ > > + if (enforce_inherit_owner) > > + return vhost_worker_create_task(dev); > > + else > > +

Re: [PATCH net-next v3 4/9] net: af_can: do not leave a dangling sk pointer in can_create()

2024-10-14 Thread Marc Kleine-Budde
On 14.10.2024 16:38:03, Ignat Korchagin wrote: > On error can_create() frees the allocated sk object, but sock_init_data() > has already attached it to the provided sock object. This will leave a > dangling sk pointer in the sock object and may cause use-after-free later. > > Signed-off-by: Ignat

Re: [PATCH 1/4] LoongArch: Don't crash in stack_top() for tasks without vDSO

2024-10-14 Thread Huacai Chen
On Tue, Oct 15, 2024 at 2:14 PM Thomas Weißschuh wrote: > > Hi Huacai, > > On Tue, Oct 15, 2024 at 10:15:39AM +0800, Huacai Chen wrote: > > I can take this patch to the loongarch tree, but I think others should > > get upstream via kselftests tree? > > Yes, sounds good. > Could you take a look at

Re: [PATCH 1/4] LoongArch: Don't crash in stack_top() for tasks without vDSO

2024-10-14 Thread Thomas Weißschuh
Hi Huacai, On Tue, Oct 15, 2024 at 10:15:39AM +0800, Huacai Chen wrote: > I can take this patch to the loongarch tree, but I think others should > get upstream via kselftests tree? Yes, sounds good. Could you take a look at patches 2 and 4, too? Thanks, Thomas > On Mon, Oct 14, 2024 at 7:36 PM

Re: [PATCH v2 3/7] vhost: Add kthread support in function vhost_workers_free()

2024-10-14 Thread Cindy Lu
On Tue, 15 Oct 2024 at 05:06, Mike Christie wrote: > > On 10/3/24 8:58 PM, Cindy Lu wrote: > > +static void vhost_workers_free(struct vhost_dev *dev) > > +{ > > + if (enforce_inherit_owner) > > + vhost_workers_free_task(dev); > > + else > > + vhost_workers_free_kthr

Re: [PATCH v2 3/7] vhost: Add kthread support in function vhost_workers_free()

2024-10-14 Thread Cindy Lu
On Mon, 7 Oct 2024 at 21:33, Stefano Garzarella wrote: > > On Fri, Oct 04, 2024 at 09:58:17AM GMT, Cindy Lu wrote: > >Added back the previously removed function vhost_workers_free() and > >renamed it to vhost_workers_free_khtread(). The new vhost_workers_free() > >will select the different mode ba

Re: [PATCH rcu 05/12] srcu: Standardize srcu_data pointers to "sdp" and similar

2024-10-14 Thread Neeraj Upadhyay
On 10/15/2024 5:59 AM, Paul E. McKenney wrote: > On Mon, Oct 14, 2024 at 09:49:52AM -0700, Paul E. McKenney wrote: >> On Mon, Oct 14, 2024 at 02:45:50PM +0530, Neeraj Upadhyay wrote: >>> On 10/9/2024 11:37 PM, Paul E. McKenney wrote: This commit changes a few "cpuc" variables to "sdp" to al

Re: [PATCH rcu 04/12] srcu: Bit manipulation changes for additional reader flavor

2024-10-14 Thread Neeraj Upadhyay
On 10/14/2024 10:21 PM, Paul E. McKenney wrote: > On Mon, Oct 14, 2024 at 02:42:33PM +0530, Neeraj Upadhyay wrote: >> On 10/9/2024 11:37 PM, Paul E. McKenney wrote: >>> Currently, there are only two flavors of readers, normal and NMI-safe. >>> Very straightforward state updates suffice to check

Re: [PATCH rcu 03/12] srcu: Renaming in preparation for additional reader flavor

2024-10-14 Thread Neeraj Upadhyay
On 10/14/2024 10:22 PM, Paul E. McKenney wrote: > On Mon, Oct 14, 2024 at 02:40:35PM +0530, Neeraj Upadhyay wrote: >> On 10/9/2024 11:37 PM, Paul E. McKenney wrote: >>> Currently, there are only two flavors of readers, normal and NMI-safe. >>> A number of fields, functions, and types reflect thi

Re: [PATCH v2 7/7] vhost: Add new UAPI to support change to task mode

2024-10-14 Thread Cindy Lu
On Tue, 15 Oct 2024 at 04:56, Mike Christie wrote: > > On 10/3/24 8:58 PM, Cindy Lu wrote: > > Add a new UAPI to support setting the vhost device to > > use task mode. The user space application needs to use > > VHOST_SET_INHERIT_FROM_OWNER to set the mode. > > This setting must be set before VHOS

Re: [PATCH] selftests: mm: fix the incorrect usage() info of khugepaged

2024-10-14 Thread Baolin Wang
On 2024/10/15 10:02, Nanyong Sun wrote: The mount option of tmpfs should be huge=advise, not madvise which is not supported and may mislead the users. Fixes: 1b03d0d558a2 ("selftests/vm: add thp collapse file and tmpfs testing") Signed-off-by: Nanyong Sun LGTM. Reviewed-by: Baolin Wang

Re: [PATCH 1/4] LoongArch: Don't crash in stack_top() for tasks without vDSO

2024-10-14 Thread Huacai Chen
Hi, Thomas, I can take this patch to the loongarch tree, but I think others should get upstream via kselftests tree? Huacai On Mon, Oct 14, 2024 at 7:36 PM Thomas Weißschuh wrote: > > Not all tasks have a vDSO mapped, for example kthreads never do. > If such a task ever ends up calling stack_to

[PATCH] selftests: mm: fix the incorrect usage() info of khugepaged

2024-10-14 Thread Nanyong Sun
The mount option of tmpfs should be huge=advise, not madvise which is not supported and may mislead the users. Fixes: 1b03d0d558a2 ("selftests/vm: add thp collapse file and tmpfs testing") Signed-off-by: Nanyong Sun --- tools/testing/selftests/mm/khugepaged.c | 2 +- 1 file changed, 1 insertion(

Re: [PATCH v3 03/11] iommufd: Introduce IOMMUFD_OBJ_VIOMMU and its related struct

2024-10-14 Thread Nicolin Chen
On Tue, Oct 15, 2024 at 09:15:01AM +0800, Zhangfei Gao wrote: > > > iommufd_device_bind > > > iommufd_device_attach > > > iommufd_vdevice_alloc_ioctl > > > > > > iommufd_device_detach > > > iommufd_device_unbind // refcount check fail > > > iommufd_vdevice_destroy ref-- > > > > Things should be sy

Re: [PATCH v3 03/11] iommufd: Introduce IOMMUFD_OBJ_VIOMMU and its related struct

2024-10-14 Thread Zhangfei Gao
On Mon, 14 Oct 2024 at 23:46, Nicolin Chen wrote: > > On Mon, Oct 14, 2024 at 03:58:55PM +0800, Zhangfei Gao wrote: > > > > > > > +struct iommufd_object *iommufd_object_alloc_elm(struct iommufd_ctx > > > > > > *ictx, > > > > > > + size_t size, > > > >

[PATCH 3/3] selftests: ignore output files and clean them in Makefile

2024-10-14 Thread Li Zhijian
After `make run_tests`, the git status complains: Untracked files: (use "git add ..." to include in what will be committed) cpufreq/cpufreq_selftest.dmesg_cpufreq.txt cpufreq/cpufreq_selftest.dmesg_full.txt cpufreq/cpufreq_selftest.txt zram/err.log Signed-off-by

[PATCH 1/3] selftests: Add a few missing gitignore files

2024-10-14 Thread Li Zhijian
Binary files should be added to .gitignore 'git status' complains: Untracked files: (use "git add ..." to include in what will be committed) alsa/global-timer alsa/utimer-test filesystems/statmount/statmount_test_ns mm/hugetlb_dio mm/pkey_sighandler_tests_32 mm/pkey_s

[PATCH 2/3] selftests/net: Fix ./ns-XXXXXX not cleanup

2024-10-14 Thread Li Zhijian
``` readonly STATS="$(mktemp -p /tmp ns-XX)" readonly BASE=`basename $STATS` ``` It would be a mistake to write to $BASE rather than $STATS, where $STATS is used to save the NSTAT_HISTORY and it will be cleaned up before exit. Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Pa

Re: [PATCH -next] selftests/cgroup: Fix compile error in test_cpu.c

2024-10-14 Thread Tejun Heo
On Fri, Oct 11, 2024 at 06:11:53AM +, Xiu Jianfeng wrote: > From: Xiu Jianfeng > > When compiling the cgroup selftests with the following command: > > make -C tools/testing/selftests/cgroup/ > > the compiler complains as below: > > test_cpu.c: In function ‘test_cpucg_nice’: > test_cpu.c:28

Re: [PATCH net-next v3 1/9] af_packet: avoid erroring out after sock_init_data() in packet_create()

2024-10-14 Thread Willem de Bruijn
Ignat Korchagin wrote: > After sock_init_data() the allocated sk object is attached to the provided > sock object. On error, packet_create() frees the sk object leaving the > dangling pointer in the sock object on return. Some other code may try > to use this pointer and cause use-after-free. > >

Re: [PATCH net-next v04 3/3] selftests: net/psock_fanout: unbound socket fanout

2024-10-14 Thread Willem de Bruijn
Gur Stavi wrote: > Add a test that validates that an unbound packet socket cannot create/join > a fanout group. > > Signed-off-by: Gur Stavi Reviewed-by: Willem de Bruijn

Re: [PATCH net-next v04 2/3] selftests: net/psock_fanout: socket joins fanout when link is down

2024-10-14 Thread Willem de Bruijn
Gur Stavi wrote: > Modify test_control_group to have toggle parameter. > When toggle is non-zero, loopback device will be set down for the > initialization of fd[1] which is still expected to successfully join > the fanout. > > Signed-off-by: Gur Stavi Reviewed-by: Willem de Bruijn

Re: [PATCH net-next v04 1/3] af_packet: allow fanout_add when socket is not RUNNING

2024-10-14 Thread Willem de Bruijn
Gur Stavi wrote: > PACKET socket can retain its fanout membership through link down and up > and leave a fanout while closed regardless of link state. > However, socket was forbidden from joining a fanout while it was not > RUNNING. > > This patch allows PACKET socket to join fanout while not RUNN

Re: [PATCH rcu 05/12] srcu: Standardize srcu_data pointers to "sdp" and similar

2024-10-14 Thread Paul E. McKenney
On Mon, Oct 14, 2024 at 09:49:52AM -0700, Paul E. McKenney wrote: > On Mon, Oct 14, 2024 at 02:45:50PM +0530, Neeraj Upadhyay wrote: > > On 10/9/2024 11:37 PM, Paul E. McKenney wrote: > > > This commit changes a few "cpuc" variables to "sdp" to align wiht usage > > > elsewhere. > > > > > > > s/wi

Re: [PATCH v2] selftests/intel_pstate: fix operand expected

2024-10-14 Thread Shuah Khan
On 10/14/24 11:21, Alessandro Zanni wrote: This fix solves theses errors, when calling kselftest with targets "intel_pstate": ./run.sh: line 90: / 1000: syntax error: operand expected (error token is "/ 1000") ./run.sh: line 92: / 1000: syntax error: operand expected (error token is "/ 1000")

Re: [PATCH v2 net-next] selftests: tc-testing: Fixed Typo error

2024-10-14 Thread Shuah Khan
On 10/14/24 10:50, Karan Sanghavi wrote: This commit combines two fixes for typographical errors in the "name" fields of the JSON objects with IDs "4319" and "4341" in the tc-testing selftests. For the files tc-tests/filters/cgroup.json and /tc-tests/filters/flow.json. This is not the correct

Re: [PATCH] selftests/intel_pstate: fix operand expected

2024-10-14 Thread Shuah Khan
On 10/14/24 08:09, Alessandro Zanni wrote: This fix solves these errors, when calling kselftest with targets "intel_pstate": What is "calling" kselftest? Please include the command you ran in the change log. Also, say "Fix" instead of "This fix" Running "command" results in the following erro

Re: [PATCH] remoteproc: elf_loader: redundant check remove

2024-10-14 Thread Bjorn Andersson
On Sun, Oct 13, 2024 at 10:48:20PM GMT, anish kumar wrote: > offset will always be positive number and adding > and comparing to the same variable 'size' will > always result in check being false always. > Remove this superfluous check. > What if offset + size overflows? Regards, Bjorn > Signed

Re: [PATCH v3 7/9] KVM: selftests: Add interface to manually flag protected/encrypted ranges

2024-10-14 Thread Sean Christopherson
On Thu, Sep 05, 2024, Pratik R. Sampat wrote: > From: Michael Roth > > For SEV and SNP, currently __vm_phy_pages_alloc() handles setting the > region->protected_phy_pages bitmap to mark that the region needs to be > encrypted/measured into the initial guest state prior to Nothing needs to be mea

Re: [PATCH v2 4/7] vhost: Add the vhost_worker to support kthread

2024-10-14 Thread Mike Christie
On 10/3/24 8:58 PM, Cindy Lu wrote: > Add back the previously removed vhost_worker function to support the kthread > and rename it vhost_run_work_kthread_list. > > The old function vhost_worker was change to support task in > commit 6e890c5d5021 ("vhost: use vhost_tasks for worker threads") > chan

Re: [PATCH v3 2/9] KVM: selftests: Add a basic SNP smoke test

2024-10-14 Thread Sean Christopherson
On Thu, Sep 05, 2024, Pratik R. Sampat wrote: > Extend sev_smoke_test to also run a minimal SEV-SNP smoke test that > initializes and sets up private memory regions required to run a simple > SEV-SNP guest. > > Similar to its SEV-ES smoke test counterpart, this also does not > support GHCB and uca

Re: [PATCH] selftests: clone3: Use the capget and capset syscall directly

2024-10-14 Thread Shuah Khan
On 10/12/24 02:28, zhouyuhang wrote: On 2024/10/11 22:21, Shuah Khan wrote: On 10/11/24 00:59, zhouyuhang wrote: On 2024/10/10 23:50, Shuah Khan wrote: On 10/10/24 06:16, zhouyuhang wrote: From: zhouyuhang The libcap commit aca076443591 ("Make cap_t operations thread safe.") added a __u8

Re: [PATCH v3 0/9] SEV Kernel Selftests

2024-10-14 Thread Sean Christopherson
On Thu, Sep 05, 2024, Pratik R. Sampat wrote: > This series primarily introduces SEV-SNP test for the kernel selftest > framework. It tests boot, ioctl, pre fault, and fallocate in various > combinations to exercise both positive and negative launch flow paths. > > Patch 1 - Adds a wrapper for the

Re: [PATCH v3 1/9] KVM: selftests: Decouple SEV ioctls from asserts

2024-10-14 Thread Sean Christopherson
On Thu, Sep 05, 2024, Pratik R. Sampat wrote: > +static inline int __sev_launch_update_data(struct kvm_vm *vm, vm_paddr_t gpa, > +uint64_t hva, uint64_t size) > { > struct kvm_sev_launch_update_data update_data = { > - .uaddr = (unsigned lo

Re: [PATCH] selftests:timers: remove local CLOCKID defines

2024-10-14 Thread Shuah Khan
On 10/11/24 18:49, John Stultz wrote: On Fri, Oct 11, 2024 at 3:52 PM Shuah Khan wrote: timers tests defines CLOCKIDs locally. Remove all local CLOCKIDs except CLOCK_HWSPECIFIC and use defines from time.h header file. CLOCK_HWSPECIFIC and CLOCK_SGI_CYCLE are the same and CLOCK_SGI_CYCLE is de

Re: [PATCH] selftests: timers: Remove unneeded semicolon

2024-10-14 Thread Shuah Khan
On 10/11/24 18:47, John Stultz wrote: On Fri, Oct 11, 2024 at 4:00 PM Shuah Khan wrote: On 10/10/24 01:37, Chen Ni wrote: Remove unnecessary semicolons reported by Coccinelle/coccicheck and the semantic patch at scripts/coccinelle/misc/semicolon.cocci. Signed-off-by: Chen Ni --- tools/te

Re: [RFC PATCH] selftest/tcp-ao: Add filter tests

2024-10-14 Thread Dmitry Safonov
Hi Leo, On Mon, 14 Oct 2024 at 22:37, Leo Stone wrote: > > Add tests that check if getsockopt(TCP_AO_GET_KEYS) returns the right > keys when using different filters. > > Sample output: > > > # ok 114 filter keys: by sndid, rcvid, address > > # ok 115 filter keys: by sndid, rcvid > > # ok 116 filt

Re: [PATCH] selftests:timers: remove local CLOCKID defines

2024-10-14 Thread Thomas Gleixner
On Fri, Oct 11 2024 at 16:52, Shuah Khan wrote: > timers tests defines CLOCKIDs locally. Remove all local CLOCKIDs except > CLOCK_HWSPECIFIC and use defines from time.h header file. > > CLOCK_HWSPECIFIC and CLOCK_SGI_CYCLE are the same and CLOCK_SGI_CYCLE > is deprecated, > > Signed-off-by: Shuah K

Re: [PATCH net-next v3 9/9] Revert "net: do not leave a dangling sk pointer, when socket creation fails"

2024-10-14 Thread Kuniyuki Iwashima
From: Ignat Korchagin Date: Mon, 14 Oct 2024 16:38:08 +0100 > This reverts commit 6cd4a78d962bebbaf8beb7d2ead3f34120e3f7b2. > > inet/inet6->create() implementations have been fixed to explicitly NULL the > allocated sk object on error. > > A warning was put in place to make sure any future chang

Re: [PATCH net-next v3 8/9] net: warn, if pf->create does not clear sock->sk on error

2024-10-14 Thread Kuniyuki Iwashima
From: Ignat Korchagin Date: Mon, 14 Oct 2024 16:38:07 +0100 > All pf->create implementations have been fixed now to clear sock->sk on > error, when they deallocate the allocated sk object. > > Put a warning in place to make sure we don't break this promise in the > future. > > Suggested-by: Kuni

Re: [PATCH net-next v3 7/9] net: inet6: do not leave a dangling sk pointer in inet6_create()

2024-10-14 Thread Kuniyuki Iwashima
From: Ignat Korchagin Date: Mon, 14 Oct 2024 16:38:06 +0100 > sock_init_data() attaches the allocated sk pointer to the provided sock > object. If inet6_create() fails later, the sk object is released, but the > sock object retains the dangling sk pointer, which may cause use-after-free > later. >

Re: [PATCH net-next v3 6/9] net: inet: do not leave a dangling sk pointer in inet_create()

2024-10-14 Thread Kuniyuki Iwashima
From: Ignat Korchagin Date: Mon, 14 Oct 2024 16:38:05 +0100 > sock_init_data() attaches the allocated sk object to the provided sock > object. If inet_create() fails later, the sk object is freed, but the > sock object retains the dangling pointer, which may create use-after-free > later. > > Cle

[RFC PATCH] selftest/tcp-ao: Add filter tests

2024-10-14 Thread Leo Stone
Add tests that check if getsockopt(TCP_AO_GET_KEYS) returns the right keys when using different filters. Sample output: > # ok 114 filter keys: by sndid, rcvid, address > # ok 115 filter keys: by sndid, rcvid > # ok 116 filter keys: by is_current > # ok 117 filter keys: by is_rnext Signed-off-by

Re: [PATCH net-next v3 5/9] net: ieee802154: do not leave a dangling sk pointer in ieee802154_create()

2024-10-14 Thread Kuniyuki Iwashima
From: Ignat Korchagin Date: Mon, 14 Oct 2024 16:38:04 +0100 > sock_init_data() attaches the allocated sk object to the provided sock > object. If ieee802154_create() fails later, the allocated sk object is > freed, but the dangling pointer remains in the provided sock object, which > may allow use

Re: [PATCH net-next v3 4/9] net: af_can: do not leave a dangling sk pointer in can_create()

2024-10-14 Thread Kuniyuki Iwashima
From: Ignat Korchagin Date: Mon, 14 Oct 2024 16:38:03 +0100 > On error can_create() frees the allocated sk object, but sock_init_data() > has already attached it to the provided sock object. This will leave a > dangling sk pointer in the sock object and may cause use-after-free later. > > Signed-

Re: [PATCH net-next v3 3/9] Bluetooth: RFCOMM: avoid leaving dangling sk pointer in rfcomm_sock_alloc()

2024-10-14 Thread Kuniyuki Iwashima
From: Ignat Korchagin Date: Mon, 14 Oct 2024 16:38:02 +0100 > bt_sock_alloc() attaches allocated sk object to the provided sock object. > If rfcomm_dlc_alloc() fails, we release the sk object, but leave the > dangling pointer in the sock object, which may cause use-after-free. > > Fix this by swa

Re: [PATCH net-next v3 2/9] Bluetooth: L2CAP: do not leave dangling sk pointer on error in l2cap_sock_create()

2024-10-14 Thread Kuniyuki Iwashima
From: Ignat Korchagin Date: Mon, 14 Oct 2024 16:38:01 +0100 > bt_sock_alloc() allocates the sk object and attaches it to the provided > sock object. On error l2cap_sock_alloc() frees the sk object, but the > dangling pointer is still attached to the sock object, which may create > use-after-free i

Re: [PATCH net-next v3 1/9] af_packet: avoid erroring out after sock_init_data() in packet_create()

2024-10-14 Thread Kuniyuki Iwashima
From: Ignat Korchagin Date: Mon, 14 Oct 2024 16:38:00 +0100 > After sock_init_data() the allocated sk object is attached to the provided > sock object. On error, packet_create() frees the sk object leaving the > dangling pointer in the sock object on return. Some other code may try > to use this p

Re: [PATCH v2 3/7] vhost: Add kthread support in function vhost_workers_free()

2024-10-14 Thread Mike Christie
On 10/3/24 8:58 PM, Cindy Lu wrote: > +static void vhost_workers_free(struct vhost_dev *dev) > +{ > + if (enforce_inherit_owner) > + vhost_workers_free_task(dev); > + else > + vhost_workers_free_kthread(dev); > +} With patch 7, userspace could change enforce_inherit

Re: [PATCH v2 6/7] vhost: Add kthread support in function vhost_worker_create

2024-10-14 Thread Mike Christie
On 10/3/24 8:58 PM, Cindy Lu wrote: > +static struct vhost_worker *vhost_worker_create(struct vhost_dev *dev) > +{ > + if (enforce_inherit_owner) > + return vhost_worker_create_task(dev); > + else > + return vhost_worker_create_kthread(dev); > +} The reason we are i

Re: [PATCH v2 7/7] vhost: Add new UAPI to support change to task mode

2024-10-14 Thread Mike Christie
On 10/3/24 8:58 PM, Cindy Lu wrote: > Add a new UAPI to support setting the vhost device to > use task mode. The user space application needs to use > VHOST_SET_INHERIT_FROM_OWNER to set the mode. > This setting must be set before VHOST_SET_OWNER is set. > > Signed-off-by: Cindy Lu > --- > drive

Re: [PATCH v2] remoteproc: Add a new remoteproc state RPROC_DEFUNCT

2024-10-14 Thread Mukesh Ojha
On Tue, Oct 15, 2024 at 02:01:18AM +0530, Mukesh Ojha wrote: > Multiple call to glink_subdev_stop() for the same remoteproc can happen > if rproc_stop() fails from Process-A that leaves the rproc state to > RPROC_CRASHED state later a call to recovery_store from user space in > Process B triggers r

[PATCH v2] remoteproc: Add a new remoteproc state RPROC_DEFUNCT

2024-10-14 Thread Mukesh Ojha
Multiple call to glink_subdev_stop() for the same remoteproc can happen if rproc_stop() fails from Process-A that leaves the rproc state to RPROC_CRASHED state later a call to recovery_store from user space in Process B triggers rproc_trigger_recovery() of the same remoteproc to recover it results

Re: [PATCH net-next v7] ptp: Add support for the AMZNC10C 'vmclock' device

2024-10-14 Thread Jakub Kicinski
On Mon, 14 Oct 2024 08:25:35 +0100 David Woodhouse wrote: > On Wed, 2024-10-09 at 17:32 -0700, Jakub Kicinski wrote: > > On Sun, 06 Oct 2024 08:17:58 +0100 David Woodhouse wrote: > > > +config PTP_1588_CLOCK_VMCLOCK > > > +   tristate "Virtual machine PTP clock" > > > +   depends on X86_T

Re: [PATCH V13 03/14] KVM: x86: Fix Intel PT Host/Guest mode when host tracing also

2024-10-14 Thread Sean Christopherson
On Mon, Oct 14, 2024, Adrian Hunter wrote: > Ensure Intel PT tracing is disabled before VM-Entry in Intel PT Host/Guest > mode. > > Intel PT has 2 modes for tracing virtual machines. The default is System > mode whereby host and guest output to the host trace buffer. The other is > Host/Guest mode

Re: [PATCH] mailbox, remoteproc: k3-m4+: fix compile testing

2024-10-14 Thread Andrew Davis
On 10/14/24 11:52 AM, Nishanth Menon wrote: On 15:43-20241014, Arnd Bergmann wrote: On Mon, Oct 14, 2024, at 14:56, Andrew Davis wrote: On 10/7/24 8:23 AM, Arnd Bergmann wrote: config TI_K3_M4_REMOTEPROC tristate "TI K3 M4 remoteproc support" - depends on ARCH

[PATCH v2] selftests/intel_pstate: fix operand expected

2024-10-14 Thread Alessandro Zanni
This fix solves theses errors, when calling kselftest with targets "intel_pstate": ./run.sh: line 90: / 1000: syntax error: operand expected (error token is "/ 1000") ./run.sh: line 92: / 1000: syntax error: operand expected (error token is "/ 1000") To error was found by running tests manuall

Re: [syzbot] [bpf?] KCSAN: data-race in __mod_timer / kvfree_call_rcu

2024-10-14 Thread Paul E. McKenney
On Mon, Oct 14, 2024 at 10:27:05AM +0200, Dmitry Vyukov wrote: > On Mon, 14 Oct 2024 at 08:07, syzbot > wrote: > > > > Hello, > > > > syzbot found the following issue on: > > > > HEAD commit:5b7c893ed5ed Merge tag 'ntfs3_for_6.12' of https://github... > > git tree: upstream > > console o

Re: [PATCH] mailbox, remoteproc: k3-m4+: fix compile testing

2024-10-14 Thread Nishanth Menon
On 15:43-20241014, Arnd Bergmann wrote: > On Mon, Oct 14, 2024, at 14:56, Andrew Davis wrote: > > On 10/7/24 8:23 AM, Arnd Bergmann wrote: > >> config TI_K3_M4_REMOTEPROC > >>tristate "TI K3 M4 remoteproc support" > >> - depends on AR

Re: [PATCH rcu 03/12] srcu: Renaming in preparation for additional reader flavor

2024-10-14 Thread Paul E. McKenney
On Mon, Oct 14, 2024 at 02:40:35PM +0530, Neeraj Upadhyay wrote: > On 10/9/2024 11:37 PM, Paul E. McKenney wrote: > > Currently, there are only two flavors of readers, normal and NMI-safe. > > A number of fields, functions, and types reflect this restriction. > > This renaming-only commit prepares

Re: [PATCH rcu 04/12] srcu: Bit manipulation changes for additional reader flavor

2024-10-14 Thread Paul E. McKenney
On Mon, Oct 14, 2024 at 02:42:33PM +0530, Neeraj Upadhyay wrote: > On 10/9/2024 11:37 PM, Paul E. McKenney wrote: > > Currently, there are only two flavors of readers, normal and NMI-safe. > > Very straightforward state updates suffice to check for erroneous > > mixing of reader flavors on a given

[PATCH v2 net-next] selftests: tc-testing: Fixed Typo error

2024-10-14 Thread Karan Sanghavi
This commit combines two fixes for typographical errors in the "name" fields of the JSON objects with IDs "4319" and "4341" in the tc-testing selftests. For the files tc-tests/filters/cgroup.json and /tc-tests/filters/flow.json. v2: - Combine two earlier patches into one - Links to v1 of each pat

Re: [PATCH rcu 05/12] srcu: Standardize srcu_data pointers to "sdp" and similar

2024-10-14 Thread Paul E. McKenney
On Mon, Oct 14, 2024 at 02:45:50PM +0530, Neeraj Upadhyay wrote: > On 10/9/2024 11:37 PM, Paul E. McKenney wrote: > > This commit changes a few "cpuc" variables to "sdp" to align wiht usage > > elsewhere. > > > > s/wiht/with/ Good eyes! > This commit is doing a lot more than renaming "cpuc". I

Re: [PATCH V13 02/14] KVM: x86: Fix Intel PT IA32_RTIT_CTL MSR validation

2024-10-14 Thread Sean Christopherson
"KVM: VMX:" for the scope. And I would much prefer to actually state what is changing. "Fix XYZ" isn't helpful in understanding what's actually broken, fallout from the bug, etc. It's never easy to describe bugs where the logic is flat out busted, but I think we can at least capture the basic

Re: [PATCH net-next v1 1/3] connector/cn_proc: Add hash table for threads

2024-10-14 Thread Anjali Kulkarni
On 10/14/24, 1:28 AM, "Peter Zijlstra" mailto:pet...@infradead.org>> wrote: On Sun, Oct 13, 2024 at 10:06:15AM -0700, Anjali Kulkarni wrote: > + if (unlikely(task->flags & PF_EXIT_NOTIFY)) { > + task_lock(task); > + task->flags &= ~PF_EXIT_NOTIFY; > + task_unlock(task); > + > @@ -413,6 +44

Re: [PATCH v3 03/11] iommufd: Introduce IOMMUFD_OBJ_VIOMMU and its related struct

2024-10-14 Thread Nicolin Chen
On Mon, Oct 14, 2024 at 03:58:55PM +0800, Zhangfei Gao wrote: > > > > > +struct iommufd_object *iommufd_object_alloc_elm(struct iommufd_ctx > > > > > *ictx, > > > > > + size_t size, > > > > > + enum > > >

Re: [PATCH] mailbox, remoteproc: k3-m4+: fix compile testing

2024-10-14 Thread Arnd Bergmann
On Mon, Oct 14, 2024, at 14:56, Andrew Davis wrote: > On 10/7/24 8:23 AM, Arnd Bergmann wrote: >> config TI_K3_M4_REMOTEPROC >> tristate "TI K3 M4 remoteproc support" >> -depends on ARCH_OMAP2PLUS || ARCH_K3 >> -select MAILBOX >> -select OMAP2PLUS_MBOX >> +depends on ARCH_K3

[PATCH net-next v3 9/9] Revert "net: do not leave a dangling sk pointer, when socket creation fails"

2024-10-14 Thread Ignat Korchagin
This reverts commit 6cd4a78d962bebbaf8beb7d2ead3f34120e3f7b2. inet/inet6->create() implementations have been fixed to explicitly NULL the allocated sk object on error. A warning was put in place to make sure any future changes will not leave a dangling pointer in pf->create() implementations. So

[PATCH net-next v3 8/9] net: warn, if pf->create does not clear sock->sk on error

2024-10-14 Thread Ignat Korchagin
All pf->create implementations have been fixed now to clear sock->sk on error, when they deallocate the allocated sk object. Put a warning in place to make sure we don't break this promise in the future. Suggested-by: Kuniyuki Iwashima Signed-off-by: Ignat Korchagin --- net/socket.c | 4 ++--

[PATCH net-next v3 7/9] net: inet6: do not leave a dangling sk pointer in inet6_create()

2024-10-14 Thread Ignat Korchagin
sock_init_data() attaches the allocated sk pointer to the provided sock object. If inet6_create() fails later, the sk object is released, but the sock object retains the dangling sk pointer, which may cause use-after-free later. Clear the sock sk pointer on error. Signed-off-by: Ignat Korchagin

[PATCH net-next v3 6/9] net: inet: do not leave a dangling sk pointer in inet_create()

2024-10-14 Thread Ignat Korchagin
sock_init_data() attaches the allocated sk object to the provided sock object. If inet_create() fails later, the sk object is freed, but the sock object retains the dangling pointer, which may create use-after-free later. Clear the sk pointer in the sock object on error. Signed-off-by: Ignat Korc

[PATCH net-next v3 5/9] net: ieee802154: do not leave a dangling sk pointer in ieee802154_create()

2024-10-14 Thread Ignat Korchagin
sock_init_data() attaches the allocated sk object to the provided sock object. If ieee802154_create() fails later, the allocated sk object is freed, but the dangling pointer remains in the provided sock object, which may allow use-after-free. Clear the sk pointer in the sock object on error. Sign

[PATCH net-next v3 4/9] net: af_can: do not leave a dangling sk pointer in can_create()

2024-10-14 Thread Ignat Korchagin
On error can_create() frees the allocated sk object, but sock_init_data() has already attached it to the provided sock object. This will leave a dangling sk pointer in the sock object and may cause use-after-free later. Signed-off-by: Ignat Korchagin Reviewed-by: Vincent Mailhol --- net/can/af_

[PATCH net-next v3 3/9] Bluetooth: RFCOMM: avoid leaving dangling sk pointer in rfcomm_sock_alloc()

2024-10-14 Thread Ignat Korchagin
bt_sock_alloc() attaches allocated sk object to the provided sock object. If rfcomm_dlc_alloc() fails, we release the sk object, but leave the dangling pointer in the sock object, which may cause use-after-free. Fix this by swapping calls to bt_sock_alloc() and rfcomm_dlc_alloc(). Signed-off-by:

[PATCH net-next v3 2/9] Bluetooth: L2CAP: do not leave dangling sk pointer on error in l2cap_sock_create()

2024-10-14 Thread Ignat Korchagin
bt_sock_alloc() allocates the sk object and attaches it to the provided sock object. On error l2cap_sock_alloc() frees the sk object, but the dangling pointer is still attached to the sock object, which may create use-after-free in other code. Signed-off-by: Ignat Korchagin --- net/bluetooth/l2c

[PATCH net-next v3 1/9] af_packet: avoid erroring out after sock_init_data() in packet_create()

2024-10-14 Thread Ignat Korchagin
After sock_init_data() the allocated sk object is attached to the provided sock object. On error, packet_create() frees the sk object leaving the dangling pointer in the sock object on return. Some other code may try to use this pointer and cause use-after-free. Suggested-by: Eric Dumazet Signed-

[PATCH net-next v3 0/9] do not leave dangling sk pointers in pf->create functions

2024-10-14 Thread Ignat Korchagin
Some protocol family create() implementations have an error path after allocating the sk object and calling sock_init_data(). sock_init_data() attaches the allocated sk object to the sock object, provided by the caller. If the create() implementation errors out after calling sock_init_data(), it r

Re: [PATCH] mailbox, remoteproc: k3-m4+: fix compile testing

2024-10-14 Thread Andrew Davis
On 10/7/24 8:23 AM, Arnd Bergmann wrote: From: Arnd Bergmann The k3-m4 remoteproc driver was merged with incorrect dependencies. Despite multiple people trying to fix this, the version 6.12-rc2 remains broken and causes a build failure with CONFIG_TI_SCI_PROTOCOL=m when the driver is built-in.

[PATCH] selftests/intel_pstate: fix operand expected

2024-10-14 Thread Alessandro Zanni
This fix solves these errors, when calling kselftest with targets "intel_pstate": - ./run.sh: line 90: / 1000: syntax error: operand expected (error token is "/ 1000") - ./run.sh: line 92: / 1000: syntax error: operand expected (error token is "/ 1000") To error was found by running tests manuall

[PATCH net v2 2/2] selftests: mptcp: join: test for prohibited MPC to port-based endp

2024-10-14 Thread Matthieu Baerts (NGI0)
From: Paolo Abeni Explicitly verify that MPC connection attempts towards a port-based signal endpoint fail with a reset. Note that this new test is a bit different from the other ones, not using 'run_tests'. It is then needed to add the capture capability, and the picking the right port which ha

[PATCH net v2 1/2] mptcp: prevent MPC handshake on port-based signal endpoints

2024-10-14 Thread Matthieu Baerts (NGI0)
From: Paolo Abeni Syzkaller reported a lockdep splat: WARNING: possible recursive locking detected 6.11.0-rc6-syzkaller-00019-g67784a74e258 #0 Not tainted syz-executor364/5113 is trying to acquire

[PATCH net v2 0/2] mptcp: prevent MPC handshake on port-based signal endpoints

2024-10-14 Thread Matthieu Baerts (NGI0)
mit: 174714f0e505070a16be6fbede30d32b81df789f change-id: 20241014-net-mptcp-mpc-port-endp-4f88bd428ec7 Best regards, -- Matthieu Baerts (NGI0)

Re: [PATCH 6/6] remoteproc: qcom: Enable map/unmap and SHM bridge support

2024-10-14 Thread Dmitry Baryshkov
On Mon, 14 Oct 2024 at 15:31, Shiraz Hashim wrote: > > On Fri, Oct 11, 2024 at 10:12:09AM +0300, Dmitry Baryshkov wrote: > > On Fri, 11 Oct 2024 at 10:09, Shiraz Hashim > > wrote: > > > > > > On Fri, Oct 11, 2024 at 09:23:05AM +0300, Dmitry Baryshkov wrote: > > > > On Fri, Oct 11, 2024 at 10:35:

Re: [PATCH 6/6] remoteproc: qcom: Enable map/unmap and SHM bridge support

2024-10-14 Thread Shiraz Hashim
On Fri, Oct 11, 2024 at 10:12:09AM +0300, Dmitry Baryshkov wrote: > On Fri, 11 Oct 2024 at 10:09, Shiraz Hashim wrote: > > > > On Fri, Oct 11, 2024 at 09:23:05AM +0300, Dmitry Baryshkov wrote: > > > On Fri, Oct 11, 2024 at 10:35:18AM GMT, Shiraz Hashim wrote: > > > > On Thu, Oct 10, 2024 at 08:57:

Re: [PATCH 6/6] remoteproc: qcom: Enable map/unmap and SHM bridge support

2024-10-14 Thread Shiraz Hashim
On Fri, Oct 11, 2024 at 09:09:08AM +0200, neil.armstr...@linaro.org wrote: > On 11/10/2024 07:05, Shiraz Hashim wrote: > > On Thu, Oct 10, 2024 at 08:57:56AM +0200, neil.armstr...@linaro.org wrote: > > > On 08/10/2024 08:21, Mukesh Ojha wrote: > > > > On Mon, Oct 07, 2024 at 08:22:39PM +0530, Mukes

Re: [PATCH 08/13] media: i2c: imx214: Add vblank and hblank controls

2024-10-14 Thread Dave Stevenson
Hi André On Sat, 12 Oct 2024 at 22:46, André Apitzsch wrote: > > Hi Dave, > > Am Montag, dem 07.10.2024 um 18:29 +0100 schrieb Dave Stevenson: > > Hi Andre > > > > On Sun, 6 Oct 2024 at 22:41, André wrote: > > > > > > Hi Dave, > > > > > > Am Freitag, dem 13.09.2024 um 18:40 +0100 schrieb Dave St

[PATCH 1/4] LoongArch: Don't crash in stack_top() for tasks without vDSO

2024-10-14 Thread Thomas Weißschuh
Not all tasks have a vDSO mapped, for example kthreads never do. If such a task ever ends up calling stack_top(), it will derefence the NULL vdso pointer and crash. This can for example happen when using kunit: [<90203874>] stack_top+0x58/0xa8 [<902956cc>] arch_pic

[PATCH 0/4] kunit: Add support for LoongArch

2024-10-14 Thread Thomas Weißschuh
| 16 +--- tools/testing/kunit/kunit_kernel.py | 4 +++- tools/testing/kunit/qemu_configs/loongarch.py | 19 +++ 3 files changed, 31 insertions(+), 8 deletions(-) --- base-commit: 6485cf5ea253d40d507cd71253c9568c5470cd27 change-id: 20241014-kunit-loongar

[PATCH 3/4] kunit: tool: Allow overriding the shutdown mode from qemu config

2024-10-14 Thread Thomas Weißschuh
Not all platforms support machine reboot. If it a proper reboot is not supported the machine will hang. Allow the QEMU configuration to override the necessary shutdown mode for the specific system under test. Signed-off-by: Thomas Weißschuh --- tools/testing/kunit/kunit_kernel.py | 4 +++- 1 fil

[PATCH 4/4] kunit: qemu_configs: loongarch: Enable shutdown

2024-10-14 Thread Thomas Weißschuh
QEMU for LoongArch does not yet support shutdown/restart through ACPI. Use the pvpanic driver to enable shutdowns. This requires 9.1.0 for shutdown support in pvpanic, but that is the requirement of kunit on LoongArch anyways. Signed-off-by: Thomas Weißschuh --- tools/testing/kunit/qemu_configs/

[PATCH 2/4] kunit: qemu_configs: add LoongArch config

2024-10-14 Thread Thomas Weißschuh
Add a basic config to run kunit tests on LoongArch. This requires QEMU 9.1.0 or later for the necessary direct kernel boot support. Signed-off-by: Thomas Weißschuh --- tools/testing/kunit/qemu_configs/loongarch.py | 16 1 file changed, 16 insertions(+) diff --git a/tools/testin

Re: [PATCH V13 11/14] perf tools: Add missing_features for aux_start_paused, aux_pause, aux_resume

2024-10-14 Thread Leo Yan
On 10/14/24 11:51, Adrian Hunter wrote: Display "feature is not supported" error message if aux_start_paused, aux_pause or aux_resume result in a perf_event_open() error. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Reviewed-by: Andi Kleen Reviewed-by: Leo Yan --- Changes in

[PATCH V13 14/14] perf intel-pt: Add a test for pause / resume

2024-10-14 Thread Adrian Hunter
Add a simple sub-test to the "Miscellaneous Intel PT testing" test to check pause / resume. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Reviewed-by: Andi Kleen --- tools/perf/tests/shell/test_intel_pt.sh | 28 + 1 file changed, 28 insertions(+) diff --git a/tools

[PATCH V13 13/14] perf intel-pt: Add documentation for pause / resume

2024-10-14 Thread Adrian Hunter
Document the use of aux-action config term and provide a simple example. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Reviewed-by: Andi Kleen --- Changes in V5: Added more examples tools/perf/Documentation/perf-intel-pt.txt | 108 + 1 file changed, 108 inse

[PATCH V13 12/14] perf intel-pt: Improve man page format

2024-10-14 Thread Adrian Hunter
Improve format of config terms and section references. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Reviewed-by: Andi Kleen --- tools/perf/Documentation/perf-intel-pt.txt | 486 +++-- 1 file changed, 267 insertions(+), 219 deletions(-) diff --git a/tools/perf/Documentatio

[PATCH V13 11/14] perf tools: Add missing_features for aux_start_paused, aux_pause, aux_resume

2024-10-14 Thread Adrian Hunter
Display "feature is not supported" error message if aux_start_paused, aux_pause or aux_resume result in a perf_event_open() error. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Reviewed-by: Andi Kleen --- Changes in V13: Add error message also in EOPNOTSUPP case (Leo) tools/per

[PATCH V13 10/14] perf tools: Parse aux-action

2024-10-14 Thread Adrian Hunter
Add parsing for aux-action to accept "pause", "resume" or "start-paused" values. "start-paused" is valid only for AUX area events. "pause" and "resume" are valid only for events grouped with an AUX area event as the group leader. However, like with aux-output, the events will be automatically gr

[PATCH V13 09/14] perf tools: Add aux-action config term

2024-10-14 Thread Adrian Hunter
Add a new common config term "aux-action" to use for configuring AUX area trace pause / resume. The value is a string that will be parsed in a subsequent patch. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Reviewed-by: Andi Kleen --- Changes in V7: Add aux-action to perf_pmu__fo

[PATCH V13 08/14] perf tools: Add aux_start_paused, aux_pause and aux_resume

2024-10-14 Thread Adrian Hunter
Add struct perf_event_attr members to support pause and resume of AUX area tracing. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Reviewed-by: Andi Kleen --- tools/include/uapi/linux/perf_event.h | 11 ++- tools/perf/util/perf_event_attr_fprintf.c | 3 +++ 2 files changed, 13

  1   2   >