coLinux
No edit summary
(→‎General: usebility of gcc 4.4.1 for w64-mingw, size "long" in structs)
Line 7: Line 7:
 
!32 bit
 
!32 bit
 
!64 bit(Linux)
 
!64 bit(Linux)
!64 bit(Win64)
+
!64 bit(Win64, w64-mingw32)
 
!used in
 
!used in
 
|-
 
|-
Line 29: Line 29:
 
|}
 
|}
   
* Casts from pointer to int would be problems. coLinux does make use of such casts.
+
* Casts from pointer to int would be problems. coLinux uses such casts.
 
* Some coLinux structs are not 64 bit safe.
 
* Some coLinux structs are not 64 bit safe.
 
* The size of all structs that are passed from user space to kernel space and to the Linux side need to be checked. Or we would break the compatibility with 32 bit versions.
 
* The size of all structs that are passed from user space to kernel space and to the Linux side need to be checked. Or we would break the compatibility with 32 bit versions.
  +
* Different sizes for long is a problem inside structs, that are shared between Linux kernel and Windows host.
 
* Need a gcc that builds 64 bit code. Is <code>mingw64</code> available? Last I have seen, the gcc is usable, but without libraries. -&gt; http://mingw-w64.sourceforge.net/
 
* Need a gcc that builds 64 bit code. Is <code>mingw64</code> available? Last I have seen, the gcc is usable, but without libraries. -&gt; http://mingw-w64.sourceforge.net/
 
** It is functional &amp; usable, and mingw LD can link imported extern/dllimport functions directly from pre-built PE32+/x64 DLLs (even built with MS' compiler), provided proper prototypes ... std c libs and ms libs are included.
 
** It is functional &amp; usable, and mingw LD can link imported extern/dllimport functions directly from pre-built PE32+/x64 DLLs (even built with MS' compiler), provided proper prototypes ... std c libs and ms libs are included.
  +
** [http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Release%20for%20GCC%204.4.0/mingw-w64_x86-64_linux64-4.4.0-1.tar.bz2/download mingw-w64_x86-64_linux64-4.4.0-1.tar.bz2] is a ready to use binary with gcc 4.4.1 and binutils 2.19.1
   
 
==NT-Kernel driver 'linux.sys'==
 
==NT-Kernel driver 'linux.sys'==

Revision as of 15:56, 6 September 2009

Some comments, what we needs to do to run coLinux under a 64 bit Windows, for example Windows 7 64 bit, Windows Vista 64 bit, or Windows Server 2008 r2 on.

General

  • The most difference are the size for type int and long
type 32 bit 64 bit(Linux) 64 bit(Win64, w64-mingw32) used in
sizeof(int) 4 bytes 4 bytes 4 bytes
sizeof(long) 4 bytes 8 bytes 4 bytes co_rc_t
sizeof(int*)
sizeof(long*)
sizeof(void*)
4 bytes 8 bytes 8 bytes
  • Casts from pointer to int would be problems. coLinux uses such casts.
  • Some coLinux structs are not 64 bit safe.
  • The size of all structs that are passed from user space to kernel space and to the Linux side need to be checked. Or we would break the compatibility with 32 bit versions.
  • Different sizes for long is a problem inside structs, that are shared between Linux kernel and Windows host.
  • Need a gcc that builds 64 bit code. Is mingw64 available? Last I have seen, the gcc is usable, but without libraries. -> http://mingw-w64.sourceforge.net/
    • It is functional & usable, and mingw LD can link imported extern/dllimport functions directly from pre-built PE32+/x64 DLLs (even built with MS' compiler), provided proper prototypes ... std c libs and ms libs are included.
    • mingw-w64_x86-64_linux64-4.4.0-1.tar.bz2 is a ready to use binary with gcc 4.4.1 and binutils 2.19.1

NT-Kernel driver 'linux.sys'

  • XP x64 may be an easy first target, as it does not require signed drivers.
  • Driver must digital sign for Vista or Windows Server 2008 64bit.
    • 'Testsign' would be usable for developments and home users. The user must enable Test-signing in the boot config. Developers needs the Windwos Driver Kit and description from MS or this here. More Links: [1]
    • Driver install code for "colinux-daemon --install-driver" needs to review. I assume this would no longer work and we need to create a *.inf file. The inf-file needs also included in the driver sign.
  • Passage page code needs complete rework. We have more registers with double size.
  • Driver signing can also be bypassed in Windows Vista/7, so I wouldn't worry about driver signing

Linux kernel

  • The native kernel is ok.
  • All the coLinux hacks with memory allocations need review.
  • Proxy-Interrupt handler needs rewritten.

TAP Win32

  • TAP Win32 won't work on XP64 - you need TAP Win64 (see http://openvpn.se/development.html)
  • Rebuild our driver source with target 64 bit should work.
  • Driver must digital sign for Vista or Windows Server 2008 64bit. Testsign would be usable.

<HenryNe>: A self compiled TAP-Win64 I have successfully installed on Windows Server 2008 64bit with enabled Test-signing. I can not say about working.

WinPCAP

  • WinPcap 4.0.2 now supports x64 WinPcap