[BProc] Re: bproc+autofs: oz_pgrp problem
Many of your questions may have already been answered in earlier discussions or in the FAQ. The search results page will indicate current discussions as well as past list serves, articles, and papers.
Erik Arjan Hendriks erik at hendriks.cxThu May 9 12:14:36 PDT 2002
- Previous message: [BProc] Re: bproc+autofs: oz_pgrp problem
- Next message: [BProc] Re: bproc+autofs: oz_pgrp problem
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, May 09, 2002 at 08:19:07PM +0200, hanzl at noel.feld.cvut.cz wrote: > ... > #include <asm/uaccess.h> > > /* Added by VH for bproc: */ > #include <linux/bproc.h> > ... > > static inline int autofs_oz_mode(struct autofs_sb_info *sbi) { > /* return sbi->catatonic || current->pgrp == sbi->oz_pgrp; > * Changed by Vaclav Hanzl to let it work with bproc: > */ > return sbi->catatonic || > bproc_hook_imv(current->pgrp,sys_getpgrp,()) == sbi->oz_pgrp; > } > > I have little idea what it actually means, but it works :) > Any comments welcome, as always. That calls: (kernel/sys.c from Linux source) asmlinkage long sys_getpgrp(void) { /* SMP - assuming writes are word atomic this is fine */ return bproc_hook_imv(current->pgrp,sys_getpgrp,()); } the bproc_hook_imv macro calls: (kernel/hooks.c from BProc source) int bproc_hook_sys_getpgrp(void) { return current->bproc.masq->pgrp; } ... but only if the caller has masqueraded PIDs which is exactly what you want. This patch should perfectly safe. It's small and to the point - I like it. > >This is the easiest way to get around the problem although there are > >some drawbacks. I've been pretty vehement about not providing hooks > >for things like daemons to escape. The rationale there is basically > >that people would use those hooks if they were there. :) > > Good rationale. Keep it. :-)) > > Little side-effect probably is that most people are not able to run > any daemons on bproc node. :-) But things are getting better... I don't like daemons on nodes anyway. I've been trying for years to reduce the bulk of stuff running on the nodes. - Erik
- Previous message: [BProc] Re: bproc+autofs: oz_pgrp problem
- Next message: [BProc] Re: bproc+autofs: oz_pgrp problem
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Beowulf mailing list
