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: <20241005231046.5f575779.gary@garyguo.net>
Date: Sat, 5 Oct 2024 23:10:46 +0100
From: Gary Guo <gary@...yguo.net>
To: Trevor Gross <tmgross@...ch.edu>
Cc: 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>, Alice Ryhl <aliceryhl@...gle.com>,
 Nathan Chancellor <nathan@...nel.org>, Nick Desaulniers
 <ndesaulniers@...gle.com>, Bill Wendling <morbo@...gle.com>, Justin Stitt
 <justinstitt@...gle.com>, rust-for-linux@...r.kernel.org,
 linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH 1/5] rust: fix size_t in bindgen prototypes of C
 builtins

On Sun, 29 Sep 2024 17:00:29 -0400
Trevor Gross <tmgross@...ch.edu> wrote:

> On Fri, Sep 13, 2024 at 5:32 PM Gary Guo <gary@...yguo.net> wrote:
> 
> > -bindgen_c_flags_final = $(bindgen_c_flags_lto) -D__BINDGEN__
> > +# `-fno-builtin` is passed to avoid bindgen from using clang builtin prototypes
> > +# for functions like `memcpy` -- if this flag is not passed, bindgen-generated
> > +# prototypes use `c_ulong` or `c_uint` depending on architecture instead of
> > +# generating `usize`.
> > +bindgen_c_flags_final = $(bindgen_c_flags_lto) -fno-builtin -D__BINDGEN__  
> 
> I wonder how reliable this behavior is. Maybe bindgen could do a
> better job controlling this, is there an open issue?
> 
> - Trevor

I didn't search for bindgen issues when made this change, but
apparently this is indeed the suggested approach in
https://github.com/rust-lang/rust-bindgen/issues/1770

Best,
Gary

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ