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:	Mon, 11 May 2009 22:05:21 +0400
From:	Cyrill Gorcunov <gorcunov@...il.com>
To:	Yinghai Lu <yinghai@...nel.org>
Cc:	Ingo Molnar <mingo@...e.hu>, mingo@...hat.com, hpa@...or.com,
	linux-kernel@...r.kernel.org, tglx@...utronix.de,
	eswierk@...stanetworks.com, linux-tip-commits@...r.kernel.org
Subject: Re: [tip:x86/apic] x86: read apic ID in the !acpi_lapic case

[Yinghai Lu - Mon, May 11, 2009 at 10:43:33AM -0700]
...
| >>
| >> x86: apic - fixmap apic address even if apic disabled
| >>
| >> In case if apic were disabled by boot option
| >> we still need read_apic operation. So fixmap
| >> a fake apic area if needed.
| >>
| >> Signed-off-by: Cyrill Gorcunov <gorcunov@...nvz.org>
| >> ---
| >>  arch/x86/kernel/apic/apic.c |   17 +++++++++--------
| >>  1 file changed, 9 insertions(+), 8 deletions(-)
| >>
| >> Index: linux-2.6.git/arch/x86/kernel/apic/apic.c
| >> =====================================================================
| >> --- linux-2.6.git.orig/arch/x86/kernel/apic/apic.c
| >> +++ linux-2.6.git/arch/x86/kernel/apic/apic.c
| >> @@ -1591,13 +1591,6 @@ void __init init_apic_mappings(void)
| >>  	} else
| >>  		apic_phys = mp_lapic_addr;
| >>  
| >> -	/* lets check if we may NOP'ify apic operations */
| >> -	if (!cpu_has_apic) {
| >> -		pr_info("APIC: disable apic facility\n");
| >> -		apic_disable();
| >> -		return;
| >> -	}
| >> -
| >>  	/*
| >>  	 * acpi lapic path already maps that address in
| >>  	 * acpi_register_lapic_address()
| >> @@ -1606,7 +1599,15 @@ void __init init_apic_mappings(void)
| >>  		set_fixmap_nocache(FIX_APIC_BASE, apic_phys);
| >>  
| >>  	apic_printk(APIC_VERBOSE, "mapped APIC to %08lx (%08lx)\n",
| >> -				APIC_BASE, apic_phys);
| >> +			APIC_BASE, apic_phys);
| >> +
| >> +	/* lets check if we may NOP'ify apic operations */
| >> +	if (!cpu_has_apic) {
| >> +		pr_info("APIC: disable apic facility\n");
| >> +		apic_disable();
| >> +		return;
| >> +	}
| >> +
| > 
| > Will check this - thanks.
| > 
| 
| please check this one instead.
| 
| [PATCH] x86: add native_apic_read_dummy
| 
| when apic is not used ( not there, or disable_apic ), try to install
| dummy read too.
| 
| could save 4k in that case.
| 
| [ Impact: fix bug when try to dump APIC reg ]
| 
| Signed-off-by: Yinghai Lu <yinghai@...nel.org>
| Cc: Cyrill Gorcunov <gorcunov@...nvz.org>
| 

Thanks Yinghai, looks really attractive!

But would need a good testing (seems we
rely on read_apic heavily in smp environment
even if it was disabled or not supported).

(btw comment about disable_apic now should
 contain apic->read as well or should be dropped
 completely since all is selfevidence from code
 though this is not that important i believe)

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