Messages in this thread | | | Date | Sun, 18 Jan 2009 17:13:32 +0900 | From | Tejun Heo <> | Subject | Re: [PATCH 16/17] x86-64: Remove the PDA |
| |
Hello, Brian.
Brian Gerst wrote: >> How about something like the following? >> >> #define CANARY_OFFSET 40 >> #define CANARY_SIZE 8 >> >> DECLARE_PER_CPU(unsigned long, stack_canary); >> >> and in linker script, >> >> PERCPU_VADDR_PREALLOC(0, :percpu, CANARY_OFFSET + CANARY_SIZE) >> per_cpu__stack_canary = __per_cpu_start + CANARY_OFFSET; >> > > The thing I don't like about the prealloc method is that it puts the > page-aligned variables at the end. This leaves a gap which is > unavailable for dynamic allocations. Stealing 48 bytes from the > bottom of the irqstack (which is 16k) keeps the page-aligned section > at the start. It's really no different than how the thread_info > structure sits at the bottom of the process stack. > > How about something like: > union irq_stack_union { > char irq_stack[IRQSTACKSIZE]; > struct { > char pad[40]; > unsigned long stack_canary; > } > }; > > That documents the overlay better, and avoids having to touch the > linker script.
I have no objection as long as it's sufficiently documented.
Thanks.
-- tejun
| |