Re: [PATCH 2/3] x86: Implement prctl PR_GET_TSC and PR_SET_TSC

From: Arjan van de Ven
Date: Sat Apr 12 2008 - 15:55:04 EST


On Fri, 11 Apr 2008 18:55:58 +0200 (CEST)
Erik Bosman <ebn310@xxxxxxxxx> wrote:

>
> x86: Implement prctl PR_GET_TSC and PR_SET_TSC
>
> This patch adds a configure option CONFIG_DISABLE_TSC
> (off by default) for the x86 platform to enable the
> PR_GET_TSC and PR_SET_TSC commands. These control the
> ability to use the timestamp counter from userspace
> (the RDTSC instruction.)
>
> This patch uses code earlier used to disable the
> timestamp counter for the SECCOMP framework. It used
> to disable the RDTSC on 32 bit kernels, but allow it
> on x86_64. This patch makes SECCOMP disable the
> timestamp counter whenever CONFIG_DISABLE_TSC is
> enabled.


Hi,

why did you make this a configuration option? In general it's not
a good idea to make userspace visible ABI's (PR_* clearly is one of these)
a CONFIG option unless there's some HUGE space saving going on.
I don't see that here....

So can you explain your rationale for making this a config option?

Greetings,
Arjan van de Ven

--
If you want to reach me at my work email, use arjan@xxxxxxxxxxxxxxx
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
--
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/