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:   Fri, 31 Jan 2020 14:37:42 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Radhey Shyam Pandey <radhey.shyam.pandey@...inx.com>
Cc:     davem@...emloft.net, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, anirudha.sarangi@...inx.com,
        michal.simek@...inx.com, gregkh@...uxfoundation.org,
        mchehab+samsung@...nel.org, john.linn@...inx.com,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v3 -next 3/4] net: emaclite: Fix arm64 compilation
 warnings

On Fri, Jan 31, 2020 at 05:17:49PM +0530, Radhey Shyam Pandey wrote:
>  
>  /* BUFFER_ALIGN(adr) calculates the number of bytes to the next alignment. */
> -#define BUFFER_ALIGN(adr) ((ALIGNMENT - ((u32)adr)) % ALIGNMENT)
> +#define BUFFER_ALIGN(adr) ((ALIGNMENT - ((ulong)adr)) % ALIGNMENT)

Hi Radhey

linux/kernel.h has a few interesting macros, like

#define ALIGN(x, a)             __ALIGN_KERNEL((x), (a))

These are more likely to be correct across all architectures than
anything you role yourself.

	 Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ