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: <200704251124.48445.ak@suse.de>
Date:	Wed, 25 Apr 2007 11:24:48 +0200
From:	Andi Kleen <ak@...e.de>
To:	Jeremy Fitzhardinge <jeremy@...p.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	virtualization@...ts.osdl.org, lkml <linux-kernel@...r.kernel.org>,
	Benjamin LaHaise <bcrl@...ck.org>,
	Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH 11/25] xen: Xen SMP guest support



>  #ifdef CONFIG_X86_LOCAL_APIC
>  static unsigned long xen_apic_read(unsigned long reg)

Can't you just make them all NULL? Crashing here should be correct.


  
> +#ifdef CONFIG_SMP
> +static const struct smp_ops xen_smp_ops __initdata = {

Why __initdata? 

> +/* VCPUs are single-cored, and have no siblings */
> +static void set_cpu_sibling_map(int cpu)

Can you put this somewhere generic and use it everywhere? Don't want
duplication of this code.

> +{
> +	struct cpuinfo_x86 *c = &cpu_data[cpu];
> +
> +	cpu_set(cpu, cpu_sibling_map[cpu]);
> +	cpu_set(cpu, c->llc_shared_map);
> +	cpu_core_map[cpu] = cpu_sibling_map[cpu];
> +	c->booted_cores = 1;
> +}
> +
> +static void remove_siblinginfo(int cpu)

Similar.

> +void __init xen_fill_possible_map(void)
> +{
> +	int i, rc;
> +
> +	for_each_possible_cpu(i)
> +	    if (i != smp_processor_id())
> +		return;

Strange check?

> +
> + * We need to reload %cr3 since the page tables may be going
> + * away from under us..
> + */
> +static inline void leave_mm (unsigned long cpu)
> +{
> +#ifdef CONFIG_SMP
> +	if (per_cpu(cpu_tlbstate, cpu).state == TLBSTATE_OK)
> +		BUG();
> +	cpu_clear(cpu, per_cpu(cpu_tlbstate, cpu).active_mm->cpu_vm_mask);
> +#endif
> +	load_cr3(swapper_pg_dir);
>  }

Should be out of line


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