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: <ZDBp1PaVL7KoqOdD@righiandr-XPS-13-7390>
Date:   Fri, 7 Apr 2023 21:07:00 +0200
From:   Andrea Righi <andrea.righi@...onical.com>
To:     Nathan Chancellor <nathan@...nel.org>
Cc:     Miguel Ojeda <ojeda@...nel.org>,
        Alex Gaynor <alex.gaynor@...il.com>,
        Wedson Almeida Filho <wedsonaf@...il.com>,
        Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
        Björn Roy Baron <bjorn3_gh@...tonmail.com>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Nicolas Schier <nicolas@...sle.eu>, Tom Rix <trix@...hat.com>,
        Eric Curtin <ecurtin@...hat.com>,
        Martin Rodriguez Reboredo <yakoyoku@...il.com>,
        Daniel Borkmann <daniel@...earbox.net>,
        Neal Gompa <neal@...pa.dev>,
        Arnaldo Carvalho de Melo <acme@...hat.com>,
        rust-for-linux@...r.kernel.org, linux-kbuild@...r.kernel.org,
        llvm@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scripts: rust: drop is_rust_module.sh

On Fri, Apr 07, 2023 at 10:53:18AM -0700, Nathan Chancellor wrote:
> On Fri, Apr 07, 2023 at 09:05:17AM +0200, Andrea Righi wrote:
> > Commit c1177979af9c ("btf, scripts: Exclude Rust CUs with pahole")
> > introduced the constraint "!DEBUG_INFO_BTF || PAHOLE_HAS_LANG_EXCLUDE"
> > to enable RUST.
> > 
> > With this constraint we don't need is_rust_module.sh anymore, because
> > 'pahole --lang_exclude=rust' already has the capability to exclude Rust
> > CUs. If pahole isn't recent enough (< 1.24) to support --lang_exclude,
> > then DEBUG_INFO_BTF can't be enabled with RUST and is_rust_module.sh
> > isn't used as well.
> > 
> > In any case is_rust_module.sh is obsolete and we can just drop it.
> > 
> > Link: https://lore.kernel.org/lkml/Y+p2xKIN6TJnQinK@righiandr-XPS-13-7390/
> > Signed-off-by: Andrea Righi <andrea.righi@...onical.com>
> 
> Reviewed-by: Nathan Chancellor <nathan@...nel.org>
> 
> > ---
> >  rust/macros/module.rs     |  2 +-
> >  scripts/Makefile.modfinal |  2 --
> >  scripts/is_rust_module.sh | 16 ----------------
> >  3 files changed, 1 insertion(+), 19 deletions(-)
> >  delete mode 100755 scripts/is_rust_module.sh
> > 
> > diff --git a/rust/macros/module.rs b/rust/macros/module.rs
> > index a7e363c2b044..608406f33a70 100644
> > --- a/rust/macros/module.rs
> > +++ b/rust/macros/module.rs
> > @@ -179,7 +179,7 @@ pub(crate) fn module(ts: TokenStream) -> TokenStream {
> >              /// Used by the printing macros, e.g. [`info!`].
> >              const __LOG_PREFIX: &[u8] = b\"{name}\\0\";
> >  
> > -            /// The \"Rust loadable module\" mark, for `scripts/is_rust_module.sh`.
> > +            /// The \"Rust loadable module\" mark.
> >              //
> >              // This may be best done another way later on, e.g. as a new modinfo
> >              // key or a new section. For the moment, keep it simple.
> 
> It seems like this whole section can be dropped? I only see
> __IS_RUST_MODULE used in scripts/is_rust_module.sh, as the comment
> states.

In the scope of the kernel, yes, only is_rust_module.sh used that, but
outside the kernel "something" may still rely on this section. Keeping
it seems safer for now, to avoid potential user-space breakage.

Thanks,
-Andrea

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ