public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] task_struct colouring ...
Date: Fri, 30 Nov 2001 17:36:04 -0800	[thread overview]
Message-ID: <3C083404.1050608@zytor.com> (raw)
In-Reply-To: <Pine.LNX.4.40.0111301738420.1600-100000@blue1.dev.mcafeelabs.com>

Davide Libenzi wrote:

>>
>>This seems to confuddle the idea of colouring the kernel stack.
>>
> 
> It's task_truct colouring not stack, to colour the stack you've to go in
> arch/??/kernel/process.c and jitter the stack pointer.
> The task_struct colouring is done at task_struct creation time :
> 
> +struct task_struct *alloc_task_struct(void)
> +{
> +       unsigned long tskb = __get_free_pages(GFP_KERNEL, 1), tsk;
> +       tsk = tskb | ((tskb >> 13) & 0x00000060) | SMP_CACHE_BYTES;
> +       *(unsigned long *) tskb = tsk;
> +       return (struct task_struct *) tsk;
> +}
> 


I know, but I believe the part of the idea was to color not just the
current, but also the stack.

Your idea would make the obvious way to color the kernel stack -- have the
stacks offset by a non-power-of-two -- no longer work.

	-hpa



  reply	other threads:[~2001-12-01  1:36 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-30 21:47 [PATCH] task_struct colouring Davide Libenzi
2001-11-30 22:40 ` Alan Cox
2001-11-30 23:37   ` H. Peter Anvin
2001-11-30 23:53   ` Davide Libenzi
2001-11-30 23:57     ` Alan Cox
2001-12-01  0:33       ` Davide Libenzi
2001-12-01  1:05         ` H. Peter Anvin
2001-12-01  1:30           ` Davide Libenzi
2001-12-01  1:24             ` H. Peter Anvin
2001-12-01  1:41               ` Davide Libenzi
2001-12-01  1:36                 ` H. Peter Anvin [this message]
2001-12-01  9:58               ` Alan Cox
2001-12-01  9:49         ` Alan Cox
2001-12-01 23:37           ` Davide Libenzi
2001-12-01 23:50             ` kumon
2001-12-02  0:11               ` Davide Libenzi
2001-12-02 16:39                 ` Alan Cox
2001-12-02  0:02             ` [MOc]cda*mirabilos
2001-12-02  0:56               ` Davide Libenzi
2001-12-02 15:06                 ` [MOc]cda*mirabilos
2001-12-02 19:49                   ` Davide Libenzi
2001-12-02 19:50                     ` Thorsten Glaser
  -- strict thread matches above, loose matches on Subject: below --
2001-12-01 10:17 Manfred Spraul
2001-12-01 21:49 ` Davide Libenzi
2001-12-01 22:04 ` H. Peter Anvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3C083404.1050608@zytor.com \
    --to=hpa@zytor.com \
    --cc=davidel@xmailserver.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox