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, 15 Mar 2012 16:04:52 -0700
From:	Suresh Siddha <suresh.b.siddha@...el.com>
To:	Steffen Persvold <sp@...ascale.com>
Cc:	Yinghai Lu <yinghai@...nel.org>, Ingo Molnar <mingo@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	Daniel J Blueman <daniel@...ascale-asia.com>,
	linux-kernel@...r.kernel.org, x86@...nel.org
Subject: Re: [PATCH] Use x2apic_supported() in the default_apic_id_valid()
 function.

On Thu, 2012-03-15 at 23:34 +0100, Steffen Persvold wrote:
> Is my understanding of your suggestion correct that in 
> x2apic_phys/cluster.c we add the following apic_id_valid() function :
> 
> static int x2apic_apic_id_valid(int apicid)
> {
>   	return x2apic_mode || (apicid < 255);
> }

Steffen, We can have something like:

static int x2apic_apic_id_valid(int apicid)
{
   	return 1;
}

and

static int xapic_apic_id_valid(int apicid)
{
   	return apicid < 255;
}

If we have selected x2apic driver, then we know we are already in x2apic
mode. And also x2apic_uv_x need to use the x2apic version above.

> Considering that this function (apic->apic_id_valid()) is called already 
> in the acpi/boot.c::acpi_parse_x2apic() function is it sufficient enough 
> to test for x2apic_mode ? Yinghai indicated that x2apic_mode was not set 
> at this point, thus it was testing cpu_has_x2apic instead ?

If the bios has handed over to us in x2apic mode (or if it is a numachip
platform), then by this point apic driver is already set to the
corresponding x2apic/numachip driver etc. so we should be fine.

When we are in xapic mode, typically there should be no x2apic MADT
entries. And even if there are any (bios not following x2apic spec), the
above xapic_apic_id_valid() check will consider only those x2apic MADT
entries whose id's are less than 255. xapic mode can go into x2apic mode
later but that flow is not supposed to bring up any cpu with apic id >
255. So parsing only entries with apic id < 255 here should be fine.

Hope this clarifies.

thanks,
suresh

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