* [Adeos-main] [PATCH] x86: Don't instrument vdso functions
@ 2008-10-19 17:07 Jan Kiszka
2008-10-19 17:24 ` Gilles Chanteperdrix
0 siblings, 1 reply; 5+ messages in thread
From: Jan Kiszka @ 2008-10-19 17:07 UTC (permalink / raw)
To: Philippe Gerum; +Cc: adeos-main
[-- Attachment #1: Type: text/plain, Size: 2961 bytes --]
The mcount instrumentation is currently leaking into vdso functions.
Patch below fixes this (bits taken from 2.6.27).
Jan
---
arch/x86/vdso/vclock_gettime.c | 15 ++++++++-------
arch/x86/vdso/vgetcpu.c | 3 ++-
2 files changed, 10 insertions(+), 8 deletions(-)
Index: b/arch/x86/vdso/vclock_gettime.c
===================================================================
--- a/arch/x86/vdso/vclock_gettime.c
+++ b/arch/x86/vdso/vclock_gettime.c
@@ -23,7 +23,7 @@
#define gtod vdso_vsyscall_gtod_data
-static long vdso_fallback_gettime(long clock, struct timespec *ts)
+notrace static long vdso_fallback_gettime(long clock, struct timespec *ts)
{
long ret;
asm("syscall" : "=a" (ret) :
@@ -31,7 +31,7 @@ static long vdso_fallback_gettime(long c
return ret;
}
-static inline long vgetns(void)
+notrace static inline long vgetns(void)
{
long v;
cycles_t (*vread)(void);
@@ -40,7 +40,7 @@ static inline long vgetns(void)
return (v * gtod->clock.mult) >> gtod->clock.shift;
}
-static noinline int do_realtime(struct timespec *ts)
+notrace static noinline int do_realtime(struct timespec *ts)
{
unsigned long seq, ns;
do {
@@ -54,7 +54,8 @@ static noinline int do_realtime(struct t
}
/* Copy of the version in kernel/time.c which we cannot directly access */
-static void vset_normalized_timespec(struct timespec *ts, long sec, long nsec)
+notrace static void
+vset_normalized_timespec(struct timespec *ts, long sec, long nsec)
{
while (nsec >= NSEC_PER_SEC) {
nsec -= NSEC_PER_SEC;
@@ -68,7 +69,7 @@ static void vset_normalized_timespec(str
ts->tv_nsec = nsec;
}
-static noinline int do_monotonic(struct timespec *ts)
+notrace static noinline int do_monotonic(struct timespec *ts)
{
unsigned long seq, ns, secs;
do {
@@ -82,7 +83,7 @@ static noinline int do_monotonic(struct
return 0;
}
-int __vdso_clock_gettime(clockid_t clock, struct timespec *ts)
+notrace int __vdso_clock_gettime(clockid_t clock, struct timespec *ts)
{
if (likely(gtod->sysctl_enabled && gtod->clock.vread))
switch (clock) {
@@ -96,7 +97,7 @@ int __vdso_clock_gettime(clockid_t clock
int clock_gettime(clockid_t, struct timespec *)
__attribute__((weak, alias("__vdso_clock_gettime")));
-int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz)
+notrace int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz)
{
long ret;
if (likely(gtod->sysctl_enabled && gtod->clock.vread)) {
Index: b/arch/x86/vdso/vgetcpu.c
===================================================================
--- a/arch/x86/vdso/vgetcpu.c
+++ b/arch/x86/vdso/vgetcpu.c
@@ -13,7 +13,8 @@
#include <asm/vgtod.h>
#include "vextern.h"
-long __vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused)
+notrace long
+__vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused)
{
unsigned int p;
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Adeos-main] [PATCH] x86: Don't instrument vdso functions
2008-10-19 17:07 [Adeos-main] [PATCH] x86: Don't instrument vdso functions Jan Kiszka
@ 2008-10-19 17:24 ` Gilles Chanteperdrix
2008-10-19 17:51 ` Jan Kiszka
2008-10-19 17:52 ` Philippe Gerum
0 siblings, 2 replies; 5+ messages in thread
From: Gilles Chanteperdrix @ 2008-10-19 17:24 UTC (permalink / raw)
To: Jan Kiszka; +Cc: adeos-main, Philippe Gerum
Jan Kiszka wrote:
> The mcount instrumentation is currently leaking into vdso functions.
> Patch below fixes this (bits taken from 2.6.27).
What are these vdso functions? Functions called from user-space?
--
Gilles.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Adeos-main] [PATCH] x86: Don't instrument vdso functions
2008-10-19 17:24 ` Gilles Chanteperdrix
@ 2008-10-19 17:51 ` Jan Kiszka
2008-10-19 17:52 ` Philippe Gerum
1 sibling, 0 replies; 5+ messages in thread
From: Jan Kiszka @ 2008-10-19 17:51 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: adeos-main, Philippe Gerum
[-- Attachment #1: Type: text/plain, Size: 480 bytes --]
Gilles Chanteperdrix wrote:
> Jan Kiszka wrote:
>> The mcount instrumentation is currently leaking into vdso functions.
>> Patch below fixes this (bits taken from 2.6.27).
>
> What are these vdso functions? Functions called from user-space?
They belong to a virtual lib that is automatically mapped into every
process. They provide the same functionality like vsyscalls, but with a
different way to address them (VDSO is more flexible, vsyscalls are legacy).
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 258 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Adeos-main] [PATCH] x86: Don't instrument vdso functions
2008-10-19 17:24 ` Gilles Chanteperdrix
2008-10-19 17:51 ` Jan Kiszka
@ 2008-10-19 17:52 ` Philippe Gerum
2008-10-19 17:56 ` Gilles Chanteperdrix
1 sibling, 1 reply; 5+ messages in thread
From: Philippe Gerum @ 2008-10-19 17:52 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: adeos-main
Gilles Chanteperdrix wrote:
> Jan Kiszka wrote:
>> The mcount instrumentation is currently leaking into vdso functions.
>> Patch below fixes this (bits taken from 2.6.27).
>
> What are these vdso functions? Functions called from user-space?
>
Yes. Bits of kernel code mapped into user-space to eliminate the need for
reaching them via syscalls.
--
Philippe.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Adeos-main] [PATCH] x86: Don't instrument vdso functions
2008-10-19 17:52 ` Philippe Gerum
@ 2008-10-19 17:56 ` Gilles Chanteperdrix
0 siblings, 0 replies; 5+ messages in thread
From: Gilles Chanteperdrix @ 2008-10-19 17:56 UTC (permalink / raw)
To: rpm; +Cc: adeos-main
Philippe Gerum wrote:
> Gilles Chanteperdrix wrote:
>> Jan Kiszka wrote:
>>> The mcount instrumentation is currently leaking into vdso functions.
>>> Patch below fixes this (bits taken from 2.6.27).
>> What are these vdso functions? Functions called from user-space?
>>
>
> Yes. Bits of kernel code mapped into user-space to eliminate the need for
> reaching them via syscalls.
They have copied it from ARM or Blackfin!
--
Gilles.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-10-19 17:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-19 17:07 [Adeos-main] [PATCH] x86: Don't instrument vdso functions Jan Kiszka
2008-10-19 17:24 ` Gilles Chanteperdrix
2008-10-19 17:51 ` Jan Kiszka
2008-10-19 17:52 ` Philippe Gerum
2008-10-19 17:56 ` Gilles Chanteperdrix
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.