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:	Sat, 23 Sep 2006 10:13:37 +0200
From:	Andi Kleen <ak@....de>
To:	Jeremy Fitzhardinge <jeremy@...p.org>
Cc:	Rusty Russell <rusty@...tcorp.com.au>,
	lkml - Kernel Mailing List <linux-kernel@...r.kernel.org>,
	virtualization <virtualization@...ts.osdl.org>
Subject: Re: [PATCH 5/7] Use %gs for per-cpu sections in kernel

> >+
> >+	/* Set up GDT entry for 16bit stack */
> >+	stk16_off = (u32)&per_cpu(cpu_16bit_stack, cpu);
> >+	gdt = per_cpu(cpu_gdt_table, cpu);
> >+	*(__u64 *)(&gdt[GDT_ENTRY_ESPFIX_SS]) |=
> >+		((((__u64)stk16_off) << 16) & 0x000000ffffff0000ULL) |
> >+		((((__u64)stk16_off) << 32) & 0xff00000000000000ULL) |
> >+		(CPU_16BIT_STACK_SIZE - 1);
> >  
> 
> This should use pack_descriptor().  I'd never got around to changing it, 
> but it really should.

I fixed it now in the original patch

> >+	/* Complete percpu area setup early, before calling printk(),
> >+	   since it may end up using it indirectly. */
> >+	setup_percpu_for_this_cpu(cpu);
> >+
> >  
> 
> I managed to get all this done in head.S before going into C code; is 
> that not still possible?  Or is there a later patch to do this.

Why write in assembler what you can write in C?

-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