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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250331194251.02a4c238@gandalf.local.home>
Date: Mon, 31 Mar 2025 19:42:51 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org, Masami
 Hiramatsu <mhiramat@...nel.org>, Mark Rutland <mark.rutland@....com>,
 Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, Andrew Morton
 <akpm@...ux-foundation.org>, Vincent Donnefort <vdonnefort@...gle.com>,
 Vlastimil Babka <vbabka@...e.cz>, Mike Rapoport <rppt@...nel.org>, Kees
 Cook <kees@...nel.org>, Tony Luck <tony.luck@...el.com>, "Guilherme G.
 Piccoli" <gpiccoli@...lia.com>, linux-hardening@...r.kernel.org, Matthew
 Wilcox <willy@...radead.org>
Subject: Re: [PATCH v2 1/2] tracing: ring-buffer: Have the ring buffer code
 do the vmap of physical memory

On Mon, 31 Mar 2025 14:42:38 -0700
Linus Torvalds <torvalds@...ux-foundation.org> wrote:

> .. and *after* you've given it back to the memory allocator, and it
> gets allocated using the page allocators, at that point ahead and use
> 'struct page' as much as you want.
> 
> Before that, don't. Even if it might work. Because you didn't allocate
> it as a struct page, and for all you know it might be treated as a
> different hotplug memory zone or whatever when given back.

Hmm, so if we need to map this memory to user space memory, then I can't
use the method from this patch series, if I have to avoid struct page.

Should I then be using vm_iomap_memory() passing in the physical address?

As for architectures that do not have user/kernel data cache coherency, how
does one flush the page when there's an update on the kernel side so that
the user side doesn't see stale data?

As the code currently uses flush_dcache_folio(), I'm guessing there's an
easy way to create a folio that points to physical memory that's not part
of the memory allocator?

Matthew?

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ