From owner-svn-src-head@freebsd.org Fri Jul 3 17:30:32 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19996994EEF; Fri, 3 Jul 2015 17:30:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0770D2CAD; Fri, 3 Jul 2015 17:30:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t63HUVk4036041; Fri, 3 Jul 2015 17:30:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t63HUVPe036040; Fri, 3 Jul 2015 17:30:31 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201507031730.t63HUVPe036040@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 3 Jul 2015 17:30:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285104 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2015 17:30:32 -0000 Author: kib Date: Fri Jul 3 17:30:31 2015 New Revision: 285104 URL: https://svnweb.freebsd.org/changeset/base/285104 Log: Grammar and language fixes. Submitted by: wblock Review: https://reviews.freebsd.org/D2969 MFC after: 12 days Modified: head/lib/libc/sys/ptrace.2 Modified: head/lib/libc/sys/ptrace.2 ============================================================================== --- head/lib/libc/sys/ptrace.2 Fri Jul 3 17:09:27 2015 (r285103) +++ head/lib/libc/sys/ptrace.2 Fri Jul 3 17:30:31 2015 (r285104) @@ -2,7 +2,7 @@ .\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $ .\" .\" This file is in the public domain. -.Dd June 30, 2015 +.Dd July 3, 2015 .Dt PTRACE 2 .Os .Sh NAME @@ -506,16 +506,16 @@ argument is ignored. .Sh x86 MACHINE-SPECIFIC REQUESTS .Bl -tag -width "Dv PT_GETXSTATE_INFO" .It Dv PT_GETXMMREGS -Copies out the XMM FPU state into the buffer pointed to by the +Copy the XMM FPU state into the buffer pointed to by the argument .Fa addr . -The buffer has the same layout as the 32bit save buffer for the +The buffer has the same layout as the 32-bit save buffer for the machine instruction .Dv FXSAVE . .Pp -This request is only valid for i386 programs, both on native 32bit +This request is only valid for i386 programs, both on native 32-bit systems and on amd64 kernels. -For 64bit amd64 programs, the XMM state is reported as part of +For 64-bit amd64 programs, the XMM state is reported as part of the FPU state returned by the .Dv PT_GETFPREGS request. @@ -524,10 +524,10 @@ The .Fa data argument is ignored. .It Dv PT_SETXMMREGS -Loads the XMM FPU state for the thread from the buffer pointed to +Load the XMM FPU state for the thread from the buffer pointed to by the argument .Fa addr . -The buffer has the same layout as the 32bit load buffer for the +The buffer has the same layout as the 32-bit load buffer for the machine instruction .Dv FXRSTOR . .Pp @@ -539,15 +539,13 @@ The .Fa data argument is ignored. .It Dv PT_GETXSTATE_INFO -Returns the information about the enablement state of the XSAVE FPU -extensions supported by the CPU and allowed by the OS for use by userspace -programs. +Report which XSAVE FPU extensions are supported by the CPU +and allowed in userspace programs. The .Fa addr -argument must point to the variable of type +argument must point to a variable of type .Vt struct ptrace_xstate_info , which contains the information on the request return. -The .Vt struct ptrace_xstate_info is defined as follows: .Bd -literal @@ -558,8 +556,8 @@ struct ptrace_xstate_info { .Ed The .Dv xsave_mask -field is the bitmask of the currently enabled extensions. -The meaning of the bits is defined by the Intel and AMD +field is a bitmask of the currently enabled extensions. +The meaning of the bits is defined in the Intel and AMD processor documentation. The .Dv xsave_len @@ -573,10 +571,10 @@ The argument value must be equal to the size of the .Vt struct ptrace_xstate_info . .It Dv PT_GETXSTATE -Returns the content of the XSAVE area for the thread. +Return the content of the XSAVE area for the thread. The .Fa addr -argument points to the buffer where the content is copied, the +argument points to the buffer where the content is copied, and the .Fa data argument specifies the size of the buffer. The kernel copies out as much content as allowed by the buffer size. @@ -590,8 +588,12 @@ pointer. The buffer size is passed in the .Fa data argument. -The buffer must be at least as large to allow the x87 FPU and XMM state, -but not large than the XSAVE state length, as reported by the +The buffer must be at least as large as the +.Vt struct savefpu +(defined in +.Pa x86/fpu.h ) +to allow the complete x87 FPU and XMM state load. +It must not be larger than the XSAVE state length, as reported by the .Dv xsave_len field from the .Vt struct ptrace_xstate_info @@ -602,26 +604,28 @@ Layout of the buffer is identical to the .Dv XRSTOR machine instruction. .It Dv PT_GETFSBASE -The request returns the value of base used when doing segmented +Return the value of the base used when doing segmented memory addressing using the %fs segment register. The .Fa addr -argument points to the +argument points to an .Vt unsigned long -variable which gets the base value. +variable where the base value is stored. .Pp The .Fa data argument is ignored. .It Dv PT_GETGSBASE -Same as the +Like the .Dv PT_GETFSBASE request, but returns the base for the %gs segment register. .It Dv PT_SETFSBASE -Sets the base for the %fs segment register to the value pointed +Set the base for the %fs segment register to the value pointed to by the .Fa addr -argument, which must point to the +argument. +.Fa addr +must point to the .Vt unsigned long variable containing the new base. .Pp @@ -629,27 +633,25 @@ The .Fa data argument is ignored. .It Dv PT_SETGSBASE -Same as the +Like the .Dv PT_SETFSBASE -request, but allows setting the base for the %gs segment register. +request, but sets the base for the %gs segment register. .El .Sh PowerPC MACHINE-SPECIFIC REQUESTS .Bl -tag -width "Dv PT_SETVRREGS" .It Dv PT_GETVRREGS -Returns the +Return the thread's .Dv ALTIVEC -machine state for the thread into the buffer pointed to by -the argument +machine state in the buffer pointed to by .Fa addr . .Pp The .Fa data argument is ignored. .It Dv PT_SETVRREGS -Set the +Set the thread's .Dv ALTIVEC -machine state for the thread from the buffer pointed to by -the argument +machine state from the buffer pointed to by .Fa addr . .Pp The @@ -719,24 +721,36 @@ was less than or equal to zero, or large structure known to the kernel. .It The size (in -.Fa data) +.Fa data ) provided to the x86-specific .Dv PT_GETXSTATE_INFO request was not equal to the size of the .Vt struct ptrace_xstate_info . .It The size (in -.Fa data) +.Fa data ) +provided to the x86-specific +.Dv PT_SETXSTATE +request was less than the size of the x87 plus the XMM save area. +.It +The size (in +.Fa data ) provided to the x86-specific .Dv PT_SETXSTATE -request was less than the size of the x87 + XMM save area, -or larger than returned in the +request was larger than returned in the .Dv xsave_len member of the .Vt struct ptrace_xstate_info from the .Dv PT_GETXSTATE_INFO request. +.It +The base value, provided to the amd64-specific requests +.Dv PT_SETFSBASE +or +.Dv PT_SETGSBASE , +pointed outside of the valid user address space. +This error will not occur in 32-bit programs. .El .It Bq Er EBUSY .Bl -bullet -compact