From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 25 17:38:20 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 135321065673 for ; Tue, 25 Nov 2008 17:38:20 +0000 (UTC) (envelope-from bsd.quest@googlemail.com) Received: from gv-out-0910.google.com (gv-out-0910.google.com [216.239.58.184]) by mx1.freebsd.org (Postfix) with ESMTP id A1ABD8FC12 for ; Tue, 25 Nov 2008 17:38:19 +0000 (UTC) (envelope-from bsd.quest@googlemail.com) Received: by gv-out-0910.google.com with SMTP id n8so32310gve.39 for ; Tue, 25 Nov 2008 09:38:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:reply-to:mail-followup-to:mime-version:content-type :content-disposition:user-agent; bh=tlhR6TBiU+UQ1WG1p+TQBHBNSmmC/uITmxG1dseRYPI=; b=qCAYdY/AHZAwdt7YFAzqNg5dervmfo6vfJtiXtFTUtNcdVcZaFGAoULfwcnhHJ7m9d Lo9AFT/KJOFcvovQqViNPPBUy6InIcRigBpD9mhnyxBYozXFfvMeEYLt9V61KdVe38PR Nq+Xz71YAI90lm+7dSk6fMubDlAHr1wkS5rRU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:subject:message-id:reply-to:mail-followup-to :mime-version:content-type:content-disposition:user-agent; b=deiZY7/sIDqjOk/ybei/lXVZFj+i3ThOriTqzQNpns9axkuPoe0BvkrzAYK1gGaY3N d4lcjBMeSl1J/UpKnVTF+JR5+eCBcNPxvp1fYk1TbJ+P5w2CTMU6pwgQc8ZY8I83xJ1k n0e+wf2Xost2ok11tjJKBC4QuUQ0inrvxjqy4= Received: by 10.86.79.19 with SMTP id c19mr3120759fgb.66.1227634698350; Tue, 25 Nov 2008 09:38:18 -0800 (PST) Received: from localhost (BAJ43d7.baj.pppool.de [77.137.67.215]) by mx.google.com with ESMTPS id 4sm7626696fgg.4.2008.11.25.09.38.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 25 Nov 2008 09:38:17 -0800 (PST) Date: Tue, 25 Nov 2008 18:37:50 +0100 From: Alexej Sokolov To: freebsd-hackers@freebsd.org Message-ID: <20081125173750.GA4131@debian.samsung.router> Mail-Followup-To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Subject: copy, copyin, copyout X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alexej Sokolov List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2008 17:38:20 -0000 Hello, could anyone please explain to me the difference between functions: copystr() and copyinstr() ? For i386 copyinstr is implemented in assembler. I can not read the assembler code very well. I tried to allocate a memory in space of user process using vm_map_find and then with copystr() I could copy data between user and kernel memory. copystr() seemed to be able to do the same what copyinstr do. % uname -rp 7.0-RELEASE-p5 i386 -- Alexej Sokolov