From owner-freebsd-hackers@FreeBSD.ORG Sun May 3 19:29:33 2015 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0BB24DC3 for ; Sun, 3 May 2015 19:29:33 +0000 (UTC) Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [IPv6:2a00:1450:400c:c05::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 9B3121F36 for ; Sun, 3 May 2015 19:29:32 +0000 (UTC) Received: by widdi4 with SMTP id di4so91379769wid.0 for ; Sun, 03 May 2015 12:28:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version:content-type :content-transfer-encoding; bh=xUFKMNN8kxRE2xKlWzAzMIcykoKevnXSA6BNXgy836Q=; b=gFabj9Bvl2Z/RZSZ/Ro8FXwLkKiQYenyBcNMhrkh6HpFefun4KhEh53quoD0zD6im5 b2drBdjV83hqgoluNjOtZJv2BrtO97kXxBYsoSwtD4izQLDtdmwlkTdX7iXqGHGqM6I+ fBWvN5Nh2FVNcO8jl0CuFGAS2IkA4V85wAkojhBJeLYmjnfwTw9OoRAvyjKicBLiVbCe co+h1aeOYUez/99h4pXkZo32l8H1V4r/cWG0fvVvjxu9jAOZkVHqooy8rIu0qMhGPLmR T3hgl73m12TPz1kjJw8dCq6z3ZonZgOS6/ypJn6/FiV2vd4AxbDqB9luRSAa2ogIigUd RDNQ== X-Received: by 10.180.7.134 with SMTP id j6mr13932487wia.9.1430680021314; Sun, 03 May 2015 12:07:01 -0700 (PDT) Received: from localhost (cpe-94-253-198-113.zg2.cable.xnet.hr. [94.253.198.113]) by mx.google.com with ESMTPSA id z12sm17197257wjq.12.2015.05.03.12.07.00 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Sun, 03 May 2015 12:07:00 -0700 (PDT) Date: Sun, 3 May 2015 21:06:53 +0200 From: To: hackers@freebsd.org Subject: custom kernel install warnings Message-ID: <20150503210653.00001d2b@gmail.com> 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.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2015 19:29:33 -0000 FreeBSD 10.1-RELEASE-p9 i386 After build of custom kernel, during it's install I get: ---- make[4]: "/usr/src/sys/modules/dpt/Makefile" line 26: warning: Couldn't read shell's output for "sed -n '/DEV_EISA/p' /usr/obj/usr/src/sys/SERVER/opt_eisa.h" make[4]: "/usr/src/sys/modules/nfscl/Makefile" line 46: warning: Couldn't read shell's output for "cat /usr/obj/usr/src/sys/SERVER/opt_nfsroot.h" make[4]: "/usr/src/sys/modules/nfsclient/Makefile" line 32: warning: Couldn't read shell's output for "cat /usr/obj/usr/src/sys/SERVER/opt_nfsroot.h" ---- Errors are non fatal. Kernel installs and works. Domagoj From owner-freebsd-hackers@FreeBSD.ORG Mon May 4 15:45:08 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3758D82E for ; Mon, 4 May 2015 15:45:08 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13FA81F28 for ; Mon, 4 May 2015 15:45:08 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0CE3CB980; Mon, 4 May 2015 11:45:07 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Cc: suresh gumpula Subject: Re: Memory foot print on BSD 9.1 Date: Mon, 04 May 2015 11:01:13 -0400 Message-ID: <7264664.ze1moPZzvB@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 04 May 2015 11:45:07 -0400 (EDT) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2015 15:45:08 -0000 On Friday, March 13, 2015 11:51:27 AM suresh gumpula wrote: > Hello VM experts, > I am trying to figure out what has been changed from 8.1 to 9.1 which > results more memory footprint on all processes. looking at one of the big > processes we have on a idle machine, > its about 35M resident size increase. Looking at map entries by procstat > -v shows me that two libraries , one is our internal library(libmgwd) and > other one is boost consume more now. > There are no changes made with respect to process, just comparing after the > upgrade to 9.1. > > Is there any knows things with respect VM has been changed and could result > in more resident memory ? Can somebody please help on this to know what > exactly causing this behaviour ? > Details below. > > Thank you! I'll have to think about your patch, but for figuring out what is going on, can you figure out which sections have changed size? For example, if .text has increased, perhaps see if you can find individual functions that have changed in one of the libraries in question and compare their disassembly? Also, are you using clang on 9.x? (It might generate quite different code from GCC, though I think cc is still GCC by default on 9.x, so you'd have to use clang explicitly.) If your increased usage is in anonymous memory, then you might want to look at malloc stats and see if changes to jemalloc(3) are caching more "free" memory in your process. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon May 4 16:55:03 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B58C5B8 for ; Mon, 4 May 2015 16:55:03 +0000 (UTC) Received: from mx142.netapp.com (mx142.netapp.com [216.240.21.19]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "mx142.netapp.com", Issuer "VeriSign Class 3 International Server CA - G3" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 184231793 for ; Mon, 4 May 2015 16:55:02 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.13,366,1427785200"; d="scan'208,217";a="38917607" Received: from hioexcmbx03-prd.hq.netapp.com ([10.122.105.36]) by mx142-out.netapp.com with ESMTP; 04 May 2015 09:49:47 -0700 Received: from HIOEXCMBX03-PRD.hq.netapp.com (10.122.105.36) by hioexcmbx03-prd.hq.netapp.com (10.122.105.36) with Microsoft SMTP Server (TLS) id 15.0.995.29; Mon, 4 May 2015 09:49:46 -0700 Received: from HIOEXCMBX03-PRD.hq.netapp.com ([::1]) by hioexcmbx03-prd.hq.netapp.com ([fe80::4c9:7f9e:4b9f:2c9c%21]) with mapi id 15.00.0995.031; Mon, 4 May 2015 09:49:46 -0700 From: "Gumpula, Suresh" To: "freebsd-hackers@freebsd.org" Subject: Use after free check for all private zones too Thread-Topic: Use after free check for all private zones too Thread-Index: AQHQhopTQv6FyLvjkE2duWbwV+tNQQ== Date: Mon, 4 May 2015 16:49:46 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.4.7.141117 x-originating-ip: [10.122.56.79] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2015 16:55:03 -0000 Hi , Currently use after free check is available for power of 2 malloc zon= es ( mt_rash_ctor/ m_trash_dotr ) which writes uma_junk(0xdeadc0de) on free= d memory and validates on reusing the object for others . Similary we( NETAPP) have added a check for all other private zones to= o with trash_ctor/ trash_dtor . We pass the trash_ctor/trash_dtor to um= a_zcreate(9) if it is called with NULL for constructor/destructor. This change uncovered the couple of bugs inernally. One of this is in tcp= timer bug https://svnweb.freebsd.org/base?view=3Drevision&revision=3D281599 Its a useful check and uncovers use after free bugs . Would like to push t= his change . Any comments/suggestions please ? Thanks Suresh From owner-freebsd-hackers@FreeBSD.ORG Wed May 6 20:49:13 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7E8781C for ; Wed, 6 May 2015 20:49:13 +0000 (UTC) Received: from mail-ig0-x22b.google.com (mail-ig0-x22b.google.com [IPv6:2607:f8b0:4001:c05::22b]) (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 A4A191BB1 for ; Wed, 6 May 2015 20:49:13 +0000 (UTC) Received: by igbhj9 with SMTP id hj9so28109436igb.1 for ; Wed, 06 May 2015 13:49:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=c5KEbj3IEhmYlrYqDj+kCWMZdOPwPDghBSDIMuWOrfU=; b=he36BoPhqCxXukL1wUyoUA/8KNfPScmMg3eVG7tTiTiH41wVNuYOmfazF+5L8H7ZuL WDE+PwtsSJ9iuzGvBQTPRdLjBhTPPzJkQlgec400xHOOmZkjU7+dUsKwnESZNep3iCn3 Zs83Gjuaw60/HTB1Xb4RP7b2PDBrIPlBc0A8ZyM9kaC4gvcaPGHmOUDkq99NMDZFdMMh 8QL1MncYFdqwm85HuvyE12Fy6ttZ6Dqp/vJtmcY9+TyiUBApA8GCJCw1zwcXUc/pKua2 NV9MTr09yK7owPkXafqW3mN8D6rEu6+hQHJ9/JrD7ESVh1BpLLwmAonnnwlZCRHJGYit aNDw== MIME-Version: 1.0 X-Received: by 10.107.130.145 with SMTP id m17mr715439ioi.89.1430945353135; Wed, 06 May 2015 13:49:13 -0700 (PDT) Received: by 10.107.40.194 with HTTP; Wed, 6 May 2015 13:49:13 -0700 (PDT) Date: Wed, 6 May 2015 16:49:13 -0400 Message-ID: Subject: What's required to make removal of a mounted USB stick safe? From: Ryan Stone To: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 May 2015 20:49:13 -0000 Currently FreeBSD stands a fair chance at panicking if a mounted USB drive is removed while I/O is in flight. Does anybody know what work is involved to have the kernel safely recover from this case? Losing data from the drive is expected of course but there's no reason that the entire kernel has to crash. A co-worker has been looking at this but I don't feel that we understand the problem well enough to produce a real fix. All that we've been doing so far is papering over the explicit panics without having a full understanding of what we're doing. From owner-freebsd-hackers@FreeBSD.ORG Wed May 6 21:28:14 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 337078CA for ; Wed, 6 May 2015 21:28:14 +0000 (UTC) Received: from mail-qg0-x22a.google.com (mail-qg0-x22a.google.com [IPv6:2607:f8b0:400d:c04::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 EDFB610F7 for ; Wed, 6 May 2015 21:28:13 +0000 (UTC) Received: by qgfi89 with SMTP id i89so11734686qgf.1 for ; Wed, 06 May 2015 14:28:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Ib+cjBOKnknCiO/SOpIajMwxN8TtPoKV7h7nOOUmgYU=; b=oGb7JsUrcwjQANlehHYEFgELdzKHPuTgaAYxNj9c78KZO+yJ/FdwQUuUYMFKjLdpCo TGO86+76htCMI2crzjciZfSDn3FrGCdY66EXfLK+1HxAZStSEXSldWXcgMWhVcASsUzJ e62UFn2TxTvlqqMifDBJ8cxC2Y+0QbBAmfHbtFJHhxiRDOzOcIpoF8Ugm9kqVDH/TrIw pE0TpEy9imWEzgO5bKYwhfPur4bfRSB8j3CQ20KjDTl2oPwQ5mDrZqqwNxwEHrTHvbPc 6/loqCx/re4ayv94JXtKUCo8oYwYp+dXYfaP78fXgh0CDSd1c767w6eQ224mXgDmtxSG pINA== MIME-Version: 1.0 X-Received: by 10.55.16.140 with SMTP id 12mr1668328qkq.39.1430947693015; Wed, 06 May 2015 14:28:13 -0700 (PDT) Received: by 10.140.98.66 with HTTP; Wed, 6 May 2015 14:28:12 -0700 (PDT) In-Reply-To: References: Date: Wed, 6 May 2015 14:28:12 -0700 Message-ID: Subject: Re: What's required to make removal of a mounted USB stick safe? From: NGie Cooper To: Ryan Stone Cc: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 May 2015 21:28:14 -0000 On Wed, May 6, 2015 at 1:49 PM, Ryan Stone wrote: > Currently FreeBSD stands a fair chance at panicking if a mounted USB drive > is removed while I/O is in flight. Does anybody know what work is involved > to have the kernel safely recover from this case? Losing data from the > drive is expected of course but there's no reason that the entire kernel > has to crash. > > A co-worker has been looking at this but I don't feel that we understand > the problem well enough to produce a real fix. All that we've been doing > so far is papering over the explicit panics without having a full > understanding of what we're doing. What version are you working on and how is the USB stick mounted (/, /mnt, etc)? Thanks! From owner-freebsd-hackers@FreeBSD.ORG Wed May 6 21:50:53 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BAFD67E for ; Wed, 6 May 2015 21:50:53 +0000 (UTC) Received: from mail-ig0-x22b.google.com (mail-ig0-x22b.google.com [IPv6:2607:f8b0:4001:c05::22b]) (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 83C5F14F0 for ; Wed, 6 May 2015 21:50:53 +0000 (UTC) Received: by iget9 with SMTP id t9so107102243ige.1 for ; Wed, 06 May 2015 14:50:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=8cK/eQ4+qQTg3YfXYSXOV+SCCyugk3lBB30g8k08N/g=; b=jQxx8nDE9DmfU60mXWQTHAd+oru3q1MjNaVAadh31o7j4EVhnYOPRpKTcxGS1zMy7/ LgVULmJGyxlRK13t6Cxh+aZ+UktcqVf37d5DuLjVznYjelT+vvWbb0FiZo6r8eK3C9c2 Fc1ryIUpS2STkLgRUIUQ4fJZybrH3ue2XJJ4FjM+Ob/pp3p+t9pfmklkR7AO1eRPOCjE qoSq5UdoT2nbWD+5JiyKfEYGWZIFiGKRq6ualQmGyQnSFDWTEe2xN700qqtmL6KdQa7p RJcQ7DLXPW3Nfoz4ok2dhqawaf07umH1Y+pNAsWhPOD+4YQeqQYUd+BUo4wHSRDw4LUt /OCA== MIME-Version: 1.0 X-Received: by 10.107.130.145 with SMTP id m17mr997145ioi.89.1430949052968; Wed, 06 May 2015 14:50:52 -0700 (PDT) Received: by 10.107.40.194 with HTTP; Wed, 6 May 2015 14:50:52 -0700 (PDT) In-Reply-To: References: Date: Wed, 6 May 2015 17:50:52 -0400 Message-ID: Subject: Re: What's required to make removal of a mounted USB stick safe? From: Ryan Stone To: NGie Cooper Cc: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 May 2015 21:50:53 -0000 On Wed, May 6, 2015 at 5:28 PM, NGie Cooper wrote: > On Wed, May 6, 2015 at 1:49 PM, Ryan Stone wrote: > > Currently FreeBSD stands a fair chance at panicking if a mounted USB > drive > > is removed while I/O is in flight. Does anybody know what work is > involved > > to have the kernel safely recover from this case? Losing data from the > > drive is expected of course but there's no reason that the entire kernel > > has to crash. > > > > A co-worker has been looking at this but I don't feel that we understand > > the problem well enough to produce a real fix. All that we've been doing > > so far is papering over the explicit panics without having a full > > understanding of what we're doing. > > What version are you working on and how is the USB stick mounted (/, /mnt, > etc)? > Thanks! > Most of our testing was with 8.2, but we also did testing with some version of FreeBSD 10 (unfortunately I can't find a reference to a specific version). It's mounted on /mnt. I'm not expecting us to survive the loss of the root filesystem. :) From owner-freebsd-hackers@FreeBSD.ORG Wed May 6 21:59:21 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9CBE7463 for ; Wed, 6 May 2015 21:59:21 +0000 (UTC) Received: from slim.berklix.org (slim.berklix.org [94.185.90.68]) (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 146A61574 for ; Wed, 6 May 2015 21:59:20 +0000 (UTC) Received: from mart.js.berklix.net (pD9FBF374.dip0.t-ipconnect.de [217.251.243.116]) (authenticated bits=128) by slim.berklix.org (8.14.5/8.14.5) with ESMTP id t46LxebT021693; Wed, 6 May 2015 23:59:41 +0200 (CEST) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by mart.js.berklix.net (8.14.3/8.14.3) with ESMTP id t46LxIba085188; Wed, 6 May 2015 23:59:18 +0200 (CEST) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.7/8.14.7) with ESMTP id t46Lx0iZ028607; Wed, 6 May 2015 23:59:12 +0200 (CEST) (envelope-from jhs@berklix.com) Message-Id: <201505062159.t46Lx0iZ028607@fire.js.berklix.net> To: NGie Cooper cc: Ryan Stone , "freebsd-hackers@freebsd.org" Subject: Re: What's required to make removal of a mounted USB stick safe? From: "Julian H. Stacey" Organization: http://berklix.com BSD Unix Linux Consultants, Munich Germany User-agent: EXMH on FreeBSD http://berklix.com/free/ X-URL: http://www.berklix.com In-reply-to: Your message "Wed, 06 May 2015 14:28:12 -0700." Date: Wed, 06 May 2015 23:59:00 +0200 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 May 2015 21:59:21 -0000 Hi, Reference: > From: NGie Cooper > Date: Wed, 6 May 2015 14:28:12 -0700 NGie Cooper wrote: > On Wed, May 6, 2015 at 1:49 PM, Ryan Stone wrote: > > Currently FreeBSD stands a fair chance at panicking if a mounted USB drive > > is removed while I/O is in flight. Does anybody know what work is involved > > to have the kernel safely recover from this case? Losing data from the > > drive is expected of course but there's no reason that the entire kernel > > has to crash. > > > > A co-worker has been looking at this but I don't feel that we understand > > the problem well enough to produce a real fix. All that we've been doing > > so far is papering over the explicit panics without having a full > > understanding of what we're doing. > > What version are you working on and how is the USB stick mounted (/, /mnt, etc)? Not a new problem, it' been so over 30 years with Unix. Remove media without umount & game over. Some Solutions: - Deep kernel work (dont hold your breath, see 30 above, & don't look at me :-) - Cobble up some C to run from user space, not as root, so that your UFS is not mounted, but accessed by user level programs (much like mwrite & mread for accessing DOS media of old) - man 8 amd : set a short timeout to auto unmount, it wont total solve your problem, but should lessen the frequency of panics. - Mount the USB media on a spare laptop running as an NFS+ AMD server, then access the FS via NFS from your real client big PC. When you pull the stick by accident forgetting its mounted, just the laptop crashes afte a bit, the AMD access on the other PC just hangs but doesnt crash. - Encourage A SOC (google summer of code) student to look at it, probably wont come to a solution though, see 30 above. - Toss money at the problem :-) If your company can afford some cash, either: - help fund FreeBSD Foundation & ask them to solve it, - Or pay some consultant somewhere to look at it, Here's a globaly geographicaly indexed list http://berklix.com/consultants/ maybe there's one near your company ? Cheers, Julian -- Julian Stacey, BSD Linux Unix C Sys Eng Consultant Munich http://berklix.com Indent previous with "> ". Reply Below as a play script. Send plain text, Not quoted-printable, HTML, or base64. From owner-freebsd-hackers@FreeBSD.ORG Thu May 7 06:10:04 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF82FD9 for ; Thu, 7 May 2015 06:10:04 +0000 (UTC) Received: from www2419.sakura.ne.jp (www2419.sakura.ne.jp [210.224.185.29]) (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 439301A93 for ; Thu, 7 May 2015 06:10:03 +0000 (UTC) Received: from fsav402.sakura.ne.jp (fsav402.sakura.ne.jp [133.242.250.101]) by www2419.sakura.ne.jp (8.14.5/8.14.5) with ESMTP id t476A1cH022896 for ; Thu, 7 May 2015 15:10:01 +0900 (JST) (envelope-from nuta@seiya.me) Received: from www2419.sakura.ne.jp (210.224.185.29) by fsav402.sakura.ne.jp (F-Secure/virusgw_smtp/412/fsav402.sakura.ne.jp); Thu, 07 May 2015 15:10:01 +0900 (JST) X-Virus-Status: clean(F-Secure/virusgw_smtp/412/fsav402.sakura.ne.jp) Received: from [133.51.51.58] ([133.51.51.58]) (authenticated bits=0) by www2419.sakura.ne.jp (8.14.5/8.14.5) with ESMTP id t476A0TA022857 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 7 May 2015 15:10:00 +0900 (JST) (envelope-from nuta@seiya.me) From: Seiya Nuta Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: User-mode FreeBSD? Message-Id: <506CAEF3-E94F-4C2E-8824-D1FBD782A6EA@seiya.me> Date: Thu, 7 May 2015 15:10:01 +0900 To: freebsd-hackers@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) X-Mailer: Apple Mail (2.2098) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2015 06:10:04 -0000 Hello. I want to run FreeBSD kernel in userland to use it as a library OS. Does FreeBSD kernel supports running in the userland like User Mode Linux? Thanks, Seiya From owner-freebsd-hackers@FreeBSD.ORG Thu May 7 06:23:15 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9CED9334 for ; Thu, 7 May 2015 06:23:15 +0000 (UTC) Received: from mail-la0-x22e.google.com (mail-la0-x22e.google.com [IPv6:2a00:1450:4010:c03::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 199C71C8B for ; Thu, 7 May 2015 06:23:15 +0000 (UTC) Received: by labbd9 with SMTP id bd9so23264205lab.2 for ; Wed, 06 May 2015 23:23:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=4uUZgLeCaUkO5FdNs/obo45yqDggAeNOimjwB6U3Svg=; b=lRixrYJuSst+vNSMAwi4EnLSz+kWRJbZbh5VR9lHRQ6ctChTyiee9pb27CZ07yyEza ecfqSeOjSCDbrASLQ88nNtS0rhaJNjEyKPEXIdNYuKb98gKvD+B0k2e/Ukvq/bQ04fkz 2Kh0rVWlpylSBfghQc24ELRC3KhB05AnmfKyHyM+ONZd8yK/k/AZOGQi5VDeK0wAToks Aa7DYBfi6vuNA94aqYN5pslRpAuJycuKtCXxki4B5oQgqUogbdkg8SJZD1IC16yFa1nc gNeZuD3/GR4tgrbC44BX6hf+B+5Jy9kfytLRlxGhuKdaUyWuy9OZqJ3RUEJ7KK9nVIJz p8xQ== X-Received: by 10.112.230.37 with SMTP id sv5mr1722685lbc.85.1430979793020; Wed, 06 May 2015 23:23:13 -0700 (PDT) Received: from [100.71.79.86] ([5.172.252.86]) by mx.google.com with ESMTPSA id u10sm210924lbb.30.2015.05.06.23.23.12 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 May 2015 23:23:12 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: What's required to make removal of a mounted USB stick safe? From: =?utf-8?Q?Edward_Tomasz_Napiera=C5=82a?= X-Mailer: iPhone Mail (12F70) In-Reply-To: Date: Thu, 7 May 2015 08:23:10 +0200 Cc: "freebsd-hackers@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <1306708F-0872-4D02-9C88-70F683018C39@FreeBSD.org> References: To: Ryan Stone X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2015 06:23:15 -0000 Dnia 6 maj 2015 o godz. 22:49 Ryan Stone napisa=C5=82(a)= : > Currently FreeBSD stands a fair chance at panicking if a mounted USB drive= > is removed while I/O is in flight. Does anybody know what work is involve= d > to have the kernel safely recover from this case? Losing data from the > drive is expected of course but there's no reason that the entire kernel > has to crash. I've spent some time on this few years ago, and got it to work, except for o= ne case: UFS with softupdates. It's possible that some regressions have bee= n introduced since then. What's the filesystem? Do you have a backtrace? From owner-freebsd-hackers@FreeBSD.ORG Thu May 7 09:48:49 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF568114 for ; Thu, 7 May 2015 09:48:49 +0000 (UTC) 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 4C70F18FE for ; Thu, 7 May 2015 09:48:48 +0000 (UTC) Received: from [194.32.164.24] (80-46-130-69.static.dsl.as9105.com [80.46.130.69]) by mx0.gid.co.uk (8.14.2/8.14.2) with ESMTP id t479iLJ9094224; Thu, 7 May 2015 10:44:21 +0100 (BST) (envelope-from rb@gid.co.uk) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: What's required to make removal of a mounted USB stick safe? From: Bob Bishop In-Reply-To: <201505062159.t46Lx0iZ028607@fire.js.berklix.net> Date: Thu, 7 May 2015 10:44:15 +0100 Cc: NGie Cooper , "freebsd-hackers@freebsd.org" , Ryan Stone Content-Transfer-Encoding: quoted-printable Message-Id: <1231C6A0-BFCB-4384-ADF4-FAB7739DF91D@gid.co.uk> References: <201505062159.t46Lx0iZ028607@fire.js.berklix.net> To: "Julian H. Stacey" X-Mailer: Apple Mail (2.2098) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2015 09:48:49 -0000 > On 6 May 2015, at 22:59, Julian H. Stacey wrote: >=20 > Hi, Reference: >> From: NGie Cooper >> Date: Wed, 6 May 2015 14:28:12 -0700 >=20 > NGie Cooper wrote: >> On Wed, May 6, 2015 at 1:49 PM, Ryan Stone wrote: >>> Currently FreeBSD stands a fair chance at panicking if a mounted USB = drive >>> is removed while I/O is in flight. Does anybody know what work is = involved >>> to have the kernel safely recover from this case? Losing data from = the >>> drive is expected of course but there's no reason that the entire = kernel >>> has to crash. >>>=20 >>> A co-worker has been looking at this but I don't feel that we = understand >>> the problem well enough to produce a real fix. All that we've been = doing >>> so far is papering over the explicit panics without having a full >>> understanding of what we're doing. >>=20 >> What version are you working on and how is the USB stick mounted (/, = /mnt, etc)? >=20 > Not a new problem, it' been so over 30 years with Unix.=20 > Remove media without umount & game over. =20 > Some Solutions: > - Deep kernel work (dont hold your breath, see 30 above, & don't look = at me :-) > - Cobble up some C to run from user space, not as root, > so that your UFS is not mounted, but accessed by user level > programs (much like mwrite & mread for accessing DOS media of old) > - man 8 amd : set a short timeout to auto unmount, > it wont total solve your problem, but should lessen the frequency of = panics. > - Mount the USB media on a spare laptop running as an NFS+ AMD server, > then access the FS via NFS from your real client big PC. When > you pull the stick by accident forgetting its mounted, just the > laptop crashes afte a bit, the AMD access on the other PC just > hangs but doesnt crash. > - Encourage A SOC (google summer of code) student to look at it, > probably wont come to a solution though, see 30 above. > - Toss money at the problem :-) If your company can afford some cash, = either: > - help fund FreeBSD Foundation & ask them to solve it,=20 > - Or pay some consultant somewhere to look at it, Here's a globaly > geographicaly indexed list http://berklix.com/consultants/ > maybe there's one near your company ? Hack up gnop(8) to report success upstream for every operation = regardless. (Maybe -r 0 -w 0 will do that already but I=E2=80=99d be surprised.) > Cheers, > Julian > -- > Julian Stacey, BSD Linux Unix C Sys Eng Consultant Munich = http://berklix.com > Indent previous with "> ". Reply Below as a play script. > Send plain text, Not quoted-printable, HTML, or base64. > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to = "freebsd-hackers-unsubscribe@freebsd.org" >=20 -- Bob Bishop rb@gid.co.uk From owner-freebsd-hackers@FreeBSD.ORG Thu May 7 10:10:37 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 649DE217 for ; Thu, 7 May 2015 10:10:37 +0000 (UTC) Received: from mail-ig0-x22a.google.com (mail-ig0-x22a.google.com [IPv6:2607:f8b0:4001:c05::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 31AFB1C40 for ; Thu, 7 May 2015 10:10:37 +0000 (UTC) Received: by iget9 with SMTP id t9so8507894ige.1 for ; Thu, 07 May 2015 03:10:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=76fVYf+iSa1fGXze3TCf2gzwoH1Gb+ecTbPb//zy6uQ=; b=XXB+Lt0zbDAlkKWBk68ScXkMHntOeBt54CmK1M52P3/m6FqINTEYqny6UNSTZGmnkJ yxC+w3Mryljk2Nq9Ss3he5ZzYTIb2UGrWu0nNZUy/hOabZltep7+8q42VQE/hlTcJEFY Y7Nm5HaIILd7w2QmBbAOrBojyQqI2I8b2+AntiCDtDQeUzpHum97I9kJ6Hf0VcF+2Cog 0FZUwlfOyh5ybbP6odWHWCWPeP1nS2peMD8mzodQfjFsd8JI3Xq3sEf/av9nAriIyHXp NMz+lsTrbI9YxGapOzI0IkN2WwPSD2vLL5m8F4Sd3lfqIdl8J/vksEN4ZFqekyZOr5Xo BYXA== MIME-Version: 1.0 X-Received: by 10.50.176.137 with SMTP id ci9mr3452065igc.2.1430993436437; Thu, 07 May 2015 03:10:36 -0700 (PDT) Received: by 10.36.2.203 with HTTP; Thu, 7 May 2015 03:10:36 -0700 (PDT) Date: Thu, 7 May 2015 18:10:36 +0800 Message-ID: Subject: Memory barriers about buf_ring(9) From: rhenjau To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2015 10:10:37 -0000 Hi, hackers I'm reading buf_ring(9) and have a question about the following function. Is a memory barrier needed before br_cons_tail to prevent the loading of br_ring[cons_head] load is reordered after br_cons_tail is set? Producers may overwrite the area. /* * single-consumer dequeue * use where dequeue is protected by a lock * e.g. a network driver's tx queue lock */ static __inline void * buf_ring_dequeue_sc(struct buf_ring *br) { uint32_t cons_head, cons_next; #ifdef PREFETCH_DEFINED uint32_t cons_next_next; #endif uint32_t prod_tail; void *buf; cons_head = br->br_cons_head; prod_tail = br->br_prod_tail; cons_next = (cons_head + 1) & br->br_cons_mask; #ifdef PREFETCH_DEFINED cons_next_next = (cons_head + 2) & br->br_cons_mask; #endif if (cons_head == prod_tail) return (NULL); #ifdef PREFETCH_DEFINED if (cons_next != prod_tail) { prefetch(br->br_ring[cons_next]); if (cons_next_next != prod_tail) prefetch(br->br_ring[cons_next_next]); } #endif br->br_cons_head = cons_next; buf = br->br_ring[cons_head]; #ifdef DEBUG_BUFRING br->br_ring[cons_head] = NULL; if (!mtx_owned(br->br_lock)) panic("lock not held on single consumer dequeue"); if (br->br_cons_tail != cons_head) panic("inconsistent list cons_tail=%d cons_head=%d", br->br_cons_tail, cons_head); #endif ----------------------------------------------------- need memory barrier? br->br_cons_tail = cons_next; return (buf); } -- -rhenjau From owner-freebsd-hackers@FreeBSD.ORG Thu May 7 10:12:32 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE795332; Thu, 7 May 2015 10:12:32 +0000 (UTC) Received: from mail-la0-x22f.google.com (mail-la0-x22f.google.com [IPv6:2a00:1450:4010:c03::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 3AB611D0C; Thu, 7 May 2015 10:12:32 +0000 (UTC) Received: by laat2 with SMTP id t2so26972448laa.1; Thu, 07 May 2015 03:12:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=8N/DQsBkwtCpSmfizwUBiR9e3nfZPAqL2684safdrNU=; b=OzIFkZPVwczGgRrQX3DgZYj6RWR41M8uKX308yPzJuRwgIggkniDeOmXJu8HJxGGqk 8rJad9BOrOieS6XLW/moPo1IivU6aCcd+XLT8TTUJNjhYzqTkZnvahGYNyqAO5pPVRwJ Pq4JW6MDLSSvaYwhN/SMpm7uU1i4u760I4DHbldwvZxS/kGk48btjs7/BMVXLwBWoe9C 4XvDGEg7a5wPt1yiKfl2ymyMQQBPj30frN8PfFF1VVbabruJkiy4Ef6PgZu4JRk0UFlR idvSeiKFE0A7YNxoGDqdrX0NcPcekuUt7asOWZTx6kY/FoaDtADJIFOUMLYeADvG4+6L 5kNw== X-Received: by 10.152.116.102 with SMTP id jv6mr2453244lab.50.1430993550173; Thu, 07 May 2015 03:12:30 -0700 (PDT) Received: from [10.0.1.6] (broadband-5-228-251-108.nationalcablenetworks.ru. [5.228.251.108]) by mx.google.com with ESMTPSA id jp18sm341837lab.34.2015.05.07.03.12.29 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 07 May 2015 03:12:29 -0700 (PDT) Sender: Dmitry Sivachenko Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: What's required to make removal of a mounted USB stick safe? From: Dmitry Sivachenko In-Reply-To: <1306708F-0872-4D02-9C88-70F683018C39@FreeBSD.org> Date: Thu, 7 May 2015 13:12:28 +0300 Cc: Ryan Stone , "freebsd-hackers@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <1306708F-0872-4D02-9C88-70F683018C39@FreeBSD.org> To: =?utf-8?Q?Edward_Tomasz_Napiera=C5=82a?= X-Mailer: Apple Mail (2.2098) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2015 10:12:32 -0000 > On 7 =D0=BC=D0=B0=D1=8F 2015 =D0=B3., at 9:23, Edward Tomasz = Napiera=C5=82a wrote: >=20 >=20 > Dnia 6 maj 2015 o godz. 22:49 Ryan Stone = napisa=C5=82(a): >=20 >> Currently FreeBSD stands a fair chance at panicking if a mounted USB = drive >> is removed while I/O is in flight. Does anybody know what work is = involved >> to have the kernel safely recover from this case? Losing data from = the >> drive is expected of course but there's no reason that the entire = kernel >> has to crash. >=20 > I've spent some time on this few years ago, and got it to work, except = for one case: UFS with softupdates. It's possible that some regressions = have been introduced since then. What's the filesystem? Do you have a = backtrace? Recently I forgot to unmount a partition on failed disk (UFS+SU), and = after disk was removed it was a kernel panic (something related to SU = but I did not save the trace). stable/10= From owner-freebsd-hackers@FreeBSD.ORG Thu May 7 10:49:39 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E7DFDAB for ; Thu, 7 May 2015 10:49:39 +0000 (UTC) Received: from mail-oi0-x231.google.com (mail-oi0-x231.google.com [IPv6:2607:f8b0:4003:c06::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 6364C11A2 for ; Thu, 7 May 2015 10:49:39 +0000 (UTC) Received: by oign205 with SMTP id n205so30012203oig.2 for ; Thu, 07 May 2015 03:49:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=57lwV5Jqfm3anrePvpwDVQxohT195Br2tmgfsN8TE4g=; b=fjI98n4MmLENQFu7K6RUzVS4uRwOxzFRCnXJcAOv2r3ECXupLG4OMc5GxQiSGaROkW toKHVMg5PKVEliMLxMGAyDTssO4hvFQoM8mQlFV9kgXToKnpwGUmsvOH2LMaZCpYGAqe 7HbPcAS8rbOv4aE2wP4qDHYAelt7TELBtUYHxg3uoHz753aqIaQvwVRQHHVK8qJYneCT S8zh65wQVd4iPUaDpowRw67oU7PdptGwoLqgerwlEQaaOuBmo3AVhFkzWPZ1wEtR0iaI 9r7Wiln34cL1JESziYdXOTdgNMDeNcZrQp7bHhPvGjNmtdlKF5m7QiwoT5HuC2UiLlU9 SnoA== X-Received: by 10.202.214.197 with SMTP id n188mr2562946oig.75.1430995778613; Thu, 07 May 2015 03:49:38 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:c55c:39ee:17bf:9b21? ([2601:8:ab80:7d6:c55c:39ee:17bf:9b21]) by mx.google.com with ESMTPSA id a126sm954755oib.7.2015.05.07.03.49.37 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 07 May 2015 03:49:38 -0700 (PDT) References: <506CAEF3-E94F-4C2E-8824-D1FBD782A6EA@seiya.me> Mime-Version: 1.0 (1.0) In-Reply-To: <506CAEF3-E94F-4C2E-8824-D1FBD782A6EA@seiya.me> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: <41F29A27-8C9E-4B0F-AC51-E2AD6CF28118@gmail.com> Cc: "freebsd-hackers@freebsd.org" X-Mailer: iPhone Mail (12F70) From: Garrett Cooper Subject: Re: User-mode FreeBSD? Date: Thu, 7 May 2015 03:49:35 -0700 To: Seiya Nuta X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2015 10:49:39 -0000 > On May 6, 2015, at 23:10, Seiya Nuta wrote: >=20 > Hello. >=20 > I want to run FreeBSD kernel in userland to use it as a library OS. >=20 > Does FreeBSD kernel supports running in the userland like User Mode Linux?= Not yet, but it's desired for a variety of reasons (see netbsd's RUMP infras= tructure). Cheers! From owner-freebsd-hackers@FreeBSD.ORG Thu May 7 09:27:56 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D986EBCE for ; Thu, 7 May 2015 09:27:55 +0000 (UTC) Received: from alpha.holgerlevsen.de (mail.holgerlevsen.de [62.201.164.66]) by mx1.freebsd.org (Postfix) with ESMTP id 97E9D162E for ; Thu, 7 May 2015 09:27:54 +0000 (UTC) Received: from localhost (alpha.holgerlevsen.de [62.201.164.66]) by alpha.holgerlevsen.de (Postfix) with ESMTP id AD3E2CAD1B0 for ; Thu, 7 May 2015 11:22:43 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at alpha.holgerlevsen.de Received: from alpha.holgerlevsen.de ([62.201.164.66]) by localhost (mail.holgerlevsen.de [62.201.164.66]) (amavisd-new, port 10024) with ESMTP id u3o2qwhyWMog for ; Thu, 7 May 2015 11:22:43 +0200 (CEST) Received: from matrix.localnet (epsilon.holgerlevsen.de [62.201.164.82]) by alpha.holgerlevsen.de (Postfix) with ESMTP id ED9A8CAD1A7 for ; Thu, 7 May 2015 11:22:42 +0200 (CEST) From: Holger Levsen To: freebsd-hackers@freebsd.org Subject: reproducible builds of FreeBSD in a chroot on Linux Date: Thu, 7 May 2015 11:22:34 +0200 User-Agent: KMail/1.13.7 (Linux/3.16.0-0.bpo.4-amd64; KDE/4.8.4; x86_64; ; ) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2344455.FMD7Fi2REh"; protocol="application/pgp-signature"; micalg=pgp-sha512 Content-Transfer-Encoding: 7bit Message-Id: <201505071122.36037.holger@layer-acht.org> X-Mailman-Approved-At: Thu, 07 May 2015 11:24:19 +0000 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2015 09:27:56 -0000 --nextPart2344455.FMD7Fi2REh Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, I'm one of the people involved in https://wiki.debian.org/ReproducibleBuilds and have set up https://reproducible.debian.net which continously tests all packages in the Debian archive for build reproducibility (so far on amd64 only). =46or those who don't know, reproducible builds enable everyone to independ= ently verify that a given binary comes from specific source. This also allows to indirectly verify that one's build system has not been tempered with - and more. Please check the first URL of this mail for "the rest of the story". And then someone pointed me to https://wiki.freebsd.org/ReproducibleBuilds =2D kudos for how far you already!(!!) So now I would like to build freebsd myself, twice, and compare the results and show these results as in https://reproducible.debian.net/rb-pkg/unstable/amd64/gcc-4.9.html - and th= en quite probably set up a jenkins job on jenkins.debian.net and do this every week.=20 Here's the catch: I have basically no clue about freebsd - and I want to build on Debian linux (on amd64) in a chroot. (And, it will need you people= to look at the results and eventually fix them!) ;-)=20 So maybe can you help me with my next step. I've found the github freebsd repo and cloned it, how to proceed further now? $ make buildworld Makefile:137: *** missing separator. Stop. in the master branch of git://github.com/freebsd/freebsd wasn't right.. :/ = ;) Thanks for any help and pointers! I've tried to find documentation on this = but had no luck so I figured I could just ask... cheers, Holger (please cc: me I'm not subscribed.) --nextPart2344455.FMD7Fi2REh Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIVAwUAVUsu2wkauFYGmqocAQqvww/9EhixqXU1ltNID3M3cak4nXkdv9jWsrzf YHdlpk+XyhxEdMvxMnU+CTCO0TCfBzK3G+24UV2iiaN/3gfvDJ/4xB/GcX2eaHYu QnWfbqo3BUJ/XOse3BYGduzoj1Fb+D5mTj3XwVLHViDtEzM0SYPd5qQK9oegJSXg kz4ocmQXEQ7y10A8+/8vV65gEEwcckNCBAlGr2cF/L7xkLUhRtOib9fZLa2eeJFb Wl5jlBhH8Xr84xTh3Hcx+E+t96R9BsCEmoToyl+M1Jks9yZzVndZiaPdI+qSH5H3 yh/xujGncMLm0vXFrjjeHCNJauPltgXH+6Fg7Mtj2MGlH6XGVSxCkLo4qOOWwaiz Ye+LuFlO6IHPluB2djRthj1HBdn+DB4b8S/kjxQkX9CyE0yEF3OMK/pLk2Z5SK+4 X/bScfbnJ4cq2xa8g0HX+DRtPU/jQBTCgBDG6yR4mYFc1AvK5ur8/kiIXyKc22TQ Z++cdfrJdpayZhFwy+uqc1H/9D1B+5KRAR3em6Ua1bjmPJwFdhjw1dwrBRPZUeQd nl4FNqauaPHhWq+dpXaBEWc0htvN/cin0XfePxB6lgqtSnDA3vo59gybYAMu3PNT ef+cluyv/qwRdNjahggc55+oo1a9Ptw1juduyXVTd27Kz0yD+4H6qTo6U3EaLT32 dhGgcfJxx9k= =ETNq -----END PGP SIGNATURE----- --nextPart2344455.FMD7Fi2REh-- From owner-freebsd-hackers@FreeBSD.ORG Thu May 7 11:31:22 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A1FDACE for ; Thu, 7 May 2015 11:31:22 +0000 (UTC) Received: from puchar.net (puchar.net [188.252.31.250]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "puchar.net", Issuer "puchar.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B716B174A for ; Thu, 7 May 2015 11:31:21 +0000 (UTC) Received: Received: from 127.0.0.1 (localhost [127.0.0.1]) by puchar.net (8.14.9/8.14.9) with ESMTP id t47BLJZa090437 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 7 May 2015 13:21:19 +0200 (CEST) (envelope-from wojtek@puchar.net) Received: from laptop.wojtek.intra (localhost [127.0.0.1]) by laptop.wojtek.intra (8.14.9/8.14.9) with ESMTP id t47BLFYV000874; Thu, 7 May 2015 13:21:15 +0200 (CEST) (envelope-from wojtek@puchar.net) Received: from localhost (wojtek@localhost) by laptop.wojtek.intra (8.14.9/8.14.9/Submit) with ESMTP id t47BL9IX000871; Thu, 7 May 2015 13:21:10 +0200 (CEST) (envelope-from wojtek@puchar.net) X-Authentication-Warning: laptop.wojtek.intra: wojtek owned process doing -bs Date: Thu, 7 May 2015 13:21:09 +0200 (CEST) From: Wojciech Puchar X-X-Sender: wojtek@laptop.wojtek.intra To: "Julian H. Stacey" cc: NGie Cooper , "freebsd-hackers@freebsd.org" , Ryan Stone Subject: Re: What's required to make removal of a mounted USB stick safe? In-Reply-To: <201505062159.t46Lx0iZ028607@fire.js.berklix.net> Message-ID: References: <201505062159.t46Lx0iZ028607@fire.js.berklix.net> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (puchar.net [10.0.1.1]); Thu, 07 May 2015 13:21:20 +0200 (CEST) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2015 11:31:22 -0000 > - Deep kernel work (dont hold your breath, see 30 above, & don't look at me :-) > - Cobble up some C to run from user space, not as root, > so that your UFS is not mounted, but accessed by user level > programs (much like mwrite & mread for accessing DOS media of old) > - man 8 amd : set a short timeout to auto unmount, > it wont total solve your problem, but should lessen the frequency of panics. > - Mount the USB media on a spare laptop running as an NFS+ AMD server, > then access the FS via NFS from your real client big PC. When > you pull the stick by accident forgetting its mounted, just the > laptop crashes afte a bit, the AMD access on the other PC just > hangs but doesnt crash. > - Encourage A SOC (google summer of code) student to look at it, > probably wont come to a solution though, see 30 above. > - Toss money at the problem :-) If your company can afford some cash, either: > - help fund FreeBSD Foundation & ask them to solve it, > - Or pay some consultant somewhere to look at it, Here's a globaly > geographicaly indexed list http://berklix.com/consultants/ > maybe there's one near your company ? - mount using fuse From owner-freebsd-hackers@FreeBSD.ORG Thu May 7 11:34:02 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A70B8C10 for ; Thu, 7 May 2015 11:34:02 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (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 68FCA177A for ; Thu, 7 May 2015 11:34:02 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 1AF1A1FE023; Thu, 7 May 2015 13:34:00 +0200 (CEST) Message-ID: <554B4DD5.9090006@selasky.org> Date: Thu, 07 May 2015 13:34:45 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Wojciech Puchar , "Julian H. Stacey" CC: "freebsd-hackers@freebsd.org" , Ryan Stone , NGie Cooper Subject: Re: What's required to make removal of a mounted USB stick safe? References: <201505062159.t46Lx0iZ028607@fire.js.berklix.net> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2015 11:34:02 -0000 On 05/07/15 13:21, Wojciech Puchar wrote: >> - Deep kernel work (dont hold your breath, see 30 above, & don't look >> at me :-) >> - Cobble up some C to run from user space, not as root, >> so that your UFS is not mounted, but accessed by user level >> programs (much like mwrite & mread for accessing DOS media of old) >> - man 8 amd : set a short timeout to auto unmount, >> it wont total solve your problem, but should lessen the frequency of >> panics. >> - Mount the USB media on a spare laptop running as an NFS+ AMD server, >> then access the FS via NFS from your real client big PC. When >> you pull the stick by accident forgetting its mounted, just the >> laptop crashes afte a bit, the AMD access on the other PC just >> hangs but doesnt crash. >> - Encourage A SOC (google summer of code) student to look at it, >> probably wont come to a solution though, see 30 above. >> - Toss money at the problem :-) If your company can afford some cash, >> either: >> - help fund FreeBSD Foundation & ask them to solve it, >> - Or pay some consultant somewhere to look at it, Here's a globaly >> geographicaly indexed list http://berklix.com/consultants/ >> maybe there's one near your company ? > - mount using fuse Hi, I'm very happy you understand this is not a USB problem ;-) --HPS From owner-freebsd-hackers@FreeBSD.ORG Thu May 7 11:45:33 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8F26EE34 for ; Thu, 7 May 2015 11:45:33 +0000 (UTC) Received: from mail-ie0-x22b.google.com (mail-ie0-x22b.google.com [IPv6:2607:f8b0:4001:c03::22b]) (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 5E00118C9 for ; Thu, 7 May 2015 11:45:33 +0000 (UTC) Received: by ieczm2 with SMTP id zm2so36718192iec.2 for ; Thu, 07 May 2015 04:45:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=REh37Gl01KZl3Mh0Sgz5xjIAexa+VMCciO2mG3acnok=; b=gavmkwx+pLejK27zoVM8Pvm+ut81HgK64r+AdCjpmaTK0z5lUGQPeNNsak/Z9259HG AXq8xWYL0ErsLdKIJYJkrQ9rJz7JNOGsvj3h5BDdWxH0T72Z87SdzqPly48clQmGl2vK +cfsfF+uzSfoZlK13z7Oq5K6ZLnDA17pXqMWBGA/lhT8YE/hrWOnDH3Mv92AyES5RVte fydM009teAOVekk0t5QLR2PPe2yauMbZyt2OmOUGhBQ8878VTgG1O3ChsqD/HIv/n9df 73z0IHx3XC4/bSte9Nw+kVRrA+ngQ+mCqKoK8B83Ug/dDGB09bM1WKBv4sMt+KkspZrc AuYw== MIME-Version: 1.0 X-Received: by 10.107.7.196 with SMTP id g65mr4105600ioi.28.1430999132655; Thu, 07 May 2015 04:45:32 -0700 (PDT) Received: by 10.64.24.141 with HTTP; Thu, 7 May 2015 04:45:32 -0700 (PDT) In-Reply-To: <201505071122.36037.holger@layer-acht.org> References: <201505071122.36037.holger@layer-acht.org> Date: Thu, 7 May 2015 04:45:32 -0700 Message-ID: Subject: Re: reproducible builds of FreeBSD in a chroot on Linux From: Mehmet Erol Sanliturk To: Holger Levsen Cc: FreeBSD Hackers Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2015 11:45:33 -0000 On Thu, May 7, 2015 at 2:22 AM, Holger Levsen wrote: > Hi, > > I'm one of the people involved in > https://wiki.debian.org/ReproducibleBuilds > and have set up https://reproducible.debian.net which continously tests > all > packages in the Debian archive for build reproducibility (so far on amd64 > only). > > For those who don't know, reproducible builds enable everyone to > independently > verify that a given binary comes from specific source. This also allows to > indirectly verify that one's build system has not been tempered with - and > more. Please check the first URL of this mail for "the rest of the story". > > And then someone pointed me to https://wiki.freebsd.org/ReproducibleBuilds > - kudos for how far you already!(!!) > > So now I would like to build freebsd myself, twice, and compare the results > and show these results as in > https://reproducible.debian.net/rb-pkg/unstable/amd64/gcc-4.9.html - and > then > quite probably set up a jenkins job on jenkins.debian.net and do this > every > week. > > Here's the catch: I have basically no clue about freebsd - and I want to > build on Debian linux (on amd64) in a chroot. (And, it will need you > people to > look at the results and eventually fix them!) ;-) > > So maybe can you help me with my next step. I've found the github freebsd > repo and cloned it, how to proceed further now? > > $ make buildworld > Makefile:137: *** missing separator. Stop. > > in the master branch of git://github.com/freebsd/freebsd wasn't right.. > :/ ;) > > > FreeBSD "make" and Linux "make" are different . In Linux , try "bmake" . Mehmet Erol Sanliturk Thanks for any help and pointers! I've tried to find documentation on this > but > had no luck so I figured I could just ask... > > > cheers, > Holger > > (please cc: me I'm not subscribed.) > From owner-freebsd-hackers@FreeBSD.ORG Thu May 7 11:47:09 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2EC13F6B for ; Thu, 7 May 2015 11:47:09 +0000 (UTC) Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.smtp.rzone.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B8A3718F4 for ; Thu, 7 May 2015 11:47:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1430999205; l=1172; s=domk; d=fuckner.net; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References: Subject:To:MIME-Version:From:Date; bh=orrqm7vL1koHt4WaarykNEiELYSkVJvos28orA4v5WY=; b=Iy5nOYH3NSa4Gy3QxMfYe8o6c7iT2Y1xjrVZZO2cVjAeHVeuYziwfFDkGXswzvJXFBV KA0fp2BJi0y8dYyjWOiq3rtd32RX4Qt5SF8hSo0FyhcMssalio0368A7pUBCTrEu3UJBy ehalDwoQHyPatC0nBlncV4oeyPPkvZmTXYM= X-RZG-AUTH: :IWUHfUGtd9+6EujMWHx57N4dWae4bmTL/JIGbzkGUoozgkO4q1xDEhkgOJDsXNs= X-RZG-CLASS-ID: mo00 Received: from fuckner.delnet ([85.183.0.195]) by smtp.strato.de (RZmta 37.5 AUTH) with ESMTPA id Z04c34r47BkZZY7; Thu, 7 May 2015 13:46:35 +0200 (CEST) Message-ID: <554B509B.8020608@fuckner.net> Date: Thu, 07 May 2015 13:46:35 +0200 From: Michael Fuckner User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Holger Levsen , freebsd-hackers@freebsd.org Subject: Re: reproducible builds of FreeBSD in a chroot on Linux References: <201505071122.36037.holger@layer-acht.org> In-Reply-To: <201505071122.36037.holger@layer-acht.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2015 11:47:09 -0000 Hi Holger, On 05/07/2015 11:22 AM, Holger Levsen wrote: > Hi, > > I'm one of the people involved in https://wiki.debian.org/ReproducibleBuilds > and have set up https://reproducible.debian.net which continously tests all > packages in the Debian archive for build reproducibility (so far on amd64 > only). what is this good for? Testing the Compiler, track changes or check hardware (errors on memory or disk) y fix them!) ;-) > > So maybe can you help me with my next step. I've found the github freebsd > repo and cloned it, how to proceed further now? > > $ make buildworld > Makefile:137: *** missing separator. Stop. BSD make is different from GNU make- so you have to set up not only make, but also the whole toolchain- LLVM and so on > in the master branch of git://github.com/freebsd/freebsd wasn't right.. :/ ;) I didn't know this one, I am using: svn0.eu.FreeBSD.org Probably you want to check out base/release/10.1.0/ See: https://www.freebsd.org/doc/en/books/handbook/svn.html It probably doesn't make sense to compile HEAD/ STABLE (the development branch), since there are too many changes. Regards, Michael! From owner-freebsd-hackers@FreeBSD.ORG Thu May 7 13:08:50 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A04B3D7E; Thu, 7 May 2015 13:08:50 +0000 (UTC) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id EDB6F1325; Thu, 7 May 2015 13:08:49 +0000 (UTC) Received: from lgwl-lstewart2.corp.netflix.com (c110-22-60-167.eburwd6.vic.optusnet.com.au [110.22.60.167]) by lauren.room52.net (Postfix) with ESMTPSA id C7F4F7E839; Thu, 7 May 2015 23:00:04 +1000 (EST) Message-ID: <554B61C2.5000704@room52.net> Date: Thu, 07 May 2015 22:59:46 +1000 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: =?UTF-8?B?RWR3YXJkIFRvbWFzeiBOYXBpZXJhxYJh?= , Ryan Stone CC: "freebsd-hackers@freebsd.org" Subject: Re: What's required to make removal of a mounted USB stick safe? References: <1306708F-0872-4D02-9C88-70F683018C39@FreeBSD.org> In-Reply-To: <1306708F-0872-4D02-9C88-70F683018C39@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.4 required=5.0 tests=DNS_FROM_AHBL_RHSBL, UNPARSEABLE_RELAY autolearn=no version=3.3.2 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lauren.room52.net X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2015 13:08:50 -0000 On 05/07/15 16:23, Edward Tomasz Napierała wrote: > > Dnia 6 maj 2015 o godz. 22:49 Ryan Stone > napisał(a): > >> Currently FreeBSD stands a fair chance at panicking if a mounted >> USB drive is removed while I/O is in flight. Does anybody know >> what work is involved to have the kernel safely recover from this >> case? Losing data from the drive is expected of course but there's >> no reason that the entire kernel has to crash. > > I've spent some time on this few years ago, and got it to work, > except for one case: UFS with softupdates. It's possible that some > regressions have been introduced since then. What's the filesystem? > Do you have a backtrace? I had a recent crash caused by accidentally unplugging my phone which I had the SD card mounted over USB cable. It had been automounted by KDE. If I recall correctly, there was no IO in flight, but I had copied a file from the phone to my laptop a minute or so prior to accidentally unplugging. I have a vmcore if there would be any additional useful information. lstewart@lstewart-laptop> uname -a FreeBSD lstewart-laptop 11.0-CURRENT FreeBSD 11.0-CURRENT #2 r279802: Sat Mar 14 13:31:32 AEDT 2015 root@lstewart-laptop:/usr/obj/usr/src/sys/LSTEWART-LAPTOP amd64 Some info from core.txt: panic: dead bo 0xfffff8015109e2a8 GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"... Unread portion of the kernel message buffer: lock order reversal: 1st 0xfffff8033bf72418 zfs (zfs) @ /usr/src/sys/kern/vfs_mount.c:1229 2nd 0xfffff80151b69240 syncer (syncer) @ /usr/src/sys/kern/vfs_subr.c:2287 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0460ebd510 witness_checkorder() at witness_checkorder+0xe45/frame 0xfffffe0460ebd5a0 __lockmgr_args() at __lockmgr_args+0xacf/frame 0xfffffe0460ebd6d0 vop_stdlock() at vop_stdlock+0x3c/frame 0xfffffe0460ebd6f0 VOP_LOCK1_APV() at VOP_LOCK1_APV+0xfc/frame 0xfffffe0460ebd720 _vn_lock() at _vn_lock+0x8a/frame 0xfffffe0460ebd790 vputx() at vputx+0x232/frame 0xfffffe0460ebd7f0 dounmount() at dounmount+0x305/frame 0xfffffe0460ebd870 sys_unmount() at sys_unmount+0x2ec/frame 0xfffffe0460ebd9a0 amd64_syscall() at amd64_syscall+0x27f/frame 0xfffffe0460ebdab0 Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe0460ebdab0 --- syscall (22, FreeBSD ELF64, sys_unmount), rip = 0x8008990ea, rsp = 0x7fffffffda28, rbp = 0x7fffffffdb40 --- lock order reversal: 1st 0xfffff8033bf72418 zfs (zfs) @ /usr/src/sys/kern/vfs_mount.c:1229 2nd 0xfffff8015109e240 devfs (devfs) @ /usr/src/sys/fs/msdosfs/msdosfs_vfsops.c:993 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0460ebd490 witness_checkorder() at witness_checkorder+0xe45/frame 0xfffffe0460ebd520 __lockmgr_args() at __lockmgr_args+0xacf/frame 0xfffffe0460ebd650 vop_stdlock() at vop_stdlock+0x3c/frame 0xfffffe0460ebd670 VOP_LOCK1_APV() at VOP_LOCK1_APV+0xfc/frame 0xfffffe0460ebd6a0 _vn_lock() at _vn_lock+0x8a/frame 0xfffffe0460ebd710 msdosfs_sync() at msdosfs_sync+0x192/frame 0xfffffe0460ebd7a0 msdosfs_unmount() at msdosfs_unmount+0x20/frame 0xfffffe0460ebd7f0 dounmount() at dounmount+0x42c/frame 0xfffffe0460ebd870 sys_unmount() at sys_unmount+0x2ec/frame 0xfffffe0460ebd9a0 amd64_syscall() at amd64_syscall+0x27f/frame 0xfffffe0460ebdab0 Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe0460ebdab0 --- syscall (22, FreeBSD ELF64, sys_unmount), rip = 0x8008990ea, rsp = 0x7fffffffda28, rbp = 0x7fffffffdb40 --- panic: dead bo 0xfffff8015109e2a8 cpuid = 3 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0460ebd520 vpanic() at vpanic+0x189/frame 0xfffffe0460ebd5a0 kassert_panic() at kassert_panic+0x132/frame 0xfffffe0460ebd610 buf_vlist_add() at buf_vlist_add+0x15c/frame 0xfffffe0460ebd640 getblk() at getblk+0x8ed/frame 0xfffffe0460ebd700 breadn_flags() at breadn_flags+0x2d/frame 0xfffffe0460ebd740 markvoldirty() at markvoldirty+0xc4/frame 0xfffffe0460ebd7a0 msdosfs_unmount() at msdosfs_unmount+0x7e/frame 0xfffffe0460ebd7f0 dounmount() at dounmount+0x42c/frame 0xfffffe0460ebd870 sys_unmount() at sys_unmount+0x2ec/frame 0xfffffe0460ebd9a0 amd64_syscall() at amd64_syscall+0x27f/frame 0xfffffe0460ebdab0 Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe0460ebdab0 --- syscall (22, FreeBSD ELF64, sys_unmount), rip = 0x8008990ea, rsp = 0x7fffffffda28, rbp = 0x7fffffffdb40 --- KDB: enter: panic Reading symbols from /boot/kernel/zfs.ko.symbols...done. Loaded symbols for /boot/kernel/zfs.ko.symbols Reading symbols from /boot/kernel/opensolaris.ko.symbols...done. Loaded symbols for /boot/kernel/opensolaris.ko.symbols Reading symbols from /boot/kernel/sem.ko.symbols...done. Loaded symbols for /boot/kernel/sem.ko.symbols Reading symbols from /boot/kernel/ums.ko.symbols...done. Loaded symbols for /boot/kernel/ums.ko.symbols Reading symbols from /boot/kernel/ng_ubt.ko.symbols...done. Loaded symbols for /boot/kernel/ng_ubt.ko.symbols Reading symbols from /boot/kernel/netgraph.ko.symbols...done. Loaded symbols for /boot/kernel/netgraph.ko.symbols Reading symbols from /boot/kernel/ng_hci.ko.symbols...done. Loaded symbols for /boot/kernel/ng_hci.ko.symbols Reading symbols from /boot/kernel/ng_bluetooth.ko.symbols...done. Loaded symbols for /boot/kernel/ng_bluetooth.ko.symbols Reading symbols from /boot/kernel/ng_l2cap.ko.symbols...done. Loaded symbols for /boot/kernel/ng_l2cap.ko.symbols Reading symbols from /boot/kernel/ng_btsocket.ko.symbols...done. Loaded symbols for /boot/kernel/ng_btsocket.ko.symbols Reading symbols from /boot/kernel/ng_socket.ko.symbols...done. Loaded symbols for /boot/kernel/ng_socket.ko.symbols Reading symbols from /boot/kernel/linux.ko.symbols...done. Loaded symbols for /boot/kernel/linux.ko.symbols Reading symbols from /boot/kernel/i915kms.ko.symbols...done. Loaded symbols for /boot/kernel/i915kms.ko.symbols Reading symbols from /boot/kernel/drm2.ko.symbols...done. Loaded symbols for /boot/kernel/drm2.ko.symbols Reading symbols from /boot/kernel/iicbus.ko.symbols...done. Loaded symbols for /boot/kernel/iicbus.ko.symbols Reading symbols from /boot/kernel/iic.ko.symbols...done. Loaded symbols for /boot/kernel/iic.ko.symbols Reading symbols from /boot/kernel/iicbb.ko.symbols...done. Loaded symbols for /boot/kernel/iicbb.ko.symbols Reading symbols from /boot/modules/vboxdrv.ko...done. Loaded symbols for /boot/modules/vboxdrv.ko Reading symbols from /boot/modules/vboxnetadp.ko...done. Loaded symbols for /boot/modules/vboxnetadp.ko Reading symbols from /boot/modules/vboxnetflt.ko...done. Loaded symbols for /boot/modules/vboxnetflt.ko Reading symbols from /boot/kernel/ng_ether.ko.symbols...done. Loaded symbols for /boot/kernel/ng_ether.ko.symbols Reading symbols from /boot/kernel/ipfw.ko.symbols...done. Loaded symbols for /boot/kernel/ipfw.ko.symbols #0 doadump (textdump=Unhandled dwarf expression opcode 0x93 ) at pcpu.h:219 219 pcpu.h: No such file or directory. in pcpu.h (kgdb) #0 doadump (textdump=Unhandled dwarf expression opcode 0x93 ) at pcpu.h:219 #1 0xffffffff80355e66 in db_fncall (dummy1=, dummy2=, dummy3=, dummy4=) at /usr/src/sys/ddb/db_command.c:568 #2 0xffffffff80355b4c in db_command (cmd_table=0x0) at /usr/src/sys/ddb/db_command.c:440 #3 0xffffffff803558b4 in db_command_loop () at /usr/src/sys/ddb/db_command.c:493 #4 0xffffffff803583f0 in db_trap (type=, code=Unhandled dwarf expression opcode 0x93 ) at /usr/src/sys/ddb/db_main.c:251 #5 0xffffffff8098af9e in kdb_trap (type=Unhandled dwarf expression opcode 0x93 ) at /usr/src/sys/kern/subr_kdb.c:654 #6 0xffffffff80d7280b in trap (frame=0xfffffe0460ebd450) at /usr/src/sys/amd64/amd64/trap.c:542 #7 0xffffffff80d51d02 in calltrap () at /usr/src/sys/amd64/amd64/exception.S:235 #8 0xffffffff8098a68e in kdb_enter (why=0xffffffff8100c329 "panic", msg=0x80
) at cpufunc.h:63 #9 0xffffffff8094e609 in vpanic (fmt=, ap=) at /usr/src/sys/kern/kern_shutdown.c:740 #10 0xffffffff8094e452 in kassert_panic (fmt=) at /usr/src/sys/kern/kern_shutdown.c:635 #11 0xffffffff80a02b3c in buf_vlist_add (bp=0xfffffe03d9f3c618, bo=0xfffff8015109e2a8, xflags=Unhandled dwarf expression opcode 0x93 ) at /usr/src/sys/kern/vfs_subr.c:1582 #12 0xffffffff809e8bdd in getblk (vp=0xfffff8015109e1d8, blkno=18, size=4096, slpflag=, slptimeo=0, flags=) at /usr/src/sys/kern/vfs_bio.c:3276 #13 0xffffffff809e972d in breadn_flags (vp=0xfffff8015109e1d8, blkno=128, size=Unhandled dwarf expression opcode 0x93 ) at /usr/src/sys/kern/vfs_bio.c:1158 #14 0xffffffff80836df4 in markvoldirty (pmp=0xfffff801308e6800, dirty=Unhandled dwarf expression opcode 0x93 ) at /usr/src/sys/fs/msdosfs/msdosfs_fat.c:1097 #15 0xffffffff8083b2de in msdosfs_unmount (mp=0xfffff8001b0a0990, mntflags=) at /usr/src/sys/fs/msdosfs/msdosfs_vfsops.c:811 #16 0xffffffff809fcb9c in dounmount (mp=, flags=Unhandled dwarf expression opcode 0x93 ) at /usr/src/sys/kern/vfs_mount.c:1316 #17 0xffffffff809fc74c in sys_unmount (td=0xfffff803da4b6940, uap=0xfffffe0460ebda40) at /usr/src/sys/kern/vfs_mount.c:1207 #18 0xffffffff80d7372f in amd64_syscall (td=0xfffff803da4b6940, traced=0) at subr_syscall.c:133 #19 0xffffffff80d51feb in Xfast_syscall () at /usr/src/sys/amd64/amd64/exception.S:395 #20 0x00000008008990ea in ?? () Previous frame inner to this frame (corrupt stack?) Current language: auto; currently minimal Cheers, Lawrence From owner-freebsd-hackers@FreeBSD.ORG Thu May 7 15:56:00 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3EE7910 for ; Thu, 7 May 2015 15:56:00 +0000 (UTC) Received: from relay.mailchannels.net (tkt-001-i373.relay.mailchannels.net [174.136.5.175]) by mx1.freebsd.org (Postfix) with ESMTP id E8EE5186E for ; Thu, 7 May 2015 15:55:59 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp3.ore.mailhop.org (ip-10-237-13-110.us-west-2.compute.internal [10.237.13.110]) by relay.mailchannels.net (Postfix) with ESMTPA id C6835100D27; Thu, 7 May 2015 14:21:10 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp3.ore.mailhop.org (smtp3.ore.mailhop.org [10.21.145.197]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:2500 (trex/5.4.8); Thu, 07 May 2015 14:21:11 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: duocircle|x-authuser|hippie X-MailChannels-Auth-Id: duocircle X-MC-Loop-Signature: 1431008470897:1445727720 X-MC-Ingress-Time: 1431008470897 Received: from c-73-34-117-227.hsd1.co.comcast.net ([73.34.117.227] helo=ilsoft.org) by smtp3.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YqMfj-00057K-Tr; Thu, 07 May 2015 14:21:08 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t47EKwN5067109; Thu, 7 May 2015 08:20:58 -0600 (MDT) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX19Z8ChjxjuHSObIgUeEbp8n Message-ID: <1431008458.6170.165.camel@freebsd.org> Subject: Re: Memory barriers about buf_ring(9) From: Ian Lepore To: rhenjau Cc: freebsd-hackers@freebsd.org Date: Thu, 07 May 2015 08:20:58 -0600 In-Reply-To: References: Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-AuthUser: hippie X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2015 15:56:00 -0000 On Thu, 2015-05-07 at 18:10 +0800, rhenjau wrote: > Hi, hackers > I'm reading buf_ring(9) and have a question about the following > function. Is a memory barrier needed before br_cons_tail to prevent the > loading of br_ring[cons_head] load is reordered after br_cons_tail is set? > Producers may overwrite the area. > > /* > * single-consumer dequeue > * use where dequeue is protected by a lock > * e.g. a network driver's tx queue lock > */ > static __inline void * > buf_ring_dequeue_sc(struct buf_ring *br) > { > uint32_t cons_head, cons_next; > #ifdef PREFETCH_DEFINED > uint32_t cons_next_next; > #endif > uint32_t prod_tail; > void *buf; > > cons_head = br->br_cons_head; > prod_tail = br->br_prod_tail; > > cons_next = (cons_head + 1) & br->br_cons_mask; > #ifdef PREFETCH_DEFINED > cons_next_next = (cons_head + 2) & br->br_cons_mask; > #endif > > if (cons_head == prod_tail) > return (NULL); > > #ifdef PREFETCH_DEFINED > if (cons_next != prod_tail) { > prefetch(br->br_ring[cons_next]); > if (cons_next_next != prod_tail) > prefetch(br->br_ring[cons_next_next]); > } > #endif > br->br_cons_head = cons_next; > buf = br->br_ring[cons_head]; > > #ifdef DEBUG_BUFRING > br->br_ring[cons_head] = NULL; > if (!mtx_owned(br->br_lock)) > panic("lock not held on single consumer dequeue"); > if (br->br_cons_tail != cons_head) > panic("inconsistent list cons_tail=%d cons_head=%d", > br->br_cons_tail, cons_head); > #endif > ----------------------------------------------------- need memory > barrier? > br->br_cons_tail = cons_next; > return (buf); > } > There was some discussion and changes relating to barriers in buf_ring, but it looks like the changes never got committed (I don't know why). https://reviews.freebsd.org/D1945 -- Ian From owner-freebsd-hackers@FreeBSD.ORG Thu May 7 18:18:54 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7233C825 for ; Thu, 7 May 2015 18:18:54 +0000 (UTC) Received: from mail-pd0-x229.google.com (mail-pd0-x229.google.com [IPv6:2607:f8b0:400e:c02::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 41EC91A87 for ; Thu, 7 May 2015 18:18:54 +0000 (UTC) Received: by pdbqd1 with SMTP id qd1so48104201pdb.2 for ; Thu, 07 May 2015 11:18:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=8cmaENVUzxTvWj2Me6S79cYcgY7PAUVQ23BsA/jzWW8=; b=BihESyZayBqEzaqFYZPicIT+1ueLnpRENvdAoSQpaSguUEB2LVlZf30Hl0ok3Q9NTd FOVtkcCFsSvoX1Pq9MV35DgDIcfRMq/bIuTGvFM5b/HWL/ogmPmBl3cQEhPKRqYZ/lSV dDY3uWbP6MDP0ixvwdndnaKP6dgrELmuYH/4UPKstKvWKSm25hcIYUy3HhS2Aghc/TCx wbTov5qWETLH4weIxZKA4Wo0Z/VyenWScAS8U2Lzhy4eWnSSNu/wsPd46fgarqST2XvW OEixN9d9qGX5xtADjZ5w53VkoZHW7mFFjHlINXxrKHA7cEMtd274eiXOLJsuaqcJtDCH L2dA== X-Received: by 10.68.57.226 with SMTP id l2mr9197194pbq.104.1431022733599; Thu, 07 May 2015 11:18:53 -0700 (PDT) Received: from ?IPv6:2601:8:ab80:7d6:c55c:39ee:17bf:9b21? ([2601:8:ab80:7d6:c55c:39ee:17bf:9b21]) by mx.google.com with ESMTPSA id x2sm2833451pdm.40.2015.05.07.11.18.52 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 07 May 2015 11:18:52 -0700 (PDT) References: <201505071122.36037.holger@layer-acht.org> Mime-Version: 1.0 (1.0) In-Reply-To: <201505071122.36037.holger@layer-acht.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: <778FDC61-AE00-4A0C-A867-66B425B63C41@gmail.com> Cc: "freebsd-hackers@freebsd.org" X-Mailer: iPhone Mail (12F70) From: Garrett Cooper Subject: Re: reproducible builds of FreeBSD in a chroot on Linux Date: Thu, 7 May 2015 11:18:51 -0700 To: Holger Levsen X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2015 18:18:54 -0000 > On May 7, 2015, at 02:22, Holger Levsen wrote: >=20 > Hi, >=20 > I'm one of the people involved in https://wiki.debian.org/ReproducibleBuil= ds > and have set up https://reproducible.debian.net which continously tests al= l > packages in the Debian archive for build reproducibility (so far on amd64 > only). >=20 > For those who don't know, reproducible builds enable everyone to independe= ntly > verify that a given binary comes from specific source. This also allows to= > indirectly verify that one's build system has not been tempered with - and= > more. Please check the first URL of this mail for "the rest of the story".= >=20 > And then someone pointed me to https://wiki.freebsd.org/ReproducibleBuilds= > - kudos for how far you already!(!!) >=20 > So now I would like to build freebsd myself, twice, and compare the result= s > and show these results as in > https://reproducible.debian.net/rb-pkg/unstable/amd64/gcc-4.9.html - and t= hen > quite probably set up a jenkins job on jenkins.debian.net and do this ever= y > week.=20 >=20 > Here's the catch: I have basically no clue about freebsd - and I want to > build on Debian linux (on amd64) in a chroot. (And, it will need you peopl= e to > look at the results and eventually fix them!) ;-)=20 >=20 > So maybe can you help me with my next step. I've found the github freebsd > repo and cloned it, how to proceed further now? >=20 > $ make buildworld > Makefile:137: *** missing separator. Stop. >=20 > in the master branch of git://github.com/freebsd/freebsd wasn't right.. :/= ;) >=20 >=20 > Thanks for any help and pointers! I've tried to find documentation on this= but > had no luck so I figured I could just ask... >=20 >=20 > cheers, > Holger >=20 > (please cc: me I'm not subscribed.) Using bmake instead of make like others suggested should get you further, bu= t IIRC you'll have to do some more magic with BOOTSTRAPPING and other things= to make the compile work (I think some of the GNU user land tools don't wor= k in other areas of the build). There was some interest in fixing this a whi= le ago, but I didn't have a commit bit at the time so I couldn't do it. This is something my employer would kind of like to work. If I get bored and am up at BSDCan, I'll see if I can get this to work on Fe= dora 20... Cheers! -NGie= From owner-freebsd-hackers@FreeBSD.ORG Thu May 7 19:32:10 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B93716A; Thu, 7 May 2015 19:32:10 +0000 (UTC) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "raven.bwct.de", Issuer "BWCT" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 752AB1392; Thu, 7 May 2015 19:32:08 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id t47JHjFv072913 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 7 May 2015 21:17:45 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.5/8.14.4) with ESMTP id t47JHge8078635 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 7 May 2015 21:17:42 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id t47JHghO046004; Thu, 7 May 2015 21:17:42 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id t47JHgCF046003; Thu, 7 May 2015 21:17:42 +0200 (CEST) (envelope-from ticso) Date: Thu, 7 May 2015 21:17:42 +0200 From: Bernd Walter To: Dmitry Sivachenko Cc: Edward Tomasz Napiera??a , "freebsd-hackers@freebsd.org" , Ryan Stone Subject: Re: What's required to make removal of a mounted USB stick safe? Message-ID: <20150507191742.GE44366@cicely7.cicely.de> Reply-To: ticso@cicely.de References: <1306708F-0872-4D02-9C88-70F683018C39@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED=-1, BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 autolearn=ham version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on spamd.cicely.de X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2015 19:32:10 -0000 On Thu, May 07, 2015 at 01:12:28PM +0300, Dmitry Sivachenko wrote: > > > On 7 ?????? 2015 ??., at 9:23, Edward Tomasz Napiera??a wrote: > > > > > > Dnia 6 maj 2015 o godz. 22:49 Ryan Stone napisa??(a): > > > >> Currently FreeBSD stands a fair chance at panicking if a mounted USB drive > >> is removed while I/O is in flight. Does anybody know what work is involved > >> to have the kernel safely recover from this case? Losing data from the > >> drive is expected of course but there's no reason that the entire kernel > >> has to crash. > > > > I've spent some time on this few years ago, and got it to work, except for one case: UFS with softupdates. It's possible that some regressions have been introduced since then. What's the filesystem? Do you have a backtrace? > > > Recently I forgot to unmount a partition on failed disk (UFS+SU), and after disk was removed it was a kernel panic (something related to SU but I did not save the trace). Another related problem point with removeable media is the filesystem state. It can happen that the filesystem on a mounted media is broken and panic the kernel. The only way to work around is fsck'ing the filesystem before mounting, which can introduce an unacceptable delay. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-hackers@FreeBSD.ORG Thu May 7 19:46:40 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A131A79B; Thu, 7 May 2015 19:46:40 +0000 (UTC) Received: from mail-ig0-x234.google.com (mail-ig0-x234.google.com [IPv6:2607:f8b0:4001:c05::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 690A7157A; Thu, 7 May 2015 19:46:40 +0000 (UTC) Received: by igbsb11 with SMTP id sb11so3480358igb.0; Thu, 07 May 2015 12:46:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=YqIO4wUdwtpgOrSu4APvgYW4LHRF4LyhhoyAHZEgjlI=; b=ju+I1Gpfx++xJLIHTzpEqoIRxIKtiicN7j9CHPFNkyu6wkGK28NCVa8N19JFVVyLtY 2iZRQ81NQhQBN7i05OZuIdGCHbXclkntgAvk6DYWefeTKsMaaGs1Rd7DRENsIDOrHQ9A mpbSzhzENhDrKjFXlqXQ3bMp+e7Scp9SAqcboDtO4JDDZ5uNjdVnPtsbPQ5ZPvpaMcH5 Pw1o6nco6vnnSOgaOavD//CGXaDERE34o7nZUN+DtXS7yDxTkkxZl5eRI4DYjximPlKz 3uXnBEadAzhqjrYXgWGUGlnGhZxGscyjlwKwLludmwQlH+ucM8WUin7jxi/HFKGHpP1G TG/g== MIME-Version: 1.0 X-Received: by 10.50.21.1 with SMTP id r1mr359590ige.46.1431027999748; Thu, 07 May 2015 12:46:39 -0700 (PDT) Received: by 10.107.40.194 with HTTP; Thu, 7 May 2015 12:46:39 -0700 (PDT) In-Reply-To: <1306708F-0872-4D02-9C88-70F683018C39@FreeBSD.org> References: <1306708F-0872-4D02-9C88-70F683018C39@FreeBSD.org> Date: Thu, 7 May 2015 15:46:39 -0400 Message-ID: Subject: Re: What's required to make removal of a mounted USB stick safe? From: Ryan Stone To: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Cc: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2015 19:46:40 -0000 On Thu, May 7, 2015 at 2:23 AM, Edward Tomasz Napiera=C5=82a wrote: > > I've spent some time on this few years ago, and got it to work, except fo= r > one case: UFS with softupdates. It's possible that some regressions have > been introduced since then. What's the filesystem? Do you have a > backtrace? > > I've been running our stress script* on 10.1-RELEASE, and the situation does seem to be greatly improved. I did hit this (using msdosfs): Fatal trap 12: page fault while in kernel mode cpuid =3D 6; apic id =3D 06 fault virtual address =3D 0x18 fault code =3D supervisor write data, page not present instruction pointer =3D 0x20:0xffffffff805f5b31 stack pointer =3D 0x28:0xfffffe060dc4a2b0 frame pointer =3D 0x28:0xfffffe060dc4a2d0 code segment =3D base 0x0, limit 0xfffff, type 0x1b =3D DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags =3D interrupt enabled, resume, IOPL =3D 0 current process =3D 54741 (dd) trap number =3D 12 panic: page fault rasum detected 0 total errors cpuid =3D 4 curthread =3D dd/dd (54741/100358) cpu_ticks =3D 35606492530712 KDB: stack backtrace: db_trace_self_wrapper() at 0xffffffff8030d5ab =3D db_trace_self_wrapper+0x2b/frame 0xfffffe060dc49e60 panic() at 0xffffffff805f7e56 =3D panic+0x216/frame 0xfffffe060dc49ee0 trap_fatal() at 0xffffffff8081489f =3D trap_fatal+0x38f/frame 0xfffffe060dc49f40 trap_pfault() at 0xffffffff80814af6 =3D trap_pfault+0x246/frame 0xfffffe060dc49fe0 trap() at 0xffffffff80814227 =3D trap+0x4e7/frame 0xfffffe060dc4a1f0 calltrap() at 0xffffffff807fa052 =3D calltrap+0x8/frame 0xfffffe060dc4a1f0 --- trap 0xc, rip =3D 0xffffffff805f5b31, rsp =3D 0xfffffe060dc4a2b0, rbp = =3D 0xfffffe060dc4a2d0 --- _rw_wlock_cookie() at 0xffffffff805f5b31 =3D _rw_wlock_cookie+0x21/frame 0xfffffe060dc4a2d0 allocbuf() at 0xffffffff80677e42 =3D allocbuf+0x2f2/frame 0xfffffe060dc4a34= 0 getblk() at 0xffffffff806766e8 =3D getblk+0x658/frame 0xfffffe060dc4a400 breadn_flags() at 0xffffffff80676f6d =3D breadn_flags+0x2d/frame 0xfffffe060dc4a440 chainalloc() at 0xffffffff8051cec5 =3D chainalloc+0x185/frame 0xfffffe060dc4a4e0 clusteralloc() at 0xffffffff8051c37a =3D clusteralloc+0x3ea/frame 0xfffffe060dc4a570 extendfile() at 0xffffffff8051c9de =3D extendfile+0xee/frame 0xfffffe060dc4a5e0 msdosfs_write() at 0xffffffff805220a5 =3D msdosfs_write+0x135/frame 0xfffffe060dc4a6a0 VOP_WRITE_APV() at 0xffffffff80883765 =3D VOP_WRITE_APV+0x145/frame 0xfffffe060dc4a7b0 vn_write() at 0xffffffff8069ec72 =3D vn_write+0x2f2/frame 0xfffffe060dc4a83= 0 vn_io_fault() at 0xffffffff8069af6b =3D vn_io_fault+0x10b/frame 0xfffffe060dc4a8b0 dofilewrite() at 0xffffffff80646658 =3D dofilewrite+0x88/frame 0xfffffe060dc4a900 kern_writev() at 0xffffffff80646388 =3D kern_writev+0x68/frame 0xfffffe060dc4a950 sys_write() at 0xffffffff80646313 =3D sys_write+0x63/frame 0xfffffe060dc4a9= a0 amd64_syscall() at 0xffffffff80814fd4 =3D amd64_syscall+0x224/frame 0xfffffe060dc4aab0 Xfast_syscall() at 0xffffffff807fa33b =3D Xfast_syscall+0xfb/frame 0xfffffe060dc4aab0 --- syscall (4, FreeBSD ELF64, sys_write), rip =3D 0x300967efa, rsp =3D 0x7fffffffea88, rbp =3D 0x7fffffffeab0 --- Uptime: 4h4m57s * Basically it fsck's the USB drive, mounts it and cleans up the LOST.DIR directory, umounts, mounts it again, writes a 1GB file to it and then yanks the power from the USB device 20s into the transfer. It does this in a loop. From owner-freebsd-hackers@FreeBSD.ORG Thu May 7 22:04:52 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B0EE609 for ; Thu, 7 May 2015 22:04:52 +0000 (UTC) Received: from mail-ig0-x230.google.com (mail-ig0-x230.google.com [IPv6:2607:f8b0:4001:c05::230]) (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 353351475 for ; Thu, 7 May 2015 22:04:52 +0000 (UTC) Received: by igbhj9 with SMTP id hj9so6279508igb.1 for ; Thu, 07 May 2015 15:04:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=U2AoXGJ/GW1XX1ttNwjdG7XyuE2f3OKOLJHmPLajW+s=; b=LgO9O2V3WvW1/oJ2/60Ab7hJcWEy10AgfDCFmZKGzSrou5tb0qPP12TTWmjwE0gziu dMYO5EO77MHGXhSLzw/1mOih7o581O1LTL0Touxp64Wc6UTfbwah9bWPJUeQJ0Ka2+Nc eA8GYNjS0k94OFMYSK1Gb//8qXqy2HVoWHqimid3AgqpLSNdcfCqYUUYhYkxzhucIaqe DxGU2II3xZR13TdEp30TLyoys4fFKeF8sC3AScKwXAO0n1f9+PAyGl3TL8y+j/n0dPUz fN+zjRA27a7wm1T/6d6f5DcYx8tqWMgRpVTRPHSfguGx85BGD3uUaDD2gHC+mDgdxVOx hjng== X-Received: by 10.107.10.201 with SMTP id 70mr1114383iok.0.1431036291523; Thu, 07 May 2015 15:04:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.131.194 with HTTP; Thu, 7 May 2015 15:04:31 -0700 (PDT) In-Reply-To: <41F29A27-8C9E-4B0F-AC51-E2AD6CF28118@gmail.com> References: <506CAEF3-E94F-4C2E-8824-D1FBD782A6EA@seiya.me> <41F29A27-8C9E-4B0F-AC51-E2AD6CF28118@gmail.com> From: Alex Merritt Date: Thu, 7 May 2015 18:04:31 -0400 Message-ID: Subject: Re: User-mode FreeBSD? To: Garrett Cooper Cc: Seiya Nuta , "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2015 22:04:52 -0000 On Thu, May 7, 2015 at 6:49 AM, Garrett Cooper wrote: > > > On May 6, 2015, at 23:10, Seiya Nuta wrote: > > > > Hello. > > > > I want to run FreeBSD kernel in userland to use it as a library OS. > > > > Does FreeBSD kernel supports running in the userland like User Mode > Linux? > > Not yet, but it's desired for a variety of reasons (see netbsd's RUMP > infrastructure). > Cheers! DragonFly (FreeBSD derivative) supports a "virtual kernel" mode, like what you are asking: http://www.dragonflybsd.org/features/ I have not had the chance yet to use this myself. From owner-freebsd-hackers@FreeBSD.ORG Thu May 7 23:06:13 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2348145 for ; Thu, 7 May 2015 23:06:13 +0000 (UTC) Received: from mail-qk0-x22b.google.com (mail-qk0-x22b.google.com [IPv6:2607:f8b0:400d:c09::22b]) (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 5F0451AD5 for ; Thu, 7 May 2015 23:06:13 +0000 (UTC) Received: by qkgx75 with SMTP id x75so38298685qkg.1 for ; Thu, 07 May 2015 16:06:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=pzM7gDJ/e3jf+hXfuOyyV0OkQc47EMzv+jJ4QkAr2Ow=; b=fjIOJT253Tr7Vw1sxqMB1TqdkAoMoSbIw7s42mJJraqT1fcyv+mNxmiZ8UxF2O0D7+ y00ZxU3waRlo1Sv5xSx1zhoqqFAk2T7CDs/sBGiVTHs17PYaq2Omn7mNeaUUMMrgcz66 Q1rSBdmH72SHl27LyYPHmkFMC8yJPAb/kZcdEKiOsfNSE/3QMgxg2LQZfzvUDl2tcmLE 2kNHXGJceK8k8o9xT+hsNu2qOf7Nn/uzdArn1RqwFf7uLxWrSXPrdBfSVW7p3CdzhC+H CU088wDzvC58nYzikePdQl/QU+suYfEg6SNlgf7Vp/b6kNSH1waBgb1xz8WbPFmkNtOo sjZA== MIME-Version: 1.0 X-Received: by 10.55.16.140 with SMTP id 12mr2225254qkq.39.1431039972118; Thu, 07 May 2015 16:06:12 -0700 (PDT) Received: by 10.140.98.66 with HTTP; Thu, 7 May 2015 16:06:12 -0700 (PDT) In-Reply-To: References: <506CAEF3-E94F-4C2E-8824-D1FBD782A6EA@seiya.me> <41F29A27-8C9E-4B0F-AC51-E2AD6CF28118@gmail.com> Date: Thu, 7 May 2015 16:06:12 -0700 Message-ID: Subject: Re: User-mode FreeBSD? From: NGie Cooper To: Alex Merritt Cc: Seiya Nuta , "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2015 23:06:13 -0000 On Thu, May 7, 2015 at 3:04 PM, Alex Merritt wrote: ... > DragonFly (FreeBSD derivative) supports a "virtual kernel" mode, like what > you are asking: > > http://www.dragonflybsd.org/features/ > > I have not had the chance yet to use this myself. Nice. I wonder if how hard it would be to port to FreeBSD and whether or not it's an equivalent to NetBSD's RUMP... From owner-freebsd-hackers@FreeBSD.ORG Thu May 7 23:56:43 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39D4BA3 for ; Thu, 7 May 2015 23:56:43 +0000 (UTC) Received: from www2419.sakura.ne.jp (www2419.sakura.ne.jp [210.224.185.29]) (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 D81C0103F for ; Thu, 7 May 2015 23:56:42 +0000 (UTC) Received: from fsav409.sakura.ne.jp (fsav409.sakura.ne.jp [133.242.250.108]) by www2419.sakura.ne.jp (8.14.5/8.14.5) with ESMTP id t47Nue5F035569; Fri, 8 May 2015 08:56:40 +0900 (JST) (envelope-from nuta@seiya.me) Received: from www2419.sakura.ne.jp (210.224.185.29) by fsav409.sakura.ne.jp (F-Secure/fsigk_smtp/520/fsav409.sakura.ne.jp); Fri, 08 May 2015 08:56:40 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/520/fsav409.sakura.ne.jp) Received: from seiya-air.local ([133.51.51.58]) (authenticated bits=0) by www2419.sakura.ne.jp (8.14.5/8.14.5) with ESMTP id t47Nudxj035552 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 8 May 2015 08:56:40 +0900 (JST) (envelope-from nuta@seiya.me) Message-ID: <554BFBB7.2010000@seiya.me> Date: Fri, 08 May 2015 08:56:39 +0900 From: Seiya Nuta User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Garrett Cooper CC: "freebsd-hackers@freebsd.org" Subject: Re: User-mode FreeBSD? References: <506CAEF3-E94F-4C2E-8824-D1FBD782A6EA@seiya.me> <41F29A27-8C9E-4B0F-AC51-E2AD6CF28118@gmail.com> In-Reply-To: <41F29A27-8C9E-4B0F-AC51-E2AD6CF28118@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2015 23:56:43 -0000 Hi Garrett, I see. I also agree with that it is a good thing for FreeBSD. Thanks, Seiya On 5/7/15 7:49 PM, Garrett Cooper wrote: > >> On May 6, 2015, at 23:10, Seiya Nuta wrote: >> >> Hello. >> >> I want to run FreeBSD kernel in userland to use it as a library OS. >> >> Does FreeBSD kernel supports running in the userland like User Mode Linux? > > Not yet, but it's desired for a variety of reasons (see netbsd's RUMP infrastructure). > Cheers! > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > -- Seiya Nuta nuta@seiya.me From owner-freebsd-hackers@FreeBSD.ORG Thu May 7 23:58:59 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 835C41AE for ; Thu, 7 May 2015 23:58:59 +0000 (UTC) Received: from www2419.sakura.ne.jp (www2419.sakura.ne.jp [210.224.185.29]) (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 30071105F for ; Thu, 7 May 2015 23:58:58 +0000 (UTC) Received: from fsav402.sakura.ne.jp (fsav402.sakura.ne.jp [133.242.250.101]) by www2419.sakura.ne.jp (8.14.5/8.14.5) with ESMTP id t47NwvRD040252; Fri, 8 May 2015 08:58:57 +0900 (JST) (envelope-from nuta@seiya.me) Received: from www2419.sakura.ne.jp (210.224.185.29) by fsav402.sakura.ne.jp (F-Secure/virusgw_smtp/412/fsav402.sakura.ne.jp); Fri, 08 May 2015 08:58:57 +0900 (JST) X-Virus-Status: clean(F-Secure/virusgw_smtp/412/fsav402.sakura.ne.jp) Received: from seiya-air.local ([133.51.51.58]) (authenticated bits=0) by www2419.sakura.ne.jp (8.14.5/8.14.5) with ESMTP id t47Nwu5q040248 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 8 May 2015 08:58:57 +0900 (JST) (envelope-from nuta@seiya.me) Message-ID: <554BFC40.3080701@seiya.me> Date: Fri, 08 May 2015 08:58:56 +0900 From: Seiya Nuta User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Alex Merritt CC: "freebsd-hackers@freebsd.org" Subject: Re: User-mode FreeBSD? References: <506CAEF3-E94F-4C2E-8824-D1FBD782A6EA@seiya.me> <41F29A27-8C9E-4B0F-AC51-E2AD6CF28118@gmail.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2015 23:58:59 -0000 Hi Alex, Thank you for your information! I want to do it in FreeBSD but I'll try the DragonFlyBSD's feature. Thanks again, Seiya On 5/8/15 7:04 AM, Alex Merritt wrote: > On Thu, May 7, 2015 at 6:49 AM, Garrett Cooper > wrote: > >> >>> On May 6, 2015, at 23:10, Seiya Nuta wrote: >>> >>> Hello. >>> >>> I want to run FreeBSD kernel in userland to use it as a library OS. >>> >>> Does FreeBSD kernel supports running in the userland like User Mode >> Linux? >> >> Not yet, but it's desired for a variety of reasons (see netbsd's RUMP >> infrastructure). >> Cheers! > > > DragonFly (FreeBSD derivative) supports a "virtual kernel" mode, like what > you are asking: > > http://www.dragonflybsd.org/features/ > > I have not had the chance yet to use this myself. > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > -- Seiya Nuta nuta@seiya.me From owner-freebsd-hackers@FreeBSD.ORG Fri May 8 01:47:26 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41B59369; Fri, 8 May 2015 01:47:26 +0000 (UTC) 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 EEDA21C25; Fri, 8 May 2015 01:47:25 +0000 (UTC) Received: from Julian-MBP3.local (ppp121-45-241-118.lns20.per4.internode.on.net [121.45.241.118]) (authenticated bits=0) by vps1.elischer.org (8.14.9/8.14.9) with ESMTP id t481lIuW050502 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 7 May 2015 18:47:21 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <554C15A1.6020300@freebsd.org> Date: Fri, 08 May 2015 09:47:13 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Holger Levsen , freebsd-hackers@freebsd.org, Colin Percival Subject: Re: reproducible builds of FreeBSD in a chroot on Linux References: <201505071122.36037.holger@layer-acht.org> In-Reply-To: <201505071122.36037.holger@layer-acht.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 May 2015 01:47:26 -0000 On 5/7/15 5:22 PM, Holger Levsen wrote: > Hi, > > I'm one of the people involved in https://wiki.debian.org/ReproducibleBuilds > and have set up https://reproducible.debian.net which continously tests all > packages in the Debian archive for build reproducibility (so far on amd64 > only). > > For those who don't know, reproducible builds enable everyone to independently > verify that a given binary comes from specific source. This also allows to > indirectly verify that one's build system has not been tempered with - and > more. Please check the first URL of this mail for "the rest of the story". > > And then someone pointed me to https://wiki.freebsd.org/ReproducibleBuilds > - kudos for how far you already!(!!) > > So now I would like to build freebsd myself, twice, and compare the results > and show these results as in > https://reproducible.debian.net/rb-pkg/unstable/amd64/gcc-4.9.html - and then > quite probably set up a jenkins job on jenkins.debian.net and do this every > week. > > Here's the catch: I have basically no clue about freebsd - and I want to > build on Debian linux (on amd64) in a chroot. (And, it will need you people to > look at the results and eventually fix them!) ;-) > > So maybe can you help me with my next step. I've found the github freebsd > repo and cloned it, how to proceed further now? > > $ make buildworld > Makefile:137: *** missing separator. Stop. > > in the master branch of git://github.com/freebsd/freebsd wasn't right.. :/ ;) > > > Thanks for any help and pointers! I've tried to find documentation on this but > had no luck so I figured I could just ask... > > > cheers, > Holger > > (please cc: me I'm not subscribed.) Cross compiling FreeBSD from another platform has been a "gee the might be nice" goal for some years but it really never gets to the top of the list. Since virtual machines are so easy to make these days it's become easier to just install a freeBSD VM and do the build there. (maybe with an NFS mounted filesystem from the host). Compiling Linux on FreeBSD is equally difficult I believe. If you really wanted to you could look at he kFreeBSD project and maybe they have a way to do stuff.. As for reproducible builds, Colin (CC'd) did some work on characterising the reproducibility for use with FreeBSD update, which knows the few non reproducible things and excludes them when working out what changed.. basically timestamps etc. He may have more to add.. also: By "FreeBSD" do you mean the kernel? or the whole system? Unlike Linux, FreeBSD includes most of what the Linux world would consider to be the domain of the base distro.. e.g. cat, ls, cc, etc. There may also be a better mailing list for this... From owner-freebsd-hackers@FreeBSD.ORG Fri May 8 03:15:32 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 011FC2CB for ; Fri, 8 May 2015 03:15:31 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (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 B553915E9 for ; Fri, 8 May 2015 03:15:31 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 274161FE023; Fri, 8 May 2015 05:15:29 +0200 (CEST) Message-ID: <554C2A7D.6070401@selasky.org> Date: Fri, 08 May 2015 05:16:13 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Seiya Nuta , Alex Merritt CC: "freebsd-hackers@freebsd.org" Subject: Re: User-mode FreeBSD? References: <506CAEF3-E94F-4C2E-8824-D1FBD782A6EA@seiya.me> <41F29A27-8C9E-4B0F-AC51-E2AD6CF28118@gmail.com> <554BFC40.3080701@seiya.me> In-Reply-To: <554BFC40.3080701@seiya.me> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 May 2015 03:15:32 -0000 On 05/08/15 01:58, Seiya Nuta wrote: > Hi Alex, > > Thank you for your information! > I want to do it in FreeBSD but I'll try the DragonFlyBSD's feature. > > Thanks again, > Seiya FYI: man 3 cuse https://www.freebsd.org/cgi/man.cgi?query=cuse&apropos=0&sektion=3&manpath=FreeBSD+11-current&arch=default&format=html --HPS From owner-freebsd-hackers@FreeBSD.ORG Fri May 8 04:36:03 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06C69DDE; Fri, 8 May 2015 04:36:03 +0000 (UTC) Received: from mail-pd0-x22b.google.com (mail-pd0-x22b.google.com [IPv6:2607:f8b0:400e:c02::22b]) (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 D2D5C1DA8; Fri, 8 May 2015 04:36:02 +0000 (UTC) Received: by pdbqd1 with SMTP id qd1so62528928pdb.2; Thu, 07 May 2015 21:36:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=W9xhQEs2VxMiWfdnBryTkDfyvp9eu2SIXLAnKv/OX9o=; b=TJ5goZTDeZk7zjBTkJLB//Ezh5GoI1sL5sJJiW4OdLJQ/Z4Qp51vP5vGuJ8zcGRRUW jbXhUC8HO1BaHNXiGNJ6ryBEhKds1/VEymIwH0PDvq0VrfS3dr6bX0RnjoeAx6NUWCRY VS28Nhwwn9ioQZL7tgrWYIa7Wcm0Jw8/EBe+2WHKNvKlYxnL9kpDvg14iFJbDlOczy6R QEY5o+1XbUryLPi9t7JDBl6XgJubPMVM4QQFd+I/TWLJ4cdPQC6Wq9xHOqR8RCPysAhV bIHafywxXlJ/42wYSFDx2HPksTDglf7+DjCrd/Rk01x2DLiJ8JHryFWoBicsdLG+xmRM fyWw== X-Received: by 10.67.4.2 with SMTP id ca2mr3371113pad.62.1431059762437; Thu, 07 May 2015 21:36:02 -0700 (PDT) Received: from [0.0.0.0] (ec2-54-64-223-91.ap-northeast-1.compute.amazonaws.com. [54.64.223.91]) by mx.google.com with ESMTPSA id wa4sm3678543pab.17.2015.05.07.21.36.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 May 2015 21:36:01 -0700 (PDT) Message-ID: <554C3D2A.7030909@gmail.com> Date: Fri, 08 May 2015 12:35:54 +0800 From: rhenjau User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Ian Lepore CC: freebsd-hackers@freebsd.org Subject: Re: Memory barriers about buf_ring(9) References: <1431008458.6170.165.camel@freebsd.org> In-Reply-To: <1431008458.6170.165.camel@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 May 2015 04:36:03 -0000 Hi, Ian Thank you for your information. On 2015/5/7 22:20, Ian Lepore wrote: > On Thu, 2015-05-07 at 18:10 +0800, rhenjau wrote: >> Hi, hackers >> I'm reading buf_ring(9) and have a question about the following >> function. Is a memory barrier needed before br_cons_tail to prevent the >> loading of br_ring[cons_head] load is reordered after br_cons_tail is set? >> Producers may overwrite the area. >> >> /* >> * single-consumer dequeue >> * use where dequeue is protected by a lock >> * e.g. a network driver's tx queue lock >> */ >> static __inline void * >> buf_ring_dequeue_sc(struct buf_ring *br) >> { >> uint32_t cons_head, cons_next; >> #ifdef PREFETCH_DEFINED >> uint32_t cons_next_next; >> #endif >> uint32_t prod_tail; >> void *buf; >> >> cons_head = br->br_cons_head; >> prod_tail = br->br_prod_tail; >> >> cons_next = (cons_head + 1) & br->br_cons_mask; >> #ifdef PREFETCH_DEFINED >> cons_next_next = (cons_head + 2) & br->br_cons_mask; >> #endif >> >> if (cons_head == prod_tail) >> return (NULL); >> >> #ifdef PREFETCH_DEFINED >> if (cons_next != prod_tail) { >> prefetch(br->br_ring[cons_next]); >> if (cons_next_next != prod_tail) >> prefetch(br->br_ring[cons_next_next]); >> } >> #endif >> br->br_cons_head = cons_next; >> buf = br->br_ring[cons_head]; >> >> #ifdef DEBUG_BUFRING >> br->br_ring[cons_head] = NULL; >> if (!mtx_owned(br->br_lock)) >> panic("lock not held on single consumer dequeue"); >> if (br->br_cons_tail != cons_head) >> panic("inconsistent list cons_tail=%d cons_head=%d", >> br->br_cons_tail, cons_head); >> #endif >> ----------------------------------------------------- need memory >> barrier? >> br->br_cons_tail = cons_next; >> return (buf); >> } >> > There was some discussion and changes relating to barriers in buf_ring, > but it looks like the changes never got committed (I don't know why). > > https://reviews.freebsd.org/D1945 > > -- Ian > From owner-freebsd-hackers@FreeBSD.ORG Fri May 8 13:41:29 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB285CF6 for ; Fri, 8 May 2015 13:41:29 +0000 (UTC) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::22c]) (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 41EC61AAE for ; Fri, 8 May 2015 13:41:29 +0000 (UTC) Received: by widdi4 with SMTP id di4so30255833wid.0 for ; Fri, 08 May 2015 06:41:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; bh=Pp4vkCF57ubdLoJeqwZrTIhTr38rN8EwmynogedzLY8=; b=Dnoyy0DRZLJWCqprlxQ7iV+ScCUxnBzTGRlhtHChRAeHmKtQGQkobZnM+FfFafBg7q UyOS0Cxn8DqCnGO9hc9dBoQVAi1tRCMCSqDQKlIU7Llx4Q6WxclzP1bVYnrVUjp55adA B1qCyuEJpbuCNrCux5AVLabGgExRUAhae3GKVzzeaf4Zts6HqmhNImBtW0F5JtTb+Tuo t5VTQINCB7p0nT/zVYwJsX236hC0beHM6VNoQp7HCLX5SprEax+m3KgFQ2+7MQ/ugBsw /TCynhQKSUCdvSOxSlw5/tAkKyKzAU3hOXM+/TyjAXkZvQeaim9x5Bsiybpbro88BCqq KxQQ== X-Received: by 10.180.99.166 with SMTP id er6mr6426724wib.58.1431092487468; Fri, 08 May 2015 06:41:27 -0700 (PDT) Received: from localhost (cpe-94-253-186-35.zg.cable.xnet.hr. [94.253.186.35]) by mx.google.com with ESMTPSA id d14sm8425965wjn.30.2015.05.08.06.41.26 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Fri, 08 May 2015 06:41:26 -0700 (PDT) Date: Fri, 8 May 2015 15:41:20 +0200 From: To: FreeBSD Hackers Subject: Re: net rc.conf bug? Message-ID: <20150508154120.0000327e@gmail.com> In-Reply-To: References: <20150319230613.000074b1@gmail.com> <550B4A9D.1080602@freebsd.org> <20150320012041.00006251@gmail.com> 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.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 May 2015 13:41:29 -0000 And now watch this when it comes down to WiFi NICs! If during cloning of device, you set non-default ether (MAC) adress, i.e; ---- ifconfig wlan0 create wlandev ath0 ether $ether_here ---- BOOM! You'we just rendered WiFi NIC unusable, that is, it will never be able to associate. Tried station and AP modes, with urtw and ath drivers. I believe it affects ALL WiFi NICs. Domagoj From owner-freebsd-hackers@FreeBSD.ORG Fri May 8 14:07:23 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B6A6A64 for ; Fri, 8 May 2015 14:07:23 +0000 (UTC) Received: from albert.catwhisker.org (mx.catwhisker.org [198.144.209.73]) (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 199451D93 for ; Fri, 8 May 2015 14:07:22 +0000 (UTC) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.14.9/8.14.9) with ESMTP id t48E7L7d039220; Fri, 8 May 2015 07:07:21 -0700 (PDT) (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.14.9/8.14.9/Submit) id t48E7LwK039219; Fri, 8 May 2015 07:07:21 -0700 (PDT) (envelope-from david) Date: Fri, 8 May 2015 07:07:21 -0700 From: David Wolfskill To: rank1seeker@gmail.com Cc: FreeBSD Hackers Subject: Re: net rc.conf bug? Message-ID: <20150508140721.GD1158@albert.catwhisker.org> Mail-Followup-To: David Wolfskill , rank1seeker@gmail.com, FreeBSD Hackers References: <20150319230613.000074b1@gmail.com> <550B4A9D.1080602@freebsd.org> <20150320012041.00006251@gmail.com> <20150508154120.0000327e@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="TydEFKrGQa51aSOi" Content-Disposition: inline In-Reply-To: <20150508154120.0000327e@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 May 2015 14:07:23 -0000 --TydEFKrGQa51aSOi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 08, 2015 at 03:41:20PM +0200, rank1seeker@gmail.com wrote: > And now watch this when it comes down to WiFi NICs! > If during cloning of device, you set non-default ether (MAC) adress, > i.e; > ---- > ifconfig wlan0 create wlandev ath0 ether $ether_here > ---- > BOOM! You'we just rendered WiFi NIC unusable, that is, it will never be > able to associate. Tried station and AP modes, with urtw and ath > drivers. Why would you try to set the MAC address of a cloned interface, rather than that of the real interface (before cloning)? > I believe it affects ALL WiFi NICs. Ref.: g1-254(10.1-S)[7] egrep 'ifconfig|wlan|lagg' /etc/rc.conf | grep -v '^#' ifconfig_em0=3D"up" ifconfig_iwn0=3D"ether 34:e6:d7:3c:4a:93" wlans_iwn0=3Dwlan0 ifconfig_wlan0=3D"WPA" cloned_interfaces=3D"lagg0" ifconfig_lagg0=3D"laggproto failover laggport em0 laggport wlan0 DHCP" g1-254(10.1-S)[8] ifconfig iwn0 iwn0: flags=3D8843 metric 0 mtu 2290 ether 34:e6:d7:3c:4a:93 nd6 options=3D21 media: IEEE 802.11 Wireless Ethernet autoselect mode 11ng status: associated g1-254(10.1-S)[9]=20 Peace, david --=20 David H. Wolfskill david@catwhisker.org Those who murder in the name of God or prophet are blasphemous cowards. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --TydEFKrGQa51aSOi Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJVTMMZXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4RThEMDY4QTIxMjc1MDZFRDIzODYzRTc4 QTY3RjlDOERFRjQxOTNCAAoJEIpn+cje9Bk79SUQAIJePJPbE8c0fQsJ32KHm/8u 90cTCuCWXAyYAIbPOLrYqZDToJGQp35If5/z6nw4OIamKmbDkQXQSHxe5MawpL59 AfAC9gBzLBmEA2p4HePfh7487BRpkxfl3ZwLByxICQNo1nY17uIhs0xx4fdYYEpn U7gRIV2Hf0jrQtw+LbLubxo+LD/4MkjQaXF9ZX/1YwAjzHMs+DUYqz4kGAsIjKA6 JwLTo88GNnE6vQLh37LXYY+eIxS4B3DXU4OiaPALK4XHtOUB6wXCAZRLp8a1/1w8 TQ8xTReg0K2nuOPwMe0SF48H7XEAg32kydxkqUwMXW+UB4t4gWYw2YZk9wLCcXRq 7L8c//OF5hlPNFU/l/2NR9QhAk6C0WvnCGcwJ+d3zCHxh8CzoAC19agChiBIM727 pZu/uMrSOkgpNREbW7emSWkBjG2kX2tr/dY6qm+SM2j6gjv/tE8sJwNm3wcbD13x 6dCl+A67wXptfXDnjYJcGYmCjJhh3vusOMKsUihKPq2bW1AnjxLkcu3nrbsCUgwX hLTO/p2Xw5mJbFMVc2xFXvgxzjbIqMGtu6QVoaz7t+PDXruHwPQg8CqLll1c6CAV 3uJyzk5WAwz5dFNQM35kx/1znEWi3/ij6xA+SzM1KK0xUMG3N3uv6xyDFVsGTYlg 0pDzEL/VIiRxuvlYzzDu =2spO -----END PGP SIGNATURE----- --TydEFKrGQa51aSOi-- From owner-freebsd-hackers@FreeBSD.ORG Fri May 8 14:15:41 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 75099E9E for ; Fri, 8 May 2015 14:15:41 +0000 (UTC) Received: from mail-yh0-x234.google.com (mail-yh0-x234.google.com [IPv6:2607:f8b0:4002:c01::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 33F5A1EB1 for ; Fri, 8 May 2015 14:15:41 +0000 (UTC) Received: by yhcb70 with SMTP id b70so19782418yhc.0 for ; Fri, 08 May 2015 07:15:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dataix.net; s=rsa; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=dFRrSyjmGSqWJO+4ncZCp2fc23CZCGL4/Jkdz9B1VZI=; b=WJqJiRn9ZVrH3qMM3REZkH58ZmrnomjJKfpTKUpCP+5LwtMRKAw/1h4QjcOMtEI3qd nfiA9tOjh6MrEXATKYa9888IY1+pSJ87Hgulyb1YLkhYtynPisPCA35b0apXhcdR3Ppf vXOmswoF0j8FXD4idxiwwq6I7uD9r80/kUn8o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=dFRrSyjmGSqWJO+4ncZCp2fc23CZCGL4/Jkdz9B1VZI=; b=gLw6rbW0GcGfoyNGUi5wI+JLMCFGicjU8YPWCkZXP9DXlmDlr5VL21wMoZLsBv+1Uw rzSjjJbgawp+g0WDI7odzV25VqjWEpUP+Y3Son6rJRcLqSUdsfsJDwkuoBycR880jdYM PGEGH05usVD0NOx5CTWTLEQTNkLreaJd7Qa9iK+h0HPWax6JqBv92hQUCXGf2busUFSL w0UEAgvo6R7z6C3H6knU0goDEAKaXhhsAXM6PVoerIuqLE8gwJivXc1Gxdv1rCGF6nof OjDYssKQM7A3dX8MqrgZbwaxj/E2vBGlFS3mrbZwfOg/3L+AMFxLx+Avxl4Puy3G3y3z GS7Q== X-Gm-Message-State: ALoCoQlRz297s/3TSOJnxWTxsAvcgvhKKQU6VnpEug/a5yCzsr4BRGSxDjdimJ4xIcY49aOBIxTX X-Received: by 10.170.81.87 with SMTP id x84mr3773192ykx.113.1431094540365; Fri, 08 May 2015 07:15:40 -0700 (PDT) Received: from ?IPv6:2600:1008:b101:c1a4:7c10:ae97:bc61:762? ([2600:1008:b101:c1a4:7c10:ae97:bc61:762]) by mx.google.com with ESMTPSA id j67sm4561592yhj.30.2015.05.08.07.15.39 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 08 May 2015 07:15:39 -0700 (PDT) Subject: Re: net rc.conf bug? Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: text/plain; charset="utf8"; X-Pgp-Agent: GPGMail 2.5b6 From: Jason Hellenthal In-Reply-To: <20150508140721.GD1158@albert.catwhisker.org> Date: Fri, 8 May 2015 09:15:37 -0500 Cc: rank1seeker@gmail.com, FreeBSD Hackers Content-Transfer-Encoding: 8bit Message-Id: <5EDF6CA9-C44F-442E-8FA6-F76D08EF32C2@dataix.net> References: <20150319230613.000074b1@gmail.com> <550B4A9D.1080602@freebsd.org> <20150320012041.00006251@gmail.com> <20150508154120.0000327e@gmail.com> <20150508140721.GD1158@albert.catwhisker.org> To: David Wolfskill X-Mailer: Apple Mail (2.2098) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 May 2015 14:15:41 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Could also do … ifconfig_wlan0_ether=“XX:XX:XX:XX:XX:XX” Just for reference. On May 8, 2015, at 09:07, David Wolfskill wrote: On Fri, May 08, 2015 at 03:41:20PM +0200, rank1seeker@gmail.com wrote: And now watch this when it comes down to WiFi NICs! If during cloning of device, you set non-default ether (MAC) adress, i.e; - ---- ifconfig wlan0 create wlandev ath0 ether $ether_here - ---- BOOM! You'we just rendered WiFi NIC unusable, that is, it will never be able to associate. Tried station and AP modes, with urtw and ath drivers. Why would you try to set the MAC address of a cloned interface, rather than that of the real interface (before cloning)? I believe it affects ALL WiFi NICs. Ref.: g1-254(10.1-S)[7] egrep 'ifconfig|wlan|lagg' /etc/rc.conf | grep -v '^#' ifconfig_em0="up" ifconfig_iwn0="ether 34:e6:d7:3c:4a:93" wlans_iwn0=wlan0 ifconfig_wlan0="WPA" cloned_interfaces="lagg0" ifconfig_lagg0="laggproto failover laggport em0 laggport wlan0 DHCP" g1-254(10.1-S)[8] ifconfig iwn0 iwn0: flags=8843 metric 0 mtu 2290 ether 34:e6:d7:3c:4a:93 nd6 options=21 media: IEEE 802.11 Wireless Ethernet autoselect mode 11ng status: associated g1-254(10.1-S)[9] Peace, david - -- David H. Wolfskill david@catwhisker.org Those who murder in the name of God or prophet are blasphemous cowards. See http://www.catwhisker.org/~david/publickey.gpg for my public key. - -- Jason Hellenthal JJH48-ARIN -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJVTMUJAAoJEDLu+wRc4KcIHgQIAI1zIglOWFspyqYkQWkc0ngm ksDCh/HavvngRbh3PB+otttoCugwsHTr5Oe2nsmiOFyTWMk32hkkZFeMOv7OuIVf 2MV3/r1+aXN82O0QX9tdyPhM3KZBt1I8Hu9Qk/z9x22hFG5IKYDOULvWBhHpZPP3 mNVxdx9n66oI7GC5gz551MfgSpg1ZFDkEQNAp3FiNklFMPgDePfgbp2cdCHUTLKv PmiYXIHVRRi/G42KaiFtx5lkhDvoU77fS+3foLcWop0NbKIHVQUaxLVXqiZPqiZ6 s6gvsO4Vq4tUnWenfJVRoxCpDkiWizP0WE1Y81/v23syHmqt6pbQ7AFz6+XZzsk= =zvrk -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Fri May 8 15:55:31 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DDCE3104 for ; Fri, 8 May 2015 15:55:31 +0000 (UTC) Received: from leviatan.freebsdbrasil.com.br (leviatan.freebsdbrasil.com.br [177.10.156.9]) (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 2F42C1AC5 for ; Fri, 8 May 2015 15:55:30 +0000 (UTC) Received: (qmail 66340 invoked from network); 8 May 2015 12:55:21 -0300 Received: from unknown (HELO [200.129.11.217]) (contato@bsdcon.com.br@[200.129.11.217]) (envelope-sender ) by capeta.freebsdbrasil.com.br (qmail-ldap-1.03) with SMTP for ; 8 May 2015 12:55:21 -0300 Message-ID: <554CDC64.6090709@bsdcon.com.br> Date: Fri, 08 May 2015 12:55:16 -0300 From: BSDCon Brasil 2015 Organization: BSDCon Brasil User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: BSDCon Brazil 2015 - Call for Papers OpenPGP: id=D3F163569EC66AC1D4823CED03DA079C6ED07283 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 May 2015 15:55:32 -0000 INTRODUCTION BSDCon Brazil (http://www.bsdcon.com.br) is the brazilian BSD powered and flavored conference. The first edition was in 2005 and it brought together a great mix of *BSD developers and users for a nice blend of both developer-centric and user-centric presentations, and activities. This year BSDCon Brazil will be held from 9-10th October 2015, in Fortaleza (CE). OFFICIAL CALL We are proudly requesting proposals for presentations. We do not require academic or formal papers. If you wish to submit a formal paper, you are welcome to, but it is not required. Presentations are expected to be 45~60 minutes and are to be delivered in Portuguese (prefered), Spanish or English. The proposals presentation should be written with a very strong technical content bias. Proposals of a business development or marketing nature are not appropriate for this venue and will be rejected! Topics of interest to the conference include, but are not limited to: [*] Automation & Embedded Systems [*] Best Current Practices [*] Continuous Integration [*] Database Management Systems [*] Device Drivers [*] Documentation & Translation [*] Filesystems [*] Firewall & Routing [*] Getting Started to *BSD Systems [*] High Availability [*] Internet of Things (IoT) [*] IPv6 [*] Kernel Internals [*] Logging & Monitoring [*] Network Applications [*] Orchestration [*] Performance [*] Privacy & Security [*] Third-Party Applications Management [*] Virtualization [*] Wireless Transmissions We are waiting to read what you got! Please send all proposals to: submissions (@) bsdcon.com.br The proposals should contain a short and concise text description. The submission should also include a short CV of the speaker and an estimate of the expected travel expenses. SCHEDULE Proposals Acceptance May 8th 2015 ----- BEGINS June 14th 2015 --- ENDS Contact to Accepted Proposals Authors July 13th 2015 NOTES * If your talk is accepted, you are expected to present your talk in person; * Speakers do not register or pay conference fees; * We can pay for speakers flight and accommodation; * You pay for your own food and drink; * There will be a digital projector available in each lecture room. -- BSDCon Brazil 2015 http://www.bsdcon.com.br From owner-freebsd-hackers@FreeBSD.ORG Fri May 8 17:12:00 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 927B967B for ; Fri, 8 May 2015 17:12:00 +0000 (UTC) Received: from mail-ig0-x22e.google.com (mail-ig0-x22e.google.com [IPv6:2607:f8b0:4001: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 5BAE61432 for ; Fri, 8 May 2015 17:12:00 +0000 (UTC) Received: by igbpi8 with SMTP id pi8so26265088igb.1 for ; Fri, 08 May 2015 10:11:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=lKmLL/W0Lk8v8sYFSSigLko4lxLu6p1xx7a632F5U38=; b=cPbUFZDaymmixjJ7pK6sPaDcgwf1iXd+n+VA1J+rAYd8Ccmkhxrr2EU5PfilWZQfpq xgbTJ7vPhIogq+Pxgo+kuLmS5A3N4FuJiFnjWzWpThGI2gQaaHJkRCwKmBASPDeXH2zM /Djwjy/LbYM2BM8pqklTrMyEWEyBT5P3uxHR58KcwH5GsC5qtiA15eMHDjwoRA/WEg8x QSQrOmrRPi0bNKLGvUbOXEaU+XQXhlbVa/lz8ye3x3nww31PqnCBivFmO4ABCsf41M3M 7yYz8AXKlDLmRPXInTVqu0zt4pyBlIj6M6wG7uWjkuV+VSRnHMSu4ozYROHB4PYZTDDB BMNw== MIME-Version: 1.0 X-Received: by 10.107.155.81 with SMTP id d78mr6313434ioe.29.1431105119824; Fri, 08 May 2015 10:11:59 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.38.133 with HTTP; Fri, 8 May 2015 10:11:59 -0700 (PDT) In-Reply-To: <20150508154120.0000327e@gmail.com> References: <20150319230613.000074b1@gmail.com> <550B4A9D.1080602@freebsd.org> <20150320012041.00006251@gmail.com> <20150508154120.0000327e@gmail.com> Date: Fri, 8 May 2015 10:11:59 -0700 X-Google-Sender-Auth: A-yMTw2aUCFaztHeTKZDMci3BNc Message-ID: Subject: Re: net rc.conf bug? From: Adrian Chadd To: rank1seeker@gmail.com Cc: FreeBSD Hackers Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 May 2015 17:12:00 -0000 So, in /theory/ you could have a NIC that supports different MAC per STA, but I don't know how successful it is going to be. You can certainly set a MAC per AP if you're careful. I don't like how fragile this is, so please file a ticket and do some more experimenting. I'd like to see this fixed - either we fix it to always work, or we figure out the configuration cases and add appropriate methods or config flags so we support/advertise the working subset of configurations. -a From owner-freebsd-hackers@FreeBSD.ORG Sat May 9 03:32:19 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB0C96A8 for ; Sat, 9 May 2015 03:32:19 +0000 (UTC) Received: from mail-qk0-x232.google.com (mail-qk0-x232.google.com [IPv6:2607:f8b0:400d: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 9A6411894 for ; Sat, 9 May 2015 03:32:19 +0000 (UTC) Received: by qku63 with SMTP id 63so60150598qku.3 for ; Fri, 08 May 2015 20:32:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=9O3+qJKjie2atfQohANgrdTa+eX84jnDcZwZ7bg2C44=; b=VjBohtiLKPDzWyudKSwrPSFU1vmxra6AgZWhGrw1++9ruYzPZeiigmMrglEyLYWgan AR6PDUPF63uF+gDsVTC4rj+IhCAEu1MPR4pbsS23WdpXRGAJ0ihdwCIO/SeNHdZQDcAr v60edh+GZOcPOz19t5Wqd4ocd9mW15FBTO/7RbKetkRCH/1GSPyq9gLQJ4/LoRNjDRek mT4z6J9A3RCricMMJgsr/jlmR0JtIUKYtDnDjQW5i1ZAeZsew6R0KxzjR9/i1DywoFFc djAhSWmEaqXPUKf0A1KvDyk4OSyynU77EPx9wX3dyIe7Eiq5IpEpyX0nFNlxe4n4OWAp 7zQg== MIME-Version: 1.0 X-Received: by 10.140.235.68 with SMTP id g65mr1392053qhc.96.1431142338650; Fri, 08 May 2015 20:32:18 -0700 (PDT) Received: by 10.140.98.66 with HTTP; Fri, 8 May 2015 20:32:18 -0700 (PDT) Date: Fri, 8 May 2015 20:32:18 -0700 Message-ID: Subject: Parsing debug.witness.badstacks From: NGie Cooper To: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 May 2015 03:32:19 -0000 Hi all, Some of the automation at $work was broken when moving from an earlier version of FreeBSD to a later version of FreeBSD with witness (mostly dealing with LORs from lockmgr), so I disabled printing out LORs on the console and use debug.witness.badstacks instead to gather LOR info. I've written up a quick and dirty tool for doing this: https://github.com/yaneurabeya/scratch/blob/master/bayonetta/scratch/scripts/freebsd/parse_badstacks.py . I was wondering if anyone else would be interested in having a similar tool in FreeBSD and/or if it made sense to instead output the badstacks output [from the kernel] in a different, easier format to digest (json, xml, etc). Thanks! -NGie From owner-freebsd-hackers@FreeBSD.ORG Sat May 9 17:20:54 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BDF6BA89 for ; Sat, 9 May 2015 17:20:54 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (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 A19C41DE7 for ; Sat, 9 May 2015 17:20:53 +0000 (UTC) Received: from [192.168.200.208] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 3EE89192906 for ; Sat, 9 May 2015 17:20:47 +0000 (UTC) Message-ID: <554E41EE.2010202@ignoranthack.me> Date: Sat, 09 May 2015 10:20:46 -0700 From: Sean Bruno Reply-To: sbruno@freebsd.org User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: How to get anything useful out of kgdb? Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 May 2015 17:20:54 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 tl;dr What are the kernel config options to get good output of kgdb? I'm trying to get the ability to debug and display internal variables, as one does, with kgdb. I'm *must* be doing this wrong as I cannot get any useful output from accessing variables that were JUST accessed in order to invoke a panic() that I have inserted. This is a GENERIC kernel without INVARIANTS and without WITNESS: https://people.freebsd.org/~sbruno/wtf_kgdb.txt I seem to have debug enabled and am able to browse source, but I obviously haven't compiled correctly as things are optimized out. sean -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJVTkHqXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5k4w4H/jv2BlUW4OiK5TPcor+32HVC 1GxRJz8nkub8y5E04K0BCVKieulOFXm8+yWjRwGPKW58G8mz/gzHUiip9GjYgnW3 sTBF2p+JvaB4/69AwsNKur7oCzmdM5pT5MBgWuXxGw41mCWuYO2zimmuFZc1iPf1 7QX8CeVGU9tHvndMw1nCZx2/R+3GL0SDtRvk0N7NYGij04NvmPwWKm4bGdbMZjOG NJncTCiVKKW2zQmxq4AYZpLo+odoT2DgbIXz9KXPNMDixg22Tx5+o2/OL4dJ8mpu U5kzLmPFhumUKEsG1uSnxRb7snWJQBKdTkEOx+qbMGPCHoUd6gGV1wq8XJsV8+M= =4KG4 -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Sat May 9 18:02:59 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90464DF9 for ; Sat, 9 May 2015 18:02:59 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (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 73CE5119D for ; Sat, 9 May 2015 18:02:59 +0000 (UTC) Received: from [192.168.200.208] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 5BC00192906 for ; Sat, 9 May 2015 18:02:58 +0000 (UTC) Message-ID: <554E4BD1.1030802@ignoranthack.me> Date: Sat, 09 May 2015 11:02:57 -0700 From: Sean Bruno Reply-To: sbruno@freebsd.org User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: Re: How to get anything useful out of kgdb? References: <554E41EE.2010202@ignoranthack.me> In-Reply-To: <554E41EE.2010202@ignoranthack.me> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 May 2015 18:02:59 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 05/09/15 10:20, Sean Bruno wrote: > > tl;dr What are the kernel config options to get good output of > kgdb? > > > I'm trying to get the ability to debug and display internal > variables, as one does, with kgdb. I'm *must* be doing this wrong > as I cannot get any useful output from accessing variables that > were JUST accessed in order to invoke a panic() that I have > inserted. This is a GENERIC kernel without INVARIANTS and without > WITNESS: > > https://people.freebsd.org/~sbruno/wtf_kgdb.txt > > I seem to have debug enabled and am able to browse source, but I > obviously haven't compiled correctly as things are optimized out. > Just to see what the arguments to make are when building, I touched if_em.c and did a NOCLEAN rebuild. What I see is this: https://people.freebsd.org/~sbruno/wtf_make.txt Should -02 and -g do anything useful here when compiling? Do I need to drop the optimization flags? sean -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJVTkvOXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5k1noIAKfpfYVyhMDpCGPl97to81F+ URoq0Clm+Ptw2eIq89g8HNqy6k958PSOyL7SgPjYRTlu96DixkOm3YOPBaH/iWe4 B5SaZGeMwM6gVpyPXp3SkO0+QcDLsj5mlx15QQFCKH9X60J/BhWDzsfXj+84IJDD 2DDsv9ZPhVRnNzzJ2XLNwo8H10+IG/lXUvCIFRDLALKYOgLd+Oy/BKJ2ddhgrVvm y0utNy7N0G3edKKvbXZ8O/HsSecSfM0ttHIpXVJrZp05JxxSJ7WttZzQB8HSe8si niEjSrp4zBsUMM139DzKZWIHEFNBAUx+pxLyxOHOXtRcVzuSC+IcrvErwI2Lg28= =DMDN -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Sat May 9 18:15:47 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04E20F8D for ; Sat, 9 May 2015 18:15:47 +0000 (UTC) Received: from server283.com (server283.com [64.14.68.91]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3AB81291 for ; Sat, 9 May 2015 18:15:46 +0000 (UTC) Received: (qmail 19506 invoked by uid 503); 9 May 2015 18:09:03 -0000 Received: from unknown (HELO ?192.168.100.125?) (jeffm@98.203.199.57) by server283.com with ESMTPA; 9 May 2015 18:09:03 -0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: How to get anything useful out of kgdb? From: Jeff Meegan In-Reply-To: <554E4BD1.1030802@ignoranthack.me> Date: Sat, 9 May 2015 11:09:01 -0700 Cc: freebsd-hackers@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <406EAA27-D825-408B-985E-DC3FFE746473@frob.org> References: <554E41EE.2010202@ignoranthack.me> <554E4BD1.1030802@ignoranthack.me> To: sbruno@freebsd.org X-Mailer: Apple Mail (2.2098) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 May 2015 18:15:47 -0000 You could try -O0, but also if you just care about txr, go up to frame 12 where txr initialized to the context arg to=20 em_handle_tx() and print it out there. =E2=80=94j > On May 9, 2015, at 11:02 AM, Sean Bruno = wrote: >=20 > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 >=20 > On 05/09/15 10:20, Sean Bruno wrote: >>=20 >> tl;dr What are the kernel config options to get good output of >> kgdb? >>=20 >>=20 >> I'm trying to get the ability to debug and display internal >> variables, as one does, with kgdb. I'm *must* be doing this wrong >> as I cannot get any useful output from accessing variables that >> were JUST accessed in order to invoke a panic() that I have >> inserted. This is a GENERIC kernel without INVARIANTS and without >> WITNESS: >>=20 >> https://people.freebsd.org/~sbruno/wtf_kgdb.txt >>=20 >> I seem to have debug enabled and am able to browse source, but I=20 >> obviously haven't compiled correctly as things are optimized out. >>=20 >=20 > Just to see what the arguments to make are when building, I touched > if_em.c and did a NOCLEAN rebuild. >=20 > What I see is this: > https://people.freebsd.org/~sbruno/wtf_make.txt >=20 > Should -02 and -g do anything useful here when compiling? Do I need > to drop the optimization flags? >=20 > sean > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2 >=20 > iQF8BAEBCgBmBQJVTkvOXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w > ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx > MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5k1noIAKfpfYVyhMDpCGPl97to81F+ > URoq0Clm+Ptw2eIq89g8HNqy6k958PSOyL7SgPjYRTlu96DixkOm3YOPBaH/iWe4 > B5SaZGeMwM6gVpyPXp3SkO0+QcDLsj5mlx15QQFCKH9X60J/BhWDzsfXj+84IJDD > 2DDsv9ZPhVRnNzzJ2XLNwo8H10+IG/lXUvCIFRDLALKYOgLd+Oy/BKJ2ddhgrVvm > y0utNy7N0G3edKKvbXZ8O/HsSecSfM0ttHIpXVJrZp05JxxSJ7WttZzQB8HSe8si > niEjSrp4zBsUMM139DzKZWIHEFNBAUx+pxLyxOHOXtRcVzuSC+IcrvErwI2Lg28=3D > =3DDMDN > -----END PGP SIGNATURE----- > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://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 May 9 18:31:01 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE41429A for ; Sat, 9 May 2015 18:31:01 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (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 B00E8139F for ; Sat, 9 May 2015 18:31:01 +0000 (UTC) Received: from [192.168.200.208] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 1CAE0192906; Sat, 9 May 2015 18:31:00 +0000 (UTC) Message-ID: <554E5263.8010205@ignoranthack.me> Date: Sat, 09 May 2015 11:30:59 -0700 From: Sean Bruno Reply-To: sbruno@freebsd.org User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Jeff Meegan CC: freebsd-hackers@freebsd.org Subject: Re: How to get anything useful out of kgdb? References: <554E41EE.2010202@ignoranthack.me> <554E4BD1.1030802@ignoranthack.me> <406EAA27-D825-408B-985E-DC3FFE746473@frob.org> In-Reply-To: <406EAA27-D825-408B-985E-DC3FFE746473@frob.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 May 2015 18:31:01 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 05/09/15 11:09, Jeff Meegan wrote: > You could try -O0, but also if you just care about txr, go up to > frame 12 where txr initialized to the context arg to em_handle_tx() > and print it out there. > > —j I'm guessing that the place to change -O2 -> -O0 is in kern.pre.mk ? sean > >> On May 9, 2015, at 11:02 AM, Sean Bruno >> wrote: >> > On 05/09/15 10:20, Sean Bruno wrote: >>>> >>>> tl;dr What are the kernel config options to get good output >>>> of kgdb? >>>> >>>> >>>> I'm trying to get the ability to debug and display internal >>>> variables, as one does, with kgdb. I'm *must* be doing this >>>> wrong as I cannot get any useful output from accessing >>>> variables that were JUST accessed in order to invoke a >>>> panic() that I have inserted. This is a GENERIC kernel >>>> without INVARIANTS and without WITNESS: >>>> >>>> https://people.freebsd.org/~sbruno/wtf_kgdb.txt >>>> >>>> I seem to have debug enabled and am able to browse source, >>>> but I obviously haven't compiled correctly as things are >>>> optimized out. >>>> > > Just to see what the arguments to make are when building, I > touched if_em.c and did a NOCLEAN rebuild. > > What I see is this: > https://people.freebsd.org/~sbruno/wtf_make.txt > > Should -02 and -g do anything useful here when compiling? Do I > need to drop the optimization flags? > > sean >> _______________________________________________ >> freebsd-hackers@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To >> unsubscribe, send any mail to >> "freebsd-hackers-unsubscribe@freebsd.org" > > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJVTlJgXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5kbQQH/A2nlC6kEar9xZfslOKE9BjA Y5MJZiFyo9/X9E7dpVyn02h4MKgiCdfxzVVSVoHQEvoNcjpsDLdp5MvAs5KUv4VZ 1FHJILDeBuDlMG4HFCv3hqvVShsXxog4ausDrk3F+3MK8ochwQu5NkF5M59rlWtk QGIJp2svibiqfTL/DcsJM+7o/9HxHoThh0skKIpY9LQ+4sYFK8uTAFZX5DcchXo1 M24lMKPKKymnRAt+FenkEzdKQyNHdszNWl4EptEDHe0G+nG/TRZZMBnmuID6tqt7 mI8hwpnf4Q04yt3C/CrYh33E0GQ8WrnWCMYnTUH4lMUGl/o2VFNGfF23CrLidTw= =jlHy -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Sat May 9 18:39:29 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F36261E for ; Sat, 9 May 2015 18:39:29 +0000 (UTC) Received: from know-smtprelay-omc-7.server.virginmedia.net (know-smtprelay-omc-7.server.virginmedia.net [80.0.253.71]) by mx1.freebsd.org (Postfix) with ESMTP id B42C914C3 for ; Sat, 9 May 2015 18:39:28 +0000 (UTC) Received: from [192.168.1.100] ([86.20.122.200]) by know-smtprelay-7-imp with bizsmtp id RueJ1q00G4KXVwe01ueJ01; Sat, 09 May 2015 19:38:18 +0100 X-Originating-IP: [86.20.122.200] X-Spam: 0 X-Authority: v=2.1 cv=cpwVkjIi c=1 sm=1 tr=0 a=WByauD8lJrWvBFCNrxRoEQ==:117 a=WByauD8lJrWvBFCNrxRoEQ==:17 a=LdKPt8bmWjYA:10 a=N659UExz7-8A:10 a=NLZqzBF-AAAA:8 a=ggPVdKjhcrtQw3wFyIQA:9 a=pILNOxqGKmIA:10 a=XdyKOaxJwVsA:10 Message-ID: <554E53EF.4080600@NTLWorld.com> Date: Sat, 09 May 2015 19:37:35 +0100 From: Jonathan de Boyne Pollard User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: FreeBSD Hackers Subject: nosh version 1.14 References: <54430B41.3010301@NTLWorld.com> <54B86FD5.3090203@NTLWorld.com> In-Reply-To: <54B86FD5.3090203@NTLWorld.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 May 2015 18:39:29 -0000 nosh is now up to version 1.14 * http://homepage.ntlworld.com./jonathan.deboynepollard/Softwares/nosh.html I missed out the announcement for 1.13, because 1.14 came pretty closely upon its heels. Here's the source package changelog. Discussion to follow. nosh (1.14) * More cross-platform services: deluged, deluge-web, multilog@, sissylog@, openvpn@, wpa_supplicant, polkitd, timedated, localed, hostnamed, NetworkManager, ModemManager, sickbeard, plexmediaserver, ossec@dbd, ossec@agentlessd, ossec@csyslogd, ossec@execd, ossec@agentd, ossec@logcollector, ossec@syscheckd, ossec@maild, ossec@analysisd, ossec@remoted, ossec@monitord * The cups.service service has been renamed org.cups.cups.service to follow the service names used by CUPS packaging. * Fixed a bug in foreground and background where nested separators on the right-hand-side were not being preserved. * The previous regular sockets, sysinit services, and standard targets packages are now all merged into the bundles package. * There is now a new user VT package that runs new-style user VT services. * There is now a new kernel VT package that runs old-style kernel VT services. * The nosh-systemd-services package now automatically runs various nosh subsystems under systemd. * The maintainer scripts now create the cyclog@ user accounts, convert any systemd presets, and preset the services. * Fixed a bug in service-is-{ok,up} where a non-int exception was being thrown. * Fixed a bug in convert-systemd-units where it wasn't handling quoted whitespace in settings that take lists. * openstack-swift@.service is now swift@.service to make the usernames shorter. nosh (1.13) * Fixed a problem with handling "left+right" vt fonts that was being conflated with italic/oblique. * On BSD console-fb-realizer now attempts to maintain the keyboard LED state. Note that a quirk of VirtualBox, which employs subtle tricks like secret extra keypresses to keep host and guest keyboard lock states in synch, will make it seem like nothing is happening. * SoftTerm now supports RIS and DECSTR. * More cross-platform services: hostapd, kmod@, fail2ban, nagios * More BSD services: bthidd * Added an unload-when-stopped command. * nagios-check-service now has a --critical-if-below-min option. * service-dt-scanner no longer defaults to using input-activated log services. * Added a convert-fstab-services command. * SoftTerm now does VT52x sideways scrolling. From owner-freebsd-hackers@FreeBSD.ORG Sat May 9 19:25:11 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F048434A for ; Sat, 9 May 2015 19:25:11 +0000 (UTC) Received: from know-smtprelay-omc-7.server.virginmedia.net (know-smtprelay-omc-7.server.virginmedia.net [80.0.253.71]) by mx1.freebsd.org (Postfix) with ESMTP id 713F6194C for ; Sat, 9 May 2015 19:25:10 +0000 (UTC) Received: from [192.168.1.100] ([86.20.122.200]) by know-smtprelay-7-imp with bizsmtp id RvRA1q00F4KXVwe01vRAbS; Sat, 09 May 2015 20:25:10 +0100 X-Originating-IP: [86.20.122.200] X-Spam: 0 X-Authority: v=2.1 cv=cpwVkjIi c=1 sm=1 tr=0 a=WByauD8lJrWvBFCNrxRoEQ==:117 a=WByauD8lJrWvBFCNrxRoEQ==:17 a=LdKPt8bmWjYA:10 a=N659UExz7-8A:10 a=NLZqzBF-AAAA:8 a=X9xWFtYdSSi8yipKu9IA:9 a=pILNOxqGKmIA:10 a=XdyKOaxJwVsA:10 Message-ID: <554E5EEA.7020901@NTLWorld.com> Date: Sat, 09 May 2015 20:24:26 +0100 From: Jonathan de Boyne Pollard User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: FreeBSD Hackers Subject: Re: nosh version 1.14 References: <54430B41.3010301@NTLWorld.com> <54B86FD5.3090203@NTLWorld.com> <554E53EF.4080600@NTLWorld.com> In-Reply-To: <554E53EF.4080600@NTLWorld.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 May 2015 19:25:12 -0000 nosh is now up to version 1.14 * http://homepage.ntlworld.com./jonathan.deboynepollard/Softwares/nosh.html That was the source package changelog. Now the discussion. I've been running FreeBSD 10 as an entirely nosh-managed system for quite a while, now. But I still had some ad hoc mechanisms for starting the user-space virtual terminals by logging in on a kernel virtual terminal and running some scripts. I'm now running user-space virtual terminals as proper services, under the service manager, so they come up at bootstrap unattended. As you can see from the changelog, I've fixed a font bug in the terminal emulator and eliminated some of the very few remaining to-do items for it. Input-activated log services, as started by svscan (a.k.a. service-dt-scanner), are now gone. There's a minor story behind this. Monitoring real systems with nagios militated against it. The nagios check would report many of the log services as down, because of course the logged services hadn't done anything worth logging and hadn't activated the loggers. For my use, good nagios checks were more important than the input activation, which was only ever an experiment in any case. So now svscan no longer uses it. On that score, there is also a small improvement in the nagios checking tool, which allows one to specify the minimum time that a service has to be in the running state before it will be considered OK, nagios-wise. Similarly, there's now a command to tell service-manager to unload a service when it next enters the stopped state. The service manager will disconnect itself from the control FIFOs and the supervise/ directory, and forget all about the service. This allows a service bundle to be cleanly removed from the system in its entirety. I've added a command to convert /etc/fstab into mount and fsck services. More is planned here, including integration with the rc.conf and ttys conversion utilities under an umbrella of some sort, details yet to be decided. The packaging changes are a big deal in the Linux world, but they aren't really relevant in the BSD world. This just leaves a whole load of new service bundles, which are a message all to themselves. From owner-freebsd-hackers@FreeBSD.ORG Sat May 9 21:40:52 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 975A6397 for ; Sat, 9 May 2015 21:40:52 +0000 (UTC) Received: from know-smtprelay-omc-7.server.virginmedia.net (know-smtprelay-omc-7.server.virginmedia.net [80.0.253.71]) by mx1.freebsd.org (Postfix) with ESMTP id 162391663 for ; Sat, 9 May 2015 21:40:51 +0000 (UTC) Received: from [192.168.1.100] ([86.20.122.200]) by know-smtprelay-7-imp with bizsmtp id Rxgq1q00W4KXVwe01xgqnm; Sat, 09 May 2015 22:40:50 +0100 X-Originating-IP: [86.20.122.200] X-Spam: 0 X-Authority: v=2.1 cv=cpwVkjIi c=1 sm=1 tr=0 a=WByauD8lJrWvBFCNrxRoEQ==:117 a=WByauD8lJrWvBFCNrxRoEQ==:17 a=LdKPt8bmWjYA:10 a=N659UExz7-8A:10 a=NLZqzBF-AAAA:8 a=X9xWFtYdSSi8yipKu9IA:9 a=pILNOxqGKmIA:10 a=XdyKOaxJwVsA:10 Message-ID: <554E7EB6.3000200@NTLWorld.com> Date: Sat, 09 May 2015 22:40:06 +0100 From: Jonathan de Boyne Pollard User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: FreeBSD Hackers Subject: Re: nosh version 1.14 References: <54430B41.3010301@NTLWorld.com> <54B86FD5.3090203@NTLWorld.com> <554E53EF.4080600@NTLWorld.com> <554E5EEA.7020901@NTLWorld.com> In-Reply-To: <554E5EEA.7020901@NTLWorld.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 May 2015 21:40:52 -0000 nosh is now up to version 1.14 * http://homepage.ntlworld.com./jonathan.deboynepollard/Softwares/nosh.html The largest part of the recent changes is a list of new service bundles, most of which are cross-platform, but a few of which are BSD-specific. The bundles list now comes to some 230 services, not counting logging services. The list ranges from vixiecron to OpenStack Swift, passing through such things as RabbitMQ, CUPS, and MongoDB along the way. As I said, I have been running FreeBSD with the nosh system and service management for some time. And the service bundles, that I already have, have for some time been enough to fully bootstrap and run my machine. But I haven't yet finished that list of 157 rc.d scripts that I mentioned back in the announcement of nosh version 1.9. There are just over 80 left: abi, adjkerntz, archdep, atm1, atm2, atm3, bluetooth, bridge, cleanvar, cleartmp, ddb, defaultroute, devfs, dhclient, dumpon, faith, gbde, geli, geli2, gptboot, initrandom, ip6addrctl, ipfilter, ipfs, ipfw, ipmon, ipnat, ipsec, jail, kld, kldxref, local, local_unbound, localpkg, mdconfig, mdconfig2, motd, mountcritlocal, mountcritremote, mountd, natd, netif, netoptions, netwait, nfsclient, nfsd, nsswitch, ntpdate, pflog, pfsync, postrandom, power_profile, ppp, random, rctl, resolv, rfcomm_pppd_server, root, routing, rtadvd, savecore, sendmail, serial, sppp, static_arp, static_ndp, stf, syscons, tmp, ubthidhci, ugidfw, var, virecover, zvol, fusefs, gdm, hald, netatalk, ossec-hids, pcbsdinit, pefs, wardenrc, webcamd These fall into seven main categories: * Things which I don't have in use anywhere and so have difficulty in testing: ZFS, pf, faith, ATM, AppleTalk, and GELI. * I haven't encountered a machine with diskless bootstrap since 1990. So things like root, var, and tmp are fairly tricky to test, too. * Things which have astoundingly complex ways for saying enable="YES" flags="wibble". These are going to need some heavyweight conversion procedures. * Things which never really belonged in /etc/rc.d as part of a start-stop model at all. power_profile and serial are prime examples. * Things which probably should be done a different way, such as pcbsdinit, cleartmp, and cleanvar. * Things which definitely should be done a different way under nosh service management, such as mountcritlocal, kld, abi, ibcs2, and syscons. * Things which even the BSD world is saying goodbye to, such as sendmail (now gone entirely from OpenBSD and DragonFly BSD). From owner-freebsd-hackers@FreeBSD.ORG Sat May 9 23:04:02 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90963895 for ; Sat, 9 May 2015 23:04:02 +0000 (UTC) Received: from mail-qg0-x22b.google.com (mail-qg0-x22b.google.com [IPv6:2607:f8b0:400d:c04::22b]) (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 4815B1ECC for ; Sat, 9 May 2015 23:04:02 +0000 (UTC) Received: by qgej70 with SMTP id j70so52440308qge.2 for ; Sat, 09 May 2015 16:04:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type; bh=Zxl8p/IzhkcV1QC/JnrjlM+QO4SZkW4ZD3xgb4LZXtM=; b=UVtnCKeW9Ng23FP07D9FbgVS/1aU8DQ8NTb4VCbKRLBO9NKLt+mGepk2yz4VqrxIyH e8OgPGKd+WpjQ4+ohuCNY152RBXKyGbAtl5QUakjtLm+25Mjts6q/xVRJQe54dhBpawc /IKkTuf5qSAjS3M5S18+8X+x5vH89QSECr0IzE4r8B8M3CxhnzzczQnaZcKvwtzGvRmj aNxIvYY3yaRAnm32elErFXF2plfDlcuzSD7ziTS8fbyW19kVYDYVaDLg052ogU8hdN+G mJjmzzZjBbR9Zee9PbLz+buld6r33nO8ZR2t9L4kVnOLdrI9vl7RBTkSOBg+KuDi09v6 ewEQ== X-Received: by 10.55.56.8 with SMTP id f8mr8933142qka.97.1431212640918; Sat, 09 May 2015 16:04:00 -0700 (PDT) Received: from kan ([2601:6:6780:7e0:226:18ff:fe00:232e]) by mx.google.com with ESMTPSA id i137sm6697407qhc.49.2015.05.09.16.03.59 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 May 2015 16:03:59 -0700 (PDT) Date: Sat, 9 May 2015 19:03:47 -0400 From: Alexander Kabaev To: Sean Bruno Cc: freebsd-hackers@freebsd.org Subject: Re: How to get anything useful out of kgdb? Message-ID: <20150509190347.10e1e2c2@kan> In-Reply-To: <554E5263.8010205@ignoranthack.me> References: <554E41EE.2010202@ignoranthack.me> <554E4BD1.1030802@ignoranthack.me> <406EAA27-D825-408B-985E-DC3FFE746473@frob.org> <554E5263.8010205@ignoranthack.me> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/HoDQHSc/C35Ivq6dbtjpCCj"; protocol="application/pgp-signature" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 May 2015 23:04:02 -0000 --Sig_/HoDQHSc/C35Ivq6dbtjpCCj Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable On Sat, 09 May 2015 11:30:59 -0700 Sean Bruno wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 >=20 > On 05/09/15 11:09, Jeff Meegan wrote: > > You could try -O0, but also if you just care about txr, go up to > > frame 12 where txr initialized to the context arg to em_handle_tx() > > and print it out there. > >=20 > > -j >=20 > I'm guessing that the place to change -O2 -> -O0 is in kern.pre.mk ? >=20 > sean No, it means you need to iescover DEBUG and how it affects optimization level :) .if defined(DEBUG) _MINUS_O=3D -O CTFFLAGS+=3D -g .else ... Say, I have 'makeoptions DEBUG=3D"-g -gdwarf-2"' in my kernel config file. -gdwarf-2 is probably not required anymore. -- Alexander Kabaev --Sig_/HoDQHSc/C35Ivq6dbtjpCCj Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlVOklQACgkQQ6z1jMm+XZawEQCfdtOyX2ZDFNaeCuRs2ny8SgCi q30AoIKRovuIr1jaoo4zSs+f2PF1ss+e =PmPR -----END PGP SIGNATURE----- --Sig_/HoDQHSc/C35Ivq6dbtjpCCj--