From owner-freebsd-arch@freebsd.org Mon Sep 26 06:23:14 2016 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 6F818BEA4F3 for ; Mon, 26 Sep 2016 06:23:14 +0000 (UTC) (envelope-from goygavb@fabricsolutions.ru) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 570BF9F6 for ; Mon, 26 Sep 2016 06:23:14 +0000 (UTC) (envelope-from goygavb@fabricsolutions.ru) Received: by mailman.ysv.freebsd.org (Postfix) id 56108BEA4F2; Mon, 26 Sep 2016 06:23:14 +0000 (UTC) Delivered-To: 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 555A2BEA4F1 for ; Mon, 26 Sep 2016 06:23:14 +0000 (UTC) (envelope-from goygavb@fabricsolutions.ru) Received: from fabricsolutions.ru (fabricsolutions.ru [193.124.186.238]) by mx1.freebsd.org (Postfix) with ESMTP id 001309F5 for ; Mon, 26 Sep 2016 06:23:12 +0000 (UTC) (envelope-from goygavb@fabricsolutions.ru) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; s=mail; d=fabricsolutions.ru; h=Message-ID:From:To:Subject:Date:MIME-Version:Content-Type; i=goygavb@fabricsolutions.ru; bh=mM3OcbLD84j7JyP7i6G3HjAn/Ys=; b=AncsJTL/JZR9cwm7SAdYTSZGl06Ebb94rAswdW1SW5BBhhsawGuPtyoHUZmdroaKZZ7vw0C4MRub t+aDQWwbLCeCniajUL6jjYpDza+6dGrtwHZ343tfOU16M/EQRtYU4gcovJM90nb4eiKgQ6jyQYHw scEHugsQTBgcBo1jopw= DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mail; d=fabricsolutions.ru; b=h0+CpDRXD579N5Mgvw9fNnC7ZrKPerUTkMMvfzGvDoeAgVA5nd1lzU3CNv4vDlGMLRpIk+QNz8j8 0S1FpOp7p7AD37JCU2bqYw4HIOSPFSirCiHud6OFkYKX/BAgGAr4ZFkUyXXQpWHITpG2jU4CTOPb ICgcJCRYRDGjjRjjVKQ=; Message-ID: From: =?windows-1251?B?0O7x7/Do8O7k7eDk5+7w?= To: Subject: =?windows-1251?B?zuHl8e/l9+Xt6OUg4eXn7u/g8e3u8fLoIOPo?= =?windows-1251?B?5PDu8uX17ej35fHq6PUg8e7u8PPm5e3o6Q==?= Date: Mon, 26 Sep 2016 08:34:33 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable 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: Mon, 26 Sep 2016 06:23:14 -0000 =CE=E1=E5=F1=EF=E5=F7=E5=ED=E8=E5 =E1=E5=E7=EE=EF=E0=F1=ED=EE=F1=F2=E8 =E3= =E8=E4=F0=EE=F2=E5=F5=ED=E8=F7=E5=F1=EA=E8=F5 =F1=EE=EE=F0=F3=E6=E5=ED=E8= =E9 From owner-freebsd-arch@freebsd.org Mon Sep 26 12:21:52 2016 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 96E8EBEADC5 for ; Mon, 26 Sep 2016 12:21:52 +0000 (UTC) (envelope-from qajdbos@waterday.ru) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 809B9E81 for ; Mon, 26 Sep 2016 12:21:52 +0000 (UTC) (envelope-from qajdbos@waterday.ru) Received: by mailman.ysv.freebsd.org (Postfix) id 7F93DBEADC1; Mon, 26 Sep 2016 12:21:52 +0000 (UTC) Delivered-To: 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 7EDCCBEADBC for ; Mon, 26 Sep 2016 12:21:52 +0000 (UTC) (envelope-from qajdbos@waterday.ru) Received: from waterday.ru (waterday.ru [194.67.209.41]) by mx1.freebsd.org (Postfix) with ESMTP id 0B282E7F for ; Mon, 26 Sep 2016 12:21:50 +0000 (UTC) (envelope-from qajdbos@waterday.ru) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; s=mail; d=waterday.ru; h=Message-ID:From:To:Subject:Date:MIME-Version:Content-Type; i=qajdbos@waterday.ru; bh=eCr7DABuVvgfBxD2ZlgjWgOUNTc=; b=Q8XklxGKG5MjAxYIFuDqCekANP8Xq8N7ht7gcNcPLLRaGJ/GUu+tRHOlpIdJrrb8xqoktNTLsvnX Ln7RvnwMmlVDaMazqeUPB38AswmkUnh06IPOrr3uRjBov2DYKP6bwcGCvITEYZdowNzmqL/zXcGt nFwFJcrf5s0XXM77QpA= DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mail; d=waterday.ru; b=JvKDhMotJMN6Wjp1vJkz4aug312c6HsSZfZpxcRafQKhgcShCFnJgKISRi6I8FYqvnfVRgE+U65H 0L4p/UFVLxkJcMMNW4oB7TsF0Bb+/tNTUoZ75HcQule2G8ZIBO+c7CbcVSx5eN5KNmEXe8kRTfwV 4/866dXEGGVTdaUyDhs=; Message-ID: <619BE6CB62B68417CBCE873F8B7B4F7C@waterday.ru> From: "Swarovski" To: Subject: =?windows-1251?B?wfDg8evl8iBTd2Fyb3Zza2kgLSDv7vHr5eTt?= =?windows-1251?B?6Okg7+jx6iDs6Ovg7fHq7ukg7O7k+yE=?= Date: Mon, 26 Sep 2016 14:10:43 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable 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: Mon, 26 Sep 2016 12:21:52 -0000 =C1=F0=E0=F1=EB=E5=F2 Swarovski - =EF=EE=F1=EB=E5=E4=ED=E8=E9 =EF=E8=F1=EA= =EC=E8=EB=E0=ED=F1=EA=EE=E9 =EC=EE=E4=FB! From owner-freebsd-arch@freebsd.org Mon Sep 26 16:06:00 2016 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 04B03BE4A71 for ; Mon, 26 Sep 2016 16:06:00 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (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 DB35B1C50 for ; Mon, 26 Sep 2016 16:05:59 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from marcels-mbp.int.brkt.com.mail (cerberus.brkt.com [208.185.168.138]) (authenticated bits=0) by mail.xcllnt.net (8.15.2/8.15.2) with ESMTPSA id u8QG5vpt013037 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 26 Sep 2016 09:05:58 -0700 (PDT) (envelope-from marcel@xcllnt.net) Date: Mon, 26 Sep 2016 09:05:51 -0700 From: Marcel Moolenaar To: "=?utf-8?Q?freebsd-arch=40freebsd.org?=" Message-ID: Subject: Including without getting ioctl(2) defines X-Mailer: Airmail (382) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="57e9475f_169e9367_e1fd" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.xcllnt.net [50.0.150.214]); Mon, 26 Sep 2016 09:05:58 -0700 (PDT) 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: Mon, 26 Sep 2016 16:06:00 -0000 --57e9475f_169e9367_e1fd Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Background: In order for a select set of =46reeBSD utilities to compile on non-=46ree= BSD (specifically macOS and Linux) as build tools, we need some portabili= ty tweaks. Problem: mkimg(1) includes disk partitioning headers like , and and those headers themselves include for ioctl(2) definitions. The header does not t= ypically exist on the host we=E2=80=99re being, causing build failures. Proposal: What I like is to be able to use =46reeBSD=E2=80=99s headers, but not pul= l in =46reeBSD-specifics like ioctl(2) definitions. Solutions: 1. Split off the definitions relating to the partitioning into a separate= header (e.g. ) and keep the =46reeBSD-centric definition= s (e.g. for ioctl(2)) in the original header (e.g. . The= original header will include the new header so that there=E2=80=99s no c= hange to applications that include the original header. Portable tools li= ke mkimg can include the new split-off header to get just the structure d= efinitions and defines. 2. Expect portable utilities to define a pre-processor macro (e.g. PORTAB= LE=5FDE=46INITIONS=5FONLY) and make =46reeBSD-specific definitions condit= ional upon the *absence* of the preprocessor macro. 3. (Ab)use =5FPOSIX=5FSOURCE to achieve the same as point 2. 4. Get rid of the utilities that still use the ioctl(2) interface and fix= ports that do the same. 5. Others=3F Notes: 1. Attached a hack to allow mkimg(1) to use =46reeBSD=E2=80=99s headers f= or partitioning schemes. It shows what exactly the problem is without sug= gesting a solution. It=E2=80=99s a minimal change for a reason and not to= be discussed as if it was a solution. 2. mkimg(1) is one example. Other utilities include makefs, mtree, etc. P= lease consider an approach that serves as a good precedence for other uti= lities if and when a similar situation is encountered. --57e9475f_169e9367_e1fd Content-Type: application/octet-stream Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="sys.diff" ZGlmZiAtLWdpdCBhL3N5cy9zeXMvZGlza2xhYmVsLmggYi9zeXMvc3lzL2Rpc2tsYWJlbC5oCmlu ZGV4IDQyYzc1N2EuLjRhZDEwZmIgMTAwNjQ0Ci0tLSBhL3N5cy9zeXMvZGlza2xhYmVsLmgKKysr IGIvc3lzL3N5cy9kaXNrbGFiZWwuaApAQCAtMzYsNyArMzYsNiBAQAogI2lmbmRlZiBfS0VSTkVM CiAjaW5jbHVkZSA8c3lzL3R5cGVzLmg+CiAjZW5kaWYKLSNpbmNsdWRlIDxzeXMvaW9jY29tLmg+ CiAKIC8qCiAgKiBEaXNrIGRlc2NyaXB0aW9uIHRhYmxlLCBzZWUgZGlza3RhYig1KQpkaWZmIC0t Z2l0IGEvc3lzL3N5cy9kaXNrbWJyLmggYi9zeXMvc3lzL2Rpc2ttYnIuaAppbmRleCA1ZjQ5ZWI5 Li5jZjU2NDdkIDEwMDY0NAotLS0gYS9zeXMvc3lzL2Rpc2ttYnIuaAorKysgYi9zeXMvc3lzL2Rp c2ttYnIuaApAQCAtMzMsOCArMzMsNiBAQAogI2lmbmRlZiBfU1lTX0RJU0tNQlJfSF8KICNkZWZp bmUJX1NZU19ESVNLTUJSX0hfCiAKLSNpbmNsdWRlIDxzeXMvaW9jY29tLmg+Ci0KICNkZWZpbmUJ RE9TQkJTRUNUT1IJMAkvKiBET1MgYm9vdCBibG9jayByZWxhdGl2ZSBzZWN0b3IgbnVtYmVyICov CiAjZGVmaW5lCURPU0RTTk9GRgk0NDAJLyogV2luTlQvMksvWFAgRHJpdmUgU2VyaWFsIE51bWJl ciBvZmZzZXQgKi8KICNkZWZpbmUJRE9TUEFSVE9GRgk0NDYKQEAgLTg2LDYgKzg0LDQgQEAgdm9p ZCBkb3NfcGFydGl0aW9uX2VuYyh2b2lkICpwcCwgc3RydWN0IGRvc19wYXJ0aXRpb24gKmQpOwog I2RlZmluZQlEUFNFQ1QocykgKChzKSAmIDB4M2YpCQkvKiBpc29sYXRlIHJlbGV2YW50IGJpdHMg b2Ygc2VjdG9yICovCiAjZGVmaW5lCURQQ1lMKGMsIHMpICgoYykgKyAoKChzKSAmIDB4YzApPDwy KSkgLyogYW5kIHRob3NlIHRoYXQgYXJlIGN5bGluZGVyICovCiAKLSNkZWZpbmUgRElPQ1NNQlIg CV9JT1coJ00nLCAxMjksIHVfY2hhcls1MTJdKQotCiAjZW5kaWYgLyogIV9TWVNfRElTS01CUl9I XyAqLwpkaWZmIC0tZ2l0IGEvc3lzL3N5cy9kaXNrcGM5OC5oIGIvc3lzL3N5cy9kaXNrcGM5OC5o CmluZGV4IGFhMGJiMGEuLmJjNzA5OTkgMTAwNjQ0Ci0tLSBhL3N5cy9zeXMvZGlza3BjOTguaAor KysgYi9zeXMvc3lzL2Rpc2twYzk4LmgKQEAgLTMzLDggKzMzLDYgQEAKICNpZm5kZWYgX1NZU19E SVNLUEM5OF9IXwogI2RlZmluZQlfU1lTX0RJU0tQQzk4X0hfCiAKLSNpbmNsdWRlIDxzeXMvaW9j Y29tLmg+Ci0KICNkZWZpbmUJUEM5OF9CQlNFQ1RPUgkxCS8qIERPUyBib290IGJsb2NrIHJlbGF0 aXZlIHNlY3RvciBudW1iZXIgKi8KICNkZWZpbmUJUEM5OF9QQVJUT0ZGCTAKICNkZWZpbmUJUEM5 OF9QQVJUU0laRQkzMgpAQCAtNzcsNiArNzUsNCBAQCBDVEFTU0VSVChzaXplb2YgKHN0cnVjdCBw Yzk4X3BhcnRpdGlvbikgPT0gUEM5OF9QQVJUU0laRSk7CiB2b2lkIHBjOThfcGFydGl0aW9uX2Rl Yyh2b2lkIGNvbnN0ICpwcCwgc3RydWN0IHBjOThfcGFydGl0aW9uICpkKTsKIHZvaWQgcGM5OF9w YXJ0aXRpb25fZW5jKHZvaWQgKnBwLCBzdHJ1Y3QgcGM5OF9wYXJ0aXRpb24gKmQpOwogCi0jZGVm aW5lIERJT0NTUEM5OAlfSU9XKCdNJywgMTI5LCB1X2NoYXJbODE5Ml0pCi0KICNlbmRpZiAvKiAh X1NZU19ESVNLUEM5OF9IXyAqLwo= --57e9475f_169e9367_e1fd-- From owner-freebsd-arch@freebsd.org Mon Sep 26 18:05:06 2016 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 C515EBEAFAB for ; Mon, 26 Sep 2016 18:05:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (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 A14AAC53 for ; Mon, 26 Sep 2016 18:05:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id E540710AF81; Mon, 26 Sep 2016 14:04:59 -0400 (EDT) From: John Baldwin To: freebsd-arch@freebsd.org Cc: Marcel Moolenaar Subject: Re: Including without getting ioctl(2) defines Date: Mon, 26 Sep 2016 09:47:12 -0700 Message-ID: <1513385.S0oC4mUWt4@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 26 Sep 2016 14:05:00 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean 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: Mon, 26 Sep 2016 18:05:06 -0000 On Monday, September 26, 2016 09:05:51 AM Marcel Moolenaar wrote: > Background: > In order for a select set of FreeBSD utilities to compile on non-Free= BSD (specifically macOS and Linux) as build tools, we need some portabi= lity tweaks. >=20 > Problem: > mkimg(1) includes disk partitioning headers like , <= sys/diskmbr.h> and and those headers themselves includ= e for ioctl(2) definitions. The header do= es not typically exist on the host we=E2=80=99re being, causing build f= ailures. >=20 > Proposal: > What I like is to be able to use FreeBSD=E2=80=99s headers, but not p= ull in FreeBSD-specifics like ioctl(2) definitions. >=20 > Solutions: > 1. Split off the definitions relating to the partitioning into a sepa= rate header (e.g. ) and keep the FreeBSD-centric defini= tions (e.g. for ioctl(2)) in the original header (e.g. . The original header will include the new header so that there=E2=80=99= s no change to applications that include the original header. Portable = tools like mkimg can include the new split-off header to get just the s= tructure definitions and defines. I think this. It is similar to the 'fooreg.h' vs 'foovar.h' split in s= ome drivers with fooreg.h generally being a standalone, portable header and= foovar.h defining FreeBSD-specific structures (softc, etc.). I'd even be inclined to use some kind of sensible namespace for the hea= der names like , , , , etc= . While you are at it, please have these split out headers avoid conflict= ing names unlike diskmbr.h and diskpc98.h. (We can use compat #define's in= diskmbr.h and diskpc98.h if needed to provide API compat.) --=20 John Baldwin From owner-freebsd-arch@freebsd.org Mon Sep 26 18:40:30 2016 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 15786BEAA43 for ; Mon, 26 Sep 2016 18:40:30 +0000 (UTC) (envelope-from ecugt@radiobaltica.ru) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id F302628B for ; Mon, 26 Sep 2016 18:40:29 +0000 (UTC) (envelope-from ecugt@radiobaltica.ru) Received: by mailman.ysv.freebsd.org (Postfix) id F1F94BEAA42; Mon, 26 Sep 2016 18:40:29 +0000 (UTC) Delivered-To: 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 F14ABBEAA41 for ; Mon, 26 Sep 2016 18:40:29 +0000 (UTC) (envelope-from ecugt@radiobaltica.ru) Received: from radiobaltica.ru (radiobaltica.ru [194.67.208.74]) by mx1.freebsd.org (Postfix) with ESMTP id 83700288 for ; Mon, 26 Sep 2016 18:40:28 +0000 (UTC) (envelope-from ecugt@radiobaltica.ru) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; s=mail; d=radiobaltica.ru; h=Message-ID:From:To:Subject:Date:MIME-Version:Content-Type; i=ecugt@radiobaltica.ru; bh=inUaHlvkZDBBksh7nhFXMCjXo04=; b=V2ewEe+x+w6C1lVhNBtXcbeQJGY4Tfrf/lyh7gljL751GsdOvhRhZXFF8XBMEX8waXkulU8PDv2X cmWl8jYXUyZ2bTcCeHQzC51eRIvydV4eBEORhYgNFpTVIRVl9xraC8u/ZMCIl66a46hXfZPMw7rO sCgq+0QXkLqMTnIxHog= DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mail; d=radiobaltica.ru; b=YL5VuzSPTe5Wdr0cRlLp50g0cygQwjpIlVhuZ/se2dnBiwOil2p7LqqlQ0LdKX9yuME6OY02wuZL lsuhBJu+mE73neQbcsY7RpXiE1ems5cQXmhAIyE1/I4Lm9I9I1irsponoCvQWbiQq6+qD11ue/W3 R8DLsfrsOGOJJamgkBE=; Message-ID: From: "SwissArmy" To: Subject: =?windows-1251?B?1+Dx+yD44uXp9uDw8eru6SDg8Ozo6CDk6/8g?= =?windows-1251?B?7eDx8u7/+eXj7iDs8+b36O37IQ==?= Date: Mon, 26 Sep 2016 21:32:19 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable 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: Mon, 26 Sep 2016 18:40:30 -0000 =D7=E0=F1=FB =F8=E2=E5=E9=F6=E0=F0=F1=EA=EE=E9 =E0=F0=EC=E8=E8 =E4=EB=FF = =ED=E0=F1=F2=EE=FF=F9=E5=E3=EE =EC=F3=E6=F7=E8=ED=FB! From owner-freebsd-arch@freebsd.org Mon Sep 26 21:33:08 2016 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 F0589BEBCFD for ; Mon, 26 Sep 2016 21:33:08 +0000 (UTC) (envelope-from phk@phk.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id B75A91517 for ; Mon, 26 Sep 2016 21:33:08 +0000 (UTC) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.55.3]) by phk.freebsd.dk (Postfix) with ESMTP id CE350273E7; Mon, 26 Sep 2016 21:33:01 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.15.2/8.15.2) with ESMTP id u8QLWtK2016611; Mon, 26 Sep 2016 21:32:57 GMT (envelope-from phk@phk.freebsd.dk) To: Marcel Moolenaar cc: "=?utf-8?Q?freebsd-arch=40freebsd.org?=" Subject: Re: Including without getting ioctl(2) defines In-reply-to: From: "Poul-Henning Kamp" References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <16605.1474925574.1@critter.freebsd.dk> Date: Mon, 26 Sep 2016 21:32:55 +0000 Message-ID: <16610.1474925575@critter.freebsd.dk> 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: Mon, 26 Sep 2016 21:33:09 -0000 -------- In message , Marcel Moolenaar writes: >4. Get rid of the utilities that still use the ioctl(2) interface >and fix ports that do the same. That would be the most say way: Forward. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-arch@freebsd.org Mon Sep 26 23:20:21 2016 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 25891BEA943 for ; Mon, 26 Sep 2016 23:20:21 +0000 (UTC) (envelope-from hmbsk@konelifts.ru) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 0F287D4E for ; Mon, 26 Sep 2016 23:20:21 +0000 (UTC) (envelope-from hmbsk@konelifts.ru) Received: by mailman.ysv.freebsd.org (Postfix) id 0AA40BEA941; Mon, 26 Sep 2016 23:20:21 +0000 (UTC) Delivered-To: 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 09E98BEA93F for ; Mon, 26 Sep 2016 23:20:21 +0000 (UTC) (envelope-from hmbsk@konelifts.ru) Received: from konelifts.ru (konelifts.ru [194.67.208.201]) by mx1.freebsd.org (Postfix) with ESMTP id 47059D4D for ; Mon, 26 Sep 2016 23:20:19 +0000 (UTC) (envelope-from hmbsk@konelifts.ru) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; s=mail; d=konelifts.ru; h=Message-ID:From:To:Subject:Date:MIME-Version:Content-Type; i=hmbsk@konelifts.ru; bh=tmljOet7viZBQOC/gNRgitvjQZ4=; b=j/icuw33liVurFZdl20GwkevFkngYAGokVyAHt8PBGHO+vTDMiiBdRBzmKKC8pb9qOwLfXHPwsCQ aCHfClwy3B4XaoTcNN5JLyf3Ee/FZzkdbM1T4ZXZ6PsI7lhyMLK0wsf6+A3SwpDgXV2aOEdr3RNF hQ5aq5pYYDfgv2oCinE= DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mail; d=konelifts.ru; b=CMNOzG3aCvu9tU803GYU5vfOtYGakz/rIDB1zBKOf0PNqBL+hI4pOUw1VdZ8hbR2svbknuwkvnfS sFVmfAbKV2lTdEIxdSkTSu5J0PiHTGFqqYlSauz+hYjeuI2uD3ktd+CYTYZSGHI3Eec7n3fv9hCT ZPPX1w+CgvTUZ5TDqBo=; Message-ID: <9B611C31984C7E0DD1D49D259129AA92@konelifts.ru> From: "AromaElite" To: Subject: =?windows-1251?B?y+jq4ujk4Pbo/yDx6uvg5OAg/evo8u3u6SDv?= =?windows-1251?B?4PD0/uzl8OjoISDR6ujk6ugg5O4gOTAl?= Date: Tue, 27 Sep 2016 02:03:45 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable 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: Mon, 26 Sep 2016 23:20:21 -0000 =CB=E8=EA=E2=E8=E4=E0=F6=E8=FF =F1=EA=EB=E0=E4=E0 =FD=EB=E8=F2=ED=EE=E9 =EF= =E0=F0=F4=FE=EC=E5=F0=E8=E8! =D1=EA=E8=E4=EA=E8 =E4=EE 90% From owner-freebsd-arch@freebsd.org Thu Sep 29 23:28:28 2016 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 8D743C02EBE for ; Thu, 29 Sep 2016 23:28:28 +0000 (UTC) (envelope-from lew@perftech.com) Received: from smtp-gw.pt.net (smtp-gw.pt.net [206.210.194.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp-gw.pt.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5CDBC84C for ; Thu, 29 Sep 2016 23:28:27 +0000 (UTC) (envelope-from lew@perftech.com) X-ASG-Debug-ID: 1475190677-09411a12bf10c6ce0001-RYubVt Received: from mail.pt.net (mail.pt.net [206.210.194.11]) by smtp-gw.pt.net with ESMTP id 3CkBg42EXf0KmC7Z (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 29 Sep 2016 18:11:17 -0500 (CDT) X-Barracuda-Envelope-From: lew@perftech.com X-Barracuda-Effective-Source-IP: mail.pt.net[206.210.194.11] X-Barracuda-Apparent-Source-IP: 206.210.194.11 Received: from localhost (localhost [IPv6:::1]) by mail.pt.net (Postfix) with ESMTP id 37C0C8425D7 for ; Thu, 29 Sep 2016 18:11:17 -0500 (CDT) Received: from mail.pt.net ([IPv6:::1]) by localhost (mail.pt.net [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id fAdF59uvKqP7 for ; Thu, 29 Sep 2016 18:11:17 -0500 (CDT) Received: from localhost (localhost [IPv6:::1]) by mail.pt.net (Postfix) with ESMTP id 0E2DA8425E3 for ; Thu, 29 Sep 2016 18:11:17 -0500 (CDT) X-Virus-Scanned: amavisd-new at pt.net Received: from mail.pt.net ([IPv6:::1]) by localhost (mail.pt.net [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id VfmkuZsvXc0R for ; Thu, 29 Sep 2016 18:11:17 -0500 (CDT) Received: from dhcp-221-110.perftech.com (dhcp-221-110.perftech.com [206.210.221.110]) (Authenticated sender: lew@pt.net) by mail.pt.net (Postfix) with ESMTPSA id F2F138425D7 for ; Thu, 29 Sep 2016 18:11:16 -0500 (CDT) From: Lewis Donzis Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: mq on kqueue broken after upgrade to FreeBSD 11 Message-Id: <8A6CD0D3-C4D5-40DF-B2AD-4C454CC88AD1@perftech.com> X-ASG-Orig-Subj: mq on kqueue broken after upgrade to FreeBSD 11 Date: Thu, 29 Sep 2016 18:11:16 -0500 To: freebsd-arch@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) X-Mailer: Apple Mail (2.3124) X-Barracuda-Connect: mail.pt.net[206.210.194.11] X-Barracuda-Start-Time: 1475190677 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://smtp-gw.pt.net:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 1027 X-Virus-Scanned: by bsmtpd at pt.net X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.33333 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 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: Thu, 29 Sep 2016 23:28:28 -0000 I had posted this on the userland forum, but it was suggested that I = re-post it to this mailing list, so here goes=E2=80=A6 We have applications that are using kevent() with, among other things, = POSIX message queues, so they can wake up when data is ready. As such, we were using __mq_oshandle() to get a handle from an mqd_t, = suitable for passing to kevent(). However, this function appears to have been removed from publication in = FreeBSD 11.0, although it still exists in the source. I saw some = discussion about it being a mistake to have been available previously, = but plenty of other __mq_*() functions are still public. So the question is, how is one supposed to get a kevent() on a POSIX = message queue, now that the fd is no longer available? (I realize that one could argue that it was never supported, but it does = (did) work, and why else would the kernel uipc_mqueue.c have code for = supporting it? And that's not to mention that __mq_oshandle() is still = declared in /usr/include/mqueue.h) Thanks, lew From owner-freebsd-arch@freebsd.org Fri Sep 30 09:45:51 2016 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 A95FFC0112C for ; Fri, 30 Sep 2016 09:45:51 +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 2ABAD139E for ; Fri, 30 Sep 2016 09:45:51 +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 u8U9jjwW017918 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 30 Sep 2016 12:45:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u8U9jjwW017918 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u8U9jitf017846; Fri, 30 Sep 2016 12:45:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 30 Sep 2016 12:45:44 +0300 From: Konstantin Belousov To: Lewis Donzis Cc: freebsd-arch@freebsd.org Subject: Re: mq on kqueue broken after upgrade to FreeBSD 11 Message-ID: <20160930094544.GP38409@kib.kiev.ua> References: <8A6CD0D3-C4D5-40DF-B2AD-4C454CC88AD1@perftech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8A6CD0D3-C4D5-40DF-B2AD-4C454CC88AD1@perftech.com> User-Agent: Mutt/1.6.1 (2016-04-27) 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: Fri, 30 Sep 2016 09:45:51 -0000 On Thu, Sep 29, 2016 at 06:11:16PM -0500, Lewis Donzis wrote: > I had posted this on the userland forum, but it was suggested that I re-post it to this mailing list, so here goes??? > > We have applications that are using kevent() with, among other things, POSIX message queues, so they can wake up when data is ready. > > As such, we were using __mq_oshandle() to get a handle from an mqd_t, suitable for passing to kevent(). > > However, this function appears to have been removed from publication in FreeBSD 11.0, although it still exists in the source. I saw some discussion about it being a mistake to have been available previously, but plenty of other __mq_*() functions are still public. > > So the question is, how is one supposed to get a kevent() on a POSIX message queue, now that the fd is no longer available? > > (I realize that one could argue that it was never supported, but it does (did) work, and why else would the kernel uipc_mqueue.c have code for supporting it? And that's not to mention that __mq_oshandle() is still declared in /usr/include/mqueue.h) > Where was a discussion about the function presence being the mistake ? In r291439, symbol versioning for librt was fixed, and apparently __mq_oshandle() is not present in the global symbols list for librt. I suspect that this is an erronous ommission, since the function' declaration is present in the mqueue.h header and it is used by some mqueue tests. As such, I believe that exporting it is the intended option there. The following patch should fix the problem for you. I also exported __timer_oshandle, but there is no similar definition in header. diff --git a/lib/librt/Symbol.map b/lib/librt/Symbol.map index 161bb76..5482488 100644 --- a/lib/librt/Symbol.map +++ b/lib/librt/Symbol.map @@ -18,11 +18,13 @@ FBSD_1.0 { mq_unlink; mq_send; mq_receive; + __mq_oshandle; timer_create; timer_delete; timer_gettime; timer_settime; timer_getoverrun; + __timer_oshandle; }; FBSDprivate_1.0 { From owner-freebsd-arch@freebsd.org Fri Sep 30 11:53:56 2016 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 B4069C0375B for ; Fri, 30 Sep 2016 11:53:56 +0000 (UTC) (envelope-from lew@perftech.com) Received: from smtp-gw.pt.net (smtp-gw.pt.net [206.210.194.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp-gw.pt.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 89A3E1BF9 for ; Fri, 30 Sep 2016 11:53:55 +0000 (UTC) (envelope-from lew@perftech.com) X-ASG-Debug-ID: 1475236373-09411a12c010e4d90001-RYubVt Received: from mail.pt.net (mail.pt.net [206.210.194.11]) by smtp-gw.pt.net with ESMTP id 2TdVXpHKQ5RDSH5u (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 30 Sep 2016 06:52:53 -0500 (CDT) X-Barracuda-Envelope-From: lew@perftech.com X-Barracuda-Effective-Source-IP: mail.pt.net[206.210.194.11] X-Barracuda-Apparent-Source-IP: 206.210.194.11 Received: from localhost (localhost [IPv6:::1]) by mail.pt.net (Postfix) with ESMTP id 4DC268425E9; Fri, 30 Sep 2016 06:52:53 -0500 (CDT) Received: from mail.pt.net ([IPv6:::1]) by localhost (mail.pt.net [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id L1rTn71XWvVE; Fri, 30 Sep 2016 06:52:53 -0500 (CDT) Received: from localhost (localhost [IPv6:::1]) by mail.pt.net (Postfix) with ESMTP id 1DEDB8425EA; Fri, 30 Sep 2016 06:52:53 -0500 (CDT) X-Virus-Scanned: amavisd-new at pt.net Received: from mail.pt.net ([IPv6:::1]) by localhost (mail.pt.net [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id Xf4wcOOxoC5n; Fri, 30 Sep 2016 06:52:53 -0500 (CDT) Received: from lewhome-dhcp-179.pt.net (lewhome-dhcp-179.pt.net [206.210.207.179]) (Authenticated sender: lew@pt.net) by mail.pt.net (Postfix) with ESMTPSA id DE5138425E9; Fri, 30 Sep 2016 06:52:52 -0500 (CDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: mq on kqueue broken after upgrade to FreeBSD 11 From: Lewis Donzis X-ASG-Orig-Subj: Re: mq on kqueue broken after upgrade to FreeBSD 11 In-Reply-To: <20160930094544.GP38409@kib.kiev.ua> Date: Fri, 30 Sep 2016 06:52:52 -0500 Cc: freebsd-arch@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <19A6EEAA-C68E-4DAD-B98F-4D904734BD8B@perftech.com> References: <8A6CD0D3-C4D5-40DF-B2AD-4C454CC88AD1@perftech.com> <20160930094544.GP38409@kib.kiev.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.3124) X-Barracuda-Connect: mail.pt.net[206.210.194.11] X-Barracuda-Start-Time: 1475236373 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://smtp-gw.pt.net:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 1235 X-Virus-Scanned: by bsmtpd at pt.net X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests=BSF_SC0_MISMATCH_TO X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.33347 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 BSF_SC0_MISMATCH_TO Envelope rcpt doesn't match header 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, 30 Sep 2016 11:53:56 -0000 > On Sep 30, 2016, at 4:45 AM, Konstantin Belousov = wrote: > Where was a discussion about the function presence being the mistake ? I think it was here: = https://lists.freebsd.org/pipermail/freebsd-current/2015-November/058706.h= tml which was just about a year ago. Perhaps I=E2=80=99m reading it wrong, = but it seems like the implication is that removing the symbol from being = exported was a "fix", where DE says "Why do the tests in = tests/sys/mqueue/ try to use non-public APIs?" and then later, "symbol = versioning for librt was broken and leaking symbols that shouldn't have = been leaked." > In r291439, symbol versioning for librt was fixed, and apparently > __mq_oshandle() is not present in the global symbols list for librt. > I suspect that this is an erronous ommission, since the function' > declaration is present in the mqueue.h header and it is used by some > mqueue tests. >=20 > As such, I believe that exporting it is the intended option there. > The following patch should fix the problem for you. That makes sense, and appreciate the patch, but just to be clear, does = your change get committed so that we won=E2=80=99t have to re-apply it = after future updates/upgrades? Thanks, lew From owner-freebsd-arch@freebsd.org Fri Sep 30 15:20:13 2016 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 5966AC0293F for ; Fri, 30 Sep 2016 15:20:13 +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 E72991D41; Fri, 30 Sep 2016 15:20:12 +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 u8UFK6c1008756 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 30 Sep 2016 18:20:07 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u8UFK6c1008756 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u8UFK61P008752; Fri, 30 Sep 2016 18:20:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 30 Sep 2016 18:20:06 +0300 From: Konstantin Belousov To: Lewis Donzis Cc: freebsd-arch@freebsd.org, deischen@freebsd.org Subject: Re: mq on kqueue broken after upgrade to FreeBSD 11 Message-ID: <20160930152006.GS38409@kib.kiev.ua> References: <8A6CD0D3-C4D5-40DF-B2AD-4C454CC88AD1@perftech.com> <20160930094544.GP38409@kib.kiev.ua> <19A6EEAA-C68E-4DAD-B98F-4D904734BD8B@perftech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19A6EEAA-C68E-4DAD-B98F-4D904734BD8B@perftech.com> User-Agent: Mutt/1.6.1 (2016-04-27) 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: Fri, 30 Sep 2016 15:20:13 -0000 On Fri, Sep 30, 2016 at 06:52:52AM -0500, Lewis Donzis wrote: > > > On Sep 30, 2016, at 4:45 AM, Konstantin Belousov wrote: > > Where was a discussion about the function presence being the mistake ? > > I think it was here: https://lists.freebsd.org/pipermail/freebsd-current/2015-November/058706.html > > which was just about a year ago. Perhaps I???m reading it wrong, but it seems like the implication is that removing the symbol from being exported was a "fix", where DE says "Why do the tests in tests/sys/mqueue/ try to use non-public APIs?" and then later, "symbol versioning for librt was broken and leaking symbols that shouldn't have been leaked." > I added Daniel to Cc:. I think that the issue you referenced is somewhat different. The r291439 commit restored symbol versioning, i.e. before it, all symbols were accessible. Right now we are discussing the merits of making one symbol accessible, which was removed from the export table as a side effect of the fix. In other words, if at the time of r291439 the symbol was present in the public export list, your code would not note the fix. > > > In r291439, symbol versioning for librt was fixed, and apparently > > __mq_oshandle() is not present in the global symbols list for librt. > > I suspect that this is an erronous ommission, since the function' > > declaration is present in the mqueue.h header and it is used by some > > mqueue tests. > > > > As such, I believe that exporting it is the intended option there. > > The following patch should fix the problem for you. > > That makes sense, and appreciate the patch, but just to be clear, does your change get committed so that we won???t have to re-apply it after future updates/upgrades? > As I stated, my opinion is that this symbol can be usefully exported. Its name is in implementation-private namespace, and there are uses where access to the mqueue fd (or to the timer id) gives more flexibility and significantly reduces the amount of code. Unless there appear strong objections against the export, I will commit the patch, sure. From owner-freebsd-arch@freebsd.org Fri Sep 30 15:24:53 2016 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 E83BFC02BA5 for ; Fri, 30 Sep 2016 15:24:53 +0000 (UTC) (envelope-from lew@perftech.com) Received: from smtp-gw.pt.net (smtp-gw.pt.net [206.210.194.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp-gw.pt.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BC9C1146 for ; Fri, 30 Sep 2016 15:24:53 +0000 (UTC) (envelope-from lew@perftech.com) X-ASG-Debug-ID: 1475249002-09411a12bf10efcf0001-RYubVt Received: from mail.pt.net (mail.pt.net [206.210.194.11]) by smtp-gw.pt.net with ESMTP id fYzJGEc95w2YwGPi (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 30 Sep 2016 10:23:22 -0500 (CDT) X-Barracuda-Envelope-From: lew@perftech.com X-Barracuda-Effective-Source-IP: mail.pt.net[206.210.194.11] X-Barracuda-Apparent-Source-IP: 206.210.194.11 Received: from localhost (localhost [IPv6:::1]) by mail.pt.net (Postfix) with ESMTP id 55E778425E3; Fri, 30 Sep 2016 10:23:22 -0500 (CDT) Received: from mail.pt.net ([IPv6:::1]) by localhost (mail.pt.net [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id lY-KvqcBF01y; Fri, 30 Sep 2016 10:23:22 -0500 (CDT) Received: from localhost (localhost [IPv6:::1]) by mail.pt.net (Postfix) with ESMTP id 2F3EF8425E6; Fri, 30 Sep 2016 10:23:22 -0500 (CDT) X-Virus-Scanned: amavisd-new at pt.net Received: from mail.pt.net ([IPv6:::1]) by localhost (mail.pt.net [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id APLnpOJNDXy9; Fri, 30 Sep 2016 10:23:22 -0500 (CDT) Received: from dhcp-221-110.perftech.com (dhcp-221-110.perftech.com [206.210.221.110]) (Authenticated sender: lew@pt.net) by mail.pt.net (Postfix) with ESMTPSA id 182B78425E3; Fri, 30 Sep 2016 10:23:22 -0500 (CDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: mq on kqueue broken after upgrade to FreeBSD 11 From: Lewis Donzis X-ASG-Orig-Subj: Re: mq on kqueue broken after upgrade to FreeBSD 11 In-Reply-To: <20160930152006.GS38409@kib.kiev.ua> Date: Fri, 30 Sep 2016 10:23:21 -0500 Cc: freebsd-arch@freebsd.org, deischen@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <0B130E93-6F69-461B-84A3-F08981F9739B@perftech.com> References: <8A6CD0D3-C4D5-40DF-B2AD-4C454CC88AD1@perftech.com> <20160930094544.GP38409@kib.kiev.ua> <19A6EEAA-C68E-4DAD-B98F-4D904734BD8B@perftech.com> <20160930152006.GS38409@kib.kiev.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.3124) X-Barracuda-Connect: mail.pt.net[206.210.194.11] X-Barracuda-Start-Time: 1475249002 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://smtp-gw.pt.net:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 320 X-Virus-Scanned: by bsmtpd at pt.net X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests=BSF_SC0_MISMATCH_TO X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.33351 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 BSF_SC0_MISMATCH_TO Envelope rcpt doesn't match header 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, 30 Sep 2016 15:24:54 -0000 > On Sep 30, 2016, at 10:20 AM, Konstantin Belousov = wrote: > Unless there appear strong objections against the export, I will = commit > the patch, sure. Thanks for the detailed explanation. Is there any chance that will be = included in the final 11.0 build, or is it too late for that? lew= From owner-freebsd-arch@freebsd.org Fri Sep 30 22:44:27 2016 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 9D5F9C044FF for ; Fri, 30 Sep 2016 22:44:27 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from mail-qk0-x243.google.com (mail-qk0-x243.google.com [IPv6:2607:f8b0:400d:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 543931615; Fri, 30 Sep 2016 22:44:27 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by mail-qk0-x243.google.com with SMTP id j129so6778834qkd.2; Fri, 30 Sep 2016 15:44:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version; bh=JBi68SCEEqX8KcavtSxvtfvnA+gX+PPMgwM2IGO5iR8=; b=Kk/bUEHN3T1/I94WauC5NqtMMSe8dwOD/n8Av8zSNt295Kgc5FYNbJ79XhYScZz1jS NV+7ClNB/RfGjZlArHe8rVMYLaPVbpNgEHklOSo3gRnZWD27ulni+xQKySD8PJjz75ds yC932JW/gGlLsoU7icBJU2AL5NfHc7NacTf5R2edqZiu76XDok97GfUv4Mwu5F5e8S22 da1AhFBsoraU/NTD62al0scbzXAgP/DQBKB7VhLqPNe59GXXfxupmKpa/pQtpGIYcyH8 pL3iEJ0gA2Ek5yEzd2fvKU5KGTww9FInaY6h8ylXADWM762UCuEPCRScitF8qrclC/8A nxUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version; bh=JBi68SCEEqX8KcavtSxvtfvnA+gX+PPMgwM2IGO5iR8=; b=JR+7jCLPS8DY+WuROrQ9J9mN3iRpfJcnHJ2tXeeSGFE1281fcs+GLL/2RJ6KerJKhS AQUariyblz7hMSfo7qDbSeUU0d4cC80H7QG0maES6raA0FJUBweryeUZ3uzFyEOBRyJl SbuskY+PtyLLEIU4rPlVUgnuwcPX75qykiqCoAuqjJFd2BdH4k7tCT7kTis3CLRL6Rdl xrF3qwc/hMJKqzD7vmQItOf/a5/vLhisdiM0RoIGzAItClxcGnyDb0UVaP+DDmrAyVSh n+gRc930lUWV+VSj5qzDGc+o2OT63KHU92aoZxbhU8zuOamB2qnEt/OXzScNQ79q5rmO oYbw== X-Gm-Message-State: AA6/9RkRGdSvvaAE6lrMIZvZ+9lQym3PcEcm0fi2iXMWwH/B65nwaSfPqBfWoEnNMUIF/Q== X-Received: by 10.55.16.68 with SMTP id a65mr9234173qkh.106.1475275466467; Fri, 30 Sep 2016 15:44:26 -0700 (PDT) Received: from kan ([2601:18f:802:4680:226:18ff:fe00:232e]) by smtp.gmail.com with ESMTPSA id a94sm11429341qkh.11.2016.09.30.15.44.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Sep 2016 15:44:25 -0700 (PDT) Date: Fri, 30 Sep 2016 18:44:18 -0400 From: Alexander Kabaev To: Konstantin Belousov Cc: Lewis Donzis , deischen@freebsd.org, freebsd-arch@freebsd.org Subject: Re: mq on kqueue broken after upgrade to FreeBSD 11 Message-ID: <20160930184418.1047afc2@kan> In-Reply-To: <20160930152006.GS38409@kib.kiev.ua> References: <8A6CD0D3-C4D5-40DF-B2AD-4C454CC88AD1@perftech.com> <20160930094544.GP38409@kib.kiev.ua> <19A6EEAA-C68E-4DAD-B98F-4D904734BD8B@perftech.com> <20160930152006.GS38409@kib.kiev.ua> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.29; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/s1L.FtqcOpp=DJ7kemp/wKd"; protocol="application/pgp-signature" 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, 30 Sep 2016 22:44:27 -0000 --Sig_/s1L.FtqcOpp=DJ7kemp/wKd Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 30 Sep 2016 18:20:06 +0300 Konstantin Belousov wrote: > On Fri, Sep 30, 2016 at 06:52:52AM -0500, Lewis Donzis wrote: > > =20 > > > On Sep 30, 2016, at 4:45 AM, Konstantin Belousov > > > wrote: Where was a discussion about the > > > function presence being the mistake ? =20 > >=20 > > I think it was here: > > https://lists.freebsd.org/pipermail/freebsd-current/2015-November/05870= 6.html > >=20 > > which was just about a year ago. Perhaps I???m reading it wrong, > > but it seems like the implication is that removing the symbol from > > being exported was a "fix", where DE says "Why do the tests in > > tests/sys/mqueue/ try to use non-public APIs?" and then later, > > "symbol versioning for librt was broken and leaking symbols that > > shouldn't have been leaked."=20 > I added Daniel to Cc:. I think that the issue you referenced is > somewhat different. The r291439 commit restored symbol versioning, > i.e. before it, all symbols were accessible. Right now we are > discussing the merits of making one symbol accessible, which was > removed from the export table as a side effect of the fix. In other > words, if at the time of r291439 the symbol was present in the public > export list, your code would not note the fix. >=20 > > =20 > > > In r291439, symbol versioning for librt was fixed, and apparently > > > __mq_oshandle() is not present in the global symbols list for > > > librt. I suspect that this is an erronous ommission, since the > > > function' declaration is present in the mqueue.h header and it is > > > used by some mqueue tests. > > >=20 > > > As such, I believe that exporting it is the intended option there. > > > The following patch should fix the problem for you. =20 > >=20 > > That makes sense, and appreciate the patch, but > > just to be clear, does your change get committed so that we won???t > > have to re-apply it after future updates/upgrades?=20 > As I stated, my opinion is that this symbol can be usefully exported. > Its name is in implementation-private namespace, and there are uses > where access to the mqueue fd (or to the timer id) gives more > flexibility and significantly reduces the amount of code. >=20 > Unless there appear strong objections against the export, I will > commit the patch, sure. No objection, but possible suggestion: if the primary use of this symbol is for tests and nothing else, maybe it does belong in FBSDprivate_1.0 FBSDprivate_1.0 section instead? --=20 Alexander Kabaev --Sig_/s1L.FtqcOpp=DJ7kemp/wKd Content-Type: application/pgp-signature Content-Description: Цифровая подпись OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJX7urCXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRDNUY3RDk5NTk5QjY0MUUxM0M1MTU2OTEw NzEzMjI5OTkyNzkyRTdFAAoJEAcTIpmSeS5+4NQQAKX/d0lsBL1q4H60eh8YUJBq 1XDDBYWivELNvskSbRYJS2/RC3a3jKmf4guNH1WHiDJ1FrqtrxpJtWKVR0fyPPu7 6u97aIR2neH3qeSHelVL7SMNmu0kGRwSvHApcdD+zF3xw+plfwJpXGyPK7vJ+2q7 y3k8NmBX/ccTnddNcpGCcnn2dI2pl7MuekdLNH3YbWjq4Iphu1PbjULVcXbc2ipb i5fjdc9ezxpZ75JHTYeW1e3l83Wkiv+01db7wfy51ILFpmyOwohufaK8WPFtq74B pebhVHO0wCh06WAjifp1bbIPwmV92Yg/nKe+AKjKXOmvXi/WUZFoA307KSNKEhSr C05aXmyagp615Bm/zDWvmv1dvRjjKZ2SVl1MV5xPySIxi7zPhXpQ+GF63KlSpBUN tgGbrvfAc5hBk0XKc7BI8u3AUzk0nQnWP73yF2yBX6eyi5L0xuBnVeN8zXEAOIGw VSAbH3pMk/rdd1SN3aVqxAuzScc7PqZSdnpBxY5F70TvL9yS3LeFB47+abqIH9Bm 1ZRD6s/bc51cGth3fDywJXuO5n3PX0+g8hbuuGp6M8M3e7dZelj92ql3Kybw0v1P pnhBHwyIBxatDlkJsVahWV59ZFwniwGmiv2RbQwlZ6cF2vLsYduEOTnFOTnCcQ6X jOrBYeZFn9kThjEpmC9g =mvK6 -----END PGP SIGNATURE----- --Sig_/s1L.FtqcOpp=DJ7kemp/wKd-- From owner-freebsd-arch@freebsd.org Fri Sep 30 23:21:24 2016 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 8E45AC04C1F for ; Fri, 30 Sep 2016 23:21:24 +0000 (UTC) (envelope-from lew@perftech.com) Received: from smtp-gw.pt.net (smtp-gw.pt.net [206.210.194.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp-gw.pt.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 62917E52 for ; Fri, 30 Sep 2016 23:21:23 +0000 (UTC) (envelope-from lew@perftech.com) X-ASG-Debug-ID: 1475277557-09411a12c01116230001-RYubVt Received: from mail.pt.net (mail.pt.net [206.210.194.11]) by smtp-gw.pt.net with ESMTP id As4j4lf3LfxX40Lv (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 30 Sep 2016 18:19:17 -0500 (CDT) X-Barracuda-Envelope-From: lew@perftech.com X-Barracuda-Effective-Source-IP: mail.pt.net[206.210.194.11] X-Barracuda-Apparent-Source-IP: 206.210.194.11 Received: from localhost (localhost [IPv6:::1]) by mail.pt.net (Postfix) with ESMTP id 3BEB58425D2; Fri, 30 Sep 2016 18:19:17 -0500 (CDT) Received: from mail.pt.net ([IPv6:::1]) by localhost (mail.pt.net [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id KLGvhRUDy_Sn; Fri, 30 Sep 2016 18:19:17 -0500 (CDT) Received: from localhost (localhost [IPv6:::1]) by mail.pt.net (Postfix) with ESMTP id 1242F8425E8; Fri, 30 Sep 2016 18:19:17 -0500 (CDT) X-Virus-Scanned: amavisd-new at pt.net Received: from mail.pt.net ([IPv6:::1]) by localhost (mail.pt.net [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id JdG5_chu9odS; Fri, 30 Sep 2016 18:19:17 -0500 (CDT) Received: from dhcp-221-110.perftech.com (dhcp-221-110.perftech.com [206.210.221.110]) (Authenticated sender: lew@pt.net) by mail.pt.net (Postfix) with ESMTPSA id EC1A88425D2; Fri, 30 Sep 2016 18:19:16 -0500 (CDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: mq on kqueue broken after upgrade to FreeBSD 11 From: Lewis Donzis X-ASG-Orig-Subj: Re: mq on kqueue broken after upgrade to FreeBSD 11 In-Reply-To: <20160930184418.1047afc2@kan> Date: Fri, 30 Sep 2016 18:19:16 -0500 Cc: Konstantin Belousov , deischen@freebsd.org, freebsd-arch@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <8A6CD0D3-C4D5-40DF-B2AD-4C454CC88AD1@perftech.com> <20160930094544.GP38409@kib.kiev.ua> <19A6EEAA-C68E-4DAD-B98F-4D904734BD8B@perftech.com> <20160930152006.GS38409@kib.kiev.ua> <20160930184418.1047afc2@kan> To: Alexander Kabaev X-Mailer: Apple Mail (2.3124) X-Barracuda-Connect: mail.pt.net[206.210.194.11] X-Barracuda-Start-Time: 1475277557 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://smtp-gw.pt.net:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 585 X-Virus-Scanned: by bsmtpd at pt.net X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests=BSF_SC0_MISMATCH_TO X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.33363 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 BSF_SC0_MISMATCH_TO Envelope rcpt doesn't match header 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, 30 Sep 2016 23:21:24 -0000 > On Sep 30, 2016, at 5:44 PM, Alexander Kabaev = wrote: > No objection, but possible suggestion: if the primary use of this > symbol is for tests and nothing else, maybe it does belong in > FBSDprivate_1.0 FBSDprivate_1.0 section instead? The primary use for us is definitely not testing =E2=80=94 it appears to = be the only way to get a handle that can be used with kevent(). In that = regard, it would be even nicer if it was a regular mq_*() function, even = if it had to be non-portable, rather than beginning with =E2=80=9C__=E2=80= =9D which makes it look internal only. lew= From owner-freebsd-arch@freebsd.org Sat Oct 1 09:25:22 2016 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 E7C06C0480D for ; Sat, 1 Oct 2016 09:25:22 +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 8C6721436; Sat, 1 Oct 2016 09:25:22 +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 u919PFrL071934 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 1 Oct 2016 12:25:16 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u919PFrL071934 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u919PFYa071930; Sat, 1 Oct 2016 12:25:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 1 Oct 2016 12:25:15 +0300 From: Konstantin Belousov To: Alexander Kabaev Cc: Lewis Donzis , deischen@freebsd.org, freebsd-arch@freebsd.org Subject: Re: mq on kqueue broken after upgrade to FreeBSD 11 Message-ID: <20161001092515.GW38409@kib.kiev.ua> References: <8A6CD0D3-C4D5-40DF-B2AD-4C454CC88AD1@perftech.com> <20160930094544.GP38409@kib.kiev.ua> <19A6EEAA-C68E-4DAD-B98F-4D904734BD8B@perftech.com> <20160930152006.GS38409@kib.kiev.ua> <20160930184418.1047afc2@kan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160930184418.1047afc2@kan> User-Agent: Mutt/1.6.1 (2016-04-27) 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: Sat, 01 Oct 2016 09:25:23 -0000 On Fri, Sep 30, 2016 at 06:44:18PM -0400, Alexander Kabaev wrote: > No objection, but possible suggestion: if the primary use of this > symbol is for tests and nothing else, maybe it does belong in > FBSDprivate_1.0 FBSDprivate_1.0 section instead? Good question. The symbols are useful for real-world code, not only for the tests. But I think that we should mark symbol as non-portable. Usual approach of adding _np suffix seems to be the right thing to do there. What about the following ? diff --git a/include/mqueue.h b/include/mqueue.h index 788d0a1..297e8d0 100644 --- a/include/mqueue.h +++ b/include/mqueue.h @@ -50,7 +50,9 @@ ssize_t mq_timedreceive(mqd_t, char *__restrict, size_t, int mq_timedsend(mqd_t, const char *, size_t, unsigned, const struct timespec *); int mq_unlink(const char *); -int __mq_oshandle(mqd_t mqd); +#if __BSD_VISIBLE +int mq_oshandle_np(mqd_t mqd); +#endif /* __BSD_VISIBLE */ __END_DECLS #endif diff --git a/include/time.h b/include/time.h index 14d6044..c172538 100644 --- a/include/time.h +++ b/include/time.h @@ -194,6 +194,7 @@ char *timezone(int, int); /* XXX XSI conflict */ void tzsetwall(void); time_t timelocal(struct tm * const); time_t timegm(struct tm * const); +int timer_oshandle_np(timer_t timerid); #endif /* __BSD_VISIBLE */ #if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) diff --git a/lib/librt/Symbol.map b/lib/librt/Symbol.map index 161bb76..8fbca9c 100644 --- a/lib/librt/Symbol.map +++ b/lib/librt/Symbol.map @@ -25,6 +25,11 @@ FBSD_1.0 { timer_getoverrun; }; +FBSD_1.5 { + mq_oshandle_np; + timer_oshandle_np; +}; + FBSDprivate_1.0 { _aio_read; _aio_write; @@ -56,6 +61,7 @@ FBSDprivate_1.0 { __mq_unlink; __mq_send; __mq_receive; + __mq_oshandle_np; _timer_create; _timer_delete; _timer_gettime; @@ -66,4 +72,5 @@ FBSDprivate_1.0 { __timer_gettime; __timer_settime; __timer_getoverrun; + __timer_oshandle_np; }; diff --git a/lib/librt/mq.c b/lib/librt/mq.c index 750e969..60704a4 100644 --- a/lib/librt/mq.c +++ b/lib/librt/mq.c @@ -78,6 +78,7 @@ __weak_reference(__mq_send_cancel, mq_send); __weak_reference(__mq_send, _mq_send); __weak_reference(__mq_receive_cancel, mq_receive); __weak_reference(__mq_receive, _mq_receive); +__weak_reference(__mq_oshandle_np, mq_oshandle_np); mqd_t __mq_open(const char *name, int oflag, mode_t mode, @@ -273,7 +274,7 @@ __mq_unlink(const char *path) } int -__mq_oshandle(mqd_t mqd) +__mq_oshandle_np(mqd_t mqd) { return (mqd->oshandle); diff --git a/lib/librt/timer.c b/lib/librt/timer.c index 90269c2..fc1379a 100644 --- a/lib/librt/timer.c +++ b/lib/librt/timer.c @@ -63,6 +63,7 @@ __weak_reference(__timer_settime, timer_settime); __weak_reference(__timer_settime, _timer_settime); __weak_reference(__timer_getoverrun, timer_getoverrun); __weak_reference(__timer_getoverrun, _timer_getoverrun); +__weak_reference(__timer_oshandle_np, timer_oshandle_np); typedef void (*timer_func)(union sigval val, int overrun); @@ -176,7 +177,7 @@ __timer_settime(timer_t timerid, int flags, } int -__timer_oshandle(timer_t timerid) +__timer_oshandle_np(timer_t timerid) { return (timerid->oshandle); diff --git a/tests/sys/mqueue/Makefile b/tests/sys/mqueue/Makefile index ce5033c..251c497 100644 --- a/tests/sys/mqueue/Makefile +++ b/tests/sys/mqueue/Makefile @@ -10,8 +10,8 @@ CFLAGS+= -I${SRCTOP}/tests PROGS+= mqtest1 PROGS+= mqtest2 -#PROGS+= mqtest3 -#PROGS+= mqtest4 +PROGS+= mqtest3 +PROGS+= mqtest4 PROGS+= mqtest5 LIBADD+= rt diff --git a/tests/sys/mqueue/mqtest3.c b/tests/sys/mqueue/mqtest3.c index c4b849e..7325572 100644 --- a/tests/sys/mqueue/mqtest3.c +++ b/tests/sys/mqueue/mqtest3.c @@ -62,9 +62,10 @@ main(void) buf = malloc(attr.mq_msgsize); for (j = 0; j < LOOPS; ++j) { FD_ZERO(&set); - FD_SET(__mq_oshandle(mq), &set); + FD_SET(mq_oshandle_np(mq), &set); alarm(3); - status = select(__mq_oshandle(mq)+1, &set, NULL, NULL, NULL); + status = select(mq_oshandle_np(mq) + 1, &set, NULL, + NULL, NULL); if (status != 1) err(1, "child process: select()"); status = mq_receive(mq, buf, attr.mq_msgsize, &prio); @@ -94,8 +95,9 @@ main(void) } alarm(3); FD_ZERO(&set); - FD_SET(__mq_oshandle(mq), &set); - status = select(__mq_oshandle(mq)+1, NULL, &set, NULL, NULL); + FD_SET(mq_oshandle_np(mq), &set); + status = select(mq_oshandle_np(mq) + 1, NULL, &set, + NULL, NULL); if (status != 1) err(1, "select()"); status = mq_send(mq, buf, attr.mq_msgsize, PRIO); diff --git a/tests/sys/mqueue/mqtest4.c b/tests/sys/mqueue/mqtest4.c index 474d212..fff04c0c 100644 --- a/tests/sys/mqueue/mqtest4.c +++ b/tests/sys/mqueue/mqtest4.c @@ -57,7 +57,7 @@ main(void) mq = mq_open(MQNAME, O_RDWR); if (mq == (mqd_t)-1) err(1, "child: mq_open"); - EV_SET(&kev, __mq_oshandle(mq), EVFILT_READ, EV_ADD, 0, 0, 0); + EV_SET(&kev, mq_oshandle_np(mq), EVFILT_READ, EV_ADD, 0, 0, 0); status = kevent(kq, &kev, 1, NULL, 0, NULL); if (status == -1) err(1, "child: kevent"); @@ -89,7 +89,7 @@ main(void) signal(SIGALRM, sighandler); kq = kqueue(); - EV_SET(&kev, __mq_oshandle(mq), EVFILT_WRITE, EV_ADD, 0, 0, 0); + EV_SET(&kev, mq_oshandle_np(mq), EVFILT_WRITE, EV_ADD, 0, 0, 0); status = kevent(kq, &kev, 1, NULL, 0, NULL); if (status == -1) err(1, "kevent"); From owner-freebsd-arch@freebsd.org Sat Oct 1 12:45:42 2016 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 9419CC059E3 for ; Sat, 1 Oct 2016 12:45:42 +0000 (UTC) (envelope-from lew@perftech.com) Received: from smtp-gw.pt.net (smtp-gw.pt.net [206.210.194.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp-gw.pt.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 62A87186B for ; Sat, 1 Oct 2016 12:45:41 +0000 (UTC) (envelope-from lew@perftech.com) X-ASG-Debug-ID: 1475325820-09411a12c01132ed0001-RYubVt Received: from mail.pt.net (mail.pt.net [206.210.194.11]) by smtp-gw.pt.net with ESMTP id BTMpfXGbpPIFZeox (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 01 Oct 2016 07:43:40 -0500 (CDT) X-Barracuda-Envelope-From: lew@perftech.com X-Barracuda-Effective-Source-IP: mail.pt.net[206.210.194.11] X-Barracuda-Apparent-Source-IP: 206.210.194.11 Received: from localhost (localhost [IPv6:::1]) by mail.pt.net (Postfix) with ESMTP id AA60A8425FE; Sat, 1 Oct 2016 07:43:40 -0500 (CDT) Received: from mail.pt.net ([IPv6:::1]) by localhost (mail.pt.net [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id ZFisx77CewEg; Sat, 1 Oct 2016 07:43:40 -0500 (CDT) Received: from localhost (localhost [IPv6:::1]) by mail.pt.net (Postfix) with ESMTP id 5AFDB8425FF; Sat, 1 Oct 2016 07:43:40 -0500 (CDT) X-Virus-Scanned: amavisd-new at pt.net Received: from mail.pt.net ([IPv6:::1]) by localhost (mail.pt.net [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id h3DBg9qQbD4L; Sat, 1 Oct 2016 07:43:40 -0500 (CDT) Received: from lewhome-dhcp-179.pt.net (lewhome-dhcp-179.pt.net [206.210.207.179]) (Authenticated sender: lew@pt.net) by mail.pt.net (Postfix) with ESMTPSA id 0E96A8425FE; Sat, 1 Oct 2016 07:43:39 -0500 (CDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: mq on kqueue broken after upgrade to FreeBSD 11 From: Lewis Donzis X-ASG-Orig-Subj: Re: mq on kqueue broken after upgrade to FreeBSD 11 In-Reply-To: <20161001092515.GW38409@kib.kiev.ua> Date: Sat, 1 Oct 2016 07:43:39 -0500 Cc: Alexander Kabaev , deischen@freebsd.org, freebsd-arch@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <7CEF9718-2583-4EF1-BBBA-34A3B2F2F0E0@perftech.com> References: <8A6CD0D3-C4D5-40DF-B2AD-4C454CC88AD1@perftech.com> <20160930094544.GP38409@kib.kiev.ua> <19A6EEAA-C68E-4DAD-B98F-4D904734BD8B@perftech.com> <20160930152006.GS38409@kib.kiev.ua> <20160930184418.1047afc2@kan> <20161001092515.GW38409@kib.kiev.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.3124) X-Barracuda-Connect: mail.pt.net[206.210.194.11] X-Barracuda-Start-Time: 1475325820 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://smtp-gw.pt.net:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 1434 X-Virus-Scanned: by bsmtpd at pt.net X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests=BSF_SC0_MISMATCH_TO X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.33374 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 BSF_SC0_MISMATCH_TO Envelope rcpt doesn't match header 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: Sat, 01 Oct 2016 12:45:42 -0000 > On Oct 1, 2016, at 4:25 AM, Konstantin Belousov = wrote: >=20 > On Fri, Sep 30, 2016 at 06:44:18PM -0400, Alexander Kabaev wrote: >> No objection, but possible suggestion: if the primary use of this >> symbol is for tests and nothing else, maybe it does belong in >> FBSDprivate_1.0 FBSDprivate_1.0 section instead? >=20 > Good question. The symbols are useful for real-world code, not only = for > the tests. But I think that we should mark symbol as non-portable. = Usual > approach of adding _np suffix seems to be the right thing to do there. >=20 > What about the following ? > =E2=80=A6 Not that I have any say in this, but that seems reasonable to me. The = functions are relevant and necessary for anything that needs a handle = for a POSIX message queue, so your change would be preferable to having = them appear as internal functions. (And then they could be documented, = too.) Speaking of which, not sure if this is the appropriate place to post = this, but the mq_open documentation needs a little tweaking, too. mq_open(2)=E2=80=99s man page says: SEE ALSO mq_close(2), mq_getattr(2), mq_receive(2), mq_send(2), = mq_setattr(2), mq_timedreceive(3), mq_timedsend(3), mq_unlink(3), mqueuefs(5) However, both mq_timedreceive and mq_timedsend are in section 2, not = section 3. =20 And, mq_unlink should probably be in section 2, but in any event, that = file appears to be missing. lew From owner-freebsd-arch@freebsd.org Sat Oct 1 20:17:08 2016 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 59E8BA94D1D for ; Sat, 1 Oct 2016 20:17:08 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mailout.stack.nl (mailout05.stack.nl [IPv6:2001:610:1108:5010::202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 26F01131; Sat, 1 Oct 2016 20:17:07 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mailout.stack.nl (Postfix) with ESMTP id F16796B66; Sat, 1 Oct 2016 22:16:55 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id E2C7728494; Sat, 1 Oct 2016 22:16:55 +0200 (CEST) Date: Sat, 1 Oct 2016 22:16:55 +0200 From: Jilles Tjoelker To: Konstantin Belousov Cc: Alexander Kabaev , Lewis Donzis , deischen@freebsd.org, freebsd-arch@freebsd.org Subject: Re: mq on kqueue broken after upgrade to FreeBSD 11 Message-ID: <20161001201655.GA91457@stack.nl> References: <8A6CD0D3-C4D5-40DF-B2AD-4C454CC88AD1@perftech.com> <20160930094544.GP38409@kib.kiev.ua> <19A6EEAA-C68E-4DAD-B98F-4D904734BD8B@perftech.com> <20160930152006.GS38409@kib.kiev.ua> <20160930184418.1047afc2@kan> <20161001092515.GW38409@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161001092515.GW38409@kib.kiev.ua> User-Agent: Mutt/1.5.21 (2010-09-15) 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: Sat, 01 Oct 2016 20:17:08 -0000 On Sat, Oct 01, 2016 at 12:25:15PM +0300, Konstantin Belousov wrote: > On Fri, Sep 30, 2016 at 06:44:18PM -0400, Alexander Kabaev wrote: > > No objection, but possible suggestion: if the primary use of this > > symbol is for tests and nothing else, maybe it does belong in > > FBSDprivate_1.0 FBSDprivate_1.0 section instead? > Good question. The symbols are useful for real-world code, not only for > the tests. But I think that we should mark symbol as non-portable. Usual > approach of adding _np suffix seems to be the right thing to do there. > What about the following ? The idea is good, but perhaps call the function mq_getfd_np() to clarify it returns a file descriptor. Also, the __ versions should not be exported since they are not used outside the library (they can be exported if and when needed). -- Jilles Tjoelker From owner-freebsd-arch@freebsd.org Sat Oct 1 21:07:29 2016 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 81E12A94C69 for ; Sat, 1 Oct 2016 21:07:29 +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 2BD24154; Sat, 1 Oct 2016 21:07:28 +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 u91L7Njk027952 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 2 Oct 2016 00:07:23 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u91L7Njk027952 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u91L7M9t027951; Sun, 2 Oct 2016 00:07:22 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 2 Oct 2016 00:07:22 +0300 From: Konstantin Belousov To: Jilles Tjoelker Cc: Alexander Kabaev , Lewis Donzis , deischen@freebsd.org, freebsd-arch@freebsd.org Subject: Re: mq on kqueue broken after upgrade to FreeBSD 11 Message-ID: <20161001210722.GC38409@kib.kiev.ua> References: <8A6CD0D3-C4D5-40DF-B2AD-4C454CC88AD1@perftech.com> <20160930094544.GP38409@kib.kiev.ua> <19A6EEAA-C68E-4DAD-B98F-4D904734BD8B@perftech.com> <20160930152006.GS38409@kib.kiev.ua> <20160930184418.1047afc2@kan> <20161001092515.GW38409@kib.kiev.ua> <20161001201655.GA91457@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161001201655.GA91457@stack.nl> User-Agent: Mutt/1.6.1 (2016-04-27) 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: Sat, 01 Oct 2016 21:07:29 -0000 On Sat, Oct 01, 2016 at 10:16:55PM +0200, Jilles Tjoelker wrote: > The idea is good, but perhaps call the function mq_getfd_np() to clarify > it returns a file descriptor. Also, the __ versions should not be > exported since they are not used outside the library (they can be > exported if and when needed). diff --git a/include/mqueue.h b/include/mqueue.h index 788d0a1..e1c0f27 100644 --- a/include/mqueue.h +++ b/include/mqueue.h @@ -50,7 +50,9 @@ ssize_t mq_timedreceive(mqd_t, char *__restrict, size_t, int mq_timedsend(mqd_t, const char *, size_t, unsigned, const struct timespec *); int mq_unlink(const char *); -int __mq_oshandle(mqd_t mqd); +#if __BSD_VISIBLE +int mq_getfd_np(mqd_t mqd); +#endif /* __BSD_VISIBLE */ __END_DECLS #endif diff --git a/include/time.h b/include/time.h index 14d6044..c172538 100644 --- a/include/time.h +++ b/include/time.h @@ -194,6 +194,7 @@ char *timezone(int, int); /* XXX XSI conflict */ void tzsetwall(void); time_t timelocal(struct tm * const); time_t timegm(struct tm * const); +int timer_oshandle_np(timer_t timerid); #endif /* __BSD_VISIBLE */ #if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) diff --git a/lib/librt/Symbol.map b/lib/librt/Symbol.map index 161bb76..fef3c15 100644 --- a/lib/librt/Symbol.map +++ b/lib/librt/Symbol.map @@ -25,6 +25,11 @@ FBSD_1.0 { timer_getoverrun; }; +FBSD_1.5 { + mq_getfd_np; + timer_oshandle_np; +}; + FBSDprivate_1.0 { _aio_read; _aio_write; diff --git a/lib/librt/mq.c b/lib/librt/mq.c index 750e969..513fa72 100644 --- a/lib/librt/mq.c +++ b/lib/librt/mq.c @@ -272,8 +272,9 @@ __mq_unlink(const char *path) return __sys_kmq_unlink(path); } +#pragma weak mq_getfd_np int -__mq_oshandle(mqd_t mqd) +mq_getfd_np(mqd_t mqd) { return (mqd->oshandle); diff --git a/lib/librt/timer.c b/lib/librt/timer.c index 90269c2..b5f775c 100644 --- a/lib/librt/timer.c +++ b/lib/librt/timer.c @@ -175,8 +175,9 @@ __timer_settime(timer_t timerid, int flags, flags, value, ovalue); } +#pragma weak timer_oshandle_np int -__timer_oshandle(timer_t timerid) +timer_oshandle_np(timer_t timerid) { return (timerid->oshandle); diff --git a/tests/sys/mqueue/Makefile b/tests/sys/mqueue/Makefile index ce5033c..251c497 100644 --- a/tests/sys/mqueue/Makefile +++ b/tests/sys/mqueue/Makefile @@ -10,8 +10,8 @@ CFLAGS+= -I${SRCTOP}/tests PROGS+= mqtest1 PROGS+= mqtest2 -#PROGS+= mqtest3 -#PROGS+= mqtest4 +PROGS+= mqtest3 +PROGS+= mqtest4 PROGS+= mqtest5 LIBADD+= rt diff --git a/tests/sys/mqueue/mqtest3.c b/tests/sys/mqueue/mqtest3.c index c4b849e..3e20c4d 100644 --- a/tests/sys/mqueue/mqtest3.c +++ b/tests/sys/mqueue/mqtest3.c @@ -62,9 +62,10 @@ main(void) buf = malloc(attr.mq_msgsize); for (j = 0; j < LOOPS; ++j) { FD_ZERO(&set); - FD_SET(__mq_oshandle(mq), &set); + FD_SET(mq_getfd_np(mq), &set); alarm(3); - status = select(__mq_oshandle(mq)+1, &set, NULL, NULL, NULL); + status = select(mq_getfd_np(mq) + 1, &set, NULL, + NULL, NULL); if (status != 1) err(1, "child process: select()"); status = mq_receive(mq, buf, attr.mq_msgsize, &prio); @@ -94,8 +95,9 @@ main(void) } alarm(3); FD_ZERO(&set); - FD_SET(__mq_oshandle(mq), &set); - status = select(__mq_oshandle(mq)+1, NULL, &set, NULL, NULL); + FD_SET(mq_getfd_np(mq), &set); + status = select(mq_getfd_np(mq) + 1, NULL, &set, + NULL, NULL); if (status != 1) err(1, "select()"); status = mq_send(mq, buf, attr.mq_msgsize, PRIO); diff --git a/tests/sys/mqueue/mqtest4.c b/tests/sys/mqueue/mqtest4.c index 474d212..b0b3952 100644 --- a/tests/sys/mqueue/mqtest4.c +++ b/tests/sys/mqueue/mqtest4.c @@ -57,7 +57,7 @@ main(void) mq = mq_open(MQNAME, O_RDWR); if (mq == (mqd_t)-1) err(1, "child: mq_open"); - EV_SET(&kev, __mq_oshandle(mq), EVFILT_READ, EV_ADD, 0, 0, 0); + EV_SET(&kev, mq_getfd_np(mq), EVFILT_READ, EV_ADD, 0, 0, 0); status = kevent(kq, &kev, 1, NULL, 0, NULL); if (status == -1) err(1, "child: kevent"); @@ -89,7 +89,7 @@ main(void) signal(SIGALRM, sighandler); kq = kqueue(); - EV_SET(&kev, __mq_oshandle(mq), EVFILT_WRITE, EV_ADD, 0, 0, 0); + EV_SET(&kev, mq_getfd_np(mq), EVFILT_WRITE, EV_ADD, 0, 0, 0); status = kevent(kq, &kev, 1, NULL, 0, NULL); if (status == -1) err(1, "kevent"); From owner-freebsd-arch@freebsd.org Sat Oct 1 21:22:50 2016 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 AA5E1A9412D for ; Sat, 1 Oct 2016 21:22:50 +0000 (UTC) (envelope-from repeatable_compression@yahoo.com) Received: from nm43-vm2.bullet.mail.ne1.yahoo.com (nm43-vm2.bullet.mail.ne1.yahoo.com [98.138.120.226]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7498DA97 for ; Sat, 1 Oct 2016 21:22:50 +0000 (UTC) (envelope-from repeatable_compression@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1475356963; bh=RRLfNaE08PJimLPoQTZ8oOWVVXE4/H0tLQHI79qq4sE=; h=Date:From:Reply-To:To:Subject:References:From:Subject; b=RWnj6iuxC0JhVNHgDotwgyzOC329oxNtCE+cmpYACoxDEdjaOw4TfuT2Pk9EuLFhelnvOJLMPx41oO89G5QxLPPzDdBAVcZ0SCTl5zElZe4nwulg0sXW+Aw1qV0Bf5NzFOJ4sxzUr3jd0FN5ODAbBvqYcfCVjthKX5Rd8cNeoUlfUUeJOqycNowf0xBhqRd8veqJDvWh+txd4qvoVsQlGWuNgFmnuSWvqeNp0hbW2QaFYRGUoNAnYuSfnLmoKg/4+Pe+sotgTEvmqdCu9xZDKWtRRMQhRhxfADT5jg8RoBwtO8fbxGvL2bdZVMuEOTnywWgggGE6GG2c1urGasPeLQ== Received: from [127.0.0.1] by nm43.bullet.mail.ne1.yahoo.com with NNFMP; 01 Oct 2016 21:22:43 -0000 Received: from [98.138.100.118] by nm43.bullet.mail.ne1.yahoo.com with NNFMP; 01 Oct 2016 21:19:43 -0000 Received: from [98.138.89.252] by tm109.bullet.mail.ne1.yahoo.com with NNFMP; 01 Oct 2016 21:19:43 -0000 Received: from [127.0.0.1] by omp1044.mail.ne1.yahoo.com with NNFMP; 01 Oct 2016 21:19:43 -0000 X-Yahoo-Newman-Property: ymail-4 X-Yahoo-Newman-Id: 671215.66147.bm@omp1044.mail.ne1.yahoo.com X-YMail-OSG: BlLb0lAVM1k3tLLrErCMPH8uwMra9QR78YbAUkcQPfHZFh6UzqTsIj_BglBuLw5 R3EtEdRvvjpM6viK6SlTfKgi3AXa3_uUlN6eGufU5gQeaglO8N3.AIMOpFON.HWm4Yzb_E7yYJ1u w4kjPEwAuMkt3TcsbqdhPUYrUnrG8bIt48s81uTurAXY28T6vgvnUMj5mtUvFEvjA07eRvAXmoAp zYEgREPClVYgrKp9VjI0TwP8bE.aYacsByOjRWODXQ8l0Z9m3eO3Lv4N2cDKmAeTGgOMiK_KN0LY OA2bVNAVXIyfQ23KTQkvL7GY7MMzkKqXnWff149DDTDvnQCmoLSGtO4UV5dhuJZjVGivVXHDKLLc vI48yl650GGd64nJ4cPrMdt5H_dNEz_Ejq5N9Sp3odTr3UlYMhaFX5mMJxqCPaC2BCiXew2F95I2 o7zKzbSKCfj1TRKx9m4buHqAhRuUv_jntdTN0LMj.Yraxwy9iWwMcN5rMvclhX_ynLOGY0c.SnpW abgcxmIiiTp11eBtelqp5Bl25seNd0Sof83uAVWs4sOl4NQ-- Received: from jws10031.mail.ne1.yahoo.com by sendmailws137.mail.ne1.yahoo.com; Sat, 01 Oct 2016 21:19:43 +0000; 1475356783.272 Date: Sat, 1 Oct 2016 21:19:42 +0000 (UTC) From: Jules Gilbert Reply-To: Jules Gilbert To: "freebsd-arch@freebsd.org" Message-ID: <1370580991.3823377.1475356782921@mail.yahoo.com> Subject: I fear I know the answer... MIME-Version: 1.0 References: <1370580991.3823377.1475356782921.ref@mail.yahoo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: Sat, 01 Oct 2016 21:22:50 -0000 Are the pre-built packages for FBSD 11 available for download?=C2=A0 For v7= and v9 I configured a machine with filezilla and soon enough it had materi= als. I do this because I've experienced security breache.=C2=A0 It's not that Fr= eeBSD isn't secure, it's that I use X, and one or two other programs, (Fire= fox, Thunderbird,) none of these tools has a great reputation for secure pe= rformance. Still, all I'm asking is:=C2=A0 are the packages available, either online o= r even offline, as from a CD/DVD purchase? From owner-freebsd-arch@freebsd.org Sat Oct 1 21:29:41 2016 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 7F502A941FB for ; Sat, 1 Oct 2016 21:29:41 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72D1BB9B; Sat, 1 Oct 2016 21:29:41 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [64.201.244.132] (port=63313 helo=[10.0.0.105]) by shxd.cx with esmtps (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1bqNNV-000K5n-FT; Sat, 01 Oct 2016 16:43:09 +0000 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable From: Devin Teske Mime-Version: 1.0 (1.0) Subject: Re: I fear I know the answer... Date: Sat, 1 Oct 2016 14:27:20 -0700 Message-Id: <1084E4D1-B423-4C4C-9CD7-29FF93EF0B98@shxd.cx> References: <1370580991.3823377.1475356782921.ref@mail.yahoo.com> <1370580991.3823377.1475356782921@mail.yahoo.com> Cc: freebsd-arch@freebsd.org, Devin Teske In-Reply-To: <1370580991.3823377.1475356782921@mail.yahoo.com> To: Jules Gilbert X-Mailer: iPhone Mail (13G36) 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: Sat, 01 Oct 2016 21:29:41 -0000 > On Oct 1, 2016, at 2:19 PM, Jules Gilbert via freebsd-arch wrote: >=20 > Are the pre-built packages for FBSD 11 available for download? For v7 and= v9 I configured a machine with filezilla and soon enough it had materials. > I do this because I've experienced security breache. It's not that FreeBS= D isn't secure, it's that I use X, and one or two other programs, (Firefox, T= hunderbird,) none of these tools has a great reputation for secure performan= ce. > Still, all I'm asking is: are the packages available, either online or ev= en offline, as from a CD/DVD purchase? Online: pkg.freebsd.org download.freebsd.org --=20 Devin= From owner-freebsd-arch@freebsd.org Sat Oct 1 21:56:49 2016 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 8156BA94A5B for ; Sat, 1 Oct 2016 21:56:49 +0000 (UTC) (envelope-from lew@perftech.com) Received: from smtp-gw.pt.net (smtp-gw.pt.net [206.210.194.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp-gw.pt.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47543802 for ; Sat, 1 Oct 2016 21:56:48 +0000 (UTC) (envelope-from lew@perftech.com) X-ASG-Debug-ID: 1475358857-09411a12c01151f70001-RYubVt Received: from mail.pt.net (mail.pt.net [206.210.194.11]) by smtp-gw.pt.net with ESMTP id hRy6NeXHfK28yurQ (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 01 Oct 2016 16:54:17 -0500 (CDT) X-Barracuda-Envelope-From: lew@perftech.com X-Barracuda-Effective-Source-IP: mail.pt.net[206.210.194.11] X-Barracuda-Apparent-Source-IP: 206.210.194.11 Received: from localhost (localhost [IPv6:::1]) by mail.pt.net (Postfix) with ESMTP id 12D0F8425F4; Sat, 1 Oct 2016 16:54:17 -0500 (CDT) Received: from mail.pt.net ([IPv6:::1]) by localhost (mail.pt.net [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id K-hal3LxIrsu; Sat, 1 Oct 2016 16:54:16 -0500 (CDT) Received: from localhost (localhost [IPv6:::1]) by mail.pt.net (Postfix) with ESMTP id 8F06C842602; Sat, 1 Oct 2016 16:54:16 -0500 (CDT) X-Virus-Scanned: amavisd-new at pt.net Received: from mail.pt.net ([IPv6:::1]) by localhost (mail.pt.net [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id OR67I4AYroG2; Sat, 1 Oct 2016 16:54:16 -0500 (CDT) Received: from lewhome-dhcp-179.pt.net (lewhome-dhcp-179.pt.net [206.210.207.179]) (Authenticated sender: lew@pt.net) by mail.pt.net (Postfix) with ESMTPSA id 294C18425F4; Sat, 1 Oct 2016 16:54:16 -0500 (CDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: mq on kqueue broken after upgrade to FreeBSD 11 From: Lewis Donzis X-ASG-Orig-Subj: Re: mq on kqueue broken after upgrade to FreeBSD 11 In-Reply-To: <20161001201655.GA91457@stack.nl> Date: Sat, 1 Oct 2016 16:54:15 -0500 Cc: Konstantin Belousov , Alexander Kabaev , deischen@freebsd.org, freebsd-arch@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <8A6CD0D3-C4D5-40DF-B2AD-4C454CC88AD1@perftech.com> <20160930094544.GP38409@kib.kiev.ua> <19A6EEAA-C68E-4DAD-B98F-4D904734BD8B@perftech.com> <20160930152006.GS38409@kib.kiev.ua> <20160930184418.1047afc2@kan> <20161001092515.GW38409@kib.kiev.ua> <20161001201655.GA91457@stack.nl> To: Jilles Tjoelker X-Mailer: Apple Mail (2.3124) X-Barracuda-Connect: mail.pt.net[206.210.194.11] X-Barracuda-Start-Time: 1475358857 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://smtp-gw.pt.net:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 730 X-Virus-Scanned: by bsmtpd at pt.net X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests=BSF_SC0_MISMATCH_TO X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.33389 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 BSF_SC0_MISMATCH_TO Envelope rcpt doesn't match header 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: Sat, 01 Oct 2016 21:56:49 -0000 > On Oct 1, 2016, at 3:16 PM, Jilles Tjoelker wrote: > The idea is good, but perhaps call the function mq_getfd_np() to = clarify > it returns a file descriptor. I have no objection, but for what it=E2=80=99s worth, there could be = code out there that uses __mq_oshandle() simply because it=E2=80=99s = been around for a while and has been the only way to use poll(), = select(), or kevent() with an mqueue ever since an mqd_t changed from an = integer to a pointer. In our case, we have a half-dozen or so source files that reference = __mq_oshandle(), but we don=E2=80=99t mind changing them if it=E2=80=99s = better in the long run. I=E2=80=99m merely pointing out that it=E2=80=99s= incompatible with previous FreeBSD versions. Thanks, lew From owner-freebsd-arch@freebsd.org Sat Oct 1 23:15:28 2016 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 7EAD5A94DC0 for ; Sat, 1 Oct 2016 23:15:28 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mailout.stack.nl (mailout05.stack.nl [131.155.140.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 44847D0; Sat, 1 Oct 2016 23:15:27 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mailout.stack.nl (Postfix) with ESMTP id 97BEE6B66; Sun, 2 Oct 2016 01:15:24 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 8901A28494; Sun, 2 Oct 2016 01:15:24 +0200 (CEST) Date: Sun, 2 Oct 2016 01:15:24 +0200 From: Jilles Tjoelker To: Konstantin Belousov Cc: Lewis Donzis , deischen@freebsd.org, freebsd-arch@freebsd.org Subject: Re: mq on kqueue broken after upgrade to FreeBSD 11 Message-ID: <20161001231524.GB91457@stack.nl> References: <8A6CD0D3-C4D5-40DF-B2AD-4C454CC88AD1@perftech.com> <20160930094544.GP38409@kib.kiev.ua> <19A6EEAA-C68E-4DAD-B98F-4D904734BD8B@perftech.com> <20160930152006.GS38409@kib.kiev.ua> <20160930184418.1047afc2@kan> <20161001092515.GW38409@kib.kiev.ua> <20161001201655.GA91457@stack.nl> <20161001210722.GC38409@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161001210722.GC38409@kib.kiev.ua> User-Agent: Mutt/1.5.21 (2010-09-15) 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: Sat, 01 Oct 2016 23:15:28 -0000 On Sun, Oct 02, 2016 at 12:07:22AM +0300, Konstantin Belousov wrote: > On Sat, Oct 01, 2016 at 10:16:55PM +0200, Jilles Tjoelker wrote: > > The idea is good, but perhaps call the function mq_getfd_np() to clarify > > it returns a file descriptor. Also, the __ versions should not be > > exported since they are not used outside the library (they can be > > exported if and when needed). Please rename timer_oshandle_np() to timer_getfd_np() as well. Looks ready to commit otherwise. -- Jilles Tjoelker