[PATCH] selftests: bpf: Replace sizeof(arr)/sizeof(arr[0]) with ARRAY_SIZE

2024-09-03 Thread yangfeng
From: Feng Yang The ARRAY_SIZE macro is more compact and more formal in linux source. Signed-off-by: Feng Yang --- tools/testing/selftests/bpf/prog_tests/fexit_stress.c| 3 ++- tools/testing/selftests/bpf/prog_tests/log_buf.c | 5 +++-- .../testing/selftests/bpf/prog_tests/

Re: [PATCH vhost v2 00/10] vdpa/mlx5: Parallelize device suspend/resume

2024-09-03 Thread Lei Yang
On Mon, Sep 2, 2024 at 7:05 PM Dragos Tatulea wrote: > > Hi Lei, > > On 02.09.24 12:03, Lei Yang wrote: > > Hi Dragos > > > > QE tested this series with mellanox nic, it failed with [1] when > > booting guest, and host dmesg also will print messages [2]. This bug > > can be reproduced boot guest w

[PATCH] selftests: net: convert comma to semicolon

2024-09-03 Thread Chen Ni
Replace a comma between expression statements by a semicolon. Signed-off-by: Chen Ni --- tools/testing/selftests/net/psock_fanout.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/net/psock_fanout.c b/tools/testing/selftests/net/psock_fanout.c i

Re: [PATCH vhost v2 00/10] vdpa/mlx5: Parallelize device suspend/resume

2024-09-03 Thread Dragos Tatulea
On 03.09.24 09:40, Lei Yang wrote: > On Mon, Sep 2, 2024 at 7:05 PM Dragos Tatulea wrote: >> >> Hi Lei, >> >> On 02.09.24 12:03, Lei Yang wrote: >>> Hi Dragos >>> >>> QE tested this series with mellanox nic, it failed with [1] when >>> booting guest, and host dmesg also will print messages [2].

Re: [RFC 05/31] x86/compiler: Tweak __UNIQUE_ID naming

2024-09-03 Thread Peter Zijlstra
On Mon, Sep 02, 2024 at 08:59:48PM -0700, Josh Poimboeuf wrote: > Add an underscore between the "name" and the counter so tooling can > distinguish between the non-unique and unique portions of the symbol > name. > > This will come in handy for "objtool klp diff". > > Signed-off-by: Josh Poimboeu

Re: [RFC 07/31] kbuild: Remove "kmod" prefix from __KBUILD_MODNAME

2024-09-03 Thread Peter Zijlstra
On Mon, Sep 02, 2024 at 08:59:50PM -0700, Josh Poimboeuf wrote: > Remove the arbitrary "kmod" prefix from __KBUILD_MODNAME and add it back > manually in the __initcall_id() macro. > > This makes it more consistent, now __KBUILD_MODNAME is just the > non-stringified version of KBUILD_MODNAME. It w

Re: [PATCH vhost v2 00/10] vdpa/mlx5: Parallelize device suspend/resume

2024-09-03 Thread Eugenio Perez Martin
On Tue, Sep 3, 2024 at 9:48 AM Dragos Tatulea wrote: > > > > On 03.09.24 09:40, Lei Yang wrote: > > On Mon, Sep 2, 2024 at 7:05 PM Dragos Tatulea wrote: > >> > >> Hi Lei, > >> > >> On 02.09.24 12:03, Lei Yang wrote: > >>> Hi Dragos > >>> > >>> QE tested this series with mellanox nic, it failed wi

Re: [PATCH vhost v2 00/10] vdpa/mlx5: Parallelize device suspend/resume

2024-09-03 Thread Dragos Tatulea
On 03.09.24 10:10, Eugenio Perez Martin wrote: > On Tue, Sep 3, 2024 at 9:48 AM Dragos Tatulea wrote: >> >> >> >> On 03.09.24 09:40, Lei Yang wrote: >>> On Mon, Sep 2, 2024 at 7:05 PM Dragos Tatulea wrote: Hi Lei, On 02.09.24 12:03, Lei Yang wrote: > Hi Dragos > >>>

Re: [RFC 20/31] objtool: Add UD1 detection

2024-09-03 Thread Peter Zijlstra
On Mon, Sep 02, 2024 at 09:00:03PM -0700, Josh Poimboeuf wrote: > A UD1 isn't a BUG and shouldn't be treated like one. > > Signed-off-by: Josh Poimboeuf > --- > tools/objtool/arch/x86/decode.c | 10 +- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/tools/objtool/arch/

Re: [RFC 27/31] objtool: Fix weak symbol detection

2024-09-03 Thread Peter Zijlstra
On Mon, Sep 02, 2024 at 09:00:10PM -0700, Josh Poimboeuf wrote: > @@ -433,9 +433,13 @@ static void elf_add_symbol(struct elf *elf, struct > symbol *sym) > /* >* Don't store empty STT_NOTYPE symbols in the rbtree. They >* can exist within a function, confusing the sorting. >

Re: [RFC 28/31] x86/alternative: Create symbols for special section entries

2024-09-03 Thread Peter Zijlstra
On Mon, Sep 02, 2024 at 09:00:11PM -0700, Josh Poimboeuf wrote: > Create a symbol for each special section entry. This helps objtool > extract needed entries. A little more explanation would be nice,..

Re: [PATCH v4 1/2] virtiofs: use pages instead of pointer for kernel direct IO

2024-09-03 Thread Jingbo Xu
On 8/31/24 5:37 PM, Hou Tao wrote: > From: Hou Tao > > When trying to insert a 10MB kernel module kept in a virtio-fs with cache > disabled, the following warning was reported: > > [ cut here ] > WARNING: CPU: 1 PID: 404 at mm/page_alloc.c:4551 .. > Modules l

Re: [PATCH v4 2/2] virtiofs: use GFP_NOFS when enqueuing request through kworker

2024-09-03 Thread Jingbo Xu
On 8/31/24 5:37 PM, Hou Tao wrote: > From: Hou Tao > > When invoking virtio_fs_enqueue_req() through kworker, both the > allocation of the sg array and the bounce buffer still use GFP_ATOMIC. > Considering the size of the sg array may be greater than PAGE_SIZE, use > GFP_NOFS instead of GFP_AT

[PATCH] selftests/net: do_setcpu function not need to have a return value

2024-09-03 Thread Liu Jing
in the do_setcpu, this function does not need to have a return value, which is meaningless Signed-off-by: Liu Jing --- tools/testing/selftests/net/msg_zerocopy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/testing/selftests/net/msg_zerocopy.c b/tools/testing/self

Re: [PATCH v3 3/3] kselftest: Provide __cpuid_count() stub on non-x86 archs

2024-09-03 Thread Ilpo Järvinen
On Thu, 29 Aug 2024, Ilpo Järvinen wrote: > Building resctrl selftest fails on ARM because it uses __cpuid_count() > that fails the build with error: > > CC resctrl_tests > In file included from resctrl.h:24, > from cat_test.c:11: > In function 'arch_supports_noncont_cat'

Re: [PATCH v2] remoteproc: k3-r5: Delay notification of wakeup event

2024-09-03 Thread Beleswar Prasad Padhi
Hi Mathieu, On 20-08-2024 16:20, Beleswar Padhi wrote: From: Udit Kumar Few times, core1 was scheduled to boot first before core0, which leads to error: 'k3_r5_rproc_start: can not start core 1 before core 0'. This was happening due to some scheduling between prepare and start callback. The

Re: [PATCH] module: abort module loading when sysfs setup suffer errors

2024-09-03 Thread Petr Pavlu
On 8/30/24 07:43, Chunhui Li wrote: > When insmod a kernel module, if fails in add_notes_attrs or > add_sysfs_attrs such as memory allocation fail, mod_sysfs_setup > will still return success, but we can't access user interface > on android device. > > Patch for make mod_sysfs_setup can check the

[PATCH v2] selftests/futex: Create test for robust list

2024-09-03 Thread André Almeida
Create a test for the robust list mechanism. Signed-off-by: André Almeida --- Changes from v1: - Change futex type from int to _Atomic(unsigned int) - Use old futex(FUTEX_WAIT) instead of the new sys_futex_wait() --- .../selftests/futex/functional/.gitignore | 1 + .../selftests/futex/func

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

2024-09-03 Thread Paolo Abeni
On 8/23/24 12:09, David Woodhouse wrote: diff --git a/drivers/ptp/Kconfig b/drivers/ptp/Kconfig index 604541dcb320..e98c9767e0ef 100644 --- a/drivers/ptp/Kconfig +++ b/drivers/ptp/Kconfig @@ -131,6 +131,19 @@ config PTP_1588_CLOCK_KVM To compile this driver as a module, choose M here: t

Re: [PATCH v2] modpost: compile constant module information only once

2024-09-03 Thread Masahiro Yamada
On Mon, Sep 2, 2024 at 2:56 AM Thomas Weißschuh wrote: > > Various information about modules is compiled into the info sections. > For that a dedicated .mod.c file is generated by modpost for each module > and then linked into the module. > However most of the information in the .mod.c is the same

Re: [PATCH v2] remoteproc: k3-r5: Delay notification of wakeup event

2024-09-03 Thread Mathieu Poirier
On Tue, 3 Sept 2024 at 04:15, Beleswar Prasad Padhi wrote: > > Hi Mathieu, > > On 20-08-2024 16:20, Beleswar Padhi wrote: > > From: Udit Kumar > > > > Few times, core1 was scheduled to boot first before core0, which leads > > to error: > > > > 'k3_r5_rproc_start: can not start core 1 before core

[PATCH v4 0/4] selftests: Fix cpuid / vendor checking build issues

2024-09-03 Thread Ilpo Järvinen
This series first generalizes resctrl selftest non-contiguous CAT check to not assume non-AMD vendor implies Intel. Second, it improves selftests such that the use of __cpuid_count() does not lead into a build failure (happens at least on ARM). While ARM does not currently support resctrl features

[PATCH v4 1/4] selftests/resctrl: Generalize non-contiguous CAT check

2024-09-03 Thread Ilpo Järvinen
arch_supports_noncont_cat() checks if vendor is ARCH_AMD and if that is not true, ARCH_INTEL is assumed which might not be true either because get_vendor() can also return zero if neither AMD nor Intel is detected. Generalize the vendor check using switch/case logic and return false for unknown ve

[PATCH v4 2/4] selftests/resctrl: Always initialize ecx to avoid build warnings

2024-09-03 Thread Ilpo Järvinen
To avoid warnings when __cpuid_count() is an empty stub, always initialize ecx because it is used in the return statement. Signed-off-by: Ilpo Järvinen Reviewed-by: Muhammad Usama Anjum --- tools/testing/selftests/resctrl/cat_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[PATCH v4 3/4] selftests/x86: don't clobber CFLAGS

2024-09-03 Thread Ilpo Järvinen
The x86 selftests makefile clobbers CFLAGS preventing lib.mk from making the necessary adjustments into CFLAGS. This would lead to a build failure after upcoming change which wants to add -DHAVE_CPUID= into CFLAGS. Reorder CFLAGS initialization in x86 selftest. Place the constant part of CFLAGS in

[PATCH v4 4/4] kselftest: Provide __cpuid_count() stub on non-x86 archs

2024-09-03 Thread Ilpo Järvinen
Building resctrl selftest fails on ARM because it uses __cpuid_count() that fails the build with error: CC resctrl_tests In file included from resctrl.h:24, from cat_test.c:11: In function 'arch_supports_noncont_cat', inlined from 'noncont_cat_run_test' at cat_test.c:3

Re: [PATCH v2 08/19] gendwarfksyms: Expand subroutine_type

2024-09-03 Thread Petr Pavlu
On 8/15/24 19:39, Sami Tolvanen wrote: > Add support for expanding DW_TAG_subroutine_type and the parameters > in DW_TAG_formal_parameter. Use this to also expand subprograms. > > Example output with --debug: > > subprogram( > formal_parameter base_type usize byte_size(8), > formal_para

Re: [PATCH v2 11/19] gendwarfksyms: Limit structure expansion

2024-09-03 Thread Petr Pavlu
On 8/15/24 19:39, Sami Tolvanen wrote: > Expand each structure type only once per exported symbol. This > is necessary to support self-referential structures, which would > otherwise result in infinite recursion, but is still sufficient for > catching ABI changes. > > For pointers to structure typ

[PATCH v4 15/15] fs/fuse/virtio_fs: allow idmapped mounts

2024-09-03 Thread Alexander Mikhalitsyn
Allow idmapped mounts for virtiofs. It's absolutely safe as for virtiofs we have the same feature negotiation mechanism as for classical fuse filesystems. This does not affect any existing setups anyhow. virtiofsd support: https://gitlab.com/virtio-fs/virtiofsd/-/merge_requests/245 Cc: Christian

Re: [PATCH 5/5] KVM: VMX: Always honor guest PAT on CPUs that support self-snoop

2024-09-03 Thread Sean Christopherson
On Mon, Sep 02, 2024, Vitaly Kuznetsov wrote: > FWIW, I use QEMU-9.0 from the same C10S (qemu-kvm-9.0.0-7.el10.x86_64) > but I don't think it matters in this case. My CPU is "Intel(R) Xeon(R) > Silver 4410Y". Has this been reproduced on any other hardware besides SPR? I.e. did we stumble on anoth

Re: [PATCH 2/2] vdpa: Add support to update speed/duplex in vDPA/mlx5_vnet

2024-09-03 Thread Carlos Bilbao
Hello, On 9/1/24 11:27 PM, Jason Wang wrote: > On Fri, Aug 30, 2024 at 9:15 PM Carlos Bilbao > wrote: >> Hello, >> >> On 8/29/24 9:31 PM, Jason Wang wrote: >>> On Fri, Aug 30, 2024 at 5:08 AM Dragos Tatulea wrote: (resending as I accidentally replied only to Carlos) On 29.08.24 1

Re: [PATCH] x86/sgx: Fix deadloop in __sgx_alloc_epc_page()

2024-09-03 Thread Jarkko Sakkinen
On Fri Aug 30, 2024 at 9:14 AM EEST, Aaron Lu wrote: > On Thu, Aug 29, 2024 at 07:44:13PM +0300, Jarkko Sakkinen wrote: > > On Thu Aug 29, 2024 at 5:38 AM EEST, Aaron Lu wrote: > > > When current node doesn't have a EPC section configured by firmware and > > > all other EPC sections memory are used

Re: [PATCH] selftests: net: convert comma to semicolon

2024-09-03 Thread Simon Horman
On Tue, Sep 03, 2024 at 03:45:19PM +0800, Chen Ni wrote: > Replace a comma between expression statements by a semicolon. > > Signed-off-by: Chen Ni As mentioned at [1] I think it would be nice if the patch description was a bit more descriptive. [1] https://lore.kernel.org/all/20240903152125.ga

Re: [PATCH 5/5] KVM: VMX: Always honor guest PAT on CPUs that support self-snoop

2024-09-03 Thread Vitaly Kuznetsov
Sean Christopherson writes: > On Mon, Sep 02, 2024, Vitaly Kuznetsov wrote: >> FWIW, I use QEMU-9.0 from the same C10S (qemu-kvm-9.0.0-7.el10.x86_64) >> but I don't think it matters in this case. My CPU is "Intel(R) Xeon(R) >> Silver 4410Y". > > Has this been reproduced on any other hardware besi

Re: [PATCH net-next] virtio_net: Fix napi_skb_cache_put warning

2024-09-03 Thread Leonardo Bras
On Mon, Jul 15, 2024 at 04:25:06AM -0700, Breno Leitao wrote: > Hello Michael, > > On Sun, Jul 14, 2024 at 03:38:42AM -0400, Michael S. Tsirkin wrote: > > On Fri, Jul 12, 2024 at 04:53:25AM -0700, Breno Leitao wrote: > > > After the commit bdacf3e34945 ("net: Use nested-BH locking for > > > napi_a

[PATCH rcu 0/11] Add light-weight readers for SRCU

2024-09-03 Thread Paul E. McKenney
Hello! This series provides light-weight readers for SRCU. This lightness is selected by the caller by using the new srcu_read_lock_lite() and srcu_read_unlock_lite() flavors instead of the usual srcu_read_lock() and srcu_read_unlock() flavors. Although this passes significant rcutorture testing

[PATCH rcu 01/11] srcu: Rename srcu_might_be_idle() to srcu_should_expedite()

2024-09-03 Thread Paul E. McKenney
SRCU auto-expedites grace periods that follow a sufficiently long idle period, and the srcu_might_be_idle() function is used to make this decision. However, the upcoming light-weight SRCU readers will not do auto-expediting because doing so would cause the grace-period machinery to invoke synchron

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

2024-09-03 Thread Paul E. McKenney
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 for the addition of light-weight (as in memory-barrier-free) readers. OK, OK, there is also a drive-by white-space fixeup! S

[PATCH rcu 02/11] srcu: Introduce srcu_gp_is_expedited() helper function

2024-09-03 Thread Paul E. McKenney
Even though the open-coded expressions usually fit on one line, this commit replaces them with a call to a new srcu_gp_is_expedited() helper function in order to improve readability. Signed-off-by: Paul E. McKenney Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Peter Zijlstra Cc: Kent Overstre

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

2024-09-03 Thread Paul E. McKenney
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 srcu_struct structure. This commit upgrades the checking in preparation for the addition of light-weight (as in memory-barrie

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

2024-09-03 Thread Paul E. McKenney
This commit changes a few "cpuc" variables to "sdp" to align wiht usage elsewhere. Signed-off-by: Paul E. McKenney Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Peter Zijlstra Cc: Kent Overstreet Cc: --- kernel/rcu/srcutree.c | 20 ++-- 1 file changed, 10 insertions(+), 10

[PATCH rcu 11/11] refscale: Add srcu_read_lock_lite() support using "srcu-lite"

2024-09-03 Thread Paul E. McKenney
This commit creates a new srcu-lite option for the refscale.scale_type module parameter that selects srcu_read_lock_lite() and srcu_read_unlock_lite(). Signed-off-by: Paul E. McKenney Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Peter Zijlstra Cc: Kent Overstreet Cc: --- kernel/rcu/refsca

[PATCH rcu 07/11] srcu: Add srcu_read_lock_lite() and srcu_read_unlock_lite()

2024-09-03 Thread Paul E. McKenney
This patch adds srcu_read_lock_lite() and srcu_read_unlock_lite(), which dispense with the read-side smp_mb() but also are restricted to code regions that RCU is watching. If a given srcu_struct structure uses srcu_read_lock_lite() and srcu_read_unlock_lite(), it is not permitted to use any other

[PATCH rcu 06/11] srcu: Convert srcu_data ->srcu_reader_flavor to bit field

2024-09-03 Thread Paul E. McKenney
This commit adds SRCU_READ_FLAVOR_NORMAL and SRCU_READ_FLAVOR_NMI bit definitions and uses them in preparation for adding a third SRCU reader flavor. While in the area, improve a few comments. Signed-off-by: Paul E. McKenney Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Peter Zijlstra Cc: Ke

[PATCH rcu 08/11] rcutorture: Expand RCUTORTURE_RDR_MASK_[12] to eight bits

2024-09-03 Thread Paul E. McKenney
This commit prepares for testing of multiple SRCU reader flavors by expanding RCUTORTURE_RDR_MASK_1 and RCUTORTURE_RDR_MASK_2 from a single bit to eight bits, allowing them to accommodate the return values from multiple calls to srcu_read_lock*(). This will in turn permit better testing coverage f

[PATCH rcu 10/11] rcutorture: Add srcu_read_lock_lite() support to rcutorture.reader_flavor

2024-09-03 Thread Paul E. McKenney
This commit causes bit 0x4 of rcutorture.reader_flavor to select the new srcu_read_lock_lite() and srcu_read_unlock_lite() functions. Signed-off-by: Paul E. McKenney Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Peter Zijlstra Cc: Kent Overstreet Cc: --- Documentation/admin-guide/kernel-pa

[PATCH rcu 09/11] rcutorture: Add reader_flavor parameter for SRCU readers

2024-09-03 Thread Paul E. McKenney
This commit adds an rcutorture.reader_flavor parameter whose bits correspond to reader flavors. For example, SRCU's readers are 0x1 for normal and 0x2 for NMI-safe. Signed-off-by: Paul E. McKenney Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Peter Zijlstra Cc: Kent Overstreet Cc: --- ...

Re: [PATCH] selftests/net: do_setcpu function not need to have a return value

2024-09-03 Thread Simon Horman
On Tue, Sep 03, 2024 at 05:51:11PM +0800, Liu Jing wrote: > in the do_setcpu, this function does not need to have a return value, > which is meaningless > > Signed-off-by: Liu Jing Thanks, I also see that the caller does not check the return value. Reviewed-by: Simon Horman

[PATCH v2 0/2] Properly initialize speed/duplex and remove vDPA config updates

2024-09-03 Thread Carlos Bilbao
From: Carlos Bilbao Initialize speed and duplex for virtio_net_config to UNKNOWN (mlx5_vdpa vDPA devices currently do not support VIRTIO_NET_F_SPEED_DUPLEX). Remove ioctl VHOST_VDPA_SET_CONFIG and its related logic as it is not supported; see: https://docs.oasis-open.org/virtio/virtio/v1.3/virtio

[PATCH v2 1/2] vdpa/mlx5: Set speed and duplex of vDPA devices to UNKNOWN

2024-09-03 Thread Carlos Bilbao
From: Carlos Bilbao Initialize the speed and duplex fields in virtio_net_config to UNKNOWN. This is needed because mlx5_vdpa vDPA devicess currently do not support the VIRTIO_NET_F_SPEED_DUPLEX feature which reports speed and duplex. Add needed helper cpu_to_mlx5vdpa32() to convert endianness of

[PATCH v2 2/2] vdpa: Remove ioctl VHOST_VDPA_SET_CONFIG per spec compliance

2024-09-03 Thread Carlos Bilbao
From: Carlos Bilbao Remove invalid ioctl VHOST_VDPA_SET_CONFIG and all its implementations with vdpa_config_ops->set_config(). This is needed per virtio spec requirements; virtio-spec v3.1 Sec 5.1.4 states that "All of the device configuration fields are read-only for the driver." Signed-off-by:

Re: [RFC 00/31] objtool, livepatch: Livepatch module generation

2024-09-03 Thread Song Liu
Hi Josh, Thanks for the patchset! We really need this work so that we can undo our hack for LTO enabled kernels. On Mon, Sep 2, 2024 at 9:00 PM Josh Poimboeuf wrote: > > Hi, > > Here's a new way to build livepatch modules called klp-build. > > I started working on it when I realized that objtool

Re: [PATCH v2 1/2] vdpa/mlx5: Set speed and duplex of vDPA devices to UNKNOWN

2024-09-03 Thread Nelson, Shannon
On 9/3/2024 10:15 AM, Carlos Bilbao wrote: From: Carlos Bilbao Initialize the speed and duplex fields in virtio_net_config to UNKNOWN. This is needed because mlx5_vdpa vDPA devicess currently do not support the VIRTIO_NET_F_SPEED_DUPLEX feature which reports speed and duplex. Add needed helper

Re: [PATCH] selftests: filesystems: fix warn_unused_result build warnings

2024-09-03 Thread Shuah Khan
On 8/16/24 07:11, Shuah Khan wrote: On 8/10/24 07:53, Abhinav Jain wrote: Add return value checks for read & write calls in test_listmount_ns function. This patch resolves below compilation warnings: ``` statmount_test_ns.c: In function ‘test_listmount_ns’: statmount_test_ns.c:322:17: warning:

Re: [PATCH v4 3/4] selftests/x86: don't clobber CFLAGS

2024-09-03 Thread Reinette Chatre
Hi Ilpo, On 9/3/24 7:45 AM, Ilpo Järvinen wrote: The x86 selftests makefile clobbers CFLAGS preventing lib.mk from making the necessary adjustments into CFLAGS. This would lead to a build failure after upcoming change which wants to add -DHAVE_CPUID= into CFLAGS. Reorder CFLAGS initialization i

Re: [PATCH] nvdimm: Use of_property_present() and of_property_read_bool()

2024-09-03 Thread Rob Herring
On Wed, Jul 31, 2024 at 2:14 PM Rob Herring (Arm) wrote: > > Use of_property_present() and of_property_read_bool() to test > property presence and read boolean properties rather than > of_(find|get)_property(). This is part of a larger effort to remove > callers of of_find_property() and similar f

Re: [PATCH rcu 07/11] srcu: Add srcu_read_lock_lite() and srcu_read_unlock_lite()

2024-09-03 Thread Alexei Starovoitov
On Tue, Sep 3, 2024 at 9:33 AM Paul E. McKenney wrote: > > diff --git a/include/linux/srcu.h b/include/linux/srcu.h > index 84daaa33ea0ab..4ba96e2cfa405 100644 > --- a/include/linux/srcu.h > +++ b/include/linux/srcu.h ... > +static inline int srcu_read_lock_lite(struct srcu_struct *ssp) > __acqu

[PATCH RESEND] selftests/futex: Order calls in futex_requeue

2024-09-03 Thread Edward Liaw
Similar to fbf4dec70277 ("selftests/futex: Order calls to futex_lock_pi"), which fixed a flake in futex_lock_pi due to racing between the parent and child threads. The same issue can occur in the futex_requeue test, because it expects waiterfn to make progress to futex_wait before the parent start

Re: [PATCH] selftests/vDSO: support DT_GNU_HASH

2024-09-03 Thread Shuah Khan
On 8/27/24 07:37, Fangrui Song wrote: On Tue, Aug 27, 2024 at 10:12 PM Shuah Khan wrote: On 8/26/24 00:07, Xi Ruoyao wrote: On Wed, 2024-08-14 at 20:26 -0700, Fangrui Song wrote: glibc added support for DT_GNU_HASH in 2006 and DT_HASH has been obsoleted for more than one decade in many Linux

[PATCH v2 0/1] Add KUnit tests for kfifo

2024-09-03 Thread Diego Vieira
Hi all, This is part of a hackathon organized by LKCAMP [1], focused on writing tests using KUnit. We reached out a while ago asking for advice on what would be a useful contribution [2] and ended up choosing data structures that did not yet have tests. This patch series depends on the patch that

[PATCH v2 1/1] lib/tests/kfifo_kunit.c: add tests for the kfifo structure

2024-09-03 Thread Diego Vieira
Add KUnit tests for the kfifo data structure. They test the vast majority of macros defined in the kfifo header (include/linux/kfifo.h). These are inspired by the existing tests for the doubly linked list in lib/tests/list-test.c (previously at lib/list-test.c) [1]. Note that this patch depends o

Re: [PATCH rcu 0/11] Add light-weight readers for SRCU

2024-09-03 Thread Kent Overstreet
On Tue, Sep 03, 2024 at 09:32:51AM GMT, Paul E. McKenney wrote: > Hello! > > This series provides light-weight readers for SRCU. This lightness > is selected by the caller by using the new srcu_read_lock_lite() and > srcu_read_unlock_lite() flavors instead of the usual srcu_read_lock() and > srcu

[PATCH v2 0/1] Add KUnit tests for llist

2024-09-03 Thread Artur Alves
Hi all, This is part of a hackathon organized by LKCAMP[1], focused on writing tests using KUnit. We reached out a while ago asking for advice on what would be a useful contribution[2] and ended up choosing data structures that did not yet have tests. This patch adds tests for the llist data str

[PATCH v2 1/1] lib/llist_kunit.c: add KUnit tests for llist

2024-09-03 Thread Artur Alves
Add KUnit tests for the llist data structure. They test the vast majority of methods and macros defined in include/linux/llist.h. These are inspired by the existing tests for the 'list' doubly linked in lib/list-test.c [1]. Each test case (llist_test_x) tests the behaviour of the llist function/ma

Re: [PATCH v6 1/2] selftests: Rename sigaltstack to generic signal

2024-09-03 Thread Shuah Khan
On 8/30/24 10:29, Dev Jain wrote: On 8/27/24 17:16, Dev Jain wrote: On 8/27/24 17:14, Shuah Khan wrote: On 8/22/24 06:14, Dev Jain wrote: Rename sigaltstack to generic signal directory, to allow adding more signal tests in the future. Sorry - I think I mentioned I don't like this test rena

Re: [PATCH v2] selftests: splice: Add usage() to splice_read.c

2024-09-03 Thread Shuah Khan
On 8/30/24 23:14, Rong Tao wrote: From: Rong Tao Give the programmer more help information to inform the program on how to use it. Signed-off-by: Rong Tao --- tools/testing/selftests/splice/splice_read.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/test

Re: [PATCH rcu 0/11] Add light-weight readers for SRCU

2024-09-03 Thread Andrii Nakryiko
On Tue, Sep 3, 2024 at 9:32 AM Paul E. McKenney wrote: > > Hello! > > This series provides light-weight readers for SRCU. This lightness > is selected by the caller by using the new srcu_read_lock_lite() and > srcu_read_unlock_lite() flavors instead of the usual srcu_read_lock() and > srcu_read_u

Re: [PATCH rcu 07/11] srcu: Add srcu_read_lock_lite() and srcu_read_unlock_lite()

2024-09-03 Thread Paul E. McKenney
On Tue, Sep 03, 2024 at 12:45:23PM -0700, Alexei Starovoitov wrote: > On Tue, Sep 3, 2024 at 9:33 AM Paul E. McKenney wrote: > > > > diff --git a/include/linux/srcu.h b/include/linux/srcu.h > > index 84daaa33ea0ab..4ba96e2cfa405 100644 > > --- a/include/linux/srcu.h > > +++ b/include/linux/srcu.h

Re: [PATCH rcu 0/11] Add light-weight readers for SRCU

2024-09-03 Thread Paul E. McKenney
On Tue, Sep 03, 2024 at 05:38:05PM -0400, Kent Overstreet wrote: > On Tue, Sep 03, 2024 at 09:32:51AM GMT, Paul E. McKenney wrote: > > Hello! > > > > This series provides light-weight readers for SRCU. This lightness > > is selected by the caller by using the new srcu_read_lock_lite() and > > src

Re: [PATCH rcu 0/11] Add light-weight readers for SRCU

2024-09-03 Thread Paul E. McKenney
On Tue, Sep 03, 2024 at 03:08:21PM -0700, Andrii Nakryiko wrote: > On Tue, Sep 3, 2024 at 9:32 AM Paul E. McKenney wrote: > > > > Hello! > > > > This series provides light-weight readers for SRCU. This lightness > > is selected by the caller by using the new srcu_read_lock_lite() and > > srcu_rea

Re: [PATCH net-next 00/11] mptcp: MIB counters for MPJ TX + misc improvements

2024-09-03 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (main) by Jakub Kicinski : On Mon, 02 Sep 2024 12:45:51 +0200 you wrote: > Recently, a few issues have been discovered around the creation of > additional subflows. Without these counters, it was difficult to point > out the reason why some su

Re: [PATCH rcu 0/11] Add light-weight readers for SRCU

2024-09-03 Thread Kent Overstreet
On Tue, Sep 03, 2024 at 03:13:40PM GMT, Paul E. McKenney wrote: > On Tue, Sep 03, 2024 at 05:38:05PM -0400, Kent Overstreet wrote: > > On Tue, Sep 03, 2024 at 09:32:51AM GMT, Paul E. McKenney wrote: > > > Hello! > > > > > > This series provides light-weight readers for SRCU. This lightness > > >

Re: [PATCH v4 0/4] selftests: Fix cpuid / vendor checking build issues

2024-09-03 Thread Shuah Khan
On 9/3/24 08:45, Ilpo Järvinen wrote: This series first generalizes resctrl selftest non-contiguous CAT check to not assume non-AMD vendor implies Intel. Second, it improves selftests such that the use of __cpuid_count() does not lead into a build failure (happens at least on ARM). While ARM doe

Re: [PATCH net-next 0/3] selftests: mptcp: add time per subtests in TAP output

2024-09-03 Thread Jakub Kicinski
On Mon, 02 Sep 2024 13:13:03 +0200 Matthieu Baerts (NGI0) wrote: > Patches here add 'time=ms' in the diagnostic data of the TAP output, > e.g. > > ok 1 - pm_netlink: defaults addr list # time=9ms Looking closer, this: # ok 3 - mptcp[...] MPTCP # time=7184ms # ok 4 - mptcp[...] TCP # time=645

Re: [PATCH net-next 0/3] selftests: mptcp: add time per subtests in TAP output

2024-09-03 Thread Jakub Kicinski
On Tue, 3 Sep 2024 16:22:17 -0700 Jakub Kicinski wrote: > (None, '4', ' -', 'mptcp[...] MPTCP', ' # ', 'time=6173ms') > (None, '4', ' -', 'mptcp[...] TC', None, 'P # time=6173ms') Sorry I fumbled copy/pasting the results, ignore the exact time values in the last group, but the mis-parsing stands

Re: [PATCH net-next 2/3] sefltests: mptcp: connect: remote time in TAP output

2024-09-03 Thread Jakub Kicinski
On Mon, 02 Sep 2024 13:13:05 +0200 Matthieu Baerts (NGI0) wrote: > Subject: [PATCH net-next 2/3] sefltests: mptcp: connect: remote time in TAP > output nit: typo in the subject -- pw-bot: cr

[PATCH] mm/damon/tests/vaddr-kunit: don't use mas_lock for MM_MT_FLAGS-initialized maple tree

2024-09-03 Thread SeongJae Park
damon_test_three_regions_in_vmas() initializes a maple tree with MM_MT_FLAGS. The flags contains MT_FLAGS_LOCK_EXTERN, which means mt_lock of the maple tree will not be used. And therefore the maple tree initialization code skips initialization of the mt_lock. However, __link_vmas(), which adds

Re: [PATCH] mm/damon/tests/vaddr-kunit: don't use mas_lock for MM_MT_FLAGS-initialized maple tree

2024-09-03 Thread Liam R. Howlett
* SeongJae Park [240903 20:45]: > damon_test_three_regions_in_vmas() initializes a maple tree with > MM_MT_FLAGS. The flags contains MT_FLAGS_LOCK_EXTERN, which means > mt_lock of the maple tree will not be used. And therefore the maple > tree initialization code skips initialization of the mt_l

Re: [PATCH] mm/damon/tests/vaddr-kunit: don't use mas_lock for MM_MT_FLAGS-initialized maple tree

2024-09-03 Thread SeongJae Park
On Tue, 3 Sep 2024 20:48:53 -0400 "Liam R. Howlett" wrote: > * SeongJae Park [240903 20:45]: > > damon_test_three_regions_in_vmas() initializes a maple tree with > > MM_MT_FLAGS. The flags contains MT_FLAGS_LOCK_EXTERN, which means > > mt_lock of the maple tree will not be used. And therefore

Re: [PATCH] mm/damon/tests/vaddr-kunit: don't use mas_lock for MM_MT_FLAGS-initialized maple tree

2024-09-03 Thread SeongJae Park
On Tue, 3 Sep 2024 17:58:15 -0700 SeongJae Park wrote: > On Tue, 3 Sep 2024 20:48:53 -0400 "Liam R. Howlett" > wrote: > > > * SeongJae Park [240903 20:45]: > > > damon_test_three_regions_in_vmas() initializes a maple tree with > > > MM_MT_FLAGS. The flags contains MT_FLAGS_LOCK_EXTERN, whic

Re: [PATCH] mm/damon/tests/vaddr-kunit: don't use mas_lock for MM_MT_FLAGS-initialized maple tree

2024-09-03 Thread Guenter Roeck
On 9/3/24 17:58, SeongJae Park wrote: On Tue, 3 Sep 2024 20:48:53 -0400 "Liam R. Howlett" wrote: * SeongJae Park [240903 20:45]: damon_test_three_regions_in_vmas() initializes a maple tree with MM_MT_FLAGS. The flags contains MT_FLAGS_LOCK_EXTERN, which means mt_lock of the maple tree will

Re: [PATCH] x86/sgx: Fix deadloop in __sgx_alloc_epc_page()

2024-09-03 Thread Aaron Lu
On Tue, Sep 03, 2024 at 07:05:40PM +0300, Jarkko Sakkinen wrote: > On Fri Aug 30, 2024 at 9:14 AM EEST, Aaron Lu wrote: > > On Thu, Aug 29, 2024 at 07:44:13PM +0300, Jarkko Sakkinen wrote: > > > On Thu Aug 29, 2024 at 5:38 AM EEST, Aaron Lu wrote: > > > > When current node doesn't have a EPC sectio

[PATCH] selftest: drivers: Add support to check duplicate hwirq

2024-09-03 Thread Joseph Jang
Validate there are no duplicate hwirq from the irq debug file system /sys/kernel/debug/irq/irqs/* per chip name. One example log show 2 duplicated hwirq in the irq debug file system. $ sudo cat /sys/kernel/debug/irq/irqs/163 handler: handle_fasteoi_irq device: 0019:00:00.0 node: 1 af

[PATCH v2] selftests: net: convert comma to semicolon

2024-09-03 Thread Chen Ni
Replace comma between expressions with semicolons. Using a ',' in place of a ';' can have unintended side effects. Although that is not the case here, it is seems best to use ';' unless ',' is intended. Found by inspection. No functional change intended. Compile tested only. Signed-off-by: Chen

Re: [PATCH v4 2/2] livepatch: Add using attribute to klp_func for using function show

2024-09-03 Thread zhang warden
> On Aug 28, 2024, at 10:23, Wardenjohn wrote: > > One system may contains more than one livepatch module. We can see > which patch is enabled. If some patches applied to one system > modifing the same function, livepatch will use the function enabled > on top of the function stack. However, w

Re: [PATCH] mm/damon/tests/vaddr-kunit: don't use mas_lock for MM_MT_FLAGS-initialized maple tree

2024-09-03 Thread Guenter Roeck
On 9/3/24 18:18, SeongJae Park wrote: On Tue, 3 Sep 2024 17:58:15 -0700 SeongJae Park wrote: On Tue, 3 Sep 2024 20:48:53 -0400 "Liam R. Howlett" wrote: * SeongJae Park [240903 20:45]: damon_test_three_regions_in_vmas() initializes a maple tree with MM_MT_FLAGS. The flags contains MT_FL

Re: [RFC 05/31] x86/compiler: Tweak __UNIQUE_ID naming

2024-09-03 Thread Josh Poimboeuf
On Tue, Sep 03, 2024 at 09:56:34AM +0200, Peter Zijlstra wrote: > > -#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), > > __COUNTER__) > > +/* Format: __UNIQUE_ID__<__COUNTER__> */ > > +#define __UNIQUE_ID(name) \ > > + __PASTE(__UNIQUE_ID_,

Re: [RFC 07/31] kbuild: Remove "kmod" prefix from __KBUILD_MODNAME

2024-09-03 Thread Josh Poimboeuf
On Tue, Sep 03, 2024 at 09:58:13AM +0200, Peter Zijlstra wrote: > On Mon, Sep 02, 2024 at 08:59:50PM -0700, Josh Poimboeuf wrote: > > Remove the arbitrary "kmod" prefix from __KBUILD_MODNAME and add it back > > manually in the __initcall_id() macro. > > > > This makes it more consistent, now __KBU

Re: [RFC 20/31] objtool: Add UD1 detection

2024-09-03 Thread Josh Poimboeuf
On Tue, Sep 03, 2024 at 10:17:48AM +0200, Peter Zijlstra wrote: > On Mon, Sep 02, 2024 at 09:00:03PM -0700, Josh Poimboeuf wrote: > > A UD1 isn't a BUG and shouldn't be treated like one. > > > > Signed-off-by: Josh Poimboeuf > > --- > > tools/objtool/arch/x86/decode.c | 10 +- > > 1 file

Re: [PATCH 5/5] KVM: VMX: Always honor guest PAT on CPUs that support self-snoop

2024-09-03 Thread Yan Zhao
On Tue, Sep 03, 2024 at 06:20:27PM +0200, Vitaly Kuznetsov wrote: > Sean Christopherson writes: > > > On Mon, Sep 02, 2024, Vitaly Kuznetsov wrote: > >> FWIW, I use QEMU-9.0 from the same C10S (qemu-kvm-9.0.0-7.el10.x86_64) > >> but I don't think it matters in this case. My CPU is "Intel(R) Xeon(

Re: [PATCH] mm/damon/tests/vaddr-kunit: don't use mas_lock for MM_MT_FLAGS-initialized maple tree

2024-09-03 Thread Liam R. Howlett
* SeongJae Park [240903 21:18]: > On Tue, 3 Sep 2024 17:58:15 -0700 SeongJae Park wrote: > > > On Tue, 3 Sep 2024 20:48:53 -0400 "Liam R. Howlett" > > wrote: > > > > > * SeongJae Park [240903 20:45]: > > > > damon_test_three_regions_in_vmas() initializes a maple tree with > > > > MM_MT_FLAG

Re: [PATCH] mm/damon/tests/vaddr-kunit: don't use mas_lock for MM_MT_FLAGS-initialized maple tree

2024-09-03 Thread Guenter Roeck
On 9/3/24 19:31, Liam R. Howlett wrote: * SeongJae Park [240903 21:18]: On Tue, 3 Sep 2024 17:58:15 -0700 SeongJae Park wrote: On Tue, 3 Sep 2024 20:48:53 -0400 "Liam R. Howlett" wrote: * SeongJae Park [240903 20:45]: damon_test_three_regions_in_vmas() initializes a maple tree with MM

Re: [PATCH] mm/damon/tests/vaddr-kunit: don't use mas_lock for MM_MT_FLAGS-initialized maple tree

2024-09-03 Thread Liam R. Howlett
* Guenter Roeck [240903 21:54]: > On 9/3/24 18:18, SeongJae Park wrote: > > On Tue, 3 Sep 2024 17:58:15 -0700 SeongJae Park wrote: > > > > > On Tue, 3 Sep 2024 20:48:53 -0400 "Liam R. Howlett" > > > wrote: > > > > > > > * SeongJae Park [240903 20:45]: > > > > > damon_test_three_regions_in_v

Re: [PATCH] mm/damon/tests/vaddr-kunit: don't use mas_lock for MM_MT_FLAGS-initialized maple tree

2024-09-03 Thread Liam R. Howlett
* Guenter Roeck [240903 22:38]: > On 9/3/24 19:31, Liam R. Howlett wrote: > > * SeongJae Park [240903 21:18]: > > > On Tue, 3 Sep 2024 17:58:15 -0700 SeongJae Park wrote: > > > > > > > On Tue, 3 Sep 2024 20:48:53 -0400 "Liam R. Howlett" > > > > wrote: > > > > > > > > > * SeongJae Park [240

[PATCH] selftests: futex: Fix missing free in main

2024-09-03 Thread zhangjiao2
From: zhang jiao Free string allocated by asprintf(). Signed-off-by: zhang jiao --- tools/testing/selftests/futex/functional/futex_requeue_pi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/futex/functional/futex_requeue_pi.c b/tools/testing/selftests/futex/fu

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

2024-09-03 Thread Jason Wang
On Wed, Sep 4, 2024 at 10:51 AM Wenbo Li 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_headroom is used for unmapping. > > That will result in unsynchronize

Re: [PATCH] mm/damon/tests/vaddr-kunit: don't use mas_lock for MM_MT_FLAGS-initialized maple tree

2024-09-03 Thread Liam R. Howlett
* Guenter Roeck [240903 22:38]: > On 9/3/24 19:31, Liam R. Howlett wrote: > > * SeongJae Park [240903 21:18]: > > > On Tue, 3 Sep 2024 17:58:15 -0700 SeongJae Park wrote: > > > > > > > On Tue, 3 Sep 2024 20:48:53 -0400 "Liam R. Howlett" > > > > wrote: > > > > > > > > > * SeongJae Park [240

Re: [PATCH v2 2/2] vdpa: Remove ioctl VHOST_VDPA_SET_CONFIG per spec compliance

2024-09-03 Thread Jason Wang
On Wed, Sep 4, 2024 at 1:15 AM Carlos Bilbao wrote: > > From: Carlos Bilbao > > Remove invalid ioctl VHOST_VDPA_SET_CONFIG and all its implementations > with vdpa_config_ops->set_config(). This is needed per virtio spec > requirements; virtio-spec v3.1 Sec 5.1.4 states that "All of the device > c

Re: [PATCH v4 1/2] virtiofs: use pages instead of pointer for kernel direct IO

2024-09-03 Thread Hou Tao
Hi, On 9/3/2024 4:44 PM, Jingbo Xu wrote: > > On 8/31/24 5:37 PM, Hou Tao wrote: >> From: Hou Tao >> >> When trying to insert a 10MB kernel module kept in a virtio-fs with cache >> disabled, the following warning was reported: >> SNIP >> >> Fixes: a62a8ef9d97d ("virtio-fs: add virtiofs filesyste

Re: [PATCH v4 2/2] virtiofs: use GFP_NOFS when enqueuing request through kworker

2024-09-03 Thread Hou Tao
On 9/3/2024 5:34 PM, Jingbo Xu wrote: > > On 8/31/24 5:37 PM, Hou Tao wrote: >> From: Hou Tao >> >> When invoking virtio_fs_enqueue_req() through kworker, both the >> allocation of the sg array and the bounce buffer still use GFP_ATOMIC. >> Considering the size of the sg array may be greater th

  1   2   >