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-next>] [day] [month] [year] [list]
Message-ID: <20240813171104.950972475@goodmis.org>
Date: Tue, 13 Aug 2024 13:11:04 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: linux-kernel@...r.kernel.org,
 linux-trace-kernel@...r.kernel.org
Cc: Masami Hiramatsu <mhiramat@...nel.org>,
 Mark Rutland <mark.rutland@....com>,
 Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
 Andrew Morton <akpm@...ux-foundation.org>,
 Linus Torvalds <torvalds@...ux-foundation.org>,
 Ross Zwisler <zwisler@...gle.com>,
 Vincent Donnefort <vdonnefort@...gle.com>
Subject: [PATCH 0/2] tracing: Have boot instance use reserve_mem option and use fgraph tracer


Now that "reserve_mem" kernel command line option is upstream, add a patch
to use it with the ring buffer boot up mappings. That is:

  reserve_mem=12M:4096:trace trace_instance=boot_mapped@...ce

Will allocate 12 megabytes at boot up that is aligned by 4096 bytes and
label it with "trace". A trace_instance with the name "boot_mapped" will be
created on top of that memory.

Documentation has been updated about this and it states that KASLR can make
it somewhat unreliable for every boot as well as the layout of the memory
for the ring buffer may change with new kernel versions which will clear the
previous buffer.

Also, now that function graph tracing can be used by trace instances,
update its code to be able to be used by this boot process. This can give a
nicer trace of a reboot:

           swapper/0-1       [000] d..1.   363.079162:  0)               |              lapic_shutdown() {
           swapper/0-1       [000] d..1.   363.079163:  0)               |                disable_local_APIC() {
           swapper/0-1       [000] d..1.   363.079163:  0) + 26.144 us   |                  clear_local_APIC.part.0();
           swapper/0-1       [000] d....   363.079192:  0) + 29.424 us   |                }
           swapper/0-1       [000] d....   363.079192:  0) + 30.376 us   |              }
           swapper/0-1       [000] d..1.   363.079193:  0)               |              restore_boot_irq_mode() {
           swapper/0-1       [000] d..1.   363.079194:  0)               |                native_restore_boot_irq_mode() {
           swapper/0-1       [000] d..1.   363.079194:  0) + 13.863 us   |                  disconnect_bsp_APIC();
           swapper/0-1       [000] d....   363.079209:  0) + 14.933 us   |                }
           swapper/0-1       [000] d....   363.079209:  0) + 16.009 us   |              }
           swapper/0-1       [000] d..1.   363.079210:  0)   0.694 us    |              hpet_disable();
           swapper/0-1       [000] d..1.   363.079211:  0)   0.511 us    |              iommu_shutdown_noop();
           swapper/0-1       [000] d....   363.079212:  0) # 3980.260 us |            }
           swapper/0-1       [000] d..1.   363.079212:  0)               |            native_machine_emergency_restart() {
           swapper/0-1       [000] d..1.   363.079213:  0)   0.495 us    |              tboot_shutdown();
           swapper/0-1       [000] d..1.   363.079230:  0)               |              acpi_reboot() {
           swapper/0-1       [000] d..1.   363.079231:  0)               |                acpi_reset() {
           swapper/0-1       [000] d..1.   363.079232:  0)               |                  acpi_os_write_port() {

This is based on top of:

  git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
     branch: ring-buffer/for-next

Which was supposed to go in the last merge window, but due to
miscommunication, it did not. As it has been in linux-next, I do not want to
rebase it, so instead I merged in v6.11-rc1 to get access to the
reserve_mem kernel command line parameter and applied these patches on top.


Steven Rostedt (1):
      tracing/fgraph: Have fgraph handle previous boot function addresses

Steven Rostedt (Google) (1):
      tracing: Allow boot instances to use reserve_mem boot memory

----
 Documentation/admin-guide/kernel-parameters.txt | 13 +++++++++++++
 kernel/trace/trace.c                            | 19 +++++++++++++------
 kernel/trace/trace_functions_graph.c            | 23 ++++++++++++++++++-----
 3 files changed, 44 insertions(+), 11 deletions(-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ