Subject: Re: Death of the 'stackgap', systrace
To: None <tech-kern@netbsd.org>
From: Andrew Doran <ad@netbsd.org>
List: tech-kern
Date: 07/13/2007 22:56:30
On Thu, Jul 12, 2007 at 09:59:27PM +0000, Christos Zoulas wrote:
> In article <20070712202114.GY986@snowdrop.l8s.co.uk>,
> David Laight  <david@l8s.co.uk> wrote:
> >After much hacking, there is now only one piece of code that relies on the
> >'stackgap' [1], this isn't in the compat code, but is in kern/krn_systrace.c.

Bravo! I'll chalk that one off the SMP task list that I have been keeping.

> >Anyone any thoughts on how to implement the systrace STRIOCREPLACE ioctl?
> >Or is systrace just such a nasty hack it deserves to die?
> 
> I don't see how to, without changing a lot of other code. I think
> that the current implementation of systrace is problematic in
> threaded programs threads can interfere and change arguments of
> syscalls after systrace have validated them but before the kernel
> has executed them.

It also needs per-thread credentials. Most of the infrastructure to do that
is there, but it's a different need to the one that the current code meets.
Anyway, it has tentacles, it's unmaintained and I haven't seen of much of a
user base - I'd like to see it go.

Andrew