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: <87iksssrhr.fsf@kernel.org>
Date: Tue, 12 Nov 2024 10:58:40 +0100
From: Andreas Hindborg <a.hindborg@...nel.org>
To: "Alistair Francis" <alistair23@...il.com>
Cc: "Alistair Francis" <alistair@...stair23.me>,
  <linux-kernel@...r.kernel.org>,  <boqun.feng@...il.com>,
  <me@...enk.dev>,  <benno.lossin@...ton.me>,  <tmgross@...ch.edu>,
  <aliceryhl@...gle.com>,  <gary@...yguo.net>,  <ojeda@...nel.org>,
  <rust-for-linux@...r.kernel.org>,  <alex.gaynor@...il.com>,
  <alistair.francis@....com>,  <bjorn3_gh@...tonmail.com>
Subject: Re: [PATCH v3 01/11] rust: bindings: Support some inline static
 functions

"Alistair Francis" <alistair23@...il.com> writes:

> On Mon, Nov 11, 2024 at 10:07 PM Andreas Hindborg <a.hindborg@...nel.org> wrote:
>>
>> "Alistair Francis" <alistair@...stair23.me> writes:
>>
>> <cut>
>>
>> > diff --git a/rust/exports.c b/rust/exports.c
>> > index 587f0e776aba..288958d2ebea 100644
>> > --- a/rust/exports.c
>> > +++ b/rust/exports.c
>> > @@ -18,6 +18,7 @@
>> >  #include "exports_core_generated.h"
>> >  #include "exports_helpers_generated.h"
>> >  #include "exports_bindings_generated.h"
>> > +#include "exports_bindings_static_generated.h"
>>
>> Generating `exports_bindings_static_generated.h` depends on `exports.o`,
>> which depends on `exports.c`. Does this not create chicken-egg kind of
>> problem?
>
> It is a bit confusing as there are a few levels of autogeneration, but
> Make happily handles it.
>
> `exports.c` depends on `exports_bindings_static_generated.h`
>
> But `exports_bindings_static_generated.h` depends on `extern.o`
> (extern not exports).
>
> `extern.o` then depends on `extern.c`
>
> `extern.c` then depends on `bindings_generated_static.rs`, which is
> generated by bindgen.
>
> So there isn't a chick-egg problem and this happily builds from a clean tree.

Right, I think I mixed up exports/extern.

Anyway, it does not build for me. I applied it on top of `rust-next` and
I get:

..
│  CC      rust/extern.o                                                                                                                                                                                                                                                                                                              │
│/home/aeh/src/linux-rust/helpers/rust/extern.c:1:10: fatal error: '/home/aeh/src/linux-rust/helpers/bindings/bindings_helper.h' file not found                                                                                                                                                                                       │
│    1 | #include "/home/aeh/src/linux-rust/helpers/bindings/bindings_helper.h"                                                                                                                                                                                                                                                       │
│      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                                                                                                                                                                                       │
│1 error generated.                                                                                                                                                                                                                                                                                                                   │


I am doing out of tree build - maybe that is the culprit?


Best regards,
Andreas Hindborg



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ