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>] [day] [month] [year] [list]
Date:   Mon, 5 Dec 2016 21:06:41 +0300
From:   Nikita Yushchenko <nikita.yoush@...entembedded.com>
To:     Vitaly Wool <vitalywool@...il.com>
Cc:     Johannes Berg <johannes@...solutions.net>,
        Troy Kisky <troy.kisky@...ndarydevices.com>,
        linux-kernel@...r.kernel.org, Chris Healy <cphealy@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Fugang Duan <fugang.duan@....com>,
        Eric Nelson <eric@...int.com>, Andrew Lunn <andrew@...n.ch>,
        Fabio Estevam <fabio.estevam@....com>, netdev@...r.kernel.org,
        Philippe Reynes <tremyfr@...il.com>
Subject: Re: [patch net v3] net: fec: fix compile with CONFIG_M5272

>     +#define FEC_STATS_SIZE         (ARRAY_SIZE(fec_stats) * sizeof(u64))
> 
> 
> Do I take it right this actually translates to (sizeof(fec_stats) /
> sizeof(u64) * sizeof(u64))?

No.

fec_stats is an array of structs, each struct has car arrsy and integer,
and size of that is definitely not bytes.


ARRAY_SIZE(fec_stats) is number of stats, i.e. it is returned from
fec_enet_get_sset_count()

Each stat in blob is u64. Thus (ARRAY_SIZE(fec_stats) * sizeof(u64)) is
size of stats blob.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ