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, 06 Dec 2013 09:39:41 +0100
From:	Frank Haverkamp <haver@...ux.vnet.ibm.com>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org,
	cody@...ux.vnet.ibm.com, schwidefsky@...ibm.com,
	utz.bacher@...ibm.com, mmarek@...e.cz, rmallon@...il.com,
	jsvogt@...ibm.com, MIJUNG@...ibm.com, cascardo@...ux.vnet.ibm.com,
	michael@...ra.de
Subject: Re: [PATCH 1/6] GenWQE PCI support, health monitoring and recovery

Hi Arnd,

Am Donnerstag, den 05.12.2013, 21:31 +0100 schrieb Arnd Bergmann:
> On Thursday 05 December 2013, Frank Haverkamp wrote:
> > > > Was wrong, as already pointed out before. It is now:
> > > > 
> > > > struct genwqe_mem {
> > > >     __u64 addr;
> > > >     __u64 size;
> > > >     int direction;
> > > > };
> > > > 
> > > > I hope the int is ok here.
> > > 
> > > No, it's not. The problem is that sizeof(struct genwqe_mem) is now 24 on
> > > most architectures (including x86-64) and 20 on x86-32.
> > 
> > Interesting. So int is like long architecture specific. I changed it to
> > be __u64 too, to avoid any problem.
> 
> The solution is ok, but the problem is different from what you thought:
> 
> On all architectures that Linux runs on, 'int' is 32 bit. The problem is
> again the alignment of __u64. On normal architectures, it is naturally
> aligned, and gcc adds 4 byte padding so that 'sizeof (struct genwqe_mem)'
> is  multiple of the required alignment. On x86-32, the required alignment
> for the __u64 members is only 4 bytes, so no padding is added.
> 
> 	Arnd
> 

now I understand. Interesting. I wondered how one could check this
automatically such that others don't repeat the mistakes I did.

I hope I have fixed all those issues now in my latest posting, or do you
still see some?

Other than that, is the code ready for inclusion now, or do you still
like to have other changes done (hopefully not, but if so which ones)?

Thanks

Frank


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ