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]
Message-ID: <49A524D3.3090408@gmail.com>
Date:	Wed, 25 Feb 2009 12:00:35 +0100
From:	Jiri Slaby <jirislaby@...il.com>
To:	mingo@...hat.com
CC:	x86@...nel.org, linux-kernel@...r.kernel.org,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH v2 1/2] x86_32: summit_32, use BAD_APICID

On 24.2.2009 21:41, Jiri Slaby wrote:
> --- a/arch/x86/kernel/apic/summit_32.c
> +++ b/arch/x86/kernel/apic/summit_32.c
> @@ -303,12 +303,10 @@ static inline unsigned int summit_cpu_mask_to_apicid(const cpumask_t *cpumask)
>   	int cpu;
>
>   	num_bits_set = cpus_weight(*cpumask);
> -	/* Return id to all */
>   	if (num_bits_set>= nr_cpu_ids)
> -		return 0xFF;
> +		return BAD_APICID;

Actually, wasn't this intended to return all available rather than BAD 
(to which would correspond the comment), but performed in a wrong 
manner? This is old code, any ideas who would know this?

In my opinion the check should be removed completely to allow the code 
go through same-cluster check.

In that case, the callers code is buggy, since it passes online_cpu 
masks even on machines, where apics are not on the same clusters.
--
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