[PATCH v4 3/4] media: dt-bindings: Add qcom,msm8939-camss

2025-06-02 Thread Vincent Knecht via B4 Relay
From: Vincent Knecht Add bindings for qcom,msm8939-camss in order to support the camera subsystem for MSM8939. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Vincent Knecht --- .../bindings/media/qcom,msm8939-camss.yaml | 254 + 1 file changed, 254 insertions

[PATCH v4 4/4] arm64: dts: qcom: msm8939: Add camss and cci

2025-06-02 Thread Vincent Knecht via B4 Relay
From: Vincent Knecht Add the camera subsystem and CCI used to interface with cameras on the Snapdragon 615. Reviewed-by: Konrad Dybcio Signed-off-by: Vincent Knecht --- arch/arm64/boot/dts/qcom/msm8939-pm8916.dtsi | 4 + arch/arm64/boot/dts/qcom/msm8939.dtsi| 146

[PATCH v4 2/4] media: qcom: camss: Add support for MSM8939

2025-06-02 Thread Vincent Knecht via B4 Relay
From: Vincent Knecht The camera subsystem for the MSM8939 is the same as MSM8916 except with 3 CSID instead of 2, and some higher clock rates. As a quirk, this SoC needs writing values to 2 VFE VBIF registers (see downstream msm8939-camera.dtsi vbif-{regs,settings} properties). This fixes black

[PATCH v4 0/4] CAMSS support for MSM8939

2025-06-02 Thread Vincent Knecht via B4 Relay
that. Patch 1: adds helper for VFE VBIF settings Patch 2: adds CAMSS_8x39 version in CAMSS driver Patch 3: documents qcom,msm8939-camss DT bindings Patch 4: adds camss and cci in msm8939.dtsi Signed-off-by: Vincent Knecht --- Changes in v4: - Picked up tags - Patch 1: - Fix alignment to match op

[PATCH v4 1/4] media: qcom: camss: vfe: Add VBIF setting support

2025-06-02 Thread Vincent Knecht via B4 Relay
From: Vincent Knecht Some devices need writing values to VFE VBIF registers. Add helper functions to do this. Reviewed-by: Bryan O'Donoghue Signed-off-by: Vincent Knecht --- drivers/media/platform/qcom/camss/Makefile | 1 + drivers/media/platform/qcom/camss/camss-vfe-4-1.c

[PATCH v3 4/4] arm64: dts: qcom: msm8939: Add camss and cci

2025-05-30 Thread Vincent Knecht via B4 Relay
From: Vincent Knecht Add the camera subsystem and CCI used to interface with cameras on the Snapdragon 615. Signed-off-by: Vincent Knecht --- arch/arm64/boot/dts/qcom/msm8939-pm8916.dtsi | 4 + arch/arm64/boot/dts/qcom/msm8939.dtsi| 146 +++ 2 files changed

[PATCH v3 0/4] CAMSS support for MSM8939

2025-05-30 Thread Vincent Knecht via B4 Relay
that. Patch 1: adds helper for VFE VBIF settings Patch 2: adds CAMSS_8x39 version in CAMSS driver Patch 3: documents qcom,msm8939-camss DT bindings Patch 4: adds camss and cci in msm8939.dtsi Signed-off-by: Vincent Knecht --- Changes in v3: - Patch 1: - Use braces around multiline (Bryan) - R

[PATCH v3 1/4] media: qcom: camss: vfe: Add VBIF setting support

2025-05-30 Thread Vincent Knecht via B4 Relay
From: Vincent Knecht Some devices need writing values to VFE VBIF registers. Add helper functions to do this. Signed-off-by: Vincent Knecht --- drivers/media/platform/qcom/camss/Makefile | 1 + drivers/media/platform/qcom/camss/camss-vfe-4-1.c | 12 +++ drivers/media

[PATCH v3 3/4] media: dt-bindings: Add qcom,msm8939-camss

2025-05-30 Thread Vincent Knecht via B4 Relay
From: Vincent Knecht Add bindings for qcom,msm8939-camss in order to support the camera subsystem for MSM8939. Signed-off-by: Vincent Knecht --- .../bindings/media/qcom,msm8939-camss.yaml | 253 + 1 file changed, 253 insertions(+) diff --git a/Documentation

[PATCH v3 2/4] media: qcom: camss: Add support for MSM8939

2025-05-30 Thread Vincent Knecht via B4 Relay
From: Vincent Knecht The camera subsystem for the MSM8939 is the same as MSM8916 except with 3 CSID instead of 2, and some higher clock rates. As a quirk, this SoC needs writing values to 2 VFE VBIF registers (see downstream msm8939-camera.dtsi vbif-{regs,settings} properties). This fixes black

Re: [PATCH v2 2/4] media: qcom: camss: Add support for MSM8939

2025-05-26 Thread Vincent Knecht
Le lundi 26 mai 2025 à 09:20 +0100, Bryan O'Donoghue a écrit : > On 25/05/2025 20:25, Vincent Knecht via B4 Relay wrote: > > From: Vincent Knecht > > > > The camera subsystem for the MSM8939 is the same as MSM8916 except with > > 3 CSID instead of 2, and some h

Re: [PATCH v2 1/4] media: qcom: camss: vfe: Add VBIF setting support

2025-05-26 Thread Vincent Knecht
Le lundi 26 mai 2025 à 09:13 +0100, Bryan O'Donoghue a écrit : > On 25/05/2025 20:25, Vincent Knecht via B4 Relay wrote: > > +void vfe_vbif_reg_write(struct vfe_device *vfe, u32 reg, u32 val); > > write_reg() / read_reg() > > --- > bod Do you mean to just rename to

[PATCH v2 4/4] arm64: dts: qcom: msm8939: Add camss and cci

2025-05-25 Thread Vincent Knecht via B4 Relay
From: Vincent Knecht Add the camera subsystem and CCI used to interface with cameras on the Snapdragon 615. Signed-off-by: Vincent Knecht --- arch/arm64/boot/dts/qcom/msm8939-pm8916.dtsi | 4 + arch/arm64/boot/dts/qcom/msm8939.dtsi| 146 +++ 2 files changed

[PATCH v2 3/4] media: dt-bindings: Add qcom,msm8939-camss

2025-05-25 Thread Vincent Knecht via B4 Relay
From: Vincent Knecht Add bindings for qcom,msm8939-camss in order to support the camera subsystem for MSM8939. Signed-off-by: Vincent Knecht --- .../bindings/media/qcom,msm8939-camss.yaml | 253 + 1 file changed, 253 insertions(+) diff --git a/Documentation

[PATCH v2 2/4] media: qcom: camss: Add support for MSM8939

2025-05-25 Thread Vincent Knecht via B4 Relay
From: Vincent Knecht The camera subsystem for the MSM8939 is the same as MSM8916 except with 3 CSID instead of 2, and some higher clock rates. As a quirk, this SoC needs writing values to 2 VFE VBIF registers (see downstream msm8939-camera.dtsi vbif-{regs,settings} properties). This fixes black

[PATCH v2 0/4] CAMSS support for MSM8939

2025-05-25 Thread Vincent Knecht via B4 Relay
that. Patch 1: adds helper for VFE VBIF settings Patch 2: adds CAMSS_8x39 version in CAMSS driver Patch 3: documents qcom,msm8939-camss DT bindings Patch 4: adds camss and cci in msm8939.dtsi Signed-off-by: Vincent Knecht --- Changes in v2: - Patch 1: - Fix devm_platform_ioremap_resource_byname

[PATCH v2 1/4] media: qcom: camss: vfe: Add VBIF setting support

2025-05-25 Thread Vincent Knecht via B4 Relay
From: Vincent Knecht Some devices need writing values to VFE VBIF registers. Add helper functions to do this. Signed-off-by: Vincent Knecht --- drivers/media/platform/qcom/camss/Makefile | 1 + drivers/media/platform/qcom/camss/camss-vfe-4-1.c | 11 drivers/media/platform

[PATCH 4/4] arm64: dts: qcom: msm8939: Add camss and cci

2025-05-20 Thread Vincent Knecht via B4 Relay
From: Vincent Knecht Add the camera subsystem and CCI used to interface with cameras on the Snapdragon 615. Signed-off-by: Vincent Knecht --- arch/arm64/boot/dts/qcom/msm8939-pm8916.dtsi | 4 + arch/arm64/boot/dts/qcom/msm8939.dtsi| 152 +++ 2 files changed

[PATCH 0/4] CAMSS support for MSM8939

2025-05-20 Thread Vincent Knecht via B4 Relay
that. Patch 1: adds helper for VFE VBIF settings Patch 2: adds CAMSS_8x39 version in CAMSS driver Patch 3: documents qcom,msm8939-camss DT bindings Patch 4: adds camss and cci in msm8939.dtsi Signed-off-by: Vincent Knecht --- Vincent Knecht (4): media: qcom: camss: vfe: Add VBIF setting su

[PATCH 2/4] media: qcom: camss: Add support for MSM8939

2025-05-20 Thread Vincent Knecht via B4 Relay
From: Vincent Knecht The camera subsystem for the MSM8939 is the same as MSM8916 except with 3 CSID instead of 2, and some higher clock rates. As a quirk, this SoC needs writing values to 2 VFE VBIF registers (see downstream msm8939-camera.dtsi vbif-{regs,settings} properties). This fixes black

[PATCH 3/4] media: dt-bindings: Add qcom,msm8939-camss

2025-05-20 Thread Vincent Knecht via B4 Relay
From: Vincent Knecht Add bindings for qcom,msm8939-camss in order to support the camera subsystem for MSM8939. Signed-off-by: Vincent Knecht --- .../bindings/media/qcom,msm8939-camss.yaml | 269 + 1 file changed, 269 insertions(+) diff --git a/Documentation

[PATCH 1/4] media: qcom: camss: vfe: Add VBIF setting support

2025-05-20 Thread Vincent Knecht via B4 Relay
From: Vincent Knecht Some devices need writing values to VFE VBIF registers. Add helper functions to do this. Signed-off-by: Vincent Knecht --- drivers/media/platform/qcom/camss/Makefile | 1 + drivers/media/platform/qcom/camss/camss-vfe-vbif.c | 30 ++ drivers

[PATCH] media: i2c: ov8858: Add sensor's pixel matrix size

2025-05-09 Thread Vincent Knecht via B4 Relay
From: Vincent Knecht The OV8858 pixel array is composed as: - vertically: 16 dummy columns, 3264 valid ones and 16 dummy columns for a total of 3296 columns - horizontally: 24 optical black lines, 16 dummy ones, 2448 valid, 16 dummies and 24 optical black lines for a total of 2528 lines Set

[PATCH RESEND2 v2] clk: qcom: gcc-msm8939: Fix mclk0 & mclk1 for 24 MHz

2025-04-14 Thread Vincent Knecht via B4 Relay
From: Vincent Knecht Fix mclk0 & mclk1 parent map to use correct GPLL6 configuration and freq_tbl to use GPLL6 instead of GPLL0 so that they tick at 24 MHz. Fixes: 1664014e4679 ("clk: qcom: gcc-msm8939: Add MSM8939 Generic Clock Controller") Suggested-by: Stephan Gerhold Revie

Re: [PATCH v2 5/8] net: af_can: do not leave a dangling sk pointer in can_create()

2024-10-07 Thread Vincent MAILHOL
f this series, it seems that the use-after-free is not possible anymore. > Signed-off-by: Ignat Korchagin See above comment as notwithstanding. This said: Reviewed-by: Vincent Mailhol > --- > net/can/af_can.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/net/

[PATCH v2] module: Refine kmemleak scanned areas

2024-09-10 Thread Vincent Donnefort
ata. This means sections such as .text and .rodata are scanned by kmemleak. Refine the scanned areas for modules by limiting it to MOD_TEXT and MOD_INIT_TEXT mod_mem regions. CC: Song Liu Reviewed-by: Catalin Marinas Signed-off-by: Vincent Donnefort --- v1 -> v2: - Collect Reviewed-by

Re: [PATCH] module: Refine kmemleak scanned areas

2024-09-09 Thread Vincent Donnefort
On Mon, Sep 09, 2024 at 09:52:57AM +0100, Catalin Marinas wrote: > On Mon, Sep 09, 2024 at 08:40:34AM +0100, Vincent Donnefort wrote: > > On Sat, Sep 07, 2024 at 03:12:13PM +0100, Catalin Marinas wrote: > > > On Fri, Sep 06, 2024 at 04:38:56PM +0100, Vincent Donnefort wro

Re: [PATCH] module: Refine kmemleak scanned areas

2024-09-09 Thread Vincent Donnefort
On Sat, Sep 07, 2024 at 03:12:13PM +0100, Catalin Marinas wrote: > On Fri, Sep 06, 2024 at 04:38:56PM +0100, Vincent Donnefort wrote: > > commit ac3b43283923 ("module: replace module_layout with module_memory") > > introduced a set of memory regions for the module la

[PATCH] module: Refine kmemleak scanned areas

2024-09-06 Thread Vincent Donnefort
means sections such as .text and .rodata are scanned by kmemleak. Refine the scanned areas for modules by limiting it to MOD_TEXT and MOD_INIT_TEXT mod_mem regions. CC: Song Liu CC: Catalin Marinas Signed-off-by: Vincent Donnefort diff --git a/kernel/module/debug_kmemleak.c b/kernel/module/d

[PATCH 2/2] ring-buffer/selftest: Handle meta-page bigger than the system

2024-08-28 Thread Vincent Donnefort
Handle the case where the meta-page content is bigger than the system page-size. This prepares the ground for extending features covered by the meta-page. Signed-off-by: Vincent Donnefort diff --git a/tools/testing/selftests/ring-buffer/map_test.c b/tools/testing/selftests/ring-buffer

[PATCH 1/2] ring-buffer/selftest: Verify the entire meta-page padding

2024-08-28 Thread Vincent Donnefort
Improve the ring-buffer meta-page test coverage by checking for the entire padding region to be 0 instead of just looking at the first 4 bytes. Signed-off-by: Vincent Donnefort -- Hi, I saw you have sent "Align meta-page to sub-buffers for improved TLB usage" to linux-next, so here&

[PATCH v2] ring-buffer: Align meta-page to sub-buffers for improved TLB usage

2024-06-28 Thread Vincent Donnefort
sub-buffers. Also update the ring-buffer map_test to verify that padding. Signed-off-by: Vincent Donnefort -- This is based on the mm-unstable branch [1] as it depends on David's work [2] for allowing the zero-page in vm_insert_page(). [1] https://git.kernel.org/pub/scm/linux/kernel/git

[PATCH] ring-buffer: Align meta-page to sub-buffers for improved TLB usage

2024-05-23 Thread Vincent Donnefort
sub-buffers. Also update the ring-buffer map_test to verify that padding. Signed-off-by: Vincent Donnefort -- This is based on the mm-unstable branch [1] as it depends on David's work [2] for allowing the zero-page in vm_insert_page(). [1] https://git.kernel.org/pub/scm/linux/kernel/git

[PATCH v23 4/5] Documentation: tracing: Add ring-buffer mapping

2024-05-10 Thread Vincent Donnefort
It is now possible to mmap() a ring-buffer to stream its content. Add some documentation and a code example. Signed-off-by: Vincent Donnefort diff --git a/Documentation/trace/index.rst b/Documentation/trace/index.rst index 5092d6c13af5..0b300901fd75 100644 --- a/Documentation/trace/index.rst

[PATCH v23 3/5] tracing: Allow user-space mapping of the ring-buffer

2024-05-10 Thread Vincent Donnefort
L_GET_READER. This will update the Meta-page reader ID to point to the next reader containing unread data. Mapping will prevent snapshot and buffer size modifications. CC: Signed-off-by: Vincent Donnefort diff --git a/include/uapi/linux/trace_mmap.h b/include/uapi/linux/trace_mmap.h index

[PATCH v23 2/5] ring-buffer: Introducing ring-buffer mapping functions

2024-05-10 Thread Vincent Donnefort
during the first mapping. Once mapped, no subbuf can get in or out of the ring-buffer: the buffer size will remain unmodified and the splice enabling functions will in reality simply memcpy the data instead of swapping subbufs. CC: Signed-off-by: Vincent Donnefort diff --git a/include/linux

[PATCH v23 1/5] ring-buffer: Allocate sub-buffers with __GFP_COMP

2024-05-10 Thread Vincent Donnefort
In preparation for the ring-buffer memory mapping, allocate compound pages for the ring-buffer sub-buffers to enable us to map them to user-space with vm_insert_pages(). Acked-by: David Hildenbrand Signed-off-by: Vincent Donnefort diff --git a/kernel/trace/ring_buffer.c b/kernel/trace

[PATCH v23 0/5] Introducing trace buffer mapping by user-space

2024-05-10 Thread Vincent Donnefort
f the ring-buffer, in a similar fashion to what trace_pipe offers. Support for this new feature can already be found in libtracefs from version 1.8, when built with EXTRA_CFLAGS=-DFORCE_MMAP_ENABLE. Vincent v22 -> v23: * Remove VM_IO (Prevent ptrace and does not bring any other useful pr

Re: [PATCH v22 2/5] ring-buffer: Introducing ring-buffer mapping functions

2024-05-10 Thread Vincent Donnefort
[...] > > > + > > > + while (s < nr_subbufs && p < nr_pages) { > > > + struct page *page = virt_to_page(cpu_buffer->subbuf_ids[s]); > > > + int off = 0; > > > + > > > + for (; off < (1 << (subbuf_order)); off++, page++) { > > > + if (p >= nr_pages) > > > +

Re: [PATCH v22 2/5] ring-buffer: Introducing ring-buffer mapping functions

2024-05-10 Thread Vincent Donnefort
On Fri, May 10, 2024 at 11:15:59AM +0200, David Hildenbrand wrote: > On 09.05.24 13:05, Vincent Donnefort wrote: > > On Tue, May 07, 2024 at 10:34:02PM -0400, Steven Rostedt wrote: > > > On Tue, 30 Apr 2024 12:13:51 +0100 > > > Vincent Donnefort wrote: > &

Re: [PATCH v22 2/5] ring-buffer: Introducing ring-buffer mapping functions

2024-05-09 Thread Vincent Donnefort
On Tue, May 07, 2024 at 10:34:02PM -0400, Steven Rostedt wrote: > On Tue, 30 Apr 2024 12:13:51 +0100 > Vincent Donnefort wrote: > > > +#ifdef CONFIG_MMU > > +static int __rb_map_vma(struct ring_buffer_per_cpu *cpu_buffer, > > +

Re: [PATCH v22 2/5] ring-buffer: Introducing ring-buffer mapping functions

2024-05-02 Thread Vincent Donnefort
On Thu, May 02, 2024 at 03:30:32PM +0200, David Hildenbrand wrote: > On 30.04.24 13:13, Vincent Donnefort wrote: > > In preparation for allowing the user-space to map a ring-buffer, add > > a set of mapping functions: > > > >ring_buffer_{map,unmap}() > > &g

[PATCH v22 4/5] Documentation: tracing: Add ring-buffer mapping

2024-04-30 Thread Vincent Donnefort
It is now possible to mmap() a ring-buffer to stream its content. Add some documentation and a code example. Signed-off-by: Vincent Donnefort diff --git a/Documentation/trace/index.rst b/Documentation/trace/index.rst index 5092d6c13af5..0b300901fd75 100644 --- a/Documentation/trace/index.rst

[PATCH v22 3/5] tracing: Allow user-space mapping of the ring-buffer

2024-04-30 Thread Vincent Donnefort
L_GET_READER. This will update the Meta-page reader ID to point to the next reader containing unread data. Mapping will prevent snapshot and buffer size modifications. CC: Signed-off-by: Vincent Donnefort diff --git a/include/uapi/linux/trace_mmap.h b/include/uapi/linux/trace_mmap.h index

[PATCH v22 2/5] ring-buffer: Introducing ring-buffer mapping functions

2024-04-30 Thread Vincent Donnefort
during the first mapping. Once mapped, no subbuf can get in or out of the ring-buffer: the buffer size will remain unmodified and the splice enabling functions will in reality simply memcpy the data instead of swapping subbufs. CC: Signed-off-by: Vincent Donnefort diff --git a/include/linux

[PATCH v22 1/5] ring-buffer: Allocate sub-buffers with __GFP_COMP

2024-04-30 Thread Vincent Donnefort
In preparation for the ring-buffer memory mapping, allocate compound pages for the ring-buffer sub-buffers to enable us to map them to user-space with vm_insert_pages(). Signed-off-by: Vincent Donnefort diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 25476ead681b

[PATCH v22 0/5] Introducing trace buffer mapping by user-space

2024-04-30 Thread Vincent Donnefort
f the ring-buffer, in a similar fashion to what trace_pipe offers. Support for this new feature can already be found in libtracefs from version 1.8, when built with EXTRA_CFLAGS=-DFORCE_MMAP_ENABLE. Vincent v21 -> v22: * Remove DONTDUMP (VM_IO implies DONTDUMP already) * Remove MIXEDMAP (

Re: [PATCH v21 2/5] ring-buffer: Introducing ring-buffer mapping functions

2024-04-25 Thread Vincent Donnefort
On Wed, Apr 24, 2024 at 10:55:54PM +0200, David Hildenbrand wrote: > On 24.04.24 22:31, Vincent Donnefort wrote: > > Hi David, > > > > Thanks for your quick response. > > > > On Wed, Apr 24, 2024 at 05:26:39PM +0200, David Hildenbrand wrote: > > > >

Re: [PATCH v21 2/5] ring-buffer: Introducing ring-buffer mapping functions

2024-04-24 Thread Vincent Donnefort
Hi David, Thanks for your quick response. On Wed, Apr 24, 2024 at 05:26:39PM +0200, David Hildenbrand wrote: > > I gave it some more thought, and I think we are still missing something (I > wish PFNMAP/MIXEDMAP wouldn't be that hard). > > > + > > +/* > > + * +--+ pgoff == 0 > > +

[PATCH v21 4/5] Documentation: tracing: Add ring-buffer mapping

2024-04-23 Thread Vincent Donnefort
It is now possible to mmap() a ring-buffer to stream its content. Add some documentation and a code example. Signed-off-by: Vincent Donnefort diff --git a/Documentation/trace/index.rst b/Documentation/trace/index.rst index 5092d6c13af5..0b300901fd75 100644 --- a/Documentation/trace/index.rst

[PATCH v21 3/5] tracing: Allow user-space mapping of the ring-buffer

2024-04-23 Thread Vincent Donnefort
L_GET_READER. This will update the Meta-page reader ID to point to the next reader containing unread data. Mapping will prevent snapshot and buffer size modifications. CC: Signed-off-by: Vincent Donnefort diff --git a/include/uapi/linux/trace_mmap.h b/include/uapi/linux/trace_mmap.h index

[PATCH v21 2/5] ring-buffer: Introducing ring-buffer mapping functions

2024-04-23 Thread Vincent Donnefort
during the first mapping. Once mapped, no subbuf can get in or out of the ring-buffer: the buffer size will remain unmodified and the splice enabling functions will in reality simply memcpy the data instead of swapping subbufs. CC: Signed-off-by: Vincent Donnefort diff --git a/include/linux

[PATCH v21 1/5] ring-buffer: Allocate sub-buffers with __GFP_COMP

2024-04-23 Thread Vincent Donnefort
In preparation for the ring-buffer memory mapping, allocate compound pages for the ring-buffer sub-buffers to enable us to map them to user-space with vm_insert_pages(). Signed-off-by: Vincent Donnefort diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 25476ead681b

[PATCH v21 0/5] Introducing trace buffer mapping by user-space

2024-04-23 Thread Vincent Donnefort
f the ring-buffer, in a similar fashion to what trace_pipe offers. Support for this new feature can already be found in libtracefs from version 1.8, when built with EXTRA_CFLAGS=-DFORCE_MMAP_ENABLE. Vincent v20 -> v21: * Collect Ack * Add .gitignore * Few nits * Remove meta-page paddi

Re: [PATCH v20 2/5] ring-buffer: Introducing ring-buffer mapping functions

2024-04-22 Thread Vincent Donnefort
On Mon, Apr 22, 2024 at 08:27:17PM +0200, David Hildenbrand wrote: > On 22.04.24 20:20, Vincent Donnefort wrote: > > Hi David, > > > > Thanks for having a look, very much appreciated! > > > > On Mon, Apr 22, 2024 at 11:27:11AM +0200, David Hildenbrand wrot

Re: [PATCH v20 2/5] ring-buffer: Introducing ring-buffer mapping functions

2024-04-22 Thread Vincent Donnefort
Hi David, Thanks for having a look, very much appreciated! On Mon, Apr 22, 2024 at 11:27:11AM +0200, David Hildenbrand wrote: > On 19.04.24 20:25, David Hildenbrand wrote: > > On 06.04.24 19:36, Vincent Donnefort wrote: > > > In preparation for allowing the user-space to map

Re: [PATCH v20 2/5] ring-buffer: Introducing ring-buffer mapping functions

2024-04-22 Thread Vincent Donnefort
On Thu, Apr 18, 2024 at 11:43:46PM -0400, Steven Rostedt wrote: > On Thu, 18 Apr 2024 09:55:55 +0300 > Mike Rapoport wrote: > > Hi Mike, > > Thanks for doing this review! > > > > +/** > > > + * struct trace_buffer_meta - Ring-buffer Meta-page description > > > + * @meta_page_size: Size of

Re: [PATCH v2 01/11] ring-buffer: Allow mapped field to be set without mapping

2024-04-12 Thread Vincent Donnefort
On Wed, Apr 10, 2024 at 09:25:42PM -0400, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > In preparation for having the ring buffer mapped to a dedicated location, > which will have the same restrictions as user space memory mapped buffers, > allow it to use the "mapped" field of the

[PATCH v20 4/5] Documentation: tracing: Add ring-buffer mapping

2024-04-06 Thread Vincent Donnefort
It is now possible to mmap() a ring-buffer to stream its content. Add some documentation and a code example. Signed-off-by: Vincent Donnefort diff --git a/Documentation/trace/index.rst b/Documentation/trace/index.rst index 5092d6c13af5..0b300901fd75 100644 --- a/Documentation/trace/index.rst

[PATCH v20 3/5] tracing: Allow user-space mapping of the ring-buffer

2024-04-06 Thread Vincent Donnefort
L_GET_READER. This will update the Meta-page reader ID to point to the next reader containing unread data. Mapping will prevent snapshot and buffer size modifications. CC: Signed-off-by: Vincent Donnefort diff --git a/include/uapi/linux/trace_mmap.h b/include/uapi/linux/trace_mmap.h index

[PATCH v20 2/5] ring-buffer: Introducing ring-buffer mapping functions

2024-04-06 Thread Vincent Donnefort
during the first mapping. Once mapped, no subbuf can get in or out of the ring-buffer: the buffer size will remain unmodified and the splice enabling functions will in reality simply memcpy the data instead of swapping subbufs. CC: Signed-off-by: Vincent Donnefort diff --git a/include/linux

[PATCH v20 1/5] ring-buffer: allocate sub-buffers with __GFP_COMP

2024-04-06 Thread Vincent Donnefort
In preparation for the ring-buffer memory mapping, allocate compound pages for the ring-buffer sub-buffers to enable us to map them to user-space with vm_insert_pages(). Signed-off-by: Vincent Donnefort diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 25476ead681b

[PATCH v20 0/5] Introducing trace buffer mapping by user-space

2024-04-06 Thread Vincent Donnefort
f the ring-buffer, in a similar fashion to what trace_pipe offers. Support for this new feature can already be found in libtracefs from version 1.8, when built with EXTRA_CFLAGS=-DFORCE_MMAP_ENABLE. Vincent v19 -> v20: * Fix typos in documentation. * Remove useless mmap open and fault c

Re: [PATCH v19 RESEND 3/5] tracing: Allow user-space mapping of the ring-buffer

2024-04-03 Thread Vincent Donnefort
p(iter->tr); > > > +} > > > + > > > +static void tracing_buffers_mmap_open(struct vm_area_struct *vma) { } > > > > Same for the open. > > > > > > > + > > > +static const struct vm_operations_struct tracing_buffers_vmops = { > > &

[PATCH v19 RESEND 4/5] Documentation: tracing: Add ring-buffer mapping

2024-03-26 Thread Vincent Donnefort
It is now possible to mmap() a ring-buffer to stream its content. Add some documentation and a code example. Signed-off-by: Vincent Donnefort diff --git a/Documentation/trace/index.rst b/Documentation/trace/index.rst index 5092d6c13af5..0b300901fd75 100644 --- a/Documentation/trace/index.rst

[PATCH v19 RESEND 3/5] tracing: Allow user-space mapping of the ring-buffer

2024-03-26 Thread Vincent Donnefort
L_GET_READER. This will update the Meta-page reader ID to point to the next reader containing unread data. Mapping will prevent snapshot and buffer size modifications. CC: Signed-off-by: Vincent Donnefort diff --git a/include/uapi/linux/trace_mmap.h b/include/uapi/linux/trace_mmap.h index

[PATCH v19 RESEND 2/5] ring-buffer: Introducing ring-buffer mapping functions

2024-03-26 Thread Vincent Donnefort
during the first mapping. Once mapped, no subbuf can get in or out of the ring-buffer: the buffer size will remain unmodified and the splice enabling functions will in reality simply memcpy the data instead of swapping subbufs. CC: Signed-off-by: Vincent Donnefort diff --git a/include/linux

[PATCH v19 RESEND 1/5] ring-buffer: allocate sub-buffers with __GFP_COMP

2024-03-26 Thread Vincent Donnefort
In preparation for the ring-buffer memory mapping, allocate compound pages for the ring-buffer sub-buffers to enable us to map them to user-space with vm_insert_pages(). Signed-off-by: Vincent Donnefort diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 25476ead681b

[PATCH v19 RESEND 0/5] Introducing trace buffer mapping by user-space

2024-03-26 Thread Vincent Donnefort
f the ring-buffer, in a similar fashion to what trace_pipe offers. Support for this new feature can already be found in libtracefs from version 1.8, when built with EXTRA_CFLAGS=-DFORCE_MMAP_ENABLE. Vincent v18 -> v19: * Use VM_PFNMAP and vm_insert_pages * Allocate ring-buffer subb

[PATCH v19 4/5] Documentation: tracing: Add ring-buffer mapping

2024-03-26 Thread Vincent Donnefort
It is now possible to mmap() a ring-buffer to stream its content. Add some documentation and a code example. Signed-off-by: Vincent Donnefort diff --git a/Documentation/trace/index.rst b/Documentation/trace/index.rst index 5092d6c13af5..0b300901fd75 100644 --- a/Documentation/trace/index.rst

[PATCH v19 3/5] tracing: Allow user-space mapping of the ring-buffer

2024-03-26 Thread Vincent Donnefort
L_GET_READER. This will update the Meta-page reader ID to point to the next reader containing unread data. Mapping will prevent snapshot and buffer size modifications. Signed-off-by: Vincent Donnefort diff --git a/include/uapi/linux/trace_mmap.h b/include/uapi/linux/trace_mmap.h index

[PATCH v19 2/5] ring-buffer: Introducing ring-buffer mapping functions

2024-03-26 Thread Vincent Donnefort
during the first mapping. Once mapped, no subbuf can get in or out of the ring-buffer: the buffer size will remain unmodified and the splice enabling functions will in reality simply memcpy the data instead of swapping subbufs. Signed-off-by: Vincent Donnefort diff --git a/include/linux

[PATCH v19 1/5] ring-buffer: allocate sub-buffers with __GFP_COMP

2024-03-26 Thread Vincent Donnefort
In preparation for the ring-buffer memory mapping, allocate compound pages for the ring-buffer sub-buffers to enable us to map them to user-space with vm_insert_pages(). Signed-off-by: Vincent Donnefort diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 25476ead681b

[PATCH v19 0/5] Introducing trace buffer mapping by user-space

2024-03-26 Thread Vincent Donnefort
f the ring-buffer, in a similar fashion to what trace_pipe offers. Support for this new feature can already be found in libtracefs from version 1.8, when built with EXTRA_CFLAGS=-DFORCE_MMAP_ENABLE. Vincent v18 -> v19: * Use VM_PFNMAP and vm_insert_pages * Allocate ring-buffer subb

[PATCH v18 5/6] Documentation: tracing: Add ring-buffer mapping

2024-02-20 Thread Vincent Donnefort
It is now possible to mmap() a ring-buffer to stream its content. Add some documentation and a code example. Signed-off-by: Vincent Donnefort diff --git a/Documentation/trace/index.rst b/Documentation/trace/index.rst index 5092d6c13af5..0b300901fd75 100644 --- a/Documentation/trace/index.rst

[PATCH v18 3/6] tracing: Add snapshot refcount

2024-02-20 Thread Vincent Donnefort
trace_types_lock, a new spinlock is introduced to serialize accesses to trace_array->snapshot. This intends to allow access to that variable in a context where the mmap lock is already held. Signed-off-by: Vincent Donnefort diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 8198bfc54

[PATCH v18 4/6] tracing: Allow user-space mapping of the ring-buffer

2024-02-20 Thread Vincent Donnefort
L_GET_READER. This will update the Meta-page reader ID to point to the next reader containing unread data. Mapping will prevent snapshot and buffer size modifications. Signed-off-by: Vincent Donnefort diff --git a/include/uapi/linux/trace_mmap.h b/include/uapi/linux/trace_mmap.h index

[PATCH v18 2/6] ring-buffer: Introducing ring-buffer mapping functions

2024-02-20 Thread Vincent Donnefort
their unique ID, assigned during the first mapping. Once mapped, no subbuf can get in or out of the ring-buffer: the buffer size will remain unmodified and the splice enabling functions will in reality simply memcpy the data instead of swapping subbufs. Signed-off-by: Vincent Donnefort diff

[PATCH v18 1/6] ring-buffer: Zero ring-buffer sub-buffers

2024-02-20 Thread Vincent Donnefort
In preparation for the ring-buffer memory mapping where each subbuf will be accessible to user-space, zero all the page allocations. Signed-off-by: Vincent Donnefort Reviewed-by: Masami Hiramatsu (Google) diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index fd4bfe3ecf01

[PATCH v18 0/6] Introducing trace buffer mapping by user-space

2024-02-20 Thread Vincent Donnefort
f the ring-buffer, in a similar fashion to what trace_pipe offers. Support for this new feature can already be found in libtracefs from version 1.8, when built with EXTRA_CFLAGS=-DFORCE_MMAP_ENABLE. Vincent v17 -> v18: * Fix lockdep_assert_held * Fix spin_lock_init typo

[PATCH v17 5/6] Documentation: tracing: Add ring-buffer mapping

2024-02-13 Thread Vincent Donnefort
It is now possible to mmap() a ring-buffer to stream its content. Add some documentation and a code example. Signed-off-by: Vincent Donnefort diff --git a/Documentation/trace/index.rst b/Documentation/trace/index.rst index 5092d6c13af5..0b300901fd75 100644 --- a/Documentation/trace/index.rst

[PATCH v17 4/6] tracing: Allow user-space mapping of the ring-buffer

2024-02-13 Thread Vincent Donnefort
L_GET_READER. This will update the Meta-page reader ID to point to the next reader containing unread data. Mapping will prevent snapshot and buffer size modifications. Signed-off-by: Vincent Donnefort diff --git a/include/uapi/linux/trace_mmap.h b/include/uapi/linux/trace_mmap.h index

[PATCH v17 3/6] tracing: Add snapshot refcount

2024-02-13 Thread Vincent Donnefort
trace_types_lock, a new spinlock is introduced to serialize accesses to trace_array->snapshot. This intends to allow access to that variable in a context where the mmap lock is already held. Signed-off-by: Vincent Donnefort diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 2a7c6fd93

[PATCH v17 2/6] ring-buffer: Introducing ring-buffer mapping functions

2024-02-13 Thread Vincent Donnefort
their unique ID, assigned during the first mapping. Once mapped, no subbuf can get in or out of the ring-buffer: the buffer size will remain unmodified and the splice enabling functions will in reality simply memcpy the data instead of swapping subbufs. Signed-off-by: Vincent Donnefort diff

[PATCH v17 1/6] ring-buffer: Zero ring-buffer sub-buffers

2024-02-13 Thread Vincent Donnefort
In preparation for the ring-buffer memory mapping where each subbuf will be accessible to user-space, zero all the page allocations. Signed-off-by: Vincent Donnefort Reviewed-by: Masami Hiramatsu (Google) diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index fd4bfe3ecf01

[PATCH v17 0/6] Introducing trace buffer mapping by user-space

2024-02-13 Thread Vincent Donnefort
f the ring-buffer, in a similar fashion to what trace_pipe offers. Support for this new feature can already be found in libtracefs from version 1.8, when built with EXTRA_CFLAGS=-DFORCE_MMAP_ENABLE. Vincent v16 -> v17: * Documentation and comments improvements. * Create get/put_snapshot_m

Re: [PATCH v16 2/6] ring-buffer: Introducing ring-buffer mapping functions

2024-02-12 Thread Vincent Donnefort
[...] > > +static void rb_update_meta_page(struct ring_buffer_per_cpu *cpu_buffer) > > +{ > > + struct trace_buffer_meta *meta = cpu_buffer->meta_page; > > + > > + meta->reader.read = cpu_buffer->reader_page->read; > > + meta->reader.id = cpu_buffer->reader_page->id; > > + meta->reader.los

[PATCH v16 5/6] Documentation: tracing: Add ring-buffer mapping

2024-02-09 Thread Vincent Donnefort
It is now possible to mmap() a ring-buffer to stream its content. Add some documentation and a code example. Signed-off-by: Vincent Donnefort diff --git a/Documentation/trace/index.rst b/Documentation/trace/index.rst index 5092d6c13af5..0b300901fd75 100644 --- a/Documentation/trace/index.rst

[PATCH v16 4/6] tracing: Allow user-space mapping of the ring-buffer

2024-02-09 Thread Vincent Donnefort
L_GET_READER. This will update the Meta-page reader ID to point to the next reader containing unread data. Mapping will prevent snapshot and buffer size modifications. Signed-off-by: Vincent Donnefort diff --git a/include/uapi/linux/trace_mmap.h b/include/uapi/linux/trace_mmap.h index

[PATCH v16 3/6] tracing: Add snapshot refcount

2024-02-09 Thread Vincent Donnefort
trace_types_lock, a new spinlock is introduced to serialize accesses to trace_array->snapshot. This intends to allow access to that variable in a context where the mmap lock is already held. Signed-off-by: Vincent Donnefort diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 2a7c6fd93

[PATCH v16 2/6] ring-buffer: Introducing ring-buffer mapping functions

2024-02-09 Thread Vincent Donnefort
their unique ID, assigned during the first mapping. Once mapped, no subbuf can get in or out of the ring-buffer: the buffer size will remain unmodified and the splice enabling functions will in reality simply memcpy the data instead of swapping subbufs. Signed-off-by: Vincent Donnefort diff

[PATCH v16 1/6] ring-buffer: Zero ring-buffer sub-buffers

2024-02-09 Thread Vincent Donnefort
In preparation for the ring-buffer memory mapping where each subbuf will be accessible to user-space, zero all the page allocations. Signed-off-by: Vincent Donnefort Reviewed-by: Masami Hiramatsu (Google) diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index fd4bfe3ecf01

[PATCH v16 0/6] Introducing trace buffer mapping by user-space

2024-02-09 Thread Vincent Donnefort
f the ring-buffer, in a similar fashion to what trace_pipe offers. Support for this new feature can already be found in libtracefs from version 1.8, when built with EXTRA_CFLAGS=-DFORCE_MMAP_ENABLE. Vincent v15 -> v16: * Add comment for the dcache flush. * Remove now unnecessary WRITE_ONCE

[PATCH v15 5/6] Documentation: tracing: Add ring-buffer mapping

2024-02-09 Thread Vincent Donnefort
It is now possible to mmap() a ring-buffer to stream its content. Add some documentation and a code example. Signed-off-by: Vincent Donnefort diff --git a/Documentation/trace/index.rst b/Documentation/trace/index.rst index 5092d6c13af5..0b300901fd75 100644 --- a/Documentation/trace/index.rst

[PATCH v15 4/6] tracing: Allow user-space mapping of the ring-buffer

2024-02-09 Thread Vincent Donnefort
L_GET_READER. This will update the Meta-page reader ID to point to the next reader containing unread data. Mapping will prevent snapshot and buffer size modifications. Signed-off-by: Vincent Donnefort diff --git a/include/uapi/linux/trace_mmap.h b/include/uapi/linux/trace_mmap.h index

[PATCH v15 3/6] tracing: Add snapshot refcount

2024-02-09 Thread Vincent Donnefort
trace_types_lock, a new spinlock is introduced to serialize accesses to trace_array->snapshot. This intends to allow access to that variable in a context where the mmap lock is already held. Signed-off-by: Vincent Donnefort diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 2a7c6fd93

[PATCH v15 2/6] ring-buffer: Introducing ring-buffer mapping functions

2024-02-09 Thread Vincent Donnefort
their unique ID, assigned during the first mapping. Once mapped, no subbuf can get in or out of the ring-buffer: the buffer size will remain unmodified and the splice enabling functions will in reality simply memcpy the data instead of swapping subbufs. Signed-off-by: Vincent Donnefort diff

[PATCH v15 1/6] ring-buffer: Zero ring-buffer sub-buffers

2024-02-09 Thread Vincent Donnefort
In preparation for the ring-buffer memory mapping where each subbuf will be accessible to user-space, zero all the page allocations. Signed-off-by: Vincent Donnefort Reviewed-by: Masami Hiramatsu (Google) diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index fd4bfe3ecf01

[PATCH v15 0/6] Introducing trace buffer mapping by user-space

2024-02-09 Thread Vincent Donnefort
f the ring-buffer, in a similar fashion to what trace_pipe offers. Support for this new feature can already be found in libtracefs from version 1.8, when built with EXTRA_CFLAGS=-DFORCE_MMAP_ENABLE. Vincent v14 -> v15: * Add meta-page and reader-page flush. Intends to fix the mapping for

Re: [PATCH v14 4/6] tracing: Allow user-space mapping of the ring-buffer

2024-02-05 Thread Vincent Donnefort
On Mon, Feb 05, 2024 at 01:44:47PM -0500, Mathieu Desnoyers wrote: > On 2024-02-05 13:34, Vincent Donnefort wrote: > > On Mon, Feb 05, 2024 at 11:55:08AM -0500, Mathieu Desnoyers wrote: > [...] > > > > > > > How are the kernel linear mapping and the userspa

  1   2   3   4   5   6   7   8   9   10   >