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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 10 Mar 2015 09:06:28 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	"Li, Aubrey" <aubrey.li@...ux.intel.com>
Cc:	Arjan van de Ven <arjan@...ux.intel.com>,
	Borislav Petkov <bp@...en8.de>,
	"alan@...ux.intel.com" <alan@...ux.intel.com>,
	"H. Peter Anvin" <hpa@...ux.intel.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>, Len.Brown@...el.com,
	x86@...nel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86: Bypass legacy PIC and PIT on ACPI hardware reduced
 platform


* Li, Aubrey <aubrey.li@...ux.intel.com> wrote:

> >>  - in x86_reduced_hw_init() set 'legacy_pic' to 'null_legacy_pic'
> >>
> >>  - clean up 'global_clock_event' handling: instead of a global 
> >>    variable, move its management into x86_platform_ops::get_clockevent()
> >>    and set the method to hpet/pit/abp/etc. specific handlers that
> >>    return the right clockevent device.
> >>
> >>  - in your x86_reduced_hw_init() function add the hpet clockevent
> >>    device to x86_platform_ops::get_clockevent, overriding the default
> >>    PIT.
> 
> how about this one?
> 
> diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
> index b9e30da..70955d6 100644
> --- a/arch/x86/kernel/acpi/boot.c
> +++ b/arch/x86/kernel/acpi/boot.c
> @@ -1541,6 +1541,16 @@ int __init early_acpi_boot_init(void)
>  	 */
>  	early_acpi_process_madt();
> 
> +	/*
> +	 * Override x86_init functions and bypass legacy pic
> +	 * in hardware-reduced ACPI mode
> +	 */
> +	if (acpi_gbl_reduced_hardware) {
> +		x86_init.timers.timer_init = x86_init_noop;
> +		x86_init.irqs.pre_vector_init = x86_init_noop;
> +		legacy_pic = &null_legacy_pic;
> +	}

Sounds good to me, assuming it builds, boots and works! :-)

A couple of extra suggestions:

1)

I'd suggest moving it into its own dedicated, appropriately named 
static function, to make it clear that 'ACPI Reduced Hardware' init 
happens there.

2)

I'd also initialize it like this:

		x86_init.timers.timer_init	= x86_init_noop;
		x86_init.irqs.pre_vector_init	= x86_init_noop;
		legacy_pic			= &null_legacy_pic;

to make the noop patterns stand out better.

3)

Once all is said and done, please also make acpi_gbl_reduced_hardware 
a flag internal to the ACPI code, not exposed to and used by other 
bits of x86 code.

> If the above makes sense, I'll send poweroff and reboot change 
> together in a seperate patch.

Yeah, please send them in a single series though, so they form a 
logical group.

Thanks,

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