Rewrite of revoke() system call available for testing - patch #2

YONETANI Tomokazu qhwt+dfly at les.ath.cx
Wed Apr 1 03:34:06 PDT 2009


On Tue, Mar 31, 2009 at 11:12:41PM -0700, Matthew Dillon wrote:
>     I've rewritten the revoke() implementation.  It is now able to
>     revoke any open file, not just devices.  The root directory, current
>     directory, and jail root directory for a process cannot be revoked.
>     The patch needs testing:
> 
> 	fetch http://apollo.backplane.com/DFlyMisc/revoke02.patch
> 
>     The original revoke() was a horrible hack that basically blew away
>     the underlying vnode without giving the VFS much say in the matter,
>     and required a lot of code hacks to deal with the resulting mess.
>     The new revoke() actually replaces the open descriptors with a dummy
>     descriptor and close()s the revoked descriptors properly.
> 
>     For testing purposes, opening up ssh, screen, and 'script' typescript
>     connections to/on the target machine helps exercise the controlling
>     terminal logic.

Hi, just gave it a try on VKERNEL (-n 2) built from the source
DragonFly-2.3.0.555.gb364b with your patch applied.  It panicked just
before login prompt.  Booting into single user mode is OK, but issuing
`reboot' command from single user prompt also triggers a similarly
looking panic.

Additional TCP options:.

Wed Apr  1 18:40:40 JST 2009
panic: lockmgr: locking against myself
mp_lock = 00000000; cpuid = 0
Trace beginning at frame 0x5a695a90
panic(5a695ab4,594002e8,0,0,5a695ac4) at 0x80b94ce
panic(822b1d4,593f9100,20000,594002e8,20002) at 0x80b94ce
lockmgr(594002e8,20002,59427c80,59400228,5a7ca758) at 0x80adc30
vn_lock(59400228,20002,59427c80,59427c80,5a695b0c) at 0x810c7ce
vn_close(59400228,a,59427c80,5a695b38,80a303d) at 0x810cc41
vn_close(59427c80,80ac951,82dcba0,82dcba0,5a695b48) at 0x810cc90
fdrop(59427c80,cc,5a818204,77,1) at 0x80a303d
closef(59427c80,5a7ca758,59427968,5a818204,5a695bc0) at 0x80a3323
dupfdopen(5a7ca758,5a695bc0,5a695bc0,593cd418,59368488) at 0x80a3ccc
allproc_scan(80a3baa,5a695bc0,59400228,1,0) at 0x80b3139
fdrevoke(59400228,1,59368488,59400228,830b2bc) at 0x80a435f
vrevoke(59400228,59368488,59400228,55b01290,593f9100) at 0x8103b79
ttyclosesession(55b01290,1,55b75270,55b75150,5a695cb0) at 0x80e025d
exit1(0,5a695ce4,82162a1,5a695ca0,6) at 0x80a966e
sys_exit(5a695ca0,6,0,0,5938dd58) at 0x80a98b7
syscall2(5a695d40,6,5938dd58,0,0) at 0x82162a1
user_trap(5a695d40,55b75150,82158b9,0,8216b96) at 0x82164d0
go_user(5a695d38,0,0,7b,0) at 0x82168e0
Debugger("panic")

CPU0 stopping CPUs: 0x00000002
 stopped
Stopped at      0x8213b41:      movb    $0,0x835d2d4
db>





More information about the Kernel mailing list