From owner-freebsd-hackers@freebsd.org Sun Oct 15 22:35:05 2017 Return-Path: Delivered-To: freebsd-hackers@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 D568EE4C871 for ; Sun, 15 Oct 2017 22:35:05 +0000 (UTC) (envelope-from crb@chrisbowman.com) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id B22846382F for ; Sun, 15 Oct 2017 22:35:05 +0000 (UTC) (envelope-from crb@chrisbowman.com) Received: by mailman.ysv.freebsd.org (Postfix) id AE39DE4C870; Sun, 15 Oct 2017 22:35:05 +0000 (UTC) Delivered-To: hackers@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 ADAF9E4C86F for ; Sun, 15 Oct 2017 22:35:05 +0000 (UTC) (envelope-from crb@chrisbowman.com) Received: from mail-pf0-x22f.google.com (mail-pf0-x22f.google.com [IPv6:2607:f8b0:400e:c00::22f]) (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 86E076382E for ; Sun, 15 Oct 2017 22:35:05 +0000 (UTC) (envelope-from crb@chrisbowman.com) Received: by mail-pf0-x22f.google.com with SMTP id d28so14402296pfe.2 for ; Sun, 15 Oct 2017 15:35:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisbowman-com.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=dWuPS9ZAwU4BgEElWLUddxIxGmoZQUfjIVHutreWcIM=; b=cI1l1u6kK0V9YZdYrXjqBKLEucNKsMKgrEw/R0R1DSWLeEGu2iSTU7sTGot/OpMoS8 DrJnUbz5lM8gSlI1JVRD495+kjWw9QOxtGa37MSRypziNRAOM3QRivN5ukCduSp6CumU JQrVeFPnQfOMjkxSinI2pG+9GcqIIbQedVjIXXQr5udQQjDk1xnbAXRc0FhNgiGDCaJV /9thApcTsSETi8AVhVgDVqIWTTMFNzS+SyZNDZh8SCcSrMSdjX/8boo0tB2WJP+lGZlB W8Wk7Fy3WyQCE4J+PfQ9F/Kmg0dqrGv2d7P0RxJyNCv6EDiIX1XzaEEPck7V31HbtWyG DBHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=dWuPS9ZAwU4BgEElWLUddxIxGmoZQUfjIVHutreWcIM=; b=i76jIYDHL1Z+wmWto7VkciPXtiF70qn9cN0fmilTN8/IylkeqqhlGtkFat+3wJWddk mvnSpGvT/ZMK59sxSiut3IDTXECq/76eU4c2sv1ruPPDdoEX7fo7q6wZXjTTHQ7rSj0h zNrjHqRwGXDtlbC6TOrRRXQNdm+ivjkdzTFABd3bwCjmLxwpy6QUHy9yTAc9CflrrXvV ++cTKX3hVzauU68Arj9J34i/FTSiS3pIJ6qyFNqX66/gupYEOFt2amn8yiAEHuVFqKwb hH+ApamSTUk2aVBiMOdsn7OXw96+It6ap2c+b2mHi1BYhQ1zwRIMhA931awe0gArfyN3 E/Ag== X-Gm-Message-State: AMCzsaWy1JTRtT86w4imEeNuRNmHD+Qvf/DBRga8Usd6wJ4ZsMjGBy85 PfiqMg8FYsxt1+HGTvImqFwAk4bg92g= X-Google-Smtp-Source: AOwi7QAq/2N2AL611wAMOLQKkhj4QFXMPs4pPNtfmfOsZmyiAq0yxuWR0TUdLMJCGANXT+lO8ozpHA== X-Received: by 10.99.165.17 with SMTP id n17mr6282101pgf.405.1508106904623; Sun, 15 Oct 2017 15:35:04 -0700 (PDT) Received: from ?IPv6:2601:647:4e00:bbb5:adde:3ddf:47cd:444f? ([2601:647:4e00:bbb5:adde:3ddf:47cd:444f]) by smtp.gmail.com with ESMTPSA id d12sm10371618pgt.16.2017.10.15.15.35.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Oct 2017 15:35:03 -0700 (PDT) From: Christopher Bowman Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: gpart difficulties Message-Id: <8C14AA5A-FD78-4A83-8640-B6FE2D41EAA1@chrisbowman.com> Date: Sun, 15 Oct 2017 15:35:02 -0700 To: hackers@freebsd.org X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Oct 2017 22:35:05 -0000 I have a home server with a fairly large amount of zfs disk space where = I keep all of my persistent data. As a result when new releases of = FreeBSD come out I tend backup the root images of my machines to the zfs = pool and, starting with the least important box, I blow away all the = local partitions and reinstall from scratch. Then I mount the server = zfspool and restore config files and packages. As a result my machines = stay pretty up to date and clean. Lately rather than burning DVDs = I=E2=80=99ve decided that I will create a usb boot disks containing the = entire DVD contents and simply go down the line and and install on one = machine after the other. My machine can now all boot off USB but = don=E2=80=99t all have DVD drives. I have the following script below which I was using to try configure an = MBR bootable memory stick. The commented out lines are a reminder to = myself of how to copy over the ISO contents to the slice I create (I = only do this when there is a new release so I forget.) gpart create -s MBR da0 gpart add -i 1 -t freebsd da0 gpart set -a active -i 1 da0 gpart bootcode -b /boot/mbr da0 gpart create -s BSD -n 8 da0s1 gpart add -t freebsd-ufs -i 1 da0s1 gpart bootcode -p /boot/boot -i 1 da0s1 # newfs da0s1a # mount /dev/da0s1a /mnt/usb # mdconfig -a -t vnode -f = /u1/ISOs/FreeBSD/11.1/FreeBSD-11.1-RELEASE-amd64-dvd1.iso # mount -t cd9660 /dev/md0 /mnt/dvd # cp -pr /mnt/dvd/* /mnt/usb # umount /mnt/usb What I=E2=80=99ve found that=E2=80=99s interesting is that the slice = creation doesn=E2=80=99t seem to be persistent. By that I mean that if = I run the above script (included the commented stuff.) I can clearly = see the /mnt/usb contents are the same as the DVD. If I then unmount = /mnt/usb and remove the stick when I put it back in gpart show doesn=E2=80= =99t seems to show the BSD label, just the MBR slice If I reinsert and do the following: gpart create -s BSD -n 8 da0s1 gpart add -t freebsd-ufs -i 1 da0s1 gpart bootcode -p /boot/boot -i 1 da0s1 fsck /dev/da0s1a mount /dev/da0s1a /mnt/usb Then the file system is there just as before. The slice creation = doesn=E2=80=99t seem persistent. Am I missing something? Is there = something I have to do to commit the slice? Is this a bug? I appreciate your help. Christopher From owner-freebsd-hackers@freebsd.org Mon Oct 16 06:25:46 2017 Return-Path: Delivered-To: freebsd-hackers@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 B1A4BE2FA45 for ; Mon, 16 Oct 2017 06:25:46 +0000 (UTC) (envelope-from Keith.Owens2@dell.com) Received: from esa2.dell-outbound.iphmx.com (esa2.dell-outbound.iphmx.com [68.232.149.220]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.dell-outbound.iphmx.com", Issuer "Go Daddy Secure Certificate Authority - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 78FCC6ECE3 for ; Mon, 16 Oct 2017 06:25:45 +0000 (UTC) (envelope-from Keith.Owens2@dell.com) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dell.com; i=@dell.com; q=dns/txt; s=smtpout; t=1508135146; x=1539671146; h=from:to:subject:date:message-id:mime-version; bh=llqxyAArIomkXl2rSXOzRbq5szgivrDh3u2SXJLZyoA=; b=XeOSyc+eo70RZEhKMnBtakqUXAy1GTUq8WvzhsJxR3o732iLSWIDoJad +LIyBN8kQ/o1D11iN6qtqTeiBw9niGL6UEDsxrYh5OXgXkbhMz5WlX65U Pi5K2NTbeREZ/Gij7ruxRdZbqbTXKkJZObB6DFTuEAEv/KmScPk09TyYd 8=; Received: from esa6.dell-outbound2.iphmx.com ([68.232.154.99]) by esa2.dell-outbound.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Oct 2017 01:24:37 -0500 From: "Owens, Keith" Received: from mailuogwhop.emc.com ([168.159.213.141]) by esa6.dell-outbound2.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Oct 2017 12:24:36 +0600 Received: from maildlpprd05.lss.emc.com (maildlpprd05.lss.emc.com [10.253.24.37]) by mailuogwprd01.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id v9G6OZfh005807 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 16 Oct 2017 02:24:36 -0400 X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd01.lss.emc.com v9G6OZfh005807 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=isilon.com; s=jan2013; t=1508135076; bh=i+ECs6J2O9CukNEHgM4fRpAHmCM=; h=From:To:Subject:Date:Message-ID:Content-Type:MIME-Version; b=d2uSclk3wNEybx8ZDwdpuB+MHOQtE+AMijDwRa+tKiwZFzKD4x1gFaewg+jq7FOb4 dkhZKGghT2VP+2+6IHPVTvk8+k0u7Eu7egsdQ/lhaayC5XyFBW45WLLykm3RIoaMiH 4gwQ4yyoAQYiv05l/ZGeXM8E7h9rLzYJPgRMXRDQ= X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd01.lss.emc.com v9G6OZfh005807 Received: from mailusrhubprd02.lss.emc.com (mailusrhubprd02.lss.emc.com [10.253.24.20]) by maildlpprd05.lss.emc.com (RSA Interceptor) for ; Mon, 16 Oct 2017 02:23:20 -0400 Received: from MXHUB108.corp.emc.com (MXHUB108.corp.emc.com [10.253.58.24]) by mailusrhubprd02.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id v9G6OJDm031049 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL) for ; Mon, 16 Oct 2017 02:24:19 -0400 Received: from MX202CL01.corp.emc.com ([fe80::401b:e935:5cb1:a681]) by MXHUB108.corp.emc.com ([10.253.58.24]) with mapi id 14.03.0352.000; Mon, 16 Oct 2017 02:24:19 -0400 To: "freebsd-hackers@freebsd.org" Subject: How to map a single unmapped BIO? Thread-Topic: How to map a single unmapped BIO? Thread-Index: AdNGR2Xz0DhUfKMJQLSKRmHj5BQz6g== Date: Mon, 16 Oct 2017 06:24:19 +0000 Message-ID: <0A22297308D147479E18AA1807A03807017F2378@MX202CL01.corp.emc.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.32.243.43] MIME-Version: 1.0 X-Sentrion-Hostname: mailusrhubprd02.lss.emc.com X-RSA-Classifications: public Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Oct 2017 06:25:46 -0000 I have a geom that sometimes (very rarely) needs to modify the data in an u= nmapped BIO. Completely removing unmapped support from the entire geom is o= verkill. What is the best way of converting a single unmapped BIO to a mapp= ed address so I can access the data? Basically I want g_io_transient_map_bio(), but that function is static. Dup= licating that code in my geom is not elegant. From owner-freebsd-hackers@freebsd.org Mon Oct 16 07:17:46 2017 Return-Path: Delivered-To: freebsd-hackers@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 2CE80E319FE for ; Mon, 16 Oct 2017 07:17:46 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B99CB70590 for ; Mon, 16 Oct 2017 07:17:45 +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 v9G7HYds001614 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 16 Oct 2017 10:17:35 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v9G7HYds001614 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v9G7HY4X001612; Mon, 16 Oct 2017 10:17:34 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 16 Oct 2017 10:17:34 +0300 From: Konstantin Belousov To: "Owens, Keith" Cc: "freebsd-hackers@freebsd.org" Subject: Re: How to map a single unmapped BIO? Message-ID: <20171016071734.GF2473@kib.kiev.ua> References: <0A22297308D147479E18AA1807A03807017F2378@MX202CL01.corp.emc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0A22297308D147479E18AA1807A03807017F2378@MX202CL01.corp.emc.com> User-Agent: Mutt/1.9.1 (2017-09-22) 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-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Oct 2017 07:17:46 -0000 On Mon, Oct 16, 2017 at 06:24:19AM +0000, Owens, Keith wrote: > I have a geom that sometimes (very rarely) needs to modify the data in an unmapped BIO. Completely removing unmapped support from the entire geom is overkill. What is the best way of converting a single unmapped BIO to a mapped address so I can access the data? > > Basically I want g_io_transient_map_bio(), but that function is static. Duplicating that code in my geom is not elegant. Making g_io_transient_map_bio() non-static and allowing arbitrary geom to use it would probably cause troubles, because the mapping is automatically destroyed by biodone(). It is either too late if yor only need the mapping now, or too early in other situations. Consider using the sf bufs, which were designed specifically to allow kernel consumers to create temporary mappings. There is even a man page sf_buf(4), which is mostly up to date. From owner-freebsd-hackers@freebsd.org Mon Oct 16 13:55:07 2017 Return-Path: Delivered-To: freebsd-hackers@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 B664EE3B395 for ; Mon, 16 Oct 2017 13:55:07 +0000 (UTC) (envelope-from george+freebsd@m5p.com) Received: from mailhost.m5p.com (mailhost.m5p.com [207.172.210.101]) (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 5C76B81982 for ; Mon, 16 Oct 2017 13:55:06 +0000 (UTC) (envelope-from george+freebsd@m5p.com) Received: from [IPv6:2001:470:1f07:15ff::1f] (haymarket.m5p.com [IPv6:2001:470:1f07:15ff::1f]) (authenticated bits=0) by mailhost.m5p.com (8.15.2/8.15.2) with ESMTPSA id v9GDpe8f038980 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Mon, 16 Oct 2017 09:51:46 -0400 (EDT) (envelope-from george+freebsd@m5p.com) To: freebsd-hackers@FreeBSD.org From: George Mitchell Subject: WPA2 attack? Message-ID: <9cc89278-17dc-d6a0-5cab-1a02fd6a5036@m5p.com> Date: Mon, 16 Oct 2017 09:51:40 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="rOUkOlD4jR0980DXC8ajeMF2ruQ8iJieN" X-Spam-Status: No, score=0.2 required=10.0 tests=HELO_MISC_IP, RP_MATCHES_RCVD, TVD_SPACE_RATIO autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mattapan.m5p.com X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (mailhost.m5p.com [IPv6:2001:470:1f07:15ff::f7]); Mon, 16 Oct 2017 09:51:49 -0400 (EDT) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Oct 2017 13:55:07 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --rOUkOlD4jR0980DXC8ajeMF2ruQ8iJieN Content-Type: multipart/mixed; boundary="HW03Iudfi0xE7QSPNxWVNpwlmS6NUnKDQ"; protected-headers="v1" From: George Mitchell To: freebsd-hackers@FreeBSD.org Message-ID: <9cc89278-17dc-d6a0-5cab-1a02fd6a5036@m5p.com> Subject: WPA2 attack? --HW03Iudfi0xE7QSPNxWVNpwlmS6NUnKDQ Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Is our community working on mitigating this problem? https://arstechnica.com/information-technology/2017/10/severe-flaw-in-wpa= 2-protocol-leaves-wi-fi-traffic-open-to-eavesdropping/ -- George --HW03Iudfi0xE7QSPNxWVNpwlmS6NUnKDQ-- --rOUkOlD4jR0980DXC8ajeMF2ruQ8iJieN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEENdM4ZHktsJW5kKZXwRES3m+p4fkFAlnkuWwACgkQwRES3m+p 4flKdw//bul5+/IX9O5eN4sO7dH/3APG8BI0e6EUIVTIdc/YeSqxFqV4Osgg5GdM 9yCKSWbgC5Ml/wHudu/clVcuqFLn3eToyQomwL7CkFHCzTEeOhncRbrQYAeIhzRn seW9Qz0NQnRJLS7QLd3vVT6V36rt/b7Ouh0WAFXLVLsYLuw89KazFAlWLf3ZO72Q CVxC81HpMv/OfRjEMoWapHE/A/hUJ0JdrdH22oBtup2yyqRTfxWfoTtDf4hDCGsq LpNEsBpbh1zVezfYeoWg9CNJht2SMdrHX9QTq2blyddLE63ncVGWNw+fDeeWJwQH wAKwVKa9SWzb1X4otc+Hgg0hIanxPiKCJ365GUBJp7pYMfpjMLClor76DV1JrYwG N5JhEfR7KFHMVHfZ+oLEb6T3mYr3Xz49jN4cwFtVDlfZamzr4KDmVdbx9g5cD8js rwgSgflKSKr8kMVoBuAFBSbq84PHm0AWXAdHouXLabHImzv+w/uYqauFcHerM0DK H1nP3gcuvDlJ/05bYuNlJxrtCotXW6d8N9UPsOH/QPKmhNrCumN4YB/YmuxwQwkH gcstlRpsKmyyjMJsMULi+JkdRezjd7Mu94qD5IqdilHBr0OQ0CkSlnFax2te1DDw SCf6CxNfKE06s82HLcbPOz4c0m5Yq5MluvaG0iGscqOsbYe8TNI= =UadB -----END PGP SIGNATURE----- --rOUkOlD4jR0980DXC8ajeMF2ruQ8iJieN-- From owner-freebsd-hackers@freebsd.org Mon Oct 16 14:00:13 2017 Return-Path: Delivered-To: freebsd-hackers@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 CDA73E3B6E3 for ; Mon, 16 Oct 2017 14:00:13 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: from mail-wm0-x22e.google.com (mail-wm0-x22e.google.com [IPv6:2a00:1450:400c:c09::22e]) (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 62D7881D36 for ; Mon, 16 Oct 2017 14:00:13 +0000 (UTC) (envelope-from mozolevsky@gmail.com) Received: by mail-wm0-x22e.google.com with SMTP id q132so3652798wmd.2 for ; Mon, 16 Oct 2017 07:00:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=9bWt62l7vwDulr3bAB3LoyCLT9ZmRBpYHdqTzyjDkRc=; b=tUl04N9pWiOaDv6TlxwI+KuMFt1toYNpU9iRGyIRLOQvPwGgFbg31b8IRWWe2XhS8j usbdBwCk7c9SffjGyvvtppH2kc+sPn5lXoBgLrkikCXK9cPKWvKLPkBJq3uNGCnOfuKp LuCD5AomxzbKPq0+quSPSyA88yxbGi/v5q4JdJs2NosLlsh+OG899bqzyoiaql6vt13+ v/qX6/cGY9mJakGz+yqQgnkadKp+yfJHi0dLWysnujNdY8wbiMhDul/aqPCq+RO4eI5v c+be/u5WXbT1M3k85LX908zW4JXgaVORc+ZnwdMttSbWCq7jgg7WPeh/OLKyEuVXPFHH +jcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=9bWt62l7vwDulr3bAB3LoyCLT9ZmRBpYHdqTzyjDkRc=; b=Z8YKmUgyZEiHoyoNZ97a95haXCAfNlpZFadCR1oZIQfZmoYrLifJS8dS77hmRm0SjR mo9xfIE7yB+brk/o32UtFKc+nZu9p5Yzjs77XtEmgFsMcQ1XYoxeokytk0nxaoh7xpbg 9ROZlb5oTfiP5Q8xvGYo7W8UW1ybMukm0P8Pjo51VfgnYHLKgkK5TehFtC2OvFimrYE2 KVzPvSETDmDAiTvPh6a9oln08bHJ8UczdyLhIywIUxbzuq/rWAhLigB0LoQFuiLuwxLH nKD2+GTqCCjZ8890qk579zDDBBXE1z/Mwt0SF4ew+S3j1rUuDCA1X4m0/BOw0WQy1qPg K6Gg== X-Gm-Message-State: AMCzsaXZma4zkeZP0M8lQwo/uAQOuClFIOcv0yA2kcnWYJNGt2QFXKMk 0jqEZ42/KyhUBjjPu5UKL1cGlPcewNNs5OfwAllXQg== X-Google-Smtp-Source: ABhQp+SP6aKVH28beJXxyp1YXsW5uYRT57Kzfkn1Otc/MIawTl5poxATvbIZf8IgO/5ncAb7meunE1QEtZ1Y4vbqcds= X-Received: by 10.223.163.208 with SMTP id m16mr800414wrb.63.1508162411698; Mon, 16 Oct 2017 07:00:11 -0700 (PDT) MIME-Version: 1.0 Sender: mozolevsky@gmail.com Received: by 10.28.135.205 with HTTP; Mon, 16 Oct 2017 06:59:31 -0700 (PDT) In-Reply-To: <9cc89278-17dc-d6a0-5cab-1a02fd6a5036@m5p.com> References: <9cc89278-17dc-d6a0-5cab-1a02fd6a5036@m5p.com> From: Igor Mozolevsky Date: Mon, 16 Oct 2017 14:59:31 +0100 X-Google-Sender-Auth: SQ8eQClLe3DWeLqzIbSkxj3AyMo Message-ID: Subject: Re: WPA2 attack? To: George Mitchell Cc: Hackers freeBSD Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Oct 2017 14:00:13 -0000 On 16 October 2017 at 14:51, George Mitchell wrote: > Is our community working on mitigating this problem? > https://arstechnica.com/information-technology/2017/ > 10/severe-flaw-in-wpa2-protocol-leaves-wi-fi-traffic- > open-to-eavesdropping/ It's quite FUD-dy, from their conference paper at https://papers.mathyvanhoef.com/ccs2017.pdf: 3.2 The Key Reinstallation Attack Our key reinstallation attack is now easy to spot: because the supplicant still accepts retransmissions of message 3, even when it is in the PTK-DONE state, we can force a reinstallation of the PTK. More precisely, we first establish a man-in-the-middle (MitM) position between the supplicant and authenticator. We use this MitM position to trigger retransmissions of message 3 by preventing message 4 from arriving at the authenticator. As a result, it will retransmit message 3, which causes the supplicant to reinstall an already-in-use PTK. -- Igor M. From owner-freebsd-hackers@freebsd.org Mon Oct 16 15:02:26 2017 Return-Path: Delivered-To: freebsd-hackers@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 A953CE3C9E6 for ; Mon, 16 Oct 2017 15:02:26 +0000 (UTC) (envelope-from vince@unsane.co.uk) Received: from vm.unsane.co.uk (unsane-pt.tunnel.tserv5.lon1.ipv6.he.net [IPv6:2001:470:1f08:110::2]) by mx1.freebsd.org (Postfix) with ESMTP id 7263683BC1 for ; Mon, 16 Oct 2017 15:02:26 +0000 (UTC) (envelope-from vince@unsane.co.uk) Received: from vhoffman.lon.namesco.net (lon.namesco.net [195.7.254.102]) by vm.unsane.co.uk (Postfix) with ESMTPSA id 4F7ED3028C for ; Mon, 16 Oct 2017 16:02:24 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=unsane.co.uk; s=102017; t=1508166146; bh=d9T8vJa2GKUj5f11nCHhtAUrV62iwAl9ye1hjfl4eb4=; h=Subject:To:References:From:Date:In-Reply-To; b=gujeCLKudcU3xm/H556+Uhp4MsfanDQkWPihU/vXtSZ1I0FgMwsHWqd297WqCjpNy YSuFZWQrFgbThqEcb9r94PwctarmZpFtAex6dlT3IgyPvuL6omScUsOI8OcRZtK/Z6 VAP/OW0bGHQ4BGIeVwZVnpPG37kvh0wrpda893F4= Subject: Re: WPA2 attack? To: freebsd-hackers@freebsd.org References: <9cc89278-17dc-d6a0-5cab-1a02fd6a5036@m5p.com> From: Vincent Hoffman-Kazlauskas Message-ID: <528b6506-2069-7a16-77ec-8d69ffd6865d@unsane.co.uk> Date: Mon, 16 Oct 2017 16:02:13 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <9cc89278-17dc-d6a0-5cab-1a02fd6a5036@m5p.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HsqOGm8g4984U8nhmrNxaXKtj0flReJAv" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Oct 2017 15:02:26 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --HsqOGm8g4984U8nhmrNxaXKtj0flReJAv Content-Type: multipart/mixed; boundary="bm6uD1UeGiwfbKQ2443Vt51J94ufQbqui"; protected-headers="v1" From: Vincent Hoffman-Kazlauskas To: freebsd-hackers@freebsd.org Message-ID: <528b6506-2069-7a16-77ec-8d69ffd6865d@unsane.co.uk> Subject: Re: WPA2 attack? References: <9cc89278-17dc-d6a0-5cab-1a02fd6a5036@m5p.com> In-Reply-To: <9cc89278-17dc-d6a0-5cab-1a02fd6a5036@m5p.com> --bm6uD1UeGiwfbKQ2443Vt51J94ufQbqui Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: quoted-printable yes, see discussion on -current https://lists.freebsd.org/pipermail/freebsd-current/2017-October/067193.h= tml Vince On 16/10/2017 14:51, George Mitchell wrote: > Is our community working on mitigating this problem? > https://arstechnica.com/information-technology/2017/10/severe-flaw-in-w= pa2-protocol-leaves-wi-fi-traffic-open-to-eavesdropping/ > -- George >=20 --bm6uD1UeGiwfbKQ2443Vt51J94ufQbqui-- --HsqOGm8g4984U8nhmrNxaXKtj0flReJAv Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAlnkyf8ACgkQxCSYQ8x/EL5digCgikH7/lQWV/v75DtQ6LUHmNKX dsgAniWtfWxyh5i6gBKEKNSlMpc41dGg =irkM -----END PGP SIGNATURE----- --HsqOGm8g4984U8nhmrNxaXKtj0flReJAv-- From owner-freebsd-hackers@freebsd.org Mon Oct 16 18:12:09 2017 Return-Path: Delivered-To: freebsd-hackers@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 12578E41363 for ; Mon, 16 Oct 2017 18:12:09 +0000 (UTC) (envelope-from george+freebsd@m5p.com) Received: from mailhost.m5p.com (mailhost.m5p.com [207.172.210.101]) (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 AAC8066E51 for ; Mon, 16 Oct 2017 18:12:08 +0000 (UTC) (envelope-from george+freebsd@m5p.com) Received: from [IPv6:2001:470:1f07:15ff::1f] (haymarket.m5p.com [IPv6:2001:470:1f07:15ff::1f]) (authenticated bits=0) by mailhost.m5p.com (8.15.2/8.15.2) with ESMTPSA id v9GIBlCB042771 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Mon, 16 Oct 2017 14:11:53 -0400 (EDT) (envelope-from george+freebsd@m5p.com) Subject: Re: WPA2 attack? To: freebsd-hackers@freebsd.org References: <9cc89278-17dc-d6a0-5cab-1a02fd6a5036@m5p.com> <528b6506-2069-7a16-77ec-8d69ffd6865d@unsane.co.uk> From: George Mitchell Message-ID: <2715ecf4-f80f-43ec-17da-b57a3bb9dc38@m5p.com> Date: Mon, 16 Oct 2017 14:11:40 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <528b6506-2069-7a16-77ec-8d69ffd6865d@unsane.co.uk> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fvFdCUGWd6A8VFdUW7bxT1FkIOAjRn1lG" X-Spam-Status: No, score=0.2 required=10.0 tests=HELO_MISC_IP, RP_MATCHES_RCVD autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mattapan.m5p.com X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (mailhost.m5p.com [IPv6:2001:470:1f07:15ff::f7]); Mon, 16 Oct 2017 14:11:53 -0400 (EDT) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Oct 2017 18:12:09 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --fvFdCUGWd6A8VFdUW7bxT1FkIOAjRn1lG Content-Type: multipart/mixed; boundary="2OluqgsjJHovncPQKFFTRNGPqn6tVLTgq"; protected-headers="v1" From: George Mitchell To: freebsd-hackers@freebsd.org Message-ID: <2715ecf4-f80f-43ec-17da-b57a3bb9dc38@m5p.com> Subject: Re: WPA2 attack? References: <9cc89278-17dc-d6a0-5cab-1a02fd6a5036@m5p.com> <528b6506-2069-7a16-77ec-8d69ffd6865d@unsane.co.uk> In-Reply-To: <528b6506-2069-7a16-77ec-8d69ffd6865d@unsane.co.uk> --2OluqgsjJHovncPQKFFTRNGPqn6tVLTgq Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 10/16/17 11:02, Vincent Hoffman-Kazlauskas wrote: > yes, see discussion on -current > https://lists.freebsd.org/pipermail/freebsd-current/2017-October/067193= =2Ehtml >=20 > Vince > [...] Thanks for the pointer. -- George --2OluqgsjJHovncPQKFFTRNGPqn6tVLTgq-- --fvFdCUGWd6A8VFdUW7bxT1FkIOAjRn1lG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEENdM4ZHktsJW5kKZXwRES3m+p4fkFAlnk9mMACgkQwRES3m+p 4fmxExAAr9Oz16Rux+alRxynZSGsl16a+AguhJv+eRsjOsy/4GNLlZ1OSdz4OpbC 0Oc2D7i9LK5UX4TqQXQHsGTiS9q3TWtGRdxD0t6VTa+i20qrSSSAgUDrVOKe7roe KWf10DvsivCsjdrdbVELqcAjpfz3qimNO4ffgUdpXhGzXdA9yDQp/eyPvdE/oqoo +V6E1UxUEXv5cGcOPyu+p4XKjS4IvNC3lUZvXdVeRGNlSmIeGlp7Lv8UvYqboNp9 v7Cr5EkxoriQ6efU+nOBtDOS91KuFA7J69xILEiSFXzYcJkJQFIqT2ZwP93C7256 ITj9TioejXQJd0kSBf+Vi3hMYv+tjXwN+QGxhUZ2ynvSNixJ/SN+gAHQhtufxm79 D2E9mzG1yf3sbxY5V8bl3HQLgtzqFX8TidckU0aXW2+iBGnDKbW05MHSnby7ZXCs 86we7qJqp0cXiuDavHTOAV95kuy0scayQCGP+5CiLl3X0tlPLTFanHZSi1DT/hls PAgmh79D4B9fnTc+OQx57i9zbbcQ/RM7QR/QJw8AMdJey/Tu3EklUjQ0LvBP89wJ Ed9uBTLSd/E/H74TQ18BTPTC6LoSRP8nKNhny3+ij+koYcqtt0g/PL89lHpVuDdj ENtczRLJYJHPpytx16EkGiFDuYrT8wl/tRJIfOKyBAFjyDHk1UE= =q3jE -----END PGP SIGNATURE----- --fvFdCUGWd6A8VFdUW7bxT1FkIOAjRn1lG-- From owner-freebsd-hackers@freebsd.org Tue Oct 17 04:13:29 2017 Return-Path: Delivered-To: freebsd-hackers@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 98673E2B3E9 for ; Tue, 17 Oct 2017 04:13:29 +0000 (UTC) (envelope-from crb@chrisbowman.com) Received: from mail-pg0-x22e.google.com (mail-pg0-x22e.google.com [IPv6:2607:f8b0:400e:c05::22e]) (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 70D1781038 for ; Tue, 17 Oct 2017 04:13:29 +0000 (UTC) (envelope-from crb@chrisbowman.com) Received: by mail-pg0-x22e.google.com with SMTP id r25so434733pgn.4 for ; Mon, 16 Oct 2017 21:13:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisbowman-com.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=SpK/LIypdqTGBomEU28QwHf8bzS2FQK2/NVOoWt6x0E=; b=f66rqutCof0/GieTSD0Q3+bHU1DXZAklJsVfUud37t8B9gDb93f5GQph0mol3TBtWZ QXGT994Ra/iY/bHkF8v1CUNJiJZII0qLGsI2Yj7iX1Lh9NrkOYDyNXRus1V83caNcQjy 1M5LMKe7kIIcYYLdDmG5+HhKbk7ay60GB4Oyf4QrNbosylq7WFBTYGXra7D20EMzzxNx ePiPq/rCpodK35+qTOshbfTOWfe7ULIqILkpDzsZcKUx0s1fqkb19EX4IBld0vqxe4C9 QPoB9b+j3+kx9ubHQg/sqI9rZgATiN+RaPjA1f/LH1MuItJVTkYFlGbqyVoVXIhpZowM 00Ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=SpK/LIypdqTGBomEU28QwHf8bzS2FQK2/NVOoWt6x0E=; b=GY856hy2PnoGgxmQbKHVy+mkVmqoolBtaNo2Si78sROLu/t+mUZOmV2qgI5KJ/VhI8 2WdunuCk5dmjaXMCOKejjzE64bevnI/E7xWihuTgzCCFaoVuGljOhdRVAWCpPkgu1wf3 S/WtuLA7xK37ry/fie4V8lfv+G8Qw/ZBU0QySeMVoL8u94e/2AlUj1Ldr9aP7ZevEwKI Q7ODYwb3LvLKV4bW/D45PUBFT5B2lzZwclAb5lyEFgbWBIqeoiS8D9b0fZCvTvAB7g3t jYPMwO7QMda7iJs99OGLwBfvBnAeWXICYuwT3DqM+Q/bUL9yVpgUUIMv0XUQmGVehKba PGfQ== X-Gm-Message-State: AMCzsaWdN7Y4jFKiLwm4QMj064CwK6g4ZT72OYl1WLPMmgvb5eo7x7tq 0AMjD2opPVeX1p/Nvson772jx3yko1u0Pw== X-Google-Smtp-Source: AOwi7QDQBbYIm12jVQP6MU7YKoR9bityhcoXdeEFn75eDs613aKeSK1wmnTB+fr2q0A+smigUpryMA== X-Received: by 10.98.83.5 with SMTP id h5mr10683756pfb.131.1508213608272; Mon, 16 Oct 2017 21:13:28 -0700 (PDT) Received: from ?IPv6:2601:647:4e00:bbb5:5d49:e9e8:ddd7:93cf? ([2601:647:4e00:bbb5:5d49:e9e8:ddd7:93cf]) by smtp.gmail.com with ESMTPSA id x11sm14714970pgq.29.2017.10.16.21.13.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Oct 2017 21:13:27 -0700 (PDT) From: Christopher Bowman Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: apart difficulties Message-Id: Date: Mon, 16 Oct 2017 21:13:26 -0700 To: freebsd-hackers@freebsd.org X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Oct 2017 04:13:29 -0000 I have a home server with a fairly large amount of zfs disk space where = I keep all of my persistent data. As a result when new releases of = FreeBSD come out I tend backup the root images of my machines to the zfs = pool and, starting with the least important box, I blow away all the = local partitions and reinstall from scratch. Then I mount the server = zfspool and restore config files and packages. As a result my machines = stay pretty up to date and clean. Lately rather than burning DVDs = I=E2=80=99ve decided that I will create a usb boot disks containing the = entire DVD contents and simply go down the line and and install on one = machine after the other. My machine can now all boot off USB but = don=E2=80=99t all have DVD drives. I have the following script below which I was using to try configure an = MBR bootable memory stick. The commented out lines are a reminder to = myself of how to copy over the ISO contents to the slice I create (I = only do this when there is a new release so I forget.) gpart create -s MBR da0 gpart add -i 1 -t freebsd da0 gpart set -a active -i 1 da0 gpart bootcode -b /boot/mbr da0 gpart create -s BSD -n 8 da0s1 gpart add -t freebsd-ufs -i 1 da0s1 gpart bootcode -p /boot/boot -i 1 da0s1 # newfs da0s1a # mount /dev/da0s1a /mnt/usb # mdconfig -a -t vnode -f = /u1/ISOs/FreeBSD/11.1/FreeBSD-11.1-RELEASE-amd64-dvd1.iso # mount -t cd9660 /dev/md0 /mnt/dvd # cp -pr /mnt/dvd/* /mnt/usb # umount /mnt/usb What I=E2=80=99ve found that=E2=80=99s interesting is that the slice = creation doesn=E2=80=99t seem to be persistent. By that I mean that if = I run the above script (included the commented stuff.) I can clearly = see the /mnt/usb contents are the same as the DVD. If I then unmount = /mnt/usb and remove the stick when I put it back in gpart show doesn=E2=80= =99t seems to show the BSD label, just the MBR slice If I reinsert and do the following: gpart create -s BSD -n 8 da0s1 gpart add -t freebsd-ufs -i 1 da0s1 gpart bootcode -p /boot/boot -i 1 da0s1 fsck /dev/da0s1a mount /dev/da0s1a /mnt/usb Then the file system is there just as before. The slice creation = doesn=E2=80=99t seem persistent. Am I missing something? Is there = something I have to do to commit the slice? Is this a bug? I appreciate your help. Christopher= From owner-freebsd-hackers@freebsd.org Tue Oct 17 07:02:22 2017 Return-Path: Delivered-To: freebsd-hackers@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 4D5C9E2F979 for ; Tue, 17 Oct 2017 07:02:22 +0000 (UTC) (envelope-from roberfern@gmail.com) Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com [IPv6:2a00:1450:400c:c09::232]) (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 D71FA204B for ; Tue, 17 Oct 2017 07:02:21 +0000 (UTC) (envelope-from roberfern@gmail.com) Received: by mail-wm0-x232.google.com with SMTP id t69so1675956wmt.2 for ; Tue, 17 Oct 2017 00:02:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=OA/XGXmOEMtj1FA9u09OZtpnQ8FkaPB4CAdkSQEJylI=; b=G6/eK4yiKnxQX4wQDsfkPLqHKHsZZw7HQGUW1d1tsgGnuLEmWyZgxfb9R52XM6yKjE GHwnr5il+Ky4wihjPVshREPyYFc4JoNbitulfcaR+sSmiVD8cfzrqDprzLMS53oGZE96 X3z9pB1yebwX91yxgmGegp98KFdxJK3jE8b214zkyMnqikMnl1D8+0dNI/bSWoYRJMrc 0Fu4G6dYlZFJskosdRbmT9jCRlQudr7+vHX/o/UBHihuakATSU4Wck+jHpf8oLLl6id/ leLpilHjIXIe3VQAHaL/L5q4b62t/sqsQrA0aHM8H3eNbsscGNCt+aaLQuhJL22QfVH4 uX3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=OA/XGXmOEMtj1FA9u09OZtpnQ8FkaPB4CAdkSQEJylI=; b=f+yDPm+nhnpPDsYOarDd7o/43eS8bgNJNdSOELyrmOmR+jEvzCpSinlQ/7PigjJiDL Z1LCGCzBdKWt5pzR70nm9RyGttZur+uzvESuEi2fU3pWlqRhw8ApMZkpc2tD2dCBnWK0 U9tN8n+an+wUUF2q2V5A0f2RCK23KXW+495MEjfb8z+iMrxaccp8MwLu6rmS4eSSSMa8 WwJVuj+SwkY4LqHelgrwEXUuyL3KNRn+a7q0XjEPKfUJSVY3kB2WxGBURGJ3DZOQ7JAs ovUvgDUcE9PEYaPlVC5D6n33c88Kk8Bp4mhUMw3znM/uHYxSiu0/8ONyfVPZmO5Ts8aL Kc4A== X-Gm-Message-State: AMCzsaUp1T51bTE3SdmEJF68oWY/ZHTrLs/RXu/145adrdDLtpyS9VL+ h2rpS/oYtzVKpmkjU3/U252JK0OX+0/q1KFxVBUq4Q== X-Google-Smtp-Source: AOwi7QCV8mcTR4PXVpWfGpgUYbiM1KoaRnWJjLq6bDAbeoSU5aQTYjaXxlcVKTeTIH2ZfIUQVDbWrZccCuXOi6DFO3s= X-Received: by 10.80.204.72 with SMTP id n8mr15859874edi.122.1508223740155; Tue, 17 Oct 2017 00:02:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.214.12 with HTTP; Tue, 17 Oct 2017 00:02:19 -0700 (PDT) In-Reply-To: References: From: =?UTF-8?Q?Roberto_Fern=C3=A1ndez?= Date: Tue, 17 Oct 2017 09:02:19 +0200 Message-ID: Subject: Re: apart difficulties To: Christopher Bowman Cc: freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Oct 2017 07:02:22 -0000 Hi Cristopher, before starting I was wandering why have you chose a MBR partitioning scheme instead of a GPT one, but never the less, I will try to help you with that. 2017-10-17 6:13 GMT+02:00 Christopher Bowman : > I have a home server with a fairly large amount of zfs disk space where I= keep all of my persistent data. As a result when new releases of FreeBSD = come out I tend backup the root images of my machines to the zfs pool and, = starting with the least important box, I blow away all the local partitions= and reinstall from scratch. Then I mount the server zfspool and restore c= onfig files and packages. As a result my machines stay pretty up to date a= nd clean. Lately rather than burning DVDs I=E2=80=99ve decided that I will= create a usb boot disks containing the entire DVD contents and simply go d= own the line and and install on one machine after the other. My machine ca= n now all boot off USB but don=E2=80=99t all have DVD drives. > > I have the following script below which I was using to try configure an M= BR bootable memory stick. The commented out lines are a reminder to myself= of how to copy over the ISO contents to the slice I create (I only do this= when there is a new release so I forget.) > > gpart create -s MBR da0 > gpart add -i 1 -t freebsd da0 > gpart set -a active -i 1 da0 > gpart bootcode -b /boot/mbr da0 > gpart create -s BSD -n 8 da0s1 > gpart add -t freebsd-ufs -i 1 da0s1 > gpart bootcode -p /boot/boot -i 1 da0s1 If you do here the following (instead of what you did above) should work just fine: gpart create -s GPT da0 gpart add -i1 -s 256k -t freebsd-boot -b 40 da0 gpart add -i2 -t freebsd-ufs da0 gpart bootcode -b /boot/pmbr -p /boot/gptboot -i1 da0 If you insist in having a BSD partitioning inside a MBR one, I should took a deeper look into the code and analyze why it is not working as it should. > # newfs da0s1a > # mount /dev/da0s1a /mnt/usb > # mdconfig -a -t vnode -f /u1/ISOs/FreeBSD/11.1/FreeBSD-11.1-RELEASE-amd6= 4-dvd1.iso > # mount -t cd9660 /dev/md0 /mnt/dvd > # cp -pr /mnt/dvd/* /mnt/usb > # umount /mnt/usb > > What I=E2=80=99ve found that=E2=80=99s interesting is that the slice crea= tion doesn=E2=80=99t seem to be persistent. By that I mean that if I run t= he above script (included the commented stuff.) I can clearly see the /mnt= /usb contents are the same as the DVD. If I then unmount /mnt/usb and remo= ve the stick when I put it back in gpart show doesn=E2=80=99t seems to show= the BSD label, just the MBR slice > > If I reinsert and do the following: > gpart create -s BSD -n 8 da0s1 > gpart add -t freebsd-ufs -i 1 da0s1 > gpart bootcode -p /boot/boot -i 1 da0s1 > fsck /dev/da0s1a > mount /dev/da0s1a /mnt/usb > > Then the file system is there just as before. The slice creation doesn= =E2=80=99t seem persistent. Am I missing something? Is there something I = have to do to commit the slice? Is this a bug? > > I appreciate your help. > > Christopher > _______________________________________________ > 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 Tue Oct 17 07:24:46 2017 Return-Path: Delivered-To: freebsd-hackers@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 6981AE3117D for ; Tue, 17 Oct 2017 07:24:46 +0000 (UTC) (envelope-from crb@chrisbowman.com) Received: from mail-pf0-x232.google.com (mail-pf0-x232.google.com [IPv6:2607:f8b0:400e:c00::232]) (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 3DD672B88 for ; Tue, 17 Oct 2017 07:24:46 +0000 (UTC) (envelope-from crb@chrisbowman.com) Received: by mail-pf0-x232.google.com with SMTP id b6so719919pfh.7 for ; Tue, 17 Oct 2017 00:24:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisbowman-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=IfZ61Bq9e5tY+bjMxCwTD6rusY3/kxErrm+UqPzE1Pc=; b=io370iD7i2JDtcFDgEs/K9XmhmpqhCgUoF5eO+AGbozKo/76dKHy4GID692b44Idq8 j9xMUoXU7AKzJr9HvJJlwTqJKAEveQ+Wl1QNAYZ9rDocxSIiBnz3oDRmOZdmZfNRvR0I wvmbyFcfEcAp86pJCsfthcpB+tQQmTjxkMPeiuM3Oor1z6EJYhsqYR33YMAbUy0R3Mi7 RtUvS86jg/YVS6O4xQvTWpg5lVPYND9548jG2jDIn2QhMwvmCG/pT3U0kZYu++TKae4c GmkYarazIT/l6iEgzIPdrn5YlEn1anOoswMOxDQMb/Fk67iMWLalOv2wvLRYb46cZZG8 LONg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=IfZ61Bq9e5tY+bjMxCwTD6rusY3/kxErrm+UqPzE1Pc=; b=PT92D+TpmJeCiQnNKzTxVu0XMpQi+Ktkjwmn3GmeGI0vt61MTFAiWQzJFyOJjtctEo XEo87J4IkQc+U5Qsx5qTRlz3hkLLzPUNSmSuQEFi9S4mDJxkqFzIldgvLHW45O703rbN Vy4lSbT4rV9fM51pWZWA8c7m/YNLyaZEOKy4UlcERjw7JYq2so+N5TfFTIV+8aewJNIu YecLa0fXj2OmqXGVik00psL+eQ2HwqLgQg/sGJDEwBPR9hNlzk7Uo31sqo/thPg8/DyL Ph2s/QktUjXSQ0AFNCcYLGA10k2DW81yIdqENt9DjopkMvUdxP5zbP+d0q018fvdSYyI rWqg== X-Gm-Message-State: AMCzsaUaQt+7CFycZGS+qsFGUqFEA7M8SZkR6/a3ofVQVhn4jJnlVI2I MxdA4yQI0AKZMCXW2zhk5m0Dtr//+aGHIA== X-Google-Smtp-Source: AOwi7QAQgNjgGoU3kJfL5/+hJWlDFcvFEnePYLjuCjMEnA6jPhFD3b3UyZ3uaMgB6jK1uieRCBn7fw== X-Received: by 10.159.247.199 with SMTP id v7mr10948501plz.321.1508225085540; Tue, 17 Oct 2017 00:24:45 -0700 (PDT) Received: from ?IPv6:2601:647:4e00:bbb5:5d49:e9e8:ddd7:93cf? ([2601:647:4e00:bbb5:5d49:e9e8:ddd7:93cf]) by smtp.gmail.com with ESMTPSA id g5sm16939817pgo.83.2017.10.17.00.24.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Oct 2017 00:24:44 -0700 (PDT) From: Christopher Bowman Message-Id: <212A072E-D083-4622-BCF0-9C2FD88BE396@chrisbowman.com> Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: apart difficulties Date: Tue, 17 Oct 2017 00:24:43 -0700 In-Reply-To: Cc: freebsd-hackers@freebsd.org To: =?utf-8?Q?Roberto_Fern=C3=A1ndez?= References: X-Mailer: Apple Mail (2.3273) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Oct 2017 07:24:46 -0000 Roberto, I=E2=80=99m not sure all my machines can boot a gpt partition so = I wanted the least common denominator. I have a handful of these cheap = small flash sticks that I intend to use for various version and there = isn=E2=80=99t really a benefit to gpt (except that it might actually = work). I would look into the code but I haven=E2=80=99t a clue where = that would be and I figured someone else might be more of an expert in = this area and could find it faster. Thanks for the comments and the gpt suggestion, I may actually = try that. Christopher > On Oct 17, 2017, at 12:02 AM, Roberto Fern=C3=A1ndez = wrote: >=20 > Hi Cristopher, >=20 > before starting I was wandering why have you chose a MBR partitioning > scheme instead of a GPT one, but never the less, I will try to help > you with that. >=20 > 2017-10-17 6:13 GMT+02:00 Christopher Bowman >: >> I have a home server with a fairly large amount of zfs disk space = where I keep all of my persistent data. As a result when new releases = of FreeBSD come out I tend backup the root images of my machines to the = zfs pool and, starting with the least important box, I blow away all the = local partitions and reinstall from scratch. Then I mount the server = zfspool and restore config files and packages. As a result my machines = stay pretty up to date and clean. Lately rather than burning DVDs = I=E2=80=99ve decided that I will create a usb boot disks containing the = entire DVD contents and simply go down the line and and install on one = machine after the other. My machine can now all boot off USB but = don=E2=80=99t all have DVD drives. >>=20 >> I have the following script below which I was using to try configure = an MBR bootable memory stick. The commented out lines are a reminder to = myself of how to copy over the ISO contents to the slice I create (I = only do this when there is a new release so I forget.) >>=20 >> gpart create -s MBR da0 >> gpart add -i 1 -t freebsd da0 >> gpart set -a active -i 1 da0 >> gpart bootcode -b /boot/mbr da0 >> gpart create -s BSD -n 8 da0s1 >> gpart add -t freebsd-ufs -i 1 da0s1 >> gpart bootcode -p /boot/boot -i 1 da0s1 >=20 > If you do here the following (instead of what you did above) should > work just fine: > gpart create -s GPT da0 > gpart add -i1 -s 256k -t freebsd-boot -b 40 da0 > gpart add -i2 -t freebsd-ufs da0 > gpart bootcode -b /boot/pmbr -p /boot/gptboot -i1 da0 >=20 > If you insist in having a BSD partitioning inside a MBR one, I should > took a deeper look into the code and analyze why it is not working as > it should. >=20 >> # newfs da0s1a >> # mount /dev/da0s1a /mnt/usb >> # mdconfig -a -t vnode -f = /u1/ISOs/FreeBSD/11.1/FreeBSD-11.1-RELEASE-amd64-dvd1.iso >> # mount -t cd9660 /dev/md0 /mnt/dvd >> # cp -pr /mnt/dvd/* /mnt/usb >> # umount /mnt/usb >>=20 >> What I=E2=80=99ve found that=E2=80=99s interesting is that the slice = creation doesn=E2=80=99t seem to be persistent. By that I mean that if = I run the above script (included the commented stuff.) I can clearly = see the /mnt/usb contents are the same as the DVD. If I then unmount = /mnt/usb and remove the stick when I put it back in gpart show doesn=E2=80= =99t seems to show the BSD label, just the MBR slice >>=20 >> If I reinsert and do the following: >> gpart create -s BSD -n 8 da0s1 >> gpart add -t freebsd-ufs -i 1 da0s1 >> gpart bootcode -p /boot/boot -i 1 da0s1 >> fsck /dev/da0s1a >> mount /dev/da0s1a /mnt/usb >>=20 >> Then the file system is there just as before. The slice creation = doesn=E2=80=99t seem persistent. Am I missing something? Is there = something I have to do to commit the slice? Is this a bug? >>=20 >> I appreciate your help. >>=20 >> Christopher >> _______________________________________________ >> 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 Tue Oct 17 16:32:43 2017 Return-Path: Delivered-To: freebsd-hackers@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 E1F2BE3FADE for ; Tue, 17 Oct 2017 16:32:43 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com [IPv6:2a00:1450:400c:c09::231]) (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 8DA78743B1 for ; Tue, 17 Oct 2017 16:32:43 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: by mail-wm0-x231.google.com with SMTP id i124so4991156wmf.3 for ; Tue, 17 Oct 2017 09:32:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=longcount-org.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=hFqIwZSKdCSotuURXCpRi7OSmADbgli0taN7925Ha3g=; b=m93L9UOJ8uLvepMZRkYJ4A2b6LfNoUFn91mk3zUYJ+p9/+q6F4+6H5h5Gj1OqUNUxw lL99axNX1fJk/U1DGPtVdHcH3UyOOP9D2xtV/zUOMShOi0VkRoIwACuquOWrCqghoIT2 B3RsdtJWc2olwtrqhAwZRTGjkqm2Lq/n6OoUPtA0q5riw4lhnCBNCd/8cwBaEB0/6WNA modb6o3s+c6q/iuCvDtmCilkoinbbUpZast958l0JKP6BDBLduPynqZRvbnDPA0HYUwX uKb78bi0WWWs1H78ByI6yR4yy7NOkloetIM70m49Ut6GZj03ioi3jojJ84TMSf2nwRM9 0+wA== 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=hFqIwZSKdCSotuURXCpRi7OSmADbgli0taN7925Ha3g=; b=SQHXQeU6bNLmM81WAR0yHLvlx3hXGgIvouGw/w2ySLgGWgrCMqrsztsyXYhleJH0qK CehBX849PyXZMfiemVsiJ7ox8k6kN4LS4oxww0svWH5jszvTD2ddJG3bfHsLsfE7lGcE 2xy4qamqHcN+MAk8h8bbeUUfp70Mvhq4xmMz2Cjc9eCqfmhswRjWawsj4mpS4/Tacnfu 1d2Y3DVNQ1XrnUfL+rL2pRfh65HgV4IJ4rQ0sc6wwKIqRWXbgqx5Mv9O/yv2Qt9MQTPM 9A4TYQpcl7hpdwCOPI1zDd4KfF3xIdGj2GDqVhIc1dPfDhf8UYTysvWVBvfTiddw+3CF Ecxw== X-Gm-Message-State: AMCzsaUzNdW0XUn5MCufU7DjnMGqu/BKy1WNOGLs84psZFBban1TZE61 LH9Y+mM9guUYbDF8zzfj044ykj1NP/H5ltBii9K9YeprGJ5thw== X-Google-Smtp-Source: AOwi7QAuqqlTJId0yMPNPeJAVj/pUm3V2cwF6sd3q6965diWtuR77xG4F3Afnk8lwvOScPD5Pz9rq2/0qJddeVfpL/8= X-Received: by 10.80.231.145 with SMTP id b17mr17961542edn.94.1508257961294; Tue, 17 Oct 2017 09:32:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.178.6 with HTTP; Tue, 17 Oct 2017 09:32:40 -0700 (PDT) X-Originating-IP: [104.244.212.9] From: Mark Saad Date: Tue, 17 Oct 2017 12:32:40 -0400 Message-ID: Subject: Anyone using Solarflare on FreeBSD 10-STABLE ? To: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Oct 2017 16:32:44 -0000 Hello I was wondering if anyone else out there was using the solarflare cards supported via the sfxge driver on 10.3-STABLE. Speificly I wanted to know if anyone knew what this sysctl refers to dev.sfxge.NN.stats.rxdp_di_dropped_pkts -- mark saad | nonesuch@longcount.org From owner-freebsd-hackers@freebsd.org Tue Oct 17 17:36:23 2017 Return-Path: Delivered-To: freebsd-hackers@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 3FBEFE41307 for ; Tue, 17 Oct 2017 17:36:23 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (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 221DD7698A for ; Tue, 17 Oct 2017 17:36:23 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from Ticonderoga.HML3.ScaleEngine.net (senat1-01.HML3.ScaleEngine.net [209.51.186.5]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 9778E138A3; Tue, 17 Oct 2017 17:36:21 +0000 (UTC) Subject: Re: Anyone using Solarflare on FreeBSD 10-STABLE ? To: freebsd-hackers@freebsd.org References: Cc: Philip Paeps From: Allan Jude Message-ID: Date: Tue, 17 Oct 2017 13:36:20 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Oct 2017 17:36:23 -0000 On 10/17/2017 12:32, Mark Saad wrote: > Hello > I was wondering if anyone else out there was using the solarflare > cards supported via the sfxge driver on 10.3-STABLE. Speificly I > wanted to know if anyone knew what this sysctl refers to > > dev.sfxge.NN.stats.rxdp_di_dropped_pkts > > I have two 11.1 boxes with a dual ported sfxge each, but I have no idea what that counter is trying to describe. The man page says this is Philip's fault. -- Allan Jude From owner-freebsd-hackers@freebsd.org Tue Oct 17 17:54:16 2017 Return-Path: Delivered-To: freebsd-hackers@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 D3937E41E1E for ; Tue, 17 Oct 2017 17:54:16 +0000 (UTC) (envelope-from philip@freebsd.org) Received: from weatherwax.trouble.is (weatherwax.trouble.is [176.58.93.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "weatherwax.trouble.is", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 98865778DA; Tue, 17 Oct 2017 17:54:16 +0000 (UTC) (envelope-from philip@freebsd.org) Received: from rincewind.trouble.is (rincewind.trouble.is [IPv6:2a01:4f8:a0:10e6::1:1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "rincewind.trouble.is", Issuer "Let's Encrypt Authority X3" (verified OK)) by weatherwax.trouble.is (Postfix) with ESMTPS id 3yGjVm2jypzs3y; Tue, 17 Oct 2017 17:54:08 +0000 (UTC) X-Clacks-Overhead: GNU Terry Pratchett Received: from twoflower.trouble.is (ptr-81ki18eu3iibixr70kk.18120a2.ip6.access.telenet.be [IPv6:2a02:1811:c13:1901:e139:90b1:306d:fda4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: philip) by rincewind.trouble.is (Postfix) with ESMTPSA id 3yGjVl6mBLzKwr; Tue, 17 Oct 2017 17:54:07 +0000 (UTC) From: "Philip Paeps" To: "Allan Jude" Cc: freebsd-hackers@freebsd.org, arybchik@freebsd.org Subject: Re: Anyone using Solarflare on FreeBSD 10-STABLE ? Date: Tue, 17 Oct 2017 19:54:06 +0200 Message-ID: <333473BB-43C3-4E3E-B62F-03DE5650E403@freebsd.org> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; format=flowed; markup=markdown X-Mailer: MailMate (1.9.7r5425) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Oct 2017 17:54:16 -0000 On 2017-10-17 19:36:20 (+0200), Allan Jude wrote: > On 10/17/2017 12:32, Mark Saad wrote: >> I was wondering if anyone else out there was using the solarflare >> cards supported via the sfxge driver on 10.3-STABLE. Yes. >> Speificly I wanted to know if anyone knew what this sysctl refers to >> >> dev.sfxge.NN.stats.rxdp_di_dropped_pkts > > I have two 11.1 boxes with a dual ported sfxge each, but I have no > idea > what that counter is trying to describe. > > The man page says this is Philip's fault. This code is not my fault! ;-) I believe arybchik added it. Looking at the code, it's packets that have been dropped in the data path by the dispatcher cpu. Probably related to virtual functions? arybchik (Cc:ed) likely has a more recent datasheet than I do! Philip -- Philip Paeps Senior Reality Engineer Ministry of Information From owner-freebsd-hackers@freebsd.org Tue Oct 17 19:15:33 2017 Return-Path: Delivered-To: freebsd-hackers@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 1EAA2E44E2E for ; Tue, 17 Oct 2017 19:15:33 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com [IPv6:2a00:1450:400c:c09::231]) (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 B84207F542 for ; Tue, 17 Oct 2017 19:15:32 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: by mail-wm0-x231.google.com with SMTP id q124so5855594wmb.0 for ; Tue, 17 Oct 2017 12:15:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=longcount-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=gB4eU9CrpICSnXtr2cJjw+Y8Ev0Kf2wCNYmnfBlv94Q=; b=t6CIhj3KiSlJXekg/xEpBmcHh3CqGfxIxlcfKRDw0G4L/2/dkuLeC62heGOQBWl+dL OrF2l2EDcN7gCDEfZt0nUb0KCQpZF3NK+L5TFVnNAqy0J7Q1R3NFs74UVu8zJwfIaUPW 2nRtC4tpP3KRbiciVwwRDReBzgoYj3qelrgWa+nSzuQzhOP3bVkd+zscxVZ4Tz/JZS/D 7dw540pehMt5vBycl/jqfsysdvcZZ/N7ir+/O8bLjkMq2X8apQLkjJCEdX+TkfVYre6U 9Y9dVDad9JXtA7dxQWGVn9VtQ5fEnXpAGiIdBZfZ1zSR77DHvvv4Lm0oqVLGEgb0cZtI sU5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=gB4eU9CrpICSnXtr2cJjw+Y8Ev0Kf2wCNYmnfBlv94Q=; b=jl1C1kttZoioHBSqxrqMTLuTm2Ksr1csWVYPViKvMiE6N4oLs/e2vBg599KeAM33UX wvTal2UMYIAJwYZDqwTnfprvLFo31BBgjjL5zQqmEa2Zsl6TXb69rleTC30Pnnx29gUW xj845YqF8Is1ItmxqrPu0Kx1FKKI6fTjlPvP5L13gGiwYzraZxkBUt89+Or1n4Rc4s1I tv5Tv+9Xq4uCD/Q2FHxEdzNt6r1n99rR7LOz8T5CSeXUGGv3XTiKBsy83Fqy7XJJ/Y4j OogTFBXMeZ3F0uhmNYntsPqiALgnaI7L5tIqBmiOjbM/DstigbcEHzJ8G+uAH5kkhQ4P 4IPw== X-Gm-Message-State: AMCzsaU0Wr71SWGv46t/72gxnbTcwankF0etSox3cnHQy64TKQiVSK77 aqX1KOO/UpEjQjgnXwJoqWynLg0iDsb7xfUjZPfMdcRH1qk= X-Google-Smtp-Source: AOwi7QC8Vrlh4G+Ep/xSg1afoyNksCqNismfhGq+kZNQpDH8FGfb8AN1nKqpQBPIiufyMUZKfSsAXX7C1DXzeM/vVTk= X-Received: by 10.80.196.3 with SMTP id v3mr18040320edf.272.1508267730801; Tue, 17 Oct 2017 12:15:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.178.6 with HTTP; Tue, 17 Oct 2017 12:15:30 -0700 (PDT) X-Originating-IP: [104.244.212.9] In-Reply-To: <333473BB-43C3-4E3E-B62F-03DE5650E403@freebsd.org> References: <333473BB-43C3-4E3E-B62F-03DE5650E403@freebsd.org> From: Mark Saad Date: Tue, 17 Oct 2017 15:15:30 -0400 Message-ID: Subject: Re: Anyone using Solarflare on FreeBSD 10-STABLE ? To: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Oct 2017 19:15:33 -0000 On Tue, Oct 17, 2017 at 1:54 PM, Philip Paeps wrote: > On 2017-10-17 19:36:20 (+0200), Allan Jude wrote: >> >> On 10/17/2017 12:32, Mark Saad wrote: >>> >>> I was wondering if anyone else out there was using the solarflare >>> cards supported via the sfxge driver on 10.3-STABLE. > > > Yes. > >>> Speificly I wanted to know if anyone knew what this sysctl refers to >>> >>> dev.sfxge.NN.stats.rxdp_di_dropped_pkts >> >> >> I have two 11.1 boxes with a dual ported sfxge each, but I have no idea >> what that counter is trying to describe. >> >> The man page says this is Philip's fault. > > > This code is not my fault! ;-) I believe arybchik added it. > > Looking at the code, it's packets that have been dropped in the data path by > the dispatcher cpu. Probably related to virtual functions? > > arybchik (Cc:ed) likely has a more recent datasheet than I do! > > Philip > Solarflare replied to my support request I raised with them saying ... "This counter is of packets discarded in hardware due to not being address to this host, or to any multicast group it is subscribed to. Seeing a very high number here usually indicates the switch is not performing IGMP snooping, and is forwarding all multicast; or that there is some routing issue. However it will also usually tick up over time, due to route discovery protocols." I have no idea how you get to that; as a result of reading that oid, but ok if they say so. I was just being cautious I disabled the Event Merge Timeout on the card and I was just watching the card counters , among other things, to see if there was any drops as a result. > -- > Philip Paeps > Senior Reality Engineer > Ministry of Information > > _______________________________________________ > 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" -- mark saad | nonesuch@longcount.org From owner-freebsd-hackers@freebsd.org Tue Oct 17 19:50:17 2017 Return-Path: Delivered-To: freebsd-hackers@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 492C7E45E15 for ; Tue, 17 Oct 2017 19:50:17 +0000 (UTC) (envelope-from Andrew.Rybchenko@oktetlabs.ru) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [84.52.114.115]) (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 EF87080760; Tue, 17 Oct 2017 19:50:16 +0000 (UTC) (envelope-from Andrew.Rybchenko@oktetlabs.ru) Received: from [192.168.239.128] (unknown [188.242.181.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 62E0C7F4CE; Tue, 17 Oct 2017 22:44:57 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.9.2 shelob.oktetlabs.ru 62E0C7F4CE Authentication-Results: shelob.oktetlabs.ru/62E0C7F4CE; dkim=none reason="no signature"; dkim-adsp=none (unprotected policy); dkim-atps=neutral Subject: Re: Anyone using Solarflare on FreeBSD 10-STABLE ? To: Philip Paeps , Allan Jude , Mark Saad Cc: freebsd-hackers@freebsd.org References: <333473BB-43C3-4E3E-B62F-03DE5650E403@freebsd.org> From: Andrew Rybchenko Message-ID: <7951e7d5-b5e6-033d-0b51-1d4a10946937@oktetlabs.ru> Date: Tue, 17 Oct 2017 22:44:55 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <333473BB-43C3-4E3E-B62F-03DE5650E403@freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Oct 2017 19:50:17 -0000 On 10/17/2017 08:54 PM, Philip Paeps wrote: > On 2017-10-17 19:36:20 (+0200), Allan Jude wrote: >> On 10/17/2017 12:32, Mark Saad wrote: >>> Speificly I wanted to know if anyone knew what this sysctl refers to >>> >>> dev.sfxge.NN.stats.rxdp_di_dropped_pkts >> >> I have two 11.1 boxes with a dual ported sfxge each, but I have no idea >> what that counter is trying to describe. >> >> The man page says this is Philip's fault. > > This code is not my fault! ;-)  I believe arybchik added it. > > Looking at the code, it's packets that have been dropped in the data > path by the dispatcher cpu.  Probably related to virtual functions? Philip, thanks. I don't think in this particular case it is related to virtual functions. Basically the counter means that ingress packet does not match any installed filter. E.g. promiscuous mode is disabled and:  - destination MAC is unicast and not the interface MAC address, OR  - destination MAC is multicast and there is no matching multicast address added. There is a race condition as well on interface bring up when packet is received but default filters are not installed yet. SFN8522 and SFN8542 have other cases for encapsulated traffic depending on driver version (right now I don't remember the state in 10-STABLE). Mark, let me know if I can help more. Andrew. From owner-freebsd-hackers@freebsd.org Wed Oct 18 12:28:03 2017 Return-Path: Delivered-To: freebsd-hackers@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 D5D42E37992 for ; Wed, 18 Oct 2017 12:28:03 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward106o.mail.yandex.net (forward106o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::609]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7442B7749C for ; Wed, 18 Oct 2017 12:28:03 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from mxback6j.mail.yandex.net (mxback6j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10f]) by forward106o.mail.yandex.net (Yandex) with ESMTP id 7A3AC7816A9; Wed, 18 Oct 2017 15:27:59 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback6j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id cIjQP6wBh5-RwKac8Gl; Wed, 18 Oct 2017 15:27:59 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1508329679; bh=iHdqJHlkjJrMbqZ5xcO40xhuJlfaiddR2+4b8Tpheag=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=gSqbFdiShJLKkfz136oNdea4aZ+lkAoPZGSzFg96rD7uYG+IiHV/7s6fdp/2vQuiu XXj5S6y/fZuAqWer8vUzSE3dHaaJOVJvT/rrtC9C78iOzIio1iyN4Sbxq+a4W/AxvR KIWPjOiqlPCYxJgalcq05rUpmVbS3cjITleaqRd4= Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 7HN4En5CUF-RwOONB8m; Wed, 18 Oct 2017 15:27:58 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1508329678; bh=iHdqJHlkjJrMbqZ5xcO40xhuJlfaiddR2+4b8Tpheag=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=hS4QRWZgjw+McWVCFLLPIBjSLDGSOOrpvLvtkf3pY4GCNk2nPxYkbxj5LHzsKGbzB HbQPAbwosC0Bu8CyQaplhuXRaCPTQXlxF4tPDn19cZkoPpzSiDpBZGGypkkPV5TbpT m6uZutFqonrgVjnVR+mQkH26Yq57JcQYcbwOJwN0= Authentication-Results: smtp3o.mail.yandex.net; dkim=pass header.i=@yandex.ru Subject: Re: apart difficulties To: Christopher Bowman , freebsd-hackers@freebsd.org References: From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Message-ID: Date: Wed, 18 Oct 2017 15:27:22 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="PCKGpg2ljPjJXSKx78xKDbiKUQcloW7xM" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Oct 2017 12:28:03 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PCKGpg2ljPjJXSKx78xKDbiKUQcloW7xM Content-Type: multipart/mixed; boundary="9rWNv7U9GfaFVfaOI2BHnEv4w5NxFbmuH"; protected-headers="v1" From: "Andrey V. Elsukov" To: Christopher Bowman , freebsd-hackers@freebsd.org Message-ID: Subject: Re: apart difficulties References: In-Reply-To: --9rWNv7U9GfaFVfaOI2BHnEv4w5NxFbmuH Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 17.10.2017 07:13, Christopher Bowman wrote: > I have a home server with a fairly large amount of zfs disk space where= I keep all of my persistent data. As a result when new releases of Free= BSD come out I tend backup the root images of my machines to the zfs pool= and, starting with the least important box, I blow away all the local pa= rtitions and reinstall from scratch. Then I mount the server zfspool and= restore config files and packages. As a result my machines stay pretty = up to date and clean. Lately rather than burning DVDs I=E2=80=99ve decid= ed that I will create a usb boot disks containing the entire DVD contents= and simply go down the line and and install on one machine after the oth= er. My machine can now all boot off USB but don=E2=80=99t all have DVD d= rives. >=20 > I have the following script below which I was using to try configure an= MBR bootable memory stick. The commented out lines are a reminder to my= self of how to copy over the ISO contents to the slice I create (I only d= o this when there is a new release so I forget.) >=20 > gpart create -s MBR da0 > gpart add -i 1 -t freebsd da0 > gpart set -a active -i 1 da0 > gpart bootcode -b /boot/mbr da0 > gpart create -s BSD -n 8 da0s1 > gpart add -t freebsd-ufs -i 1 da0s1 > gpart bootcode -p /boot/boot -i 1 da0s1 BSD label uses embedded into partition table bootcode. You need to use "-b /boot/boot" argument to install it. What is going in your case: BSD label metadata was stored in first sector of da0s1 and GEOM object of PART_BSD class was created. Then you added partitions, that starts from zero offset, i.e. it contains BSD label metadata. Then /boot/boot content was written into da0s1a, and it has overridden BSD label. But since da0s1a is separate GEOM provider, the spoiling did not worked for da0s1. --=20 WBR, Andrey V. Elsukov --9rWNv7U9GfaFVfaOI2BHnEv4w5NxFbmuH-- --PCKGpg2ljPjJXSKx78xKDbiKUQcloW7xM 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 - http://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAlnnSKoACgkQAcXqBBDI oXo9SQgAkTIZE5IJRBaKz2KhKTGvi7CuuZvOfNvowc0E9KHF57+CVL9za3Y23kYj ftC0qFgCu/IOsdUaYosDwS5ZyZXpPMapeXq41uJjpoFGI3KUUzpVG5VfcenSMpeJ 55ITq1TOpbZbGusQI6jEbjIRgz+W9QzQ0ABFig7Yy7vgjo6ooafSjR9uqXoIOYX+ OukUnEFca0fkjMVHTVsgOzvLBt+JAGevL+7NjaQzvHOTjsb5AYpCBUkh+sFXGVJe Hlgwd2NjsmbJ5URn3fOdUtAaoAO469R4JZdoIsgLH5Ib4DnJrbZtWB6SZRARc01u n8Srmp5WdQh08YVqXvvZYuWUbm6e3w== =KZJV -----END PGP SIGNATURE----- --PCKGpg2ljPjJXSKx78xKDbiKUQcloW7xM-- From owner-freebsd-hackers@freebsd.org Thu Oct 19 04:25:06 2017 Return-Path: Delivered-To: freebsd-hackers@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 ADA59E51594 for ; Thu, 19 Oct 2017 04:25:06 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com [IPv6:2a00:1450:400c:c09::234]) (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 44A587D2EC for ; Thu, 19 Oct 2017 04:25:06 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: by mail-wm0-x234.google.com with SMTP id i124so13275370wmf.3 for ; Wed, 18 Oct 2017 21:25:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=NmwwDYuLKNfICREdQIgh1ilYpb+Vw1sqNgQDvoug3jo=; b=p2DfBPLjhmjiH8NjT6k81EazXiPXonYezHBCcd/u3abqlnkQjDtujOLKo7JYoKBzDH ecx+vyklzwjBZw0vxsz1Z98uNIwRctiXQ5wQjJ8D9TsY1JFQP7/TV5qgXi9xhXWh8nzX 1WvKEH8ylzy0lD9NDfDAW92OK3pK1IFo+r1qPKOumqkpQJBZliTaD08Yem29MPHFQdJ/ WK2bZoLzqqNV1XlEzri822CLQiSLGt/nVwvWZ97pM3jIsaTG3FcbnwWZZsXllec8F7oG cYbE316jen78S4Ahj/3gf5sbDMvgfwslq1ccR+nc2DXSAvocXZexDO2nRx7RnYdqyWXl o6Gg== 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=NmwwDYuLKNfICREdQIgh1ilYpb+Vw1sqNgQDvoug3jo=; b=SisUsE4CSJIgbe1vGCxXu17HcKW+xSTK1bbUF1Dq367CDBsTaXzI2FxHOZ2GUsJmoC LP5Dd/qcbWS/o++oenu5N661568VBnF4Ysuiab1063CT1I/25jtgvLlvUpsysiwTSN3C kup3V2KgNUzZ2HM387+BeWe36tuXSGFkNoqn9AiXJdO/iWp8P4UEW/w5TARj0pWNcwCs v9a9QK6UHmtLD/IBCNi2G4bVV95jwMRpra/bh3EUE2Aqh/FVTMxDTwbFYzHs6YIQypID UulU7HHkMmBCtTjMffx1U6fbIer8YCLx+WY5ESQwYxjFoJFaO/apE7T5RNxuzj7kqSlt kc9w== X-Gm-Message-State: AMCzsaUmn0LKoZkOhcAI54AqD4OSu1lMc73EjTLmJi9UBmSmpXuvTDVt GXAoLFgwxjxs+SolkzNvrjJI+JCB29PIN7LAzNJl X-Google-Smtp-Source: ABhQp+Tp1WUDgAduzMQCB8NRgVI/SkubfKgSkMNucPzPy7Fk55wa5m4kDxmiqirWz3si2+s60ym18e1/t1FipIBAtew= X-Received: by 10.80.217.15 with SMTP id t15mr762822edj.217.1508387104429; Wed, 18 Oct 2017 21:25:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.189.139 with HTTP; Wed, 18 Oct 2017 21:25:03 -0700 (PDT) From: Zaphod Beeblebrox Date: Thu, 19 Oct 2017 00:25:03 -0400 Message-ID: Subject: We do serial differently. To: FreeBSD Hackers Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Oct 2017 04:25:06 -0000 How does FreeBSD do serial differently than Linux or MacOS or Windows? Now... this isn't _exactly_ serial, but the serial that is emulated by the arduino driver in ports. The issue is that running the arduino IDE works (and it boots with the loaded code), but then running 'pronterface' fails to connect --- looking all-the-while like one-way communication. I see someone else basically having the same problem and claiming that hacking a trace (that affects the DTR response) on the arduino fixes it for FreeBSD (see https://plus.google.com/+MiroslavPrymek/posts/6TDdbuoNhzH )... Given this information, can I stty my way out of this problem? Can I make a small modification to pronterface? From owner-freebsd-hackers@freebsd.org Thu Oct 19 10:06:05 2017 Return-Path: Delivered-To: freebsd-hackers@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 48EDCE363F3 for ; Thu, 19 Oct 2017 10:06:05 +0000 (UTC) (envelope-from rb@gid.co.uk) Received: from mx0.gid.co.uk (mx0.gid.co.uk [194.32.164.250]) (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 DEE5C634D5 for ; Thu, 19 Oct 2017 10:06:04 +0000 (UTC) (envelope-from rb@gid.co.uk) Received: from [194.32.164.30] ([194.32.164.30]) by mx0.gid.co.uk (8.14.2/8.14.2) with ESMTP id v9JA3mjf013464; Thu, 19 Oct 2017 11:03:48 +0100 (BST) (envelope-from rb@gid.co.uk) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: We do serial differently. From: Bob Bishop In-Reply-To: Date: Thu, 19 Oct 2017 11:03:46 +0100 Cc: FreeBSD Hackers Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Zaphod Beeblebrox X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Oct 2017 10:06:05 -0000 Hi, > On 19 Oct 2017, at 05:25, Zaphod Beeblebrox wrote: >=20 > How does FreeBSD do serial differently than Linux or MacOS or Windows? Quite likely only in the defaults when a port is opened. > Now... this isn't _exactly_ serial, but the serial that is emulated by = the > arduino driver in ports. >=20 > The issue is that running the arduino IDE works (and it boots with the > loaded code), but then running 'pronterface' fails to connect --- = looking > all-the-while like one-way communication. >=20 > I see someone else basically having the same problem and claiming that > hacking a trace (that affects the DTR response) on the arduino fixes = it for > FreeBSD (see https://plus.google.com/+MiroslavPrymek/posts/6TDdbuoNhzH = )... >=20 > Given this information, can I stty my way out of this problem? Can I = make > a small modification to pronterface? stty -clocal ... might help. All implementations of virtualised serial ports should (IMHO) provide a = software =E2=80=98breakout box=E2=80=99 which is the only sure way of = diagnosing this sort of problem. -- Bob Bishop rb@gid.co.uk From owner-freebsd-hackers@freebsd.org Thu Oct 19 11:32:52 2017 Return-Path: Delivered-To: freebsd-hackers@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 2C8C5E3843C for ; Thu, 19 Oct 2017 11:32:52 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c: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 B15D165B15 for ; Thu, 19 Oct 2017 11:32:51 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: by mail-wm0-x243.google.com with SMTP id u138so15371989wmu.5 for ; Thu, 19 Oct 2017 04:32:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=BiHtjcIMiwHa4nHh6o1oXxF6mS6DTmvKoVOuqm/AsA8=; b=H+EuxUOqtRnhf+roaab4/mW6NLKLjC9UbWg8Z/WN+gvx/5oEE0d1bTwuXOi4mI5KcO HW4RyaZEYhbRqSzQC5brzd5vZwsKSSgO1pdnpV3g6UAnczNHoZ1u9qP9wDa5DapkFRZ6 JU3O8l+YqAVkw2Pv4JqUsOuMPggKc9Bcx0g8zqrtkca7kXL9h65Bgxqw+w3b/VBHt1AT wnYF5FGNoVjf68TU8LoXR12DesYoARwAhpFckt/XC0KUEc5FShWF736wEUaQW90/BHH8 9QRkWu+hBLhGaFsYL/3K4VSAKnXg22D5FFyjvAp7zZJUH9m+XGcWhTZoY5OKvFskK/yV vVMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=BiHtjcIMiwHa4nHh6o1oXxF6mS6DTmvKoVOuqm/AsA8=; b=WOXFraD2S12raDJM/PEWh88BAC8PFtgWm42nCRuletcRxxH0lHN1SrZKcjt5AcDmMW +iZoX8EidBnUdEFQI5iT8/PcyJujTYkAe6WLN0DdmIqmRzTaGyrp8+9fanwvWCBgcSWv LS2TC4ldLb9EWrn8e4uBUDTgC7YLggC8Odld/5lNfZI4lxg5RheksqGksh6ALzl39qI+ 0gK8K4gag1Gw4SHZezOisi4H+EB4jUPJgnXjNxWEIG6u7cKoDHQP4uVQEo4i+S2vFHpB Iv9BNolWo+CY4Fq67ho4WjkL2JIz3v0241ZnrRt5oH9a7elEFFgJVncSkHcuSJ9lHY+P mrmA== X-Gm-Message-State: AMCzsaW29klw1yV1ZMrrQsWf5UrP6fRWkJ1iIAjL58hG+3hHvrsPhCRY QIYjLCWlxUYQCjiq0IjfOlo= X-Google-Smtp-Source: ABhQp+R4aSenwJ5bveradc6UpbqF5/WFKZOFOcr15dofVdyPAe7R/xqNtA5a6ZkfJd9WE4UIgz5bxA== X-Received: by 10.28.168.83 with SMTP id r80mr1338557wme.59.1508412769872; Thu, 19 Oct 2017 04:32:49 -0700 (PDT) Received: from ernst.home (p578E321D.dip0.t-ipconnect.de. [87.142.50.29]) by smtp.gmail.com with ESMTPSA id 69sm857458wmp.11.2017.10.19.04.32.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Oct 2017 04:32:48 -0700 (PDT) Date: Thu, 19 Oct 2017 13:32:47 +0200 From: Gary Jennejohn To: Bob Bishop Cc: Zaphod Beeblebrox , FreeBSD Hackers Subject: Re: We do serial differently. Message-ID: <20171019133247.69361225@ernst.home> In-Reply-To: References: Reply-To: gljennjohn@gmail.com X-Mailer: Claws Mail 3.15.1 (GTK+ 2.24.31; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Oct 2017 11:32:52 -0000 On Thu, 19 Oct 2017 11:03:46 +0100 Bob Bishop wrote: > Hi, > > > On 19 Oct 2017, at 05:25, Zaphod Beeblebrox wrote: > > > > How does FreeBSD do serial differently than Linux or MacOS or Windows? > > Quite likely only in the defaults when a port is opened. > > > Now... this isn't _exactly_ serial, but the serial that is emulated by the > > arduino driver in ports. > > > > The issue is that running the arduino IDE works (and it boots with the > > loaded code), but then running 'pronterface' fails to connect --- looking > > all-the-while like one-way communication. > > > > I see someone else basically having the same problem and claiming that > > hacking a trace (that affects the DTR response) on the arduino fixes it for > > FreeBSD (see https://plus.google.com/+MiroslavPrymek/posts/6TDdbuoNhzH )... > > > > Given this information, can I stty my way out of this problem? Can I make > > a small modification to pronterface? > > stty -clocal ... > Hmm. The description of clocal in stty(1) is incorrect. It states that clocal is without and -clocal with modem control. It's reversed. > might help. > > All implementations of virtualised serial ports should (IMHO) provide a software ___breakout box___ which is the only sure way of diagnosing this sort of problem. > -- Gary Jennejohn From owner-freebsd-hackers@freebsd.org Thu Oct 19 11:47:10 2017 Return-Path: Delivered-To: freebsd-hackers@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 31B77E3885B for ; Thu, 19 Oct 2017 11:47:10 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com [IPv6:2a00:1450:400c:c0c::241]) (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 B690B660DE for ; Thu, 19 Oct 2017 11:47:09 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: by mail-wr0-x241.google.com with SMTP id z99so5552823wrc.12 for ; Thu, 19 Oct 2017 04:47:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=wASG8JmAPjaW7WH87hW+M9z6PRJBN2nckHFS9gLUweE=; b=p4O6Z+s+jrC6zIBdjCcMv8a7adGP9mxhrgQhgcGU6Vo5Ju1TDM/K+1+Oeg0IbgP+pT QA+l3VCJQAOyg0gBd4KLDQ6h7aJ8VFXHL5EWY5ESz8TWmzIaBV0R8Z9hyPvF7qvJz4bZ SVvGJbztxTDtLwMlwlFtPyJPqNIotkNGcFXskjl9yrths6nbeJmesX7kBdu8i+uAoHQB TRcHSE6OrsmKdaj5C3C2LzV5VbgTqNBQ+/7CqlIRiZbQNH5hlhy0opdr6LBTm+4ByODx 6sMMGu/rBXB7BpqeRAo3X/zbCiDi31t0RITYxb2dHJuiRogHBoFLWCWlHREaZloLLciy ySBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=wASG8JmAPjaW7WH87hW+M9z6PRJBN2nckHFS9gLUweE=; b=nTiQccJoyEDCaB8l5+j/zt9k+HeDRM0ue/oG7edaqQuIZTjw8tdyWgX3x0ts/Ts93z hXGgZMAZ9K8Bv+VDfCB4Tyn10f9IvU3ZFrdmjbkFREDTEC0SNWQyLNdwOwyNbJKS/5OA B+CPODpoEuAAfDhuXqA6LHo6cYdKnRfmic+IpkdJmWO1vsNFvv89icNCw6H61jBgSHyT xrx2cFP36bvgZYnKxfk4c1Ay/QwDQqPD+MiZwguKOsyAeNvlpdlBzKJZmQRFXVYp2fDe pPnPusUSZoQvRn2SEbl4b+cP/DsUf/gOdWXFzkvSoHVqEAYDVKg2Qy+ix91wvtVh0+R9 LRnA== X-Gm-Message-State: AMCzsaUoxn4dTus4Wtxr9zFdVtG0SrNTyHufcOt84wxxhDlvvSt9LcS4 lnwa0bRNTIg7Tft7EGrdlmQ= X-Google-Smtp-Source: ABhQp+REooxo2EEllun3yqIcmzvhbSPImY2zxPfSNIWpWIcJFrRT1pGDMw6BaOScuoO9D7v33w3iJw== X-Received: by 10.223.145.41 with SMTP id j38mr1254327wrj.133.1508413628181; Thu, 19 Oct 2017 04:47:08 -0700 (PDT) Received: from ernst.home (p578E321D.dip0.t-ipconnect.de. [87.142.50.29]) by smtp.gmail.com with ESMTPSA id x13sm12246851wrg.7.2017.10.19.04.47.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Oct 2017 04:47:07 -0700 (PDT) Date: Thu, 19 Oct 2017 13:47:06 +0200 From: Gary Jennejohn To: Bob Bishop Cc: gljennjohn@gmail.com, Zaphod Beeblebrox , FreeBSD Hackers Subject: Re: We do serial differently. Message-ID: <20171019134706.659e8ae2@ernst.home> In-Reply-To: <20171019133247.69361225@ernst.home> References: <20171019133247.69361225@ernst.home> Reply-To: gljennjohn@gmail.com X-Mailer: Claws Mail 3.15.1 (GTK+ 2.24.31; amd64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Oct 2017 11:47:10 -0000 On Thu, 19 Oct 2017 13:32:47 +0200 Gary Jennejohn wrote: > On Thu, 19 Oct 2017 11:03:46 +0100 > Bob Bishop wrote: > > > Hi, > > > > > On 19 Oct 2017, at 05:25, Zaphod Beeblebrox wrote: > > > > > > How does FreeBSD do serial differently than Linux or MacOS or Windows? > > > > Quite likely only in the defaults when a port is opened. > > > > > Now... this isn't _exactly_ serial, but the serial that is emulated by the > > > arduino driver in ports. > > > > > > The issue is that running the arduino IDE works (and it boots with the > > > loaded code), but then running 'pronterface' fails to connect --- looking > > > all-the-while like one-way communication. > > > > > > I see someone else basically having the same problem and claiming that > > > hacking a trace (that affects the DTR response) on the arduino fixes it for > > > FreeBSD (see https://plus.google.com/+MiroslavPrymek/posts/6TDdbuoNhzH )... > > > > > > Given this information, can I stty my way out of this problem? Can I make > > > a small modification to pronterface? > > > > stty -clocal ... > > > > Hmm. The description of clocal in stty(1) is incorrect. It states > that clocal is without and -clocal with modem control. It's reversed. > My error. After looking at the stty source I realized that the man page is correct. To turn off modem control use stty clocal. That results in tcsetattr(3) setting the CLOCAL flag = ignore modem status lines. > > might help. > > > > All implementations of virtualised serial ports should (IMHO) provide a software ___breakout box___ which is the only sure way of diagnosing this sort of problem. > > > > -- > Gary Jennejohn -- Gary Jennejohn From owner-freebsd-hackers@freebsd.org Thu Oct 19 12:05:29 2017 Return-Path: Delivered-To: freebsd-hackers@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 5D595E39B19 for ; Thu, 19 Oct 2017 12:05:29 +0000 (UTC) (envelope-from dvyukov@google.com) Received: from mail-it0-x229.google.com (mail-it0-x229.google.com [IPv6:2607:f8b0:4001:c0b::229]) (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 217C266EE8 for ; Thu, 19 Oct 2017 12:05:29 +0000 (UTC) (envelope-from dvyukov@google.com) Received: by mail-it0-x229.google.com with SMTP id n195so9913506itg.0 for ; Thu, 19 Oct 2017 05:05:29 -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=MhmmUwvHOIVv/HYlI3GNjmRk5TNsAtLW24lWCgXGsno=; b=CWCEgZLCUDVmMBFqb64NSMxq+/zjzA48XPrUwOi0qmBEKWecqC6qWZRFrZnETdxkaC xJD+6gXrBRv/PzZ1jtCa4ofclNcpaHzYLcwWmR0tUhZKZs7iSNH/fvzuF4lN6YqwQTob 2+jAvE3sNj7fVXEOC+8gqj2ZUmGG6szSgeida6hLuWnVY5h2dAU1NQHslDPVnZhP850+ OaVDJGhAD5yE3Sg4Wm7J/sw0Vt7DbDwzinPbWVc7j5wf3YkdmTpEpVuJW4Dlt3VYoNYb 9L4Gat5ejB3YYtcg3pgeymuePC7w8Qi9AznqXonCPxxC644YTWbrwHWeHpvNNtJQvriH 1DZA== X-Gm-Message-State: AMCzsaVoYAGDRdzUv0Lmf7QDP+0U4yCq29g0etng0t6cNiU4tLqCczO6 mJFFGToqIs9q+3fAP2bc+1mwIccqs+bCk8n5A2knI0fNXXk= X-Google-Smtp-Source: ABhQp+SVHBzrU2Ycmkuvyqwx/n8o1TIvS/Cr1h00Vbz187snKPHuTfIRSv58xyopV+EfLACN1gdmAdghwp0YlPssnyQ= X-Received: by 10.36.175.11 with SMTP id t11mr1998298ite.85.1508414728073; Thu, 19 Oct 2017 05:05:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.2.155.231 with HTTP; Thu, 19 Oct 2017 05:05:07 -0700 (PDT) From: Dmitry Vyukov Date: Thu, 19 Oct 2017 14:05:07 +0200 Message-ID: Subject: syzkaller for freebsd To: freebsd-hackers@freebsd.org, rwatson@freebsd.org Cc: syzkaller , Kostya Serebryany Content-Type: text/plain; charset="UTF-8" X-Mailman-Approved-At: Thu, 19 Oct 2017 13:15:06 +0000 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Oct 2017 12:05:29 -0000 Hello, Our team works on kernel testing and in particular on syzkaller system call fuzzer (https://github.com/google/syzkaller). It started as Linux-only fuzzer and has found 1000+ bugs in Linux. But we started evolving towards supporting more OSes recently and added basic FreeBSD support. I see that FreeBSD https://wiki.freebsd.org/IdeasPage mentions syzkaller/KASAN, so I am reaching out to you share our progress and discuss potential collaboration. Our main focus will probably stay around Linux/Fuchsia and we don't have any experience around FreeBSD kernel (e.g. implementing code coverage support and even building). But if there is an active interest on FreeBSD community side, we are ready to collaborate. So, I was able to run syzkaller in full setup (including VM management, console output monitoring, etc) and outlined the process here: https://github.com/google/syzkaller/blob/master/docs/freebsd.md To warm up your interest, here is list of things I've found so far. This is with off-the-shelf FreeBSD-11.1-RELEASE-amd64.qcow2 image. panic: ffs_write: type 0xfffff80003eee760 8 (0,0) https://pastebin.com/raw/Xm80kYSz This one even comes with a C reproducer (which is surprising, because syzkaller currently only generates/builds reproducers for Linux, still it somehow run on FreeBSD and triggered the crash): https://pastebin.com/raw/EZe8thej Fatal trap 12: page fault in atrtc_settime https://pastebin.com/raw/pFzSgNff Fatal trap 12: page fault in bufdone https://pastebin.com/raw/amHtWwQS Fatal trap 12: page fault in sctp_sosend https://pastebin.com/raw/Zf2hYwi7 Fatal trap 12: page fault in vnet_pf_uninit https://pastebin.com/raw/0AiJJz7D Fatal trap 9: general protection fault in udp_close https://pastebin.com/raw/DzKYRkSm There was also a bunch of silent crashes/hangs https://pastebin.com/raw/gp5HDmHZ But lots of things for full FreeBSD support are still missing. I've sketched a list here: https://github.com/google/syzkaller/blob/master/docs/freebsd.md#missing-things Some are harder to do, some are easier to do. Just running it with a debug kernel build (with debug info and as many debug checks as possible) would probably be the simplest one. Thanks, Dmitry Vyukov From owner-freebsd-hackers@freebsd.org Thu Oct 19 14:46:19 2017 Return-Path: Delivered-To: freebsd-hackers@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 F4088E3D7C2 for ; Thu, 19 Oct 2017 14:46:18 +0000 (UTC) (envelope-from srs0=xhoe=bs=sigsegv.be=kristof@codepro.be) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A7B5D6C8AC; Thu, 19 Oct 2017 14:46:18 +0000 (UTC) (envelope-from srs0=xhoe=bs=sigsegv.be=kristof@codepro.be) Received: from [169.254.138.137] (vega.codepro.be [IPv6:2a01:4f8:162:1127::3]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id 43DF22476C; Thu, 19 Oct 2017 16:46:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sigsegv.be; s=mail; t=1508424375; bh=R+DMNOJBRAgOwZJsd4L+O6uP53bNC9xy/7lKMNXPRdY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=kCYgF4lOkvxy5Xj/LVPQbDcZ5oxMDPf0av8OPIasOSYATgFQwJc69YTpRA//+Z/pJ hVHkilKgroirUPdHcar+OUvSeb2DtSkW9pJ5fcTYYVcjSFNQSiH+0LBXs/y02Nh8F9 jU8m80h8/1FT5hQSUBojpgzEqxTGruf883Gn4PwU= From: "Kristof Provost" To: "Dmitry Vyukov" Cc: freebsd-hackers@freebsd.org, rwatson@freebsd.org, "Kostya Serebryany" , syzkaller Subject: Re: syzkaller for freebsd Date: Thu, 19 Oct 2017 16:46:31 +0200 Message-ID: <95CF3989-2830-41E4-A29A-B32EBC818CE0@sigsegv.be> In-Reply-To: References: MIME-Version: 1.0 X-Mailer: MailMate (2.0BETAr6093) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Oct 2017 14:46:19 -0000 Neat! On 19 Oct 2017, at 14:05, Dmitry Vyukov via freebsd-hackers wrote: > panic: ffs_write: type 0xfffff80003eee760 8 (0,0) > https://pastebin.com/raw/Xm80kYSz > This one even comes with a C reproducer (which is surprising, because > syzkaller currently only generates/builds reproducers for Linux, still > it somehow run on FreeBSD and triggered the crash): > https://pastebin.com/raw/EZe8thej > FreeBSD can run (some/many) Linux binaries, so perhaps that’s what you’re seeing here. > Fatal trap 12: page fault in vnet_pf_uninit > https://pastebin.com/raw/0AiJJz7D > I’m pretty sure this one isn’t really a direct result of fuzzing. Unloading pf on 11.1 is unreliable. Doing `kldunload -f pf` will likely result in the same panic. I believe this to be fixed in CURRENT. Regards, Kristof From owner-freebsd-hackers@freebsd.org Thu Oct 19 15:08:51 2017 Return-Path: Delivered-To: freebsd-hackers@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 5A25CE3E12B for ; Thu, 19 Oct 2017 15:08:51 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (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 ED5416D464 for ; Thu, 19 Oct 2017 15:08:50 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 61d13e65-b4df-11e7-a893-25625093991c X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id 61d13e65-b4df-11e7-a893-25625093991c; Thu, 19 Oct 2017 15:08:38 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v9JF8XQC008662; Thu, 19 Oct 2017 09:08:33 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1508425713.1383.6.camel@freebsd.org> Subject: Re: We do serial differently. From: Ian Lepore To: Zaphod Beeblebrox , FreeBSD Hackers Date: Thu, 19 Oct 2017 09:08:33 -0600 In-Reply-To: References: Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Oct 2017 15:08:51 -0000 On Thu, 2017-10-19 at 00:25 -0400, Zaphod Beeblebrox wrote: > How does FreeBSD do serial differently than Linux or MacOS or Windows? > > Now... this isn't _exactly_ serial, but the serial that is emulated by the > arduino driver in ports. > > The issue is that running the arduino IDE works (and it boots with the > loaded code), but then running 'pronterface'  fails to connect --- looking > all-the-while like one-way communication. > > I see someone else basically having the same problem and claiming that > hacking a trace (that affects the DTR response) on the arduino fixes it for > FreeBSD (see https://plus.google.com/+MiroslavPrymek/posts/6TDdbuoNhzH )... > > Given this information, can I stty my way out of this problem?  Can I make > a small modification to pronterface? Use the "callout" device, /dev/cuaXX, rather than /dev/ttyXX (which is the "callin" device).  The callin device waits for a call to come in, and that's implemented by blocking in open() until the modem/other-end asserts DTR (or DSR, I can never remember which end is which). So if it's hanging with /dev/ttyU0 use /dev/cuaU0. -- Ian From owner-freebsd-hackers@freebsd.org Thu Oct 19 16:32:01 2017 Return-Path: Delivered-To: freebsd-hackers@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 49586E3FCD2 for ; Thu, 19 Oct 2017 16:32:01 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (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 CD3416FCCE for ; Thu, 19 Oct 2017 16:32:00 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: by mail-wm0-x236.google.com with SMTP id u138so17142801wmu.5 for ; Thu, 19 Oct 2017 09:32:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=V/JjpKG+PWs1SO44jfpWNGlUJ3wimJDk4JBh66LWvBo=; b=rHKOmc0bdWHeb72r00ABduc6JhJdBoyzkx7CiWfiSvoqL7Pp4QpKJgM6+I1rGjFsUb vO/3zytQJVMUTH6EZzFLUSyzK+iSSwnFtB+wB+86zqjXFAs9FpXp/M8OdGOKPz0u/hVD an4zfA6yNIK2SfSL9yIvs2vZRpVwr3xQiD+O3HnhaJrKVWf1+55ra4QhyueJbq3Z0INt DFanW9LXL1fNgrAIqNr+p+EWyciRef2aqPSWsnkWgZf8maeI/tcAOB1+mphHVir4jytP ZDbf6vbP1zuD6/1IED6Nt/CQSYMi/YkMZ6r41I4eMDY688HmZqgy+ymmihp8O9SW2BBQ V95g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=V/JjpKG+PWs1SO44jfpWNGlUJ3wimJDk4JBh66LWvBo=; b=jjE2/Sbun/XCSmyfSUc1HevBx83Vrk0h92wQU0C0jO23+KwD3dpSE2f8PMBwbjiybw k4oMQoyk5J9SdenwvnwAbYn3ol9HcURNRN2Q8pz8yKQ7o3zdlzZqcZFhxPzFUeaYdVIJ NThD680TFzgeTrUIQ8cnK3aXoRhvpBDjUjJGnBqMe+t9unFZrAQhsIq1XVj8PhhqOgfQ ftES7YlHEkgUPPrsqXJ08WLX6ugspzu/H/TLRmeAwx6rLeyBATDxqZNVy9xKh6eHYNkr RGpVGjzX2XNr0K/NMUrYr+uILAwNHwc+efKuZjXGxZ42yxo86cZ7N/sBPV0k+n4xjZVG kq1A== X-Gm-Message-State: AMCzsaVagSYgJo25a8ZN/ttc39xHM8kUiqYevDzOXxlKRoU9SYnSy3Pg wSa84GqXHlMc6ztBds1cbkF5anhx7s+3GTt9VA== X-Google-Smtp-Source: ABhQp+RpUgsrN1ss2X40JiLUQahxSrLGWkAlm8MdQukM+Q0eM3G3n5BCE4TVwzEKp9PUR8lWypstzyUa2I3vSXA5YR0= X-Received: by 10.80.139.65 with SMTP id l59mr3111559edl.187.1508430719071; Thu, 19 Oct 2017 09:31:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.189.139 with HTTP; Thu, 19 Oct 2017 09:31:58 -0700 (PDT) In-Reply-To: References: From: Zaphod Beeblebrox Date: Thu, 19 Oct 2017 12:31:58 -0400 Message-ID: Subject: Re: We do serial differently. To: Bob Bishop Cc: FreeBSD Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Oct 2017 16:32:01 -0000 On Thu, Oct 19, 2017 at 6:03 AM, Bob Bishop wrote: > > All implementations of virtualised serial ports should (IMHO) provide a > software =E2=80=98breakout box=E2=80=99 which is the only sure way of dia= gnosing this sort > of problem. > > netgraph for serial ports? From owner-freebsd-hackers@freebsd.org Thu Oct 19 16:33:51 2017 Return-Path: Delivered-To: freebsd-hackers@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 620B4E3FDDA for ; Thu, 19 Oct 2017 16:33:51 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: from mail-wm0-x22a.google.com (mail-wm0-x22a.google.com [IPv6:2a00:1450:400c:c09::22a]) (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 EAF546FF7C; Thu, 19 Oct 2017 16:33:50 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: by mail-wm0-x22a.google.com with SMTP id u138so17690515wmu.4; Thu, 19 Oct 2017 09:33:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=XrFYET5wThdpGqaBpHgdh6ChimcasUZuWSArRu1e0eM=; b=LxZ9rv+LtaSFYl7jkOPKsk0Iwyf/UsmtkfB0dzC/QRWUqPS8wRKGq1yo3GypV2Wqt/ ALBg46dhE/fJSFIyjPGTl5rl0x+LKPRfXRLKMctasFEQyLGG0kx/qQ+JiDJodyPqnJcs F3bVusoUTf25xDnv5Fl4Pl/tonnUEHb/7hWYSbFkP24ivYPVIXFXJNpViH6ornWK3g7S T8DrGfx3Tf7XNSI0W8z8Uz0rdNa3VJU1idCtSILg6YwiqQfTE3BFW4g5szRX5wBfnzLi xNtMSF8LOf3mtuWZD/iCUuR331WZlgZ5oAkE+rLqt3ibJARa7zVhvpjhNkN64OaQSUZq BibA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=XrFYET5wThdpGqaBpHgdh6ChimcasUZuWSArRu1e0eM=; b=hujRklNiVqrCziLo3z4C93U9pOFJEv8TQL94wu1QqTWW2Ug3oK+sOfX6rLEnEjcM1s AjONqCx61FnfDKpWBQfg6+FgsVKPwXZeucXAeSxVH1CKHqBwjkeIOcTRCWGyiQJxgCh2 xNGUhZz2fMS5DUN8cIGRG5KEdBkRD1GB6L854jIo+9IgzzozknFhsjEYOhHWvEo0ucdj Q0yyvyFgoMyKxscXnBoZxTnk79DhAJ6Zt/c7P6OGF39IvojKg76Y5voWekJdEFwVnGW4 aSyjS5utJ+glImo4GKxtbSldMgFeHL79xOtA8Zp8tqDnH7DPlSrmfyFjksz3Z6wS6JHn 6FdA== X-Gm-Message-State: AMCzsaW5YCgQKQnQx7T6b4BpnUuVClUqCQQVSmoGgkWLmQVOgFym+Mfu UWyT7F/ydIk0JGLH9WSsj79obpxxkVQdbrVzuQ== X-Google-Smtp-Source: ABhQp+Tp9XS5ULuJfgtLxkzJ4aMjTzthP6hgJBLnUmp5wuGC/emLA1KIn4ecTp7qDfKdUeLUfiIdxq8G4YwBbfC9LFI= X-Received: by 10.80.152.103 with SMTP id h36mr3083385edb.293.1508430828925; Thu, 19 Oct 2017 09:33:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.189.139 with HTTP; Thu, 19 Oct 2017 09:33:48 -0700 (PDT) In-Reply-To: <1508425713.1383.6.camel@freebsd.org> References: <1508425713.1383.6.camel@freebsd.org> From: Zaphod Beeblebrox Date: Thu, 19 Oct 2017 12:33:48 -0400 Message-ID: Subject: Re: We do serial differently. To: Ian Lepore Cc: FreeBSD Hackers Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Oct 2017 16:33:51 -0000 On Thu, Oct 19, 2017 at 11:08 AM, Ian Lepore wrote: > > Use the "callout" device, /dev/cuaXX, rather than /dev/ttyXX (which is > the "callin" device). The callin device waits for a call to come in, > and that's implemented by blocking in open() until the modem/other-end > asserts DTR (or DSR, I can never remember which end is which). > > So if it's hanging with /dev/ttyU0 use /dev/cuaU0. > Is the reverse true? I have been using cuaU0. From owner-freebsd-hackers@freebsd.org Thu Oct 19 14:03:19 2017 Return-Path: Delivered-To: freebsd-hackers@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 E1458E3C7D5 for ; Thu, 19 Oct 2017 14:03:19 +0000 (UTC) (envelope-from dvyukov@google.com) Received: from mail-it0-x244.google.com (mail-it0-x244.google.com [IPv6:2607:f8b0:4001:c0b::244]) (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 A76166B422 for ; Thu, 19 Oct 2017 14:03:19 +0000 (UTC) (envelope-from dvyukov@google.com) Received: by mail-it0-x244.google.com with SMTP id p138so10324752itp.2 for ; Thu, 19 Oct 2017 07:03:19 -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:in-reply-to:references:from:date :message-id:subject:to; bh=3YrWPEcH45Cv1iXejhYgg9VHDHz9sp0LmG3KUiHlMQ4=; b=kwUdzyv8W9sl39SggqC/LDxtNK/5HMaFYldEZ7pfXdL4ChsKIY895AC/lF0fQ8ujSv PhSzN8J0bV/Gwl9c7qO3ShH2OUXOXl/CzWbiDNKdrLMP5iORcWp+q137zTbrvm0tlnqP RI7npfxuoz2AtNc26jq9kuED4ElAVkLjbreKerY8Z62GQ6YdcaD7f8LWUjtBpQOuSRL0 ld+TMiUVGFl7kgUHHhuf+jyR6F3C4sjm85CEsPv0+NG3sxI6fw5ZUEEPcCEf2nF+QieY U8o5YS0fZy3GyCSFl7Y4ZPAufU3VZnkqiuFVkZ6QPpC8tuxk1oxT0ENjbUVRTFXWfCI+ winA== X-Gm-Message-State: AMCzsaU6+VvdKDzNzj+bjinRPPvQ4RBan19ZNl+h6v3pbn1mB8sEE3Dh iBhOH+p6UoBwwd5FjYj0BybDYsD81SewupDnoh8+1A== X-Google-Smtp-Source: ABhQp+T2tTpq9WXA50VIv3QTiQxq4vticRmFoRjL50oSxRkvpjwyKnVwJB9yp3BDBo3fYqNDV+SBoime4YR6+Yg0+xg= X-Received: by 10.36.16.193 with SMTP id 184mr2378620ity.30.1508421798667; Thu, 19 Oct 2017 07:03:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.2.155.231 with HTTP; Thu, 19 Oct 2017 07:02:58 -0700 (PDT) In-Reply-To: References: <5ee27dec-9c91-603c-6d24-ce806e753bda@selasky.org> From: Dmitry Vyukov Date: Thu, 19 Oct 2017 16:02:58 +0200 Message-ID: Subject: Re: syzkaller for freebsd To: Hans Petter Selasky , freebsd-hackers@freebsd.org, syzkaller Content-Type: text/plain; charset="UTF-8" X-Mailman-Approved-At: Thu, 19 Oct 2017 16:48:12 +0000 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Oct 2017 14:03:20 -0000 On Thu, Oct 19, 2017 at 4:02 PM, Dmitry Vyukov wrote: > On Thu, Oct 19, 2017 at 3:39 PM, Hans Petter Selasky wrote: >> On 10/19/17 14:05, Dmitry Vyukov via freebsd-hackers wrote: >>> >>> Hello, >>> >>> Our team works on kernel testing and in particular on syzkaller system >>> call fuzzer (https://github.com/google/syzkaller). It started as >>> Linux-only fuzzer and has found 1000+ bugs in Linux. But we started >>> evolving towards supporting more OSes recently and added basic FreeBSD >>> support. I see that FreeBSD https://wiki.freebsd.org/IdeasPage >>> mentions syzkaller/KASAN, so I am reaching out to you share our >>> progress and discuss potential collaboration. Our main focus will >>> probably stay around Linux/Fuchsia and we don't have any experience >>> around FreeBSD kernel (e.g. implementing code coverage support and >>> even building). But if there is an active interest on FreeBSD >>> community side, we are ready to collaborate. >>> >>> So, I was able to run syzkaller in full setup (including VM >>> management, console output monitoring, etc) and outlined the process >>> here: >>> https://github.com/google/syzkaller/blob/master/docs/freebsd.md >>> >> >> Hi, >> >> Does this also include IOCTLs ? +mailing lists > Do you mean syzkaller in general? Or current freebsd descriptions? > syzkaller supports ioctls in general, we have 500+ for linux. FreeBSD > descriptions don't have ioctls as of now. From owner-freebsd-hackers@freebsd.org Thu Oct 19 14:07:24 2017 Return-Path: Delivered-To: freebsd-hackers@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 4575DE3C842 for ; Thu, 19 Oct 2017 14:07:24 +0000 (UTC) (envelope-from dvyukov@google.com) Received: from mail-it0-x231.google.com (mail-it0-x231.google.com [IPv6:2607:f8b0:4001:c0b::231]) (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 126B86B482 for ; Thu, 19 Oct 2017 14:07:24 +0000 (UTC) (envelope-from dvyukov@google.com) Received: by mail-it0-x231.google.com with SMTP id 72so9872944itk.3 for ; Thu, 19 Oct 2017 07:07:24 -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:in-reply-to:references:from:date :message-id:subject:to; bh=mH28EJloNIRNeFracKOklicZxNLs3y+zTkdAPlsQ28g=; b=KPgk2yjwwLiO4P63jfhkULGiylVLBO0KIwnnsOkxBpj9XGaYWzZHQdmII4tCDgU/h5 LB75uVUw0uREoEu1HozRuWasZMXBhmV91vbGGCwi2HaZC+339yrxkofUxequrvERyehv wwRZ0PTeUI8I30OowFwmzxaL9bCKrjMjyiMBxOzMn5nMYg4b500I3WZfnc6r7Jwq/wAe wQHRbozWkfT5jMBbv31NeNxBb+hkZjGtW+vJ6REszBRA2knXfRdMwaP2a6QqOwZe66iQ E0oCmVfi0YVqrsFs8JvA9cpSXnp7xcYJGSIuV9jwTARB+GU2m0nCeK4hTePtqRxjYrnv g3ug== X-Gm-Message-State: AMCzsaV1p8eC0tSD0RDnKBmS5WBTiL7pNuUOcqugwQh5ZTh5ZKp91lE0 6RxY05oFTIXuzyY41A8isbKov4ORotTLoEQ0cObhxA== X-Google-Smtp-Source: ABhQp+Qy37nSkphs9x6WyboJTAlN3FdQvPe5CZ03J8lKZldSvKx0fnDPMnCSU5R0MKfFYyB2ekKFLZciigqgPnavlFc= X-Received: by 10.36.5.211 with SMTP id 202mr2351375itl.122.1508422043139; Thu, 19 Oct 2017 07:07:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.2.155.231 with HTTP; Thu, 19 Oct 2017 07:07:02 -0700 (PDT) In-Reply-To: References: From: Dmitry Vyukov Date: Thu, 19 Oct 2017 16:07:02 +0200 Message-ID: Subject: Re: syzkaller for freebsd To: Ed Maste , freebsd-hackers@freebsd.org, syzkaller Content-Type: text/plain; charset="UTF-8" X-Mailman-Approved-At: Thu, 19 Oct 2017 16:48:25 +0000 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Oct 2017 14:07:24 -0000 On Thu, Oct 19, 2017 at 3:41 PM, Ed Maste wrote: > On 19 October 2017 at 14:05, Dmitry Vyukov via freebsd-hackers > wrote: >> Hello, >> >> Our team works on kernel testing and in particular on syzkaller system >> call fuzzer (https://github.com/google/syzkaller). It started as >> Linux-only fuzzer and has found 1000+ bugs in Linux. But we started >> evolving towards supporting more OSes recently and added basic FreeBSD >> support. > > Dmitry, > > Running syzkaller on FreeBSD has been on my own TODO list for a while, > in addition to the IdeasPage item you mentioned, so thank you very > much for starting this and sharing your progress so far! I'm very > happy to hear that you're interested in bringing in changes to support > FreeBSD, and will help coordinate things from the FreeBSD side. > >> But lots of things for full FreeBSD support are still missing. I've >> sketched a list here: >> https://github.com/google/syzkaller/blob/master/docs/freebsd.md#missing-things > > Thanks for this list, I (and others) will start digesting this info, > and will follow up with any questions. Great! There are some lower handing fruits. A first useful thing would be to run it as is and then run with a fresh debug kernel. This already can give more bugs just due to debug checks. syzkaller is not completely trivial in setup as compared to, say, trinity, because it tries to automate more things. Feel free to ask questions here, or on syzkaller@googlegroups.com. From owner-freebsd-hackers@freebsd.org Thu Oct 19 16:58:38 2017 Return-Path: Delivered-To: freebsd-hackers@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 CFD21E40800 for ; Thu, 19 Oct 2017 16:58:38 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (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 6B72870EA7 for ; Thu, 19 Oct 2017 16:58:38 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: bef7f734-b4ee-11e7-a893-25625093991c X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id bef7f734-b4ee-11e7-a893-25625093991c; Thu, 19 Oct 2017 16:58:37 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v9JGwWFd008811; Thu, 19 Oct 2017 10:58:32 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1508432312.1383.18.camel@freebsd.org> Subject: Re: We do serial differently. From: Ian Lepore To: Zaphod Beeblebrox Cc: FreeBSD Hackers Date: Thu, 19 Oct 2017 10:58:32 -0600 In-Reply-To: References: <1508425713.1383.6.camel@freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Oct 2017 16:58:38 -0000 On Thu, 2017-10-19 at 12:33 -0400, Zaphod Beeblebrox wrote: > On Thu, Oct 19, 2017 at 11:08 AM, Ian Lepore wrote: > > > > > > > Use the "callout" device, /dev/cuaXX, rather than /dev/ttyXX (which > > is > > the "callin" device).  The callin device waits for a call to come > > in, > > and that's implemented by blocking in open() until the modem/other- > > end > > asserts DTR (or DSR, I can never remember which end is which). > > > > So if it's hanging with /dev/ttyU0 use /dev/cuaU0. > > > Is the reverse true?  I have been using cuaU0. No, the reverse is not true.  If you're already using the cua* device the problem is elsewhere. My notes for the DTR pin on an FTDI chip say this: [3] Coming out of reset, this pin is driven high.  When the tty device is open it is driven low.  As long as the channel is in uart mode, this pin will be driven high when nobody has the tty open, and driven low while it is open. Note that that really describes the tty-layer behavior, it's what tells the ftdi chip to turn dtr on and off, so it should apply to other brands of usb adapter as well. Looking at that page you cited in your original message and how it talks about a dtr connection to reset, this might be the problem.  You can try "stty -f /dev/cuaU0 -hupcl" -- that will force the signal to be driven low continuously, regardless of whether anyone has the device open or not.  But there's no telling if that's the right behavior for your arduino, it might just be differently-wrong, like never doing the reset at all.  If the line needs to be pulsed to do a reset maybe you can use a wrapper script that does stty hupcl; sleep .1; stty -hupcl, then launches your program. -- Ian From owner-freebsd-hackers@freebsd.org Thu Oct 19 17:22:56 2017 Return-Path: Delivered-To: freebsd-hackers@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 0F74FE41BFC for ; Thu, 19 Oct 2017 17:22:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9932D72CB7; Thu, 19 Oct 2017 17:22:55 +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 v9JHMkcw013272 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 19 Oct 2017 20:22:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v9JHMkcw013272 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v9JHMk1j013271; Thu, 19 Oct 2017 20:22:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 19 Oct 2017 20:22:46 +0300 From: Konstantin Belousov To: Ian Lepore Cc: Zaphod Beeblebrox , FreeBSD Hackers Subject: Re: We do serial differently. Message-ID: <20171019172246.GU2473@kib.kiev.ua> References: <1508425713.1383.6.camel@freebsd.org> <1508432312.1383.18.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1508432312.1383.18.camel@freebsd.org> User-Agent: Mutt/1.9.1 (2017-09-22) 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-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Oct 2017 17:22:56 -0000 On Thu, Oct 19, 2017 at 10:58:32AM -0600, Ian Lepore wrote: > Note that that really describes the tty-layer behavior, it's what tells > the ftdi chip to turn dtr on and off, so it should apply to other > brands of usb adapter as well. > > Looking at that page you cited in your original message and how it > talks about a dtr connection to reset, this might be the problem. šYou > can try "stty -f /dev/cuaU0 -hupcl" -- that will force the signal to be > driven low continuously, regardless of whether anyone has the device > open or not. šBut there's no telling if that's the right behavior for > your arduino, it might just be differently-wrong, like never doing the > reset at all. šIf the line needs to be pulsed to do a reset maybe you > can use a wrapper script that does stty hupcl; sleep .1; stty -hupcl, > then launches your program. For each tty device, including cuaU*, there are .init and .lock devfs nodes which can be used to set the initial and permanent states of the flags. It might be useful in this situation. From owner-freebsd-hackers@freebsd.org Fri Oct 20 06:07:53 2017 Return-Path: Delivered-To: freebsd-hackers@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 93303E50BB7 for ; Fri, 20 Oct 2017 06:07:53 +0000 (UTC) (envelope-from julian@elischer.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 59BDB69EF9 for ; Fri, 20 Oct 2017 06:07:53 +0000 (UTC) (envelope-from julian@elischer.org) Received: from Julian-MBP3.local (124-148-79-216.dyn.iinet.net.au [124.148.79.216]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id v9K67gqK029158 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 19 Oct 2017 23:07:48 -0700 (PDT) (envelope-from julian@elischer.org) Subject: Re: We do serial differently. To: Zaphod Beeblebrox , Bob Bishop Cc: FreeBSD Hackers References: From: Julian Elischer Message-ID: Date: Fri, 20 Oct 2017 14:07:37 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Mailman-Approved-At: Fri, 20 Oct 2017 11:16:41 +0000 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Oct 2017 06:07:53 -0000 On 20/10/17 12:31 am, Zaphod Beeblebrox wrote: > On Thu, Oct 19, 2017 at 6:03 AM, Bob Bishop wrote: > >> All implementations of virtualised serial ports should (IMHO) provide a >> software ‘breakout box’ which is the only sure way of diagnosing this sort >> of problem. >> >> > netgraph for serial ports? we had that at one stage > _______________________________________________ > 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 Oct 20 14:00:13 2017 Return-Path: Delivered-To: freebsd-hackers@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 BD069E362E4 for ; Fri, 20 Oct 2017 14:00:13 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mail-it0-f50.google.com (mail-it0-f50.google.com [209.85.214.50]) (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 88C9C77350; Fri, 20 Oct 2017 14:00:12 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: by mail-it0-f50.google.com with SMTP id r127so13503312itb.5; Fri, 20 Oct 2017 07:00:12 -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:in-reply-to:references:from:date :message-id:subject:to:cc; bh=WqPvvKTFXjPEwcGrvWFB4UMbnBwzh9S8DvZZxsL2s8w=; b=FFHVFsf7g3Q3aRlEu1t07k+Plw9B8fFrUvRUt7BdbDq5A8YJAhNNyc9fJNmeb8UsGs +IbHqSNZxojHhEqerW9Fy8NEHWDEHU7bg/B4XvF1C6VNIKMbhj5+YsoVJzbPC2nTM8Gx QvUmjc9r/+Sw4qcLuMqT+9A20CUK5ogAdhQBPDa+w3a0L/6hoTFPlFVufIzyV13S9j7F s0uCBgV1wIN1orpRzZDSmJg5TUG/MsLUFwtLj9pG2tPfzX3VJlhy+rJ+8DeZ209HYkNl 5iACxDDXMHBVwrldb1cyDzkDy9zi2M53hfLoF4zYgk7/QPt2+e3WecZyUlJLHjPWm3pj M/Rg== X-Gm-Message-State: AMCzsaXjL27jNCb8zLUlCejiywzQnZDzIiqLYwHxEqbvLJgwbu6lPGfs F3tOaGExfc/fJTs1rig1wH4XqXiWPPE= X-Received: by 10.36.124.197 with SMTP id a188mr2605620itd.53.1508506629617; Fri, 20 Oct 2017 06:37:09 -0700 (PDT) Received: from mail-it0-f50.google.com (mail-it0-f50.google.com. [209.85.214.50]) by smtp.gmail.com with ESMTPSA id v8sm511766itb.42.2017.10.20.06.37.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Oct 2017 06:37:09 -0700 (PDT) Received: by mail-it0-f50.google.com with SMTP id o135so13450104itb.0; Fri, 20 Oct 2017 06:37:08 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RwZe6lFyyULE5m6qAcsMkDLFE6DS+nSBRew0dwltCQEEv72Oy87nEaX7L5dP7/JsSFcq4daRjSHu5VDpY362c= X-Received: by 10.36.178.19 with SMTP id u19mr2438288ite.64.1508506628708; Fri, 20 Oct 2017 06:37:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.23.129 with HTTP; Fri, 20 Oct 2017 06:36:48 -0700 (PDT) In-Reply-To: <20171019172246.GU2473@kib.kiev.ua> References: <1508425713.1383.6.camel@freebsd.org> <1508432312.1383.18.camel@freebsd.org> <20171019172246.GU2473@kib.kiev.ua> From: Kyle Evans Date: Fri, 20 Oct 2017 08:36:48 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: We do serial differently. To: Konstantin Belousov Cc: Ian Lepore , FreeBSD Hackers , Zaphod Beeblebrox Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Oct 2017 14:00:13 -0000 On Thu, Oct 19, 2017 at 12:22 PM, Konstantin Belousov wrote: > On Thu, Oct 19, 2017 at 10:58:32AM -0600, Ian Lepore wrote: > > Note that that really describes the tty-layer behavior, it's what tells > > the ftdi chip to turn dtr on and off, so it should apply to other > > brands of usb adapter as well. > > > > Looking at that page you cited in your original message and how it > > talks about a dtr connection to reset, this might be the problem. You > > can try "stty -f /dev/cuaU0 -hupcl" -- that will force the signal to be > > driven low continuously, regardless of whether anyone has the device > > open or not. But there's no telling if that's the right behavior for > > your arduino, it might just be differently-wrong, like never doing the > > reset at all. If the line needs to be pulsed to do a reset maybe you > > can use a wrapper script that does stty hupcl; sleep .1; stty -hupcl, > > then launches your program. > > For each tty device, including cuaU*, there are .init and .lock > devfs nodes which can be used to set the initial and permanent states of > the flags. It might be useful in this situation. > This doesn't seem to necessarily be true with ucom(4) bits. I put in a bit of effort to try and get devel/libserialport to stop setting DTR when it probes /dev/cuaU* to no avail. As a consequence, connected Arduinos constantly reset when devel/arduino18 is open unless the serial monitor/plotter is also open. I can appreciate that +DTR is a sensible default here, but it would be nice if it could be configured with the .init node. From owner-freebsd-hackers@freebsd.org Fri Oct 20 15:03:09 2017 Return-Path: Delivered-To: freebsd-hackers@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 9057DE37FAD for ; Fri, 20 Oct 2017 15:03:09 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (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 6DD6E7E57A for ; Fri, 20 Oct 2017 15:03:09 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: ad246a03-b5a7-11e7-b50b-53dc5ecda239 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id ad246a03-b5a7-11e7-b50b-53dc5ecda239; Fri, 20 Oct 2017 15:02:23 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v9KF36MQ011259; Fri, 20 Oct 2017 09:03:06 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1508511786.1383.50.camel@freebsd.org> Subject: Re: We do serial differently. From: Ian Lepore To: Kyle Evans , Konstantin Belousov Cc: FreeBSD Hackers , Zaphod Beeblebrox Date: Fri, 20 Oct 2017 09:03:06 -0600 In-Reply-To: References: <1508425713.1383.6.camel@freebsd.org> <1508432312.1383.18.camel@freebsd.org> <20171019172246.GU2473@kib.kiev.ua> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Oct 2017 15:03:09 -0000 On Fri, 2017-10-20 at 08:36 -0500, Kyle Evans wrote: > On Thu, Oct 19, 2017 at 12:22 PM, Konstantin Belousov > wrote: > > > > > On Thu, Oct 19, 2017 at 10:58:32AM -0600, Ian Lepore wrote: > > > > > > Note that that really describes the tty-layer behavior, it's what tells > > > the ftdi chip to turn dtr on and off, so it should apply to other > > > brands of usb adapter as well. > > > > > > Looking at that page you cited in your original message and how it > > > talks about a dtr connection to reset, this might be the problem.  You > > > can try "stty -f /dev/cuaU0 -hupcl" -- that will force the signal to be > > > driven low continuously, regardless of whether anyone has the device > > > open or not.  But there's no telling if that's the right behavior for > > > your arduino, it might just be differently-wrong, like never doing the > > > reset at all.  If the line needs to be pulsed to do a reset maybe you > > > can use a wrapper script that does stty hupcl; sleep .1; stty -hupcl, > > > then launches your program. > > For each tty device, including cuaU*, there are .init and .lock > > devfs nodes which can be used to set the initial and permanent states of > > the flags.  It might be useful in this situation. > > > This doesn't seem to necessarily be true with ucom(4) bits. I put in a bit > of effort to try and get devel/libserialport to stop setting DTR when it > probes /dev/cuaU* to no avail. As a consequence, connected Arduinos > constantly reset when devel/arduino18 is open unless the serial > monitor/plotter is also open. > > I can appreciate that +DTR is a sensible default here, but it would be nice > if it could be configured with the .init node. Hmm. You mention the .init node, does setting -hupcl in the .lock node fail to suppress toggling DTR as well?  That, I think, would be a bug. -- Ian From owner-freebsd-hackers@freebsd.org Fri Oct 20 15:18:23 2017 Return-Path: Delivered-To: freebsd-hackers@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 8D1FEE385C6 for ; Fri, 20 Oct 2017 15:18:23 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mail-it0-f53.google.com (mail-it0-f53.google.com [209.85.214.53]) (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 5A1B07EE38; Fri, 20 Oct 2017 15:18:23 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: by mail-it0-f53.google.com with SMTP id 72so13794917itk.3; Fri, 20 Oct 2017 08:18:22 -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:in-reply-to:references:from:date :message-id:subject:to:cc; bh=PDaP5qNPPP+I3xDQDY7KDFE012xVswoXxq37UzkmYFg=; b=r67ckP1BZSjWRUC0XGOvprN+cbu+1G7/3d6yUS6T5Iq3S5cDYAhB2Uw21vz9atKqZ3 fjm+puQ1QUZLfW4AAuYG14F14C5BiqT01hdJLryPyWYA17G/7dKG9OSgmeobReBNls/C OE3AxwYDDaMJVnrWsKH8E7jSrGZWXUifhKLbaMW/cF79L95Ag6FKyJjaZLfbyBOp0NN1 EguCDjpJvcxmrXLPuHFQ83mj4fOGqfMg2T2qhzk9Oa5HtLTBqWNb64/oWQ6kB7uF62MM OE3EpPyU58tipPs+Zv49m4o+DcgI0YpMLh7EHyUIvYktvIOKdofPRBcOiCt0WcxqwKNW IQTg== X-Gm-Message-State: AMCzsaUeXfWQQdScf8KNxyH9bXjXJcJX29bnyJPNAOiGnbu9DaDy9JFZ HD1aVXOXhqfKL+F0jitQKv+WYFVt X-Received: by 10.36.22.13 with SMTP id a13mr1396385ita.69.1508512700347; Fri, 20 Oct 2017 08:18:20 -0700 (PDT) Received: from mail-it0-f48.google.com (mail-it0-f48.google.com. [209.85.214.48]) by smtp.gmail.com with ESMTPSA id r79sm613647ita.0.2017.10.20.08.18.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Oct 2017 08:18:20 -0700 (PDT) Received: by mail-it0-f48.google.com with SMTP id r127so13785586itb.5; Fri, 20 Oct 2017 08:18:20 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SMSXp1bnKNL7g8607M9vs7a4dVMqPaZ0FOEdkn9HXSbBPw60hpTL3hyw+1WDsHraFYr0CGAF4Lv+ypLC80wfk= X-Received: by 10.36.178.19 with SMTP id u19mr2872514ite.64.1508512699792; Fri, 20 Oct 2017 08:18:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.23.129 with HTTP; Fri, 20 Oct 2017 08:17:59 -0700 (PDT) In-Reply-To: <1508511786.1383.50.camel@freebsd.org> References: <1508425713.1383.6.camel@freebsd.org> <1508432312.1383.18.camel@freebsd.org> <20171019172246.GU2473@kib.kiev.ua> <1508511786.1383.50.camel@freebsd.org> From: Kyle Evans Date: Fri, 20 Oct 2017 10:17:59 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: We do serial differently. To: Ian Lepore Cc: Konstantin Belousov , FreeBSD Hackers , Zaphod Beeblebrox Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Oct 2017 15:18:23 -0000 On Fri, Oct 20, 2017 at 10:03 AM, Ian Lepore wrote: > On Fri, 2017-10-20 at 08:36 -0500, Kyle Evans wrote: > > This doesn't seem to necessarily be true with ucom(4) bits. I put in a > bit > > of effort to try and get devel/libserialport to stop setting DTR when it > > probes /dev/cuaU* to no avail. As a consequence, connected Arduinos > > constantly reset when devel/arduino18 is open unless the serial > > monitor/plotter is also open. > > > > I can appreciate that +DTR is a sensible default here, but it would be > nice > > if it could be configured with the .init node. > > Hmm. You mention the .init node, does setting -hupcl in the .lock node > fail to suppress toggling DTR as well? That, I think, would be a bug. > > -- Ian > Yeah, that also fails to suppress it. For documentation purposes, this is the exact device/driver I'm working with: ugen0.2: at usbus0 umodem0 on uhub0 umodem0: on usbus0 umodem0: data interface 1, has CM over data, has break When I last poked at it, I think I had decided that this line: https://svnweb.freebsd.org/base/head/sys/dev/usb/serial/usb_serial.c?view=markup#l735 was the culprit and blatantly ignoring any configuration, but this isn't exactly an area that I'm familiar with so I assume there might be something elsewhere that I'm missing. From owner-freebsd-hackers@freebsd.org Fri Oct 20 12:17:38 2017 Return-Path: Delivered-To: freebsd-hackers@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 A8B6AE3317E for ; Fri, 20 Oct 2017 12:17:38 +0000 (UTC) (envelope-from dvyukov@google.com) Received: from mail-it0-x242.google.com (mail-it0-x242.google.com [IPv6:2607:f8b0:4001:c0b::242]) (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 7582D74432 for ; Fri, 20 Oct 2017 12:17:38 +0000 (UTC) (envelope-from dvyukov@google.com) Received: by mail-it0-x242.google.com with SMTP id 72so13725644itl.5 for ; Fri, 20 Oct 2017 05:17:38 -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:in-reply-to:references:from:date :message-id:subject:to; bh=a2yWmVmiYQdGK0+9lG9QhVC7yMqNStlbEvhL0LczvuE=; b=bLmX1RI6hc4+6Kxjx37vTTPhL0mNKEEFvjBYj5WzgTd3zGeUkVyQ7zCxrnP1/s9CeT ilXiIWDKoP4mLB8t1ceLY+NUBkua4mv3FdOa8S/ROrspYn2mjDDqgTpenNo7dHZRKq0m TyELhRJS4hgYvPPeCKXFZ6V8ivzqP+TB6+i09r18R7nPo+yGrirg4pSelphrlUJgu8UP UlmxbTSMsU1BxU9z9hj9AjVZn+EGHjDMhvMLw8+Znr6lYwFvI8bcMNGgTEy8/bL8arS6 hUOt6JmeRTlaEedHCJgjCab8Nv+mgvWsA7AHu758loONqLqgLakYWeBhfbK1U5ilHLPP 5SjA== X-Gm-Message-State: AMCzsaXu0LHUuWMunWbGItA0+WwWDsdh5KQVm4shfL6OihWq3kj96z+z h6oGKpr8aN+AX9shuNbHDS5um9xO8PzEQ6fB1N43eJ4z4qs= X-Google-Smtp-Source: ABhQp+ROOA0vWE2Mn4BXdpkDGRlNPb7YDm8VCRBd1VI5MsSgqA680QkvG8UsMv+0jcuXR9BbTFaxuKefB+zxxe7h05M= X-Received: by 10.36.5.211 with SMTP id 202mr2195505itl.122.1508501857386; Fri, 20 Oct 2017 05:17:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.2.155.231 with HTTP; Fri, 20 Oct 2017 05:17:16 -0700 (PDT) In-Reply-To: References: From: Dmitry Vyukov Date: Fri, 20 Oct 2017 14:17:16 +0200 Message-ID: Subject: Re: syzkaller for freebsd To: Julian Elischer , freebsd-hackers@freebsd.org, syzkaller Content-Type: text/plain; charset="UTF-8" X-Mailman-Approved-At: Fri, 20 Oct 2017 15:40:57 +0000 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Oct 2017 12:17:38 -0000 On Fri, Oct 20, 2017 at 7:24 AM, Julian Elischer wrote: > On 19/10/17 8:05 pm, Dmitry Vyukov via freebsd-hackers wrote: >> >> Hello, >> >> Our team works on kernel testing and in particular on syzkaller system >> call fuzzer (https://github.com/google/syzkaller). It started as >> Linux-only fuzzer and has found 1000+ bugs in Linux. But we started >> evolving towards supporting more OSes recently and added basic FreeBSD >> support. I see that FreeBSD https://wiki.freebsd.org/IdeasPage >> mentions syzkaller/KASAN, so I am reaching out to you share our >> progress and discuss potential collaboration. Our main focus will >> probably stay around Linux/Fuchsia and we don't have any experience >> around FreeBSD kernel (e.g. implementing code coverage support and >> even building). But if there is an active interest on FreeBSD >> community side, we are ready to collaborate. >> >> So, I was able to run syzkaller in full setup (including VM >> management, console output monitoring, etc) and outlined the process >> here: >> https://github.com/google/syzkaller/blob/master/docs/freebsd.md >> >> To warm up your interest, here is list of things I've found so far. >> This is with off-the-shelf FreeBSD-11.1-RELEASE-amd64.qcow2 image. >> >> panic: ffs_write: type 0xfffff80003eee760 8 (0,0) >> https://pastebin.com/raw/Xm80kYSz >> This one even comes with a C reproducer (which is surprising, because >> syzkaller currently only generates/builds reproducers for Linux, still >> it somehow run on FreeBSD and triggered the crash): >> https://pastebin.com/raw/EZe8thej >> >> Fatal trap 12: page fault in atrtc_settime >> https://pastebin.com/raw/pFzSgNff >> >> Fatal trap 12: page fault in bufdone >> https://pastebin.com/raw/amHtWwQS >> >> Fatal trap 12: page fault in sctp_sosend >> https://pastebin.com/raw/Zf2hYwi7 >> >> Fatal trap 12: page fault in vnet_pf_uninit >> https://pastebin.com/raw/0AiJJz7D >> >> Fatal trap 9: general protection fault in udp_close >> https://pastebin.com/raw/DzKYRkSm >> >> There was also a bunch of silent crashes/hangs >> https://pastebin.com/raw/gp5HDmHZ >> >> But lots of things for full FreeBSD support are still missing. I've >> sketched a list here: >> >> https://github.com/google/syzkaller/blob/master/docs/freebsd.md#missing-things >> >> Some are harder to do, some are easier to do. Just running it with a >> debug kernel build (with debug info and as many debug checks as >> possible) would probably be the simplest one. >> >> Thanks, >> Dmitry Vyukov >> _______________________________________________ >> 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" > > > A quick thing to do would be to run the linux binary and therefore test our > linux API.. it feeds into the same backend, so it would already give a lot > of coverage. +mailing lists again Yes, it's mentioned here: https://github.com/google/syzkaller/blob/master/docs/freebsd.md#missing-things From owner-freebsd-hackers@freebsd.org Sat Oct 21 07:13:38 2017 Return-Path: Delivered-To: freebsd-hackers@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 D368FE4F8CD for ; Sat, 21 Oct 2017 07:13:38 +0000 (UTC) (envelope-from dvyukov@google.com) Received: from mail-io0-x242.google.com (mail-io0-x242.google.com [IPv6:2607:f8b0:4001:c06::242]) (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 A28F276711 for ; Sat, 21 Oct 2017 07:13:38 +0000 (UTC) (envelope-from dvyukov@google.com) Received: by mail-io0-x242.google.com with SMTP id f20so15373012ioj.9 for ; Sat, 21 Oct 2017 00:13:38 -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:in-reply-to:references:from:date :message-id:subject:to:cc; bh=zrkdGjmbWn/23xsdC4opiNA6jzQt6+yLwtFkFPI45Vg=; b=FnAyOSnfrLio8s58qxu+meInSr45+78jV1x6xTNQed6fhY8swzZuKwXRNuuP8A19+p vCRPVUnU6FrErNHNFKpco7JfiwTT/NaPxQK+5m1bNq3DcNsSv/MKSCNDM6LGwxgcfKrK zO1y3LJ6NILkTKhqA0S4qkLmD8/yrBJ6pwUFsWWha7BTDUz1CO0rZLbAbh9X1H/ztozX KBdA1anooerkGUkLDew64huEM1WfDcDbsdIKQ67eQD9MHuOi/olLm0zz8sSRmq7b214J Zla91qUCP4BzDHXz5APIGD6eJPwCGMhhonyfqX+Tha4vNjs5E95qA8PBtB7S+XYp6Imh eXNg== X-Gm-Message-State: AMCzsaVETBLJL/CwAJ2+VHrxKCnnYgzHcTp5TSFLmVE92te7KTwRUWAj PBgSrWo0Cwiu9N0a6zybEgX3XOWLTrbSsPr5OJ6vLg== X-Google-Smtp-Source: ABhQp+Q+cOkZknwJ59dgSJQjSR4t624VoJak4JXX4OWesaYAWWgIa3+UKixB1eOJM6BlcGu9lzgDyxO4FCu1fHrCayM= X-Received: by 10.107.10.157 with SMTP id 29mr9408981iok.285.1508570017563; Sat, 21 Oct 2017 00:13:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.2.155.231 with HTTP; Sat, 21 Oct 2017 00:13:17 -0700 (PDT) In-Reply-To: References: From: Dmitry Vyukov Date: Sat, 21 Oct 2017 09:13:17 +0200 Message-ID: Subject: Re: syzkaller for freebsd To: Joe Nosay Cc: Julian Elischer , FreeBSD Hackers , syzkaller Content-Type: text/plain; charset="UTF-8" X-Mailman-Approved-At: Sat, 21 Oct 2017 10:48:36 +0000 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Oct 2017 07:13:38 -0000 On Fri, Oct 20, 2017 at 9:55 PM, Joe Nosay wrote: > Have any of you tried this on other CPU architectures - RISC, et al? Other architectures are not supported yet. So, no. The most profitable would be 386 because it will trigger 32-bit entry points. Based on other experience with Linux, amd64/armd64/ppc64 does not make lots of difference (except virtualization support, which is not supported for freebsd anyway). > On Fri, Oct 20, 2017 at 8:17 AM, Dmitry Vyukov via freebsd-hackers > wrote: >> >> On Fri, Oct 20, 2017 at 7:24 AM, Julian Elischer >> wrote: >> > On 19/10/17 8:05 pm, Dmitry Vyukov via freebsd-hackers wrote: >> >> >> >> Hello, >> >> >> >> Our team works on kernel testing and in particular on syzkaller system >> >> call fuzzer (https://github.com/google/syzkaller). It started as >> >> Linux-only fuzzer and has found 1000+ bugs in Linux. But we started >> >> evolving towards supporting more OSes recently and added basic FreeBSD >> >> support. I see that FreeBSD https://wiki.freebsd.org/IdeasPage >> >> mentions syzkaller/KASAN, so I am reaching out to you share our >> >> progress and discuss potential collaboration. Our main focus will >> >> probably stay around Linux/Fuchsia and we don't have any experience >> >> around FreeBSD kernel (e.g. implementing code coverage support and >> >> even building). But if there is an active interest on FreeBSD >> >> community side, we are ready to collaborate. >> >> >> >> So, I was able to run syzkaller in full setup (including VM >> >> management, console output monitoring, etc) and outlined the process >> >> here: >> >> https://github.com/google/syzkaller/blob/master/docs/freebsd.md >> >> >> >> To warm up your interest, here is list of things I've found so far. >> >> This is with off-the-shelf FreeBSD-11.1-RELEASE-amd64.qcow2 image. >> >> >> >> panic: ffs_write: type 0xfffff80003eee760 8 (0,0) >> >> https://pastebin.com/raw/Xm80kYSz >> >> This one even comes with a C reproducer (which is surprising, because >> >> syzkaller currently only generates/builds reproducers for Linux, still >> >> it somehow run on FreeBSD and triggered the crash): >> >> https://pastebin.com/raw/EZe8thej >> >> >> >> Fatal trap 12: page fault in atrtc_settime >> >> https://pastebin.com/raw/pFzSgNff >> >> >> >> Fatal trap 12: page fault in bufdone >> >> https://pastebin.com/raw/amHtWwQS >> >> >> >> Fatal trap 12: page fault in sctp_sosend >> >> https://pastebin.com/raw/Zf2hYwi7 >> >> >> >> Fatal trap 12: page fault in vnet_pf_uninit >> >> https://pastebin.com/raw/0AiJJz7D >> >> >> >> Fatal trap 9: general protection fault in udp_close >> >> https://pastebin.com/raw/DzKYRkSm >> >> >> >> There was also a bunch of silent crashes/hangs >> >> https://pastebin.com/raw/gp5HDmHZ >> >> >> >> But lots of things for full FreeBSD support are still missing. I've >> >> sketched a list here: >> >> >> >> >> >> https://github.com/google/syzkaller/blob/master/docs/freebsd.md#missing-things >> >> >> >> Some are harder to do, some are easier to do. Just running it with a >> >> debug kernel build (with debug info and as many debug checks as >> >> possible) would probably be the simplest one. >> >> >> >> Thanks, >> >> Dmitry Vyukov >> >> _______________________________________________ >> >> 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" >> > >> > >> > A quick thing to do would be to run the linux binary and therefore test >> > our >> > linux API.. it feeds into the same backend, so it would already give a >> > lot >> > of coverage. >> >> +mailing lists again >> >> Yes, it's mentioned here: >> >> https://github.com/google/syzkaller/blob/master/docs/freebsd.md#missing-things >> _______________________________________________ >> 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 Sat Oct 21 14:09:56 2017 Return-Path: Delivered-To: freebsd-hackers@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 01B4FE2BBFE for ; Sat, 21 Oct 2017 14:09:56 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) 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 DF74D84F38 for ; Sat, 21 Oct 2017 14:09:55 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: by mailman.ysv.freebsd.org (Postfix) id DB92DE2BBFD; Sat, 21 Oct 2017 14:09:55 +0000 (UTC) Delivered-To: hackers@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 DB25BE2BBFC for ; Sat, 21 Oct 2017 14:09:55 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from mailhost.dlr.de (mailhost.dlr.de [129.247.252.33]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mailhost.dlr.de", Issuer "DLR CA - G02" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 714C784F37 for ; Sat, 21 Oct 2017 14:09:54 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from DLREXHUB02.intra.dlr.de (172.21.152.140) by mailhost.dlr.de (172.21.163.101) with Microsoft SMTP Server (TLS) id 14.3.361.1; Sat, 21 Oct 2017 16:08:34 +0200 Received: from KNOP-BEAGLE.kn.op.dlr.de (129.247.178.136) by smtp.dlr.de (172.21.152.151) with Microsoft SMTP Server (TLS) id 14.3.361.1; Sat, 21 Oct 2017 16:08:41 +0200 Date: Sat, 21 Oct 2017 16:08:57 +0200 From: Hartmut Brandt X-X-Sender: brandt_h@KNOP-BEAGLE.kn.op.dlr.de To: Subject: PCIe transaction size Message-ID: User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="US-ASCII" X-TM-AS-Product-Ver: SMEX-11.0.0.4283-8.100.1062-23408.007 X-TM-AS-Result: No-1.970300-5.000000-31 X-TM-AS-MatchedID: 706891-711871-860275-708497-707136-709584-705882-701837-7 05706-701775-700398-148004-148050-10007-41000-42000-42003-63 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Oct 2017 14:09:56 -0000 Hi all, I'm designing a FPGA board that has memory that is accessible via the PCIe bus from FreeBSD. I observed, that the host always splits the memory transactions on 8 byte boundaries. So reading or storing an 128-bit integer generates two transactions, if the integer is unaligned even four. Is there a way to get the CPU or chipset or whoever produces the transactions to make larger transactions? I found an Intel paper that seems to talk about this (How to Implement a 64B PCIe Burst Transfer or Intel Architecture) but I've no idea how to do what they write on FreeBSD :-). Any help? harti From owner-freebsd-hackers@freebsd.org Sat Oct 21 18:47:46 2017 Return-Path: Delivered-To: freebsd-hackers@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 04A82E37050 for ; Sat, 21 Oct 2017 18:47:46 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (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 D8B63669CF for ; Sat, 21 Oct 2017 18:47:45 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 33d825e8-b690-11e7-b50b-53dc5ecda239 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id 33d825e8-b690-11e7-b50b-53dc5ecda239; Sat, 21 Oct 2017 18:46:52 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v9LIla7E013927; Sat, 21 Oct 2017 12:47:36 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1508611656.1383.100.camel@freebsd.org> Subject: Re: We do serial differently. From: Ian Lepore To: Kyle Evans Cc: Konstantin Belousov , FreeBSD Hackers , Zaphod Beeblebrox Date: Sat, 21 Oct 2017 12:47:36 -0600 In-Reply-To: References: <1508425713.1383.6.camel@freebsd.org> <1508432312.1383.18.camel@freebsd.org> <20171019172246.GU2473@kib.kiev.ua> <1508511786.1383.50.camel@freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Oct 2017 18:47:46 -0000 On Fri, 2017-10-20 at 10:17 -0500, Kyle Evans wrote: > On Fri, Oct 20, 2017 at 10:03 AM, Ian Lepore wrote: > > > > > On Fri, 2017-10-20 at 08:36 -0500, Kyle Evans wrote: > > > > > > This doesn't seem to necessarily be true with ucom(4) bits. I put in a > > bit > > > > > > of effort to try and get devel/libserialport to stop setting DTR when it > > > probes /dev/cuaU* to no avail. As a consequence, connected Arduinos > > > constantly reset when devel/arduino18 is open unless the serial > > > monitor/plotter is also open. > > > > > > I can appreciate that +DTR is a sensible default here, but it would be > > nice > > > > > > if it could be configured with the .init node. > > Hmm.  You mention the .init node, does setting -hupcl in the .lock node > > fail to suppress toggling DTR as well?  That, I think, would be a bug. > > > > -- Ian > > > Yeah, that also fails to suppress it. For documentation purposes, this is > the exact device/driver I'm working with: > > > ugen0.2: www.arduino.cc product 0x0043> at usbus0 > umodem0 on uhub0 > umodem0: www.arduino.cc product 0x0043, class 2/0, rev 1.10/0.01, > addr 9> on usbus0 > umodem0: data interface 1, has CM over data, has break > > > When I last poked at it, I think I had decided that this line: > https://svnweb.freebsd.org/base/head/sys/dev/usb/serial/usb_serial.c?view=markup#l735 > > was the culprit and blatantly ignoring any configuration, but this isn't > exactly an area that I'm familiar with so I assume there might be something > elsewhere that I'm missing. First, a word about DTR being asserted vs. de-asserted... RS232 signals are inverted from the corresponding UART signals.  That is, when the DTR signal is 0 at the output of a uart chip, it runs through an RS232 line-level converter which inverts the signal to a 1 on the RS232 output side.  Often with embedded system stuff there is no RS232 conversion, the signals remain at uart levels on both ends.  In this case, "DTR asserted" means 0v on the DTR pin of the uart chips. Okay, after some digging, here's what I've found about how freebsd behaves with DTR... On first open(), DTR is asserted.  There is no control over that, it's just always going to happen.  (Slightly buggy: multiple serial drivers do this, and the tty layer does it too.  I think only the tty layer should do it.) On last close(), DTR is de-asserted unless -hupcl has been set.  This seems to be done ONLY in various drivers, and not be the tty layer, which seems differently-buggy than the open-assertion case.  Maybe there is a reason the tty layer can't do this, I didn't dig into it. If you set both /dev/cuaU#.init and /dev/cuaU#.lock to -hupcl, that will ensure that once the device is opened for the first time, DTR will remain asserted forever after that.  (setting .lock prevents any program from changing that setting.) There is no way to prevent DTR from ever being asserted. Things I've read about linux while searching for info on this seem to indicate it behaves the same way (but it lacks the .init and .lock features).  Apparently only on Windows is it possible to configure serial drivers to leave the DTR line completely untouched. -- Ian