From owner-svn-src-all@freebsd.org Tue May 15 16:24:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5940EE5EC4; Tue, 15 May 2018 16:24:58 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8C12573116; Tue, 15 May 2018 16:24:58 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6D2B05D99; Tue, 15 May 2018 16:24:58 +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 w4FGOwpL052737; Tue, 15 May 2018 16:24:58 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4FGOw5K052736; Tue, 15 May 2018 16:24:58 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201805151624.w4FGOw5K052736@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 15 May 2018 16:24:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333635 - head/sys/compat/freebsd32 X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/sys/compat/freebsd32 X-SVN-Commit-Revision: 333635 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.26 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, 15 May 2018 16:24:59 -0000 Author: brooks Date: Tue May 15 16:24:58 2018 New Revision: 333635 URL: https://svnweb.freebsd.org/changeset/base/333635 Log: Allow freebsd32 __sysctl(2) to return ENOMEM. This is required by programs like sockstat that read variably sized sysctls such as kern.file. The normal path has no such restriction and the restriction was added without comment along with initial support for freebsd32 in 2002 (r100384). Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D15438 Modified: head/sys/compat/freebsd32/freebsd32_misc.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Tue May 15 15:56:52 2018 (r333634) +++ head/sys/compat/freebsd32/freebsd32_misc.c Tue May 15 16:24:58 2018 (r333635) @@ -2263,7 +2263,7 @@ freebsd32_sysctl(struct thread *td, struct freebsd32_s error = userland_sysctl(td, name, uap->namelen, uap->old, &oldlen, 1, uap->new, uap->newlen, &j, SCTL_MASK32); - if (error && error != ENOMEM) + if (error) return (error); if (uap->oldlenp) suword32(uap->oldlenp, j);