From owner-freebsd-hackers@freebsd.org Sun Apr 10 17:02:51 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D5A5B0AE65 for ; Sun, 10 Apr 2016 17:02:51 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5A23E1960 for ; Sun, 10 Apr 2016 17:02:51 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (ppp121-45-253-185.lns20.per4.internode.on.net [121.45.253.185]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id u3AGfY1A073281 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 10 Apr 2016 09:41:38 -0700 (PDT) (envelope-from julian@freebsd.org) Subject: Re: SIG_WINCH ... getting out of our current state of disarray. To: Zaphod Beeblebrox , FreeBSD Hackers References: From: Julian Elischer Message-ID: <570A8239.4070603@freebsd.org> Date: Mon, 11 Apr 2016 00:41:29 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 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.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Apr 2016 17:02:51 -0000 On 4/04/2016 10:21 AM, Zaphod Beeblebrox wrote: > So... here's the scenario... I'm running vi in screen on a server. I > resize my window. > > Now... screen seems to deliver the resize SIG_WINCH fine to the process... > but it seems BSD (and I don't use enough linux to have checked) only > delivers SIG_WINCH to the foreground process. > > Is it _bad_? to deliver SIG_WINCH to other terminal group processes? > Surely a shell knows that it started a process and should wait, but > something CTRL-Z'd or &'d might be a special case... dunno. > > Anyways... it seems that this would be something good to have happen. As > it is... i find myself resizing a window multiple times to the same size > just to get SIG_WINCH delivered to the now running application. > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > I've never worked this out.. I often end up doign ^Z and then stty to set he size, and then fg. having screen or tmux in ht emix makes it even worse.. From owner-freebsd-hackers@freebsd.org Sun Apr 10 20:25:43 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 653BBB0ADB0 for ; Sun, 10 Apr 2016 20:25:43 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: from puchar.net (puchar.net [84.10.41.61]) (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 D2EA118ED for ; Sun, 10 Apr 2016 20:25:42 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: Received: from 127.0.0.1 (localhost [127.0.0.1]) by puchar.net (8.15.2/8.14.9) with ESMTPS id u3AKPdFa030305 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 10 Apr 2016 22:25:40 +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 u3AKPevd043802; Sun, 10 Apr 2016 22:25:40 +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 u3AKPZsX043799; Sun, 10 Apr 2016 22:25:35 +0200 (CEST) (envelope-from wojtek@puchar.net) X-Authentication-Warning: laptop.wojtek.intra: wojtek owned process doing -bs Date: Sun, 10 Apr 2016 22:25:35 +0200 (CEST) From: Wojciech Puchar X-X-Sender: wojtek@laptop.wojtek.intra To: krad cc: freebsd-hackers@freebsd.org Subject: Re: IPSEC tunnels In-Reply-To: Message-ID: References: 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]); Sun, 10 Apr 2016 22:25:40 +0200 (CEST) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Apr 2016 20:25:43 -0000 > dealing with layer 3 so you cant use normal port forwarding for the tunnel > traffic. The key exchange is less problematic. It was a bit of a head ache, > and if you can avoid the NAT you will be far better off. If i can avoid NAT i would use available FreeBSD IPSEC tunnel guides :) From owner-freebsd-hackers@freebsd.org Mon Apr 11 08:51:18 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFB67B0343A for ; Mon, 11 Apr 2016 08:51:18 +0000 (UTC) (envelope-from crest@rlwinm.de) Received: from smtp.rlwinm.de (smtp.rlwinm.de [IPv6:2a01:4f8:201:31ef::e]) (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 7AE0111A6 for ; Mon, 11 Apr 2016 08:51:18 +0000 (UTC) (envelope-from crest@rlwinm.de) Received: from crest.local (unknown [87.253.189.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.rlwinm.de (Postfix) with ESMTPSA id 5E51713C47; Mon, 11 Apr 2016 10:51:07 +0200 (CEST) Subject: Re: AIO in 10.0-RELEASE To: Rick Miller , freebsd-hackers@freebsd.org References: From: Jan Bramkamp Message-ID: <570B657A.7040407@rlwinm.de> Date: Mon, 11 Apr 2016 10:51:06 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 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.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 08:51:18 -0000 On 07/04/16 19:45, Rick Miller wrote: > Please reply directly as I am not currently subscribed to this particular > mailing list... > > A user has been implementing AIO features in an application on FreeBSD > 10.0-RELEASE. They assert that, despite aio(4) stating that it is enabled > either statically (with VFS_AIO in the kernel config) or dynamically > (kldload), in their development environment there was no requirement for > either of these methods of enabling AIO. My google-foo is failing me when > it comes to FreeBSD's AIO. > > This question defies logic, but is it possible that AIO works by default in > earlier versions of 10.0 and not in more recent version of 10.0 without any > local system changes? > > It is understood that AIO has recently been enabled by default in FreeBSD > 10.3 and -CURRENT. This particular scenario is applicable to 10.0. > IIRC FreeBSD 10.0 - 10.2 don't include AIO support in their GENERIC kernel configurations and you have to either load ther aio.ko kernel module or configure, build and install a kernel with static AIO support to use AIO on FreeBSD 10.0 - 10.2. Run `kldstat -v | grep aio` to check if your running kernel (+ modules) includes AIO support. From owner-freebsd-hackers@freebsd.org Mon Apr 11 09:02:53 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99B05B03D06 for ; Mon, 11 Apr 2016 09:02:53 +0000 (UTC) (envelope-from crest@rlwinm.de) Received: from smtp.rlwinm.de (smtp.rlwinm.de [IPv6:2a01:4f8:201:31ef::e]) (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 62F311A6B for ; Mon, 11 Apr 2016 09:02:53 +0000 (UTC) (envelope-from crest@rlwinm.de) Received: from crest.local (unknown [87.253.189.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.rlwinm.de (Postfix) with ESMTPSA id 7F44213C4D for ; Mon, 11 Apr 2016 11:02:51 +0200 (CEST) Subject: Re: IPSEC tunnels To: freebsd-hackers@freebsd.org References: From: Jan Bramkamp Message-ID: <570B683B.30409@rlwinm.de> Date: Mon, 11 Apr 2016 11:02:51 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 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.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 09:02:53 -0000 On 10/04/16 22:25, Wojciech Puchar wrote: >> dealing with layer 3 so you cant use normal port forwarding for the >> tunnel >> traffic. The key exchange is less problematic. It was a bit of a head >> ache, >> and if you can avoid the NAT you will be far better off. > > If i can avoid NAT i would use available FreeBSD IPSEC tunnel guides :) A lot of the documentation floating around on FreeBSD and IPsec is rather dated and uses racoon for IKEv1 over IPv4 in *tunneling* mode to implement a site to site VPN. I recommend that you take a look at strongSwan instead of racoon and use it to configure IKEv2 over IPv6 (or IPv4) in *transport* mode to protect a GRE tunnel. From the IPsec viewpoint the GRE tunnel is just a payload in transport mode. From the viewpoint of the rest of FreeBSD IP stack it is a routeable network (pseudo-)interface. In this setup you can treat your IPsec protected tunnels like any other tunnel interface and use a dynamic routing protocol to keep your sites connected in the face of failing tunnels. IPsec with IKEv2 can work through a NAT by encapsulating the ESP packets in UDP but it's easier if at least on site has a public static IP address. Which interior gateway protocol (IGP) are you using? From owner-freebsd-hackers@freebsd.org Tue Apr 12 15:18:55 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C9D3B0D81D for ; Tue, 12 Apr 2016 15:18:55 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (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 5DDD518EC for ; Tue, 12 Apr 2016 15:18:55 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id E7D7E2090D for ; Tue, 12 Apr 2016 11:18:53 -0400 (EDT) Received: from web4 ([10.202.2.214]) by compute4.internal (MEProxy); Tue, 12 Apr 2016 11:18:53 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=VBM0B11OAUOowYw ZZO3xxWaRPFY=; b=eDcAn+zu0nxJRHTOTYY72VOzwpfoQHckaa0IGELTBC/7UBz xz56/IH8YFARdKJ/jwWvFQmGfybHeZfcaVeor4+OZbTpUFeToJsqQlLeHkjS6UqE ex5CIxM/eI9Eh+SCKeA1p5jFq1XdCAMTPmmZ2nNXM1BA+hKmSx1c/+gS7N44= Received: by web4.nyi.internal (Postfix, from userid 99) id BC351117AD8; Tue, 12 Apr 2016 11:18:53 -0400 (EDT) Message-Id: <1460474333.2639392.576501705.398758F2@webmail.messagingengine.com> X-Sasl-Enc: lW6jy11MxigGcsT2vBjmB2XCYHxOjYX5NAKnUjSCigTn 1460474333 From: Mark Felder To: Jan Bramkamp , freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-5c9f6ad9 Subject: Re: IPSEC tunnels Date: Tue, 12 Apr 2016 10:18:53 -0500 In-Reply-To: <570B683B.30409@rlwinm.de> References: <570B683B.30409@rlwinm.de> X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Apr 2016 15:18:55 -0000 On Mon, Apr 11, 2016, at 04:02, Jan Bramkamp wrote: > On 10/04/16 22:25, Wojciech Puchar wrote: > >> dealing with layer 3 so you cant use normal port forwarding for the > >> tunnel > >> traffic. The key exchange is less problematic. It was a bit of a head > >> ache, > >> and if you can avoid the NAT you will be far better off. > > > > If i can avoid NAT i would use available FreeBSD IPSEC tunnel guides :) > > A lot of the documentation floating around on FreeBSD and IPsec is > rather dated and uses racoon for IKEv1 over IPv4 in *tunneling* mode to > implement a site to site VPN. > > I recommend that you take a look at strongSwan instead of racoon and use > it to configure IKEv2 over IPv6 (or IPv4) in *transport* mode to protect > a GRE tunnel. From the IPsec viewpoint the GRE tunnel is just a payload > in transport mode. From the viewpoint of the rest of FreeBSD IP stack it > is a routeable network (pseudo-)interface. In this setup you can treat > your IPsec protected tunnels like any other tunnel interface and use a > dynamic routing protocol to keep your sites connected in the face of > failing tunnels. IPsec with IKEv2 can work through a NAT by > encapsulating the ESP packets in UDP but it's easier if at least on site > has a public static IP address. > > Which interior gateway protocol (IGP) are you using? > Using GRE and proper tunnel interfaces is the sane way of doing IPSEC. Unfortunately I've never been able to figure out how to trick pfsense into doing this so my VPN to my friend's network is the raccoon flavor where it's just *magic* and doesn't show up in the routing tables (and works!) but is inaccessible from my LAN unless I manually add routes to itself(!). -- Mark Felder ports-secteam member feld@FreeBSD.org From owner-freebsd-hackers@freebsd.org Wed Apr 13 00:24:48 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79166B0DBF2 for ; Wed, 13 Apr 2016 00:24:48 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ipmail04.adl6.internode.on.net (ipmail04.adl6.internode.on.net [150.101.137.141]) by mx1.freebsd.org (Postfix) with ESMTP id 199E51D0E for ; Wed, 13 Apr 2016 00:24:47 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ppp14-2-34-252.lns21.adl2.internode.on.net (HELO midget.dons.net.au) ([14.2.34.252]) by ipmail04.adl6.internode.on.net with ESMTP; 13 Apr 2016 09:49:05 +0930 Received: from [10.0.2.26] ([10.0.2.26]) (authenticated bits=0) by midget.dons.net.au (8.15.1/8.14.9) with ESMTPSA id u3D0Iw5U015861 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 13 Apr 2016 09:49:03 +0930 (CST) (envelope-from darius@dons.net.au) From: "O'Connor, Daniel" Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Wed, 13 Apr 2016 09:48:57 +0930 Subject: Improving commit logs To: FreeBSD Hackers Message-Id: <56FF6534-276E-4E52-871F-5567BD9D6EC7@dons.net.au> Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) X-Mailer: Apple Mail (2.3124) X-Spam-Score: -2.9 () ALL_TRUSTED,BAYES_00 X-Scanned-By: MIMEDefang 2.75 on 10.0.2.1 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2016 00:24:48 -0000 Hi everyone, Some people on IRC were commenting about how commit logs without a 'why' = in them are much less useful (both to others and yourself in the future) = and how this can be improved in the FreeBSD project. Ed Maste pointed out that there is no real guidance about content of the = commit log in the docs = (https://www.freebsd.org/doc/en/articles/committers-guide/commit-log-messa= ge.html) except for the mechanical (PR, Reviewed By, etc). I propose changing the top part of it to.. =3D=3D=3D=3D=3D SNIP =3D=3D=3D=3D=3D This section contains some suggestions and traditions for how commit = logs are formatted and what they should contain. A commit log should explain *why* a commit has taken place, and to a = lesser degree *how* and *what* was changed. The why of a commit message is absolutely critical to allow other people = (including your future self) to understand the reason a change was made. The how and what can be skipped if they are obvious (it's left as an = exercise to the reader to determine what obvious is). Generally speaking *what* is obvious due to the diff itself, the *how* = can provide context and is more likely to be useful. Due to the use of git and use of svn blame it is highly desirable to = have a 1 line summary of the commit, however don't let that constrain = you, a summary plus more detailed explanation is fine if necessary. As well as including an informative message with each commit you may = need to include some additional information. =3D=3D=3D=3D=3D SNIP =3D=3D=3D=3D=3D Does anyone have any (constructive) comments or feedback? Thanks. -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C From owner-freebsd-hackers@freebsd.org Wed Apr 13 16:56:49 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4027FB0F118 for ; Wed, 13 Apr 2016 16:56:49 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [199.48.133.146]) by mx1.freebsd.org (Postfix) with ESMTP id 2AF9F104A for ; Wed, 13 Apr 2016 16:56:48 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from ford.home.vangyzen.net (unknown [76.164.15.242]) by smtp.vangyzen.net (Postfix) with ESMTPSA id 73E5256499; Wed, 13 Apr 2016 11:56:42 -0500 (CDT) Subject: Re: Improving commit logs To: "O'Connor, Daniel" , FreeBSD Hackers References: <56FF6534-276E-4E52-871F-5567BD9D6EC7@dons.net.au> From: Eric van Gyzen Message-ID: <570E7A46.4040401@FreeBSD.org> Date: Wed, 13 Apr 2016 11:56:38 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <56FF6534-276E-4E52-871F-5567BD9D6EC7@dons.net.au> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2016 16:56:49 -0000 On 04/12/16 07:18 PM, O'Connor, Daniel wrote: > Hi everyone, > Some people on IRC were commenting about how commit logs without a 'why' in them are much less useful (both to others and yourself in the future) and how this can be improved in the FreeBSD project. I agree emphatically and appreciate your effort. > Ed Maste pointed out that there is no real guidance about content of the commit log in the docs (https://www.freebsd.org/doc/en/articles/committers-guide/commit-log-message.html) except for the mechanical (PR, Reviewed By, etc). > > I propose changing the top part of it to.. > > ===== SNIP ===== > This section contains some suggestions and traditions for how commit logs are formatted and what they should contain. > > A commit log should explain *why* a commit has taken place, and to a lesser degree *how* and *what* was changed. > > The why of a commit message is absolutely critical to allow other people (including your future self) to understand > the reason a change was made. The same can be said about comments in the code. You might encourage people to answer "why" in comments wherever they think it might be helpful. > The how and what can be skipped if they are obvious (it's left as an exercise to the reader to determine what obvious is). > Generally speaking *what* is obvious due to the diff itself, the *how* can provide context and is more likely to be useful. When deciding what is "obvious", keep this in mind: When you have been neck-deep in this code for several days or weeks, think back to your level of understanding when you started working on these changes, and make your decision based on that understanding, since that is closer to the level of your audience. > Due to the use of git and use of svn blame it is highly desirable to have a 1 line summary of the commit, however don't let that constrain you, a summary plus more detailed explanation is fine if necessary. This wording encourages the whole commit log to be one line as often as possible. A one-line summary is a very good thing and is probably enough for most small, simple changes. However, for changes that are even moderately large or complex, I consider the one-liner a summary of the rest of the commit log, not of the whole code change. I would prefer to encourage longer commit logs, even to the point of making them too long. I would rather sift through paragraphs of stream-of-consciousness than try to reverse engineer the author's mind from a single phrase. It is said that perfection is the enemy of the sufficient. Although this is usually said about code, it applies here, too. Perhaps you could encourage people to write as much as they think is relevant, regardless of their English skills or other impediments. > As well as including an informative message with each commit you may need to include some additional information. > ===== SNIP ===== > > Does anyone have any (constructive) comments or feedback? Thanks for your time and effort on this. Eric From owner-freebsd-hackers@freebsd.org Thu Apr 14 01:56:56 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC73AB0FE59 for ; Thu, 14 Apr 2016 01:56:56 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from hydra.pix.net (hydra.pix.net [IPv6:2001:470:e254::4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.pix.net", Issuer "Pix.Com Technologies, LLC CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BCB591D04; Thu, 14 Apr 2016 01:56:56 +0000 (UTC) (envelope-from lidl@FreeBSD.org) Received: from dhcp136.pix.net ([IPv6:2001:470:e254:11:3e15:c2ff:fedc:3606]) (authenticated bits=0) by hydra.pix.net (8.15.2/8.15.2) with ESMTPSA id u3E1umCw080555 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 13 Apr 2016 21:56:55 -0400 (EDT) (envelope-from lidl@FreeBSD.org) X-Authentication-Warning: hydra.pix.net: Host [IPv6:2001:470:e254:11:3e15:c2ff:fedc:3606] claimed to be dhcp136.pix.net To: freebsd-hackers@freebsd.org Reply-To: lidl@FreeBSD.org From: Kurt Lidl Subject: Importing NetBSD's blacklist project into FreeBSD Message-ID: <570EF8DF.3020408@FreeBSD.org> Date: Wed, 13 Apr 2016 21:56:47 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 01:56:57 -0000 Greetings all - This is just a quick note to alert the FreeBSD development community that I've posted a review for the import of the NetBSD "blacklist" project into FreeBSD. The reviews for the basic import and hookup of the blacklist system into the build process are here: https://reviews.freebsd.org/D5912 https://reviews.freebsd.org/D5913 The rational behind the system is given in the first referenced review, which is Christos Zoulas' presentation at vBSDcon 2015. I think the system is a very reasonable framework to allow for real-time notification of attacks, feeding to a single daemon process, which maintains a persistent on-disk database. The daemon can then invoke a helper script to affect packet filtering changes as needed. It's driven from a text configuration file, and it is pretty easy to add support to more programs in the future. Thanks for your interest, and I look forward to any discussion about the merits of the system and the patches to implement it in FreeBSD. Thanks. -Kurt From owner-freebsd-hackers@freebsd.org Thu Apr 14 02:47:09 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8B31B0F212 for ; Thu, 14 Apr 2016 02:47:09 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AD6D31335; Thu, 14 Apr 2016 02:47:09 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.15.2/8.15.2) with ESMTPS id u3E2l7SJ019161 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 13 Apr 2016 20:47:07 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.15.2/8.15.2/Submit) with ESMTP id u3E2l7sK019158; Wed, 13 Apr 2016 20:47:07 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Wed, 13 Apr 2016 20:47:07 -0600 (MDT) From: Warren Block To: Kurt Lidl cc: freebsd-hackers@freebsd.org Subject: Re: Importing NetBSD's blacklist project into FreeBSD In-Reply-To: <570EF8DF.3020408@FreeBSD.org> Message-ID: References: <570EF8DF.3020408@FreeBSD.org> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Wed, 13 Apr 2016 20:47:07 -0600 (MDT) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 02:47:10 -0000 On Wed, 13 Apr 2016, Kurt Lidl wrote: > Greetings all - > > This is just a quick note to alert the FreeBSD development community > that I've posted a review for the import of the NetBSD "blacklist" > project into FreeBSD. > > The reviews for the basic import and hookup of the blacklist system > into the build process are here: > > https://reviews.freebsd.org/D5912 > https://reviews.freebsd.org/D5913 > > The rational behind the system is given in the first referenced > review, which is Christos Zoulas' presentation at vBSDcon 2015. The first review has a link to the video: https://youtu.be/fuuf8G28mjs > I think the system is a very reasonable framework to allow for > real-time notification of attacks, feeding to a single daemon > process, which maintains a persistent on-disk database. The daemon > can then invoke a helper script to affect packet filtering changes > as needed. It's driven from a text configuration file, and it is > pretty easy to add support to more programs in the future. > > Thanks for your interest, and I look forward to any discussion > about the merits of the system and the patches to implement it > in FreeBSD. After seeing that review yesterday and thinking it sounded interesting, I watched the video. After looking at today's maillog, I have gone from just being interested to really wanting it. And a patch for sendmail to use it. Thank you for working on this! From owner-freebsd-hackers@freebsd.org Thu Apr 14 02:48:37 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0F58B0F300 for ; Thu, 14 Apr 2016 02:48:37 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ipmail04.adl6.internode.on.net (ipmail04.adl6.internode.on.net [150.101.137.141]) by mx1.freebsd.org (Postfix) with ESMTP id 5628514AB; Thu, 14 Apr 2016 02:48:36 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ppp14-2-34-252.lns21.adl2.internode.on.net (HELO midget.dons.net.au) ([14.2.34.252]) by ipmail04.adl6.internode.on.net with ESMTP; 14 Apr 2016 12:18:03 +0930 Received: from [10.0.2.26] ([10.0.2.26]) (authenticated bits=0) by midget.dons.net.au (8.15.1/8.14.9) with ESMTPSA id u3E2lsRh003504 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 14 Apr 2016 12:18:00 +0930 (CST) (envelope-from darius@dons.net.au) Subject: Re: Improving commit logs Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=windows-1252 From: "O'Connor, Daniel" In-Reply-To: <570E7A46.4040401@FreeBSD.org> Date: Thu, 14 Apr 2016 12:17:54 +0930 Cc: FreeBSD Hackers Content-Transfer-Encoding: quoted-printable Message-Id: References: <56FF6534-276E-4E52-871F-5567BD9D6EC7@dons.net.au> <570E7A46.4040401@FreeBSD.org> To: Eric van Gyzen X-Mailer: Apple Mail (2.3124) X-Spam-Score: -2.9 () ALL_TRUSTED,BAYES_00 X-Scanned-By: MIMEDefang 2.75 on 10.0.2.1 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 02:48:38 -0000 > On 14 Apr 2016, at 02:26, Eric van Gyzen wrote: > On 04/12/16 07:18 PM, O'Connor, Daniel wrote: >> Some people on IRC were commenting about how commit logs without a = 'why' in them are much less useful (both to others and yourself in the = future) and how this can be improved in the FreeBSD project. > I agree emphatically and appreciate your effort. Great :) >> The why of a commit message is absolutely critical to allow other = people (including your future self) to understand >> the reason a change was made. >=20 > The same can be said about comments in the code. You might encourage = people to > answer "why" in comments wherever they think it might be helpful. I agree, but this suggestion is only for the commit logs - I'm picking = my battles :) >> The how and what can be skipped if they are obvious (it's left as an = exercise to the reader to determine what obvious is). >> Generally speaking *what* is obvious due to the diff itself, the = *how* can provide context and is more likely to be useful. >=20 > When deciding what is "obvious", keep this in mind: When you have = been > neck-deep in this code for several days or weeks, think back to your = level of > understanding when you started working on these changes, and make your = decision > based on that understanding, since that is closer to the level of your = audience. I know, but I don't really think there is a set of rules which will = describe it without annoying 80% of the people using it (and different = rules will affect a different 80%...) >> Due to the use of git and use of svn blame it is highly desirable to = have a 1 line summary of the commit, however don't let that constrain = you, a summary plus more detailed explanation is fine if necessary. >=20 > This wording encourages the whole commit log to be one line as often = as > possible. A one-line summary is a very good thing and is probably = enough for > most small, simple changes. However, for changes that are even = moderately large > or complex, I consider the one-liner a summary of the rest of the = commit log, > not of the whole code change. I would prefer to encourage longer = commit logs, > even to the point of making them too long. I would rather sift = through > paragraphs of stream-of-consciousness than try to reverse engineer the = author's > mind from a single phrase. OK, I updated it below. > It is said that perfection is the enemy of the sufficient. Although = this is > usually said about code, it applies here, too. Perhaps you could = encourage > people to write as much as they think is relevant, regardless of their = English > skills or other impediments. Good idea. >> As well as including an informative message with each commit you may = need to include some additional information. >> =3D=3D=3D=3D=3D SNIP =3D=3D=3D=3D=3D >>=20 >> Does anyone have any (constructive) comments or feedback? >=20 > Thanks for your time and effort on this. Thanks for the feedback :) =3D=3D=3D=3D=3D SNIP =3D=3D=3D=3D=3D This section contains some suggestions and traditions for how commit = logs are formatted and what they should contain. A commit log should explain *why* a commit has taken place, and to a = lesser degree *how* and *what* was changed. The why of a commit message is absolutely critical to allow other people = (including your future self) to understand the reason a change was made. The how and what can be skipped if they are obvious - it's left as an = exercise to the reader to determine what obvious is. You should try and = step into the mind set of someone who is familiar with FreeBSD but not = focussed on the particular area you have committed to. What is obvious = now can be obtuse in a few months when you or someone else is reviewing = the code to track down issues. Generally speaking *what* is obvious due to the diff itself, the *how* = can provide context and is more likely to be useful. Due to the use of git and use of svn blame it is highly desirable to = have a 1 line summary of the commit, however do not think this means you = only need a 1 line summary. Write the full log first, then summarise it = if possible. If you aren't sure, err on the side of a longer rather than = shorter commit message. As well as including an informative message with each commit you may = need to include some additional information. =3D=3D=3D=3D=3D SNIP =3D=3D=3D=3D=3D -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C From owner-freebsd-hackers@freebsd.org Thu Apr 14 02:58:56 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6FDCB0F67E for ; Thu, 14 Apr 2016 02:58:56 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-lf0-x230.google.com (mail-lf0-x230.google.com [IPv6:2a00:1450:4010:c07::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 5B0181939 for ; Thu, 14 Apr 2016 02:58:56 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-lf0-x230.google.com with SMTP id j11so93209786lfb.1 for ; Wed, 13 Apr 2016 19:58:56 -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; bh=sqD9TdZyx1RxdOTM6nsfSy1TBx3lv7OiqwRXKP8Td8o=; b=adO908ilIQUhR0dcOHNGm6fLfR/Riw7Am8TBG0Pe3yPitLVLFjjMT2JW9bcb5/Wb0D YBKUVd0CW5ldkTsI5b5ifI+amen1YxtggJUL4Ko9T1yHluCDCNhT7w8KqXscH8LfyNBb YGtdNQwo+1YAqUM8Z7xIu0kC2ZxbEyp5zFUb9zHIfWyykAUWWlAhuMZyOaDw/sPX9UBF ybW0rtBVC2yErD7qdZMjZTOqpdxirdUO3g9numjy0SUonCiuIbx2lhVS50XYCdh0cHho Kovol7CwBuBFweFbRcllzwq8hiNy/Fo7cp68HPDGjByVTw0UBvRdCgiGVqxyKWgYciXp U80A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=sqD9TdZyx1RxdOTM6nsfSy1TBx3lv7OiqwRXKP8Td8o=; b=PMOhYYdSDpc76M21s2o6fSyhJcr82+QsOF1EAN+rBua4L81e1sZpb+paCNRMeJlhkZ PU4UKMSv2GdHgHZaxxJESa3oHr9ThUCQVdMTFyGlAzRUpcCSLFzu7opjDl/c8wL6Zu2v vpinifbb50hYNn5+36a7HebWuC9OkOKjOW/lHviWEIeYrNbHwYcaBGm67idRXWjdMVw5 dBwCZyAvPWl1oHNPGU8WfagRpTbNYH5yRD0cGa+PiIyZEfZuIjL5RoQMYUjgRpMwyQAF et4OGKvgtPeOkiruyvZFE+nNghvZK1oNv1KoqJlikaGFYxZJicmmfk6YqIwH4KXi8paQ wJIA== X-Gm-Message-State: AOPr4FXUpG6iGrhYFfz/GNBakDJKqDF2janwqlyEaTCX3PSkZIWLLWvFNOpOGMA3Q867mHVupWxKM3BXDDQPzg== MIME-Version: 1.0 X-Received: by 10.112.52.196 with SMTP id v4mr4780595lbo.59.1460602734205; Wed, 13 Apr 2016 19:58:54 -0700 (PDT) Received: by 10.112.236.33 with HTTP; Wed, 13 Apr 2016 19:58:54 -0700 (PDT) In-Reply-To: <56FF6534-276E-4E52-871F-5567BD9D6EC7@dons.net.au> References: <56FF6534-276E-4E52-871F-5567BD9D6EC7@dons.net.au> Date: Wed, 13 Apr 2016 19:58:54 -0700 Message-ID: Subject: Re: Improving commit logs From: Ngie Cooper To: "O'Connor, Daniel" Cc: FreeBSD Hackers Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 02:58:56 -0000 On Tue, Apr 12, 2016 at 5:18 PM, O'Connor, Daniel wrote: > Hi everyone, > Some people on IRC were commenting about how commit logs without a 'why' in them are much less useful (both to others and yourself in the future) and how this can be improved in the FreeBSD project. > > Ed Maste pointed out that there is no real guidance about content of the commit log in the docs (https://www.freebsd.org/doc/en/articles/committers-guide/commit-log-message.html) except for the mechanical (PR, Reviewed By, etc). > > I propose changing the top part of it to.. > > ===== SNIP ===== > This section contains some suggestions and traditions for how commit logs are formatted and what they should contain. > > A commit log should explain *why* a commit has taken place, and to a lesser degree *how* and *what* was changed. > > The why of a commit message is absolutely critical to allow other people (including your future self) to understand > the reason a change was made. > > The how and what can be skipped if they are obvious (it's left as an exercise to the reader to determine what obvious is). > Generally speaking *what* is obvious due to the diff itself, the *how* can provide context and is more likely to be useful. > > Due to the use of git and use of svn blame it is highly desirable to have a 1 line summary of the commit, however don't let that constrain you, a summary plus more detailed explanation is fine if necessary. > > As well as including an informative message with each commit you may need to include some additional information. > ===== SNIP ===== > > Does anyone have any (constructive) comments or feedback? Isn't this just an extension of what others have written up before? Googling "writing good commit messages yielded: 1. http://chris.beams.io/posts/git-commit/ 2. https://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message This is what I generally try to follow with commits... Thanks! -Ngie From owner-freebsd-hackers@freebsd.org Thu Apr 14 03:20:17 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E484B0E032 for ; Thu, 14 Apr 2016 03:20:17 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ipmail04.adl6.internode.on.net (ipmail04.adl6.internode.on.net [150.101.137.141]) by mx1.freebsd.org (Postfix) with ESMTP id AEBE71777 for ; Thu, 14 Apr 2016 03:20:15 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ppp14-2-34-252.lns21.adl2.internode.on.net (HELO midget.dons.net.au) ([14.2.34.252]) by ipmail04.adl6.internode.on.net with ESMTP; 14 Apr 2016 12:50:14 +0930 Received: from [10.0.2.26] ([10.0.2.26]) (authenticated bits=0) by midget.dons.net.au (8.15.1/8.14.9) with ESMTPSA id u3E3K7iO025083 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 14 Apr 2016 12:50:12 +0930 (CST) (envelope-from darius@dons.net.au) Subject: Re: Improving commit logs Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=us-ascii From: "O'Connor, Daniel" In-Reply-To: Date: Thu, 14 Apr 2016 12:50:07 +0930 Cc: FreeBSD Hackers Content-Transfer-Encoding: quoted-printable Message-Id: References: <56FF6534-276E-4E52-871F-5567BD9D6EC7@dons.net.au> To: Ngie Cooper X-Mailer: Apple Mail (2.3124) X-Spam-Score: -2.899 () ALL_TRUSTED,BAYES_00,URIBL_BLOCKED X-Scanned-By: MIMEDefang 2.75 on 10.0.2.1 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 03:20:17 -0000 > On 14 Apr 2016, at 12:28, Ngie Cooper wrote: >> Does anyone have any (constructive) comments or feedback? >=20 > Isn't this just an extension of what others have written up before? > Googling "writing good commit messages yielded: >=20 > 1. http://chris.beams.io/posts/git-commit/ > 2. = https://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message >=20 > This is what I generally try to follow with commits... Sure, but I think it carries more weight if you can point to a specific = FreeBSD document and say "do it like this". -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C From owner-freebsd-hackers@freebsd.org Thu Apr 14 03:28:04 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 263E7B0E4B4 for ; Thu, 14 Apr 2016 03:28:04 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 14EDA1E0C; Thu, 14 Apr 2016 03:28:04 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by freefall.freebsd.org (Postfix) with ESMTP id BCD0E14CD; Thu, 14 Apr 2016 03:28:03 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Date: Thu, 14 Apr 2016 03:28:01 +0000 From: Glen Barber To: "O'Connor, Daniel" Cc: Ngie Cooper , FreeBSD Hackers Subject: Re: Improving commit logs Message-ID: <20160414032801.GP18163@FreeBSD.org> References: <56FF6534-276E-4E52-871F-5567BD9D6EC7@dons.net.au> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="y6PvmTFIYclVmRST" Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event X-PEKBAC-Definition: Problem Exists, Keyboard Between Admin/Computer User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 03:28:04 -0000 --y6PvmTFIYclVmRST Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 14, 2016 at 12:50:07PM +0930, O'Connor, Daniel wrote: >=20 > > On 14 Apr 2016, at 12:28, Ngie Cooper wrote: > >> Does anyone have any (constructive) comments or feedback? > >=20 > > Isn't this just an extension of what others have written up before? > > Googling "writing good commit messages yielded: > >=20 > > 1. http://chris.beams.io/posts/git-commit/ > > 2. https://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-mess= age > >=20 > > This is what I generally try to follow with commits... >=20 > Sure, but I think it carries more weight if you can point to a > specific FreeBSD document and say "do it like this". >=20 As one of the people that has to suffer through delving through commit logs to find the 'gems', I can personally guarantee that documenting "how to write good commit messages" will be less than fruitful. Glen --y6PvmTFIYclVmRST Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXDw5BAAoJEAMUWKVHj+KTGX0P/1Ur2QMaUR1b4VZ3gx/mpIaN MVACtqKetU0tiYF33Kn+3AncOeIQA1IH3sUoWxvM5BZlFGvdEQaDv47Gj5P9HMB6 qKIq3QYshExJ8HkryKwpKqkCASYM1l5DdvbedDT7ISeW8hTAYjOaMWnwvl6IUBKI vpfvbX0bqgoHxYXMtuWoQtxtZWXdyVIAOVVUlMM9dpxz12CQ9vaHJsEFFRmRD591 9/IvwKhs7h2nxrsCFLIKYut7sKqsf0GYlE58qk6NYnJafd42SauMP+LnI8oNZkZV fIuRJdSBCoVZIMyJEtIVEdV87kM1c4Q8hfGcSCa+NqQxnzhsi80fSwY49hqb6ryN FD/Y0+H5575FPZ52qU6MJKq9lJa37zuAVhpbbRUF3oWuCy2q0HOMkmKuqRhbpu3P zaYVNC+M11sKy/ABoluOx4oqtI50wRiWFledawsOW6d7/7IkcOm9KT550FFT4rbR WL/+PW9T7znvZDviGc4BdCvc232qdpoSmA8n2kP3ufpJNbX3CcbOOcUUOpTgyy/l rWLCAfHQzjC/SYigN72/LRvT37JocN1LcpocW+JLbL0EIMIhFw7ZsRDL62+jGFne YzYJtlx4gbOK//NitzJarMNWCQL+DTXO8R80X/GUJfHHV9wIcup7YpcSiSMXOU34 oxV1wctffSEZgmz7y+Rt =tkRZ -----END PGP SIGNATURE----- --y6PvmTFIYclVmRST-- From owner-freebsd-hackers@freebsd.org Thu Apr 14 03:31:02 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56D6DB0E752 for ; Thu, 14 Apr 2016 03:31:02 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ipmail04.adl6.internode.on.net (ipmail04.adl6.internode.on.net [150.101.137.141]) by mx1.freebsd.org (Postfix) with ESMTP id AAD7E116F; Thu, 14 Apr 2016 03:31:01 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ppp14-2-34-252.lns21.adl2.internode.on.net (HELO midget.dons.net.au) ([14.2.34.252]) by ipmail04.adl6.internode.on.net with ESMTP; 14 Apr 2016 13:01:00 +0930 Received: from [10.0.2.26] ([10.0.2.26]) (authenticated bits=0) by midget.dons.net.au (8.15.1/8.14.9) with ESMTPSA id u3E3Usch034174 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 14 Apr 2016 13:00:59 +0930 (CST) (envelope-from darius@dons.net.au) Subject: Re: Improving commit logs Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=us-ascii From: "O'Connor, Daniel" In-Reply-To: <20160414032801.GP18163@FreeBSD.org> Date: Thu, 14 Apr 2016 13:01:02 +0930 Cc: Ngie Cooper , FreeBSD Hackers Content-Transfer-Encoding: quoted-printable Message-Id: <1DDB0BFB-545F-4293-9BFB-020DAFD7A5C4@dons.net.au> References: <56FF6534-276E-4E52-871F-5567BD9D6EC7@dons.net.au> <20160414032801.GP18163@FreeBSD.org> To: Glen Barber X-Mailer: Apple Mail (2.3124) X-Spam-Score: -2.9 () ALL_TRUSTED,BAYES_00 X-Scanned-By: MIMEDefang 2.75 on 10.0.2.1 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 03:31:02 -0000 > On 14 Apr 2016, at 12:58, Glen Barber wrote: >> Sure, but I think it carries more weight if you can point to a >> specific FreeBSD document and say "do it like this". > As one of the people that has to suffer through delving through commit > logs to find the 'gems', I can personally guarantee that documenting > "how to write good commit messages" will be less than fruitful. Realistically I don't see this as a magic bullet. IMO the only way to = enforce good commits is socially - i.e. have other committers call = people out on bad commit messages in a *constructive* way. That is to = say, you don't say "your commit message sucks" you say "I think it would = be helpful if the log explained why this change was made". I think having a document like this is useful as something to point to = and a guide for new committers to start from. -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C From owner-freebsd-hackers@freebsd.org Thu Apr 14 03:31:29 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD90AB0E7C2 for ; Thu, 14 Apr 2016 03:31:29 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-lf0-x22d.google.com (mail-lf0-x22d.google.com [IPv6:2a00:1450:4010:c07::22d]) (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 6F38812C5; Thu, 14 Apr 2016 03:31:29 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-lf0-x22d.google.com with SMTP id g184so93864369lfb.3; Wed, 13 Apr 2016 20:31:29 -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; bh=lCGKV4tDB8wsOfAc5dJDfJWgfayiypviiOWuOz/icVQ=; b=H18ArMHArj12CGtH+J574wKrRMKHlt45HYsPfFn08Z3UxYJTLo2Zi2JbqZOQ5b6+yx iHImYLK6FjtTyeTmLIv1eC3a9HfsNAR9KMF/St73EOak27tzaLay6ufABnx+RNCIP+mM +Z+80/E3DTG7XMM4NHxaDJsB2yc4xFvK2nVRilYSlOThcKvUTXTBjy2ryCLDfXLcK708 QYJsedxg4uEd+wm3ytE4TjWHgHkLzYzs3+riM+3zC9SZVoF2dOI6GCI+bC2eavG096BD B5IOcWxOfd2Bn0gcqPfIaZRkjeSi5myRRuI6r5UCAq6HfqgWP6SGgj5f/3lj4eN6hs4n JMUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=lCGKV4tDB8wsOfAc5dJDfJWgfayiypviiOWuOz/icVQ=; b=UDpu7LkQdbbgcxbJfDLG54gTCYphhLCqVJNYS3rg55vk8ppO79sNj4tDdJuQUQDNwO nbnwF4Dmf2LgGoZ7zh+zcfORoc/GJfVnSvwQXQTsFNZWy0pcOHUJ9fK0KP8kCSwJ6EHl uWj1Lw66O++RJKnso3ICs/EdhdU7g9qG9TtD/Wwy2/n5D4icN/7LxGU4BydbLWIY6O5/ /KZuVlVrsHZNeAdTpkmjadd2D6trUWNg60/nWd8RGCalomovhfL4Uifi3L2RKbOjcTmY HI5GS2MKIQvondH9F4sQ8WFBri6XssdnWab3EBjrcKpgHiJhTMu+ubDwkhYwIHbj+Bg/ wELA== X-Gm-Message-State: AOPr4FUx1sZqQWitlHosT9/7Y/5UjMPwGuAD0w8ESNMPZMlxFnbf9B9DGZyrEm0yBI+SEfBENXEDZ4jH0KDvlA== MIME-Version: 1.0 X-Received: by 10.112.52.196 with SMTP id v4mr4819346lbo.59.1460604687440; Wed, 13 Apr 2016 20:31:27 -0700 (PDT) Received: by 10.112.236.33 with HTTP; Wed, 13 Apr 2016 20:31:27 -0700 (PDT) In-Reply-To: <20160414032801.GP18163@FreeBSD.org> References: <56FF6534-276E-4E52-871F-5567BD9D6EC7@dons.net.au> <20160414032801.GP18163@FreeBSD.org> Date: Wed, 13 Apr 2016 20:31:27 -0700 Message-ID: Subject: Re: Improving commit logs From: Ngie Cooper To: Glen Barber Cc: "O'Connor, Daniel" , FreeBSD Hackers Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 03:31:29 -0000 On Wed, Apr 13, 2016 at 8:28 PM, Glen Barber wrote: > On Thu, Apr 14, 2016 at 12:50:07PM +0930, O'Connor, Daniel wrote: >> >> > On 14 Apr 2016, at 12:28, Ngie Cooper wrote: >> >> Does anyone have any (constructive) comments or feedback? >> > >> > Isn't this just an extension of what others have written up before? >> > Googling "writing good commit messages yielded: >> > >> > 1. http://chris.beams.io/posts/git-commit/ >> > 2. https://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message >> > >> > This is what I generally try to follow with commits... >> >> Sure, but I think it carries more weight if you can point to a >> specific FreeBSD document and say "do it like this". >> > > As one of the people that has to suffer through delving through commit > logs to find the 'gems', I can personally guarantee that documenting > "how to write good commit messages" will be less than fruitful. Good point: usefulness is in the eye of the beholder. What's good for me to know might be completely irrelevant for someone else.. I guess this is where it helps to get CRs from people who aren't SMEs in the area that you need feedback with.. -Ngie From owner-freebsd-hackers@freebsd.org Thu Apr 14 03:43:21 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E0D2B0EDD9 for ; Thu, 14 Apr 2016 03:43:21 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 5E4351A24; Thu, 14 Apr 2016 03:43:21 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by freefall.freebsd.org (Postfix) with ESMTP id 143D518B5; Thu, 14 Apr 2016 03:43:21 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Date: Thu, 14 Apr 2016 03:43:20 +0000 From: Glen Barber To: "O'Connor, Daniel" Cc: Ngie Cooper , FreeBSD Hackers Subject: Re: Improving commit logs Message-ID: <20160414034320.GQ18163@FreeBSD.org> References: <56FF6534-276E-4E52-871F-5567BD9D6EC7@dons.net.au> <20160414032801.GP18163@FreeBSD.org> <1DDB0BFB-545F-4293-9BFB-020DAFD7A5C4@dons.net.au> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tk6xM/wkRlnXD2NA" Content-Disposition: inline In-Reply-To: <1DDB0BFB-545F-4293-9BFB-020DAFD7A5C4@dons.net.au> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event X-PEKBAC-Definition: Problem Exists, Keyboard Between Admin/Computer User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 03:43:21 -0000 --tk6xM/wkRlnXD2NA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 14, 2016 at 01:01:02PM +0930, O'Connor, Daniel wrote: >=20 > > On 14 Apr 2016, at 12:58, Glen Barber wrote: > >> Sure, but I think it carries more weight if you can point to a > >> specific FreeBSD document and say "do it like this". > > As one of the people that has to suffer through delving through commit > > logs to find the 'gems', I can personally guarantee that documenting > > "how to write good commit messages" will be less than fruitful. >=20 > Realistically I don't see this as a magic bullet. IMO the only > way to enforce good commits is socially - i.e. have other committers > call people out on bad commit messages in a *constructive* way. > That is to say, you don't say "your commit message sucks" you say > "I think it would be helpful if the log explained why this change > was made". >=20 > I think having a document like this is useful as something to > point to and a guide for new committers to start from. >=20 I absolutely agree with you that a guide on this will be beneficial. Sorry if my reply was taken any other way. If I had a genie in a bottle, my three wishes would be: 1) Better commit messages that address the "what"; 2) Better explanation on the "why"; 3) More wishes. Glen --tk6xM/wkRlnXD2NA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXDxHTAAoJEAMUWKVHj+KTAFcP+wdw0/Ox6/jPl2arPs4cyQ+R Y7sPWeadXrnQE3fQDi4gQHcLppTdXSwrQC6k3Hee/52C4oCNQ3a+0xgZRh3K3+vN Rl//zvHSfNuZ4VgRkICG/Vp1RXF3YlYSM7U1ehGiD27D41o2f6NJZcB28C8moBR5 lNSaPO5dotbAqWzhq5eruGqcFvw7+PWGx6JmWMLG8eqUuhHOCQFCWMOwod3coAtq qVv0NolStbzdZP5GIkt9vH2i211ISedSmHBxN1roq5mdsqGVKBYxAXZpQ3XbfVYF 65iqAQZzrVQUpflpkDS6U11ZAplCJrau0uvB15uL9XKwv3nu1VCT9D9uu7aNtmTy yqtbWZQ8/ubFAfCl1WZ4fiPknUL0kEAXoZUOKlJredJtRMYsbCqGRd0WsDO0NUkK dSjwxBeygEBl6S1d3HgmP+mZMabxTElDybC+7cYHKU6PNCE0Um1wflnegFXxVagh 6Jn313hck4yApmrW+kjSUzpeFQTZaVjmdU92BvLu3ogTPHHwc0KgF5x4BVJejdpT DaFzAAn0zgZ3/D0OR0kLBHt18Kddo9vwP5Zenjx3uSkWevPERpE+YrjNV0WNzDEh THBU/F13Fq9bKF5m/fJfqWLr0fP7rhNi4AGi6BRDi4VVNuuEdE7rPav1x0rbdsuU gQTkNxQevOyURLSoriRK =bD7O -----END PGP SIGNATURE----- --tk6xM/wkRlnXD2NA-- From owner-freebsd-hackers@freebsd.org Thu Apr 14 03:44:54 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E927B0F00E for ; Thu, 14 Apr 2016 03:44:54 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ipmail04.adl6.internode.on.net (ipmail04.adl6.internode.on.net [150.101.137.141]) by mx1.freebsd.org (Postfix) with ESMTP id B361B1BFD; Thu, 14 Apr 2016 03:44:53 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ppp14-2-34-252.lns21.adl2.internode.on.net (HELO midget.dons.net.au) ([14.2.34.252]) by ipmail04.adl6.internode.on.net with ESMTP; 14 Apr 2016 13:14:52 +0930 Received: from [10.0.2.26] ([10.0.2.26]) (authenticated bits=0) by midget.dons.net.au (8.15.1/8.14.9) with ESMTPSA id u3E3ikWp041027 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 14 Apr 2016 13:14:51 +0930 (CST) (envelope-from darius@dons.net.au) Subject: Re: Improving commit logs Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=us-ascii From: "O'Connor, Daniel" In-Reply-To: <20160414034320.GQ18163@FreeBSD.org> Date: Thu, 14 Apr 2016 13:14:46 +0930 Cc: Ngie Cooper , FreeBSD Hackers Content-Transfer-Encoding: quoted-printable Message-Id: <2FD1641C-DF99-4464-BA34-A05430D663C4@dons.net.au> References: <56FF6534-276E-4E52-871F-5567BD9D6EC7@dons.net.au> <20160414032801.GP18163@FreeBSD.org> <1DDB0BFB-545F-4293-9BFB-020DAFD7A5C4@dons.net.au> <20160414034320.GQ18163@FreeBSD.org> To: Glen Barber X-Mailer: Apple Mail (2.3124) X-Spam-Score: -2.9 () ALL_TRUSTED,BAYES_00 X-Scanned-By: MIMEDefang 2.75 on 10.0.2.1 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 03:44:54 -0000 > On 14 Apr 2016, at 13:13, Glen Barber wrote: > I absolutely agree with you that a guide on this will be beneficial. > Sorry if my reply was taken any other way. >=20 > If I had a genie in a bottle, my three wishes would be: >=20 > 1) Better commit messages that address the "what"; > 2) Better explanation on the "why"; Huh interesting, I definitely would pick 2 before 1 but I can see what = you mean for a lot of commits (especially to 30 year old cruft filled = esoterica) > 3) More wishes. You wish for more genies, wishing for more wishes is usually verboten.. = ;) -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C From owner-freebsd-hackers@freebsd.org Thu Apr 14 03:48:07 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4303BB0F1B8 for ; Thu, 14 Apr 2016 03:48:07 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 3292D1E1F; Thu, 14 Apr 2016 03:48:07 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by freefall.freebsd.org (Postfix) with ESMTP id D94731A87; Thu, 14 Apr 2016 03:48:06 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Date: Thu, 14 Apr 2016 03:48:05 +0000 From: Glen Barber To: "O'Connor, Daniel" Cc: Ngie Cooper , FreeBSD Hackers Subject: Re: Improving commit logs Message-ID: <20160414034805.GR18163@FreeBSD.org> References: <56FF6534-276E-4E52-871F-5567BD9D6EC7@dons.net.au> <20160414032801.GP18163@FreeBSD.org> <1DDB0BFB-545F-4293-9BFB-020DAFD7A5C4@dons.net.au> <20160414034320.GQ18163@FreeBSD.org> <2FD1641C-DF99-4464-BA34-A05430D663C4@dons.net.au> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="MRBOAUz+O/XNC2GI" Content-Disposition: inline In-Reply-To: <2FD1641C-DF99-4464-BA34-A05430D663C4@dons.net.au> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event X-PEKBAC-Definition: Problem Exists, Keyboard Between Admin/Computer User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 03:48:07 -0000 --MRBOAUz+O/XNC2GI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 14, 2016 at 01:14:46PM +0930, O'Connor, Daniel wrote: >=20 > > On 14 Apr 2016, at 13:13, Glen Barber wrote: > > I absolutely agree with you that a guide on this will be beneficial. > > Sorry if my reply was taken any other way. > >=20 > > If I had a genie in a bottle, my three wishes would be: > >=20 > > 1) Better commit messages that address the "what"; > > 2) Better explanation on the "why"; >=20 > Huh interesting, I definitely would pick 2 before 1 but I can see > what you mean for a lot of commits (especially to 30 year old cruft > filled esoterica) >=20 When writing release notes, for example, the "what" is generally more useful than the "why." In other words, the end user does not generally care *why* something changed, but they want to know *what* changed. > > 3) More wishes. >=20 > You wish for more genies, wishing for more wishes is usually > verboten.. ;) >=20 I also want a pony. :) Glen --MRBOAUz+O/XNC2GI Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXDxL1AAoJEAMUWKVHj+KT75wP+QHT9pOHmOBlD2RSKILOf6tB 5/duvJ+rVBKp9A85Mqd4hNjYvfPPRtRZi7QeXjQw1E5FDIpIkYjNbJsZkI6QeIG6 LHX7COz4rgCjkWAz3fHahtR+SyGqr3LOzjv6ttumwrxeymjVHkBsEoCILDpyw+Z4 Xnu8n/zWzr7ehgBHgIlW7hcZVTfX2J3yEKJMEDqzqNQgq+rxZOe90Vo1tTeokOWS gugGYMjiAnZh3jywdJg11PV90NBIEE6rUNeZzuiVO/Myi+SMh6URjd393bjbtC+a VFgOPClP6HR7iIu6QdawrR5S2wjGI0K+vHIRADZSr7egKgjlHVlisYabBfiDbcq/ Prw0GIp5pp5FlRg/dKpBr17yM1gJHfc3j1h3Oq6dxWcWkInYbpNFgLFwVEqAB4Z1 6SKuzPKZN/2wYSC367QHpyzeFAaQsf88U3J8dQUB7AWLwUyU9KttXvYUM5RTY6Gy 1ytiJStMT/rwDf92yDOqr3m40E8GP5Pwz83VGeLIGa5lS+3lmZRDjTuP2aRfdzZW MYXvUkPcKlXqpQE9uy7CLHK+a4/7h2Pd28+LdZRzH+z9w3QkZ4V7l7mcKcxOdHMy yEojeLuZBmIQ+6Lu+M3ixWrg5ABaPTk3OaFk5O8+kfM/t3eKNR9kAUKPZrsgbIj2 DEZV/SolLRnRa9Iq0eAO =PlOL -----END PGP SIGNATURE----- --MRBOAUz+O/XNC2GI-- From owner-freebsd-hackers@freebsd.org Thu Apr 14 03:52:41 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 808F6B0F461 for ; Thu, 14 Apr 2016 03:52:41 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ipmail04.adl6.internode.on.net (ipmail04.adl6.internode.on.net [150.101.137.141]) by mx1.freebsd.org (Postfix) with ESMTP id E43D91205; Thu, 14 Apr 2016 03:52:40 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ppp14-2-34-252.lns21.adl2.internode.on.net (HELO midget.dons.net.au) ([14.2.34.252]) by ipmail04.adl6.internode.on.net with ESMTP; 14 Apr 2016 13:22:38 +0930 Received: from [10.0.2.26] ([10.0.2.26]) (authenticated bits=0) by midget.dons.net.au (8.15.1/8.14.9) with ESMTPSA id u3E3qWaA047783 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 14 Apr 2016 13:22:37 +0930 (CST) (envelope-from darius@dons.net.au) Subject: Re: Improving commit logs Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=us-ascii From: "O'Connor, Daniel" In-Reply-To: <20160414034805.GR18163@FreeBSD.org> Date: Thu, 14 Apr 2016 13:22:31 +0930 Cc: Ngie Cooper , FreeBSD Hackers Content-Transfer-Encoding: quoted-printable Message-Id: <9FD838FE-E1DF-487D-82BF-77EEA2C51156@dons.net.au> References: <56FF6534-276E-4E52-871F-5567BD9D6EC7@dons.net.au> <20160414032801.GP18163@FreeBSD.org> <1DDB0BFB-545F-4293-9BFB-020DAFD7A5C4@dons.net.au> <20160414034320.GQ18163@FreeBSD.org> <2FD1641C-DF99-4464-BA34-A05430D663C4@dons.net.au> <20160414034805.GR18163@FreeBSD.org> To: Glen Barber X-Mailer: Apple Mail (2.3124) X-Spam-Score: -2.9 () ALL_TRUSTED,BAYES_00 X-Scanned-By: MIMEDefang 2.75 on 10.0.2.1 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 03:52:41 -0000 > On 14 Apr 2016, at 13:18, Glen Barber wrote: >=20 > On Thu, Apr 14, 2016 at 01:14:46PM +0930, O'Connor, Daniel wrote: >>=20 >>> On 14 Apr 2016, at 13:13, Glen Barber wrote: >>> I absolutely agree with you that a guide on this will be beneficial. >>> Sorry if my reply was taken any other way. >>>=20 >>> If I had a genie in a bottle, my three wishes would be: >>>=20 >>> 1) Better commit messages that address the "what"; >>> 2) Better explanation on the "why"; >>=20 >> Huh interesting, I definitely would pick 2 before 1 but I can see >> what you mean for a lot of commits (especially to 30 year old cruft >> filled esoterica) > When writing release notes, for example, the "what" is generally more > useful than the "why." In other words, the end user does not = generally > care *why* something changed, but they want to know *what* changed. That's a good point, my original version was written more in the mind of = someone who understands the code already but as you (and ngie) point out = there are other consumers of the code. =3D=3D=3D=3D=3D SNIP =3D=3D=3D=3D=3D This section contains some suggestions and traditions for how commit = logs are formatted and what they should contain. A commit log should explain *why* a commit has taken place, *what* was = changed and to a lesser degree *how*. The why of a commit message is absolutely critical to allow other people = (including your future self) to understand the reason a change was made. The how can be skipped if it is obvious - it's left as an exercise to = the reader to determine what obvious is. You should try and step into = the mind set of someone who is familiar with FreeBSD but not focussed on = the particular area you have committed to. What is obvious now can be = obtuse in a few months when you or someone else is reviewing the code to = track down issues. The commit logs are used by more people that just = other developers - they are used to develop tests and release notes as = well. Generally speaking *how* is obvious due to the diff itself assuming you = have used enough comments, but clever tricks should probably be = explained (or commented in the code). Due to the use of git and use of svn blame it is highly desirable to = have a 1 line summary of the commit, however do not think this means you = only need a 1 line summary. Write the full log first, then summarise it = if possible. If you aren't sure, err on the side of a longer rather than = shorter commit message. As well as including an informative message with each commit you may = need to include some additional information. =3D=3D=3D=3D=3D SNIP =3D=3D=3D=3D=3D >>> 3) More wishes. >>=20 >> You wish for more genies, wishing for more wishes is usually >> verboten.. ;) >=20 > I also want a pony. :) D'awwww :) -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C From owner-freebsd-hackers@freebsd.org Thu Apr 14 08:15:37 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C22BB10E1A for ; Thu, 14 Apr 2016 08:15:37 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from smtp.fagskolen.gjovik.no (smtp.fagskolen.gjovik.no [IPv6:2001:700:1100:1:200:ff:fe00:b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.fagskolen.gjovik.no", Issuer "Fagskolen i Gj??vik" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 154171687; Thu, 14 Apr 2016 08:15:36 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from mail.fig.ol.no (localhost [127.0.0.1]) by mail.fig.ol.no (8.15.2/8.15.2) with ESMTPS id u3E8FRej068812 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 14 Apr 2016 10:15:27 +0200 (CEST) (envelope-from trond@fagskolen.gjovik.no) Received: from localhost (trond@localhost) by mail.fig.ol.no (8.15.2/8.15.2/Submit) with ESMTP id u3E8FRDm068809; Thu, 14 Apr 2016 10:15:27 +0200 (CEST) (envelope-from trond@fagskolen.gjovik.no) X-Authentication-Warning: mail.fig.ol.no: trond owned process doing -bs Date: Thu, 14 Apr 2016 10:15:27 +0200 (CEST) From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= Sender: Trond.Endrestol@fagskolen.gjovik.no To: Warren Block cc: Kurt Lidl , freebsd-hackers@freebsd.org Subject: Re: Importing NetBSD's blacklist project into FreeBSD In-Reply-To: Message-ID: References: <570EF8DF.3020408@FreeBSD.org> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) Organization: Fagskolen Innlandet OpenPGP: url=http://fig.ol.no/~trond/trond.key MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED, AWL autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail.fig.ol.no Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 08:15:37 -0000 On Wed, 13 Apr 2016 20:47-0600, Warren Block wrote: > On Wed, 13 Apr 2016, Kurt Lidl wrote: > > > Greetings all - > > > > This is just a quick note to alert the FreeBSD development community > > that I've posted a review for the import of the NetBSD "blacklist" > > project into FreeBSD. > > > > The reviews for the basic import and hookup of the blacklist system > > into the build process are here: > > > > https://reviews.freebsd.org/D5912 > > https://reviews.freebsd.org/D5913 > > > > The rational behind the system is given in the first referenced > > review, which is Christos Zoulas' presentation at vBSDcon 2015. > > The first review has a link to the video: > https://youtu.be/fuuf8G28mjs > > > I think the system is a very reasonable framework to allow for > > real-time notification of attacks, feeding to a single daemon > > process, which maintains a persistent on-disk database. The daemon > > can then invoke a helper script to affect packet filtering changes > > as needed. It's driven from a text configuration file, and it is > > pretty easy to add support to more programs in the future. > > > > Thanks for your interest, and I look forward to any discussion > > about the merits of the system and the patches to implement it > > in FreeBSD. > > After seeing that review yesterday and thinking it sounded interesting, I > watched the video. After looking at today's maillog, I have gone from just > being interested to really wanting it. And a patch for sendmail to use it. > > Thank you for working on this! +1 security/denyhosts is a fairly good substitute for handling sshd abuse, but denyhosts chokes on certain hostnames and adds the same hostname over and over to /etc/hosts.deniedssh, leaving me with the burden of cleaning up the mess. I hope blacklistd is better than denyhosts as the former integrates with the daemon internals. Speaking of denyhosts, any chance blacklistd could distribute the blacklisted IP adresses between multiple hosts? The blacklistd-helper control program could be a candidate. -- +-------------------------------+------------------------------------+ | Vennlig hilsen, | Best regards, | | Trond Endrestøl, | Trond Endrestøl, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gjøvik Technical College, Norway, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +-------------------------------+------------------------------------+ From owner-freebsd-hackers@freebsd.org Thu Apr 14 08:35:12 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3ECA6B0F588 for ; Thu, 14 Apr 2016 08:35:12 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::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 EA61511CF for ; Thu, 14 Apr 2016 08:35:11 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: by mail-wm0-x22c.google.com with SMTP id n3so114797735wmn.0 for ; Thu, 14 Apr 2016 01:35:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=Fj47UCoGy4s4R2on46ffBDZxzoG2Doy67NvAVdyHwNo=; b=pLcIG8hWM7wD5OYZqbqOnhArwPeMc6Z1rhiOfOE5cLxuDR1hfnByAx2lJhhST/T6D5 evtAp1rH0jJfXN3CyxixIWoAgppAdOod3nfGAlrrg5QhFc1U6E8atbWheJn0BkcwZbTL QoxVHt1miZB39cJ5SmyxVA4OkC7HK4gjIoJG4q9+/2+gE3PSgBfse4pZmN1wQuzfmLl3 w2KFOp6u8m9NnbqO5Am9bOSmtEGgS6py66vYimAj2FU0Jf9MGsqIKCX4bMldo9QIlx4L tDfumzka/InF9ubJkZ9xz6569KlFlVMcpf5T60hlMmb3bQnRSDU/li7T6W+6OBwspLQN Mq3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=Fj47UCoGy4s4R2on46ffBDZxzoG2Doy67NvAVdyHwNo=; b=V0Tow3I9ALZYRDFFiGTitX7JrwsDYa2dh4+fqYTV6hsaRKoAiVteX1D9+4ntvemBOT KGrT7pS4p0h7W8VnU/WiOIhLhMS0rifp05wXlnQgcg/33Do5z1tvMQ58Ey+u/RIiAN/C l/CPdKLEtxh0DQou99pFSwWMOHOUzHSyuhLQPULin0BE8+9Bb4UwbNhUvf6mPZTpHPHv 7qBNCAJx6e+YBh/j1IgcOeJr510nTpe98gHMyAa4XeajmUPL6dhfhXHYfPq5bYP9fdTa pMY79MyN3AxqStxpS2F8ybqLZpVv5QKbLveH5+af2aka7uV32Sju2sjFSVTNtiUmJo8H Lq7w== X-Gm-Message-State: AD7BkJJaUzrpNHGReWIRPGcrbSMuaSkdc2I/JxGypDvcnRbUJ7j+3ApppUQ+BpGitO6bkBzF X-Received: by 10.28.98.137 with SMTP id w131mr36027774wmb.30.1460622910008; Thu, 14 Apr 2016 01:35:10 -0700 (PDT) Received: from [10.10.1.58] (liv3d.labs.multiplay.co.uk. [82.69.141.171]) by smtp.gmail.com with ESMTPSA id k139sm5288995wmg.24.2016.04.14.01.35.08 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 14 Apr 2016 01:35:08 -0700 (PDT) Subject: Re: Improving commit logs To: freebsd-hackers@freebsd.org References: <56FF6534-276E-4E52-871F-5567BD9D6EC7@dons.net.au> <20160414032801.GP18163@FreeBSD.org> <1DDB0BFB-545F-4293-9BFB-020DAFD7A5C4@dons.net.au> <20160414034320.GQ18163@FreeBSD.org> <2FD1641C-DF99-4464-BA34-A05430D663C4@dons.net.au> <20160414034805.GR18163@FreeBSD.org> <9FD838FE-E1DF-487D-82BF-77EEA2C51156@dons.net.au> From: Steven Hartland Message-ID: <570F5644.3010206@multiplay.co.uk> Date: Thu, 14 Apr 2016 09:35:16 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <9FD838FE-E1DF-487D-82BF-77EEA2C51156@dons.net.au> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 08:35:12 -0000 On 14/04/2016 04:52, O'Connor, Daniel wrote: >> On 14 Apr 2016, at 13:18, Glen Barber wrote: >> >> On Thu, Apr 14, 2016 at 01:14:46PM +0930, O'Connor, Daniel wrote: >>>> On 14 Apr 2016, at 13:13, Glen Barber wrote: >>>> I absolutely agree with you that a guide on this will be beneficial. >>>> Sorry if my reply was taken any other way. >>>> >>>> If I had a genie in a bottle, my three wishes would be: >>>> >>>> 1) Better commit messages that address the "what"; >>>> 2) Better explanation on the "why"; >>> Huh interesting, I definitely would pick 2 before 1 but I can see >>> what you mean for a lot of commits (especially to 30 year old cruft >>> filled esoterica) >> When writing release notes, for example, the "what" is generally more >> useful than the "why." In other words, the end user does not generally >> care *why* something changed, but they want to know *what* changed. > That's a good point, my original version was written more in the mind of someone who understands the code already but as you (and ngie) point out there are other consumers of the code. > > ===== SNIP ===== > This section contains some suggestions and traditions for how commit logs are formatted and what they should contain. > > A commit log should explain *why* a commit has taken place, *what* was changed and to a lesser degree *how*. > > The why of a commit message is absolutely critical to allow other people (including your future self) to understand the reason a change was made. > > The how can be skipped if it is obvious - it's left as an exercise to the reader to determine what obvious is. You should try and step into the mind set of someone who is familiar with FreeBSD but not focussed on the particular area you have committed to. What is obvious now can be obtuse in a few months when you or someone else is reviewing the code to track down issues. The commit logs are used by more people that just other developers - they are used to develop tests and release notes as well. > > Generally speaking *how* is obvious due to the diff itself assuming you have used enough comments, but clever tricks should probably be explained (or commented in the code). > > Due to the use of git and use of svn blame it is highly desirable to have a 1 line summary of the commit, however do not think this means you only need a 1 line summary. Write the full log first, then summarise it if possible. If you aren't sure, err on the side of a longer rather than shorter commit message. > > As well as including an informative message with each commit you may need to include some additional information. > > ===== SNIP ===== I definitely agree! I've found myself on a number of occasions sending emails across to people asking for clarification on why things have been changed in order to better understand areas I'm less familiar with. Providing official guidance is always good IMO :) Regards Steve From owner-freebsd-hackers@freebsd.org Thu Apr 14 11:49:38 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F78EB10248 for ; Thu, 14 Apr 2016 11:49:38 +0000 (UTC) (envelope-from afiskon@devzen.ru) Received: from relay14.nicmail.ru (relay14.nicmail.ru [195.208.3.99]) (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 CBD4D14E6 for ; Thu, 14 Apr 2016 11:49:36 +0000 (UTC) (envelope-from afiskon@devzen.ru) Received: from [109.70.25.186] (port=58309 helo=fujitsu) by f19.mail.nic.ru with esmtp (Exim 5.55) (envelope-from ) id 1aqfm2-000BJ2-Bl for freebsd-hackers@freebsd.org; Thu, 14 Apr 2016 14:49:26 +0300 Received: from [93.174.131.138] (account afiskon@devzen.ru HELO fujitsu) by proxy07.mail.nic.ru (Exim 5.55) with id 1aqfm2-0006dw-IB for freebsd-hackers@freebsd.org; Thu, 14 Apr 2016 14:49:26 +0300 Date: Thu, 14 Apr 2016 14:48:49 +0300 From: Aleksander Alekseev To: freebsd-hackers@freebsd.org Subject: A few stupid questions regarding MBR and boot0 Message-ID: <20160414144849.7a08b1db@fujitsu> 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.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 11:49:38 -0000 Hello I was trying to figure out how FreeBSD boot process works and noticed something strange. 1) If I understand correctly first 512 bytes of /dev/ad0 and /boot/boot0 file should match, but they don't: http://afiskon.ru/s/31/665dc9755c_mbr.txt Could someone please explain why they don't match? 2) I tried to compile boot0 from source (r297956) but compilation failed: ``` $ cd sys/boot/i386/boot0 $ make Warning: Object directory not changed from original /usr/home/eax/freebsd-src/sys/boot/i386/boot0 /usr/local/bin/clang38 -O2 -pipe -O2 -pipe -g -march=native -DVOLUME_SERIAL -DPXE -DFLAGS=0x8f -DTICKS=0xb6 -DCOMSPEED="7 << 5 + 3" -march=i386 -ffreestanding -msoft-float -m32 -std=gnu99 -Qunused-arguments -m32 -c boot0.S -o boot0.o clang -cc1as: fatal error: error in backend: invalid .org offset '430' (at offset '439') *** Error code 1 Stop. make: stopped in /usr/home/eax/freebsd-src/sys/boot/i386/boot0 ``` Am I doing something wrong? -- Best regards, Aleksander Alekseev http://eax.me/ From owner-freebsd-hackers@freebsd.org Thu Apr 14 12:00:33 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 501FFB10A80 for ; Thu, 14 Apr 2016 12:00:33 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from smtp.fagskolen.gjovik.no (smtp.fagskolen.gjovik.no [IPv6:2001:700:1100:1:200:ff:fe00:b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.fagskolen.gjovik.no", Issuer "Fagskolen i Gj??vik" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D23BA1CF6 for ; Thu, 14 Apr 2016 12:00:32 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from mail.fig.ol.no (localhost [127.0.0.1]) by mail.fig.ol.no (8.15.2/8.15.2) with ESMTPS id u3EC0FTp070261 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 14 Apr 2016 14:00:15 +0200 (CEST) (envelope-from trond@fagskolen.gjovik.no) Received: from localhost (trond@localhost) by mail.fig.ol.no (8.15.2/8.15.2/Submit) with ESMTP id u3EC0EJ1070258; Thu, 14 Apr 2016 14:00:15 +0200 (CEST) (envelope-from trond@fagskolen.gjovik.no) X-Authentication-Warning: mail.fig.ol.no: trond owned process doing -bs Date: Thu, 14 Apr 2016 14:00:14 +0200 (CEST) From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= Sender: Trond.Endrestol@fagskolen.gjovik.no To: Aleksander Alekseev cc: freebsd-hackers@freebsd.org Subject: Re: A few stupid questions regarding MBR and boot0 In-Reply-To: <20160414144849.7a08b1db@fujitsu> Message-ID: References: <20160414144849.7a08b1db@fujitsu> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) Organization: Fagskolen Innlandet OpenPGP: url=http://fig.ol.no/~trond/trond.key MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED, AWL autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail.fig.ol.no Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 12:00:33 -0000 On Thu, 14 Apr 2016 14:48+0300, Aleksander Alekseev wrote: > Hello > > I was trying to figure out how FreeBSD boot process works and noticed > something strange. > > 1) If I understand correctly first 512 bytes of /dev/ad0 > and /boot/boot0 file should match, but they don't: > > http://afiskon.ru/s/31/665dc9755c_mbr.txt The MBR consists of two parts, the bootcode and the partition table. Any discrepancies is generally due to the partition table being zero in /boot/boot0 and realistic data stored in block 0. > Could someone please explain why they don't match? > > 2) I tried to compile boot0 from source (r297956) but compilation > failed: > > ``` > $ cd sys/boot/i386/boot0 > $ make > > Warning: Object directory not changed from > original /usr/home/eax/freebsd-src/sys/boot/i386/boot0 > > /usr/local/bin/clang38 -O2 -pipe -O2 -pipe -g -march=native > -DVOLUME_SERIAL -DPXE -DFLAGS=0x8f -DTICKS=0xb6 -DCOMSPEED="7 << 5 + > 3" -march=i386 -ffreestanding -msoft-float -m32 -std=gnu99 > -Qunused-arguments -m32 -c boot0.S -o boot0.o clang -cc1as: fatal > error: error in backend: invalid .org offset '430' (at offset '439') > *** Error code 1 > > Stop. > make: stopped in /usr/home/eax/freebsd-src/sys/boot/i386/boot0 > ``` > > Am I doing something wrong? I have never attempted to build the FreeBSD sources outside /usr/src. The advice below might be plain wrong. Try: cd sys/boot/i386/boot0 make clean make OBJDIR=/usr/home/eax/freebsd-obj obj make OBJDIR=/usr/home/eax/freebsd-obj all If you want it installed, run make OBJDIR=/usr/home/eax/freebsd-obj install -- +-------------------------------+------------------------------------+ | Vennlig hilsen, | Best regards, | | Trond Endrestøl, | Trond Endrestøl, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gjøvik Technical College, Norway, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +-------------------------------+------------------------------------+ From owner-freebsd-hackers@freebsd.org Thu Apr 14 12:05:43 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69B3EB10EA4 for ; Thu, 14 Apr 2016 12:05:43 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from smtp.fagskolen.gjovik.no (smtp.fagskolen.gjovik.no [IPv6:2001:700:1100:1:200:ff:fe00:b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.fagskolen.gjovik.no", Issuer "Fagskolen i Gj??vik" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 137D91226 for ; Thu, 14 Apr 2016 12:05:42 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from mail.fig.ol.no (localhost [127.0.0.1]) by mail.fig.ol.no (8.15.2/8.15.2) with ESMTPS id u3EC5SAF070307 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 14 Apr 2016 14:05:29 +0200 (CEST) (envelope-from trond@fagskolen.gjovik.no) Received: from localhost (trond@localhost) by mail.fig.ol.no (8.15.2/8.15.2/Submit) with ESMTP id u3EC5SdD070304; Thu, 14 Apr 2016 14:05:28 +0200 (CEST) (envelope-from trond@fagskolen.gjovik.no) X-Authentication-Warning: mail.fig.ol.no: trond owned process doing -bs Date: Thu, 14 Apr 2016 14:05:28 +0200 (CEST) From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= Sender: Trond.Endrestol@fagskolen.gjovik.no To: Aleksander Alekseev cc: freebsd-hackers@freebsd.org Subject: Re: A few stupid questions regarding MBR and boot0 In-Reply-To: Message-ID: References: <20160414144849.7a08b1db@fujitsu> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) Organization: Fagskolen Innlandet OpenPGP: url=http://fig.ol.no/~trond/trond.key MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED, AWL autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail.fig.ol.no Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 12:05:43 -0000 On Thu, 14 Apr 2016 14:00+0200, Trond Endrestøl wrote: > On Thu, 14 Apr 2016 14:48+0300, Aleksander Alekseev wrote: > > > Hello > > > > I was trying to figure out how FreeBSD boot process works and noticed > > something strange. > > > > 1) If I understand correctly first 512 bytes of /dev/ad0 > > and /boot/boot0 file should match, but they don't: > > > > http://afiskon.ru/s/31/665dc9755c_mbr.txt > > The MBR consists of two parts, the bootcode and the partition table. > Any discrepancies is generally due to the partition table being zero > in /boot/boot0 and realistic data stored in block 0. BTW, check out /boot/mbr. > > Could someone please explain why they don't match? > > > > 2) I tried to compile boot0 from source (r297956) but compilation > > failed: > > > > ``` > > $ cd sys/boot/i386/boot0 > > $ make > > > > Warning: Object directory not changed from > > original /usr/home/eax/freebsd-src/sys/boot/i386/boot0 > > > > /usr/local/bin/clang38 -O2 -pipe -O2 -pipe -g -march=native > > -DVOLUME_SERIAL -DPXE -DFLAGS=0x8f -DTICKS=0xb6 -DCOMSPEED="7 << 5 + > > 3" -march=i386 -ffreestanding -msoft-float -m32 -std=gnu99 > > -Qunused-arguments -m32 -c boot0.S -o boot0.o clang -cc1as: fatal > > error: error in backend: invalid .org offset '430' (at offset '439') > > *** Error code 1 > > > > Stop. > > make: stopped in /usr/home/eax/freebsd-src/sys/boot/i386/boot0 > > ``` > > > > Am I doing something wrong? > > I have never attempted to build the FreeBSD sources outside /usr/src. > The advice below might be plain wrong. > > Try: > > cd sys/boot/i386/boot0 > make clean > make OBJDIR=/usr/home/eax/freebsd-obj obj > make OBJDIR=/usr/home/eax/freebsd-obj all > > If you want it installed, run > > make OBJDIR=/usr/home/eax/freebsd-obj install -- +-------------------------------+------------------------------------+ | Vennlig hilsen, | Best regards, | | Trond Endrestøl, | Trond Endrestøl, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gjøvik Technical College, Norway, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +-------------------------------+------------------------------------+ From owner-freebsd-hackers@freebsd.org Thu Apr 14 12:37:18 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E33EAECE8D for ; Thu, 14 Apr 2016 12:37:18 +0000 (UTC) (envelope-from afiskon@devzen.ru) Received: from relay11.nicmail.ru (relay11.nicmail.ru [195.208.3.7]) (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 E901817CF for ; Thu, 14 Apr 2016 12:37:17 +0000 (UTC) (envelope-from afiskon@devzen.ru) Received: from [109.70.25.187] (port=35887 helo=fujitsu) by f06.mail.nic.ru with esmtp (Exim 5.55) (envelope-from ) id 1aqgWQ-000K7C-2E; Thu, 14 Apr 2016 15:37:22 +0300 Received: from [93.174.131.138] (account afiskon@devzen.ru HELO fujitsu) by proxy08.mail.nic.ru (Exim 5.55) with id 1aqgWA-00044W-HY; Thu, 14 Apr 2016 15:37:06 +0300 Date: Thu, 14 Apr 2016 15:36:27 +0300 From: Aleksander Alekseev To: Trond =?UTF-8?B?RW5kcmVzdMO4bA==?= Cc: freebsd-hackers@freebsd.org Subject: Re: A few stupid questions regarding MBR and boot0 Message-ID: <20160414153627.7fc50247@fujitsu> In-Reply-To: References: <20160414144849.7a08b1db@fujitsu> 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.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 12:37:18 -0000 Hello, Trond Thanks for your replies. > > 1) If I understand correctly first 512 bytes of /dev/ad0 > > and /boot/boot0 file should match, but they don't: > > > > http://afiskon.ru/s/31/665dc9755c_mbr.txt > > The MBR consists of two parts, the bootcode and the partition table. > Any discrepancies is generally due to the partition table being zero > in /boot/boot0 and realistic data stored in block 0. Yes, but if I'm not mistaken partition table starts only at 0x1be. But in my case data is not just slightly different in last few bytes. Its not the same at all. > BTW, check out /boot/mbr. OK, this looks like something I have on ad0. But this file is not mentioned in corresponding chapters of Handbook [1] or Architecture Handbook [2]. Besides Architecture Handbook clearly states: """ Indeed, boot0 /is/ the MBR. """ If /boot/boot0 is MBR then what is /boot/mbr? Current version of Handbook mentions it twice in 18.3.2 and doesn't exactly explains what this file is for. According to FreeBSD 8.4 Handbook [3]: """ By default, the MBR installed by fdisk(8) is such an MBR and is based on /boot/mbr. """ Do I right understand that current version of Handbook is wrong regarding: """ The MBR installed by the FreeBSD installer is based on /boot/boot0. """ ... and in fact boot0 is only used in dual-boot case? BTW `cd sys/boot/i386/mbr && make` works as expected. > I have never attempted to build the FreeBSD sources outside /usr/src. > The advice below might be plain wrong. > > Try: > > cd sys/boot/i386/boot0 > make clean > make OBJDIR=/usr/home/eax/freebsd-obj obj > make OBJDIR=/usr/home/eax/freebsd-obj all > > If you want it installed, run > > make OBJDIR=/usr/home/eax/freebsd-obj install > Doesn't work: ``` $ make OBJDIR=/usr/home/eax/freebsd-obj obj mkdir: /usr/obj/usr: Permission denied *** Error code 1 Stop. make: stopped in /usr/home/eax/freebsd-src/sys/boot/i386/boot0 ``` I also tried `OBJDIR=... make`. Naturally I could try `sudo make ...` but if I'm not wrong boot0 doesn't have any dependencies, it's a reasonably simple assembly program. [1]https://www.freebsd.org/doc/handbook/boot-introduction.html [2]https://www.freebsd.org/doc/en/books/arch-handbook/boot-boot0.html [3]https://docs.freebsd.org/doc/8.4-RELEASE/share/doc/freebsd/handbook/boot-introduction.html -- Best regards, Aleksander Alekseev http://eax.me/ From owner-freebsd-hackers@freebsd.org Thu Apr 14 12:48:51 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E244FB0E419 for ; Thu, 14 Apr 2016 12:48:51 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from smtp.fagskolen.gjovik.no (smtp.fagskolen.gjovik.no [IPv6:2001:700:1100:1:200:ff:fe00:b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.fagskolen.gjovik.no", Issuer "Fagskolen i Gj??vik" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 88A391F28 for ; Thu, 14 Apr 2016 12:48:51 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from mail.fig.ol.no (localhost [127.0.0.1]) by mail.fig.ol.no (8.15.2/8.15.2) with ESMTPS id u3ECmeSs070505 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 14 Apr 2016 14:48:40 +0200 (CEST) (envelope-from trond@fagskolen.gjovik.no) Received: from localhost (trond@localhost) by mail.fig.ol.no (8.15.2/8.15.2/Submit) with ESMTP id u3ECmdsA070502; Thu, 14 Apr 2016 14:48:40 +0200 (CEST) (envelope-from trond@fagskolen.gjovik.no) X-Authentication-Warning: mail.fig.ol.no: trond owned process doing -bs Date: Thu, 14 Apr 2016 14:48:39 +0200 (CEST) From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= Sender: Trond.Endrestol@fagskolen.gjovik.no To: Aleksander Alekseev cc: freebsd-hackers@freebsd.org Subject: Re: A few stupid questions regarding MBR and boot0 In-Reply-To: <20160414153627.7fc50247@fujitsu> Message-ID: References: <20160414144849.7a08b1db@fujitsu> <20160414153627.7fc50247@fujitsu> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) Organization: Fagskolen Innlandet OpenPGP: url=http://fig.ol.no/~trond/trond.key MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED, AWL autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail.fig.ol.no Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 12:48:52 -0000 On Thu, 14 Apr 2016 15:36+0300, Aleksander Alekseev wrote: > Hello, Trond > > Thanks for your replies. NP. > > > 1) If I understand correctly first 512 bytes of /dev/ad0 > > > and /boot/boot0 file should match, but they don't: > > > > > > http://afiskon.ru/s/31/665dc9755c_mbr.txt > > > > The MBR consists of two parts, the bootcode and the partition table. > > Any discrepancies is generally due to the partition table being zero > > in /boot/boot0 and realistic data stored in block 0. > > Yes, but if I'm not mistaken partition table starts only at 0x1be. But > in my case data is not just slightly different in last few bytes. Its > not the same at all. > > > BTW, check out /boot/mbr. > > OK, this looks like something I have on ad0. But this file is not > mentioned in corresponding chapters of Handbook [1] or Architecture > Handbook [2]. Besides Architecture Handbook clearly states: > > """ > Indeed, boot0 /is/ the MBR. > """ > > If /boot/boot0 is MBR then what is /boot/mbr? Current version of > Handbook mentions it twice in 18.3.2 and doesn't exactly explains what > this file is for. According to FreeBSD 8.4 Handbook [3]: > > """ > By default, the MBR installed by fdisk(8) is such an MBR and is based > on /boot/mbr. > """ fdisk(8) is an outdated tool. gpart(8) is the current tool. > Do I right understand that current version of Handbook is wrong > regarding: > > """ > The MBR installed by the FreeBSD installer is based on /boot/boot0. > """ > > ... and in fact boot0 is only used in dual-boot case? It could be. I'm not a committer, merely a user. > BTW `cd sys/boot/i386/mbr && make` works as expected. > > > I have never attempted to build the FreeBSD sources outside /usr/src. > > The advice below might be plain wrong. > > > > Try: > > > > cd sys/boot/i386/boot0 > > make clean > > make OBJDIR=/usr/home/eax/freebsd-obj obj > > make OBJDIR=/usr/home/eax/freebsd-obj all > > > > If you want it installed, run > > > > make OBJDIR=/usr/home/eax/freebsd-obj install > > > > Doesn't work: > > ``` > $ make OBJDIR=/usr/home/eax/freebsd-obj obj > mkdir: /usr/obj/usr: Permission denied > *** Error code 1 > > Stop. > make: stopped in /usr/home/eax/freebsd-src/sys/boot/i386/boot0 > ``` > > I also tried `OBJDIR=... make`. Naturally I could try `sudo make ...` > but if I'm not wrong boot0 doesn't have any dependencies, it's a > reasonably simple assembly program. Try: make MAKEOBJDIRPREFIX=/usr/home/eax/freebsd-obj xxx That should place the object tree in /usr/home/eax/freebsd-obj and avoid polluting the source tree. > [1]https://www.freebsd.org/doc/handbook/boot-introduction.html > [2]https://www.freebsd.org/doc/en/books/arch-handbook/boot-boot0.html > [3]https://docs.freebsd.org/doc/8.4-RELEASE/share/doc/freebsd/handbook/boot-introduction.html -- +-------------------------------+------------------------------------+ | Vennlig hilsen, | Best regards, | | Trond Endrestøl, | Trond Endrestøl, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gjøvik Technical College, Norway, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +-------------------------------+------------------------------------+ From owner-freebsd-hackers@freebsd.org Thu Apr 14 12:54:40 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05257B0E858 for ; Thu, 14 Apr 2016 12:54:40 +0000 (UTC) (envelope-from afiskon@devzen.ru) Received: from relay14.nicmail.ru (relay14.nicmail.ru [195.208.3.99]) (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 AFA7717C3 for ; Thu, 14 Apr 2016 12:54:39 +0000 (UTC) (envelope-from afiskon@devzen.ru) Received: from [109.70.25.225] (port=55695 helo=fujitsu) by f19.mail.nic.ru with esmtp (Exim 5.55) (envelope-from ) id 1aqgn5-000PEC-9h; Thu, 14 Apr 2016 15:54:35 +0300 Received: from [93.174.131.138] (account afiskon@devzen.ru HELO fujitsu) by proxy03.mail.nic.ru (Exim 5.55) with id 1aqgn4-0004A6-QI; Thu, 14 Apr 2016 15:54:34 +0300 Date: Thu, 14 Apr 2016 15:53:57 +0300 From: Aleksander Alekseev To: Trond =?UTF-8?B?RW5kcmVzdMO4bA==?= Cc: freebsd-hackers@freebsd.org Subject: Re: A few stupid questions regarding MBR and boot0 Message-ID: <20160414155357.5990adc6@fujitsu> In-Reply-To: References: <20160414144849.7a08b1db@fujitsu> <20160414153627.7fc50247@fujitsu> 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.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 12:54:40 -0000 > Try: > > make MAKEOBJDIRPREFIX=/usr/home/eax/freebsd-obj xxx > > That should place the object tree in /usr/home/eax/freebsd-obj and > avoid polluting the source tree. > `make ... obj` works, `make ... all` fails with the same error as before. -- Best regards, Aleksander Alekseev http://eax.me/ From owner-freebsd-hackers@freebsd.org Thu Apr 14 12:55:40 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1E10B0E8FD for ; Thu, 14 Apr 2016 12:55:40 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward17h.cmail.yandex.net (forward17h.cmail.yandex.net [IPv6:2a02:6b8:0:f35::a2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 787B71943 for ; Thu, 14 Apr 2016 12:55:40 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from smtp4h.mail.yandex.net (smtp4h.mail.yandex.net [IPv6:2a02:6b8:0:f05::118]) by forward17h.cmail.yandex.net (Yandex) with ESMTP id F328D21753; Thu, 14 Apr 2016 15:55:35 +0300 (MSK) Received: from smtp4h.mail.yandex.net (localhost [127.0.0.1]) by smtp4h.mail.yandex.net (Yandex) with ESMTP id 3320C2C7B1E; Thu, 14 Apr 2016 15:55:34 +0300 (MSK) Received: by smtp4h.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id hLf2uebkwc-tYqWMooq; Thu, 14 Apr 2016 15:55:34 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1460638534; bh=cd94ktx9ASRicmHcty8TafSXhhqz2uN1xmAkCVqgc9U=; h=Subject:To:References:From:Message-ID:Date:User-Agent: MIME-Version:In-Reply-To:Content-Type; b=WJo8pmQ0befdPOVbmGSj8D9H12mQMRj+wSvVByKzQ2XIg0McSlw45aLv3Q9E6N5zl kklDUh3gnGLlqtGZKZBJvHO6U+zm7gImLUGzPogf2rPxj44Mmtv0eMBntdYxNOodc7 A+R6udanhkwrevWXD6vwfqvOKBrV7EgFT/nLsQNY= Authentication-Results: smtp4h.mail.yandex.net; dkim=pass header.i=@yandex.ru X-Yandex-ForeignMX: US X-Yandex-Suid-Status: 1 0,1 0 Subject: Re: A few stupid questions regarding MBR and boot0 To: Aleksander Alekseev , freebsd-hackers@freebsd.org References: <20160414144849.7a08b1db@fujitsu> From: "Andrey V. Elsukov" Message-ID: <570F92D8.1000405@yandex.ru> Date: Thu, 14 Apr 2016 15:53:44 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 In-Reply-To: <20160414144849.7a08b1db@fujitsu> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Su3iH1BuiwLKNKtB5gL1g1f0KqxrK5fkF" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 12:55:40 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Su3iH1BuiwLKNKtB5gL1g1f0KqxrK5fkF Content-Type: multipart/mixed; boundary="55vqFrPiQM0pVEQLlkarnMf8cfRnUdL9m" From: "Andrey V. Elsukov" To: Aleksander Alekseev , freebsd-hackers@freebsd.org Message-ID: <570F92D8.1000405@yandex.ru> Subject: Re: A few stupid questions regarding MBR and boot0 References: <20160414144849.7a08b1db@fujitsu> In-Reply-To: <20160414144849.7a08b1db@fujitsu> --55vqFrPiQM0pVEQLlkarnMf8cfRnUdL9m Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 14.04.16 14:48, Aleksander Alekseev wrote: > 1) If I understand correctly first 512 bytes of /dev/ad0 > and /boot/boot0 file should match, but they don't: >=20 > http://afiskon.ru/s/31/665dc9755c_mbr.txt >=20 > Could someone please explain why they don't match? https://www.freebsd.org/cgi/man.cgi?gpart#BOOTSTRAPPING --=20 WBR, Andrey V. Elsukov --55vqFrPiQM0pVEQLlkarnMf8cfRnUdL9m-- --Su3iH1BuiwLKNKtB5gL1g1f0KqxrK5fkF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXD5LYAAoJEAHF6gQQyKF67xUIAKUQYOAfCmcbmqkuV/S3KPox VQsQvgiuBdV9T4OTok4oxNFCr7uMt1CDW6+ZV8iacXmCtq1oiH65RmsoBl3d9Msm SFQqM9XemfJHU0uNsDrAZFyTp4kWzHd2L8wahSfF6iLvR8VuDSBKWsLxCglxA+AW GRhlJfeIOqFTz0kciCmTRykzBg/6xrCRU9NyuJM21QEGO8i+RWJY1DKINOiQxy1u sBYYCpdSzctx1A45JumADoHykUFGl4u9wB3LkWqmYTo2PPhfb4sQsVuq2KU4gsaI V0DR6uXPHCCPeyV2+QME4Z9i4SxBEO0Nkaci6OLz9/VTtwXuZo0I7bfqDqi1ZJU= =c54V -----END PGP SIGNATURE----- --Su3iH1BuiwLKNKtB5gL1g1f0KqxrK5fkF-- From owner-freebsd-hackers@freebsd.org Thu Apr 14 14:28:52 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27E68B109AB for ; Thu, 14 Apr 2016 14:28:52 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) by mx1.freebsd.org (Postfix) with ESMTP id 0D61C167A for ; Thu, 14 Apr 2016 14:28:51 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (unknown [10.1.1.2]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id A1BF3D8F4 for ; Thu, 14 Apr 2016 14:28:50 +0000 (UTC) Subject: Re: A few stupid questions regarding MBR and boot0 To: freebsd-hackers@freebsd.org References: <20160414144849.7a08b1db@fujitsu> <20160414153627.7fc50247@fujitsu> From: Allan Jude Message-ID: <570FA922.1000401@freebsd.org> Date: Thu, 14 Apr 2016 10:28:50 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <20160414153627.7fc50247@fujitsu> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 14:28:52 -0000 On 2016-04-14 08:36, Aleksander Alekseev wrote: > Hello, Trond > > Thanks for your replies. > >>> 1) If I understand correctly first 512 bytes of /dev/ad0 >>> and /boot/boot0 file should match, but they don't: >>> >>> http://afiskon.ru/s/31/665dc9755c_mbr.txt >> >> The MBR consists of two parts, the bootcode and the partition table. >> Any discrepancies is generally due to the partition table being zero >> in /boot/boot0 and realistic data stored in block 0. > > Yes, but if I'm not mistaken partition table starts only at 0x1be. But > in my case data is not just slightly different in last few bytes. Its > not the same at all. > >> BTW, check out /boot/mbr. > > OK, this looks like something I have on ad0. But this file is not > mentioned in corresponding chapters of Handbook [1] or Architecture > Handbook [2]. Besides Architecture Handbook clearly states: > > """ > Indeed, boot0 /is/ the MBR. > """ > > If /boot/boot0 is MBR then what is /boot/mbr? Current version of > Handbook mentions it twice in 18.3.2 and doesn't exactly explains what > this file is for. According to FreeBSD 8.4 Handbook [3]: > > """ > By default, the MBR installed by fdisk(8) is such an MBR and is based > on /boot/mbr. > """ > > Do I right understand that current version of Handbook is wrong > regarding: > > """ > The MBR installed by the FreeBSD installer is based on /boot/boot0. > """ > > ... and in fact boot0 is only used in dual-boot case? > > BTW `cd sys/boot/i386/mbr && make` works as expected. > >> I have never attempted to build the FreeBSD sources outside /usr/src. >> The advice below might be plain wrong. >> >> Try: >> >> cd sys/boot/i386/boot0 >> make clean >> make OBJDIR=/usr/home/eax/freebsd-obj obj >> make OBJDIR=/usr/home/eax/freebsd-obj all >> >> If you want it installed, run >> >> make OBJDIR=/usr/home/eax/freebsd-obj install >> > > Doesn't work: > > ``` > $ make OBJDIR=/usr/home/eax/freebsd-obj obj > mkdir: /usr/obj/usr: Permission denied > *** Error code 1 > > Stop. > make: stopped in /usr/home/eax/freebsd-src/sys/boot/i386/boot0 > ``` > > I also tried `OBJDIR=... make`. Naturally I could try `sudo make ...` > but if I'm not wrong boot0 doesn't have any dependencies, it's a > reasonably simple assembly program. > > [1]https://www.freebsd.org/doc/handbook/boot-introduction.html > [2]https://www.freebsd.org/doc/en/books/arch-handbook/boot-boot0.html > [3]https://docs.freebsd.org/doc/8.4-RELEASE/share/doc/freebsd/handbook/boot-introduction.html > There are multiple MBRs to choose from IIRC: /boot/boot0 just starts FreeBSD /boot/mbr presents a menu, where you pick which partition to start, including support for other operating systems (since it just loads the volume boot record of the indicated partition) -- Allan Jude From owner-freebsd-hackers@freebsd.org Thu Apr 14 17:31:17 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EE30ADAE1D for ; Thu, 14 Apr 2016 17:31:17 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: from puchar.net (puchar.net [84.10.41.61]) (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 E55361336 for ; Thu, 14 Apr 2016 17:31:16 +0000 (UTC) (envelope-from wojtek@puchar.net) Received: Received: from 127.0.0.1 (localhost [127.0.0.1]) by puchar.net (8.15.2/8.14.9) with ESMTPS id u3EHV3Yf055001 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 14 Apr 2016 19:31:04 +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 u3EHV6hY005053; Thu, 14 Apr 2016 19:31:06 +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 u3EHV0CH005050; Thu, 14 Apr 2016 19:31:00 +0200 (CEST) (envelope-from wojtek@puchar.net) X-Authentication-Warning: laptop.wojtek.intra: wojtek owned process doing -bs Date: Thu, 14 Apr 2016 19:31:00 +0200 (CEST) From: Wojciech Puchar X-X-Sender: wojtek@laptop.wojtek.intra To: Aleksander Alekseev cc: freebsd-hackers@freebsd.org Subject: Re: A few stupid questions regarding MBR and boot0 In-Reply-To: <20160414144849.7a08b1db@fujitsu> Message-ID: References: <20160414144849.7a08b1db@fujitsu> 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, 14 Apr 2016 19:31:04 +0200 (CEST) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2016 17:31:17 -0000 > > 1) If I understand correctly first 512 bytes of /dev/ad0 > and /boot/boot0 file should match, but they don't: > > http://afiskon.ru/s/31/665dc9755c_mbr.txt > > Could someone please explain why they don't match? > because of MBR partition table entries. From owner-freebsd-hackers@freebsd.org Fri Apr 15 11:04:14 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9580AED7B3 for ; Fri, 15 Apr 2016 11:04:14 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C74641BB8 for ; Fri, 15 Apr 2016 11:04:14 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (ppp121-45-252-92.lns20.per4.internode.on.net [121.45.252.92]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id u3FB3idl097020 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 15 Apr 2016 04:03:49 -0700 (PDT) (envelope-from julian@freebsd.org) Subject: Re: A few stupid questions regarding MBR and boot0 To: "Andrey V. Elsukov" , Aleksander Alekseev , freebsd-hackers@freebsd.org References: <20160414144849.7a08b1db@fujitsu> <570F92D8.1000405@yandex.ru> From: Julian Elischer Message-ID: <5710CA8B.80102@freebsd.org> Date: Fri, 15 Apr 2016 19:03:39 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <570F92D8.1000405@yandex.ru> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 11:04:15 -0000 On 14/04/2016 8:53 PM, Andrey V. Elsukov wrote: > On 14.04.16 14:48, Aleksander Alekseev wrote: >> 1) If I understand correctly first 512 bytes of /dev/ad0 >> and /boot/boot0 file should match, but they don't: >> >> http://afiskon.ru/s/31/665dc9755c_mbr.txt >> >> Could someone please explain why they don't match? > https://www.freebsd.org/cgi/man.cgi?gpart#BOOTSTRAPPING > As Alan said, there two alternate boot sectors.. the original, and an enhanced one htat allow syou to select from a compiled in menu. The one that has 'inux' 'reeBSD' in it is the menu one. man boot0cfg From owner-freebsd-hackers@freebsd.org Fri Apr 15 18:52:59 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15DAAAEEC83 for ; Fri, 15 Apr 2016 18:52:59 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm44-vm10.bullet.mail.bf1.yahoo.com (nm44-vm10.bullet.mail.bf1.yahoo.com [216.109.115.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF481128E for ; Fri, 15 Apr 2016 18:52:58 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1460745962; bh=99QO7jgf6mEdyULNW9/o6VWgy15RcUp6dqKevbXh2nQ=; h=To:From:Subject:Date:From:Subject; b=Cw2H51IepBTFLIlpsrwPMe1lgFedlP/Y+L/GEbJ0SFguxWkoh8CkMTWc3r9yO0OEV2fegB5vLQbaN8bJXGMxvYdZQmihTmwwPkHojkthEI5UxggLFqQFnD/rQbJ5wI4bUgN2CfqMO6vqBG0+NGl4sErMGamCLUqBPHN0w0/CkN6qKbcd6UcQDoRKembMk5X20kmvE7zWS7dZylRF6t7ySUj03V3rcFtsPxQq0+m4EZhK+qSi6sG198AR56TpYLp+voVZ7VYv6mq+p3XUUe3pCZBS7Ma2VPfwE1TTFkJw9nUnEajuE5AjwFPr3MMriw4nke9sSi44Kb6QrNeQwFQtNg== Received: from [66.196.81.170] by nm44.bullet.mail.bf1.yahoo.com with NNFMP; 15 Apr 2016 18:46:02 -0000 Received: from [98.139.211.196] by tm16.bullet.mail.bf1.yahoo.com with NNFMP; 15 Apr 2016 18:46:02 -0000 Received: from [127.0.0.1] by smtp205.mail.bf1.yahoo.com with NNFMP; 15 Apr 2016 18:46:02 -0000 X-Yahoo-Newman-Id: 441500.20619.bm@smtp205.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: TC6CFwkVM1l7Qk9RVdT_gCFVPKfs0RXmV_.3a0fCpxyeAYb GOy9zSBUQ64qHAV.oANb6wcby.FyzFKayzxSMOuAaUldQURiQyCnz9F3.ZMS O8dunKcyHjM0Eeql6X7RcBNtI1YmQXo1EbtaoKZJ_jU7n.EaS71FArtmyhgC q6qhWRCQMWIL1YyzKeCQIUPaKdsbmzTXJDViLZ8F5hgEsGE_YNSz8BSjFPc6 6FAFeOpb4wXueXqsGnc3k5cWgXOsaqEA4RfdfC6dgJFn5JWhMsq2QSsaDL3j 3m3HOFtO0sH_UOYhKwbTAD8SUyMSV0.tt.6R0WcyxP6llXSMNUyW4GuvykMi 0zZysbzjspvIAAByAcIyzqQZk8wjXxCi_50UAw9O.iVnirwwaJTzdjenEllN nudcEnyCSA2wE4fUWnOD32qcQDEdFBlPX6ffmXrscdg6CrIDRI5QyzmpXMN4 bFv2i_JvvBoQ.b4sqd3JpP1W8wV_rj4vHE5ow1zT40Gq4aJ25taCV0C86.Es 8Z9xe6WEgh3WkMWqarBCzyhIZybSJgo4Q X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf To: FreeBSD Hackers From: Pedro Giffuni Subject: devel/coccinelle "semantic patches". Message-ID: <571136E6.6080203@FreeBSD.org> Date: Fri, 15 Apr 2016 13:45:58 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 18:52:59 -0000 Hi; Since people have been asking about my recent use of devel/coccinelle, I created a directory where I am keeping the test patches I use: https://people.freebsd.org/~pfg/patches/cocci/ I do *not* actually recommend running them on a regular basis. Most of the cases caught cosmetic issues on code that has been aging and are unlikely to be touched (again) in years. The interesting bugs are usually caught early by static checkers already in regular use by the project. Handle with care, beware of false positives, etc. but absolutely enjoy! Pedro. From owner-freebsd-hackers@freebsd.org Sat Apr 16 02:16:29 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FE57AED45D for ; Sat, 16 Apr 2016 02:16:29 +0000 (UTC) (envelope-from eric@metricspace.net) Received: from mail.metricspace.net (mail.metricspace.net [IPv6:2001:470:1f11:617::107]) by mx1.freebsd.org (Postfix) with ESMTP id 5AA5B1A4F for ; Sat, 16 Apr 2016 02:16:29 +0000 (UTC) (envelope-from eric@metricspace.net) Received: from [IPv6:2001:470:1f11:617:8fe:6a13:797b:e9c9] (unknown [IPv6:2001:470:1f11:617:8fe:6a13:797b:e9c9]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: eric) by mail.metricspace.net (Postfix) with ESMTPSA id 9AA3213E7 for ; Sat, 16 Apr 2016 02:16:28 +0000 (UTC) Subject: Seeking input on two options for EFI GELI boot From: Eric McCorkle Content-Type: text/plain; charset=us-ascii X-Mailer: iPad Mail (13D15) Message-Id: Date: Fri, 15 Apr 2016 22:16:27 -0400 To: "freebsd-hackers@freebsd.org" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2016 02:16:29 -0000 Hi all, After spending literally days arguing with myself in circles about this, I'm= e decided to put it out for public discussion... The root of the issue is that I'm working on GELI support for the EFI boot. = This involves implementing some kind of device tree framework to do it the R= ight Way, since encrypted partitions may have subpartitions within them. There are basically two ways to do this, and it comes down to the decision o= f whether to embrace the EFI API or spurn it. Here is a breakdown of how bo= th options work out: Minimal EFI (aka what my boot1 prototype does): * Modify boot1 to use a more abstract device interface, allowing for a devic= e tree * Add a providers API, allowing for detection of subdevices * Detect subdevices recursively, then try filesystems drivers * Do basically the same thing in loader * Somehow pass the key information from boot1 to loader to avoid asking for k= eys multiple times Embrace EFI: * Have the providers interface, but use the EFI boot services, device path, a= nd driver APIs to create new device nodes, connect them to device paths, and= install protocol interfaces (like BLOCK_IO_PROTOCOL) on the nodes. * These new device handles will be available to loader, as boot is effective= ly installing boot-time device drivers. * You could go a step further here and create SIMPLE_FILESYSTEM_PROTOCOL dri= vers for ZFS and UFS and install them on device handles that hold those file= systems. * loader would run a round of detection, then try to boot. If boot1 has alr= eady detected everything, then loader won't harm anything by trying. OTOH, i= f we're coming in from something like grub, then we'll end up detecting ever= ything. It's not clear that one or the other is preferable. They both have upsides a= nd downsides: * The EFI option could eliminate a lot of code duplication between boot1 and= loader. It also plays much nicer with other tools like Grub, which may wan= t to work by creating EFI drivers to read FreeBSD partitions and filesystems= . * loader as written REALLY wants to just boot from the device handle its giv= en. Running detecting a whole entire device tree, then picking a node from i= t would be a nontrivial rearchitecting. * On the other hand, using the EFI API more extensively introduces a depende= nce on the specific platform's implementation. These may be buggy, to othe= rwise untrustworthy. * Leaning this heavily on EFI would depart somewhat from the existing boot a= rchitecture. * Going the full EFI route would involve rewriting a whole lot of the EFI bo= ot1 and loader (I'm willing to undertake this, but it's enough of a change t= hat it should be understood and discussed before doing it; also, it might be= worth doing in stages) Please provide input/feedback/discussion...=