From owner-svn-src-all@freebsd.org Tue Jul 28 17:09:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1F4C336F3E7; Tue, 28 Jul 2020 17:09:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BGNSX011lz4dpC; Tue, 28 Jul 2020 17:09:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D76641276B; Tue, 28 Jul 2020 17:09:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06SH9FQk065836; Tue, 28 Jul 2020 17:09:15 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06SH9FLv065835; Tue, 28 Jul 2020 17:09:15 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202007281709.06SH9FLv065835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 28 Jul 2020 17:09:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363652 - head/share/man/man3 X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/share/man/man3 X-SVN-Commit-Revision: 363652 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jul 2020 17:09:16 -0000 Author: jhb Date: Tue Jul 28 17:09:15 2020 New Revision: 363652 URL: https://svnweb.freebsd.org/changeset/base/363652 Log: Add further clarification on si_addr and si_trapno. - In the initial description of si_addr, do not claim that it is always the faulting instruction. - For si_addr, document that it is generally set to the PC for synchronous signals, but that it can be set to the the address of the faulting memory reference for some signals including SIGSEGV and SIGBUS. In particular, while SIGSEGV generally sets si_addr to the faulting memory reference, SIGBUS can vary. On some platforms, some SIGBUS signals set si_addr to the PC and other SIGBUS signals set si_addr to the faulting address depending on the specific hardware exception. - For si_trapno, synchronous signals should set this to some value. Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D25777 Modified: head/share/man/man3/siginfo.3 Modified: head/share/man/man3/siginfo.3 ============================================================================== --- head/share/man/man3/siginfo.3 Tue Jul 28 16:10:51 2020 (r363651) +++ head/share/man/man3/siginfo.3 Tue Jul 28 17:09:15 2020 (r363652) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 8, 2020 +.Dd July 28, 2020 .Dt SIGINFO 3 .Os .Sh NAME @@ -68,7 +68,7 @@ sending process ID .It Vt uid_t Ta Va si_uid Ta sending process's real user ID .It Vt void Ta Va *si_addr Ta -address of faulting instruction +virtual address .It Vt int Ta Va si_status Ta exit value or signal .It Vt long Ta Va si_band Ta @@ -208,25 +208,24 @@ signal sent by .Xr pthread_kill 3 .El .Pp +For synchronous signals, +.Va si_addr +is generally set to the address of the faulting instruction. +However, synchronous signals raised by a faulting memory access such as +.Dv SIGSEGV +and +.Dv SIGBUS +may report the address of the faulting memory access (if available) in +.Va si_addr +instead. +.Pp +Sychronous signals set +.Va si_trapno +to a machine-dependent trap number. +.Pp In addition, the following signal-specific information is available: .Bl -column ".Dv SIGPOLL" ".Dv CLD_CONTINUED" .It Sy Signal Ta Sy Member Ta Sy Value -.It Dv SIGILL Ta Va si_addr Ta -address of faulting instruction -.It Ta Va si_trapno Ta -machine dependent of trap code -.It Dv SIGFPE Ta Va si_addr Ta -address of faulting instruction -.It Ta Va si_trapno Ta -machine dependent of trap code -.It Dv SIGSEGV Ta Va si_addr Ta -address of faulting memory reference -.It Ta Va si_trapno Ta -machine dependent of trap code -.It Dv SIGBUS Ta Va si_addr Ta -address of faulting instruction -.It Ta Va si_trapno Ta -machine dependent of trap code .It Dv SIGCHLD Ta Va si_pid Ta child process ID .It Ta Va si_status Ta