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: <D9EH1WXQOIO7.3RHFKYSFPBXE4@nvidia.com>
Date: Thu, 24 Apr 2025 10:18:44 +0900
From: "Alexandre Courbot" <acourbot@...dia.com>
To: "Joel Fernandes" <joelagnelf@...dia.com>,
 <linux-kernel@...r.kernel.org>, "Danilo Krummrich" <dakr@...nel.org>,
 "David Airlie" <airlied@...il.com>, "Simona Vetter" <simona@...ll.ch>
Cc: <nouveau@...ts.freedesktop.org>, <dri-devel@...ts.freedesktop.org>,
 "John Hubbard" <jhubbard@...dia.com>, "Shirish Baskaran"
 <sbaskaran@...dia.com>, "Alistair Popple" <apopple@...dia.com>, "Timur
 Tabi" <ttabi@...dia.com>, "Ben Skeggs" <bskeggs@...dia.com>
Subject: Re: [PATCH 5/6] gpu: nova-core: Clarify fields in FalconAppifHdrV1

Since this just renames fields, would you be ok if I squashed this one
into the relevant patch of my series, alongside a

[joelagnelf@...dia.com: give better names to FalconAppifHdrV1's fields]

?

On Thu Apr 24, 2025 at 7:54 AM JST, Joel Fernandes wrote:
> Signed-off-by: Joel Fernandes <joelagnelf@...dia.com>
> ---
>  drivers/gpu/nova-core/firmware/fwsec.rs | 17 ++++++++++-------
>  1 file changed, 10 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/nova-core/firmware/fwsec.rs b/drivers/gpu/nova-core/firmware/fwsec.rs
> index 664319d1d31c..79c21db9d89d 100644
> --- a/drivers/gpu/nova-core/firmware/fwsec.rs
> +++ b/drivers/gpu/nova-core/firmware/fwsec.rs
> @@ -29,11 +29,14 @@
>  
>  #[repr(C)]
>  #[derive(Debug)]
> +
> +/// The header of the Application Interface table, used
> +/// to locate the DMEMMAPPER section in the DMEM (see fwsec.rst).
>  struct FalconAppifHdrV1 {
> -    ver: u8,
> -    hdr: u8,
> -    len: u8,
> -    cnt: u8,
> +    version: u8,
> +    header_size: u8,
> +    entry_size: u8,
> +    entry_count: u8,
>  }
>  // SAFETY: any byte sequence is valid for this struct.
>  unsafe impl FromBytes for FalconAppifHdrV1 {}
> @@ -169,14 +172,14 @@ fn patch_command(fw: &mut DmaObject, v3_desc: &FalconUCodeDescV3, cmd: FwsecComm
>      let hdr_offset = (v3_desc.imem_load_size + v3_desc.interface_offset) as usize;
>      let hdr: &FalconAppifHdrV1 = unsafe { transmute(fw, hdr_offset) }?;
>  
> -    if hdr.ver != 1 {
> +    if hdr.version != 1 {
>          return Err(EINVAL);
>      }
>  
>      // Find the DMEM mapper section in the firmware.
> -    for i in 0..hdr.cnt as usize {
> +    for i in 0..hdr.entry_count as usize {
>          let app: &FalconAppifV1 =
> -            unsafe { transmute(fw, hdr_offset + hdr.hdr as usize + i * hdr.len as usize) }?;
> +            unsafe { transmute(fw, hdr_offset + hdr.header_size as usize + i * hdr.entry_size as usize) }?;
>  
>          if app.id != NVFW_FALCON_APPIF_ID_DMEMMAPPER {
>              continue;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ