From owner-freebsd-hackers@freebsd.org Sun Apr 21 19:14:30 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DB85158232F for ; Sun, 21 Apr 2019 19:14:30 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: from puchar.net (puchar.net [194.1.144.90]) (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 06D3886675; Sun, 21 Apr 2019 19:14:28 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: Received: from 127.0.0.1 (localhost [127.0.0.1]) by puchar.net (8.15.2/8.15.2) with ESMTPS id x3LJELWP034912 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 21 Apr 2019 21:14:21 +0200 (CEST) (envelope-from puchar-wojtek@puchar.net) Received: from localhost (puchar-wojtek@localhost) by puchar.net (8.15.2/8.15.2/Submit) with ESMTP id x3LJELip034909; Sun, 21 Apr 2019 21:14:21 +0200 (CEST) (envelope-from puchar-wojtek@puchar.net) Date: Sun, 21 Apr 2019 21:14:21 +0200 (CEST) From: Wojciech Puchar To: Ian Lepore cc: freebsd-hackers@freebsd.org Subject: Re: bhyve VM stopped to boot after moving virtio disks In-Reply-To: Message-ID: References: <2006ff8da153bbe5e7f620da9260ee1518bd248f.camel@freebsd.org> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Rspamd-Queue-Id: 06D3886675 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of wojtek@puchar.net designates 194.1.144.90 as permitted sender) smtp.mailfrom=wojtek@puchar.net X-Spamd-Result: default: False [-6.62 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[puchar.net]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-3.51)[ip: (-9.28), ipnet: 194.1.144.0/24(-4.64), asn: 43476(-3.71), country: PL(0.07)]; MX_GOOD(-0.01)[puchar.net]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[90.144.1.194.list.dnswl.org : 127.0.10.0]; NEURAL_HAM_SHORT(-0.80)[-0.800,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:43476, ipnet:194.1.144.0/24, country:PL]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Apr 2019 19:14:30 -0000 >> till the end - i see second copy of GPT partition table that was >> present >> in VM. >> > > dd absolutely will fail to copy the last block of the source if it > isn't exactly the blocksize and you didn't specify conv=sync, and it > will return a zero status when doing so. It appears you've convinced strange but i use dd regularly without such behaviour From owner-freebsd-hackers@freebsd.org Mon Apr 22 15:32:46 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 561B8159D214 for ; Mon, 22 Apr 2019 15:32:46 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: from puchar.net (puchar.net [194.1.144.90]) (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 E9F4169B11 for ; Mon, 22 Apr 2019 15:32:44 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: Received: from 127.0.0.1 (localhost [127.0.0.1]) by puchar.net (8.15.2/8.15.2) with ESMTPS id x3MFWdRj076656 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 22 Apr 2019 17:32:40 +0200 (CEST) (envelope-from puchar-wojtek@puchar.net) Received: from localhost (puchar-wojtek@localhost) by puchar.net (8.15.2/8.15.2/Submit) with ESMTP id x3MFWdpf076653; Mon, 22 Apr 2019 17:32:39 +0200 (CEST) (envelope-from puchar-wojtek@puchar.net) Date: Mon, 22 Apr 2019 17:32:39 +0200 (CEST) From: Wojciech Puchar To: Eugene Grosbein cc: Wojciech Puchar , freebsd-hackers@freebsd.org Subject: Re: openvpn and system overhead In-Reply-To: <5CBAB88C.4020402@grosbein.net> Message-ID: References: <0cc6e0ac-a9a6-a462-3a1e-bfccfd41e138@grosbein.net> <5CBAB88C.4020402@grosbein.net> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Rspamd-Queue-Id: E9F4169B11 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of wojtek@puchar.net designates 194.1.144.90 as permitted sender) smtp.mailfrom=wojtek@puchar.net X-Spamd-Result: default: False [-6.71 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[puchar.net]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: puchar.net]; NEURAL_HAM_SHORT(-0.89)[-0.886,0]; RCVD_IN_DNSWL_NONE(0.00)[90.144.1.194.list.dnswl.org : 127.0.10.0]; IP_SCORE(-3.52)[ip: (-9.29), ipnet: 194.1.144.0/24(-4.64), asn: 43476(-3.72), country: PL(0.07)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:43476, ipnet:194.1.144.0/24, country:PL]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Apr 2019 15:32:46 -0000 >> well it has to cooperate with multitude of clients like windoze, >> point&click routers etc. that's why openvpn. > > Windows has stock support for IPSec with and without L2TP and has no stock openvpn, so IPSec is more preferable. can IPSEC VPN work over nat? even freebsd-freebsd case. I cannot find any tutorial how to do this. From owner-freebsd-hackers@freebsd.org Mon Apr 22 15:59:43 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C255B159DF0D for ; Mon, 22 Apr 2019 15:59:42 +0000 (UTC) (envelope-from louisk@cryptomonkeys.org) Received: from mail.cryptomonkeys.com (mail.cryptomonkeys.com [206.189.203.84]) (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 895D96AC3D for ; Mon, 22 Apr 2019 15:59:41 +0000 (UTC) (envelope-from louisk@cryptomonkeys.org) Received: from freebsd-s-2vcpu-2gb-nyc1-01 (localhost [127.0.0.1]) by mail.cryptomonkeys.com (Postfix) with ESMTP id 3E7A575940; Mon, 22 Apr 2019 15:59:04 +0000 (UTC) Received: from mail.cryptomonkeys.com ([127.0.0.1]) by freebsd-s-2vcpu-2gb-nyc1-01 (mail.cryptomonkeys.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iXnilg7-B8VA; Mon, 22 Apr 2019 15:58:56 +0000 (UTC) Received: from ipwn.gwp.corp.flightaware.com (natpool.gwp.corp.flightaware.com [38.100.147.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.cryptomonkeys.com (Postfix) with ESMTPSA id 5428075934; Mon, 22 Apr 2019 15:58:56 +0000 (UTC) From: Louis Kowolowski Message-Id: <25566D0F-72DF-4EF1-8900-8DD611D03B33@cryptomonkeys.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Subject: Re: openvpn and system overhead Date: Mon, 22 Apr 2019 10:58:56 -0500 In-Reply-To: Cc: Eugene Grosbein , freebsd-hackers@freebsd.org To: Wojciech Puchar References: <0cc6e0ac-a9a6-a462-3a1e-bfccfd41e138@grosbein.net> <5CBAB88C.4020402@grosbein.net> X-Rspamd-Queue-Id: 895D96AC3D X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of louisk@cryptomonkeys.org designates 206.189.203.84 as permitted sender) smtp.mailfrom=louisk@cryptomonkeys.org X-Spamd-Result: default: False [-0.91 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-0.88)[-0.876,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+mx]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[cryptomonkeys.org]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.13)[0.131,0]; NEURAL_HAM_LONG(-0.66)[-0.664,0]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[mail.cryptomonkeys.org]; RCVD_IN_DNSWL_NONE(0.00)[84.203.189.206.list.dnswl.org : 127.0.6.0]; IP_SCORE(0.31)[asn: 14061(1.60), country: US(-0.06)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; ASN(0.00)[asn:14061, ipnet:206.189.192.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Apr 2019 15:59:43 -0000 On Apr 22, 2019, at 10:32 AM, Wojciech Puchar wrote: >=20 >>> well it has to cooperate with multitude of clients like windoze, >>> point&click routers etc. that's why openvpn. >>=20 >> Windows has stock support for IPSec with and without L2TP and has no = stock openvpn, so IPSec is more preferable. >=20 > can IPSEC VPN work over nat? even freebsd-freebsd case. >=20 > I cannot find any tutorial how to do this. -ish You must forward udp/4500 to the host and IPSec will negotiate a tunnel = successfully. https://tools.ietf.org/html/rfc3947 = -- Louis Kowolowski louisk@cryptomonkeys.org = Cryptomonkeys: = http://www.cryptomonkeys.com/ Making life more interesting for people since 1977 From owner-freebsd-hackers@freebsd.org Mon Apr 22 19:54:04 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45113158120F for ; Mon, 22 Apr 2019 19:54:04 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: from puchar.net (puchar.net [194.1.144.90]) (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 11756746EA for ; Mon, 22 Apr 2019 19:54:02 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: Received: from 127.0.0.1 (localhost [127.0.0.1]) by puchar.net (8.15.2/8.15.2) with ESMTPS id x3MJrjtt030260 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 22 Apr 2019 21:53:45 +0200 (CEST) (envelope-from puchar-wojtek@puchar.net) Received: from localhost (puchar-wojtek@localhost) by puchar.net (8.15.2/8.15.2/Submit) with ESMTP id x3MJrjiu030257; Mon, 22 Apr 2019 21:53:45 +0200 (CEST) (envelope-from puchar-wojtek@puchar.net) Date: Mon, 22 Apr 2019 21:53:45 +0200 (CEST) From: Wojciech Puchar To: Louis Kowolowski cc: Wojciech Puchar , Eugene Grosbein , freebsd-hackers@freebsd.org Subject: Re: openvpn and system overhead In-Reply-To: <25566D0F-72DF-4EF1-8900-8DD611D03B33@cryptomonkeys.org> Message-ID: References: <0cc6e0ac-a9a6-a462-3a1e-bfccfd41e138@grosbein.net> <5CBAB88C.4020402@grosbein.net> <25566D0F-72DF-4EF1-8900-8DD611D03B33@cryptomonkeys.org> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 X-Rspamd-Queue-Id: 11756746EA X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of wojtek@puchar.net designates 194.1.144.90 as permitted sender) smtp.mailfrom=wojtek@puchar.net X-Spamd-Result: default: False [-5.68 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/mixed,text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[puchar.net]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[puchar.net]; CTYPE_MIXED_BOGUS(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[90.144.1.194.list.dnswl.org : 127.0.10.0]; NEURAL_HAM_SHORT(-0.87)[-0.871,0]; IP_SCORE(-3.50)[ip: (-9.25), ipnet: 194.1.144.0/24(-4.63), asn: 43476(-3.70), country: PL(0.07)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; ASN(0.00)[asn:43476, ipnet:194.1.144.0/24, country:PL]; MID_RHS_MATCH_FROM(0.00)[] Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Apr 2019 19:54:04 -0000 > can IPSEC VPN work over nat? even freebsd-freebsd case. > > I cannot find any tutorial how to do this. > > > -ishYou must forward udp/4500 to the host and IPSec will negotiate a tunnel successfully. usually i cannot do it when being over nat that isn't under my control From owner-freebsd-hackers@freebsd.org Tue Apr 23 03:02:40 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3995D158B515 for ; Tue, 23 Apr 2019 03:02:40 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13::5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "eg.sd.rdtc.ru", Issuer "eg.sd.rdtc.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 336078B12C for ; Tue, 23 Apr 2019 03:02:28 +0000 (UTC) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: freebsd-hackers@freebsd.org Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id x3N32JB6006038; Tue, 23 Apr 2019 10:02:19 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: openvpn and system overhead To: Wojciech Puchar References: <0cc6e0ac-a9a6-a462-3a1e-bfccfd41e138@grosbein.net> <5CBAB88C.4020402@grosbein.net> Cc: freebsd-hackers@freebsd.org From: Eugene Grosbein Message-ID: <5CBE803B.8060505@grosbein.net> Date: Tue, 23 Apr 2019 10:02:19 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 336078B12C X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [0.15 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.38)[-0.382,0]; MX_INVALID(0.50)[greylisted]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.43)[0.429,0]; NEURAL_HAM_LONG(-0.30)[-0.298,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[grosbein.net]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_PERMFAIL(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; IP_SCORE(0.00)[country: RU(0.00)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:29072, ipnet:2a03:3100::/32, country:RU]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Apr 2019 03:02:40 -0000 On 22.04.2019 22:32, Wojciech Puchar wrote: >>> well it has to cooperate with multitude of clients like windoze, >>> point&click routers etc. that's why openvpn. >> >> Windows has stock support for IPSec with and without L2TP and has no stock openvpn, so IPSec is more preferable. > > can IPSEC VPN work over nat? even freebsd-freebsd case. > > I cannot find any tutorial how to do this. FreeBSD 11.1 and later supports IPSec NAT Traversal out-of-the-box. From owner-freebsd-hackers@freebsd.org Tue Apr 23 03:04:56 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5E84158BAC1 for ; Tue, 23 Apr 2019 03:04:53 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13::5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "eg.sd.rdtc.ru", Issuer "eg.sd.rdtc.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AC11C8BA02 for ; Tue, 23 Apr 2019 03:04:45 +0000 (UTC) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: freebsd-hackers@freebsd.org Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id x3N33M9n006063; Tue, 23 Apr 2019 10:03:22 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: openvpn and system overhead To: Louis Kowolowski , Wojciech Puchar References: <0cc6e0ac-a9a6-a462-3a1e-bfccfd41e138@grosbein.net> <5CBAB88C.4020402@grosbein.net> <25566D0F-72DF-4EF1-8900-8DD611D03B33@cryptomonkeys.org> Cc: freebsd-hackers@freebsd.org From: Eugene Grosbein Message-ID: <5CBE8079.1000704@grosbein.net> Date: Tue, 23 Apr 2019 10:03:21 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <25566D0F-72DF-4EF1-8900-8DD611D03B33@cryptomonkeys.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: AC11C8BA02 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [0.16 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.22)[-0.220,0]; MX_INVALID(0.50)[cached]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-0.76)[-0.757,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[grosbein.net]; NEURAL_SPAM_SHORT(0.73)[0.733,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_PERMFAIL(0.00)[]; IP_SCORE(0.00)[country: RU(0.00)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:29072, ipnet:2a03:3100::/32, country:RU]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Apr 2019 03:04:56 -0000 On 22.04.2019 22:58, Louis Kowolowski wrote: > On Apr 22, 2019, at 10:32 AM, Wojciech Puchar wrote: >> >>>> well it has to cooperate with multitude of clients like windoze, >>>> point&click routers etc. that's why openvpn. >>> >>> Windows has stock support for IPSec with and without L2TP and has no stock openvpn, so IPSec is more preferable. >> >> can IPSEC VPN work over nat? even freebsd-freebsd case. >> >> I cannot find any tutorial how to do this. > > -ish > You must forward udp/4500 to the host and IPSec will negotiate a tunnel successfully. > > https://tools.ietf.org/html/rfc3947 No need to forward anything for client side. From owner-freebsd-hackers@freebsd.org Tue Apr 23 11:15:31 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0DF31596BD6 for ; Tue, 23 Apr 2019 11:15:31 +0000 (UTC) (envelope-from mindal@semihalf.com) Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 61E646CD0A for ; Tue, 23 Apr 2019 11:15:30 +0000 (UTC) (envelope-from mindal@semihalf.com) Received: by mail-qt1-x82d.google.com with SMTP id b3so658371qtc.12 for ; Tue, 23 Apr 2019 04:15:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=rIo6h1W9jSAYJ7TSr2szMI0TdIhMDJcyMj+l/D5AYA8=; b=oUtxAT1CfdFKQWGL70YLjgyFlgIcr0Fba8BGsDCIzTAZNWGgyuoS6O8SFwDoAEoHFF JoK3W+gaterup+1VA+oROeShj9XmokyoZPaxR/xWVyNeUNViBluicCdr1Ymb9YCe9Z20 SsmRrLKuSmVCLsmcGTAdTprvtRDfWtszMWKGh5vOQRRZFR0muKJ5UQTVlkwwKV+VV0o5 J3ZHHqieiznUuZdys13GBwDDqJ6s0v6QHVrtvIHYLxxJFPbN7CAh1OlbXqSXR4JHSjaI y4rXVGyvk6JzRV6cwEOMIFlsuMvuP83LlV5RK2CLnZfOvXzhpA+oe5RLwkmVCuQpXLUT e6tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=rIo6h1W9jSAYJ7TSr2szMI0TdIhMDJcyMj+l/D5AYA8=; b=dn5ldUQyPjHWIlW1YSUgtxgmxK8iG908pwS39O+IvCYOULNJu7E5NWfdlPvU5CemIY eOj7Z1i6+nMSBWWs2j7HZW2hYOBtGwsNE/vV0JLc2pY9B1cUvKSDQIUb9SFeV8m13UNr 5vWUOTLCfXRHl8uV4+ZKVBGWw4sc7spMNDwmLZ+NI7gsjRlS9My4qDDtnwK6OcKyHY4J Y75+vCylygoutRGpLiRd5mRedOpGLX870xmjTS7gv3l2fSl1ZOmbtlDup8WYaRsLnLAg OXWcj/BchVHgDXXTAsuPhDNPUfQTP92sB1O7tNN39TPyFSRmUlgcvYwWBbZJe8gmtwcQ INQg== X-Gm-Message-State: APjAAAUGBVJjisQdy3qLZO1+aeGlUcFhkYb9XJK2rX0/71wiE2PrzUN+ APidWLvmILd8FoWkiSwb4/GLb5X4UypiLjTrmXEKFyzXZ4g= X-Google-Smtp-Source: APXvYqzZI7+6J2XSuZahuuMIUETercVo87V7KM5rWC446VTcPIUDzPNBl6hqaSSrIsrQi+wx9issCsSi7NsMCLnhv1E= X-Received: by 2002:ac8:fc8:: with SMTP id f8mr19735646qtk.214.1556018129679; Tue, 23 Apr 2019 04:15:29 -0700 (PDT) MIME-Version: 1.0 From: =?UTF-8?Q?Kornel_Dul=C4=99ba?= Date: Tue, 23 Apr 2019 13:15:18 +0200 Message-ID: Subject: W^X support in FreeBSD To: freebsd-hackers@freebsd.org X-Rspamd-Queue-Id: 61E646CD0A X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=oUtxAT1C X-Spamd-Result: default: False [-6.17 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[semihalf-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[semihalf.com]; DKIM_TRACE(0.00)[semihalf-com.20150623.gappssmtp.com:+]; MX_GOOD(-0.01)[ASPMX2.GOOGLEMAIL.com,ALT2.ASPMX.L.GOOGLE.com,ASPMX.L.GOOGLE.com,ALT1.ASPMX.L.GOOGLE.com,ASPMX3.GOOGLEMAIL.com]; RCVD_IN_DNSWL_NONE(0.00)[d.2.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(-2.90)[ip: (-9.08), ipnet: 2607:f8b0::/32(-3.11), asn: 15169(-2.25), country: US(-0.06)] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Apr 2019 11:15:32 -0000 Hello, After doing some research I've noticed that FBSD is pretty much the only *BSD system without support for some sort of W^X policy. Also said policy is implemented in HardenedBSD which looks pretty much similar to FBSD. Would there be interest in reviewing/merging a patch that imports W^X (PAGEEXEC and MPROTECT) from HardenedBSD? I suppose that it would have to be disabled by default, as it breaks some things such as JIT. Regards Kornel Dul=C4=99ba From owner-freebsd-hackers@freebsd.org Tue Apr 23 11:40:45 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC7E01597385 for ; Tue, 23 Apr 2019 11:40:45 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::600]) (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 14DF86D7D1 for ; Tue, 23 Apr 2019 11:40:43 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from mxback3g.mail.yandex.net (mxback3g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:164]) by forward100o.mail.yandex.net (Yandex) with ESMTP id C4F5A4AC0F33; Tue, 23 Apr 2019 14:40:39 +0300 (MSK) Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [2a02:6b8:0:1a2d::25]) by mxback3g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id zIpuBhlx96-edZ0b7A2; Tue, 23 Apr 2019 14:40:39 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1556019639; bh=h1G+hZsSNIeCVpB5pu+QuHJsQmdUbjye2YKjpYvuhTo=; h=In-Reply-To:From:To:Subject:Cc:Date:References:Message-ID; b=Y6WxkES8JxEHJHPNAtAcV/BGfLrJd8pnQEmt9P641zhmaou1TjWOIQ4j8qHHUVPmd +Kz2gTXlTGJpIku65VhiXa/0ca0cH77e3NAycCFyqG8SlNeDHmANR627VYtS6Boopq jCW6HVwmWBarVB79GJcD0b364bIDq4alArETkPaM= Received: by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id NSqJB9FMt4-ebjubl7o; Tue, 23 Apr 2019 14:40:38 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) Subject: Re: openvpn and system overhead To: Jim Thompson , Wojciech Puchar Cc: Mark Millard via freebsd-hackers , Miroslav Lachman <000.fbsd@quip.cz> References: <8648d069-2172-2c09-8e59-d66a8265a120@quip.cz> <94EA4F3F-4D78-4E08-9AF8-441B957A4749@netgate.com> From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Autocrypt: addr=bu7cher@yandex.ru; prefer-encrypt=mutual; keydata= mQENBEwBF1kBCADB9sXFhBEUy8qQ4X63Y8eBatYMHGEFWN9ypS5lI3RE6qQW2EYbxNk7qUC5 21YIIS1mMFVBEfvR7J9uc7yaYgFCEb6Sce1RSO4ULN2mRKGHP3/Sl0ijZEjWHV91hY1YTHEF ZW/0GYinDf56sYpDDehaBF5wkWIo1+QK5nmj3vl0DIDCMNd7QEiWpyLVwECgLX2eOAXByT8B bCqVhJGcG6iFP7/B9Ll6uX5gb8thM9LM+ibwErDBVDGiOgvfxqidab7fdkh893IBCXa82H9N CNwnEtcgzh+BSKK5BgvPohFMgRwjti37TSxwLu63QejRGbZWSz3OK3jMOoF63tCgn7FvABEB AAG0JUFuZHJleSBWLiBFbHN1a292IDxidTdjaGVyQHlhbmRleC5ydT6JATgEEwECACIFAkwB F1kCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEAHF6gQQyKF6qmYIAI6ekfm1VA4T vqankI1ISE6ku4jV7UlpIQlEbE7/8n3Zd6teJ+pGOQhN5qk8QE7utdPdbktAzi+x7LIJVzUw 4TywZLXGrkP7VKYkfg6oyCGyzITghefQeJtr2TN4hYCkzPWpylkue8MtmqfZv/6royqwTbN+ +E09FQNvTgRUYJYTeQ1qOsxNRycwvw3dr2rOfuxShbzaHBB1pBIjGrMg8fC5pd65ACH5zuFV A0CoTNGMDrEZSfBkTW604UUHFFXeCoC3dwDZRKOWJ3GmMXns65Ai5YkA63BSHEE1Qle3VBhd cG1w0CB5FBV3pB27UVnf0jEbysrDqW4qN7XMRFSWNAy5AQ0ETAEXWQEIAJ2p6l9LBoqdH/0J PEFDY2t2gTvAuzz+8zs3R03dFuHcNbOwjvWCG0aOmVpAzkRa8egn5JB4sZaFUtKPYJEQ1Iu+ LUBwgvtXf4vWpzC67zs2dDuiW4LamH5p6xkTD61aHR7mCB3bg2TUjrDWn2Jt44cvoYxj3dz4 S49U1rc9ZPgD5axCNv45j72tggWlZvpefThP7xT1OlNTUqye2gAwQravXpZkl5JG4eOqJVIU X316iE3qso0iXRUtO7OseBf0PiVmk+wCahdreHOeOxK5jMhYkPKVn7z1sZiB7W2H2TojbmcK HZC22sz7Z/H36Lhg1+/RCnGzdEcjGc8oFHXHCxUAEQEAAYkBHwQYAQIACQUCTAEXWQIbDAAK CRABxeoEEMihegkYCAC3ivGYNe2taNm/4Nx5GPdzuaAJGKWksV+w9mo7dQvU+NmI2az5w8vw 98OmX7G0OV9snxMW+6cyNqBrVFTu33VVNzz9pnqNCHxGvj5dL5ltP160JV2zw2bUwJBYsgYQ WfyJJIM7l3gv5ZS3DGqaGIm9gOK1ANxfrR5PgPzvI9VxDhlr2juEVMZYAqPLEJe+SSxbwLoz BcFCNdDAyXcaAzXsx/E02YWm1hIWNRxanAe7Vlg7OL+gvLpdtrYCMg28PNqKNyrQ87LQ49O9 50IIZDOtNFeR0FGucjcLPdS9PiEqCoH7/waJxWp6ydJ+g4OYRBYNM0EmMgy1N85JJrV1mi5i Message-ID: <86f267de-0edc-ec34-6c46-d087e86a34c1@yandex.ru> Date: Tue, 23 Apr 2019 14:39:10 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <94EA4F3F-4D78-4E08-9AF8-441B957A4749@netgate.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="a1OaN7DaIXPHprHcgTiFdsnJuTVuFRbcj" X-Rspamd-Queue-Id: 14DF86D7D1 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yandex.ru header.s=mail header.b=Y6WxkES8; dmarc=pass (policy=none) header.from=yandex.ru; spf=pass (mx1.freebsd.org: domain of bu7cher@yandex.ru designates 2a02:6b8:0:1a2d::600 as permitted sender) smtp.mailfrom=bu7cher@yandex.ru X-Spamd-Result: default: False [-5.92 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a02:6b8:0:1a2d::/64]; FREEMAIL_FROM(0.00)[yandex.ru]; HAS_ATTACHMENT(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yandex.ru:+]; MX_GOOD(-0.01)[mx.yandex.ru,mx.yandex.ru,mx.yandex.ru,mx.yandex.ru,mx.yandex.ru]; DMARC_POLICY_ALLOW(-0.50)[yandex.ru,none]; NEURAL_HAM_SHORT(-0.71)[-0.709,0]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:+]; FREEMAIL_ENVFROM(0.00)[yandex.ru]; RCVD_IN_DNSWL_LOW(-0.10)[0.0.6.0.0.0.0.0.0.0.0.0.0.0.0.0.d.2.a.1.0.0.0.0.8.b.6.0.2.0.a.2.list.dnswl.org : 127.0.5.1]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yandex.ru.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[yandex.ru:s=mail]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.20)[multipart/signed,multipart/mixed,text/plain]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Apr 2019 11:40:46 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --a1OaN7DaIXPHprHcgTiFdsnJuTVuFRbcj Content-Type: multipart/mixed; boundary="2c8cyYmu0Lx0KSbLwR5MxPi9QqZI8qNbA"; protected-headers="v1" From: "Andrey V. Elsukov" To: Jim Thompson , Wojciech Puchar Cc: Mark Millard via freebsd-hackers , Miroslav Lachman <000.fbsd@quip.cz> Message-ID: <86f267de-0edc-ec34-6c46-d087e86a34c1@yandex.ru> Subject: Re: openvpn and system overhead References: <8648d069-2172-2c09-8e59-d66a8265a120@quip.cz> <94EA4F3F-4D78-4E08-9AF8-441B957A4749@netgate.com> In-Reply-To: <94EA4F3F-4D78-4E08-9AF8-441B957A4749@netgate.com> --2c8cyYmu0Lx0KSbLwR5MxPi9QqZI8qNbA Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 17.04.2019 21:09, Jim Thompson wrote: > and twice the number of context switches. Making things worse, the > =E2=80=9CIP stack=E2=80=9D inside OpenVPN is single-threaded, and proce= sses one > packet at a time, so all the overheads accrue to each packet, rather > than being amortized across several packets. Hi, Have you thought to hack openvpn to use SO_REUSEPORT_LB and then run several processes to service several tunnels? --=20 WBR, Andrey V. Elsukov --2c8cyYmu0Lx0KSbLwR5MxPi9QqZI8qNbA-- --a1OaN7DaIXPHprHcgTiFdsnJuTVuFRbcj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAly++V4ACgkQAcXqBBDI oXrHJAf/fiBc+s7jLm8wsPVAee+oD5YraKVscrWXq5EL+Niwd09a2GmFj8805Bc4 RBHlE6IOpLu0FhW8iLf0y1kqN2/QB1MNir2moC1Umz3XQnZe/TXfeIPJNoVSxIlM iMjxaoKnoxDJWuARLMI1yZEExkm9mFKegn0yB2dFFBuWOYyZbIJrUbRJfo1LOgoX t+LNj7XBGIrcmW2p8qqGWELnYeWEz9dMtUIxd3is2qdbeXOxtnHhN09uDgRf7bXf zEXhdR6KU+Ei54S/1+TM1wgehb8VLdaEOd1WIuihw/0drwO9f6qGd+7zvx38vvTU SXFRN3BNEixWAEin3IDVlhNXIazNPg== =Fb8C -----END PGP SIGNATURE----- --a1OaN7DaIXPHprHcgTiFdsnJuTVuFRbcj-- From owner-freebsd-hackers@freebsd.org Tue Apr 23 13:12:56 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D7F1159A55B for ; Tue, 23 Apr 2019 13:12:56 +0000 (UTC) (envelope-from m.bryn1u@gmail.com) Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 19C0B718A7 for ; Tue, 23 Apr 2019 13:12:55 +0000 (UTC) (envelope-from m.bryn1u@gmail.com) Received: by mail-lj1-x231.google.com with SMTP id f18so13439952lja.10 for ; Tue, 23 Apr 2019 06:12:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pbHu3kXasXfQ1AJlRB7kyVMH4V/DXw7IM5Up4bY77c0=; b=jsEGB/jiY9hZ0ApQD5rPbJTC9xWpo4DsE/qRQYDfQsA5fLerkRdcn5JDe+eza16k7U fILxEu8X2XbsHQtr+CHmRSfy92woLwnAk9XivPUqIjsXzCKhcWA55nJw6glgZQlBO0K1 +BrErzECFwuVXiqU+Wk4iESM3zgRmpo4v2Kvm5L/vhYF79UybXku8nSeN0OpVMSnEc48 tysQyqoa24S2l+ShdZkqsRGvj+fvIgIO/Mz+Bt3LJrK5/VUoGdpz85TCRcFnGaTdfNHK +DP3jm++bBFRiE6UnJgMXw1r3y8gjluMACq7Ui1hl04kMZGDxYrAfVLaG7XtSU6YHtFl ZIxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pbHu3kXasXfQ1AJlRB7kyVMH4V/DXw7IM5Up4bY77c0=; b=SMwU3uPwOYoDB1cCSJ9HVbe8Wp1jZ5TkpTBifmlYVznOcyxMlUBC6pnHyrdqZqKH6g ijOx9zLuSISmy/fcrupueFiRopruNQa8/BsCpd6NcM20l/xuvhzmvU+/VhD4EcRDusmJ ybbVTjf9QDQdZ+SMVOIv4Jqi0cGJMv2d2oMpcLYyQvxHP0rE9bS7bbRCvF6aYUBJvuVo fLZkQb0rMdX7lB4p5h/cN+yFugmCHzHda7M6RzswdUUZGwa4o+IqH2zF9QNe4oeGCUZl sZLlgWMXVxl46CmonY3Mn6wIzbOqHDcStvrKRHRNI1hnZNNgGLuJ+5JlQl5r2Kx8pY0K MsgQ== X-Gm-Message-State: APjAAAV3pM8PMPKKvFCQjgZlVYtENvOU3vdmiKOxkifLB83vhUH+pHvs 37k8pcGv3oPhFt9R6swhILkEhZBe+QZkrwtQA174pA== X-Google-Smtp-Source: APXvYqyc7FeX4sLtfpQPhoOZkW3OZXqOq0TZLN6rSU8WjYGn2O7fE4L5ozRrBoon/gEBFutZmY7j5BK0evCip6V5Teg= X-Received: by 2002:a2e:5301:: with SMTP id h1mr13340345ljb.196.1556025173558; Tue, 23 Apr 2019 06:12:53 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: bryn1u85 Date: Tue, 23 Apr 2019 15:12:42 +0200 Message-ID: Subject: Re: W^X support in FreeBSD To: =?UTF-8?Q?Kornel_Dul=C4=99ba?= Cc: FreeBSD Hackers X-Rspamd-Queue-Id: 19C0B718A7 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=jsEGB/ji; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mbryn1u@gmail.com designates 2a00:1450:4864:20::231 as permitted sender) smtp.mailfrom=mbryn1u@gmail.com X-Spamd-Result: default: False [-6.78 / 15.00]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.94)[-0.941,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[1.3.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(-2.83)[ip: (-9.45), ipnet: 2a00:1450::/32(-2.37), asn: 15169(-2.26), country: US(-0.06)]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Apr 2019 13:12:56 -0000 Hey Kornel, Im just curious why just don't u use HardenedBSD instead FreeBSD ? Either HardenedBSD has ports hardened including fstack-protector-all, SafeStack and Control Flow Integrity wt., 23 kwi 2019 o 13:18 Kornel Dul=C4=99ba napisa=C5= =82(a): > Hello, > > After doing some research I've noticed that FBSD is pretty much the only > *BSD system without support for some sort of W^X policy. > Also said policy is implemented in HardenedBSD which looks pretty much > similar to FBSD. > Would there be interest in reviewing/merging a patch that imports W^X > (PAGEEXEC and MPROTECT) from HardenedBSD? > I suppose that it would have to be disabled by default, as it breaks some > things such as JIT. > > Regards > Kornel Dul=C4=99ba > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= " > From owner-freebsd-hackers@freebsd.org Wed Apr 24 21:19:06 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C869E1581A08 for ; Wed, 24 Apr 2019 21:19:06 +0000 (UTC) (envelope-from leres@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6A1B381A19 for ; Wed, 24 Apr 2019 21:19:06 +0000 (UTC) (envelope-from leres@freebsd.org) Received: from ice.alameda.xse.com (unknown [IPv6:2001:558:6045:10:9084:9e0:4b6d:eb99]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: leres) by smtp.freebsd.org (Postfix) with ESMTPSA id 158802EC90 for ; Wed, 24 Apr 2019 21:19:06 +0000 (UTC) (envelope-from leres@freebsd.org) To: FreeBSD Hackers From: Craig Leres Subject: mmc/sdhci controller boot timeouts with no media with an intel nuc Message-ID: <0c47087d-03fe-5e16-1e6d-9f4f715e2b39@freebsd.org> Date: Wed, 24 Apr 2019 14:19:04 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 6A1B381A19 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Apr 2019 21:19:06 -0000 I have a NUC6i3SYH that takes a couple of extra of minutes to boot (11.2-RELEASE) due a controller timeout loop that executes 16 times (with ~10 second delays in between): sdhci_pci0-slot0: Controller timeout sdhci_pci0-slot0: ============== REGISTER DUMP ============== sdhci_pci0-slot0: Sys addr: 0x00000000 | Version: 0x00001002 sdhci_pci0-slot0: Blk size: 0x00000000 | Blk cnt: 0x00000000 sdhci_pci0-slot0: Argument: 0x00000000 | Trn mode: 0x00000000 sdhci_pci0-slot0: Present: 0x00020001 | Host ctl: 0x00000001 sdhci_pci0-slot0: Power: 0x0000000e | Blk gap: 0x00000080 sdhci_pci0-slot0: Wake-up: 0x00000000 | Clock: 0x0000fa07 sdhci_pci0-slot0: Timeout: 0x00000000 | Int stat: 0x00000000 sdhci_pci0-slot0: Int enab: 0x01ff003b | Sig enab: 0x01ff003b sdhci_pci0-slot0: AC12 err: 0x00000000 | Host ctl2:0x00000000 sdhci_pci0-slot0: Caps: 0x7568c881 | Caps2: 0x00000807 sdhci_pci0-slot0: Max curr: 0x00000000 | ADMA err: 0x00000000 sdhci_pci0-slot0: ADMA addr:0x00000000 | Slot int: 0x00000000 which wraps up with: mmc0: No compatible cards found on bus And indeed the sd card slot is empty. I was able to disable this code by adding: hint.mmc.0.disabled="1" hint.sdhci.0.disabled="1" to loader.conf. What would it take to improve the default behavior? From what I remember sd connectors usually have a media present switch, is the problem that our drivers don't know how to test for this specific system? Craig From owner-freebsd-hackers@freebsd.org Wed Apr 24 22:51:43 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA06A15835F8; Wed, 24 Apr 2019 22:51:42 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.182]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C7196845C2; Wed, 24 Apr 2019 22:51:41 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: by mail-qt1-f182.google.com with SMTP id s10so11529878qtc.11; Wed, 24 Apr 2019 15:51:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=a57Dci7FSAQyj5x1MdMiH6s7VJTq9V0SSnKlBnKeCb8=; b=asfubNh11wR/p6QgBw0aNk+3yZcGVpNs3uLhhp30sHtym16/ug0d5nsSchwLALTCHf K430QKPqgz0dqt/PZBqmd5FESYmarOldtxIgdx3Og/ic80Jcr8RFVECOD4Dt5pm/C4o/ ZtDLFlQ6alNO3daTtdRAy+sIJlhdnUa+LPSIa23agw7CJwUWdn570t1k2WVhDq8ADCV5 HwseyEdRKDHD7ECpjct7bzv67xRZJCeSClRDiWCWrRej1FAKP2d4+22o29D6RGwnlQC0 FuITw7ixlMFUnAAfT6q6g2XhdTPNI5EQp63NwJF+jgusbCxbflUTGqpDxIDkY1URV7iC /hLA== X-Gm-Message-State: APjAAAVT79BWWhEugAbvPEmJsPiP0BK3SLTym8p1GuKo1YJ16aa5gbSn Sx5REIBvP/IMos7ijY8jGqRdR++mJUA= X-Google-Smtp-Source: APXvYqz3t46XYNnmDf6KsirJg4Tcocm9DyX5+bUZR6oOz7TlTdzR340KOpoP1YTIfkEf34PBBRaNsQ== X-Received: by 2002:a0c:fd28:: with SMTP id i8mr2185833qvs.99.1556142665940; Wed, 24 Apr 2019 14:51:05 -0700 (PDT) Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com. [209.85.222.182]) by smtp.gmail.com with ESMTPSA id y64sm11269421qkd.71.2019.04.24.14.51.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Apr 2019 14:51:05 -0700 (PDT) Received: by mail-qk1-f182.google.com with SMTP id w20so11837697qka.7; Wed, 24 Apr 2019 14:51:05 -0700 (PDT) X-Received: by 2002:a37:84c2:: with SMTP id g185mr17782065qkd.183.1556142665405; Wed, 24 Apr 2019 14:51:05 -0700 (PDT) MIME-Version: 1.0 From: Mateusz Piotrowski <0mp@freebsd.org> Date: Wed, 24 Apr 2019 23:50:53 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Call for 2019Q1 quarterly status reports (deadline on April 30) To: FreeBSD Hackers , FreeBSD Current Cc: Edward Tomasz Napierala X-Rspamd-Queue-Id: C7196845C2 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of mpp302@gmail.com designates 209.85.160.182 as permitted sender) smtp.mailfrom=mpp302@gmail.com X-Spamd-Result: default: False [-4.67 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[freebsd.org]; URI_COUNT_ODD(1.00)[5]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[4]; IP_SCORE(-2.73)[ip: (-7.43), ipnet: 209.85.128.0/17(-3.88), asn: 15169(-2.26), country: US(-0.06)]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.93)[-0.931,0]; RCVD_IN_DNSWL_NONE(0.00)[182.160.85.209.list.dnswl.org : 127.0.5.0]; FORGED_SENDER(0.30)[0mp@freebsd.org,mpp302@gmail.com]; MIME_TRACE(0.00)[0:+,1:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[0mp@freebsd.org,mpp302@gmail.com] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Apr 2019 22:51:43 -0000 Dear FreeBSD Community, The deadline for the next FreeBSD Quarterly Status update is April 30, 2019, for work done since the last round of Quarterly Reports: January, 2019 =E2=80=93 March, 2019. Status report submissions do not need to be very long. They may be about anything happening in the FreeBSD project and community, and provide a great way to inform FreeBSD users and developers about work that is underway and completed. Submission of reports is not restricted to committers; anyone doing anything interesting and FreeBSD related can -- and should -- write one! The preferred method is to follow the guidelines at the Quarterly GitHub repository: https://github.com/freebsd/freebsd-quarterly Alternatively you can fetch the Markdown template, fill it in, and email it to quarterly@FreeBSD.org. The template can be found at: https://raw.githubusercontent.com/freebsd/freebsd-quarterly /master/report-sample.md The old XML generator and templates are no longer used. We look forward to seeing your 2019Q1 reports! Cheers, Mateusz (on behalf of quarterly@) From owner-freebsd-hackers@freebsd.org Fri Apr 26 03:39:04 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B8B215871C2 for ; Fri, 26 Apr 2019 03:39:04 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2ED4880A1D for ; Fri, 26 Apr 2019 03:39:03 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf1-f41.google.com with SMTP id t11so1219729lfl.12 for ; Thu, 25 Apr 2019 20:39:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=cWXcO6Xi6mRZKZofmewST1sa6Rr2B/jXWhnxA7UElH4=; b=qJRf5u4t3Km0ILLubdJr5nJ+tg8a3K+qNRVWaqjK8K+BfdzBTIwdjn7/VNUz9Bcy/a 7sI6DoXv+mFS7Zdu8Lw0PDFa5Kb8YXbLDY1pvD/9O4X1vBf8YpCqRzDGwbxWmsXbdI99 cz3M3hQTdD7ubJE925/jw2bI/eDNhkg5SSK+sRDtx2tZn5lEB80FsxBJknoawku0vjAu IxlzvnPy/i7dMqxt+8eZuuo/Boxx6735/kCEDoQQFfaNAX+nXp1tkntfJD5T8DQNnu7e yB1F5Ot7v8sUM4bX4KiqIMwWUjTO3mjPymXzYBZfFGl3bs4H4MRURwNvHHJ+czY/Uc+t q8QQ== X-Gm-Message-State: APjAAAVsHEMQ6uLIeaOvHIHE9lgYLYbfiwdRVU1bdZz6oet5ZYLITxet yJCkV+4fPSNf46ObY6i2knJH7t94Bw3xnoedA5G7cTG0BME= X-Google-Smtp-Source: APXvYqx9jImepIPEMqhGRuMdCYynbREKSoBOrhEPzY9YDn9jM/5ejr4HkErsTquegzYCcQo/wd2ppu65edFeWlsOn3o= X-Received: by 2002:ac2:51a1:: with SMTP id f1mr14474252lfk.129.1556249506603; Thu, 25 Apr 2019 20:31:46 -0700 (PDT) MIME-Version: 1.0 From: Alan Somers Date: Thu, 25 Apr 2019 21:31:35 -0600 Message-ID: Subject: buf(9) woes: when does bcopy do nothing at all? To: FreeBSD Hackers Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 2ED4880A1D X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.167.41 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-3.29 / 15.00]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.94)[-0.936,0]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; TO_DOM_EQ_FROM_DOM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; SUBJECT_ENDS_QUESTION(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[41.167.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-1.34)[ip: (-0.51), ipnet: 209.85.128.0/17(-3.88), asn: 15169(-2.25), country: US(-0.06)]; RWL_MAILSPIKE_POSSIBLE(0.00)[41.167.85.209.rep.mailspike.net : 127.0.0.17]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Apr 2019 03:39:04 -0000 How is it possible that bcopy() doesn't affect its output array at all? While investigating a data corruption issue in fuse, I narrowed the problem down to a bcopy operation that apparently has no affect. The code in question is: bcopy(cp, iov->iov_base, cnt); r = memcmp(cp, iov->iov_base, cnt); if (r) printf("uiomove: miscompare\n"); Rationally, I would expect that line never to be printed. But it does. The destination is always all zeros, even though the source is not. I can only guess that there's something wrong about the way that I I'm using buf(9), because the output is part of a buffer allocated by bread(9). I've been able to rule out: 1) Race conditions. The bug is 100% reproducible, and doubling the bcopy or changing the timing in other ways has no effect. 2) Unmapped buffer. I verified that the buf is not unmapped_buf. 3) Overlapping src and dst 4) Duplicated pages. I verified that each of the buf's pages has a unique physical address 5) Bad RAM. My machine passes memtest86, and anyway the failure is too specific and reproducible to be caused by bad hardware. What could I be missing? Do I need to do something to prepare the buf before I can use it? The code that allocates the buffer is here: https://svnweb.freebsd.org/base/projects/fuse2/sys/fs/fuse/fuse_io.c?view=markup#l240 -Alan From owner-freebsd-hackers@freebsd.org Fri Apr 26 08:33:04 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9607D158D0AC for ; Fri, 26 Apr 2019 08:33:04 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 411F789258; Fri, 26 Apr 2019 08:33:02 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (v-critter.freebsd.dk [192.168.55.3]) by phk.freebsd.dk (Postfix) with ESMTP id 1AC73202562B; Fri, 26 Apr 2019 08:32:56 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.15.2/8.15.2) with ESMTPS id x3Q8Wtvq023440 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 26 Apr 2019 08:32:55 GMT (envelope-from phk@critter.freebsd.dk) Received: (from phk@localhost) by critter.freebsd.dk (8.15.2/8.15.2/Submit) id x3Q8WtnR023439; Fri, 26 Apr 2019 08:32:55 GMT (envelope-from phk) To: Alan Somers cc: FreeBSD Hackers Subject: Re: buf(9) woes: when does bcopy do nothing at all? In-reply-to: From: "Poul-Henning Kamp" References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <23437.1556267575.1@critter.freebsd.dk> Content-Transfer-Encoding: quoted-printable Date: Fri, 26 Apr 2019 08:32:55 +0000 Message-ID: <23438.1556267575@critter.freebsd.dk> X-Rspamd-Queue-Id: 411F789258 X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [4.64 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.88)[0.879,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.dk]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.39)[0.387,0]; RCVD_COUNT_THREE(0.00)[4]; IP_SCORE(0.08)[ip: (0.15), ipnet: 130.225.0.0/16(0.07), asn: 1835(0.20), country: EU(-0.01)]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[phk.freebsd.dk]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_SPAM_LONG(1.00)[0.998,0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[phk@phk.freebsd.dk,phk@critter.freebsd.dk]; RCVD_NO_TLS_LAST(0.10)[]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:1835, ipnet:130.225.0.0/16, country:EU]; SUBJECT_ENDS_QUESTION(1.00)[]; FROM_NEQ_ENVFROM(0.00)[phk@phk.freebsd.dk,phk@critter.freebsd.dk] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Apr 2019 08:33:04 -0000 -------- In message , Alan Somers writes: >How is it possible that bcopy() doesn't affect its output array at all? That conclusion does not follow from your example: >bcopy(cp, iov->iov_base, cnt); >r =3D memcmp(cp, iov->iov_base, cnt); >if (r) > printf("uiomove: miscompare\n"); If [cp:cp+cnt] and [iov_base:iov_base+cnt] overlap the bcopy result is undefined. Try memmove instead ? -- = 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-hackers@freebsd.org Fri Apr 26 08:35:43 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE93D158D31C for ; Fri, 26 Apr 2019 08:35:43 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (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 980238948F; Fri, 26 Apr 2019 08:35:42 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [176.74.212.121]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 69F52260240; Fri, 26 Apr 2019 10:35:35 +0200 (CEST) Subject: Re: buf(9) woes: when does bcopy do nothing at all? To: Alan Somers , FreeBSD Hackers References: From: Hans Petter Selasky Message-ID: <4af9e5dd-8346-69b5-f999-57821d846b94@selasky.org> Date: Fri, 26 Apr 2019 10:35:08 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 980238948F X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 88.99.82.50 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-5.21 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; SUBJECT_ENDS_QUESTION(1.00)[]; DMARC_NA(0.00)[selasky.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE(-3.17)[ip: (-9.39), ipnet: 88.99.0.0/16(-4.71), asn: 24940(-1.72), country: DE(-0.01)]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: mail.turbocat.net]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.74)[-0.738,0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Apr 2019 08:35:44 -0000 On 4/26/19 5:31 AM, Alan Somers wrote: > How is it possible that bcopy() doesn't affect its output array at > all? While investigating a data corruption issue in fuse, I narrowed > the problem down to a bcopy operation that apparently has no affect. > The code in question is: > Hi, Can you show the whole code? Which architecture is this? Can you also print all arguments when this happens? --HPS > bcopy(cp, iov->iov_base, cnt); > r = memcmp(cp, iov->iov_base, cnt); > if (r) > printf("uiomove: miscompare\n"); > > Rationally, I would expect that line never to be printed. But it > does. The destination is always all zeros, even though the source is > not. I can only guess that there's something wrong about the way that > I I'm using buf(9), because the output is part of a buffer allocated > by bread(9). I've been able to rule out: > > 1) Race conditions. The bug is 100% reproducible, and doubling the > bcopy or changing the timing in other ways has no effect. > 2) Unmapped buffer. I verified that the buf is not unmapped_buf. > 3) Overlapping src and dst > 4) Duplicated pages. I verified that each of the buf's pages has a > unique physical address > 5) Bad RAM. My machine passes memtest86, and anyway the failure is > too specific and reproducible to be caused by bad hardware. > > What could I be missing? Do I need to do something to prepare the buf > before I can use it? The code that allocates the buffer is here: > https://svnweb.freebsd.org/base/projects/fuse2/sys/fs/fuse/fuse_io.c?view=markup#l240 > > -Alan > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@freebsd.org Fri Apr 26 17:20:22 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 614C11599408 for ; Fri, 26 Apr 2019 17:20:22 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 53245757D7 for ; Fri, 26 Apr 2019 17:20:21 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lj1-f177.google.com with SMTP id i186so3597606lji.9 for ; Fri, 26 Apr 2019 10:20:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:cc; bh=KixhjoKdtgMObyZ0xFhmHmDTALxLJwEvhYwKYSw76aE=; b=CYsaXpt9UGmDQpAYk/C0DlaqN0ccGTErb9TId/3iA1KjIutMC3LKJH+WYQbfJGWoCu HCu+sx8avtKpqQR6nHLI3GXUK90QjP0a2kcn6QIzHtBFu/vFVfxE8XVgGSo/p1TKxBP0 TqZW4hCXYDJkq/5iGO5+GNDo1T2MEZcfp4xRA6L040tVOsmvvJ0yfVr6doX3XcEsLpEH Wi56NEOMj0PXDVLL1PzL8LTmdnDFlF3MAc8SU+j4yCTnXbuq7exeHNQOgW2MMNMoFt3t A8lStTQNXVXnJrTcc791FkqlnVKSjO8L+0C/gYCzl+HtneTbxDE9+MxeoF0j7pbcWY+L ISSw== X-Gm-Message-State: APjAAAUU0mKJwVn0isSVZUPJJFUQ5oi8bkaPkmzsHTIqrw9ocwvwSXGv QiY5Ro2pGzLItx9azHvWpooKZwIt6OUO/zsnSute0vHu7MU= X-Google-Smtp-Source: APXvYqw0vBlm8ohpzz1BcnetW5Cbf3CfYuDRsraCtSSptRKHQtFq+tpREowzRAQBc/zo1/yT7vFFkYataVgyntWLqMQ= X-Received: by 2002:a2e:9f14:: with SMTP id u20mr10628223ljk.108.1556299213356; Fri, 26 Apr 2019 10:20:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Alan Somers Date: Fri, 26 Apr 2019 11:20:01 -0600 Message-ID: Subject: Re: buf(9) woes: when does bcopy do nothing at all? Cc: FreeBSD Hackers Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 53245757D7 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.208.177 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-1.29 / 15.00]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.94)[-0.942,0]; MISSING_TO(2.00)[]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; SUBJECT_ENDS_QUESTION(1.00)[]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.993,0]; TO_DOM_EQ_FROM_DOM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.99)[-0.986,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(-1.36)[ip: (-0.61), ipnet: 209.85.128.0/17(-3.87), asn: 15169(-2.26), country: US(-0.06)]; RCVD_IN_DNSWL_NONE(0.00)[177.208.85.209.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Apr 2019 17:20:22 -0000 On Thu, Apr 25, 2019 at 9:31 PM Alan Somers wrote: > > How is it possible that bcopy() doesn't affect its output array at > all? While investigating a data corruption issue in fuse, I narrowed > the problem down to a bcopy operation that apparently has no affect. > The code in question is: > > bcopy(cp, iov->iov_base, cnt); > r = memcmp(cp, iov->iov_base, cnt); > if (r) > printf("uiomove: miscompare\n"); > > Rationally, I would expect that line never to be printed. But it > does. The destination is always all zeros, even though the source is > not. I can only guess that there's something wrong about the way that > I I'm using buf(9), because the output is part of a buffer allocated > by bread(9). I've been able to rule out: > > 1) Race conditions. The bug is 100% reproducible, and doubling the > bcopy or changing the timing in other ways has no effect. > 2) Unmapped buffer. I verified that the buf is not unmapped_buf. > 3) Overlapping src and dst > 4) Duplicated pages. I verified that each of the buf's pages has a > unique physical address > 5) Bad RAM. My machine passes memtest86, and anyway the failure is > too specific and reproducible to be caused by bad hardware. > > What could I be missing? Do I need to do something to prepare the buf > before I can use it? The code that allocates the buffer is here: > https://svnweb.freebsd.org/base/projects/fuse2/sys/fs/fuse/fuse_io.c?view=markup#l240 > > -Alan To answer phk's questions, I checked that src and dst don't overlap, and the kernel's bcopy is actually a wrapper around memmove. To answer hps's question, this is on amd64, in a bhyve VM. I solved the problem - part of it, anyway. The user-visible problem that originally led me down this rabbit-hole was an apparent cache invalidation failure during writes on fusefs. That turned out to be caused by an off-by-one error that I just fixed in r346756. However, the miscompares remain. Could those pages be mapped differently for reading than for writing? I don't know. At this point, I'm not going to put much more effort into investigating the problem; I've wasted too much time already. -Alan From owner-freebsd-hackers@freebsd.org Fri Apr 26 18:41:24 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A65B2159B060 for ; Fri, 26 Apr 2019 18:41:24 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic316-20.consmr.mail.ne1.yahoo.com (sonic316-20.consmr.mail.ne1.yahoo.com [66.163.187.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1276380779 for ; Fri, 26 Apr 2019 18:41:22 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: SF6bgPYVM1nhMKrYGanEkf9.42pcePyIudUezTwuz4SpcnaHvf8_JjZlU6ohyqO OVt7U8wC7ql3_lQ8VwoVFCcqItxp3LvuCxE44xJEGNAnhgPBizyPLfoYMuLvipwCW0Qnd2Ig38js aV6emwOLc.YrnClUkqov9wk08txxSUZfzuNR9Vhq09cU8Sh5Gf8zgp2gjwngj5JtVPuonP54k3rG M1ZTmojQQnYeyw3w0LSLSx9.zsZHOCBMiq_E4ipVfrKmrIxI2V3aBJijbQ96ZIz9eSzrxXqD06nz 5.H9RVi47PwSvx167J5vaJZeUi2E.qOsilbro.vPv8d9r76m3DHHPV66g2w8mb2jMxkpUw43Fm4. 4IDkM_Pq.I7LzdL3EgYup.eQRrmsomKQljAeAmX3F348VtETvQ.wT9mSVzAkxt10.Uk8LtxM_qAY khwm6T3.36df1s5eAeNeW_L7Hj9KZxhDGSVF3Im7M3Wyr3ZByPNeu7.0vxfPivBOZbwbBcbRpavb I0dcSe9FJeccohRCOD2fIy8oStPdHWQt6z5.0eXHryvGpPc_v5Go2bSRh6n4WNyodJTKvP4UUsZN HzQ3EPxXpHhu8EI8PoCnK_l9.IlX4furG.c5BYtZ5fJspo12y5r2VRLMhuzMKUbaii4i05.2CJok XReKnsZq8x2sxg4WBYMF6.w2fB6f92QmdtntMr096zqtrjGvB2iMCFYoX_zcjM3xed1Z7uSv_34e 8L5Q6OUkGcqDVOgvvLnvuAmGitUIEvisv7miIIzKcDpPewyCBmfr_dS5x7Y9KBI9Li8VJIXOIVIH EPaL7HoqkKtZ1RVVmhkhfFcu3xsSePVG2rL9zuynmoRp9A_mo_J.HHugTxxDGCQYZ4_O8XdZ5rt2 41LXhftHCk6guW7SOp2OsU2IAZk8cm2uSZ2lHO.MCZ1PtAmUzTVG6qB.VUOY2ux2St3IfXG5D3ev MPZ7LwDW9jLu7bCU4aRNgMGQsCn9GBK.UKELDAUPQvKWL22KUSerbX9KA4_6b9t27vbQJ26V4mbW .LYEQzDc7i8tZnZ.7H3mFcXel0v3Mee02jYI1vNVZpd.YyFW_6_MTVjuBTT3Cdq5DCYYh2vtzQjF sqKOVB3q47n8rR0VybULN.goixgA2W76QRtbVc9Bzdhb6KyjghDfFtUi58XfueAuyD3a7HFOpL8S nO1TfoS1wPDB. Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.ne1.yahoo.com with HTTP; Fri, 26 Apr 2019 18:41:21 +0000 Received: from c-76-115-7-162.hsd1.or.comcast.net (EHLO [192.168.1.103]) ([76.115.7.162]) by smtp403.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 5adbb87bd3271c1516d4bfb7215ac0fd; Fri, 26 Apr 2019 18:41:20 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Subject: Re: buf(9) woes: when does bcopy do nothing at all? From: Mark Millard In-Reply-To: <23438.1556267575@critter.freebsd.dk> Date: Fri, 26 Apr 2019 11:41:18 -0700 Cc: Alan Somers , FreeBSD Hackers Content-Transfer-Encoding: quoted-printable Message-Id: <6CF6472E-1100-475D-987C-071E916D64E8@yahoo.com> References: <23438.1556267575@critter.freebsd.dk> To: Poul-Henning Kamp X-Mailer: Apple Mail (2.3445.104.8) X-Rspamd-Queue-Id: 1276380779 X-Spamd-Bar: ++++ X-Spamd-Result: default: False [4.02 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MV_CASE(0.50)[]; FREEMAIL_FROM(0.00)[yahoo.com]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MX_GOOD(-0.01)[cached: mta6.am0.yahoodns.net]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; SUBJECT_ENDS_QUESTION(1.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:36646, ipnet:66.163.184.0/21, country:US]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(0.94)[0.939,0]; MIME_GOOD(-0.10)[text/plain]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0]; NEURAL_SPAM_MEDIUM(0.51)[0.513,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.91)[0.905,0]; RCVD_IN_DNSWL_NONE(0.00)[146.187.163.66.list.dnswl.org : 127.0.5.0]; IP_SCORE(1.17)[ip: (3.40), ipnet: 66.163.184.0/21(1.41), asn: 36646(1.13), country: US(-0.06)]; RWL_MAILSPIKE_POSSIBLE(0.00)[146.187.163.66.rep.mailspike.net : 127.0.0.17] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Apr 2019 18:41:24 -0000 On 2019-Apr-26, at 01:32, Poul-Henning Kamp wrote: > -------- > In message = , = Alan Somers writes: >=20 >> How is it possible that bcopy() doesn't affect its output array at = all? >=20 > That conclusion does not follow from your example: >=20 >> bcopy(cp, iov->iov_base, cnt); >> r =3D memcmp(cp, iov->iov_base, cnt); >> if (r) >> printf("uiomove: miscompare\n"); >=20 > If [cp:cp+cnt] and [iov_base:iov_base+cnt] overlap the bcopy result > is undefined. >=20 > Try memmove instead ? I only see a bcopy man page bcopy(3) but it says: DESCRIPTION The bcopy() function copies len bytes from string src to string = dst. The two strings may overlap. If len is zero, no bytes are copied. Is a kernel bcopy likely to be any different? =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)