Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262532AbUDDSYu (ORCPT ); Sun, 4 Apr 2004 14:24:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262539AbUDDSYu (ORCPT ); Sun, 4 Apr 2004 14:24:50 -0400 Received: from web40504.mail.yahoo.com ([66.218.78.121]:39604 "HELO web40504.mail.yahoo.com") by vger.kernel.org with SMTP id S262532AbUDDSYs (ORCPT ); Sun, 4 Apr 2004 14:24:48 -0400 Message-ID: <20040404182438.79937.qmail@web40504.mail.yahoo.com> Date: Sun, 4 Apr 2004 11:24:38 -0700 (PDT) From: Sergiy Lozovsky Subject: Re: kernel stack challenge To: Andi Kleen Cc: linux-kernel@vger.kernel.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1212 Lines: 41 Thanks, Andi. That can be the case. Bad thing is that stack size is hardcoded all over the kernel. I wonder how it is possible to access task struct having current stack pointer. %esp points at the middle of the stack (when we are in the kernel) when interrupt occures. Serge. --- Andi Kleen wrote: > Sergiy Lozovsky writes: > > > This function doesn't work in the kernel (system > hungs > > instantly when my function is called). Does > antbody > > have any idea what the reason can be? Some special > > alignment? Special memory segment? In what > direction > > should I look? > > The kernel puts some data about the current task at > the bottom > of the stack and accesses that by referencing the > stack pointer > in "current". This is even used by interrupts. > > -Andi > __________________________________ Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway http://promotions.yahoo.com/design_giveaway/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/