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:	Thu, 09 Oct 2008 15:03:36 -0700
From:	Alok Kataria <akataria@...are.com>
To:	Jeff Hansen <x@...fhansen.com>
Cc:	Chris Snook <csnook@...hat.com>,
	Alok kataria <alokkataria1@...il.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	"torvalds@...ux-foundation.org" <torvalds@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"mingo@...e.hu" <mingo@...e.hu>
Subject: Re: [PATCH] Re: x86_32 tsc/pit and hrtimers

On Thu, 2008-10-09 at 14:18 -0700, Jeff Hansen wrote:
> [X86] Add tsc=stable option for marking TSC as stable
> 
> This enables legacy hardware or VMs without HPET, LAPIC, or ACPI
> timers to enter high-resolution timer mode.
> 
> Signed-off-by: Jeff Hansen <jhansen@...daccess-inc.com>
> ---
>   Documentation/kernel-parameters.txt |    4 ++++
>   arch/x86/kernel/tsc_32.c            |   12 +++++++++++-
>   arch/x86/kernel/tsc_64.c            |    9 +++++++++
>   3 files changed, 24 insertions(+), 1 deletions(-)

Hi Jeff,

I see that these changes are not for the mainline tree. Do you plan to
do something of this sought for mainline (.28/tip) ?

My comments below are mainly for generalizing this stuff, don't know how
useful these (my comments) will be for 26.5


> diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
> index 9611505..8488074 100644
> --- a/Documentation/kernel-parameters.txt
> +++ b/Documentation/kernel-parameters.txt
> @@ -2084,6 +2084,10 @@ and is between 256 and 4096 characters. It is defined in the file
>                         Format:
>                         <io>,<irq>,<dma>,<dma2>,<sb_io>,<sb_irq>,<sb_dma>,<mpu_io>,<mpu_irq>
> 
> +       tsc=            [X86-32,X86-64]
> +                       tsc=stable: Mark TSC clocksource as stable, enabling
> +                               high-resolution timer mode on older hardware.
> +
>         turbografx.map[2|3]=    [HW,JOY]
>                         TurboGraFX parallel port interface
>                         Format:
> diff --git a/arch/x86/kernel/tsc_32.c b/arch/x86/kernel/tsc_32.c
> index 65b7063..f6e8f71 100644
> --- a/arch/x86/kernel/tsc_32.c
> +++ b/arch/x86/kernel/tsc_32.c
> @@ -49,6 +49,17 @@ static int __init tsc_setup(char *str)
> 
>   __setup("notsc", tsc_setup);
> 
> +static struct clocksource clocksource_tsc;
> +
> +static int __init tscx_setup(char *str)
> +{
> +       if (!strcmp(str, "stable"))
> +               clocksource_tsc.flags &= ~CLOCK_SOURCE_MUST_VERIFY;

Should we add a flag here instead, say tsc_reliable ? or whatever else
you want to call that. 

Also, there is code in check_geode_tsc_reliable which too sets this flag
for the TSC clocksource. 
Maybe you can just set the tsc_reliable flag from tscx_setup and
check_geode_tsc_reliable, and then check "tsc_reliable" value and set
the verify flag in init_tsc_clocksource. 

Thanks,
Alok



--
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