[PATCH] eventfs: Directly return NULL to avoid null point dereferenced

2024-05-10 Thread hao . ge
From: Hao Ge When the condition ei->is_free holds,we return NULL directly to avoid update_events_attr to use NULL point about ei. Fixes: 8186fff7ab64 ("tracefs/eventfs: Use root and instance inodes as default ownership") Signed-off-by: Hao Ge --- fs/tracefs/event_inode.c | 3 +-- 1 file

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

2024-05-10 Thread Hou Tao
Hi, On 5/10/2024 7:19 PM, Miklos Szeredi wrote: > On Fri, 26 Apr 2024 at 16:38, Hou Tao wrote: >> From: Hou Tao >> >> When invoking virtio_fs_enqueue_req() through kworker, both the >> allocation of the sg array and the bounce buffer still use GFP_ATOMIC. >> Considering the size of the sg array

Re: [PATCH] modules: Drop the .export_symbol section from the final modules

2024-05-10 Thread Ainux Wang
Hi, everyone: Could someone help to review this patch? Best regards, Ainux Wang. Ainux Wang 于2024年5月7日周二 13:15写道: > > Hi, everyone: > > Could someone review this patch? > > Best regards, > Ainux Wang. > > 于2024年4月17日周三 13:35写道: > > > > > From: Wang Yao > > > > Commit ddb5cdbafaaa ("kbuild:

[PATCH v2 2/2] drivers: remoteproc: xlnx: add sram support

2024-05-10 Thread Tanmay Shah
AMD-Xilinx zynqmp platform contains on-chip sram memory (OCM). R5 cores can access OCM and access is faster than DDR memory but slower than TCM memories available. Sram region can have optional multiple power-domains. Signed-off-by: Tanmay Shah --- Changes in v2: - Fix integer assignement to

[PATCH v2 1/2] drivers: remoteproc: xlnx: add attach detach support

2024-05-10 Thread Tanmay Shah
It is possible that remote processor is already running before linux boot or remoteproc platform driver probe. Implement required remoteproc framework ops to provide resource table address and connect or disconnect with remote processor in such case. Signed-off-by: Tanmay Shah --- Changes in

[PATCH v2 0/2] remoteproc: xlnx: Add attach detach ops and sram support

2024-05-10 Thread Tanmay Shah
Attach detach ops are needed to connect to remote processor that is running before remoteproc driver is probed. Implement remoteproc framework ops that enables such use case on AMD-Xilinx platforms. Remote processor can also use On Chip sram Memory (OCM) for various purpose. For example, for fast

Re: [PATCH 2/2] x86/sgx: Resolve EREMOVE page vs EAUG page data race

2024-05-10 Thread Reinette Chatre
Hi Dmitrii, Thank you very much for uncovering and fixing this issue. On 4/30/2024 7:38 AM, Dmitrii Kuvaiskii wrote: > On Mon, Apr 29, 2024 at 04:11:03PM +0300, Jarkko Sakkinen wrote: >> On Mon Apr 29, 2024 at 1:43 PM EEST, Dmitrii Kuvaiskii wrote: >>> Two enclave threads may try to add and

Re: [PATCH 1/2] x86/sgx: Resolve EAUG race where losing thread returns SIGBUS

2024-05-10 Thread Reinette Chatre
Hi Dmitrii, Thank you so much for finding as well as fixing this issue. On 4/30/2024 7:37 AM, Dmitrii Kuvaiskii wrote: > On Mon, Apr 29, 2024 at 04:04:24PM +0300, Jarkko Sakkinen wrote: >> On Mon Apr 29, 2024 at 1:43 PM EEST, Dmitrii Kuvaiskii wrote: >>> Two enclave threads may try to access the

[ANNOUNCE] 5.10.216-rt108

2024-05-10 Thread Luis Claudio R. Goncalves
Hello RT-list! I'm pleased to announce the 5.10.216-rt108 stable release. This release is just an update to the new stable 5.10.216 version, without any RT specific changes. You can get this release via the git tree at: git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-stable-rt.git

Re: [PATCH 1/1] x86/vector: Fix vector leak during CPU offline

2024-05-10 Thread Dave Hansen
On 5/10/24 12:06, Dongli Zhang wrote: > } else { > + /* > + * This call borrows from the comments and implementation > + * of apic_update_vector(): "If the target CPU is offline > + * then the regular release mechanism via the cleanup > +

[PATCH RESEND 1/1] x86/vector: Fix vector leak during CPU offline

2024-05-10 Thread Dongli Zhang
The absence of IRQD_MOVE_PCNTXT prevents immediate effectiveness of interrupt affinity reconfiguration via procfs. Instead, the change is deferred until the next instance of the interrupt being triggered on the original CPU. When the interrupt next triggers on the original CPU, the new affinity

[PATCH 1/1] x86/vector: Fix vector leak during CPU offline

2024-05-10 Thread Dongli Zhang
The absence of IRQD_MOVE_PCNTXT prevents immediate effectiveness of interrupt affinity reconfiguration via procfs. Instead, the change is deferred until the next instance of the interrupt being triggered on the original CPU. When the interrupt next triggers on the original CPU, the new affinity

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

2024-05-10 Thread Steven Rostedt
On Fri, 10 May 2024 12:03:12 +0100 Vincent Donnefort wrote: > > I'm not particularly happy about us calling vm_insert_pages with NULL > > pointers stored in pages. > > > > Should we instead do > > > > if (WARN_ON_ONCE(s >= nr_subbufs)) { > > err = -EINVAL; > > goto out; > > } > > > >

Re: [PATCH v9 2/5] remoteproc: k3-m4: Add a remoteproc driver for M4F subsystem

2024-05-10 Thread Mathieu Poirier
On Thu, May 09, 2024 at 10:54:51AM -0500, Andrew Davis wrote: > On 5/9/24 10:22 AM, Mathieu Poirier wrote: > > On Wed, 8 May 2024 at 09:36, Andrew Davis wrote: > > > > > > On 5/6/24 3:46 PM, Mathieu Poirier wrote: > > > > Good day, > > > > > > > > I have started reviewing this patchset.

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

2024-05-10 Thread David Hildenbrand
On 10.05.24 16:04, 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}() And controls on the ring-buffer: ring_buffer_map_get_reader() /* swap reader and head */ Mapping the ring-buffer also

[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
Currently, user-space extracts data from the ring-buffer via splice, which is handy for storage or network sharing. However, due to splice limitations, it is imposible to do real-time analysis without a copy. A solution for that problem is to let the user-space map the ring-buffer directly. The

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

2024-05-10 Thread Vincent Donnefort
In preparation for allowing the user-space to map a ring-buffer, add a set of mapping functions: ring_buffer_{map,unmap}() And controls on the ring-buffer: ring_buffer_map_get_reader() /* swap reader and head */ Mapping the ring-buffer also involves: A unique ID for each subbuf of the

[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

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

2024-05-10 Thread Vincent Donnefort
The tracing ring-buffers can be stored on disk or sent to network without any copy via splice. However the later doesn't allow real time processing of the traces. A solution is to give userspace direct access to the ring-buffer pages via a mapping. An application can now become a consumer of the

Re: [PATCH 0/2] Add basic APR sound support for SC7280 SoC

2024-05-10 Thread Rob Herring (Arm)
; ++ > 2 files changed, 109 insertions(+) > --- > base-commit: 940d65ef852b4a58c9115eb82b07844c999b8356 > change-id: 20240510-sc7280-apr-c6d10ac2c331 > > Best regards, > -- > Luca Weiss > > > My bot found new DTB warnings on the .dts files a

[PATCH net-next] virtio_net: Fix error code in __virtnet_get_hw_stats()

2024-05-10 Thread Dan Carpenter
The virtnet_send_command_reply() function returns true on success or false on failure. The "ok" variable is true/false depending on whether it succeeds or not. It's up to the caller to translate the true/false into -EINVAL on failure or zero for success. The bug is that __virtnet_get_hw_stats()

[PATCH 1/2] arm64: dts: qcom: sc7280: Add APR nodes for sound

2024-05-10 Thread Luca Weiss
Add the different services found on APR on some devices with SC7280 SoC. Additionally add an empty sound node in the root node as is seen on other SoC dtsi files so device dt's can easily use that. Signed-off-by: Luca Weiss --- arch/arm64/boot/dts/qcom/sc7280.dtsi | 73

[PATCH DNM 2/2] arm64: dts: qcom: qcm6490-fairphone-fp5: Add DisplayPort sound support

2024-05-10 Thread Luca Weiss
Add the required nodes for sound playback via a connected external display (DisplayPort over USB-C). Signed-off-by: Luca Weiss --- Depends on a bunch of patches upstream doing bringup of Display (DSI), DisplayPort, GPU, and then finally audio could land. But we're blocked on DPU 1:1:1 topology

[PATCH 0/2] Add basic APR sound support for SC7280 SoC

2024-05-10 Thread Luca Weiss
arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 36 +++ arch/arm64/boot/dts/qcom/sc7280.dtsi | 73 ++ 2 files changed, 109 insertions(+) --- base-commit: 940d65ef852b4a58c9115eb82b07844c999b8356 change-id: 20240510-sc7280-apr-c6d10ac2c331 Best regards, -- Luca Weiss

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

2024-05-10 Thread Miklos Szeredi
On Fri, 26 Apr 2024 at 16:38, Hou Tao wrote: > > From: Hou Tao > > When invoking virtio_fs_enqueue_req() through kworker, both the > allocation of the sg array and the bounce buffer still use GFP_ATOMIC. > Considering the size of the sg array may be greater than PAGE_SIZE, use > GFP_NOFS instead

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: > > > > > > > +#ifdef CONFIG_MMU > > > >

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

2024-05-10 Thread David Hildenbrand
On 08.05.24 04:34, 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, + struct vm_area_struct *vma) +{ + unsigned long nr_subbufs, nr_pages,

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

2024-05-10 Thread David Hildenbrand
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: +#ifdef CONFIG_MMU +static int __rb_map_vma(struct ring_buffer_per_cpu *cpu_buffer, + struct

Re: [PATCH 1/2] objpool: enable inlining objpool_push() and objpool_pop() operations

2024-05-10 Thread wuqiang.matt
On 2024/5/10 16:20, Vlastimil Babka wrote: On 5/10/24 9:59 AM, wuqiang.matt wrote: On 2024/5/7 21:55, Vlastimil Babka wrote: >> + } while (!try_cmpxchg_acquire(>tail, , tail + 1)); + + /* now the tail position is reserved for the given obj */ +

[PATCH v3] module: create weak dependecies

2024-05-10 Thread Jose Ignacio Tornos Martinez
It has been seen that for some network mac drivers (i.e. lan78xx) the related module for the phy is loaded dynamically depending on the current hardware. In this case, the associated phy is read using mdio bus and then the associated phy module is loaded during runtime (kernel function

Re: [PATCH v2] module: create weak dependecies

2024-05-10 Thread Jose Ignacio Tornos Martinez
> I think it's important a note about backward compatibility. If a system > doesn't have a new-enough depmod, it will basically not create the new > weadep file and initrd generators won't be able to use that. Only > downside is not being able to use the new feature, but it should still > work as

Re: [PATCH 1/2] objpool: enable inlining objpool_push() and objpool_pop() operations

2024-05-10 Thread Vlastimil Babka
On 5/10/24 9:59 AM, wuqiang.matt wrote: > On 2024/5/7 21:55, Vlastimil Babka wrote: >> >>> + } while (!try_cmpxchg_acquire(>tail, , tail + 1)); >>> + >>> + /* now the tail position is reserved for the given obj */ >>> + WRITE_ONCE(slot->entries[tail & slot->mask], obj); >>> + /* update

Re: [PATCH 1/2] objpool: enable inlining objpool_push() and objpool_pop() operations

2024-05-10 Thread wuqiang.matt
On 2024/5/7 21:55, Vlastimil Babka wrote: On 4/24/24 11:52 PM, Andrii Nakryiko wrote: objpool_push() and objpool_pop() are very performance-critical functions and can be called very frequently in kretprobe triggering path. As such, it makes sense to allow compiler to inline them completely to