[openib-general] compilation platform dependencies

Hal Rosenstock halr at voltaire.com
Tue Nov 1 09:51:28 PST 2005


On Tue, 2005-11-01 at 12:39, yipee wrote:
> Hi,
> 
> 
> I think that I've noticed a problem in compiling user applications with a 
> different compiler than the running-kernel modules compiler (x86 32bit vs. 
> 64bit). For compiling an openib application on a 32bit x86 and running it on a 
> 64bit AMD Opteron.
> When compiling a program with a 32bit gcc, the sizeof(struct cm_abi_event_resp) 
> was 184 bytes (written to the kernel from ib_cm_get_event()) vs. the 192 bytes 
> resulting from a x86_64 compiler.
> When ucm's ib_ucm_event() compares the sizeof() of the received cmd/buffer to 
> sizeof(struct ib_ucm_event_resp) it finds a mismatch and returns -ENOSPC.
> 
> Notice that 32bit applications are allowed to run on a x86_64.
> I can see two fixes to this issue:
> 1. Disallow 32bit applications to use 64bit kernel modules and warn about it at 
> run-time.

It is a requirement to work in this mode so this would not be
acceptable.

-- Hal

> 2. Specifiy gcc packing pragmas for user/kernel communication structures in 
> header files.
> 
> Any comments?
> Thanks,
> y
> 
> 
> 
> 
> 
> _______________________________________________
> openib-general mailing list
> openib-general at openib.org
> http://openib.org/mailman/listinfo/openib-general
> 
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general




More information about the general mailing list