Re: [PATCH v2 1/2] dt-bindings: remoteproc: qcom,wcnss-pil: Add support for single power-domain platforms

2025-02-11 Thread Krzysztof Kozlowski
On Thu, Feb 06, 2025 at 08:56:47PM +0100, Luca Weiss wrote: > From: Matti Lehtimäki > > Support platforms such as MSM8226 and MSM8974 with only one power rail > (CX) modelled as power domain while MX and PX are regulators. > > Signed-off-by: Matti Lehtimäki > [luca: reword commit message, expan

Re: [PATCH v2 2/2] unicode: kunit: change tests filename and path

2025-02-11 Thread Thorsten Leemhuis
On 04.10.24 21:00, Gabriel Krisman Bertazi wrote: > Pedro Orlando writes: >> From: Gabriela Bittencourt >> >> Change utf8 kunit test filename and path to follow the style >> convention on Documentation/dev-tools/kunit/style.rst >> >> Co-developed-by: Pedro Orlando >> Signed-off-by: Pedro Orlando

Re: [PATCH v15 3/8] remoteproc: Introduce load_fw and release_fw optional operation

2025-02-11 Thread Bjorn Andersson
On Tue, Dec 10, 2024 at 11:33:31AM +0100, Arnaud POULIQUEN wrote: > > > On 12/10/24 00:14, Bjorn Andersson wrote: > > On Thu, Nov 28, 2024 at 09:42:10AM GMT, Arnaud Pouliquen wrote: > >> This patch updates the rproc_ops structures to include two new optional > >> operations. > >> > >> - The load_

Re: [PATCH v15 2/8] remoteproc: Add TEE support

2025-02-11 Thread Bjorn Andersson
On Tue, Dec 10, 2024 at 09:57:40AM +0100, Arnaud POULIQUEN wrote: > Hello Bjorn, > > On 12/6/24 23:07, Bjorn Andersson wrote: > > On Thu, Nov 28, 2024 at 09:42:09AM GMT, Arnaud Pouliquen wrote: > >> Add a remoteproc TEE (Trusted Execution Environment) driver > >> that will be probed by the TEE bus

Re: [PATCH net-next v6 3/3] selftests: drv-net: Test queue xsk attribute

2025-02-11 Thread Jakub Kicinski
On Tue, 11 Feb 2025 15:10:52 -0800 Stanislav Fomichev wrote: > > I can't comment on NIPA because I have no idea how it works. Maybe > > there is a kernel with some options enabled and other kernels with > > various options disabled? > > Sorry, should've been more clear. My suggestion is to add

Re: [PATCH v7 1/8] xarray: add xas_try_split() to split a multi-index entry.

2025-02-11 Thread Zi Yan
On 11 Feb 2025, at 19:57, Zi Yan wrote: > On 11 Feb 2025, at 10:50, Zi Yan wrote: > >> It is a preparation patch for non-uniform folio split, which always split >> a folio into half iteratively, and minimal xarray entry split. >> >> Currently, xas_split_alloc() and xas_split() always split all slo

Re: [PATCH 5/9] vhost-scsi: log control queue write descriptors

2025-02-11 Thread Mike Christie
On 2/7/25 12:41 PM, Dongli Zhang wrote: > @@ -378,6 +384,11 @@ static void vhost_scsi_release_tmf_res(struct > vhost_scsi_tmf *tmf) > { > struct vhost_scsi_inflight *inflight = tmf->inflight; > > + if (tmf->tmf_log_num) { > + kfree(tmf->tmf_log); > + tmf->tmf_l

Re: [PATCH v7 1/8] xarray: add xas_try_split() to split a multi-index entry.

2025-02-11 Thread Zi Yan
On 11 Feb 2025, at 10:50, Zi Yan wrote: > It is a preparation patch for non-uniform folio split, which always split > a folio into half iteratively, and minimal xarray entry split. > > Currently, xas_split_alloc() and xas_split() always split all slots from a > multi-index entry. They cost the sam

Re: [PATCH v2 1/2] selftests/bpf: Define SYS_PREFIX for powerpc

2025-02-11 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf-next.git (master) by Andrii Nakryiko : On Fri, 31 Jan 2025 12:35:21 +0530 you wrote: > Since commit 7e92e01b7245 ("powerpc: Provide syscall wrapper") > landed in v6.1, syscall wrapper is enabled on powerpc. Commit > 94746890202c ("powerpc: Don't add __pow

Re: [PATCH] x86: sgx: Don't track poisoned pages for reclaiming

2025-02-11 Thread Dave Hansen
On 2/11/25 16:32, andrzej zaborowski wrote: >> Actually, now that I think about it even more, why would ETRACK or >> EBLOCK access the page itself? They seem superficially like they'd be >> metadata-only too. > I haven't seen a crash in either of these (always in EWB), I didn't > want to imply that

Re: [PATCH] x86: sgx: Don't track poisoned pages for reclaiming

2025-02-11 Thread andrzej zaborowski
On Wed, 12 Feb 2025 at 00:31, Dave Hansen wrote: > On 2/11/25 13:18, Huang, Kai wrote: > >>> This requires low-level SGX implementation knowledge to fully > >>> understand. Both what "ETRACK, EBLOCK and EWB" are in the first place, > >>> how they are involved in reclaim and also why EREMOVE doesn'

Re: [PATCH v2] blackhole_dev: convert self-test to KUnit

2025-02-11 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski : On Sat, 08 Feb 2025 14:26:43 -0500 you wrote: > Convert this very simple smoke test to a KUnit test. > > Add a missing `htons` call that was spotted[0] by kernel test robot > after initial conversion to KUnit. > >

Re: [PATCH] x86: sgx: Don't track poisoned pages for reclaiming

2025-02-11 Thread Andrew Zaborowski
On Tue, 11 Feb 2025 at 17:25, Dave Hansen wrote: > git log arch/x86/kernel/cpu/sgx/ > > That usually works for every little nook and cranny of the kernel and > will show you what the subject rules are. > > Could you do that for this patch for v2, please? My bad, I'll use x86/sgx: ... > >

Re: [PATCH] x86: sgx: Don't track poisoned pages for reclaiming

2025-02-11 Thread Dave Hansen
On 2/11/25 13:18, Huang, Kai wrote: >>> This requires low-level SGX implementation knowledge to fully >>> understand. Both what "ETRACK, EBLOCK and EWB" are in the first place, >>> how they are involved in reclaim and also why EREMOVE doesn't lead to >>> the same fate. >> >> Does it? [I'll dig up I

Re: [PATCH] x86: sgx: Don't track poisoned pages for reclaiming

2025-02-11 Thread Jarkko Sakkinen
On Wed, Feb 12, 2025 at 10:18:11AM +1300, Huang, Kai wrote: > > > On 12/02/2025 10:03 am, Jarkko Sakkinen wrote: > > On Tue, Feb 11, 2025 at 08:25:58AM -0800, Dave Hansen wrote: > > > > arch_memory_failure() but stay on sgx_active_page_list. > > > > page->poison is not checked in the reclaimer lo

Re: [PATCH net-next v6 3/3] selftests: drv-net: Test queue xsk attribute

2025-02-11 Thread Stanislav Fomichev
On 02/11, Joe Damato wrote: > On Tue, Feb 11, 2025 at 12:00:38PM -0800, Stanislav Fomichev wrote: > > On 02/11, Joe Damato wrote: > > > On Tue, Feb 11, 2025 at 09:45:56AM -0800, Joe Damato wrote: > > > > On Tue, Feb 11, 2025 at 12:09:50PM +0100, Paolo Abeni wrote: > > > > > On 2/10/25 8:38 PM, Joe

Re: [PATCH] ww_mutex: convert self-test to KUnit

2025-02-11 Thread Tamir Duberstein
On Tue, Feb 11, 2025 at 5:38 PM Boqun Feng wrote: > > Hi Tamir, Hi Boqun, thanks for taking a look. > On Mon, Feb 10, 2025 at 10:59:12AM -0500, Tamir Duberstein wrote: > > Convert this unit test to a KUnit test. > > > > I would like to know the pros and cons between kunit tests and > kselftests,

Re: [PATCH] ww_mutex: convert self-test to KUnit

2025-02-11 Thread Boqun Feng
Hi Tamir, On Mon, Feb 10, 2025 at 10:59:12AM -0500, Tamir Duberstein wrote: > Convert this unit test to a KUnit test. > I would like to know the pros and cons between kunit tests and kselftests, maybe someone Cced can answer that? It'll be good to put these in the commit log as well. Regards, B

[PATCH v2] rcu: Merge rcu_seq_done_exact() logic into rcu_seq_done()

2025-02-11 Thread Joel Fernandes
From: "Joel Fernandes" The rcu_seq_done() API has a large "false-negative" windows of size ULONG_MAX/2, where after wrap around, it is possible that it will think that a GP has not completed if a wrap around happens and the delta is large. One place this might cause a possible problem is SRCU:

Re: [PATCH net-next v6 3/3] selftests: drv-net: Test queue xsk attribute

2025-02-11 Thread Joe Damato
On Tue, Feb 11, 2025 at 12:00:38PM -0800, Stanislav Fomichev wrote: > On 02/11, Joe Damato wrote: > > On Tue, Feb 11, 2025 at 09:45:56AM -0800, Joe Damato wrote: > > > On Tue, Feb 11, 2025 at 12:09:50PM +0100, Paolo Abeni wrote: > > > > On 2/10/25 8:38 PM, Joe Damato wrote: [...] > > > > > > > >

[PATCH v3 4/4] drivers: base: handle module_kobject creation

2025-02-11 Thread Shyam Saini
module_add_driver() relies on module_kset list for /sys/module//drivers directory creation. Since, commit 96a1a2412acba ("kernel/params.c: defer most of param_sysfs_init() to late_initcall time") drivers which are initialized from subsys_initcall() or any other higher precedence initcall couldn't

[PATCH v3 1/4] kernel: param: rename locate_module_kobject

2025-02-11 Thread Shyam Saini
The locate_module_kobject() function looks up an existing module_kobject for a given module name. If it cannot find the corresponding module_kobject, it creates one for the given name. This commit renames locate_module_kobject() to lookup_or_create_module_kobject() to better describe its operation

[PATCH v3 2/4] kernel: refactor lookup_or_create_module_kobject()

2025-02-11 Thread Shyam Saini
In the unlikely event of the allocation failing, it is better to let the machine boot with a not fully populated sysfs than to kill it with this BUG_ON(). All callers are already prepared for lookup_or_create_module_kobject() returning NULL. This is also preparation for calling this function from

[PATCH v3 3/4] kernel: globalize lookup_or_create_module_kobject()

2025-02-11 Thread Shyam Saini
lookup_or_create_module_kobject() is marked as static and __init, to make it global drop static keyword. Since this function can be called from non-init code, use __modinit instead of __init, __modinit marker will make it __init if CONFIG_MODULES is not defined. Suggested-by: Rasmus Villemoes Sig

[PATCH v3 0/4] Properly handle module_kobject creation

2025-02-11 Thread Shyam Saini
Hi Everyone, This patch series fixes handling of module_kobject creation. A driver expect module_kset list populated with its corresponding module_kobject to create its /sys/module//drivers directory. Since, [1] commit 96a1a2412acb ("kernel/params.c: defer most of param_sysfs_init() to late_init

Re: [PATCH] x86: sgx: Don't track poisoned pages for reclaiming

2025-02-11 Thread Huang, Kai
On 12/02/2025 10:03 am, Jarkko Sakkinen wrote: On Tue, Feb 11, 2025 at 08:25:58AM -0800, Dave Hansen wrote: arch_memory_failure() but stay on sgx_active_page_list. page->poison is not checked in the reclaimer logic meaning that a page could be reclaimed and go through ETRACK, EBLOCK and EWB.

Re: [PATCH] x86: sgx: Don't track poisoned pages for reclaiming

2025-02-11 Thread Jarkko Sakkinen
On Tue, Feb 11, 2025 at 08:25:58AM -0800, Dave Hansen wrote: > > arch_memory_failure() but stay on sgx_active_page_list. > > page->poison is not checked in the reclaimer logic meaning that a page > > could be > > reclaimed and go through ETRACK, EBLOCK and EWB. This can lead to the > > firmware r

Re: [PATCH v6 2/6] rust: str: implement `Index` for `BStr`

2025-02-11 Thread Andreas Hindborg
"Gary Guo" writes: > On Tue, 11 Feb 2025 16:57:36 +0100 > Andreas Hindborg wrote: > >> The `Index` implementation on `BStr` was lost when we switched `BStr` from >> a type alias of `[u8]` to a newtype. This patch adds back `Index` by >> implementing `Index` for `BStr` when `Index` would be imple

Re: [PATCH v6 5/6] rust: str: add radix prefixed integer parsing functions

2025-02-11 Thread Andreas Hindborg
"Gary Guo" writes: > On Tue, 11 Feb 2025 16:57:39 +0100 > Andreas Hindborg wrote: > >> Add the trait `ParseInt` for parsing string representations of integers >> where the string representations are optionally prefixed by a radix >> specifier. Implement the trait for the primitive integer types.

Re: [PATCH net-next v6 3/3] selftests: drv-net: Test queue xsk attribute

2025-02-11 Thread Stanislav Fomichev
On 02/11, Joe Damato wrote: > On Tue, Feb 11, 2025 at 09:45:56AM -0800, Joe Damato wrote: > > On Tue, Feb 11, 2025 at 12:09:50PM +0100, Paolo Abeni wrote: > > > On 2/10/25 8:38 PM, Joe Damato wrote: > > > > +def check_xdp(cfg, nl, xdp_queue_id=0) -> None: > > > > +test_dir = os.path.dirname(os.

Re: [PATCH net-next v6 3/3] selftests: drv-net: Test queue xsk attribute

2025-02-11 Thread Joe Damato
On Tue, Feb 11, 2025 at 09:45:56AM -0800, Joe Damato wrote: > On Tue, Feb 11, 2025 at 12:09:50PM +0100, Paolo Abeni wrote: > > On 2/10/25 8:38 PM, Joe Damato wrote: > > > +def check_xdp(cfg, nl, xdp_queue_id=0) -> None: > > > +test_dir = os.path.dirname(os.path.realpath(__file__)) > > > +xd

Re: [PATCH v5 6/8] iio: light: stk3310: use dev_err_probe where possible

2025-02-11 Thread Jonathan Cameron
On Sun, 9 Feb 2025 16:47:44 +0200 Andy Shevchenko wrote: > On Sat, Feb 08, 2025 at 04:13:24PM -0500, Aren Moynihan wrote: > > Using dev_err_probe instead of dev_err and return makes the errors > > Use dev_err_probe() > dev_err() > > > easier to understand by including the error name, and save

[PATCH v15 15/15] arm64: dts: imx95-19x19-evk: Add PCIe1 endpoint function overlay file

2025-02-11 Thread Frank Li
Add an overlay file to configure PCIe1 to function as an endpoint. Enable PCIe1 to work as endpoint mode on the imx95-19x19-evk platform. Signed-off-by: Frank Li --- change from v14 to v15 - none change from v13 to v14 - new patch --- arch/arm64/boot/dts/freescale/Makefile | 3 +++

[PATCH v15 14/15] arm64: dts: imx95: Add msi-map for pci-ep device

2025-02-11 Thread Frank Li
Add msi-map for pci-ep device. Signed-off-by: Frank Li --- change from v14 to v15 - none change from v13 to v14 - new patch --- arch/arm64/boot/dts/freescale/imx95.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/freescale/imx95.dtsi b/arch/arm64/boot/dts/freescale/

[PATCH v15 13/15] pci: imx6: Add LUT setting for MSI/IOMMU in Endpoint mode

2025-02-11 Thread Frank Li
Support only one physical function, so call imx_pcie_add_lut_by_rid(0) to add a single LUT entry when operating in EP mode. Signed-off-by: Frank Li --- change from v14 to v15 - none change from v13 to v14 - new patch --- drivers/pci/controller/dwc/pci-imx6.c | 8 +++- 1 file changed, 7 inse

[PATCH v15 12/15] pci: imx6: Add helper function imx_pcie_add_lut_by_rid()

2025-02-11 Thread Frank Li
Add helper function imx_pcie_add_lut_by_rid(), which will be used for Endpoint mode in the future. No functional change. Signed-off-by: Frank Li --- change from v14 to v15 - none change from v13 to v14 - new patch --- drivers/pci/controller/dwc/pci-imx6.c | 17 ++--- 1 file changed,

[PATCH v15 11/15] selftests: pci_endpoint: Add doorbell test case

2025-02-11 Thread Frank Li
Add doorbell test case. Signed-off-by: Frank Li --- change from v14 to v15 - none change from v13 to v14 - merge to selftests framework --- .../selftests/pci_endpoint/pci_endpoint_test.c | 25 ++ 1 file changed, 25 insertions(+) diff --git a/tools/testing/selftests/pci_

[PATCH v15 10/15] misc: pci_endpoint_test: Add doorbell test case

2025-02-11 Thread Frank Li
Add three registers: PCIE_ENDPOINT_TEST_DB_BAR, PCIE_ENDPOINT_TEST_DB_ADDR, and PCIE_ENDPOINT_TEST_DB_DATA. Trigger the doorbell by writing data from PCI_ENDPOINT_TEST_DB_DATA to the address provided by PCI_ENDPOINT_TEST_DB_OFFSET and wait for endpoint feedback. Add two command to COMMAND_ENABLE_

[PATCH v15 08/15] PCI: endpoint: Add pci_epf_align_inbound_addr() helper for address alignment

2025-02-11 Thread Frank Li
Introduce the helper function pci_epf_align_inbound_addr() to adjust addresses according to PCI BAR alignment requirements, converting addresses into base and offset values. Signed-off-by: Frank Li --- Change form v14 to v15 - change out address type to dma_addr_t to fix below build issue | Repo

[PATCH v15 09/15] PCI: endpoint: pci-epf-test: Add doorbell test support

2025-02-11 Thread Frank Li
Add three registers: doorbell_bar, doorbell_addr, and doorbell_data. Use pci_epf_alloc_doorbell() to allocate a doorbell address space. Enable the Root Complex (RC) side driver to trigger pci-epc-test's doorbell callback handler by writing doorbell_data to the mapped doorbell_bar's address space.

[PATCH v15 07/15] PCI: endpoint: pci-ep-msi: Add MSI address/data pair mutable check

2025-02-11 Thread Frank Li
Some MSI controller change address/data pair when irq_set_affinity(). Current PCI endpoint can't support this type MSI controller. So add flag MSI_FLAG_MUTABLE in include/linux/msi.h and check it when allocate doorbell. Signed-off-by: Frank Li --- change from v14 to v15 - none change from v13 t

[PATCH v15 06/15] PCI: endpoint: Add RC-to-EP doorbell support using platform MSI controller

2025-02-11 Thread Frank Li
Doorbell feature is implemented by mapping the EP's MSI interrupt controller message address to a dedicated BAR in the EPC core. It is the responsibility of the EPF driver to pass the actual message data to be written by the host to the doorbell BAR region through its own logic. Tested-by: Niklas

[PATCH v15 05/15] PCI: endpoint: Set ID and of_node for function driver

2025-02-11 Thread Frank Li
Set device ID as 'vfunc_no << 3 | func_no' and use 'device_set_of_node_from_dev()' to set 'of_node' the same as the EPC parent device. Currently, EPF 'of_node' is NULL, but many functions depend on 'of_node' settings, such as DMA, IOMMU, and MSI. At present, all DMA allocation functions use the EP

[PATCH v15 04/15] irqchip/gic-v3-its: Add support for device tree msi-map and msi-mask

2025-02-11 Thread Frank Li
Some platform devices create child devices dynamically and require the parent device's msi-map to map device IDs to actual sideband information. A typical use case is using ITS as a PCIe Endpoint Controller(EPC)'s doorbell function, where PCI hosts send TLP memory writes to the EP controller. The

[PATCH v15 03/15] irqchip/gic-v3-its: Set IRQ_DOMAIN_FLAG_MSI_IMMUTABLE for ITS

2025-02-11 Thread Frank Li
Set the IRQ_DOMAIN_FLAG_MSI_IMMUTABLE flag for ITS, as it does not change the address/data pair after setup. Ensure compatibility with MSI users, such as PCIe Endpoint Doorbell, which require the address/data pair to remain unchanged. Enable PCIe endpoints to use ITS for triggering doorbells from

[PATCH v15 02/15] irqdomain: Add IRQ_DOMAIN_FLAG_MSI_IMMUTABLE and irq_domain_is_msi_immutable()

2025-02-11 Thread Frank Li
Add the flag IRQ_DOMAIN_FLAG_MSI_IMMUTABLE and the API function irq_domain_is_msi_immutable() to check if the MSI controller retains an immutable address/data pair during irq_set_affinity(). Ensure compatibility with MSI users like PCIe Endpoint Doorbell, which require the address/data pair to rem

[PATCH v15 00/15] PCI: EP: Add RC-to-EP doorbell with platform MSI controller

2025-02-11 Thread Frank Li
┌┐ ┌───┐ ┌┐ ││ │ │ ││ ││ │ PCI Endpoint │ │ PCI Host │ ││ │ │ │

[PATCH v15 01/15] platform-msi: Add msi_remove_device_irq_domain() in platform_device_msi_free_irqs_all()

2025-02-11 Thread Frank Li
The follow steps trigger kernel dump warning and platform_device_msi_init_and_alloc_irqs() return false. 1: platform_device_msi_init_and_alloc_irqs(); 2: platform_device_msi_free_irqs_all(); 3: platform_device_msi_init_and_alloc_irqs(); [ 76.713677] WARNING: CPU: 3 PID: 134 at kernel/irq/msi.c:

Re: [PATCH 0/2] printf: convert self-test to KUnit

2025-02-11 Thread Tamir Duberstein
On Tue, Feb 11, 2025 at 6:34 AM Tamir Duberstein wrote: > > https://lore.kernel.org/all/20250210-printf-kunit-convert-v3-1-ee6ac5500...@gmail.com/ > > Weirdly the cover letter seems to be missing on lore, should I resend? It's there now. https://lore.kernel.org/all/20250210-printf-kunit-convert-v

Re: [PATCH v1 06/13] iommufd: Implement sw_msi support natively

2025-02-11 Thread Nicolin Chen
On Tue, Feb 11, 2025 at 02:16:20PM -0400, Jason Gunthorpe wrote: > On Sat, Feb 08, 2025 at 01:02:39AM -0800, Nicolin Chen wrote: > > > +static struct iommufd_attach_handle * > > +iommu_group_get_iommufd_handle(struct iommu_group *group) > > +{ > > + struct iommu_attach_handle *handle; > > + > >

Re: [PATCH v2 1/2] get_maintainer: add --substatus for reporting subsystem status

2025-02-11 Thread Vlastimil Babka
On 2/11/25 17:28, Geert Uytterhoeven wrote: > Hi Vlastimil, > > On Tue, 11 Feb 2025 at 17:09, Vlastimil Babka wrote: >> On 2/11/25 16:19, Geert Uytterhoeven wrote: >> > On Tue, 11 Feb 2025 at 15:58, Vlastimil Babka wrote: >> >> On 2/11/25 11:48, Geert Uytterhoeven wrote: >> >> I've tried to do t

Re: next-20250210: WARNING: at include/linux/rwsem.h:85 madvise_unlock

2025-02-11 Thread SeongJae Park
On Tue, 11 Feb 2025 10:32:55 +0100 "Arnd Bergmann" wrote: > On Tue, Feb 11, 2025, at 10:23, Naresh Kamboju wrote: > > Regressions on arm64 Juno-r2 device while running LTP syscalls tests > > madvise01 warnings on the Linux next-20250210 tag. > > > > First seen on next-20250210 > > Good: next-2025

Re: [PATCH v1 06/13] iommufd: Implement sw_msi support natively

2025-02-11 Thread Jason Gunthorpe
On Sat, Feb 08, 2025 at 01:02:39AM -0800, Nicolin Chen wrote: > +static struct iommufd_attach_handle * > +iommu_group_get_iommufd_handle(struct iommu_group *group) > +{ > + struct iommu_attach_handle *handle; > + > + handle = iommu_attach_handle_get(group, IOMMU_NO_PASID, 0); > + if (I

Re: [PATCH v7 1/3] scanf: remove redundant debug logs

2025-02-11 Thread Tamir Duberstein
On Tue, Feb 11, 2025 at 12:16 PM Andy Shevchenko wrote: > > On Tue, Feb 11, 2025 at 11:02:59AM -0500, Tamir Duberstein wrote: > > On Tue, Feb 11, 2025 at 10:58 AM Andy Shevchenko > > wrote: > > > On Tue, Feb 11, 2025 at 10:50:33AM -0500, Tamir Duberstein wrote: > > > > On Tue, Feb 11, 2025 at 10:

Re: [PATCH net-next v6 3/3] selftests: drv-net: Test queue xsk attribute

2025-02-11 Thread Joe Damato
On Tue, Feb 11, 2025 at 12:09:50PM +0100, Paolo Abeni wrote: > On 2/10/25 8:38 PM, Joe Damato wrote: > > +def check_xdp(cfg, nl, xdp_queue_id=0) -> None: > > +test_dir = os.path.dirname(os.path.realpath(__file__)) > > +xdp = subprocess.Popen([f"{test_dir}/xdp_helper", f"{cfg.ifindex}", > >

Re: [PATCH v7 0/3] scanf: convert self-test to KUnit

2025-02-11 Thread Tamir Duberstein
On Tue, Feb 11, 2025 at 12:17 PM Andy Shevchenko wrote: > > On Tue, Feb 11, 2025 at 10:57:11AM -0500, Tamir Duberstein wrote: > > On Tue, Feb 11, 2025 at 10:54 AM Andy Shevchenko > > wrote: > > > On Tue, Feb 11, 2025 at 10:47:03AM -0500, Tamir Duberstein wrote: > > > > On Tue, Feb 11, 2025 at 10:

Re: [PATCH v7 0/3] scanf: convert self-test to KUnit

2025-02-11 Thread Andy Shevchenko
On Tue, Feb 11, 2025 at 10:57:11AM -0500, Tamir Duberstein wrote: > On Tue, Feb 11, 2025 at 10:54 AM Andy Shevchenko > wrote: > > On Tue, Feb 11, 2025 at 10:47:03AM -0500, Tamir Duberstein wrote: > > > On Tue, Feb 11, 2025 at 10:40 AM Andy Shevchenko > > > wrote: > > > > On Tue, Feb 11, 2025 at 1

Re: [PATCH v7 1/3] scanf: remove redundant debug logs

2025-02-11 Thread Andy Shevchenko
On Tue, Feb 11, 2025 at 11:02:59AM -0500, Tamir Duberstein wrote: > On Tue, Feb 11, 2025 at 10:58 AM Andy Shevchenko > wrote: > > On Tue, Feb 11, 2025 at 10:50:33AM -0500, Tamir Duberstein wrote: > > > On Tue, Feb 11, 2025 at 10:42 AM Andy Shevchenko > > > wrote: > > > > On Tue, Feb 11, 2025 at 1

Re: [PATCH v6 2/6] rust: str: implement `Index` for `BStr`

2025-02-11 Thread Gary Guo
On Tue, 11 Feb 2025 16:57:36 +0100 Andreas Hindborg wrote: > The `Index` implementation on `BStr` was lost when we switched `BStr` from > a type alias of `[u8]` to a newtype. This patch adds back `Index` by > implementing `Index` for `BStr` when `Index` would be implemented for > `[u8]`. > > Sig

Re: [PATCH v6 5/6] rust: str: add radix prefixed integer parsing functions

2025-02-11 Thread Gary Guo
On Tue, 11 Feb 2025 16:57:39 +0100 Andreas Hindborg wrote: > Add the trait `ParseInt` for parsing string representations of integers > where the string representations are optionally prefixed by a radix > specifier. Implement the trait for the primitive integer types. > > Signed-off-by: Andreas

Re: [PATCH v5 2/2] lib/prime_numbers: convert self-test to KUnit

2025-02-11 Thread Tamir Duberstein
On Tue, Feb 11, 2025 at 11:38 AM Kees Cook wrote: > > On Tue, Feb 11, 2025 at 06:51:09AM -0500, Tamir Duberstein wrote: > > Kees, it looks like the private header didn't make it to your tree. > > This bit is missing: > > Whoops! Thanks. I've added it (and fixed the comment style). > > I really nee

Re: [PATCH v5 2/2] lib/prime_numbers: convert self-test to KUnit

2025-02-11 Thread Kees Cook
On Tue, Feb 11, 2025 at 06:51:09AM -0500, Tamir Duberstein wrote: > Kees, it looks like the private header didn't make it to your tree. > This bit is missing: Whoops! Thanks. I've added it (and fixed the comment style). I really need to do my build/run testing from a fresh checkout instead of in

Re: [PATCH v2 1/2] get_maintainer: add --substatus for reporting subsystem status

2025-02-11 Thread Geert Uytterhoeven
Hi Vlastimil, On Tue, 11 Feb 2025 at 17:09, Vlastimil Babka wrote: > On 2/11/25 16:19, Geert Uytterhoeven wrote: > > On Tue, 11 Feb 2025 at 15:58, Vlastimil Babka wrote: > >> On 2/11/25 11:48, Geert Uytterhoeven wrote: > >> I've tried to do that in v1 in the form of reporting e.g. as > >> John D

Re: [PATCH] x86: sgx: Don't track poisoned pages for reclaiming

2025-02-11 Thread Dave Hansen
I don't expect everyone to know the rules of every little part of the kernel. But, it's really easy to see a pattern with: git log arch/x86/kernel/cpu/sgx/ That usually works for every little nook and cranny of the kernel and will show you what the subject rules are. Could you do that fo

Re: [PATCH v2 1/2] get_maintainer: add --substatus for reporting subsystem status

2025-02-11 Thread Vlastimil Babka
On 2/11/25 16:19, Geert Uytterhoeven wrote: > Hi Vlastimil, > > On Tue, 11 Feb 2025 at 15:58, Vlastimil Babka wrote: >> On 2/11/25 11:48, Geert Uytterhoeven wrote: >> I've tried to do that in v1 in the form of reporting e.g. as >> John Doe (maintainer:SUBSYSTEM [supported]) >> >> But it seemed n

Re: [PATCH v6 1/2] scanf: convert self-test to KUnit

2025-02-11 Thread Tamir Duberstein
On Tue, Feb 11, 2025 at 11:06 AM Petr Mladek wrote: > > On Tue 2025-02-11 06:45:07, Tamir Duberstein wrote: > > On Tue, Feb 11, 2025 at 6:37 AM Petr Mladek wrote: > > > > > > On Mon 2025-02-10 13:13:48, Tamir Duberstein wrote: > > > > Convert the scanf() self-test to a KUnit test. > > > > > > > >

Re: [PATCH v6 1/2] scanf: convert self-test to KUnit

2025-02-11 Thread Petr Mladek
On Tue 2025-02-11 06:45:07, Tamir Duberstein wrote: > On Tue, Feb 11, 2025 at 6:37 AM Petr Mladek wrote: > > > > On Mon 2025-02-10 13:13:48, Tamir Duberstein wrote: > > > Convert the scanf() self-test to a KUnit test. > > > > > > In the interest of keeping the patch reasonably-sized this doesn't >

Re: [PATCH v7 1/3] scanf: remove redundant debug logs

2025-02-11 Thread Tamir Duberstein
On Tue, Feb 11, 2025 at 10:58 AM Andy Shevchenko wrote: > > On Tue, Feb 11, 2025 at 10:50:33AM -0500, Tamir Duberstein wrote: > > On Tue, Feb 11, 2025 at 10:42 AM Andy Shevchenko > > wrote: > > > On Tue, Feb 11, 2025 at 10:13:37AM -0500, Tamir Duberstein wrote: > > > > The test already prints the

[PATCH v6 1/6] rust: str: implement `PartialEq` for `BStr`

2025-02-11 Thread Andreas Hindborg
Implement `PartialEq` for `BStr` by comparing underlying byte slices. Reviewed-by: Alice Ryhl Reviewed-by: Gary Guo Signed-off-by: Andreas Hindborg --- rust/kernel/str.rs | 6 ++ 1 file changed, 6 insertions(+) diff --git a/rust/kernel/str.rs b/rust/kernel/str.rs index 28e2201604d67..002d

[PATCH v6 6/6] rust: add parameter support to the `module!` macro

2025-02-11 Thread Andreas Hindborg
This patch includes changes required for Rust kernel modules to utilize module parameters. This code implements read only support for integer types without `sysfs` support. Signed-off-by: Andreas Hindborg --- rust/kernel/lib.rs | 1 + rust/kernel/module_param.rs | 225 ++

Re: [PATCH v2 1/2] get_maintainer: add --substatus for reporting subsystem status

2025-02-11 Thread Vlastimil Babka
On 2/3/25 12:13, Vlastimil Babka wrote: > The subsystem status is currently reported with --role(stats) by > adjusting the maintainer role for any status different from Maintained. > This has two downsides: > > - if a subsystem has only reviewers or mailing lists and no maintainers, > the status

[PATCH v6 2/6] rust: str: implement `Index` for `BStr`

2025-02-11 Thread Andreas Hindborg
The `Index` implementation on `BStr` was lost when we switched `BStr` from a type alias of `[u8]` to a newtype. This patch adds back `Index` by implementing `Index` for `BStr` when `Index` would be implemented for `[u8]`. Signed-off-by: Andreas Hindborg --- rust/kernel/str.rs | 11 +++ 1

[PATCH v6 5/6] rust: str: add radix prefixed integer parsing functions

2025-02-11 Thread Andreas Hindborg
Add the trait `ParseInt` for parsing string representations of integers where the string representations are optionally prefixed by a radix specifier. Implement the trait for the primitive integer types. Signed-off-by: Andreas Hindborg --- rust/kernel/str.rs | 111 +++

[PATCH v6 4/6] rust: str: implement `strip_prefix` for `BStr`

2025-02-11 Thread Andreas Hindborg
Implement `strip_prefix` for `BStr` by deferring to `slice::strip_prefix` on the underlying `&[u8]`. Reviewed-by: Gary Guo Reviewed-by: Alice Ryhl Signed-off-by: Andreas Hindborg --- It is also possible to get this method by implementing `core::slice::SlicePattern` for `BStr`. `SlicePattern` i

[PATCH v6 3/6] rust: str: implement `AsRef` for `[u8]` and `BStr`

2025-02-11 Thread Andreas Hindborg
Implement `AsRef` for `[u8]` and `BStr` so these can be used interchangeably for operations on `BStr`. Signed-off-by: Andreas Hindborg --- rust/kernel/str.rs | 12 1 file changed, 12 insertions(+) diff --git a/rust/kernel/str.rs b/rust/kernel/str.rs index 1eb945bed77d6..389341455b9

[PATCH v6 0/6] rust: extend `module!` macro with integer parameter support

2025-02-11 Thread Andreas Hindborg
This series extends the `module!` macro with support module parameters. It also adds some string to integer parsing functions and updates `BStr` with a method to strip a string prefix. This series stated out as code by Adam Bratschi-Kaye lifted from the original `rust` branch [1]. After a bit of

Re: [PATCH v7 1/3] scanf: remove redundant debug logs

2025-02-11 Thread Andy Shevchenko
On Tue, Feb 11, 2025 at 10:50:33AM -0500, Tamir Duberstein wrote: > On Tue, Feb 11, 2025 at 10:42 AM Andy Shevchenko > wrote: > > On Tue, Feb 11, 2025 at 10:13:37AM -0500, Tamir Duberstein wrote: > > > The test already prints the same information on failure; remove > > > redundant pr_debug() logs.

Re: [PATCH v7 0/3] scanf: convert self-test to KUnit

2025-02-11 Thread Tamir Duberstein
On Tue, Feb 11, 2025 at 10:54 AM Andy Shevchenko wrote: > > On Tue, Feb 11, 2025 at 10:47:03AM -0500, Tamir Duberstein wrote: > > On Tue, Feb 11, 2025 at 10:40 AM Andy Shevchenko > > wrote: > > > On Tue, Feb 11, 2025 at 10:13:36AM -0500, Tamir Duberstein wrote: > > ... > > > > > - Use original te

Re: [PATCH v7 0/3] scanf: convert self-test to KUnit

2025-02-11 Thread Andy Shevchenko
On Tue, Feb 11, 2025 at 10:47:03AM -0500, Tamir Duberstein wrote: > On Tue, Feb 11, 2025 at 10:40 AM Andy Shevchenko > wrote: > > On Tue, Feb 11, 2025 at 10:13:36AM -0500, Tamir Duberstein wrote: ... > > > - Use original test assertions as KUNIT_*_EQ_MSG produces hard-to-parse > > > messages.

Re: [PATCH v7 1/3] scanf: remove redundant debug logs

2025-02-11 Thread Tamir Duberstein
On Tue, Feb 11, 2025 at 10:42 AM Andy Shevchenko wrote: > > On Tue, Feb 11, 2025 at 10:13:37AM -0500, Tamir Duberstein wrote: > > The test already prints the same information on failure; remove > > redundant pr_debug() logs. > > ... > > > #define _check_numbers_template(arg_fmt, expect, str, fmt,

[PATCH v7 7/8] mm/truncate: use buddy allocator like folio split for truncate operation.

2025-02-11 Thread Zi Yan
Instead of splitting the large folio uniformly during truncation, try to use buddy allocator like split at the start of truncation range to minimize the number of resulting folios if it is supported. try_folio_split() is introduced to use folio_split() if supported and fall back to uniform split ot

[PATCH v7 8/8] selftests/mm: add tests for folio_split(), buddy allocator like split.

2025-02-11 Thread Zi Yan
It splits page cache folios to orders from 0 to 8 at different in-folio offset. Signed-off-by: Zi Yan --- .../selftests/mm/split_huge_page_test.c | 34 +++ 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/tools/testing/selftests/mm/split_huge_page_test.c b/to

[PATCH v7 6/8] mm/huge_memory: add folio_split() to debugfs testing interface.

2025-02-11 Thread Zi Yan
This allows to test folio_split() by specifying an additional in folio page offset parameter to split_huge_page debugfs interface. Signed-off-by: Zi Yan --- mm/huge_memory.c | 47 ++- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/mm/h

[PATCH v7 5/8] mm/huge_memory: remove the old, unused __split_huge_page()

2025-02-11 Thread Zi Yan
Now split_huge_page_to_list_to_order() uses the new backend split code in __folio_split_without_mapping(), the old __split_huge_page() and __split_huge_page_tail() can be removed. Signed-off-by: Zi Yan --- mm/huge_memory.c | 207 --- 1 file changed, 20

[PATCH v7 4/8] mm/huge_memory: add buddy allocator like (non-uniform) folio_split()

2025-02-11 Thread Zi Yan
folio_split() splits a large folio in the same way as buddy allocator splits a large free page for allocation. The purpose is to minimize the number of folios after the split. For example, if user wants to free the 3rd subpage in a order-9 folio, folio_split() will split the order-9 folio as: O-0,

[PATCH v7 3/8] mm/huge_memory: move folio split common code to __folio_split()

2025-02-11 Thread Zi Yan
This is a preparation patch for folio_split(). In the upcoming patch folio_split() will share folio unmapping and remapping code with split_huge_page_to_list_to_order(), so move the code to a common function __folio_split() first. Signed-off-by: Zi Yan --- mm/huge_memory.c | 107 +++

[PATCH v7 2/8] mm/huge_memory: add two new (not yet used) functions for folio_split()

2025-02-11 Thread Zi Yan
This is a preparation patch, both added functions are not used yet. The added __split_unmapped_folio() is able to split a folio with its mapping removed in two manners: 1) uniform split (the existing way), and 2) buddy allocator like split. The added __split_folio_to_order() can split a folio int

[PATCH v7 1/8] xarray: add xas_try_split() to split a multi-index entry.

2025-02-11 Thread Zi Yan
It is a preparation patch for non-uniform folio split, which always split a folio into half iteratively, and minimal xarray entry split. Currently, xas_split_alloc() and xas_split() always split all slots from a multi-index entry. They cost the same number of xa_node as the to-be-split slots. For

[PATCH v7 0/8] Buddy allocator like (or non-uniform) folio split

2025-02-11 Thread Zi Yan
Hi Matthew, Can you please take a look at Patch 1 and let me know if the new xarray function looks good to you? I will send __filemap_add_folio() and shmem_split_large_entry() changes separately. Hi all, This patchset adds a new buddy allocator like (or non-uniform) large folio split from a orde

Re: [PATCH v2 1/2] get_maintainer: add --substatus for reporting subsystem status

2025-02-11 Thread Geert Uytterhoeven
Hi Uwe, On Tue, 11 Feb 2025 at 16:09, Uwe Kleine-König wrote: > On Tue, Feb 11, 2025 at 11:48:13AM +0100, Geert Uytterhoeven wrote: > > On Tue, 11 Feb 2025 at 11:32, Uwe Kleine-König > > wrote: > > > On Mon, Feb 03, 2025 at 12:13:16PM +0100, Vlastimil Babka wrote: > > > > The subsystem status is

Re: [PATCH v7 0/3] scanf: convert self-test to KUnit

2025-02-11 Thread Tamir Duberstein
On Tue, Feb 11, 2025 at 10:40 AM Andy Shevchenko wrote: > > On Tue, Feb 11, 2025 at 10:13:36AM -0500, Tamir Duberstein wrote: > > This is one of just 3 remaining "Test Module" kselftests (the others > > being bitmap and printf), the rest having been converted to KUnit. In > > addition to the enclo

Re: [PATCH v7 1/6] pidfd: add PIDFD_SELF* sentinels to refer to own thread/process

2025-02-11 Thread Lorenzo Stoakes
On Tue, Feb 11, 2025 at 04:24:07PM +0100, Michal Koutný wrote: > On Thu, Jan 30, 2025 at 08:40:26PM +, Lorenzo Stoakes > wrote: > > > > Signed-off-by: Lorenzo Stoakes > > --- > > include/uapi/linux/pidfd.h | 24 + > > kernel/pid.c | 24 +++-- > > kernel/signal.c

Re: [PATCH v7 1/3] scanf: remove redundant debug logs

2025-02-11 Thread Andy Shevchenko
On Tue, Feb 11, 2025 at 10:13:37AM -0500, Tamir Duberstein wrote: > The test already prints the same information on failure; remove > redundant pr_debug() logs. ... > #define _check_numbers_template(arg_fmt, expect, str, fmt, n_args, ap) > \ > do {

Re: [PATCH v7 0/3] scanf: convert self-test to KUnit

2025-02-11 Thread Andy Shevchenko
On Tue, Feb 11, 2025 at 10:13:36AM -0500, Tamir Duberstein wrote: > This is one of just 3 remaining "Test Module" kselftests (the others > being bitmap and printf), the rest having been converted to KUnit. In > addition to the enclosed patch, please consider this an RFC on the > removal of the "Tes

Re: [PATCH] blackhole_dev: convert self-test to KUnit

2025-02-11 Thread Tamir Duberstein
On Tue, Feb 11, 2025 at 9:47 AM Simon Horman wrote: > > On Fri, Feb 07, 2025 at 06:38:41PM -0500, Tamir Duberstein wrote: > > Convert this very simple smoke test to a KUnit test. > > Hi Tamir, > > I think some text explaining why this change is being made is > warranted here. Hi Simon, I think th

Re: [PATCH v7 1/6] pidfd: add PIDFD_SELF* sentinels to refer to own thread/process

2025-02-11 Thread Michal Koutný
On Thu, Jan 30, 2025 at 08:40:26PM +, Lorenzo Stoakes wrote: > > Signed-off-by: Lorenzo Stoakes > --- > include/uapi/linux/pidfd.h | 24 + > kernel/pid.c | 24 +++-- > kernel/signal.c| 106 ++--- > 3 files changed, 107

Re: [PATCH v2 1/2] get_maintainer: add --substatus for reporting subsystem status

2025-02-11 Thread Vlastimil Babka
On 2/11/25 11:59, Vlastimil Babka wrote: > On 2/11/25 11:48, Geert Uytterhoeven wrote: >> Hi Uwe, >> >> On Tue, 11 Feb 2025 at 11:32, Uwe Kleine-König >> wrote: >>> On Mon, Feb 03, 2025 at 12:13:16PM +0100, Vlastimil Babka wrote: >>> > The subsystem status is currently reported with --role(stats)

[PATCH v7 2/3] scanf: convert self-test to KUnit

2025-02-11 Thread Tamir Duberstein
Convert the scanf() self-test to a KUnit test. In the interest of keeping the patch reasonably-sized this doesn't refactor the tests into proper parameterized tests - it's all one big test case. Reviewed-by: David Gow Signed-off-by: Tamir Duberstein --- MAINTAINERS |

Re: [PATCH v2 1/2] get_maintainer: add --substatus for reporting subsystem status

2025-02-11 Thread Geert Uytterhoeven
Hi Vlastimil, On Tue, 11 Feb 2025 at 15:58, Vlastimil Babka wrote: > On 2/11/25 11:48, Geert Uytterhoeven wrote: > > On Tue, 11 Feb 2025 at 11:32, Uwe Kleine-König > > wrote: > >> On Mon, Feb 03, 2025 at 12:13:16PM +0100, Vlastimil Babka wrote: > >> > The subsystem status is currently reported w

[PATCH v7 3/3] scanf: break kunit into test cases

2025-02-11 Thread Tamir Duberstein
Use `suite_init` and move some tests into `scanf_test_cases`. This gives us nicer output in the event of a failure. Reviewed-by: David Gow Signed-off-by: Tamir Duberstein --- lib/scanf_kunit.c | 94 ++- 1 file changed, 51 insertions(+), 43 del

  1   2   >