mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: selvakumar nagendran <kernelselva@yahoo.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Interception for a resource based scheduler
Date: Fri, 31 Dec 2004 08:48:56 +0100	[thread overview]
Message-ID: <1104479336.5402.4.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <20041231065136.94485.qmail@web60605.mail.yahoo.com>

On Thu, 2004-12-30 at 22:51 -0800, selvakumar nagendran wrote:
> hi,
>   I am using these information for the scheduler I am
> developing in Linux. The scheduler selects the next
> process to run based on the resources needed so that a
> high priority process will not starve for a semaphore
> key, file lock etc that were acquired by a low
> priority process. The user may change the file
> descriptor only through syscalls. If I intercept them
> and update the resource history that I am maintaining,
> then will the information break?

I think you missed the point. I'll reexplain:

what do you is

syscall_wrapper()
{
	original_syscall_that_copies_the_numbers_to_userspace();
	kmalloc(GFP_KERNEL); <-- can sleep
	copy_numbers_back_from_userspace();
}

it is REALLY easy for another thread of the userspace program that did
the syscall to change IT'S OWN MEMORY where the 2 FD numbers are stored
between the moment the original syscall copies them there, and the
moment you *recopy* them back.



      reply	other threads:[~2004-12-31  7:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-30 10:54 Bug : Out of range ptr error in module indicates bug in slab.c selvakumar nagendran
2004-12-30 11:18 ` Arjan van de Ven
2004-12-30 12:13   ` Bug_reply " selvakumar nagendran
2004-12-30 12:18     ` Arjan van de Ven
2004-12-31  6:51       ` Interception for a resource based scheduler selvakumar nagendran
2004-12-31  7:48         ` Arjan van de Ven [this message]

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=1104479336.5402.4.camel@laptopd505.fenrus.org \
    --to=arjan@infradead.org \
    --cc=kernelselva@yahoo.com \
    --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

all inboxes | Powered by JetHome®