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]
Date:   Tue, 27 Jun 2023 11:29:52 +0200
From:   "Arnd Bergmann" <arnd@...db.de>
To:     Yi-De Wu (吳一德) 
        <yi-de.wu@...iatek.com>,
        Yingshiuan Pan (潘穎軒) 
        <yingshiuan.pan@...iatek.com>,
        Ze-yu Wang (王澤宇) 
        <ze-yu.wang@...iatek.com>, "Jonathan Corbet" <corbet@....net>,
        "Catalin Marinas" <catalin.marinas@....com>,
        "Will Deacon" <will@...nel.org>,
        "Matthias Brugger" <matthias.bgg@...il.com>,
        "AngeloGioacchino Del Regno" 
        <angelogioacchino.delregno@...labora.com>
Cc:     linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        Linux-Arch <linux-arch@...r.kernel.org>,
        linux-mediatek@...ts.infradead.org,
        "Krzysztof Kozlowski" <krzysztof.kozlowski+dt@...aro.org>,
        "Rob Herring" <robh+dt@...nel.org>,
        "Conor.Dooley" <conor.dooley@...rochip.com>,
        "Conor Dooley" <conor+dt@...nel.org>,
        "Trilok Soni" <quic_tsoni@...cinc.com>,
        "dbrazdil@...gle.com" <dbrazdil@...gle.com>,
        Jades Shih (施向玨) 
        <jades.shih@...iatek.com>, "Miles Chen" <miles.chen@...iatek.com>,
        Ivan Tseng (曾志軒) 
        <ivan.tseng@...iatek.com>,
        MY Chuang (莊明躍) 
        <my.chuang@...iatek.com>,
        Shawn Hsiao (蕭志祥) 
        <shawn.hsiao@...iatek.com>,
        PeiLun Suei (隋培倫) 
        <peilun.suei@...iatek.com>,
        Liju-clr Chen (陳麗如) 
        <liju-clr.chen@...iatek.com>,
        Chi-shen Yeh (葉奇軒) 
        <chi-shen.yeh@...iatek.com>
Subject: Re: [PATCH v4 5/9] virt: geniezone: Add irqfd support

On Fri, Jun 9, 2023, at 10:52, Yi-De Wu wrote:
> 
>  /**
>   * gzvm_hypercall_wrapper()
> @@ -72,6 +73,11 @@ static inline gzvm_vcpu_id_t 
> get_vcpuid_from_tuple(unsigned int tuple)
>  	return (gzvm_vcpu_id_t)(tuple & 0xffff);
>  }
> 
> +struct gzvm_vcpu_hwstate {
> +	__u32 nr_lrs;
> +	__u64 lr[GIC_V3_NR_LRS];
> +};

This is not a good definition for a hardware data structure, as there
is architecture specific implicit padding between the two members.

Better add an explicit '__u32 __pad;' in the middle to make it clear
what the actual layout is and make it portable.

If this is an interface to the hypervisor, it should probably also
use explicit endianess, using __le32 and __le64 instead of __u32
and __u64, along with the corresponding accessors.

      Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ