Re: [RFC] fixing the UML failure root cause

From: richard -rw- weinberger
Date: Fri Oct 14 2011 - 16:39:41 EST


On Fri, Oct 14, 2011 at 10:31 PM, Andrew Lutomirski <luto@xxxxxxx> wrote:
> On Fri, Oct 14, 2011 at 1:23 PM, richard -rw- weinberger
> <richard.weinberger@xxxxxxxxx> wrote:
>> On Fri, Oct 14, 2011 at 10:17 PM, Andrew Lutomirski <luto@xxxxxxx> wrote:
>>> On Fri, Oct 14, 2011 at 12:53 PM, richard -rw- weinberger
>>> <richard.weinberger@xxxxxxxxx> wrote:
>>>> On Tue, Oct 11, 2011 at 7:24 PM, Andrew Lutomirski <luto@xxxxxxx> wrote:
>>>>> What do you think of this approach?  If it seems good, I'll finish the
>>>>> patch and submit it.
>>>>>
>>>>> With this patch applied, UML appears to work, but it fills the log with
>>>>> exploit attempt warnings.  Any ideas on what to do about that?
>>>>>
>>>>
>>>> I can confirm that this patch works.
>>>> And I really like vsyscall=emulate because with that UML can trap vsyscalls. :-)
>>>
>>> Are you sure you don't mean vsyscall=native?  I suspect that UML can't
>>> actually trap vsyscalls in emulate mode right now, although that ought
>>> to be fixable.
>>>
>>
>> Doesn't vsyscall_emu_64.S transform any vsyscall into a real syscall?
>> So UML can trap it.
>
> Only if that code actually executes.  In vsyscall=emulate mode, the
> page is not executable and a trap is taken instead.  It's not entirely
> clear what the right thing to do is wrt ptrace users.

Okay.
I did some tests, in vsyscall=emulate mode a statically linked program
reports always the correct time.
On < 3.1 kernel this was not the case, here the same program reports
always the hosts time...

--
Thanks,
//richard
--
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/