lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241014181517.4cf0ad69@gandalf.local.home>
Date: Mon, 14 Oct 2024 18:15:17 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Petr Pavlu <petr.pavlu@...e.com>
Cc: Masami Hiramatsu <mhiramat@...nel.org>, Mathieu Desnoyers
 <mathieu.desnoyers@...icios.com>, linux-trace-kernel@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ring-buffer: Fix reader locking when changing the sub
 buffer order

On Mon, 14 Oct 2024 16:14:16 +0200
Petr Pavlu <petr.pavlu@...e.com> wrote:

> The function ring_buffer_subbuf_order_set() updates each
> ring_buffer_per_cpu and installs new sub buffers that match the requested
> page order. This operation may be invoked concurrently with readers that
> rely on some of the modified data, such as the head bit (RB_PAGE_HEAD), or
> the ring_buffer_per_cpu.pages and reader_page pointers. However, no
> exclusive access is acquired by ring_buffer_subbuf_order_set(). Modifying
> the mentioned data while a reader also operates on them can then result in
> incorrect memory access and various crashes.
> 
> Fix the problem by taking the reader_lock when updating a specific
> ring_buffer_per_cpu in ring_buffer_subbuf_order_set().
> 
> Fixes: 8e7b58c27b3c ("ring-buffer: Just update the subbuffers when
> changing their allocation order") Signed-off-by: Petr Pavlu
> <petr.pavlu@...e.com>

I see you applied this on top of your cnt patch. Can you reverse the order
and add this patch first and then the cnt patch please.

This is a fix that needs to go up to mainline during the rc release. The
cnt patch is going into the next merge window.

> ---
> References:
> https://lore.kernel.org/linux-trace-kernel/20240715145141.5528-1-petr.pavlu@suse.com/
> https://lore.kernel.org/linux-trace-kernel/20241010195849.2f77cc3f@gandalf.local.home/
> https://lore.kernel.org/linux-trace-kernel/20241011112850.17212b25@gandalf.local.home/

BTW, it's also OK to add these as Link: tags in the commit message.

-- Steve


> 
> base-commit: 6485cf5ea253d40d507cd71253c9568c5470cd27
> prerequisite-patch-id: 0aa81c18abaac4990d14c431e12b9e91696aa053


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ