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: <ZpFDeajsuVONbSYJ@cassiopeiae>
Date: Fri, 12 Jul 2024 16:53:45 +0200
From: Danilo Krummrich <dakr@...hat.com>
To: Daniel Almeida <daniel.almeida@...labora.com>
Cc: Steven Price <steven.price@....com>,
	Wedson Almeida Filho <wedsonaf@...il.com>, ojeda@...nel.org,
	lyude@...hat.com, robh@...nel.org, lina@...hilina.net,
	mcanal@...lia.com, airlied@...il.com,
	rust-for-linux@...r.kernel.org, dri-devel@...ts.freedesktop.org,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] drm: panthor: add dev_coredumpv support

On Fri, Jul 12, 2024 at 11:35:25AM -0300, Daniel Almeida wrote:
> Hi Steven, thanks for the review!
> 
> > 
> > This is defining the ABI to userspace and as such we'd need a way of
> > exporting this for userspace tools to use. The C approach is a header in
> > include/uabi. I'd also suggest making it obvious this enum can't be
> > rearranged (e.g. a comment, or assigning specific numbers). There's also
> > some ABI below which needs exporting in some way, along with some
> > documentation (comments may be sufficient) explaining how e.g.
> > header_size works.
> > 
> 
> I will defer this topic to others in the Rust for Linux community. I think this is the first time this scenario comes up in Rust code?
> 
> FYI I am working on a tool in Mesa to decode the dump [0]. Since the tool is also written in Rust, and given the RFC nature of this patch, I just copied and pasted things for now, including panthor_regs.rs.
> 
> IMHO, the solution here is to use cbindgen to automatically generate a C header to place in include/uapi. This will ensure that the header is in sync with the Rust code. I will do that in v2.

You could also just define those structures in a C header directly and use it
from Rust, can't you?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ