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: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: re: kern/50430: syscall_disestablish() can remove active syscalls
Date: Mon, 16 Nov 2015 09:36:53 +0800 (PHT)
On Mon, 16 Nov 2015, Paul Goyette wrote:
> 1. Seems to me we would need to keep a 32- or 64-bit mask for each
> syscall. When a new request to sc_establish() comes in, we could
> calculate the logical-OR of all current bits, complement the
> result, and find-least-significant-bit-set.
Calculating the logical-OR of all current bits requires us to know how
many entries there are in the emul->e_sysent table. Many ports have
__HAVE_MINIMAL_EMUL defined, which prevents creation of the sy_nsysent
member.
For now, I am making the sy_nsysent member unconditional; this affects
a number of compat_* and rump/* files, but it appears that they were
all prepared for this.
> 2. What do we do if we run out of bits? Perhaps not too likely,
> but we would need to handle it. What would be an appropriate
> value for sc_establish() to return if no bit is available?
For now, I've selected ENOFILE; simple to change if a better value is
agreed upon.
Home |
Main Index |
Thread Index |
Old Index