From owner-svn-src-stable@freebsd.org Thu Jan 28 22:57:11 2016 Return-Path: Delivered-To: svn-src-stable@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 8792FA71FBA; Thu, 28 Jan 2016 22:57:11 +0000 (UTC) (envelope-from brooks@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 mx1.freebsd.org (Postfix) with ESMTPS id 3B2A9613; Thu, 28 Jan 2016 22:57:11 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0SMvAM3051003; Thu, 28 Jan 2016 22:57:10 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0SMvAhg051002; Thu, 28 Jan 2016 22:57:10 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201601282257.u0SMvAhg051002@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 28 Jan 2016 22:57:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r295020 - stable/10/lib/libc/mips X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2016 22:57:11 -0000 Author: brooks Date: Thu Jan 28 22:57:09 2016 New Revision: 295020 URL: https://svnweb.freebsd.org/changeset/base/295020 Log: MFC r294515: Fix the implementations of PSEUDO_NOERROR and PSEUDO. The PSEUDO* macros should not declare , only _ and __sys_. This was causing the interposing C wrappers to be ignored due to link order. Reviewed by: kib Obtained from: CheriBSD (4e8e13c90fc6a80e1520de44a6864cfd78b3b56d) Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D4097 Modified: stable/10/lib/libc/mips/SYS.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/mips/SYS.h ============================================================================== --- stable/10/lib/libc/mips/SYS.h Thu Jan 28 22:34:29 2016 (r295019) +++ stable/10/lib/libc/mips/SYS.h Thu Jan 28 22:57:09 2016 (r295020) @@ -100,13 +100,31 @@ * Do a syscall that cannot fail (sync, get{p,u,g,eu,eg)id) */ #define RSYSCALL_NOERROR(x) \ - PSEUDO_NOERROR(x) +LEAF(__sys_ ## x); \ + .weak _C_LABEL(x); \ + _C_LABEL(x) = _C_LABEL(__CONCAT(__sys_,x)); \ + .weak _C_LABEL(__CONCAT(_,x)); \ + _C_LABEL(__CONCAT(_,x)) = _C_LABEL(__CONCAT(__sys_,x)); \ + SYSTRAP(x); \ + j ra; \ +END(__sys_ ## x) /* * Do a normal syscall. */ #define RSYSCALL(x) \ - PSEUDO(x) +LEAF(__sys_ ## x); \ + .weak _C_LABEL(x); \ + _C_LABEL(x) = _C_LABEL(__CONCAT(__sys_,x)); \ + .weak _C_LABEL(__CONCAT(_,x)); \ + _C_LABEL(__CONCAT(_,x)) = _C_LABEL(__CONCAT(__sys_,x)); \ + PIC_PROLOGUE(__sys_ ## x); \ + SYSTRAP(x); \ + bne a3,zero,err; \ + PIC_RETURN(); \ +err: \ + PIC_TAILCALL(__cerror); \ +END(__sys_ ## x) /* * Do a renamed or pseudo syscall (e.g., _exit()), where the entrypoint @@ -114,18 +132,14 @@ */ #define PSEUDO_NOERROR(x) \ LEAF(__sys_ ## x); \ - .weak _C_LABEL(x); \ - _C_LABEL(x) = _C_LABEL(__CONCAT(__sys_,x)); \ .weak _C_LABEL(__CONCAT(_,x)); \ _C_LABEL(__CONCAT(_,x)) = _C_LABEL(__CONCAT(__sys_,x)); \ SYSTRAP(x); \ j ra; \ - END(__sys_ ## x) +END(__sys_ ## x) #define PSEUDO(x) \ LEAF(__sys_ ## x); \ - .weak _C_LABEL(x); \ - _C_LABEL(x) = _C_LABEL(__CONCAT(__sys_,x)); \ .weak _C_LABEL(__CONCAT(_,x)); \ _C_LABEL(__CONCAT(_,x)) = _C_LABEL(__CONCAT(__sys_,x)); \ PIC_PROLOGUE(__sys_ ## x); \