lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 8 Sep 2007 10:57:50 +0200
From:	Andi Kleen <ak@...e.de>
To:	Chuck Ebbert <cebbert@...hat.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>, Valdis.Kletnieks@...edu,
	jakub@...hat.com, Ulrich Drepper <drepper@...hat.com>,
	linux-kernel@...r.kernel.org
Subject: Re: 2.6.23-rc3-mm1 - vdso and gettimeofday issues with glibc


> In the vdso code:
> 
> static inline long vgetns(void)
> {
>         cycles_t (*vread)(void);
>         vread = gtod->clock.vread;
>         return ((vread() - gtod->clock.cycle_last) * gtod->clock.mult) >>
>                 gtod->clock.shift;
> }
> 
> 
> Looks like an open-coded version of this in the kernel timekeeping code:

vdso code needs to be all inlined because the vdso runs in ring 3 and cannot
access other kernel code.

It was opencoded it to have more control over the code (vdso requirements
are a bit peculiar).

> But the vdso version isn't doing any masking. And the mask is different for
> different clocksources, so it has to track the underlying kernel's clocksource
> when it gets changed.

vdso effectively only supports TSC and HPET (the other clock sources are not accessible
from ring 3)

TSC doesn't need a mask, but many HPETs need a 32bit mask; good point.

Does adding the mask to vgetns make the clock problems go away?

-Andi

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ