From owner-freebsd-arch@freebsd.org Sun Apr 30 09:16:48 2017 Return-Path: Delivered-To: freebsd-arch@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 C95BED57C0F for ; Sun, 30 Apr 2017 09:16:48 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 46E1615FD for ; Sun, 30 Apr 2017 09:16:48 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v3U9GcrD001984 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 30 Apr 2017 12:16:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v3U9GcrD001984 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v3U9GcZY001983; Sun, 30 Apr 2017 12:16:38 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 30 Apr 2017 12:16:38 +0300 From: Konstantin Belousov To: Drake Talley Cc: freebsd-arch@freebsd.org Subject: Re: sysctl for named posix semaphores Message-ID: <20170430091638.GR1622@kib.kiev.ua> References: <20170429154018.GA3703@kunai.nyc.rr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170429154018.GA3703@kunai.nyc.rr.com> User-Agent: Mutt/1.8.2 (2017-04-18) 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: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Apr 2017 09:16:48 -0000 On Sat, Apr 29, 2017 at 11:40:18AM -0400, Drake Talley wrote: > I'm interested in being able to display information about all active named POSIX > semaphores. I have not been able to find a sane way to do this, and > unless there's something obvious I've missed, There is no way to do this ... > it may be worth > considering building a sysctl or some other interface for accessing this > information. A while back in the mailing list there seems to have been ... be it sysctl or any other word. > some discussion about building out a "semfs" or some other file system > interface akin to /dev/shm in Linux, but there were concerns about the > POSIX compatibility of that approach. > > On a related note in /src/sys/kern/uipc_shm.c there is the following > TODO: > > * (1) Need to export data to a userland tool via a sysctl. Should ipcs(1) > * and ipcrm(1) be expanded or should new tools to manage both POSIX > * kernel semaphores and POSIX shared memory be written? > > > So, it's been acknowledged that a sysctl or some new utility is on the > table, and exporting this data to userland isn't blasphemous, although > perhaps not the most pressing need at the moment. Setting Sys V IPC on > the side, has there been discussion or consideration of similar tools > for POSIX semaphores? No, such discussion does not make sense, see below. > > > > Whether or not it's deemed worth doing, I'd appreciate any info or > references to discussions about this topic since I'm like > to tinker with it on my own if nothing else. The current POSIX semaphores implementation is mostly userspace, see the lib/libc/gen/sem_new.c source file for details. From the birds view, a POSIX semaphore is constructed from the shared mapping of a file in /tmp (presumably tmpfs-backed), and some umtx(2) features to assist in implementing the acquisition and release operations. Kernel does not provide complete abstracted object for semaphores. In other words, there is no way for kernel to enumerate userspace entities which semaphores are. The implementation in sys/kern/uipc_sem.c AKA sem.ko is obsoleted ('legacy') and is provided for ABI compatibility with <= 8.x libc. From owner-freebsd-arch@freebsd.org Sun Apr 30 09:44:14 2017 Return-Path: Delivered-To: freebsd-arch@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 D1967D56619 for ; Sun, 30 Apr 2017 09:44:14 +0000 (UTC) (envelope-from axylos@doge.city) Received: from mout.perfora.net (mout.perfora.net [74.208.4.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mail.perfora.net", Issuer "thawte SSL CA - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8B0602EB for ; Sun, 30 Apr 2017 09:44:14 +0000 (UTC) (envelope-from axylos@doge.city) Received: from kunai.nyc.rr.com ([24.193.46.243]) by mrelay.perfora.net (mreueus002 [74.208.5.2]) with ESMTPSA (Nemesis) id 0Lu5S4-1e3iCj2z4A-011TYL; Sun, 30 Apr 2017 11:44:11 +0200 Date: Sat, 29 Apr 2017 21:41:00 -0400 From: Drake Talley To: Konstantin Belousov Cc: freebsd-arch@freebsd.org Subject: sysctl for named posix semaphores Message-ID: <20170430014100.GA30802@kunai.nyc.rr.com> References: <20170429154018.GA3703@kunai.nyc.rr.com> <20170430091638.GR1622@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170430091638.GR1622@kib.kiev.ua> User-Agent: Mutt/1.8.0 (2017-02-23) X-Provags-ID: V03:K0:ryJzZoUhX494YjWYwrXAVKKbuGuY6kCZjmZ1Hkc0NNpcp3bBIE8 4O2G8SiOYneqdcmZmxk2xG8vooMAzGfs3jp9Y91j5z3XA+8QAFdLCXvKQW/p4iYfbd3X+mz Si3yWxPL9CcwW74Rjkh8LiopsJmO2RFBFL2swMiUmhiaNeSd4IERx/eLaL2iCu0zZgAgyQX GGCrCQszpZ0ODnrtNLMtw== X-UI-Out-Filterresults: notjunk:1;V01:K0:vAwD9LtE/RU=:o/EDPah2PoYmQklHu65jcM LAQScS0lKL7vgZ89SDJzcnA3VPhQsA7bq6lz5HhuDG6SY2bYCw+VesPpHs2MG+ynogd5RiSko tt2XVVJfLU+kHysFJqERWsh3pnbEWJAS9tlEk+prKkJThibjISMnZDq772lisqfmtrT43qOZQ WXRzFCKPjeqsWluZG9iCCSs8KySt5lRblQq/Ma5ZpKZ6QvjcCdEjy/7Pq5cM8g/4S0NDCa8WM +em7MuxRgy1m5xJ39EPNWzvPk5GJZXzvwo+waV+tSoYN/0TIFH6rNOAef1wtqDPyf+dmzB8hF TJzaFDglFVOnpGTgrlh4H8/J52oex/zXMjggpr9iAi4BTbDtlejqq3ol3HS5Ix0Gzs76VMYx5 uboerqF/QHSFW1svc2QZuHtMnbN9lVsZU0gpWYM1Q5e5grguT+FOlgNLjQwWdl5uo101cyMY+ UwWkxbTgGope2njfCGrGTSbVhhjzGjOJhACqtDIuRRuIJjdi6ZROIiHU3v2B+Lu8ykBoAb+yU Qti346KWiA118+HtXKpmMIMZiUKI4Ws1ZqPajLm82u2PasfTa1PHtgzdx0IlRkJaJZbHrCnI9 DgbFM+je79IkJ7jC+yMkSNfU8oz5knggJJEIpmwnmuaMRhAy4p4NORWjGaa2ygYJ6+UE/POUZ OO7zMJV/jM8m6gWj0rqCnNzG7gKVH/M1D58U9HuFKFqkAK+SZ/Ry4Ews4cjYt6rjB/b8= X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Apr 2017 09:44:14 -0000 Ah thanks for cleaing that up; sorry for coming at it from left field. Really appreciate the explanation though! From owner-freebsd-arch@freebsd.org Sun Apr 30 09:56:18 2017 Return-Path: Delivered-To: freebsd-arch@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 06264D569D9 for ; Sun, 30 Apr 2017 09:56:18 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 91795A58 for ; Sun, 30 Apr 2017 09:56:17 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v3U9uAhW010802 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 30 Apr 2017 12:56:10 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v3U9uAhW010802 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v3U9uAKl010801; Sun, 30 Apr 2017 12:56:10 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 30 Apr 2017 12:56:10 +0300 From: Konstantin Belousov To: Drake Talley Cc: freebsd-arch@freebsd.org Subject: Re: sysctl for named posix semaphores Message-ID: <20170430095610.GS1622@kib.kiev.ua> References: <20170429154018.GA3703@kunai.nyc.rr.com> <20170430091638.GR1622@kib.kiev.ua> <20170430014100.GA30802@kunai.nyc.rr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170430014100.GA30802@kunai.nyc.rr.com> User-Agent: Mutt/1.8.2 (2017-04-18) 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: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Apr 2017 09:56:18 -0000 On Sat, Apr 29, 2017 at 09:41:00PM -0400, Drake Talley wrote: > Ah thanks for cleaing that up; sorry for coming at it from left field. > Really appreciate the explanation though! Note that the fact that kernel does not support 'POSIX semaphores' objects, does not make impossible to get some information about existing named semaphores for the debugging purposes. Eg. low-tech method 'ls -l /dev/SEMD*' would list files backing the named semaphores and show the ownership information. fstat(1) -m or procstat(8) -v show the processes which currently have specific semaphore open (AKA mapped). Current state of the semaphore can be inspected with any file dump tool, even with hexdump(1). Anonymous semaphores are somewhat harder to observe. From owner-freebsd-arch@freebsd.org Fri May 5 10:37:52 2017 Return-Path: Delivered-To: freebsd-arch@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 BB76DD5E5DC for ; Fri, 5 May 2017 10:37:52 +0000 (UTC) (envelope-from secretaria@ampformosa.com.ar) Received: from ws122.host4g.com (ws122.host4g.com [190.210.9.102]) by mx1.freebsd.org (Postfix) with ESMTP id 8CE301A7D for ; Fri, 5 May 2017 10:37:52 +0000 (UTC) (envelope-from secretaria@ampformosa.com.ar) Received: from ws65.host4g.com (ws65.host4g.com [190.210.9.40]) by ws122.host4g.com (Postfix) with ESMTP id 8C74A9888D767 for ; Fri, 5 May 2017 07:37:58 -0300 (ART) Received: from [142.0.42.11] (unknown [142.0.42.11]) by ws65.host4g.com (Postfix) with ESMTPA id 78F7D42A1799 for ; Fri, 5 May 2017 07:37:05 -0300 (ART) Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Description: Mail message body Subject: Request To: freebsd-arch@freebsd.org From: "Sir. Paul Judge" Date: Fri, 05 May 2017 03:37:37 -0700 Reply-To: sirpaulrjudge@outlook.com X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 May 2017 10:37:52 -0000 Hello, Good Day to you and I hope this message meet you well. I hope this mail meets you well. Before I proceed, I will like to introduce= my self for better understanding, My name is Sir. Paul R. Judge, Non Indep= ent Executive Director with Standard Bank Group in South East Asia,one of t= he biggest independent financial institution, I am contacting you because I= want you to assist me in receiving a deposit of one of our late client A C= hinese National who died in 2005. Before his death he has a deposit of (Twe= nty Two Million Seven Hundred and Twenty Eight Thousand Four Hundred and Fo= urteen United States Dollars)in our bank. Though I know that a transaction = of this magnitude will make any one apprehensive and worried, but I am assu= ring you that all will be well at the end of the day. On July 7, 2005, series of coordinated terrorist bomb blasts hit the London= Subways, resulting in the loss of more than 52 people and unfortunately ou= r late client was among the people that died on that fateful day while he w= as in United Kingdom for a business meeting, all efforts to contact his rel= atives/family representatives turned unsuccessful, I have made several inqu= iries to your embassy to locate any his extended relatives but has been uns= uccessful. After several unsuccessful attempts, I decided to trace his last= name over the internet, to see if I could locate any member of his family = hence I contacted you as you have thesame last name with our late client. His account where his deposit of (Twenty Two Million Seven Hundred and Twen= ty Eight Thousand Four Hundred and Fourteen United States Dollars)USD22,728= .414.00 is no longer active and inoperative. My bank will declare the accou= nt unserviceable and thereby send the funds to the bank treasury if I do no= t present anyone as family representative or relative to our late client. I= will seek your consent to present you as the relative or family representa= tive of our late client since you share the same last name with the our lat= e client so that the funds on the account can be paid to you then you and I= can share the money for investment purposes in your country. If you can handle this with me, I will want you to send me a reply with, (Y= OUR FULL NAMES: CONTACT ADDRESS: DATE OF BIRTH: OCCUPATION: MOBILE/HOME TE= LEPHONE NUMBER) to enable me submit to my bank immediately for the release = of the funds to you as his relative and family representative. Please I do not want any direct link between us, my official lines are not = secured as they are periodically monitored please observe this instruction = religiously, all legal documents and paper work will be released to you as = soon as I receive your response with the required information. Thank you and I hope to read from you, Kindly send me all details to: sirpaulrjudge@outlook.com Regards, Sir Paul R. Judge, Non Independent Executive Director, Standard Bank Group. South East Asia. From owner-freebsd-arch@freebsd.org Fri May 5 12:00:13 2017 Return-Path: Delivered-To: freebsd-arch@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 CE509D5F0F2 for ; Fri, 5 May 2017 12:00:13 +0000 (UTC) (envelope-from secretaria.centrosalud@ampformosa.com.ar) Received: from ws122.host4g.com (ws122.host4g.com [190.210.9.102]) by mx1.freebsd.org (Postfix) with ESMTP id 3D6A221F for ; Fri, 5 May 2017 12:00:13 +0000 (UTC) (envelope-from secretaria.centrosalud@ampformosa.com.ar) Received: from ws65.host4g.com (ws65.host4g.com [190.210.9.40]) by ws122.host4g.com (Postfix) with ESMTP id 40306990FAC4F for ; Fri, 5 May 2017 08:59:38 -0300 (ART) Received: from [142.0.42.11] (unknown [142.0.42.11]) by ws65.host4g.com (Postfix) with ESMTPA id CE3F842A1795 for ; Fri, 5 May 2017 08:58:43 -0300 (ART) MIME-Version: 1.0 Subject: Google User To: freebsd-arch@freebsd.org From: "Google Inc" Date: Fri, 05 May 2017 04:59:15 -0700 Reply-To: admin@gpawardteam.com Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Description: Mail message body X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 May 2017 12:00:13 -0000 Dear Google User, We congratulate you for being selected as one of our winner on the ongoing = award promotion. Find attached document with more information regarding you= r winning. Congratulation, Sundar Pichai, Chief Executive Officer, Google Inc.