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: <20200922103226.1e8b90e8@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Tue, 22 Sep 2020 10:32:26 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     David Awogbemila <awogbemila@...gle.com>
Cc:     netdev@...r.kernel.org, Catherine Sullivan <csully@...gle.com>,
        Yangchun Fu <yangchun@...gle.com>
Subject: Re: [PATCH net-next v2 1/3] gve: Add support for raw addressing
 device option

On Tue, 22 Sep 2020 08:50:58 -0700 David Awogbemila wrote:
> +	dev_opt = (struct gve_device_option *)((void *)descriptor +
> +							sizeof(*descriptor));

You don't need to cast void pointers to types.

The idiomatic way to get end of structure in C is: &descriptor[1] or
descriptor + 1.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ