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: <CANiq72n1YpUowTh3Hdjo5auOmTTUU1-8d2FTL3e=Oyu3Q=-BkQ@mail.gmail.com>
Date: Mon, 20 Jan 2025 22:52:48 +0100
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Emmanuel Gil Peyrot <linkmauve@...kmauve.fr>
Cc: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>, 
	Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>, 
	Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>, 
	Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>, 
	Björn Roy Baron <bjorn3_gh@...tonmail.com>, 
	Benno Lossin <benno.lossin@...ton.me>, Andreas Hindborg <a.hindborg@...nel.org>, 
	Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>, 
	dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org, 
	rust-for-linux@...r.kernel.org, Jocelyn Falempe <jfalempe@...hat.com>
Subject: Re: [PATCH] drm/panic: fix compilation issue on ARM

Hi Emmanuel,

On Mon, Jan 20, 2025 at 1:45 PM Emmanuel Gil Peyrot
<linkmauve@...kmauve.fr> wrote:
>
> In C, the char type is specified with “The implementation shall define char to
> have the same range, representation, and behavior as either signed char or
> unsigned char.”
>
> On x86 it defaults to signed char, and on ARM it defaults to unsigned char.
> This carries over to Rust’s FFI, which aliases its c_char type to i8 on x86,
> and to u8 on ARM.

In the kernel `-funsigned-char` is used, see commit 3bc753c06dd0
("kbuild: treat char as always unsigned").

In any case, the change is fine, because we want to use the proper
type, but this is already in the Rust PR for this cycle, which should
land in mainline in some days, see commit 27c7518e7f1c ("rust: finish
using custom FFI integer types") in rust-next.

However, I am nevertheless confused, because in mainline
`crate::ffi::c_char` is `core::ffi::c_char` which is `i8` in both
arm64 and x86_64 and thus there is no build issue there.

If by ARM you mean 32-bit, then we don't have support for it yet in
mainline, so you shouldn't be able to see it there either.

Could you please clarify? Are you using patches on top of mainline,
e.g. the 32-bit arm support one?

Thanks!

Cheers,
Miguel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ