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:	Tue, 12 Apr 2016 22:56:49 +0200
From:	"Luis R. Rodriguez" <mcgrof@...nel.org>
To:	Boris Ostrovsky <boris.ostrovsky@...cle.com>
Cc:	"Luis R. Rodriguez" <mcgrof@...nel.org>, bp@...en8.de,
	hpa@...or.com, tglx@...utronix.de, mingo@...hat.com,
	rusty@...tcorp.com.au, x86@...nel.org,
	linux-kernel@...r.kernel.org, luto@...capital.net,
	david.vrabel@...rix.com, konrad.wilk@...cle.com,
	xen-devel@...ts.xensource.com, lguest@...ts.ozlabs.org,
	andriy.shevchenko@...ux.intel.com, jlee@...e.com, glin@...e.com,
	matt@...eblueprint.co.uk, andrew.cooper3@...rix.com,
	rjw@...ysocki.net, lenb@...nel.org, robert.moore@...el.com,
	lv.zheng@...el.com, toshi.kani@...com, linux-acpi@...r.kernel.org,
	kozerkov@...allels.com, josh@...htriplett.org, joro@...tes.org,
	tiwai@...e.de
Subject: Re: [PATCH v5 04/14] x86/rtc: replace paravirt rtc check with
 platform legacy quirk

On Mon, Apr 11, 2016 at 09:49:56AM -0400, Boris Ostrovsky wrote:
> On 04/08/2016 07:40 PM, Luis R. Rodriguez wrote:
> 
> diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h
> index 1ae89a2721d6..8bb8c1a4615a 100644
> --- a/arch/x86/include/asm/x86_init.h
> +++ b/arch/x86/include/asm/x86_init.h
> @@ -142,6 +142,15 @@ struct x86_cpuinit_ops {
>  struct timespec;
>  /**
> + * struct x86_legacy_features - legacy x86 features
> + *
> + * @rtc: this device has a CMOS real-time clock present
> + */
> +struct x86_legacy_features {
> +	int rtc;
> +};
> +
> +/**
>   * struct x86_platform_ops - platform specific runtime functions
>   * @calibrate_tsc:		calibrate TSC
>   * @get_wallclock:		get time from HW clock like RTC etc.
> @@ -152,6 +161,14 @@ struct timespec;
>   * @save_sched_clock_state:	save state for sched_clock() on suspend
>   * @restore_sched_clock_state:	restore state for sched_clock() on resume
>   * @apic_post_init:		adjust apic if neeeded
> + * @legacy:			legacy features
> + * @set_legacy_features:	override legacy features. Use of this callback
> + * 				is highly discouraged. You should only need
> + * 				this if your hardware platform requires further
> + * 				custom fine tuning far beyong what may be
> + * 				possible in x86_early_init_platform_quirks() by
> + * 				only using the current x86_hardware_subarch
> + * 				semantics.
>   */
>  struct x86_platform_ops {
>  	unsigned long (*calibrate_tsc)(void);
> @@ -165,6 +182,8 @@ struct x86_platform_ops {
>  	void (*save_sched_clock_state)(void);
>  	void (*restore_sched_clock_state)(void);
>  	void (*apic_post_init)(void);
> +	struct x86_legacy_features legacy;
> 
> 
> I don't think this belongs here --- we are in the ops structure.

Bike shed thing -- I went with what Ingo suggested [0], which was to
embed things under x86_platform, and that happens to be this struct.

So unless I hear otherwise from the maintainer I'm sticking with it.

http://lkml.kernel.org/r/20160224083259.GA20579@gmail.com

  Luis

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ