From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1gLu2t-0006bi-QE for kernelnewbies@kernelnewbies.org; Sun, 11 Nov 2018 13:01:15 -0500 Received: by mail-lf1-x12f.google.com with SMTP id e26so2824074lfc.2 for ; Sun, 11 Nov 2018 10:01:14 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Carter Cheng Date: Mon, 12 Nov 2018 02:00:02 +0800 Message-ID: Subject: Re: function stack frames in the kernel To: augustocaringi@gmail.com Cc: kernelnewbies@kernelnewbies.org List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============8108530418350851546==" Errors-To: kernelnewbies-bounces@kernelnewbies.org Message-ID: <20181111180002.cIuhwk-n_yzmsMQ5MEqcfodn-8w-hmtx6Jl-RTm6eDA@z> --===============8108530418350851546== Content-Type: multipart/alternative; boundary="0000000000002c4781057a675b57" --0000000000002c4781057a675b57 Content-Type: text/plain; charset="UTF-8" Thanks for the reply but the link doesn't quite answer the question. I am wondering how the pointer is handled so that there is one per thread by the compiler. I perhaps was under the perhaps mistaken impression that the stack pointer frame pointer management inside the compiler makes certain assumptions in user space- but i am unsure how this applies to kernel space. On Mon, Nov 12, 2018 at 1:55 AM Augusto Mecking Caringi < augustocaringi@gmail.com> wrote: > On Sun, Nov 11, 2018 at 6:04 PM Carter Cheng > wrote: > > I am wondering how the compiler divines which stack to use for function > calls and placement of locals and arguments when a function call is made > inside the kernel since the kernel has multiple call stacks. Are function > calls handled manually inside kernel code or is there something special > inside the compiler for handling this? > > I think this link can answer your question... > > > https://stackoverflow.com/questions/12911841/kernel-stack-and-user-space-stack > > -- > Augusto Mecking Caringi > --0000000000002c4781057a675b57 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for the reply but the link doesn't quite answer= the question. I am wondering how the pointer is handled so that there is o= ne per thread by the compiler. I perhaps was under the perhaps mistaken imp= ression that the stack pointer frame pointer management inside the compiler= makes certain assumptions in user space- but i am unsure how this applies = to kernel space.

On Mo= n, Nov 12, 2018 at 1:55 AM Augusto Mecking Caringi <augustocaringi@gmail.com> wrote:
On Sun, Nov 11, 2018 at 6:04 PM Carter Cheng &= lt;cartercheng@g= mail.com> wrote:
> I am wondering how the compiler divines which stack to use for functio= n calls and placement of locals and arguments when a function call is made = inside the kernel since the kernel has multiple call stacks. Are function c= alls handled manually inside kernel code or is there something special insi= de the compiler for handling this?

I think this link can answer your question...

https://stackoverflow.= com/questions/12911841/kernel-stack-and-user-space-stack

--
Augusto Mecking Caringi
--0000000000002c4781057a675b57-- --===============8108530418350851546== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============8108530418350851546==--