Re: [Devel] Re: [PATCH 3/7] uts namespaces: use init_utsname whenappropriate

From: Eric W. Biederman
Date: Sun Apr 09 2006 - 05:47:34 EST


Kir Kolyshkin <kir@xxxxxxxxxx> writes:

> Sam Vilain wrote:
>
>>On Sat, 2006-04-08 at 01:09 -0600, Eric W. Biederman wrote:
>>
>>
>>>>-#define ELF_PLATFORM (system_utsname.machine)
>>>>+#define ELF_PLATFORM (init_utsname()->machine)
>>>> #ifdef __KERNEL__
>>>> #define SET_PERSONALITY(ex, ibcs2) do { } while (0)
>>>>
>>>>
>>>I think this one needs to be utsname()->machine.
>>>Currently it doesn't matter. But Herbert has expressed
>>>the desire to make a machine appear like an older one.
>>>
>>>
>>
>>This is extremely useful for faking it as "i386" on x86_64 systems, for
>>instance.
>>
>>
> Could 'setarch' be of any help here? Works fine for us. Or am I missing
> something?

For the specific case that is clearly the better solution,
as it already exists, and it handles the weird 32/64bit
logic. The ELF_PLATFORM bit I was commenting on was 32bit
only.

I'm not ready to implement any new functionality at the moment,
but what I heard suggested and was it may be reasonable to allow
machine to be modified on a per uts namespace basis. If that
kind of thing is ever to happen ELF_PLATFORM needs to be per
uts on x86. Actually allowing modification of machine is
an entirely different conversation.

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