From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 24 14:16:53 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3DC5D16A409 for ; Wed, 24 Jan 2007 14:16:53 +0000 (UTC) (envelope-from defan@zenon.net) Received: from mp.zenon.net (mp.zenon.net [195.2.72.79]) by mx1.freebsd.org (Postfix) with ESMTP id BA7F213C480 for ; Wed, 24 Jan 2007 14:16:52 +0000 (UTC) (envelope-from defan@zenon.net) Received: from [192.168.13.151] (HELO zts) by mp.zenon.net (CommuniGate Pro SMTP 4.3.7) with SMTP id 17520647; Wed, 24 Jan 2007 17:16:51 +0300 Message-ID: <0d4201c73fc2$4adfe160$970da8c0@jam.zenon.net> From: "Andrew N. Below" To: "Thijs Eilander" , References: Date: Wed, 24 Jan 2007 17:16:51 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1896 Cc: Subject: Re: how to deny reading of several sysctls (for a set of uids, f.e.) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2007 14:16:53 -0000 > > Is there a documented possibility to use syscalls _inside_ > > kernel code? > > In other words, I need to call the function located in > > loadable kernel object from kernel, doesn't matter how > > this would be done (syscall, etc). > Hi Andrew, > You can redirect syscalls to another function with loadable kernel modules. > Some documentation/examples you might want to read first: > > /usr/share/examples/kld > http://www.r4k.net/mod/fbsdfun.html > http://packetstormsecurity.org/papers/unix/bsdkern.htm > http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/driverbasics- > kld.html Thanks for these links, I have already seen them while googling around last night and now I'm in process of understanding, heh. Some things seems hard to get in becouse I'm working with RELENG_6, and examples/info in those tutorials are for 4.x (struct proc instead of struct thread, etc.) :) Anyway, thanks. Will try to go forward. -- Andrew N. Below