From owner-svn-src-head@FreeBSD.ORG Sun May 24 16:47:15 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 8D7FB274; Sun, 24 May 2015 16:47:15 +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 6ECBC16D5; Sun, 24 May 2015 16:47:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4OGlFjs096398; Sun, 24 May 2015 16:47:15 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4OGlEPe096388; Sun, 24 May 2015 16:47:14 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201505241647.t4OGlEPe096388@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 24 May 2015 16:47:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283443 - in head/sys: amd64/linux amd64/linux32 compat/linux i386/linux 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, 24 May 2015 16:47:15 -0000 Author: dchagin Date: Sun May 24 16:47:13 2015 New Revision: 283443 URL: https://svnweb.freebsd.org/changeset/base/283443 Log: Put the correct value for the abi_nfdbits parameter of kern_select() for all supported Linuxulators. Differential Revision: https://reviews.freebsd.org/D1093 Reviewed by: trasz Modified: head/sys/amd64/linux/linux.h head/sys/amd64/linux32/linux.h head/sys/compat/linux/linux_misc.c head/sys/compat/linux/linux_misc.h head/sys/i386/linux/linux.h Modified: head/sys/amd64/linux/linux.h ============================================================================== --- head/sys/amd64/linux/linux.h Sun May 24 16:42:49 2015 (r283442) +++ head/sys/amd64/linux/linux.h Sun May 24 16:47:13 2015 (r283443) @@ -82,6 +82,7 @@ typedef l_long l_time_t; typedef l_int l_timer_t; typedef l_int l_mqd_t; typedef l_size_t l_socklen_t; +typedef l_ulong l_fd_mask; typedef struct { l_int val[2]; Modified: head/sys/amd64/linux32/linux.h ============================================================================== --- head/sys/amd64/linux32/linux.h Sun May 24 16:42:49 2015 (r283442) +++ head/sys/amd64/linux32/linux.h Sun May 24 16:47:13 2015 (r283443) @@ -95,6 +95,7 @@ typedef l_uint l_uid_t; typedef l_ushort l_uid16_t; typedef l_int l_timer_t; typedef l_int l_mqd_t; +typedef l_ulong l_fd_mask; typedef struct { l_int val[2]; Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Sun May 24 16:42:49 2015 (r283442) +++ head/sys/compat/linux/linux_misc.c Sun May 24 16:47:13 2015 (r283443) @@ -531,7 +531,7 @@ linux_select(struct thread *td, struct l tvp = NULL; error = kern_select(td, args->nfds, args->readfds, args->writefds, - args->exceptfds, tvp, sizeof(l_int) * 8); + args->exceptfds, tvp, LINUX_NFDBITS); #ifdef DEBUG if (ldebug(select)) @@ -2181,7 +2181,7 @@ linux_pselect6(struct thread *td, struct tvp = NULL; error = kern_pselect(td, args->nfds, args->readfds, args->writefds, - args->exceptfds, tvp, ssp, sizeof(l_int) * 8); + args->exceptfds, tvp, ssp, LINUX_NFDBITS); if (error == 0 && args->tsp != NULL) { if (td->td_retval[0] != 0) { Modified: head/sys/compat/linux/linux_misc.h ============================================================================== --- head/sys/compat/linux/linux_misc.h Sun May 24 16:42:49 2015 (r283442) +++ head/sys/compat/linux/linux_misc.h Sun May 24 16:47:13 2015 (r283443) @@ -33,6 +33,9 @@ #include + /* bits per mask */ +#define LINUX_NFDBITS sizeof(l_fd_mask) * 8 + /* * Miscellaneous */ Modified: head/sys/i386/linux/linux.h ============================================================================== --- head/sys/i386/linux/linux.h Sun May 24 16:42:49 2015 (r283442) +++ head/sys/i386/linux/linux.h Sun May 24 16:47:13 2015 (r283443) @@ -89,6 +89,7 @@ typedef l_uint l_uid_t; typedef l_ushort l_uid16_t; typedef l_int l_timer_t; typedef l_int l_mqd_t; +typedef l_ulong l_fd_mask; typedef struct { l_int val[2];