x86_64 linuxulator patches

Alexander Leidinger Alexander at Leidinger.net
Mon Aug 18 10:11:37 UTC 2008


Quoting "Adrian Penisoara" <ady at freebsd.ady.ro> (from Mon, 18 Aug 2008  
10:38:02 +0200):

> Hi,
>
> On Mon, Aug 18, 2008 at 10:05 AM, Alexander Leidinger
> <Alexander at leidinger.net> wrote:
>>> in my opinion the best decision for amd64 looks so.
>>> we use two modules. linux.ko for x86_64 and linux32.ko for ia32,
>>> option COMPAT_LINUX for x86_64 and COMPAT_LINUX32 for ia32.
>>> and two  linux_base directories: /compat/linux for x86_64
>>> and /compat/linux32 for ia32.
>>>
>>> there are other opinions?
>>
>> I propose:
>>  - /compat/linux64 for 64bit stuff
>>  - /compat/linux32 a symlink to /compat/linux
>>  - /compat/linux for 32bit stuff (we can think about having)
>>
>
>  I agree with this later proposition, it's a bad thing to break the
> already established purpose for /compat/linux (32bit binaries).
>
>  Here is yet another variation:
>    /compat/linux64 -- 64bit
>    /compat/linux32 -- 32bit
>    /compat/linux -> linux32  -- symlink, would this break anything in
> the current ports/packages ?

Making linux a symlink to linux32 will not work. I made the proposal  
the other way around on purpose. If an user does not update after the  
changes are introduced, any new installation (without the update) will  
mess-up the installation. If you don't have to worry about backwards  
compatibility, it's ok (and I would prefer it), but unfortunately it  
will create more hassle than it will help in the real world (there are  
too much people which will not make the right thing in such a case).

I also thought about workarounds, by e.g. checking if all involved  
paths are of the correct type and refuse to work or to adjust the  
paths if they aren't, but this will make the LINUXBASE handling very  
complicated, more than it is worth (there's already a lot of work to  
do to get all infrastructure for this together).

>  I strongly oppose having linux.ko as the 64bit version, rather there
> should be linux64.ko (linux-x86_64.ko ?) and linux32.ko (linux-ia32.ko
> ?) and perhaps we should make linux.ko try loading both of these
> (since the user did not specify the intended platform).

I like this. linux.ko as a meta module which depends upon linux32 and  
linux64 on amd64, and depends upon linux32 on i386. This way POLA is  
preserved, the documentation is not wrong (to enable linux emulation  
load the linux.ko), and people which only want one can load the  
specific one.

Bye,
Alexander.

-- 
	A domineering man married a mere wisp of a girl.  He came back from
his honeymoon a chastened man.  He'd become aware of the will of the wisp.

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137


More information about the freebsd-emulation mailing list