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:   Wed, 4 Nov 2020 00:28:06 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Radhey Shyam Pandey <radheys@...inx.com>
Cc:     Michal Simek <michals@...inx.com>,
        Jakub Kicinski <kuba@...nel.org>,
        netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next 2/3] drivers: net: xilinx_emaclite: Fix
 -Wpointer-to-int-cast warnings with W=1

> > >  /* 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 - ((long)adr)) % ALIGNMENT)
> > 
> > I can't see any reason to change unsigned type to signed one.

> Agree. Also, I think we can get rid of this custom BUFFER_ALIGN
> macro and simply calling skb_reserve(skb, NET_IP_ALIGN)
> will make the protocol header to be aligned on at 
> least a 4-byte boundary?

Hi Radhey

I'm just going to replace the long with a uintptr_t. That will fix the
warnings. I don't have this hardware, so don't want to risk anything
more invasive which i cannot test.

Please feel free to add a follow up patch replacing this with 
skb_reserve(skb, NET_IP_ALIGN).

	 Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ