Re: [PATCH] kunit: tool: Build compile_commands.json

2024-09-12 Thread David Gow
On Fri, 17 May 2024 at 03:38, Brendan Jackman wrote: > > compile_commands.json is used by clangd[1] to provide code navigation > and completion functionality to editors. See [2] for an example > configuration that includes this functionality for VSCode. > > It can currently be built manually when

[syzbot] [virt?] KCSAN: data-race in virtqueue_disable_cb / vring_interrupt (4)

2024-09-12 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:7c6a3a65ace7 minmax: reduce min/max macro expansion in ato.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=1608e49f98 kernel config: https://syzkaller.appspot.com/x/.config?x=1e7d02549be622b2 das

CPUMAP latency metrics (was: [PATCH bpf-next] bpf: ringbuf: Support consuming BPF_MAP_TYPE_RINGBUF from prog)

2024-09-12 Thread Jesper Dangaard Brouer
On 11/09/2024 20.53, Daniel Xu wrote: On Wed, Sep 11, 2024 at 10:32:56AM GMT, Jesper Dangaard Brouer wrote: On 11/09/2024 06.43, Daniel Xu wrote: [cc Jesper] On Tue, Sep 10, 2024, at 8:31 PM, Daniel Xu wrote: On Tue, Sep 10, 2024 at 05:39:55PM GMT, Andrii Nakryiko wrote: On Tue, Sep 10,

[PATCH] selftest/mm: Do not use hint for riscv mmap

2024-09-12 Thread Chunyan Zhang
When the virtual address range selftest is run on RISC-V platforms, it is observed that using the hint address when calling mmap cannot get the address in the range of that validate_addr() checks, also that will cause '/proc/self/maps' have gaps larger than MAP_CHUNK_SIZE. Signed-off-by: Chunyan Z

Re: [PATCH v2 14/19] gendwarfksyms: Add symbol versioning

2024-09-12 Thread Petr Pavlu
On 9/11/24 18:03, Sami Tolvanen wrote: > On Wed, Sep 11, 2024 at 3:08 AM Petr Pavlu wrote: >> On 8/15/24 19:39, Sami Tolvanen wrote: >> More importantly, it made me think which names are included in the CRC >> calculation and which ones are omitted. >> >> If I'm looking correctly, names of structs

[PATCH 1/2] kselftests: mm: Fix wrong __NR_userfaultfd value

2024-09-12 Thread Muhammad Usama Anjum
The value of __NR_userfaultfd was changed to 282 when asm-generic/unistd.h was included. It makes the test to fail every time as the correct number of this syscall on x86_64 is 323. Fix the header to asm/unistd.h. Fixes: a5c6bc590094 ("selftests/mm: remove local __NR_* definitions") Signed-off-by:

[PATCH 2/2] kselftests: mm: Fail the test if userfaultfd syscall isn't found

2024-09-12 Thread Muhammad Usama Anjum
The userfaultfd is enabled in the config fragment of mm selftest suite. It must always be present. If it isn't present, we should throw error and not just skip. This would have helped us catch the test breakage. Adding this now to catch the future breakages. Signed-off-by: Muhammad Usama Anjum --

Re: [syzbot] [virt?] KCSAN: data-race in virtqueue_disable_cb / vring_interrupt (4)

2024-09-12 Thread Michael S. Tsirkin
On Thu, Sep 12, 2024 at 01:11:21AM -0700, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:7c6a3a65ace7 minmax: reduce min/max macro expansion in ato.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=1608e49f98 > kernel

Re: [PATCH] selftests: Makefile: add missing 'net/lib' to targets

2024-09-12 Thread Willem de Bruijn
On Thu, Sep 12, 2024 at 2:31 AM Anders Roxell wrote: > > Fixes: 1d0dc857b5d8 ("selftests: drv-net: add checksum tests") > Signed-off-by: Anders Roxell This target is automatically built for targets that depend on it. See the commit that introduced it, b86761ff6374. +++ b/tools/testing/selftest

Re: [PATCH 13/13] media: i2c: imx214: Add test pattern control

2024-09-12 Thread Ricardo Ribalda Delgado
On Mon, Sep 2, 2024 at 11:53 PM André Apitzsch via B4 Relay wrote: > > From: André Apitzsch > > This adds V4L2_CID_TEST_PATTERN control support. > > Signed-off-by: André Apitzsch Acked-by: Ricardo Ribalda > --- > drivers/media/i2c/imx214.c | 77 > --

Re: [PATCH 12/13] media: i2c: imx214: Verify chip ID

2024-09-12 Thread Ricardo Ribalda Delgado
On Mon, Sep 2, 2024 at 11:53 PM André Apitzsch via B4 Relay wrote: > > From: André Apitzsch > > Check the chip ID and stop probing if it is no imx214 sensor. > > Signed-off-by: André Apitzsch Acked-by: Ricardo Ribalda > --- > drivers/media/i2c/imx214.c | 29 + > 1

Re: [PATCH 11/13] media: i2c: imx214: Add analogue/digital gain control

2024-09-12 Thread Ricardo Ribalda Delgado
On Mon, Sep 2, 2024 at 11:53 PM André Apitzsch via B4 Relay wrote: > > From: André Apitzsch > > The imx214 sensor supports analogue gain up to 8x and digital gain up to > 16x. Implement the corresponding controls in the driver. Default gain > values are not modified by this patch. > Acked-by: Ric

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

2024-09-12 Thread Ricardo Ribalda Delgado
Hi Arent you missing some chage in enum_frame_interval? On Mon, Sep 2, 2024 at 11:53 PM André Apitzsch via B4 Relay wrote: > > From: André Apitzsch > > Add vblank control to allow changing the framerate / > higher exposure values. > > The vblank and hblank controls are needed for libcamera supp

Re: [PATCH 10/13] media: i2c: imx214: Implement vflip/hflip controls

2024-09-12 Thread Ricardo Ribalda Delgado
On Mon, Sep 2, 2024 at 11:53 PM André Apitzsch via B4 Relay wrote: > > From: André Apitzsch > > The imx214 sensor supports horizontal and vertical flipping. Add > appropriate controls to the driver. > > Signed-off-by: André Apitzsch > --- > drivers/media/i2c/imx214.c | 73 > +++

Re: [PATCH 09/13] media: i2c: imx214: Extract format and crop settings

2024-09-12 Thread Ricardo Ribalda Delgado
On Mon, Sep 2, 2024 at 11:54 PM André Apitzsch via B4 Relay wrote: > > From: André Apitzsch > > Remove format and crop settings from register sequences and set them > programmatically. > > Signed-off-by: André Apitzsch > --- > drivers/media/i2c/imx214.c | 137 >

Re: [PATCH 07/13] media: i2c: imx214: Use number of lanes from device tree

2024-09-12 Thread Ricardo Ribalda Delgado
Hi On Mon, Sep 2, 2024 at 11:53 PM André Apitzsch via B4 Relay wrote: > > From: André Apitzsch > > The imx214 camera is capable of either two-lane or four-lane operation. > > Currently only the four-lane mode is supported, as proper pixel rates > and link frequences for the two-lane mode are unk

Re: [PATCH 06/13] media: i2c: imx214: Drop IMX214_REG_EXPOSURE from mode reg arrays

2024-09-12 Thread Ricardo Ribalda Delgado
On Mon, Sep 2, 2024 at 11:53 PM André Apitzsch via B4 Relay wrote: > > From: André Apitzsch > > The IMX214_REG_EXPOSURE is configured twice, once with a hardcoded value > in the mode_ registers arrays, and once via v4l2_ctrl_ops. The > latter is enough, drop the former. > > Signed-off-by: André A

Re: [PATCH 05/13] media: i2c: imx214: Replace register addresses with macros

2024-09-12 Thread Ricardo Ribalda Delgado
Hi On Mon, Sep 2, 2024 at 11:53 PM André Apitzsch via B4 Relay wrote: > > From: André Apitzsch > > Define macros for all the known registers used in the register arrays, > and use them to replace the numerical addresses. This improves > readability. Could you share the documentation? > > Signe

Re: [PATCH 04/13] media: i2c: imx214: Convert to CCI register access helpers

2024-09-12 Thread Ricardo Ribalda Delgado
On Mon, Sep 2, 2024 at 11:53 PM André Apitzsch via B4 Relay wrote: > > From: André Apitzsch > > Use the new common CCI register access helpers to replace the private > register access helpers in the imx214 driver. This simplifies the driver > by reducing the amount of code. > Acked-by: Ricardo Ri

Re: [PATCH 03/13] media: i2c: imx214: Simplify with dev_err_probe()

2024-09-12 Thread Ricardo Ribalda Delgado
On Mon, Sep 2, 2024 at 11:53 PM André Apitzsch via B4 Relay wrote: > > From: André Apitzsch > > Error handling in probe() can be a bit simpler with dev_err_probe(). > Acked-by: Ricardo Ribalda > Signed-off-by: André Apitzsch > --- > drivers/media/i2c/imx214.c | 52 > -

Re: [PATCH 01/13] media: i2c: imx214: Use subdev active state

2024-09-12 Thread Ricardo Ribalda Delgado
Hi Andre I don't have access to the hardware anymore, so I cannot test this... but looking at the code I am not sure how it is working... I would assume that after moving to the subdev active state, you need to remove struct v4l2_mbus_framefmt fmt; struct v4l2_rect crop; for struct imx214. Aft

Re: [PATCH 02/13] media: i2c: imx214: Remove unneeded goto

2024-09-12 Thread Ricardo Ribalda Delgado
Hi Andre On Mon, Sep 2, 2024 at 11:53 PM André Apitzsch via B4 Relay wrote: > > From: André Apitzsch > > Simplify the imx214_start_streaming() by removing unneeded goto > statements, and the corresponding error label. Could you squash this patch with the previous one? Thanks! > > Signed-off

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

2024-09-12 Thread Joe Lawrence
On Wed, Sep 11, 2024 at 12:39:42AM -0700, Josh Poimboeuf wrote: > On Mon, Sep 02, 2024 at 08:59:43PM -0700, 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 already does 99% of > > the

Re: [syzbot] [virt?] KCSAN: data-race in virtqueue_disable_cb / vring_interrupt (4)

2024-09-12 Thread Marco Elver
On Thu, 12 Sept 2024 at 13:03, Michael S. Tsirkin wrote: > > On Thu, Sep 12, 2024 at 01:11:21AM -0700, syzbot wrote: > > Hello, > > > > syzbot found the following issue on: > > > > HEAD commit:7c6a3a65ace7 minmax: reduce min/max macro expansion in ato.. > > git tree: upstream > > console

Re: [syzbot] [virt?] KCSAN: data-race in virtqueue_disable_cb / vring_interrupt (4)

2024-09-12 Thread Michael S. Tsirkin
On Thu, Sep 12, 2024 at 03:48:32PM +0200, Marco Elver wrote: > On Thu, 12 Sept 2024 at 13:03, Michael S. Tsirkin wrote: > > > > On Thu, Sep 12, 2024 at 01:11:21AM -0700, syzbot wrote: > > > Hello, > > > > > > syzbot found the following issue on: > > > > > > HEAD commit:7c6a3a65ace7 minmax: red

[PATCH] virtio_ring: tag event_triggered as racy for KCSAN

2024-09-12 Thread Michael S. Tsirkin
event_triggered is fundamentally racy. There are races of 2 types: 1. vq processing can read false value while interrupt triggered and set it to true. result will be a bit of extra work when disabling cbs, no big deal. 1. vq processing can set false value then interrupt immediately sets t

Re: [syzbot] [virt?] KCSAN: data-race in virtqueue_disable_cb / vring_interrupt (4)

2024-09-12 Thread Michael S. Tsirkin
On Thu, Sep 12, 2024 at 03:48:32PM +0200, Marco Elver wrote: > On Thu, 12 Sept 2024 at 13:03, Michael S. Tsirkin wrote: > > > > On Thu, Sep 12, 2024 at 01:11:21AM -0700, syzbot wrote: > > > Hello, > > > > > > syzbot found the following issue on: > > > > > > HEAD commit:7c6a3a65ace7 minmax: red

Re: [syzbot] [virt?] KCSAN: data-race in virtqueue_disable_cb / vring_interrupt (4)

2024-09-12 Thread Marco Elver
On Thu, 12 Sept 2024 at 16:34, Michael S. Tsirkin wrote: > > On Thu, Sep 12, 2024 at 03:48:32PM +0200, Marco Elver wrote: > > On Thu, 12 Sept 2024 at 13:03, Michael S. Tsirkin wrote: > > > > > > On Thu, Sep 12, 2024 at 01:11:21AM -0700, syzbot wrote: > > > > Hello, > > > > > > > > syzbot found th

Re: [PATCH] virtio_ring: tag event_triggered as racy for KCSAN

2024-09-12 Thread Marco Elver
On Thu, 12 Sept 2024 at 16:45, Michael S. Tsirkin wrote: > > event_triggered is fundamentally racy. There are races of 2 types: > 1. vq processing can read false value while interrupt >triggered and set it to true. >result will be a bit of extra work when disabling cbs, no big deal. > > 1.

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

2024-09-12 Thread Dave Stevenson
Hi André & Ricardo On Thu, 12 Sept 2024 at 14:41, Ricardo Ribalda Delgado wrote: > > Hi > > Arent you missing some chage in enum_frame_interval? Raw sensors shouldn't be using [enum|set|get]_frame_interval at all https://www.kernel.org/doc/html/latest/userspace-api/media/drivers/camera-sensor.ht

Re: [syzbot] [virt?] KCSAN: data-race in virtqueue_disable_cb / vring_interrupt (4)

2024-09-12 Thread Michael S. Tsirkin
On Thu, Sep 12, 2024 at 04:46:28PM +0200, Marco Elver wrote: > On Thu, 12 Sept 2024 at 16:34, Michael S. Tsirkin wrote: > > > > On Thu, Sep 12, 2024 at 03:48:32PM +0200, Marco Elver wrote: > > > On Thu, 12 Sept 2024 at 13:03, Michael S. Tsirkin wrote: > > > > > > > > On Thu, Sep 12, 2024 at 01:11

[PATCH v2] virtio_ring: tag event_triggered as racy for KCSAN

2024-09-12 Thread Michael S. Tsirkin
Setting event_triggered from the interrupt handler is fundamentally racy. There are races of 2 types: 1. vq processing can read false value while interrupt triggered and set it to true. result will be a bit of extra work when disabling cbs, no big deal. 1. vq processing can set false value t

Re: [PATCH v2] virtio_ring: tag event_triggered as racy for KCSAN

2024-09-12 Thread Marco Elver
On Thu, 12 Sept 2024 at 17:02, Michael S. Tsirkin wrote: > > Setting event_triggered from the interrupt handler > is fundamentally racy. There are races of 2 types: > 1. vq processing can read false value while interrupt >triggered and set it to true. >result will be a bit of extra work wh

Re: [PATCH 10/13] media: i2c: imx214: Implement vflip/hflip controls

2024-09-12 Thread Dave Stevenson
Hi André On Mon, 2 Sept 2024 at 22:54, André Apitzsch via B4 Relay wrote: > > From: André Apitzsch > > The imx214 sensor supports horizontal and vertical flipping. Add > appropriate controls to the driver. > > Signed-off-by: André Apitzsch > --- > drivers/media/i2c/imx214.c | 73 > +++

Re: [PATCH v3 0/6] livepatch: klp-convert tool - Minimal version

2024-09-12 Thread Joe Lawrence
On Tue, Aug 27, 2024 at 02:30:45PM +0200, Lukas Hruska wrote: > Summary > --- > > This is a significantly simplified version of the original klp-convert tool. > The klp-convert code has never got a proper review and also clean ups > were not easy. The last version was v7, see > https://lore.ke

Re: [PATCH] selftests: Makefile: add missing 'net/lib' to targets

2024-09-12 Thread Jakub Kicinski
On Thu, 12 Sep 2024 08:31:18 +0200 Anders Roxell wrote: > Fixes: 1d0dc857b5d8 ("selftests: drv-net: add checksum tests") > Signed-off-by: Anders Roxell > --- > tools/testing/selftests/Makefile | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/testing/selftests/Makefile > b/tools/te

Re: [PATCH v9 4/7] remoteproc: core: Add TEE interface support for firmware release

2024-09-12 Thread Mathieu Poirier
On Fri, Aug 30, 2024 at 11:51:44AM +0200, Arnaud Pouliquen wrote: > Add support for releasing remote processor firmware through > the Trusted Execution Environment (TEE) interface. > > The tee_rproc_release_fw() function is called in the following cases: > > - An error occurs in rproc_start() bet

Re: [PATCH] mailbox, remoteproc: omap2+: fix compile testing

2024-09-12 Thread Martyn Welch
On Mon, 2024-09-09 at 20:38 +, Arnd Bergmann wrote: > From: Arnd Bergmann > > Selecting CONFIG_OMAP2PLUS_MBOX while compile testing > causes a build failure: > > WARNING: unmet direct dependencies detected for OMAP2PLUS_MBOX >   Depends on [n]: MAILBOX [=y] && (ARCH_OMAP2PLUS || ARCH_K3) >  

Re: [PATCH v9 6/7] remoteproc: stm32: Create sub-functions to request shutdown and release

2024-09-12 Thread Mathieu Poirier
On Fri, Aug 30, 2024 at 11:51:46AM +0200, Arnaud Pouliquen wrote: > To prepare for the support of TEE remoteproc, create sub-functions > that can be used in both cases, with and without remoteproc TEE support. > > Signed-off-by: Arnaud Pouliquen > --- > drivers/remoteproc/stm32_rproc.c | 84

Re: [PATCH 1/2] kselftests: mm: Fix wrong __NR_userfaultfd value

2024-09-12 Thread Shuah Khan
On 9/12/24 04:31, Muhammad Usama Anjum wrote: The value of __NR_userfaultfd was changed to 282 when asm-generic/unistd.h was included. It makes the test to fail every time as the correct number of this syscall on x86_64 is 323. Fix the header to asm/unistd.h. "please elaborate every time" - I

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

2024-09-12 Thread Song Liu
Hi Josh, On Wed, Sep 11, 2024 at 9:20 AM Josh Poimboeuf wrote: [...] > > Do not get me wrong. I do not expect that the upstream variant would > > be feature complete from the beginning. I just want to get a picture > > how far it is. The code will be maintained only when it would have > > users.

Re: [PATCH v2 16/19] gendwarfksyms: Add support for reserved structure fields

2024-09-12 Thread Sami Tolvanen
On Wed, Sep 11, 2024 at 4:43 AM Petr Pavlu wrote: > > On 8/31/24 02:05, Sami Tolvanen wrote: > > On Fri, Aug 30, 2024 at 9:34 AM Miroslav Benes wrote: > >> > >> yes, this is one of the approaches we use in SLES. We add kabi paddings > >> to some structures in advance (see [1] as a random example)

Re: BUG: WARNING in kvfree_rcu_bulk

2024-09-12 Thread Uladzislau Rezki
> > > > > > Here is the config file: > > > https://gist.github.com/TomAPU/64f5db0fe976a3e94a6dd2b621887cdd > > > I tested your "reproducer" on 6.11.0-rc2. I see some panics and they are different. For example below one triggers: BUG: kernel NULL pointer dereference, address: 0010 Lin

Re: [PATCH 2/2] kselftests: mm: Fail the test if userfaultfd syscall isn't found

2024-09-12 Thread Shuah Khan
On 9/12/24 04:31, Muhammad Usama Anjum wrote: The userfaultfd is enabled in the config fragment of mm selftest suite. It must always be present. If it isn't present, we should throw error and not just skip. This would have helped us catch the test breakage. Please elaborate on this to help unde

Re: [PATCH v2] rcu/kvfree: Add kvfree_rcu_barrier() API

2024-09-12 Thread Uladzislau Rezki
On Wed, Sep 11, 2024 at 03:39:19AM -0700, Paul E. McKenney wrote: > On Wed, Sep 11, 2024 at 11:43:54AM +0200, Uladzislau Rezki wrote: > > On Tue, Sep 10, 2024 at 08:42:54AM -0700, Paul E. McKenney wrote: > > > On Tue, Aug 20, 2024 at 05:59:35PM +0200, Uladzislau Rezki (Sony) wrote: > > > > Add a kv

Re: [PATCH] selftests: Makefile: add missing 'net/lib' to targets

2024-09-12 Thread Shuah Khan
On 9/12/24 09:23, Jakub Kicinski wrote: On Thu, 12 Sep 2024 08:31:18 +0200 Anders Roxell wrote: Fixes: 1d0dc857b5d8 ("selftests: drv-net: add checksum tests") Signed-off-by: Anders Roxell --- tools/testing/selftests/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/s

[PATCH v1 0/5] Add Microchip IPC mailbox and remoteproc support

2024-09-12 Thread Valentina Fernandez
Hello all, This series adds support for the Microchip Inter-Processor Communication (IPC) mailbox controller, as well as an IPC remoteproc platform driver. Microchip's family of RISC-V SoCs typically has one or more clusters that can be configured to run in Asymmetric Multi-Processing (AMP) mode.

[PATCH v1 1/5] riscv: asm: vendorid_list: Add Microchip Technology to the vendor list

2024-09-12 Thread Valentina Fernandez
Add Microchip Technology to the RISC-V vendor list. Signed-off-by: Valentina Fernandez --- arch/riscv/include/asm/vendorid_list.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/include/asm/vendorid_list.h b/arch/riscv/include/asm/vendorid_list.h index 2f2bb0c84f9a..a5150cdf34d8

[PATCH v1 2/5] dt-bindings: mailbox: add binding for Microchip IPC mailbox driver

2024-09-12 Thread Valentina Fernandez
Add a dt-binding for the Microchip Inter-Processor Communication (IPC) mailbox controller. Signed-off-by: Valentina Fernandez --- .../bindings/mailbox/microchip,sbi-ipc.yaml | 115 ++ 1 file changed, 115 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailb

[PATCH v1 4/5] dt-bindings: remoteproc: add binding for Microchip IPC remoteproc

2024-09-12 Thread Valentina Fernandez
Microchip family of RISC-V SoCs typically has or more clusters. These clusters can be configured to run in Asymmetric Multi Processing (AMP) mode. Add a dt-binding for the Microchip IPC Remoteproc platform driver. Signed-off-by: Valentina Fernandez --- .../remoteproc/microchip,ipc-remoteproc.ya

[PATCH v1 3/5] mailbox: add Microchip IPC support

2024-09-12 Thread Valentina Fernandez
Add a mailbox controller driver for the Microchip Inter-processor Communication (IPC), which is used to send and receive data between processors. The driver uses the RISC-V Supervisor Binary Interface (SBI) to communicate with software running in machine mode (M-mode) to access the IPC hardware bl

[PATCH v1 5/5] remoteproc: add support for Microchip IPC remoteproc platform driver

2024-09-12 Thread Valentina Fernandez
The Microchip family of RISC-V SoCs typically has one or more clusters. These clusters can be configured to run in Asymmetric Multi-Processing (AMP) mode. Add a remoteproc platform driver to be able to load and boot firmware to the remote processor(s). The driver uses SBI (RISC-V Supervisor Binar

Re: [PATCH v1 2/5] dt-bindings: mailbox: add binding for Microchip IPC mailbox driver

2024-09-12 Thread Conor Dooley
On Thu, Sep 12, 2024 at 06:00:22PM +0100, Valentina Fernandez wrote: > Add a dt-binding for the Microchip Inter-Processor Communication (IPC) > mailbox controller. Before anyone else gets here, there's an erroneous "driver" in $subject :) > Signed-off-by: Valentina Fernandez > --- > .../binding

Re: [PATCH v1 1/5] riscv: asm: vendorid_list: Add Microchip Technology to the vendor list

2024-09-12 Thread Conor Dooley
On Thu, Sep 12, 2024 at 06:00:21PM +0100, Valentina Fernandez wrote: > Add Microchip Technology to the RISC-V vendor list. > > Signed-off-by: Valentina Fernandez In $subject "asm" should probably be "sbi", otherwise: Reviewed-by: Conor Dooley > --- > arch/riscv/include/asm/vendorid_list.h | 1

Re: [PATCH 2/2] kselftests: mm: Fail the test if userfaultfd syscall isn't found

2024-09-12 Thread Shuah Khan
On 9/12/24 10:10, Shuah Khan wrote: On 9/12/24 04:31, Muhammad Usama Anjum wrote: The userfaultfd is enabled in the config fragment of mm selftest suite. It must always be present. If it isn't present, we should throw error and not just skip. This would have helped us catch the test breakage.

[PATCH V2 00/13] selftests/resctrl: Support diverse platforms with MBM and MBA tests

2024-09-12 Thread Reinette Chatre
Changes since V1: - V1: https://lore.kernel.org/cover.1724970211.git.reinette.cha...@intel.com/ - V2 contains the same general solutions to stated problem as V1 but these are now preceded by more fixes (patches 1 to 5) and improved robustness (patches 6 to 9) to existing tests before the series

[PATCH V2 01/13] selftests/resctrl: Make functions only used in same file static

2024-09-12 Thread Reinette Chatre
Fix following sparse warnings: tools/testing/selftests/resctrl/resctrl_val.c:47:6: warning: symbol 'membw_initialize_perf_event_attr' was not declared. Should it be static? tools/testing/selftests/resctrl/resctrl_val.c:64:6: warning: symbol 'membw_ioctl_perf_event_ioc_reset_enable' was not decl

[PATCH V2 02/13] selftests/resctrl: Print accurate buffer size as part of MBM results

2024-09-12 Thread Reinette Chatre
By default the MBM test uses the "fill_buf" benchmark to keep reading from a buffer with size DEFAULT_SPAN while measuring memory bandwidth. User space can provide an alternate benchmark or amend the size of the buffer "fill_buf" should use. Analysis of the MBM measurements do not require that a b

[PATCH V2 03/13] selftests/resctrl: Fix memory overflow due to unhandled wraparound

2024-09-12 Thread Reinette Chatre
alloc_buffer() allocates and initializes (with random data) a buffer of requested size. The initialization starts from the beginning of the allocated buffer and incrementally assigns sizeof(uint64_t) random data to each cache line. The initialization uses the size of the buffer to control the initi

[PATCH V2 05/13] selftests/resctrl: Make wraparound handling obvious

2024-09-12 Thread Reinette Chatre
Within mba_setup() the programmed bandwidth delay value starts at the maximum (100, or rather ALLOCATION_MAX) and progresses towards ALLOCATION_MIN by decrementing with ALLOCATION_STEP. The programmed bandwidth delay should never be negative, so representing it with an unsigned int is most appropr

[PATCH V2 04/13] selftests/resctrl: Protect against array overrun during iMC config parsing

2024-09-12 Thread Reinette Chatre
The MBM and MBA tests need to discover the event and umask with which to configure the performance event used to measure read memory bandwidth. This is done by parsing the /sys/bus/event_source/devices/uncore_imc_/events/cas_count_read file for each iMC instance that contains the formatted output:

[PATCH V2 06/13] selftests/resctrl: Remove "once" parameter required to be false

2024-09-12 Thread Reinette Chatre
The CMT, MBM, and MBA tests rely on a benchmark that runs while the test makes changes to needed configuration (for example memory bandwidth allocation) and takes needed measurements. By default the "fill_buf" benchmark is used and by default (via its "once = false" setting) "fill_buf" is configure

[PATCH V2 07/13] selftests/resctrl: Only support measured read operation

2024-09-12 Thread Reinette Chatre
The CMT, MBM, and MBA tests rely on a benchmark to generate memory traffic. By default this is the "fill_buf" benchmark that can be replaced via the "-b" command line argument. The original intent of the "-b" command line parameter was to replace the default "fill_buf" benchmark, but the implement

[PATCH V2 08/13] selftests/resctrl: Remove unused measurement code

2024-09-12 Thread Reinette Chatre
The MBM and MBA resctrl selftests run a benchmark during which it takes measurements of read memory bandwidth via perf. Code exists to support measurements of write memory bandwidth but there exists no path with which this code can execute. While code exists for write memory bandwidth measurement

[PATCH V2 09/13] selftests/resctrl: Make benchmark parameter passing robust

2024-09-12 Thread Reinette Chatre
The benchmark used during the CMT, MBM, and MBA tests can be provided by the user via (-b) parameter, if not provided the default "fill_buf" benchmark is used. The user is additionally able to override any of the "fill_buf" default parameters when running the tests with "-b fill_buf ". The "fill_b

[PATCH V2 11/13] selftests/resctrl: Use cache size to determine "fill_buf" buffer size

2024-09-12 Thread Reinette Chatre
By default the MBM and MBA tests use the "fill_buf" benchmark to read from a buffer with the goal to measure the memory bandwidth generated by this buffer access. Care should be taken when sizing the buffer used by the "fill_buf" benchmark. If the buffer is small enough to fit in the cache then it

[PATCH V2 10/13] selftests/resctrl: Ensure measurements skip initialization of default benchmark

2024-09-12 Thread Reinette Chatre
The CMT, MBA, and MBM tests rely on the resctrl_val() wrapper to start and run a benchmark while providing test specific flows via callbacks to do test specific configuration and measurements. At a high level, the resctrl_val() flow is: a) Start by fork()ing a child process that installs a

[PATCH V2 12/13] selftests/resctrl: Do not compare performance counters and resctrl at low bandwidth

2024-09-12 Thread Reinette Chatre
The MBA test incrementally throttles memory bandwidth, each time followed by a comparison between the memory bandwidth observed by the performance counters and resctrl respectively. While a comparison between performance counters and resctrl is generally appropriate, they do not have an identical

[PATCH V2 13/13] selftests/resctrl: Keep results from first test run

2024-09-12 Thread Reinette Chatre
The resctrl selftests drop the results from every first test run to avoid (per comment) "inaccurate due to monitoring setup transition phase" data. Previously inaccurate data resulted from workloads needing some time to "settle" and also the measurements themselves to account for earlier measuremen

Re: [PATCH v2] rcu/kvfree: Add kvfree_rcu_barrier() API

2024-09-12 Thread Paul E. McKenney
On Thu, Sep 12, 2024 at 06:16:56PM +0200, Uladzislau Rezki wrote: > On Wed, Sep 11, 2024 at 03:39:19AM -0700, Paul E. McKenney wrote: > > On Wed, Sep 11, 2024 at 11:43:54AM +0200, Uladzislau Rezki wrote: > > > On Tue, Sep 10, 2024 at 08:42:54AM -0700, Paul E. McKenney wrote: > > > > On Tue, Aug 20,

Re: [PATCH v2 16/19] gendwarfksyms: Add support for reserved structure fields

2024-09-12 Thread Benno Lossin
On 12.09.24 18:06, Sami Tolvanen wrote: > On Wed, Sep 11, 2024 at 4:43 AM Petr Pavlu wrote: >> >> On 8/31/24 02:05, Sami Tolvanen wrote: >>> On Fri, Aug 30, 2024 at 9:34 AM Miroslav Benes wrote: yes, this is one of the approaches we use in SLES. We add kabi paddings to some structu

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

2024-09-12 Thread Alexis Lothoré
Hi Simon, On 9/11/24 16:18, Simon Horman wrote: [...] >> diff --git a/tools/testing/selftests/bpf/prog_tests/xdp_features.c >> b/tools/testing/selftests/bpf/prog_tests/xdp_features.c >> new file mode 100644 >> index ..bcb36a2d2767 >> --- /dev/null >> +++ b/tools/testing/selftests/bp

Re: [PATCH] selftest/mm: Do not use hint for riscv mmap

2024-09-12 Thread Charlie Jenkins
On Thu, Sep 12, 2024 at 06:00:18PM +0800, Chunyan Zhang wrote: > When the virtual address range selftest is run on RISC-V platforms, > it is observed that using the hint address when calling mmap cannot > get the address in the range of that validate_addr() checks, also > that will cause '/proc/sel

Re: [PATCH v2 16/19] gendwarfksyms: Add support for reserved structure fields

2024-09-12 Thread Sami Tolvanen
Hi Benno, On Thu, Sep 12, 2024 at 11:08 AM Benno Lossin wrote: > > On 12.09.24 18:06, Sami Tolvanen wrote: > > > > I thought about this a bit and I wonder if we need a separate > > mechanism for that, or is it sufficient to just #define any additional > > hidden values you want to add instead of

Re: [PATCH v1 2/5] dt-bindings: mailbox: add binding for Microchip IPC mailbox driver

2024-09-12 Thread Samuel Holland
Hi Valentina, On 2024-09-12 12:00 PM, Valentina Fernandez wrote: > Add a dt-binding for the Microchip Inter-Processor Communication (IPC) > mailbox controller. > > Signed-off-by: Valentina Fernandez > --- > .../bindings/mailbox/microchip,sbi-ipc.yaml | 115 ++ > 1 file changed

Re: [PATCH v1 3/5] mailbox: add Microchip IPC support

2024-09-12 Thread Samuel Holland
Hi Valentina, On 2024-09-12 12:00 PM, Valentina Fernandez wrote: > +static int mchp_ipc_probe(struct platform_device *pdev) > +{ > + struct device *dev = &pdev->dev; > + struct mchp_ipc_probe ipc_info; > + struct microchip_ipc *ipc; > + struct ipc_chan_info *priv; > + bool irq_

Re: [PATCH] kunit: tool: Build compile_commands.json

2024-09-12 Thread Justin Stitt
On Thu, May 16, 2024 at 12:38 PM Brendan Jackman wrote: > > compile_commands.json is used by clangd[1] to provide code navigation > and completion functionality to editors. See [2] for an example > configuration that includes this functionality for VSCode. > > It can currently be built manually wh

Re: [PATCH v2 16/19] gendwarfksyms: Add support for reserved structure fields

2024-09-12 Thread Benno Lossin
On 12.09.24 22:58, Sami Tolvanen wrote: > Hi Benno, > > On Thu, Sep 12, 2024 at 11:08 AM Benno Lossin wrote: >> >> On 12.09.24 18:06, Sami Tolvanen wrote: >>> >>> I thought about this a bit and I wonder if we need a separate >>> mechanism for that, or is it sufficient to just #define any addition

Re: [PATCH v2 16/19] gendwarfksyms: Add support for reserved structure fields

2024-09-12 Thread Sami Tolvanen
Hi, On Thu, Sep 12, 2024 at 2:58 PM Benno Lossin wrote: > > On 12.09.24 22:58, Sami Tolvanen wrote: > > That's an interesting point. Is the problem that you cannot assign > > arbitrary values to the Rust enum that bindgen generates, or is using > > a #define the problem? We could probably just ma

Re: [PATCH] selftest/mm: Do not use hint for riscv mmap

2024-09-12 Thread Chunyan Zhang
On Fri, 13 Sept 2024 at 04:47, Charlie Jenkins wrote: > > On Thu, Sep 12, 2024 at 06:00:18PM +0800, Chunyan Zhang wrote: > > When the virtual address range selftest is run on RISC-V platforms, > > it is observed that using the hint address when calling mmap cannot > > get the address in the range

Re: CPUMAP latency metrics (was: [PATCH bpf-next] bpf: ringbuf: Support consuming BPF_MAP_TYPE_RINGBUF from prog)

2024-09-12 Thread Daniel Xu
On Thu, Sep 12, 2024, at 2:40 AM, Jesper Dangaard Brouer wrote: > On 11/09/2024 20.53, Daniel Xu wrote: >> On Wed, Sep 11, 2024 at 10:32:56AM GMT, Jesper Dangaard Brouer wrote: >>> >>> >>> On 11/09/2024 06.43, Daniel Xu wrote: [cc Jesper] On Tue, Sep 10, 2024, at 8:31 PM, Daniel X

[PATCH 2/2] selftests/mm: skip virtual_address_range tests on riscv

2024-09-12 Thread Chunyan Zhang
RISC-V doesn't currently have the behavior of restricting the virtual address space which virtual_address_range tests check, this will cause the tests fail. So lets disable the whole test suite for riscv64 for now, not build it and run_vmtests.sh will skip it if it is not present. Signed-off-by: C

[PATCH 1/2] selftest/mm: Fix typo in virtual_address_range

2024-09-12 Thread Chunyan Zhang
The function name should be *hint* address, so correct it. Signed-off-by: Chunyan Zhang --- tools/testing/selftests/mm/virtual_address_range.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/mm/virtual_address_range.c b/tools/testing/selftests/mm/

RE: [PATCH v2 17/19] iommu/arm-smmu-v3: Add arm_smmu_viommu_cache_invalidate

2024-09-12 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, September 12, 2024 7:08 AM > > On Wed, Sep 11, 2024 at 08:13:01AM +, Tian, Kevin wrote: > > > Probably there is a good reason e.g. for simplification or better > > aligned with hw accel stuff. But it's not explained clearly so far. > > Probably the

Re: [PATCH 1/2] selftest/mm: Fix typo in virtual_address_range

2024-09-12 Thread Charlie Jenkins
On Fri, Sep 13, 2024 at 10:26:34AM +0800, Chunyan Zhang wrote: > The function name should be *hint* address, so correct it. > > Signed-off-by: Chunyan Zhang Reviewed-by: Charlie Jenkins > --- > tools/testing/selftests/mm/virtual_address_range.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 d

Re: [PATCH 2/2] selftests/mm: skip virtual_address_range tests on riscv

2024-09-12 Thread Charlie Jenkins
On Fri, Sep 13, 2024 at 10:26:35AM +0800, Chunyan Zhang wrote: > RISC-V doesn't currently have the behavior of restricting the virtual > address space which virtual_address_range tests check, this will > cause the tests fail. So lets disable the whole test suite for riscv64 > for now, not build it

Re: [PATCH v2] virtio_ring: tag event_triggered as racy for KCSAN

2024-09-12 Thread Jason Wang
On Thu, Sep 12, 2024 at 11:02 PM Michael S. Tsirkin wrote: > > Setting event_triggered from the interrupt handler > is fundamentally racy. There are races of 2 types: > 1. vq processing can read false value while interrupt >triggered and set it to true. >result will be a bit of extra work

Re: [PATCH 2/2] selftests/mm: skip virtual_address_range tests on riscv

2024-09-12 Thread Chunyan Zhang
Hi Charlie, On Fri, 13 Sept 2024 at 11:22, Charlie Jenkins wrote: > > On Fri, Sep 13, 2024 at 10:26:35AM +0800, Chunyan Zhang wrote: > > RISC-V doesn't currently have the behavior of restricting the virtual > > address space which virtual_address_range tests check, this will > > cause the tests f

[PATCH -next] KVM: selftests: Use ARRAY_SIZE for array length

2024-09-12 Thread Jiapeng Chong
Use of macro ARRAY_SIZE to calculate array size minimizes the redundant code and improves code reusability. ./tools/testing/selftests/kvm/x86_64/debug_regs.c:169:32-33: WARNING: Use ARRAY_SIZE. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=10847 Signed-off-by: