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: <20240809192043.1311c228.gary@garyguo.net>
Date: Fri, 9 Aug 2024 19:20:43 +0100
From: Gary Guo <gary@...yguo.net>
To: Alice Ryhl <aliceryhl@...gle.com>
Cc: Steven Rostedt <rostedt@...dmis.org>, Masami Hiramatsu
 <mhiramat@...nel.org>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
 Peter Zijlstra <peterz@...radead.org>, Josh Poimboeuf
 <jpoimboe@...nel.org>, Jason Baron <jbaron@...mai.com>, Ard Biesheuvel
 <ardb@...nel.org>, Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor
 <alex.gaynor@...il.com>, Wedson Almeida Filho <wedsonaf@...il.com>, Boqun
 Feng <boqun.feng@...il.com>, "Björn Roy Baron"
 <bjorn3_gh@...tonmail.com>, Benno Lossin <benno.lossin@...ton.me>, Andreas
 Hindborg <a.hindborg@...sung.com>, linux-trace-kernel@...r.kernel.org,
 rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org, Arnd Bergmann
 <arnd@...db.de>, linux-arch@...r.kernel.org, Thomas Gleixner
 <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, Borislav Petkov
 <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
 "H. Peter Anvin" <hpa@...or.com>, Sean Christopherson <seanjc@...gle.com>,
 Uros Bizjak <ubizjak@...il.com>, Catalin Marinas <catalin.marinas@....com>,
 Will Deacon <will@...nel.org>, Marc Zyngier <maz@...nel.org>, Oliver Upton
 <oliver.upton@...ux.dev>, Mark Rutland <mark.rutland@....com>, Ryan Roberts
 <ryan.roberts@....com>, Fuad Tabba <tabba@...gle.com>,
 linux-arm-kernel@...ts.infradead.org, Paul Walmsley
 <paul.walmsley@...ive.com>, Palmer Dabbelt <palmer@...belt.com>, Albert Ou
 <aou@...s.berkeley.edu>, Anup Patel <apatel@...tanamicro.com>, Andrew Jones
 <ajones@...tanamicro.com>, Alexandre Ghiti <alexghiti@...osinc.com>, Conor
 Dooley <conor.dooley@...rochip.com>, Samuel Holland
 <samuel.holland@...ive.com>, linux-riscv@...ts.infradead.org, Huacai Chen
 <chenhuacai@...nel.org>, WANG Xuerui <kernel@...0n.name>, Bibo Mao
 <maobibo@...ngson.cn>, Tiezhu Yang <yangtiezhu@...ngson.cn>, Andrew Morton
 <akpm@...ux-foundation.org>, Tianrui Zhao <zhaotianrui@...ngson.cn>,
 loongarch@...ts.linux.dev, Carlos Llamas <cmllamas@...gle.com>
Subject: Re: [PATCH v6 2/5] rust: add tracepoint support

On Thu, 08 Aug 2024 17:23:38 +0000
Alice Ryhl <aliceryhl@...gle.com> wrote:

> Make it possible to have Rust code call into tracepoints defined by C
> code. It is still required that the tracepoint is declared in a C
> header, and that this header is included in the input to bindgen.
> 
> Instead of calling __DO_TRACE directly, the exported rust_do_trace_
> function calls an inline helper function. This is because the `cond`
> argument does not exist at the callsite of DEFINE_RUST_DO_TRACE.
> 
> __DECLARE_TRACE always emits an inline static and an extern declaration
> that is only used when CREATE_RUST_TRACE_POINTS is set. These should not
> end up in the final binary so it is not a problem that they sometimes
> are emitted without a user.
> 
> Reviewed-by: Carlos Llamas <cmllamas@...gle.com>
> Signed-off-by: Alice Ryhl <aliceryhl@...gle.com>

Reviewed-by: Gary Guo <gary@...yguo.net>

> ---
>  include/linux/tracepoint.h      | 22 +++++++++++++++++-
>  include/trace/define_trace.h    | 12 ++++++++++
>  rust/bindings/bindings_helper.h |  1 +
>  rust/kernel/lib.rs              |  1 +
>  rust/kernel/tracepoint.rs       | 49 +++++++++++++++++++++++++++++++++++++++++
>  5 files changed, 84 insertions(+), 1 deletion(-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ