Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/arch/x86/x86



On Mon, Oct 02, 2017 at 07:23:16PM +0000, Maxime Villard wrote:
> Module Name:	src
> Committed By:	maxv
> Date:		Mon Oct  2 19:23:16 UTC 2017
> 
> Modified Files:
> 	src/sys/arch/x86/x86: tsc.c tsc.h x86_machdep.c
> 
> Log Message:
> Add a machdep.tsc_user_enable sysctl, to enable/disable the rdtsc
> instruction in usermode. It defaults to enabled.

Do we really need this change? I've said it before, I consider this a
really stupid idea and effectively useless complexity. rdtsc is not
necessary for precision measurement as long as an attacker is willing to 
waste CPU time, i.e. having one core spinning incrementing a counter and
reading that one of a second core will give fairly accurate measurements
as long as both cores are near each other. It's normally not that
difficult to ensure that.

Joerg


Home | Main Index | Thread Index | Old Index