From owner-svn-src-head@FreeBSD.ORG Sun May 10 14:50:51 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4CF13123; Sun, 10 May 2015 14:50:51 +0000 (UTC) Received: from svn.freebsd.org (svn.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 22528160A; Sun, 10 May 2015 14:50:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4AEopSD074788; Sun, 10 May 2015 14:50:51 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4AEooNH074786; Sun, 10 May 2015 14:50:50 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201505101450.t4AEooNH074786@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 10 May 2015 14:50:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282729 - head/lib/libc/net 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: Sun, 10 May 2015 14:50:51 -0000 Author: jilles Date: Sun May 10 14:50:50 2015 New Revision: 282729 URL: https://svnweb.freebsd.org/changeset/base/282729 Log: recv(),send(): Directly call interposing entry instead of going through PLT. recv() and send()'s calls to recvfrom() and sendto() are much like waitpid()'s call to wait4(), and likewise need not allow PLT interposing on the called function. Modified: head/lib/libc/net/recv.c head/lib/libc/net/send.c Modified: head/lib/libc/net/recv.c ============================================================================== --- head/lib/libc/net/recv.c Sun May 10 13:30:21 2015 (r282728) +++ head/lib/libc/net/recv.c Sun May 10 14:50:50 2015 (r282729) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "libc_private.h" #include @@ -48,5 +49,8 @@ recv(s, buf, len, flags) * POSIX says recv() shall be a cancellation point, so call the * cancellation-enabled recvfrom() and not _recvfrom(). */ - return (recvfrom(s, buf, len, flags, NULL, 0)); + return (((ssize_t (*)(int, void *, size_t, int, + struct sockaddr *, socklen_t *)) + __libc_interposing[INTERPOS_recvfrom])(s, buf, len, flags, + NULL, NULL)); } Modified: head/lib/libc/net/send.c ============================================================================== --- head/lib/libc/net/send.c Sun May 10 13:30:21 2015 (r282728) +++ head/lib/libc/net/send.c Sun May 10 14:50:50 2015 (r282729) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include "libc_private.h" #include @@ -48,5 +49,8 @@ send(s, msg, len, flags) * POSIX says send() shall be a cancellation point, so call the * cancellation-enabled sendto() and not _sendto(). */ - return (sendto(s, msg, len, flags, NULL, 0)); + return (((ssize_t (*)(int, const void *, size_t, int, + const struct sockaddr *, socklen_t)) + __libc_interposing[INTERPOS_sendto])(s, msg, len, flags, + NULL, 0)); }