From owner-freebsd-hackers Tue Jul 29 20:32:58 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id UAA03845 for hackers-outgoing; Tue, 29 Jul 1997 20:32:58 -0700 (PDT) Received: from implode.root.com (implode.root.com [198.145.90.17]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id UAA03836 for ; Tue, 29 Jul 1997 20:32:55 -0700 (PDT) Received: from implode.root.com (localhost [127.0.0.1]) by implode.root.com (8.8.5/8.8.5) with ESMTP id UAA12396; Tue, 29 Jul 1997 20:33:56 -0700 (PDT) Message-Id: <199707300333.UAA12396@implode.root.com> To: Michael Smith cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Location of copyin() and copyout().. In-reply-to: Your message of "Wed, 30 Jul 1997 12:52:18 +0930." <199707300322.MAA17715@genesis.atrad.adelaide.edu.au> From: David Greenman Reply-To: dg@root.com Date: Tue, 29 Jul 1997 20:33:55 -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >So, I write a function linux_i386_modify_ldt(), which lives in the >linux emulation module. It takes the Linux i386_modify_ldt() syscall, >converts the arguments to the right format, and tries to call >i386_set_ldt(). > >Only it _can't_, because the latter is using copyin(), and cannot access >the argument structure in kernel space. Ah, now I understand. Yes, copyin/out do page protection checking and will not allow a copyout to kernel memory or a copyin from kernel memory (since kernel memory is protected against users). -DG David Greenman Core-team/Principal Architect, The FreeBSD Project