All of lore.kernel.org
 help / color / mirror / Atom feed
* (no subject)
@ 2004-05-24 22:20 Laughlin, Joseph V
  2004-05-24 22:30 ` your mail Herbert Poetzl
  2004-05-24 22:33 ` Chris Wright
  0 siblings, 2 replies; 4+ messages in thread
From: Laughlin, Joseph V @ 2004-05-24 22:20 UTC (permalink / raw)
  To: linux-kernel

I've been tasked with modifying a 2.4 kernel so that a non-root user can
do the following:

Dynamically change the priorities of processes (up and down)
Lock processes in memory
Can change process cpu affinity

Anyone got any ideas about how I could start doing this?  (I'm new to
kernel development, btw.)

Thanks,

Joe Laughlin
Phantom Works - Integrated Technology Development Labs 
The Boeing Company




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: your mail
  2004-05-24 22:20 Laughlin, Joseph V
@ 2004-05-24 22:30 ` Herbert Poetzl
  2004-05-24 22:34   ` Marc-Christian Petersen
  2004-05-24 22:33 ` Chris Wright
  1 sibling, 1 reply; 4+ messages in thread
From: Herbert Poetzl @ 2004-05-24 22:30 UTC (permalink / raw)
  To: Laughlin, Joseph V; +Cc: linux-kernel

On Mon, May 24, 2004 at 03:20:33PM -0700, Laughlin, Joseph V wrote:
> I've been tasked with modifying a 2.4 kernel so that a non-root user can
> do the following:
> 
> Dynamically change the priorities of processes (up and down)
> Lock processes in memory
> Can change process cpu affinity
> 
> Anyone got any ideas about how I could start doing this?  (I'm new to
> kernel development, btw.)

check the kernel capability system ...
(it's quite simple)

#define CAP_SYS_NICE         23
#define CAP_IPC_LOCK         14

cpu scheduler affinity isn't part of 2.4 AFAIK
so there is no easy way to 'control' it ...

HTH,
Herbert

> Thanks,
> 
> Joe Laughlin
> Phantom Works - Integrated Technology Development Labs 
> The Boeing Company
> 
> 
> 
> -
> 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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: your mail
  2004-05-24 22:20 Laughlin, Joseph V
  2004-05-24 22:30 ` your mail Herbert Poetzl
@ 2004-05-24 22:33 ` Chris Wright
  1 sibling, 0 replies; 4+ messages in thread
From: Chris Wright @ 2004-05-24 22:33 UTC (permalink / raw)
  To: Laughlin, Joseph V; +Cc: linux-kernel

* Laughlin, Joseph V (Joseph.V.Laughlin@boeing.com) wrote:
> I've been tasked with modifying a 2.4 kernel so that a non-root user can
> do the following:
> 
> Dynamically change the priorities of processes (up and down)

Requires CAP_SYS_NICE.

> Lock processes in memory

Currently requires CAP_IPC_LOCK.  However, this one is already been
done using rlimits (at least via mlock() and friends, SHM_LOCK has
different issue).

> Can change process cpu affinity

Requires CAP_SYS_NICE (but I believe this was a 2.6 feature).

> Anyone got any ideas about how I could start doing this?  (I'm new to
> kernel development, btw.)

There's a few approaches floating about.  Probably the simplest is to
disable the checks globally, but this will also be less secure.  I have
an example of this in 2.6 if you'd like.

thanks,
-chris
-- 
Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: your mail
  2004-05-24 22:30 ` your mail Herbert Poetzl
@ 2004-05-24 22:34   ` Marc-Christian Petersen
  0 siblings, 0 replies; 4+ messages in thread
From: Marc-Christian Petersen @ 2004-05-24 22:34 UTC (permalink / raw)
  To: linux-kernel; +Cc: Herbert Poetzl, Laughlin, Joseph V

On Tuesday 25 May 2004 00:30, Herbert Poetzl wrote:

Hi Joseph,

> > Dynamically change the priorities of processes (up and down)
> > Lock processes in memory
> > Can change process cpu affinity
> > Anyone got any ideas about how I could start doing this?  (I'm new to
> > kernel development, btw.)
> check the kernel capability system ...
> (it's quite simple)
> #define CAP_SYS_NICE         23
> #define CAP_IPC_LOCK         14
> cpu scheduler affinity isn't part of 2.4 AFAIK
> so there is no easy way to 'control' it ...

at least I have a patch in my 2.4-tree where a user in a predefined GID 
(changeable via /proc) can change his/her nice of his/her own processes up 
and down.

ciao, Marc

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-05-24 22:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-24 22:20 Laughlin, Joseph V
2004-05-24 22:30 ` your mail Herbert Poetzl
2004-05-24 22:34   ` Marc-Christian Petersen
2004-05-24 22:33 ` Chris Wright

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.