NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: kern/50430: syscall_disestablish() can remove active syscalls



The following reply was made to PR kern/50430; it has been noted by GNATS.

From: Paul Goyette <paul%vps1.whooppee.com@localhost>
To: Christos Zoulas <christos%zoulas.com@localhost>
Cc: gnats-bugs%NetBSD.org@localhost, kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, 
    netbsd-bugs%netbsd.org@localhost
Subject: re: kern/50430: syscall_disestablish() can remove active syscalls
Date: Mon, 16 Nov 2015 06:12:01 +0800 (PHT)

 On Sun, 15 Nov 2015, Christos Zoulas wrote:
 
 > Sure, that sounds prudent. ...
 
 Also realize that disabling autounload won't prevent manual unloading
 of modules via modunload(8).
 
 
 >                      ... It is difficult to fix properly. One way to do
 > this would be to mark all lwps that have used compat syscalls with a bit
 > depending on the module they have used, and refuse to unload the module
 > until the lwp is gone.
 >
 > - when load a module that has compat syscalls, assign to it a bit.
 > - mark a flags field of all syscalls that were loaded with that module
 >  with that bit.
 > - or the lwp flags with the syscall flags on each syscall.
 > - when it is time to unload check that no lwp has that bit in the flags
 >  set.
 > - instead of keeping l_sysent, keep l_sysmodflags or something.
 
 It's not only "compat" modules that need to worry about this.  It is
 potentially any unloadable module that uses syscall_establish().  (We
 could skip allocating/setting the flag for built-in modules, but I
 don't think that syscall_establish() is aware of this.)
 
 
 +------------------+--------------------------+-------------------------+
 | Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
 | (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
 | Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org  |
 +------------------+--------------------------+-------------------------+
 



Home | Main Index | Thread Index | Old Index