From owner-svn-src-head@freebsd.org Thu Mar 30 19:45:09 2017 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 208C2D26D36; Thu, 30 Mar 2017 19:45:09 +0000 (UTC) (envelope-from dchagin@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 E4BEA7EA; Thu, 30 Mar 2017 19:45:08 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2UJj8hH037398; Thu, 30 Mar 2017 19:45:08 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2UJj8Bh037397; Thu, 30 Mar 2017 19:45:08 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201703301945.v2UJj8Bh037397@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Thu, 30 Mar 2017 19:45:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316289 - head/sys/compat/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.23 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: Thu, 30 Mar 2017 19:45:09 -0000 Author: dchagin Date: Thu Mar 30 19:45:07 2017 New Revision: 316289 URL: https://svnweb.freebsd.org/changeset/base/316289 Log: Use kern_mincore() helper instead of abusing syscall entry. Suggested by: kib@ Reviewed by: kib@ MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D10143 Modified: head/sys/compat/linux/linux_misc.c Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Thu Mar 30 19:42:49 2017 (r316288) +++ head/sys/compat/linux/linux_misc.c Thu Mar 30 19:45:07 2017 (r316289) @@ -2538,13 +2538,9 @@ linux_getrandom(struct thread *td, struc int linux_mincore(struct thread *td, struct linux_mincore_args *args) { - struct mincore_args bsd_args; /* Needs to be page-aligned */ if (args->start & PAGE_MASK) return (EINVAL); - bsd_args.addr = PTRIN(args->start); - bsd_args.len = args->len; - bsd_args.vec = args->vec; - return (sys_mincore(td, &bsd_args)); + return (kern_mincore(td, args->start, args->len, args->vec)); }