From owner-freebsd-bugs Fri Jan 8 07:40:08 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA08382 for freebsd-bugs-outgoing; Fri, 8 Jan 1999 07:40:08 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA08376 for ; Fri, 8 Jan 1999 07:40:07 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id HAA07938; Fri, 8 Jan 1999 07:40:01 -0800 (PST) Date: Fri, 8 Jan 1999 07:40:01 -0800 (PST) Message-Id: <199901081540.HAA07938@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.ORG From: Doug Rabson Subject: Re: kern/9359: implement support for adding syscalls in KLD modules Reply-To: Doug Rabson Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR kern/9359; it has been noted by GNATS. From: Doug Rabson To: Assar Westerlund Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: kern/9359: implement support for adding syscalls in KLD modules Date: Fri, 8 Jan 1999 15:35:43 +0000 (GMT) On 8 Jan 1999, Assar Westerlund wrote: > Doug Rabson writes: > > Thanks for this - I'll try and get it committed in the next day or two. > > Great. > > > I thought about the syscall number problem too and my best idea was > > to extend the struct module_stat with a type specific field which > > the syscall module handler could use to report the syscall index. > > I've written myself a note to work on this (it shouldn't be hard). > > This would actually make even more sense for device drivers. > > As to system calls, what would you think about adding the name to > `struct sysent' and then export some interface (sysctl?) for mapping > between names and numbers to userland? (This is not totally unrelated > to what Solaris does with /etc/name_to_sysnum.) I'm not sure about that - the extra text in the kernel address space would be pretty expensive for little return. I was thinking of a mechanism that a program could use like this: struct module_stat ms; ms.version = sizeof(ms); modstat(modfind("mysyscall"), &ms); syscall(ms.u.intval, ...); -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message