mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: sena <auntvini@sedal.usyd.edu.au>
To: Robin Holt <holt@sgi.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: uids in task_struct-Further Explaining the Problem
Date: Tue, 06 Jan 2004 02:20:39 +1100	[thread overview]
Message-ID: <3FF980C7.3060301@sedal.usyd.edu.au> (raw)

Hi Robin,

Thank you very much for the previous advice and for your valuable time.

I thought of further explaining the problem to you.


At this stage linux kernel is calculating Load Averages. The major input 
of the calculation is number of running exe and  Runnables in the 
runnable Queue.

This is happening In timer.c
static unsigned long count_active_tasks(void) and

static inline void calc_load(unsigned long ticks)

What I am Trying:

What I am tryiing to do is to seperate the running exe and  Runnables 
according to the owner of those processes (Say 5 people have login and 
they run diffrent processes)

And then seperately calculate the Load Averages for those respective 
login users.


The Problems:

The task_struct has a uid field. I have used that field to seperate 
them. But the problem is when a child process is created by its parent 
then the child inherits  the uid of the parents. As a result the correct 
uid which is related to the username does not contain in that uid.

Example:

Say a computer has 5 user logins name1(500), name2(501), 
name3(502).........name5(504) apart from root. If these 5 people 
remotely login and runs there jobs, then the user name of those jobs are 
name1,name2 and name3.

Say if they use telnet to remotely login then those Tasks will be 
started under telnet server as children.

As the children inherits uid, euid etc of the parents. That means telnet 
is run as root and it inherits uid<500.

task_struct has uid and it is updated accordingly.


I have built the kernel 2.4.19sena1 successfully but this is my problem. 
The problem because child process inherits uid etc if I start any 
process through telnet


Thanks
Sena Seneviratne
Computer Engineering Lab
Sydney University


             reply	other threads:[~2004-01-06  3:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-05 15:20 sena [this message]
2004-01-06 19:35 ` Robin Holt
2004-01-06  1:28   ` auntvini

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=3FF980C7.3060301@sedal.usyd.edu.au \
    --to=auntvini@sedal.usyd.edu.au \
    --cc=holt@sgi.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®