From owner-svn-src-all@freebsd.org Sat Feb 13 19:13:07 2016 Return-Path: Delivered-To: svn-src-all@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 8CA63AA774B; Sat, 13 Feb 2016 19:13:07 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 241441F71; Sat, 13 Feb 2016 19:13:06 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u1DJD0sm046040 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 13 Feb 2016 21:13:00 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u1DJD0sm046040 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u1DJCx5X046039; Sat, 13 Feb 2016 21:12:59 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 13 Feb 2016 21:12:59 +0200 From: Konstantin Belousov To: Bruce Evans Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r295561 - in head: include sys/mips/include sys/powerpc/include sys/sparc64/include sys/sys sys/x86/include Message-ID: <20160213191259.GF91220@kib.kiev.ua> References: <201602120738.u1C7cKpq093956@repo.freebsd.org> <20160212232717.P894@besplex.bde.org> <20160212143630.GS91220@kib.kiev.ua> <20160213021939.S1340@besplex.bde.org> <20160212173641.GV91220@kib.kiev.ua> <20160213070506.N2501@besplex.bde.org> <20160213101623.GZ91220@kib.kiev.ua> <20160214035852.D918@besplex.bde.org> <20160213172321.GE91220@kib.kiev.ua> <20160214050522.J1687@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160214050522.J1687@besplex.bde.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 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: Sat, 13 Feb 2016 19:13:07 -0000 On Sun, Feb 14, 2016 at 05:47:19AM +1100, Bruce Evans wrote: > How likely is third party code to use undocumented internals of opqaue > types when FreeBSD code mostly doesn't used them. I already said that they are used. Base system cannot be a benchmark there because base code does not implement modern runtime (i.e. automatically managed memory and type-safe or generally safe execution environment). As a random example, from sbcl (common lisp implementation) runtime: #if defined(LISP_FEATURE_FREEBSD) #if defined(LISP_FEATURE_RESTORE_TLS_SEGMENT_REGISTER_FROM_CONTEXT) void os_restore_tls_segment_register(os_context_t *context) { load_fs(context->uc_mcontext.mc_fs); } #endif ... > > I checked all files in /usr/src outside of /sys/ that contain "ucontext.h". > There are 71 such files with 204 lines matching "mc_". The actual users > of mcontext_t's internals are: > > contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc: 8 instances > contrib/compiler-rt/lib/sanitizer_common/sanitizer_freebsd.h: 30 instances > lib/libc: 102 instances > lib/libthread_db: 60 instances > tools/KSE/ksetest/kse_threads_test.c: 2 instances > tools/KSE/rr/rr.c: 2 instances > > So there are 4 instances outside of libraries (counting compiler_rt as > a libraries) and these 4 are to support KSE which went away about 11 > years ago IIRC. tools/KSE doesn't compile now of course. The first > error is that its asm source file is i386-only, so fails on i386. > The next error is that its primary (?) API file no longer > exists. > > I hoped to find no instances outside of libc. Bits in contrib are are > problem. The contrib is not a problem, it demostrates another legitimate use of the signal handlers. Any code which uses exceptions for more than error reporting does understand ucontext and mcontext.