From owner-freebsd-hackers@freebsd.org Sun Mar 20 08:40:26 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 2D369AD64F1 for ; Sun, 20 Mar 2016 08:40:26 +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 AEA0725A for ; Sun, 20 Mar 2016 08:40:25 +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 u2K8HeFg025146 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 20 Mar 2016 09:17:41 +0100 (CET) (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 u2K8He1t004407; Sun, 20 Mar 2016 09:17:40 +0100 (CET) (envelope-from wojtek@puchar.net) Received: from localhost (wojtek@localhost) by laptop.wojtek.intra (8.14.9/8.14.9/Submit) with ESMTP id u2K8HYJU004404; Sun, 20 Mar 2016 09:17:35 +0100 (CET) (envelope-from wojtek@puchar.net) X-Authentication-Warning: laptop.wojtek.intra: wojtek owned process doing -bs Date: Sun, 20 Mar 2016 09:17:34 +0100 (CET) From: Wojciech Puchar X-X-Sender: wojtek@laptop.wojtek.intra To: "Littlefield, Tyler" cc: freebsd-hackers@freebsd.org Subject: Re: looking for areas to contribute In-Reply-To: <56ED75D8.1050800@tysdomain.com> Message-ID: References: <56ED75D8.1050800@tysdomain.com> 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, 20 Mar 2016 09:17:42 +0100 (CET) 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, 20 Mar 2016 08:40:26 -0000 > great. My questions: > > 1) How do people usually have their environments set up? I'm thinking > of running fbsd11 in BHyve where I can do testing, but if there's a Or virtualbox. Works perfectly fine. From owner-freebsd-hackers@freebsd.org Sun Mar 20 10:17: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 DD0B5AD610A for ; Sun, 20 Mar 2016 10:17:48 +0000 (UTC) (envelope-from tmacintyre@outlook.com) Received: from DUB004-OMC3S35.hotmail.com (dub004-omc3s35.hotmail.com [157.55.2.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "*.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6DF888BD for ; Sun, 20 Mar 2016 10:17:47 +0000 (UTC) (envelope-from tmacintyre@outlook.com) Received: from emea01-db3-obe.outbound.protection.outlook.com ([157.55.2.7]) by DUB004-OMC3S35.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Sun, 20 Mar 2016 03:16:38 -0700 Received: from VI1PR05MB1343.eurprd05.prod.outlook.com (10.162.122.17) by VI1PR05MB1342.eurprd05.prod.outlook.com (10.162.122.16) with Microsoft SMTP Server (TLS) id 15.1.443.12; Sun, 20 Mar 2016 10:16:37 +0000 Received: from VI1PR05MB1343.eurprd05.prod.outlook.com ([10.162.122.17]) by VI1PR05MB1343.eurprd05.prod.outlook.com ([10.162.122.17]) with mapi id 15.01.0443.014; Sun, 20 Mar 2016 10:16:37 +0000 From: Timothy Macintyre To: "freebsd-hackers@freebsd.org" Subject: Fw: FreeBSD 9.0 16kb Page Size Thread-Topic: FreeBSD 9.0 16kb Page Size Thread-Index: AQHRgQZRiqBUlaTEwUqLSvGGVnwODJ9gs3YAgAAhI1eAAUxfhQ== Date: Sun, 20 Mar 2016 10:16:37 +0000 Message-ID: References: , <20160319132752.932a5a1e.freebsd@edvax.de>, In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: freebsd.org; dkim=none (message not signed) header.d=none;freebsd.org; dmarc=none action=none header.from=outlook.com; x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [cVDsWs+j58ost/mYh5fVvCajvun2lDWx] x-ms-office365-filtering-correlation-id: e4d49391-cf7e-4264-e94f-08d350a8b8c7 x-microsoft-exchange-diagnostics: 1; VI1PR05MB1342; 23:Ih6OSifplAMWe/qrA8PpRHickufmH8d8yixlwoRshevql4H2cli1UwzLtIG8PQNY0gGMsesEYibPQOo1Tnls6ubvY25SpL3OTvVQZjdEPEeA7cnfqH9kYO4ai2rsmNdFG32Kh/8ZWiPXlaKXfzpfY3Yql5vbpGepuGckSDhwwdUzN3nZha9L046v4kmmU4EG+A6p/V5kvQ+zmYCu3iPBEg==; 5:h/DWxElPPFbPIj1xNqeZgFLy6a84UEy2QmgvRkW9AEb0UFgirv3/t+cFSjObNfGeLpj+NfTgFT9PzOi9fi9aLWdtB3Ar+0Fhp8j5Pb66+bSIUa1tUAjPRyqyCo6sE6CgVucD932NsjPhJzGpsLIiqw==; 24:v749gDEaI2DpEcQGhBcAmd38AO10PW1UvtXAg86UwNryiu7V+/+C4eGyn+SkfAGv1qbdhOnhl7R/xsIFlDtowfKCLEcKRqfbJ//Hoi1ABGs= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR05MB1342; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(432015012)(82015046); SRVR:VI1PR05MB1342; BCL:0; PCL:0; RULEID:; SRVR:VI1PR05MB1342; x-forefront-prvs: 088751B4D4 x-forefront-antispam-report: SFV:NSPM; SFS:(7070004)(98900003); DIR:OUT; SFP:1901; SCL:1; SRVR:VI1PR05MB1342; H:VI1PR05MB1343.eurprd05.prod.outlook.com; FPR:; SPF:None; MLV:ovrnspm; LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Mar 2016 10:16:37.3427 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB1342 X-OriginalArrivalTime: 20 Mar 2016 10:16:38.0776 (UTC) FILETIME=[971FAF80:01D18291] 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, 20 Mar 2016 10:17:49 -0000 Hi, I originally asked this on freebsd-questions (below) and was forwarded here= . I have tried updating the page size of the latest release (10) and the ke= rnel still crashes, I imagine I'm missing something like an invalid struct = size but not sure where. Any help would be greatly appreciated. Thanks. ________________________________________ From: Polytropon Sent: 19 March 2016 12:27 To: Timothy Macintyre Cc: freebsd-questions@freebsd.org Subject: Re: FreeBSD 9.0 16kb Page Size On Fri, 18 Mar 2016 11:11:17 +0000, Timothy Macintyre wrote: > I'm trying to do some testing on FreeBSD 9.0 with the page size > set to 16kb on amd64 but I'm having trouble building a stable kernel. > > I've changed the PAGE_SHIFT to 14 under param.h and also updated > pmap.h/c with the following values so it doesn't complain about > invalid struct sizes at compile but I'm getting a crash after > install and reboot. Is there something I'm missing here? > > > #define _NPCM 12 > #define _NPCPV 677 You should probably repeat that experiment with a currently supported code base. FreeBSD 9.0 is already EOL. The best idea would be to use the FreeBSD 10.2 release (amd64) and make the required changes. In case you have a valid reason not to use FreeBSD 10, but instead need to keep FreeBSD 9, try the most current release, which is FreeBSD 9.3. Remember: it's a legacy release, not a production release. If you have done this and you're still experiencing problems, write to the freebsd-hackers@ mailing list, which is primarily intended for higher-level "Technical Discussions relating to FreeBSD", as freebsd-questions@ is mostly a users' question list (less technical, often focused on "easy" problems). Messing with the bowels of the kernel's memory management isn't a typical "user question". ;-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... From owner-freebsd-hackers@freebsd.org Sun Mar 20 12:33: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 5036EAD4D12 for ; Sun, 20 Mar 2016 12:33:02 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D377934F for ; Sun, 20 Mar 2016 12:33:01 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u2KCWuUg000564 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 20 Mar 2016 14:32:57 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u2KCWuUg000564 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u2KCWuZO000563; Sun, 20 Mar 2016 14:32:56 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 20 Mar 2016 14:32:56 +0200 From: Konstantin Belousov To: Timothy Macintyre Cc: "freebsd-hackers@freebsd.org" Subject: Re: Fw: FreeBSD 9.0 16kb Page Size Message-ID: <20160320123256.GH1741@kib.kiev.ua> References: <20160319132752.932a5a1e.freebsd@edvax.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 20 Mar 2016 12:33:02 -0000 On Sun, Mar 20, 2016 at 10:16:37AM +0000, Timothy Macintyre wrote: > Hi, > > I originally asked this on freebsd-questions (below) and was forwarded here. I have tried updating the page size of the latest release (10) and the kernel still crashes, I imagine I'm missing something like an invalid struct size but not sure where. Any help would be greatly appreciated. > You did not added the patch which would show what have you done so far. First, I am interesting why do you want to use 16K pages on amd64. I am aware that somebody did an experiment with 8K pages on i386 or amd64, not sure which arch was it. The goal was to reduce memory allocation cost in CPU cycles, but the pay for it was more severe memory underutilization and in fact more CPU use in pmap. Note that hardware only supports 4K/2M/1G page sizes, so 16K pages require different code than what is currently present in amd64/pmap.c. You cannot get away with just redefining constants. One on the issue is software->hardware flow. One PTE only maps 4K still, so to map the whole 16K page you need to fill 4 consequtive PTEs. Note that the pmap code assumes atomic pte updates, you would need to consider this requirement when doing the adjustments. Another issue is hardware->software. Since one page is mapped with 4 PTEs, you have 4 accessed/modified bits from PTEs to reflect to the high-level vm_page_t state. This is related to the atomicity issue I noted above. Summary is, what you want to do (for whatever reason) cannot be achieved by changing compilation constants, it requires code changes, some of them are delicate. > Thanks. > > ________________________________________ > From: Polytropon > Sent: 19 March 2016 12:27 > To: Timothy Macintyre > Cc: freebsd-questions@freebsd.org > Subject: Re: FreeBSD 9.0 16kb Page Size > > On Fri, 18 Mar 2016 11:11:17 +0000, Timothy Macintyre wrote: > > I'm trying to do some testing on FreeBSD 9.0 with the page size > > set to 16kb on amd64 but I'm having trouble building a stable kernel. > > > > I've changed the PAGE_SHIFT to 14 under param.h and also updated > > pmap.h/c with the following values so it doesn't complain about > > invalid struct sizes at compile but I'm getting a crash after > > install and reboot. Is there something I'm missing here? > > > > > > #define _NPCM 12 > > #define _NPCPV 677 > > You should probably repeat that experiment with a currently > supported code base. FreeBSD 9.0 is already EOL. The best > idea would be to use the FreeBSD 10.2 release (amd64) and > make the required changes. > > In case you have a valid reason not to use FreeBSD 10, but > instead need to keep FreeBSD 9, try the most current release, > which is FreeBSD 9.3. Remember: it's a legacy release, not a > production release. > > If you have done this and you're still experiencing problems, > write to the freebsd-hackers@ mailing list, which is primarily > intended for higher-level "Technical Discussions relating to > FreeBSD", as freebsd-questions@ is mostly a users' question > list (less technical, often focused on "easy" problems). > Messing with the bowels of the kernel's memory management > isn't a typical "user question". ;-) > > > > > -- > Polytropon > Magdeburg, Germany > Happy FreeBSD user since 4.0 > Andra moi ennepe, Mousa, ... > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@freebsd.org Sun Mar 20 15:52:03 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 44842AD7DD1 for ; Sun, 20 Mar 2016 15:52:03 +0000 (UTC) (envelope-from david.i.noel@gmail.com) Received: from mail-vk0-x22e.google.com (mail-vk0-x22e.google.com [IPv6:2607:f8b0:400c:c05::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0C9C299A for ; Sun, 20 Mar 2016 15:52:03 +0000 (UTC) (envelope-from david.i.noel@gmail.com) Received: by mail-vk0-x22e.google.com with SMTP id q138so99497195vkb.3 for ; Sun, 20 Mar 2016 08:52:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc; bh=EXf8ydCDuuHOrpnKghxP0J6aXAZA7t3dUM8wjn4Uxxg=; b=fp/NnGa1/gM2KIbO/cp2GtgFN4TOMmhAaraeO4k+tKgi5Ht5mi0j0+8bUFGnHesJFr q27SWY4ohAduoiDZEwfxcFWTF44LZxCLQZAuDMO8sWfy/k2CXR2SBKdWO8myiC+LQYQ9 pe2ZvJUsIKy5rLkbcsNDS3Zllvi0yc+zVy2WJWmVomHnnCEYFD8hNIJgtVt9cugsT7+p 7efV+yKD1sEIIJK04G3hA2QiBvl5fLdh4VH8Tc/ry9+ruBtAFdQfusL7an5LV6LP0LtN 9UZ6fHi6uddtWIZzyKkAF2aNtbtSxsf8CWQ0EskIZHYaWDFCPFwJtnLsYQWv24o5ggqA 8PGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:cc; bh=EXf8ydCDuuHOrpnKghxP0J6aXAZA7t3dUM8wjn4Uxxg=; b=Qk/2dcGkvW+b9CP5+fjLa68gFGKUezWTkkzN7K7+dGmImG3iR+es16kmJMc8GcBi3Z Sx77ccKsx8pVPls8eYPjdb+2WLxxFSwaP64WB0eY0n10mZfofEEnnEg9F/3OOyhq2/RH epJ/tDjkDuU/6MEUeAkSEb3zL3bD/nmH+zLCW7xunRxlM+cA4iY+n0W/cR+vbRi6LAd7 UsXMZdKMxvawddHSyuLRxGK62n9QEzjruk95oaNPKyJ6c0StXggAuOM9KyvzgVdMofV4 G/aUHytCUta7hBlR5vZOrF6CFR0jaytfPGz73bqD9vFiQPJcLKt+PQ3jzFctvhdlOnO5 hN/Q== X-Gm-Message-State: AD7BkJLt7paPPpGI6elnOZW62fFU92UA7Gtgi4WGzATC6+Bs7lx11zLPVGPgEidOaPUIDf1TuilNbPKHoiH+zQ== MIME-Version: 1.0 X-Received: by 10.31.8.68 with SMTP id 65mr28032978vki.150.1458489122008; Sun, 20 Mar 2016 08:52:02 -0700 (PDT) Received: by 10.31.236.70 with HTTP; Sun, 20 Mar 2016 08:52:01 -0700 (PDT) Reply-To: David.I.Noel@gmail.com In-Reply-To: <56ED75D8.1050800@tysdomain.com> References: <56ED75D8.1050800@tysdomain.com> Date: Sun, 20 Mar 2016 10:52:01 -0500 Message-ID: Subject: Re: looking for areas to contribute From: David I Noel To: tyler@tysdomain.com Cc: freebsd-hackers@freebsd.org 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: Sun, 20 Mar 2016 15:52:03 -0000 >On 3/19/16, Littlefield, Tyler > I'm fluent with C and other languages and want to start contributing > to BSD. I'm happy to work where ever I can be of use, I love more > lower level stuff but anything that has me working on code would be > great. My questions: Hi Tyler, While not as glamorous as some of the more lower-level work, there are a handful of potentially nasty script-related bugs in the base copies of portsnap, freebsd-update, and pmirror that have been sitting around for a decade or so now: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188428 (MITM against portsnap) https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188430 (Freeze against portsnap) https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188429 (MITM against freebsd-update) https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188434 (Freeze against freebsd-update) https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188432 (MITM against pmirror) It's been a long while since anyone's discussed them, and I wasn't sure how interested in looking into them you might be so I only grabbed a few links, but some of the relevant threads can be found across the lists under the subjects "MITM attacks against portsnap and freebsd-update". I believe there is also some info under "Retiring portsnap [was MITM attacks against portsnap and freebsd-update]". The first was cross-posted to several lists and I believe several independent threads spun off from it as a result. But here are a few quick ones I could find immediately. https://marc.info/?t=139714957000008&r=1&w=2 https://marc.info/?t=139718224200001&r=1&w=2 If you're interested and want more information let me know. Take care, David Noel From owner-freebsd-hackers@freebsd.org Sun Mar 20 17:13:47 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 274F3AD73BA for ; Sun, 20 Mar 2016 17:13:47 +0000 (UTC) (envelope-from eric@metricspace.net) Received: from mail.metricspace.net (207-172-209-83.c3-0.arl-ubr1.sbo-arl.ma.static.cable.rcn.com [207.172.209.83]) by mx1.freebsd.org (Postfix) with ESMTP id 0791ABD4 for ; Sun, 20 Mar 2016 17:13:46 +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 8F38013AB for ; Sun, 20 Mar 2016 17:13:40 +0000 (UTC) Subject: boot1-compatible GELI and GPT code? From: Eric McCorkle Content-Type: text/plain; charset=us-ascii X-Mailer: iPad Mail (13D15) Message-Id: <8F22A0E2-45A3-463B-8CAC-16BEC8DA8883@metricspace.net> Date: Sun, 20 Mar 2016 13:13:39 -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: Sun, 20 Mar 2016 17:13:47 -0000 Hello everyone, I'm working (among other things) on expanding the capabilities of the EFI bo= ot block to be able to load GELI-encrypted partitions, which may contain a G= PT partition table, in order to support full-disk encryption. I'm wondering, is there any code for reading either of these formats that co= uld be used in boot1 hiding out anywhere? It'd be best to avoid rewriting t= his stuff if possible. Also, I haven't investigated the capabilities of loader with regard to GELI y= et beyond cursory inspection. Most importantly, I need to know if loader ca= n handle GPTs and other partition formats inside a GELI, or just single file= systems. As an additional note, it'd be best if there was a method for having boot1 p= ass the key(s) along to loader and ultimately the kernel, so the users don't= have to input their keys 3 times. I'm open to suggestions as to how to do t= his. My initial thought is to create some kind of variable in both loader a= nd kernel, then use the elf data to locate it and directly inject the data p= rior to booting. The rationale is to avoid mechanisms like arguments that c= ould potentially reveal the keys.= From owner-freebsd-hackers@freebsd.org Sun Mar 20 18:05:30 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 53ADAAD7DCB for ; Sun, 20 Mar 2016 18:05:30 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A8A96B9 for ; Sun, 20 Mar 2016 18:05:29 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 56533f21-eec6-11e5-9036-c33267960ba8 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.34.117.227 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.34.117.227]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Sun, 20 Mar 2016 18:05:32 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.14.9) with ESMTP id u2KI5LDG006313; Sun, 20 Mar 2016 12:05:21 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1458497121.68920.83.camel@freebsd.org> Subject: Re: boot1-compatible GELI and GPT code? From: Ian Lepore To: Eric McCorkle , "freebsd-hackers@freebsd.org" Date: Sun, 20 Mar 2016 12:05:21 -0600 In-Reply-To: <8F22A0E2-45A3-463B-8CAC-16BEC8DA8883@metricspace.net> References: <8F22A0E2-45A3-463B-8CAC-16BEC8DA8883@metricspace.net> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 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, 20 Mar 2016 18:05:30 -0000 On Sun, 2016-03-20 at 13:13 -0400, Eric McCorkle wrote: > Hello everyone, > > I'm working (among other things) on expanding the capabilities of the > EFI boot block to be able to load GELI-encrypted partitions, which > may contain a GPT partition table, in order to support full-disk > encryption. > > I'm wondering, is there any code for reading either of these formats > that could be used in boot1 hiding out anywhere? It'd be best to > avoid rewriting this stuff if possible. > > Also, I haven't investigated the capabilities of loader with regard > to GELI yet beyond cursory inspection. Most importantly, I need to > know if loader can handle GPTs and other partition formats inside a > GELI, or just single filesystems. > > As an additional note, it'd be best if there was a method for having > boot1 pass the key(s) along to loader and ultimately the kernel, so > the users don't have to input their keys 3 times. I'm open to > suggestions as to how to do this. My initial thought is to create > some kind of variable in both loader and kernel, then use the elf > data to locate it and directly inject the data prior to booting. The > rationale is to avoid mechanisms like arguments that could > potentially reveal the keys. GELI keys are currently passed from loader(8) to the kernel as environment variables. I was semi-horrified when I stumbled across that -- not the knee-jerk-reaction you'd expect from a security -obsessed person (because I'm soooo not one of those), but rather because it means that the memory passed from loader to the kernel containing the initial env vars must be writable, so that the geli key stuff can be zeroed after it's acccessed. That prevents making the pointer to that memory const everywhere, as it should be. It seems to me that a more correct way to pass the information may be as an opaque data blob, roughly the same way kernel modules and other loaded data gets passed from loader to the kernel. That might facilitate obscuring the info in some way as well. That doesn't really answer your question of how to pass it from boot1 to loader(8), though. There really isn't a lot of leeway there, you pretty much have to put it in memory somewhere (likely into an arch -specific bootinfo struct), and pass a pointer to it in a register when jumping to the loader(8) entry point. (Remember that all of this stuff applies to multiple platforms, not just x86, so it can't just be dropped into some well-known location in memory or anything like that.) -- Ian From owner-freebsd-hackers@freebsd.org Sun Mar 20 18:34:08 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 30117AD69E3 for ; Sun, 20 Mar 2016 18:34:08 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com [IPv6:2a00:1450:400c:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BFC96BD1 for ; Sun, 20 Mar 2016 18:34:07 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: by mail-wm0-x234.google.com with SMTP id p65so98010829wmp.0 for ; Sun, 20 Mar 2016 11:34:07 -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=qHfIZeGnSnTlsgkmaCto43gE3Xj1DlAQYy924PiCerE=; b=cfS72nRVDAXja+PyRr7LMHXEw5o15CC3p+i2WziLu9ejM53euFgQg4FnjpgVX3/B1y eMVWKniL9yud/+XD0kaL1mFX9OTdR4FUoRqD397rAMnTtBKV7OlM7o506kkmkxK67Lnn TJoRmgrpNUaFDpwgJprwqwn5tW3ZtTggFkl4h+eInABZymi+heXq4C+Ot4zanG1IPmAW ZUmntpVxKG+iOpvfz6ftn1eioGIhzgGVc/phoZMEg84O74A4CPJR012K3At9WtgxE36x IUz/Cc/q86Revz4g1zdc+1N/Ea9GgLwRmfQWq/BA+lpO1ub/vfkqMMVMb5Bz0x6hGRzd /keA== 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=qHfIZeGnSnTlsgkmaCto43gE3Xj1DlAQYy924PiCerE=; b=GCy1K4MtVkg07SuHDHw68bHSLUlnDkGdiTKfCROT7XwYAu9NgvvMUMbXv0trfk/He1 v5plmPyIxznU9jnUDvoBw6zirm0hb6kJ1lWJke0mRhgO7IpmO4opxLs5ljMiyA3IaUyC 6HZDdMM2S7UP3Kit2v7vzwT8l6W4a1qTq/iOHmvfxNwcVjXSiXvcBKug9qNPg+KGVI3L LfQsfT8/b8KVajnmJIMDD3gEnhPm8L13JkPi3+SrW/O/Ud/5isany05R8GOWpAA37p95 +iKA/uXjm8W7KwS8VXNBP0jbRUQ9Hv4yDoP4O1HZG+lfHIGa1MftmnCBkeGl1/EyiJKp OOkQ== X-Gm-Message-State: AD7BkJKkLQqxMujbH2OIcf3bf/pTJ4qg4kadV4hjSUltcoTzh0wNmej/+QWA21RrsN8HfgWc X-Received: by 10.195.13.76 with SMTP id ew12mr29571123wjd.68.1458498845902; Sun, 20 Mar 2016 11:34:05 -0700 (PDT) Received: from [10.10.1.58] (liv3d.labs.multiplay.co.uk. [82.69.141.171]) by smtp.gmail.com with ESMTPSA id gk4sm21753639wjd.7.2016.03.20.11.34.04 for (version=TLSv1/SSLv3 cipher=OTHER); Sun, 20 Mar 2016 11:34:04 -0700 (PDT) Subject: Re: boot1-compatible GELI and GPT code? To: freebsd-hackers@freebsd.org References: <8F22A0E2-45A3-463B-8CAC-16BEC8DA8883@metricspace.net> From: Steven Hartland Message-ID: <56EEED20.80607@multiplay.co.uk> Date: Sun, 20 Mar 2016 18:34:08 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <8F22A0E2-45A3-463B-8CAC-16BEC8DA8883@metricspace.net> 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, 20 Mar 2016 18:34:08 -0000 Support for this is already in HEAD, give it a go :) On 20/03/2016 17:13, Eric McCorkle wrote: > Hello everyone, > > I'm working (among other things) on expanding the capabilities of the EFI boot block to be able to load GELI-encrypted partitions, which may contain a GPT partition table, in order to support full-disk encryption. > > I'm wondering, is there any code for reading either of these formats that could be used in boot1 hiding out anywhere? It'd be best to avoid rewriting this stuff if possible. > > Also, I haven't investigated the capabilities of loader with regard to GELI yet beyond cursory inspection. Most importantly, I need to know if loader can handle GPTs and other partition formats inside a GELI, or just single filesystems. > > As an additional note, it'd be best if there was a method for having boot1 pass the key(s) along to loader and ultimately the kernel, so the users don't have to input their keys 3 times. I'm open to suggestions as to how to do this. My initial thought is to create some kind of variable in both loader and kernel, then use the elf data to locate it and directly inject the data prior to booting. The rationale is to avoid mechanisms like arguments that could potentially reveal the keys. > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@freebsd.org Sun Mar 20 18:43: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 11403AD73F9 for ; Sun, 20 Mar 2016 18:43:51 +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 B052519FF for ; Sun, 20 Mar 2016 18:43:50 +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 C07D5D6BF for ; Sun, 20 Mar 2016 18:43:43 +0000 (UTC) Subject: Re: boot1-compatible GELI and GPT code? To: freebsd-hackers@freebsd.org References: <8F22A0E2-45A3-463B-8CAC-16BEC8DA8883@metricspace.net> From: Allan Jude Message-ID: <56EEEF5B.4010605@freebsd.org> Date: Sun, 20 Mar 2016 14:43:39 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <8F22A0E2-45A3-463B-8CAC-16BEC8DA8883@metricspace.net> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PwRckLVeSHb9tu0NA2hmDu7fOOrAMrov9" 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, 20 Mar 2016 18:43:51 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PwRckLVeSHb9tu0NA2hmDu7fOOrAMrov9 Content-Type: multipart/mixed; boundary="j1jsX6B6A3If2Vo9C18ie3gwMktComA0o" From: Allan Jude To: freebsd-hackers@freebsd.org Message-ID: <56EEEF5B.4010605@freebsd.org> Subject: Re: boot1-compatible GELI and GPT code? References: <8F22A0E2-45A3-463B-8CAC-16BEC8DA8883@metricspace.net> In-Reply-To: <8F22A0E2-45A3-463B-8CAC-16BEC8DA8883@metricspace.net> --j1jsX6B6A3If2Vo9C18ie3gwMktComA0o Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2016-03-20 13:13, Eric McCorkle wrote: > Hello everyone, >=20 > I'm working (among other things) on expanding the capabilities of the E= FI boot block to be able to load GELI-encrypted partitions, which may con= tain a GPT partition table, in order to support full-disk encryption. >=20 > I'm wondering, is there any code for reading either of these formats th= at could be used in boot1 hiding out anywhere? It'd be best to avoid rew= riting this stuff if possible. >=20 > Also, I haven't investigated the capabilities of loader with regard to = GELI yet beyond cursory inspection. Most importantly, I need to know if = loader can handle GPTs and other partition formats inside a GELI, or just= single filesystems. >=20 > As an additional note, it'd be best if there was a method for having bo= ot1 pass the key(s) along to loader and ultimately the kernel, so the use= rs don't have to input their keys 3 times. I'm open to suggestions as to= how to do this. My initial thought is to create some kind of variable i= n both loader and kernel, then use the elf data to locate it and directly= inject the data prior to booting. The rationale is to avoid mechanisms = like arguments that could potentially reveal the keys. > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.o= rg" >=20 I presented a paper on my work in this area (booting from a GELI encrypted partition, it does not GELI encrypt the GPT table) at AsiaBSDCon last weekend, and committed it this week. Here is the paper: http://allanjude.com/bsd/AsiaBSDCon2016_geliboot.pdf The commit was: r296963 https://svnweb.freebsd.org/changeset/base/296963 I am interested in applying this work to UEFI as well. Is there much advantage to encrypted the GPT table as well? Currently my setup leaves the partition table, and the code up to boot2 unencrypted. Only encrypting the actual OS partition (/boot/{zfs,}loader, /boot/kernel, etc). Swap is encrypted separately with a unique throw-away key per reboot. --=20 Allan Jude --j1jsX6B6A3If2Vo9C18ie3gwMktComA0o-- --PwRckLVeSHb9tu0NA2hmDu7fOOrAMrov9 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.0.22 (MingW32) iQIcBAEBAgAGBQJW7u9fAAoJEBmVNT4SmAt+MTwQAKpCWXeYN2WyNWCTlRy82mhd eo0X9T3fBi5tftXl7LSWmAPlFlQlZEkE9FZPai6QySLmTGVD3K59omFa3wy5hoNj BBnDEN1mxgggsNh9lC8ZVQDys/H7ajnxZE7XhEZpSfevYvU8m0MHtyRq7NUckjBH lYKuyJTTyB8yDjpMj/Quz2Y1zHJEbF/660adLkZ1Lk1KB9u+gMz6biFXRJicNg6m 9Grns5p87E6/k0PUZkSVluasfXJ/NjPXfUpChBe+9L8WrHkEYt8ZZd5auOOxgJoK HCiLOyT+jmjFK0drl1Nh7q+kjK2+55HQ+fDCKiqdguVx5Gm/vJZjvTmocPGO6PC0 kwrCDXAp6khmx8XyokXNyXiRLrFduPffNy/PgunCzvRSzhOzEQNwoSF72evg/bpt bB6VPbBe/Bj93oenF43Ogyl65bSa8yamFr6Hl2r6DHn9CQNnSx2TKETp4dctFMP/ uyLc73n9JjqEJsM298c4pF/UQF1baqNWYWiEyTh8rX85MC6Sj57ZqH/KGazfyhDS tovSHpOayuLw96ctYrSXiskogKIjG4TBtW0UmfySbfeCvGhif3yMe72RCBYlOsig eXThCzJr6wWNrmG7ye/+OumncXCGn4xI5JgEErA6BpMAPkYr3fVU/hQtzjyIdAKi vQ+oIo846ZQtW+4Pz4GG =1A26 -----END PGP SIGNATURE----- --PwRckLVeSHb9tu0NA2hmDu7fOOrAMrov9-- From owner-freebsd-hackers@freebsd.org Sun Mar 20 18:45: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 20F88AD747B for ; Sun, 20 Mar 2016 18:45:21 +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 003551B89 for ; Sun, 20 Mar 2016 18:45:20 +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 5E404D6CC for ; Sun, 20 Mar 2016 18:45:20 +0000 (UTC) Subject: Re: boot1-compatible GELI and GPT code? To: freebsd-hackers@freebsd.org References: <8F22A0E2-45A3-463B-8CAC-16BEC8DA8883@metricspace.net> <1458497121.68920.83.camel@freebsd.org> From: Allan Jude Message-ID: <56EEEFBF.1000203@freebsd.org> Date: Sun, 20 Mar 2016 14:45:19 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1458497121.68920.83.camel@freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="511EPBogwCeR35nhtG0qaQaMjUGhGJVVC" 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, 20 Mar 2016 18:45:21 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --511EPBogwCeR35nhtG0qaQaMjUGhGJVVC Content-Type: multipart/mixed; boundary="7NAhgG6OaLKWfRdt0PfnINkfcKSGapUhG" From: Allan Jude To: freebsd-hackers@freebsd.org Message-ID: <56EEEFBF.1000203@freebsd.org> Subject: Re: boot1-compatible GELI and GPT code? References: <8F22A0E2-45A3-463B-8CAC-16BEC8DA8883@metricspace.net> <1458497121.68920.83.camel@freebsd.org> In-Reply-To: <1458497121.68920.83.camel@freebsd.org> --7NAhgG6OaLKWfRdt0PfnINkfcKSGapUhG Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2016-03-20 14:05, Ian Lepore wrote: > On Sun, 2016-03-20 at 13:13 -0400, Eric McCorkle wrote: >> Hello everyone, >> >> I'm working (among other things) on expanding the capabilities of the >> EFI boot block to be able to load GELI-encrypted partitions, which >> may contain a GPT partition table, in order to support full-disk >> encryption. >> >> I'm wondering, is there any code for reading either of these formats >> that could be used in boot1 hiding out anywhere? It'd be best to >> avoid rewriting this stuff if possible. >> >> Also, I haven't investigated the capabilities of loader with regard >> to GELI yet beyond cursory inspection. Most importantly, I need to >> know if loader can handle GPTs and other partition formats inside a >> GELI, or just single filesystems. >> >> As an additional note, it'd be best if there was a method for having >> boot1 pass the key(s) along to loader and ultimately the kernel, so >> the users don't have to input their keys 3 times. I'm open to >> suggestions as to how to do this. My initial thought is to create >> some kind of variable in both loader and kernel, then use the elf >> data to locate it and directly inject the data prior to booting. The >> rationale is to avoid mechanisms like arguments that could >> potentially reveal the keys. >=20 > GELI keys are currently passed from loader(8) to the kernel as > environment variables. I was semi-horrified when I stumbled across > that -- not the knee-jerk-reaction you'd expect from a security > -obsessed person (because I'm soooo not one of those), but rather > because it means that the memory passed from loader to the kernel > containing the initial env vars must be writable, so that the geli key > stuff can be zeroed after it's acccessed. That prevents making the > pointer to that memory const everywhere, as it should be. >=20 > It seems to me that a more correct way to pass the information may be > as an opaque data blob, roughly the same way kernel modules and other > loaded data gets passed from loader to the kernel. That might > facilitate obscuring the info in some way as well. >=20 > That doesn't really answer your question of how to pass it from boot1 > to loader(8), though. There really isn't a lot of leeway there, you > pretty much have to put it in memory somewhere (likely into an arch > -specific bootinfo struct), and pass a pointer to it in a register when= > jumping to the loader(8) entry point. (Remember that all of this stuff= > applies to multiple platforms, not just x86, so it can't just be > dropped into some well-known location in memory or anything like that.)= >=20 This is how I did it in my recent work. Added an additional field to the 'extended boot info' struct, to pass the data from boot2 to the loader. My work only targeted i386/amd64. > -- Ian >=20 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.o= rg" >=20 --=20 Allan Jude --7NAhgG6OaLKWfRdt0PfnINkfcKSGapUhG-- --511EPBogwCeR35nhtG0qaQaMjUGhGJVVC 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.0.22 (MingW32) iQIcBAEBAgAGBQJW7u+/AAoJEBmVNT4SmAt+YE4QAJTRyaGZdZNCkKc+rcKkO89c 8sqTr2vtTRvblxplC7ceRQn7E8Da8cPvSIBBtxftqUV7feCimvz3XyT/JD1uGh+h nElZknMkpW7NGxbDnLHIIs6MttpwQHWzyP/ToEEwtz0AR0mGF36KQHSeYUM+rN4c i+FTXt+avZH5PRbu8bpTZZfq0c7Csve0WMtQ5l2N+F10GNzTxR+ZfarOalAJ+SXk zMINhjMxyWGNNYe6HLj8viPopp9+UlHYlJfKpWvihX5xP4bn2prX4be3JOn/w438 2zPkElDcrcRdJsIPvk+hdbrpLOfmOcHpMeOY+1kmHFwUtaOgbTxwgjIMB8mPraWD BMGZwQSoUlbRTG27yWlw69FPr9P5+sQ9RsaTAl6A7YXXE+1053ghEPs16fd+avIJ 6O+vIrw4JUNBT1NoQkOsFtj8ikLNn3yGxeON8sWr923vwXtej4ejCrW9z1Yj+ghr mXfJPsXrBtDDaCohjPFdeuRtydoKwU2n38X/n6bJggP/y3w1FvgMbKGvK4Zpfp0J N6qP7IGDiD6+UMUl6iOab0SIuhtedN3vuiCr0XeIDeN6mkqa1S2jMPOV+pNZas2G Gjt8vQWkJKYmrS0Pix5ZOclEaq3VVZLY8iIcGiltG9NSRQLQmUsgCgCoCu59rn6h oDSujFCsJ/jtyrGGIZKf =jmi6 -----END PGP SIGNATURE----- --511EPBogwCeR35nhtG0qaQaMjUGhGJVVC-- From owner-freebsd-hackers@freebsd.org Sun Mar 20 19:10:58 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 25012AD7A99 for ; Sun, 20 Mar 2016 19:10:58 +0000 (UTC) (envelope-from eric@metricspace.net) Received: from mail.metricspace.net (207-172-209-83.c3-0.arl-ubr1.sbo-arl.ma.static.cable.rcn.com [207.172.209.83]) by mx1.freebsd.org (Postfix) with ESMTP id F3D1ED90; Sun, 20 Mar 2016 19:10:57 +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 A9AE913D9; Sun, 20 Mar 2016 19:10:56 +0000 (UTC) References: <8F22A0E2-45A3-463B-8CAC-16BEC8DA8883@metricspace.net> <1458497121.68920.83.camel@freebsd.org> <56EEEFBF.1000203@freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: <56EEEFBF.1000203@freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: Cc: freebsd-hackers@freebsd.org X-Mailer: iPad Mail (13D15) From: Eric McCorkle Subject: Re: boot1-compatible GELI and GPT code? Date: Sun, 20 Mar 2016 15:10:55 -0400 To: Allan Jude 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, 20 Mar 2016 19:10:58 -0000 In EFI, you don't have the bootinfo struct, you just have command-line style= args going from boot to loader. Right now, the efi loader doesn't even loo= k at the args. Some thoughts: * The ideal solution (if you trust HSMs and have one at all) would be to loa= d the keys into an HSM in boot, and rely on it from there. That's a lot of h= ardware support in boot, though. * There is some incentive to avoid args/env variables. There's a very real r= isk of your keys getting leaked by debugging/logging messages. Also, at lea= st in the efi boot to loader transition, I wouldn't put it past the likes of= Lenovo to record all ExecImage activity, which would slurp the keys if that= method was used. Also, it'd be big change to the efi loader to add args (an= d a potential vuln to parse them) * With the variable injection method I proposed as well as with a method of s= ynthesizing a loadable module in memory, an attacker capable of getting the k= eys would have to be able to access kernel memory. The only safe option to me seems to be either injecting the keys straight in= to the executable, or else synthesizing modules containing them and loading t= hem. Now, you'll need to also do this for loader, which is a COFF binary. B= oth approaches have their merits, though I think I slightly prefer the injec= tion method. > On Mar 20, 2016, at 14:45, Allan Jude wrote: >=20 >> On 2016-03-20 14:05, Ian Lepore wrote: >>> On Sun, 2016-03-20 at 13:13 -0400, Eric McCorkle wrote: >>> Hello everyone, >>>=20 >>> I'm working (among other things) on expanding the capabilities of the >>> EFI boot block to be able to load GELI-encrypted partitions, which >>> may contain a GPT partition table, in order to support full-disk >>> encryption. >>>=20 >>> I'm wondering, is there any code for reading either of these formats >>> that could be used in boot1 hiding out anywhere? It'd be best to >>> avoid rewriting this stuff if possible. >>>=20 >>> Also, I haven't investigated the capabilities of loader with regard >>> to GELI yet beyond cursory inspection. Most importantly, I need to >>> know if loader can handle GPTs and other partition formats inside a >>> GELI, or just single filesystems. >>>=20 >>> As an additional note, it'd be best if there was a method for having >>> boot1 pass the key(s) along to loader and ultimately the kernel, so >>> the users don't have to input their keys 3 times. I'm open to >>> suggestions as to how to do this. My initial thought is to create >>> some kind of variable in both loader and kernel, then use the elf >>> data to locate it and directly inject the data prior to booting. The >>> rationale is to avoid mechanisms like arguments that could >>> potentially reveal the keys. >>=20 >> GELI keys are currently passed from loader(8) to the kernel as >> environment variables. I was semi-horrified when I stumbled across >> that -- not the knee-jerk-reaction you'd expect from a security >> -obsessed person (because I'm soooo not one of those), but rather >> because it means that the memory passed from loader to the kernel >> containing the initial env vars must be writable, so that the geli key >> stuff can be zeroed after it's acccessed. That prevents making the >> pointer to that memory const everywhere, as it should be. >>=20 >> It seems to me that a more correct way to pass the information may be >> as an opaque data blob, roughly the same way kernel modules and other >> loaded data gets passed from loader to the kernel. That might >> facilitate obscuring the info in some way as well. >>=20 >> That doesn't really answer your question of how to pass it from boot1 >> to loader(8), though. There really isn't a lot of leeway there, you >> pretty much have to put it in memory somewhere (likely into an arch >> -specific bootinfo struct), and pass a pointer to it in a register when >> jumping to the loader(8) entry point. (Remember that all of this stuff >> applies to multiple platforms, not just x86, so it can't just be >> dropped into some well-known location in memory or anything like that.) >=20 > This is how I did it in my recent work. Added an additional field to the > 'extended boot info' struct, to pass the data from boot2 to the loader. > My work only targeted i386/amd64. >=20 >> -- Ian >>=20 >> _______________________________________________ >> 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= " >=20 >=20 > --=20 > Allan Jude >=20 From owner-freebsd-hackers@freebsd.org Sun Mar 20 19:25:26 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 6E222AD7F4E for ; Sun, 20 Mar 2016 19:25:26 +0000 (UTC) (envelope-from eric@metricspace.net) Received: from mail.metricspace.net (207-172-209-83.c3-0.arl-ubr1.sbo-arl.ma.static.cable.rcn.com [207.172.209.83]) by mx1.freebsd.org (Postfix) with ESMTP id 4C73919D9; Sun, 20 Mar 2016 19:25:25 +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 6A6AE13DE; Sun, 20 Mar 2016 19:25:24 +0000 (UTC) References: <8F22A0E2-45A3-463B-8CAC-16BEC8DA8883@metricspace.net> <56EEEF5B.4010605@freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: <56EEEF5B.4010605@freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: Cc: freebsd-hackers@freebsd.org X-Mailer: iPad Mail (13D15) From: Eric McCorkle Subject: Re: boot1-compatible GELI and GPT code? Date: Sun, 20 Mar 2016 15:25:23 -0400 To: Allan Jude 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, 20 Mar 2016 19:25:26 -0000 On Mar 20, 2016, at 14:43, Allan Jude wrote: >=20 > I presented a paper on my work in this area (booting from a GELI > encrypted partition, it does not GELI encrypt the GPT table) at > AsiaBSDCon last weekend, and committed it this week. >=20 > Here is the paper: http://allanjude.com/bsd/AsiaBSDCon2016_geliboot.pdf >=20 > The commit was: r296963 https://svnweb.freebsd.org/changeset/base/296963 Thanks, I'll check it out. > I am interested in applying this work to UEFI as well. I've got a branch going on my github. I've pushed some initial code that ad= ds "provider modules" to boot, which basically consume a device and produce m= ore devices. I haven't actually written any provider modules yet though. https://github.com/emc2/freebsd/tree/geli_efi > Is there much advantage to encrypted the GPT table as well? Currently my > setup leaves the partition table, and the code up to boot2 unencrypted. > Only encrypting the actual OS partition (/boot/{zfs,}loader, > /boot/kernel, etc). Swap is encrypted separately with a unique > throw-away key per reboot. Generally speaking, the less knowledge an attacker has, the better. If they= know the filesystems types (obtainable from the GPT), then they know the lo= cations of the superblocks and likely can guess at least some of the content= s. They also may be able to glean information from which sectors changed of= they can observe the disk multiple times over time. By contrast, if all th= ey have is a big encrypted block, it's harder to infer anything about what's= inside.= From owner-freebsd-hackers@freebsd.org Sun Mar 20 20:11: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 C26B8AD753C for ; Sun, 20 Mar 2016 20:11:07 +0000 (UTC) (envelope-from eric@metricspace.net) Received: from mail.metricspace.net (207-172-209-83.c3-0.arl-ubr1.sbo-arl.ma.static.cable.rcn.com [207.172.209.83]) by mx1.freebsd.org (Postfix) with ESMTP id 8F58EC96; Sun, 20 Mar 2016 20:11:07 +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 3979F13FD; Sun, 20 Mar 2016 20:11:05 +0000 (UTC) References: <8F22A0E2-45A3-463B-8CAC-16BEC8DA8883@metricspace.net> <1458497121.68920.83.camel@freebsd.org> <56EEEFBF.1000203@freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: <2216F82C-A7FA-40DD-B2DF-9808DAA0BC77@metricspace.net> Cc: freebsd-hackers@freebsd.org X-Mailer: iPad Mail (13D15) From: Eric McCorkle Subject: Re: boot1-compatible GELI and GPT code? Date: Sun, 20 Mar 2016 16:11:04 -0400 To: Allan Jude 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, 20 Mar 2016 20:11:07 -0000 > On Mar 20, 2016, at 15:10, Eric McCorkle wrote: >=20 > The only safe option to me seems to be either injecting the keys straight i= nto the executable, or else synthesizing modules containing them and loading= them. Now, you'll need to also do this for loader, which is a COFF binary.= Both approaches have their merits, though I think I slightly prefer the in= jection method. Actually, I changed my mind. The sanest way to support both HSMs and non-HS= M methods all the way through the boot process, I think, would be to have mo= dules that box up all of the asking for keys, storing them, and providing ac= cess/crypto functionality. In EFI land, this would take the form of a modul= e (COFF), probably stored on the efi partition and loaded by boot and subseq= uently used provided by loader. In kernel land, this would be kernel module= . In the non-HSM case, you could probably jettison the kernel module after y= ou get the keys out of it. You could handle the non-HSM case by having an ELF image wrapped *inside* th= e COFF (EFI) image, where the COFF code ends up storing the keys in to the E= LF image when it obtains them. Then when loading the kernel modules, you co= py the elf image out and load it, then zero out the original image. This interface probably ought to be informed by the kernel crypto framework.= Also, I'm admittedly lacking in knowledge about FreeBSD hardware crypto su= pport.= From owner-freebsd-hackers@freebsd.org Mon Mar 21 04:00: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 BF6B9AD729E for ; Mon, 21 Mar 2016 04:00:07 +0000 (UTC) (envelope-from jb@hypatia.MAE.cwru.edu) Received: from falstaff.MAE.cwru.edu (falstaff.mae.cwru.edu [129.22.152.40]) (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 7E032277 for ; Mon, 21 Mar 2016 04:00:06 +0000 (UTC) (envelope-from jb@hypatia.MAE.cwru.edu) Received: from hypatia (root@hypatia [129.22.152.37]) by falstaff.MAE.cwru.edu (8.13.8+Sun/8.13.8) with ESMTP id u2L3nuNC027451 for ; Sun, 20 Mar 2016 23:49:56 -0400 (EDT) Received: from hypatia.MAE.cwru.edu (jb@localhost [127.0.0.1]) by hypatia (8.13.8+Sun/8.13.7) with ESMTP id u2L3nueA027448 for ; Sun, 20 Mar 2016 23:49:56 -0400 (EDT) Received: (from jb@localhost) by hypatia.MAE.cwru.edu (8.13.8+Sun/8.13.8/Submit) id u2L3nuGu027447 for freebsd-hackers@freebsd.org; Sun, 20 Mar 2016 23:49:56 -0400 (EDT) Message-Id: <201603210349.u2L3nuGu027447@hypatia.MAE.cwru.edu> Subject: write(2) returns ERR#12 'Cannot allocate memory' ? To: freebsd-hackers@freebsd.org Date: Sun, 20 Mar 2016 23:49:56 -0400 (EDT) From: Jim Berilla Reply-to: X9Y9NWTX8KC@falstaff.MAE.cwru.edu X-Mailer: ELM [version 2.4 PL21] 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: Mon, 21 Mar 2016 04:00:07 -0000 I've been trying to use the program gdrive-freebsd-x64 (downloaded from github) to upload some files to Google Drive. One of the files is 140 GB in size. Out of four tries, it has failed all four times, after anywhere between 27 and 121 GB transferred. The error message is: |> Failed to upload file: \ |> Post https://www.googleapis.com/upload/drive/v3/files?alt=[...]: \ |> write tcp 129.22.152.23:15810->216.58.216.234:443: \ |> write: cannot allocate memory On the last attempt, I ran truss on the process to see what it was doing. Here is the output around the time of failure: |> write(3,"\^W\^C\^C\^P\^X\0\0\0\0\0\t\ti"...,4125) = 4125 (0x101d) |> write(3,"\^W\^C\^C\^P\^X\0\0\0\0\0\t\tj."...,4125) = 4125 (0x101d) |> write(3,"\^W\^C\^C\^P\^X\0\0\0\0\0\t\tk"...,4125) = 4125 (0x101d) |> kevent(4,0x0,0,{0x3,EVFILT_WRITE,EV_CLEAR,0,0xd6dcd,0x800bebd20},64,0x0) = 1 (0x1) |> kevent(4,0x0,0,{0x3,EVFILT_WRITE,EV_CLEAR,0,0xd68c4,0x800bebd20},64,0x0) = 1 (0x1) |> write(3,"\^W\^C\^C\^P\^X\0\0\0\0\0\t\tlm:"...,4125) = 4125 (0x101d) |> kevent(4,0x0,0,{0x3,EVFILT_WRITE,EV_CLEAR,0,0xd5db0,0x800bebd20},64,0x0) = 1 (0x1) |> kevent(4,0x0,0,{0x3,EVFILT_WRITE,EV_CLEAR,0,0xd5db0,0x800bebd20},64,0x0) = 1 (0x1) |> write(3,"\^W\^C\^C\^P\^X\0\0\0\0\0\t\tmR"...,4125) = 4125 (0x101d) |> write(3,"\^W\^C\^C\^P\^X\0\0\0\0\0\t\tn"...,4125) = 4125 (0x101d) |> kevent(4,0x0,0,{0x3,EVFILT_WRITE,EV_CLEAR,0,0xd5db0,0x800bebd20},64,0x0) = 1 (0x1) |> write(3,"\^W\^C\^C\^P\^X\0\0\0\0\0\t\toOQ"...,4125) = 4125 (0x101d) |> write(3,"\^W\^C\^C\^P\^X\0\0\0\0\0\t\tp`"...,4125) ERR#12 'Cannot allocate memory' |> kevent(4,0x0,0,{0x3,EVFILT_WRITE,EV_CLEAR,0,0xd488a,0x800bebd20},64,0x0) = 1 (0x1) |> _umtx_op(0xc8204c4510,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0) |> _umtx_op(0xc8204c4510,UMTX_OP_WAKE_PRIVATE,0x1,0x0,0x0) = 0 (0x0) |> kevent(4,0x0,0,{0x3,EVFILT_WRITE,EV_CLEAR,0,0xd4d93,0x800bebd20},64,0x0) = 1 (0x1) |> nanosleep({0.000100000 }) = 0 (0x0) |> kevent(4,0x0,0,{0x3,EVFILT_WRITE,EV_CLEAR,0,0xd8e07,0x800bebd20},64,0x0) = 1 (0x1) |> write(3,"\^U\^C\^C\0\^Z\0\0\0\0\0\t\tqn"...,31) = 31 (0x1f) If I read that correctly, the write(2) system call is returning a value of 12 (ENOMEM). That is not a value listed under ERRORS in the man page for that system call. I assume FD 3 is a socket opened to one of Google's machines. This system has 128 GB of physical memory, and I added 256 GB of swap after the second failed attempt. top showed the process had a SIZE of about 50 MB. Nothing[1] else shows evidence of memory starvation. As far as I can tell, there is always at least a couple GB free memory, plus another 40 to 80 GB in the ARC. Not to mention 238 GB of free swap now. Interesting that there is a successful write to the same FD about seven lines after the failed one. On the problem machine, uname -a says: |> FreeBSD kirara 10.2-RELEASE-p7 FreeBSD 10.2-RELEASE-p7 #0: \ |> Mon Nov 2 14:19:39 UTC 2015 \ |> root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 On a Solaris 11 system, the transfer worked the first time. On a FreeBSD 10.1-RELEASE-p16 system with only 4 GB of memory, it also worked the first time, using the exact same binary as used on the problem machine. I'm familiar with C programming, some on the system level. But I am new to FreeBSD and its file hierarchy. If someone can point me to the right file, I'd be glad to examine the code and try to figure out how it can return this error value. If anyone has any thoughts on this problem, I can explore them. Thanks. [1] Or so I thought. After starting to look into this problem, I was logged in remotely to this machine via SSH, and suddenly the terminal window closed without warning. Looking through /var/log/messages, I find: |> Mar 11 10:48:26 kirara sshd[31353]: fatal: Write failed: Cannot allocate memory -- Jim Berilla, X9Y9NWTX8KC@falstaff.MAE.cwru.edu, +1 216 368 6776 From owner-freebsd-hackers@freebsd.org Mon Mar 21 16:02: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 0B5A1AD856C for ; Mon, 21 Mar 2016 16:02:09 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-ig0-x22d.google.com (mail-ig0-x22d.google.com [IPv6:2607:f8b0:4001:c05::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 C9FF2328 for ; Mon, 21 Mar 2016 16:02:08 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: by mail-ig0-x22d.google.com with SMTP id kc10so70853250igb.0 for ; Mon, 21 Mar 2016 09:02:08 -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=KVn5IxpC7MBCOPM2jyGSHCCAW28RwZRIS4hnERgQKbM=; b=h4kkJTLXqF3w9t5mXe3TDXa3KcIdaz2d2iqNdn6WQWh7EQjNjWwUYTf/I23pNHiBK1 2DHcsC8L060VLTBDfMDqriBPG9CeYl+OFP0SHI4IOKdFlCjsnD+TRRfjKA/9KT0kw1U6 YIRkcfhrxgfixizRaO3fwRTWCPNpa/2TSUPM0NZoNawBnnMnq0RPOShHGPaIcdqoGYK4 sNf//041belLUIF+mscdPePgFY5xcuykoL2dLVMJNDKJeeimQHZQzqrCOkugoZ8CDnZd J0z0FdmGRupwJvV5Ged/4Ic5Ah8OSrkUSIxpuIFO1U3d9TkvSx9J2C2CgrpUattscQ+z UmDQ== 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=KVn5IxpC7MBCOPM2jyGSHCCAW28RwZRIS4hnERgQKbM=; b=Dki3+WwouRNiICr0XNilRVp6mH5r2srqnQpWxdRs2uX95rL//ad+lQd14D4Hs+jIfN iP+5lmcOLQ3JkqTffcYJy+TNfKz90BrIv5nWHN7GML4Xx6K+EG2Xz+MViHl+JvSn7KFf vrGPxgcxJwCuxWwSkB0qKQXgY3aQX7nQVz790KOpcGN34n+s52OJ3g6ZKTUsrhe7cl7b LbsW7fcVoDc1oBGXfht2MYOQJS7KpYHcBq8lOVFAj5/vKKibKW072AUiMNoicng5MMYK nKxfHWUrQ7BDv5OyJldCfgNb9svwX5/mZlYIrcVQG6NKWbqMDhhKJGvb5RnCLuBqjF+u 9tAQ== X-Gm-Message-State: AD7BkJKVaa4M0qV8zLaOv8E9cSZZs5F3ibdDcK4yejlZGIF62d3xkl26+QJnOtTly+H9FFzfDX2xxK5/6HokEQ== MIME-Version: 1.0 X-Received: by 10.50.61.232 with SMTP id t8mr13566559igr.83.1458576128227; Mon, 21 Mar 2016 09:02:08 -0700 (PDT) Received: by 10.107.6.32 with HTTP; Mon, 21 Mar 2016 09:02:08 -0700 (PDT) In-Reply-To: <201603210349.u2L3nuGu027447@hypatia.MAE.cwru.edu> References: <201603210349.u2L3nuGu027447@hypatia.MAE.cwru.edu> Date: Mon, 21 Mar 2016 12:02:08 -0400 Message-ID: Subject: Re: write(2) returns ERR#12 'Cannot allocate memory' ? From: Ryan Stone To: X9Y9NWTX8KC@falstaff.mae.cwru.edu Cc: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=UTF-8 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: Mon, 21 Mar 2016 16:02:09 -0000 You could try running this (lightly tested) DTrace script to narrow down where the error comes from. Be warned that there can be false positives. I tried to filter out the ones I saw in my quick tests but you may see others. #!/usr/sbin/dtrace -s #pragma D option quiet syscall::write:entry { self->in_write = 1; } fbt::lapic_handle_timer:entry { self->in_timer = 1; } fbt::lapic_handle_timer:return { self->in_timer = 0; } fbt:::return / self->in_write && !self->in_timer && probefunc != "tcp_addoptions" && probefunc != "maybe_yield" && probefunc != "sched_pickcpu" && arg1 == 12 / { printf("Returned %d from %s\n", arg1, probefunc); } syscall::write:return { self->in_write = 0; } On Sun, Mar 20, 2016 at 11:49 PM, Jim Berilla < X9Y9NWTX8KC@falstaff.mae.cwru.edu> wrote: > I've been trying to use the program gdrive-freebsd-x64 (downloaded from > github) to upload some files to Google Drive. One of the files is 140 GB > in size. Out of four tries, it has failed all four times, after anywhere > between 27 and 121 GB transferred. > > The error message is: > > |> Failed to upload file: \ > |> Post https://www.googleapis.com/upload/drive/v3/files?alt=[...]: \ > |> write tcp 129.22.152.23:15810->216.58.216.234:443: \ > |> write: cannot allocate memory > > On the last attempt, I ran truss on the process to see what it was doing. > Here is the output around the time of failure: > > |> write(3,"\^W\^C\^C\^P\^X\0\0\0\0\0\t\ti"...,4125) = 4125 (0x101d) > |> write(3,"\^W\^C\^C\^P\^X\0\0\0\0\0\t\tj."...,4125) = 4125 (0x101d) > |> write(3,"\^W\^C\^C\^P\^X\0\0\0\0\0\t\tk"...,4125) = 4125 (0x101d) > |> > kevent(4,0x0,0,{0x3,EVFILT_WRITE,EV_CLEAR,0,0xd6dcd,0x800bebd20},64,0x0) = > 1 (0x1) > |> > kevent(4,0x0,0,{0x3,EVFILT_WRITE,EV_CLEAR,0,0xd68c4,0x800bebd20},64,0x0) = > 1 (0x1) > |> write(3,"\^W\^C\^C\^P\^X\0\0\0\0\0\t\tlm:"...,4125) = 4125 (0x101d) > |> > kevent(4,0x0,0,{0x3,EVFILT_WRITE,EV_CLEAR,0,0xd5db0,0x800bebd20},64,0x0) = > 1 (0x1) > |> > kevent(4,0x0,0,{0x3,EVFILT_WRITE,EV_CLEAR,0,0xd5db0,0x800bebd20},64,0x0) = > 1 (0x1) > |> write(3,"\^W\^C\^C\^P\^X\0\0\0\0\0\t\tmR"...,4125) = 4125 (0x101d) > |> write(3,"\^W\^C\^C\^P\^X\0\0\0\0\0\t\tn"...,4125) = 4125 (0x101d) > |> > kevent(4,0x0,0,{0x3,EVFILT_WRITE,EV_CLEAR,0,0xd5db0,0x800bebd20},64,0x0) = > 1 (0x1) > |> write(3,"\^W\^C\^C\^P\^X\0\0\0\0\0\t\toOQ"...,4125) = 4125 (0x101d) > |> write(3,"\^W\^C\^C\^P\^X\0\0\0\0\0\t\tp`"...,4125) ERR#12 'Cannot > allocate memory' > |> > kevent(4,0x0,0,{0x3,EVFILT_WRITE,EV_CLEAR,0,0xd488a,0x800bebd20},64,0x0) = > 1 (0x1) > |> _umtx_op(0xc8204c4510,UMTX_OP_WAIT_UINT_PRIVATE,0x0,0x0,0x0) = 0 (0x0) > |> _umtx_op(0xc8204c4510,UMTX_OP_WAKE_PRIVATE,0x1,0x0,0x0) = 0 (0x0) > |> > kevent(4,0x0,0,{0x3,EVFILT_WRITE,EV_CLEAR,0,0xd4d93,0x800bebd20},64,0x0) = > 1 (0x1) > |> nanosleep({0.000100000 }) = 0 (0x0) > |> > kevent(4,0x0,0,{0x3,EVFILT_WRITE,EV_CLEAR,0,0xd8e07,0x800bebd20},64,0x0) = > 1 (0x1) > |> write(3,"\^U\^C\^C\0\^Z\0\0\0\0\0\t\tqn"...,31) = 31 (0x1f) > > If I read that correctly, the write(2) system call is returning a value > of 12 (ENOMEM). That is not a value listed under ERRORS in the man page > for that system call. > > I assume FD 3 is a socket opened to one of Google's machines. > > This system has 128 GB of physical memory, and I added 256 GB of swap > after the second failed attempt. top showed the process had a SIZE of > about 50 MB. Nothing[1] else shows evidence of memory starvation. As > far as I can tell, there is always at least a couple GB free memory, > plus another 40 to 80 GB in the ARC. Not to mention 238 GB of free > swap now. > > Interesting that there is a successful write to the same FD about seven > lines after the failed one. > > On the problem machine, uname -a says: > > |> FreeBSD kirara 10.2-RELEASE-p7 FreeBSD 10.2-RELEASE-p7 #0: \ > |> Mon Nov 2 14:19:39 UTC 2015 \ > |> root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 > > On a Solaris 11 system, the transfer worked the first time. > > On a FreeBSD 10.1-RELEASE-p16 system with only 4 GB of memory, it also > worked the first time, using the exact same binary as used on the problem > machine. > > I'm familiar with C programming, some on the system level. But I am new > to FreeBSD and its file hierarchy. > > If someone can point me to the right file, I'd be glad to examine the > code and try to figure out how it can return this error value. If > anyone has any thoughts on this problem, I can explore them. > > Thanks. > > [1] Or so I thought. After starting to look into this problem, I was > logged in remotely to this machine via SSH, and suddenly the terminal > window closed without warning. Looking through /var/log/messages, I > find: > > |> Mar 11 10:48:26 kirara sshd[31353]: fatal: Write failed: Cannot > allocate memory > > -- > Jim Berilla, X9Y9NWTX8KC@falstaff.MAE.cwru.edu, +1 216 368 6776 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@freebsd.org Mon Mar 21 17:34:10 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 09AE6AD7EE1 for ; Mon, 21 Mar 2016 17:34:10 +0000 (UTC) (envelope-from johannes@brilliantservice.co.jp) Received: from mail-vk0-x22c.google.com (mail-vk0-x22c.google.com [IPv6:2607:f8b0:400c:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C2EA8D77 for ; Mon, 21 Mar 2016 17:34:09 +0000 (UTC) (envelope-from johannes@brilliantservice.co.jp) Received: by mail-vk0-x22c.google.com with SMTP id q138so131195081vkb.3 for ; Mon, 21 Mar 2016 10:34:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brilliantservice-co-jp.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=1+PFA+/UIfBNEjEFbqS9QmZLObjmAP3x0Cg+iRmih8E=; b=N85vwMbuaLf4LYL2mKURM9PXsFjyBq7oRSYn61Op0g9P86gpYzgUySLRAjy0XRXPHH Md6tjq4+6lGLuyvDR9QgEtWM/kd7E276KaK8Doibn6cg/JMbknXRVmeDG1pEM+Ciejli 0sWPbto25zKGqSbQZAnSmZL+D5oRsnS2n73Z0z2op1w91S+9/GoGiU1g4S4c3+VpE5pD bWGLkp8uqteJ8k4qu7bScDojDvulrVaLh+nCe6uqiLmDIHnwU062WLQ1Cl/7+zruy0xD pnJFUClvasMd0M+7ujui/2IA5Wn6Kc2RoANXr3IcGm50RZtn7yR0YxI+d3Irq8FrVemy Mc0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=1+PFA+/UIfBNEjEFbqS9QmZLObjmAP3x0Cg+iRmih8E=; b=BuPP89YeCFMveKpsHx1ACkazePFkCri64nO2223aN3bpwLvAC821UYijBIZPjBfzxL KmBZjd7LAxY+2dY5ELaL+zl+Qo5oEGhobpJRQXeL3WYqdeFa945Ng42Misve4WUTgXCi /53yrIR+Q4pVdVtRaetnYFE6EwOAa3Iy6I+Hg2eTgkMuZ+s1wJF049otUEomfSBSX3qO 58xXgCLp3z4o6pDMy0jtx/3zq9LU6Qt5O0u9+h1iDKAjaGcMrioCe+ANg8DEv0QPeOBy 1rJnEFg86+xg+cYovi0Xux6JeKU8EOYrzgZH627OiJhzq9zcNaggX/d44ERfD8AehNBR PJ+w== X-Gm-Message-State: AD7BkJJvFnkBh6D3lFGNeqmSoq1cOCA5cpvj2cCc1wE364hbsAcl5uvUpnjmywamTw2TF1/0hFOdicTh/4sOHg7Z/buEyKXvr8NM8SltyNqHytO1E5N6jxBK3lOiKV/hzTlNmHebn6XvYPCJ0Bh46jo8G38= X-Received: by 10.31.33.84 with SMTP id h81mr33259591vkh.24.1458581648623; Mon, 21 Mar 2016 10:34:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.159.36.197 with HTTP; Mon, 21 Mar 2016 10:33:54 -0700 (PDT) From: "Lundberg, Johannes" Date: Mon, 21 Mar 2016 10:33:54 -0700 Message-ID: Subject: Debug levels for kernel modules? To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 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: Mon, 21 Mar 2016 17:34:10 -0000 SGkNCg0KSXMgdGhlcmUgYSBnZW5lcmFsIHJ1bGUgZm9yIGRlYnVnIGxldmVsIHJhbmdlcyAoc2V0 IHdpdGggc3lzY3RsKSBpbiBrZXJuZWwNCm1vZHVsZXMgb3IgaXMgaXQgZGlmZmVyZW50IGZyb20g bW9kdWxlIHRvIG1vZHVsZT8NCg0KTGlrZSB3aGF0IGlzIG1heCBsZXZlbCwgd2hhdCBkb2VzIHRo ZSBkaWZmZXJlbnQgbnVtZXJpY2FsIGxldmVscyBtZWFuLCBldGM/DQpJZiBub3QgYSBnZW5lcmFs IHJ1bGUsIGlzIHRoZXJlIGEgd2F5IHRvIGdldCB0aGUgbWF4IG9yIHNldCB0aGUgbWF4DQp2ZXJi b3NpdHkgbGV2ZWwgd2l0aG91dCBrbm93aW5nIHRoZSB2YWx1ZT8NCg0KDQpUaGFua3MNCgotLSAK PS09LT0tPS09LT0tPS09LT0tPS09LT0tPS09LT0tPS09LT0tPS09LT0tPS09LT0tPS09LT0tCuen mOWvhuS/neaMgeOBq+OBpOOBhOOBpu+8muOBk+OBrumbu+WtkOODoeODvOODq+OBr+OAgeWQjeWu m+S6uuOBq+mAgeS/oeOBl+OBn+OCguOBruOBp+OBguOCiuOAgeenmOWMv+eJueaoqeOBruWvvuix oeOBqOOBquOCi+aDheWgseOCkuWQq+OCk+OBp+OBhOOBvuOBmeOAggrjgoLjgZfjgIHlkI3lrpvk urrku6XlpJbjga7mlrnjgYzlj5fkv6HjgZXjgozjgZ/loLTlkIjjgIHjgZPjga7jg6Hjg7zjg6vj ga7noLTmo4TjgIHjgYrjgojjgbPjgZPjga7jg6Hjg7zjg6vjgavplqLjgZnjgovkuIDliIfjga7p lovnpLrjgIEK6KSH5YaZ44CB6YWN5biD44CB44Gd44Gu5LuW44Gu5Yip55So44CB44G+44Gf44Gv 6KiY6LyJ5YaF5a6544Gr5Z+644Gl44GP44GE44GL44Gq44KL6KGM5YuV44KC44GV44KM44Gq44GE 44KI44GG44GK6aGY44GE55Sz44GX5LiK44GS44G+44GZ44CCCi0tLQpDT05GSURFTlRJQUxJVFkg Tk9URTogVGhlIGluZm9ybWF0aW9uIGluIHRoaXMgZW1haWwgaXMgY29uZmlkZW50aWFsCmFuZCBp bnRlbmRlZCBzb2xlbHkgZm9yIHRoZSBhZGRyZXNzZWUuCkRpc2Nsb3N1cmUsIGNvcHlpbmcsIGRp c3RyaWJ1dGlvbiBvciBhbnkgb3RoZXIgYWN0aW9uIG9mIHVzZSBvZiB0aGlzCmVtYWlsIGJ5IHBl cnNvbiBvdGhlciB0aGFuIGludGVuZGVkIHJlY2lwaWVudCwgaXMgcHJvaGliaXRlZC4KSWYgeW91 IGFyZSBub3QgdGhlIGludGVuZGVkIHJlY2lwaWVudCBhbmQgaGF2ZSByZWNlaXZlZCB0aGlzIGVt YWlsIGluCmVycm9yLCBwbGVhc2UgZGVzdHJveSB0aGUgb3JpZ2luYWwgbWVzc2FnZS4K From owner-freebsd-hackers@freebsd.org Mon Mar 21 17:48:03 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 BBC60AD82CE for ; Mon, 21 Mar 2016 17:48:03 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from erouter6.ore.mailhop.org (erouter6.ore.mailhop.org [54.187.213.119]) (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 84CFC91D for ; Mon, 21 Mar 2016 17:48:03 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 04f64bf1-ef8d-11e5-827e-7d17a39bef25 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.34.117.227 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.34.117.227]) by outbound3.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Mon, 21 Mar 2016 17:47:45 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.14.9) with ESMTP id u2LHltUj009100; Mon, 21 Mar 2016 11:47:55 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1458582475.68920.90.camel@freebsd.org> Subject: Re: Debug levels for kernel modules? From: Ian Lepore To: "Lundberg, Johannes" , freebsd-hackers@freebsd.org Date: Mon, 21 Mar 2016 11:47:55 -0600 In-Reply-To: References: Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 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, 21 Mar 2016 17:48:03 -0000 On Mon, 2016-03-21 at 10:33 -0700, Lundberg, Johannes wrote: > Hi > > Is there a general rule for debug level ranges (set with sysctl) in > kernel > modules or is it different from module to module? > > Like what is max level, what does the different numerical levels > mean, etc? > If not a general rule, is there a way to get the max or set the max > verbosity level without knowing the value? > > > Thanks > In my experience there is no standard other than "bigger numbers usually mean more-noisy-and-detailed output". In a few places the debug value is a bitmask of categories rather than a "volume knob"; it' s nice when that's indicated with a name like kern.geom.debugflags instead of just "debug". -- Ian From owner-freebsd-hackers@freebsd.org Mon Mar 21 21:58:35 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 53F2BAD8A4A for ; Mon, 21 Mar 2016 21:58:35 +0000 (UTC) (envelope-from tflendri@gmail.com) Received: from mail-lb0-x241.google.com (mail-lb0-x241.google.com [IPv6:2a00:1450:4010:c04::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D1D8C92E for ; Mon, 21 Mar 2016 21:58:34 +0000 (UTC) (envelope-from tflendri@gmail.com) Received: by mail-lb0-x241.google.com with SMTP id wn5so12148263lbb.2 for ; Mon, 21 Mar 2016 14:58:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=RcDI6xUSmQ/DK17OXuYb94d8aMWg2c0cQ5ZSyJO0BHI=; b=DhqCink2UOJJBQ26qTIo+e6BNxiacg1ctxXbrzcVkcZLJT9sRFMX1n4/bVSNbBRpkq S8xNvecEiOCHwG/bMTcOxsRP+LwZlJRCB113GrEFCAiBJ77nPKcu0xftH/OB0Ic0Dna9 fujEPJxKQlzARBsxFDoB13tEq48shOMcUA67m7H7AScyxmtHCcx+ZRJIZ5iJ+9vruoI0 +oNGKmYx7aqI2oWlDpq6rDzvwJiyLrW0Vz3kQMmVYlmzLeEm+r3oyFg7fK2bzSm9aMlI yvbh2dSsHYQdAfPX2zExjaLTwlhh4qhhQvlBDAI865Mwi2bUbZSV9adxeVPiR4KH7MJv gJOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=RcDI6xUSmQ/DK17OXuYb94d8aMWg2c0cQ5ZSyJO0BHI=; b=YJfzHcgbPXBHRKOxZ04Mrj7bJa4tsgXBpwIGz3BQnsM2OhJz2OezIog2co+ga5z+EN EdD1I7r+3vRAgz7BEL9oRLzy7JaSgLASHqbIMURZAo4h/bLepzzS9uhsmpH9uQdYW+PY KXOA4DVRYydMYpwH27ZvKzzLDCw8ThI122c+OsP5VCSrw3X+xO7oRC2MaRC/Wrt+xih8 RipSWPOkI1M/WdpcNvHGDHCxHSX+6hLCYE6Grr8cxfUTdN2uud1wcfVThHhQ21ech/D9 RVHDdb4+CjcNRZO7vR88DGeKlJqTZok8I5AiNlWVf3loVQEOvdE2tSgCMAwpZPWk0sE4 KAQg== X-Gm-Message-State: AD7BkJKYRjU1yTu/GQMcy/jMKk+gzdRVDxba7Tfr1Vs3utS0Egjm3JWy4FKih4aDt2P+HwwN1ysiIsYU8mtOIw== MIME-Version: 1.0 X-Received: by 10.25.163.130 with SMTP id m124mr12341262lfe.106.1458597513113; Mon, 21 Mar 2016 14:58:33 -0700 (PDT) Received: by 10.112.13.99 with HTTP; Mon, 21 Mar 2016 14:58:33 -0700 (PDT) Date: Mon, 21 Mar 2016 22:58:33 +0100 Message-ID: Subject: [GSoC] Looking for a mentor for a TrueCrypt port From: Tomasz Flendrich To: freebsd-hackers@freebsd.org X-Mailman-Approved-At: Mon, 21 Mar 2016 22:11:01 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: Mon, 21 Mar 2016 21:58:35 -0000 Hello everyone! I'm interested in taking part in GSOC 2016 with FreeBSD. I noticed one project that drew my attention: "Port TrueCrypt as a geom_gate userland disk device implementation" and I wanted to introduce myself. A few words about myself: My name is Tomasz Flendrich and I'm a third year Computer Science student at University of Wroc=C5=82aw, Poland. In the previous semester, I had a seminar class named "Implementing Operating Systems". It was based on FreeBSD, so I have a firm grasp of what's happening inside. One of my two presentations was about devices. Also, there was one presentation about GEOM/CAM/GELI. And I was paying attention :). My bachelor thesis is gonna be about an experimental operating system I'm implementing on a MIPS Malta (together with a fellow student and our adviser). We don't have multithreading yet, but we're getting closer. I took part in GSOC last year in NTP project (also written in C) and completed it successfully. I'd really love to be a part of the FreeBSD team as a GSOC student, but unfortunately after messaging the current mentor of this project idea, I heard that he cannot be a mentor this year. He gave me a few pointers, but I need someone for the long haul. Is anyone willing to take up the mantle? I'd be really grateful and I'm sure that it would be productive three months. Kind regards, Tomasz Flendrich From owner-freebsd-hackers@freebsd.org Tue Mar 22 13:14: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 06E1AAD97CB for ; Tue, 22 Mar 2016 13:14:54 +0000 (UTC) (envelope-from jesa7955@gmail.com) Received: from mail-yw0-x236.google.com (mail-yw0-x236.google.com [IPv6:2607:f8b0:4002:c05::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BDF26790 for ; Tue, 22 Mar 2016 13:14:53 +0000 (UTC) (envelope-from jesa7955@gmail.com) Received: by mail-yw0-x236.google.com with SMTP id h129so253472374ywb.1 for ; Tue, 22 Mar 2016 06:14:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=GbRxBJMfpu0GNh0VxQ42umwm1ArAOHxQoAKTxaRDWyo=; b=G1xVcbXyDpZ0D37F7KZgG5rkiBZqlsS/JBAXgpYzTZT2F//7vcuOkq2DbajtEI38bU AgYYXzVh1KPRpR5tTPSW4ayoJUsIBrvV2xRLefgTcHoBb1px84yp+aB5TbRNUosz7cQ5 kZZ0lGC0w1ehLrNRB1GEBCJgJ+nvo7OXLsVcLLY7ahNApqamwHovC6bsW9hT0D1urH3w 8F8QUvXwwZ3OJrdGYxIXH1BeQFi2zQjVIg8jSnNKVlZEBDZEmd4Edm3T3xeBhIYiVu9C pklvF4VHqsZYOOVnqODG2fZi/SDyCN6IvYRaHx0aP5t9/NTzZqGCNaEHY9PO4HFMBubd 52XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=GbRxBJMfpu0GNh0VxQ42umwm1ArAOHxQoAKTxaRDWyo=; b=id1NBCUtmUOR9CnMFSFKwPnB6ZAH9Q0gDuLfz6SwTkZ2f7n519EyAK0vQKCyL/Jovj VY6WNEPs4veOcZ3y18VCLBdXpfmQbsSYaWZny68Syp370fPmXdh6Gblb7RTYLK9pOSXp Cn8cJSBJhVAEeEKio5bG7igkOfcWiXKxnASAWxvRSCI1QU5ICVRkQ+7itspM2hSWw0di aKgOkbXACFuGip5a8PTwUaG8jcedvTSsPyH26hNIf94cInk6Q60e+ffJMR/ejZhEKau7 PSjbgQMvFddc8rc6/eghmIMHd9mygQmNq7C9TbtKBwydnIA6e55ycYLjDzwZiR3Iy+C6 KcCQ== X-Gm-Message-State: AD7BkJKgrLaZyrlLSNMqarbgyh//MeK3AtXf/5HAV+RZZ0bmJgF9h0Di4avi7o1j8/JbXr0QUOVPCdwqeaJHhA== MIME-Version: 1.0 X-Received: by 10.13.193.71 with SMTP id c68mr18210486ywd.58.1458652492886; Tue, 22 Mar 2016 06:14:52 -0700 (PDT) Received: by 10.37.208.201 with HTTP; Tue, 22 Mar 2016 06:14:52 -0700 (PDT) Date: Tue, 22 Mar 2016 21:14:52 +0800 Message-ID: Subject: Looking for potential mentor for "Support bhyve as Vagrant VM backend" From: Tong Li To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 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: Tue, 22 Mar 2016 13:14:54 -0000 Hello Developers, My name is Tong Li and I am a junior of Computer Science major in Jilin University, China. I have programming experience in C/C++, Java and Python for more than 4 years. I got the experience of participating GSoC 2015 mentored by Debian Community and finish my project successfully. I am also learing about programming in Ruby. This year I would like to participe in GSoC with FreeBSD community and the project "Support bhyve as Vagrant VM backend" interests me most. I have did some research on that topic for some days and have submitted my proposal. But there isn't any potential mentor for this project listed on the GSoC ideas page so I have leave the item "Possiable metor" keep blank on my proposal. It seems that my proposal may proably be rejected without a potential mentor according the information from the FreeBSD wiki. So is there someone who is familiar with Ruby/Vagrant/bhyve who is willing to help me on this porject, or can tell me where I can find a potential mentor? Any help you can provide will be much appreciated. Best Regrads Tong From owner-freebsd-hackers@freebsd.org Wed Mar 23 15:02:28 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 CDDC6ADA9FD for ; Wed, 23 Mar 2016 15:02:28 +0000 (UTC) (envelope-from otacilio.neto@bsd.com.br) Received: from mail-qg0-x22b.google.com (mail-qg0-x22b.google.com [IPv6:2607:f8b0:400d:c04::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 931471D94 for ; Wed, 23 Mar 2016 15:02:28 +0000 (UTC) (envelope-from otacilio.neto@bsd.com.br) Received: by mail-qg0-x22b.google.com with SMTP id w104so14332009qge.1 for ; Wed, 23 Mar 2016 08:02:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsd.com.br; s=capeta; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=XmVz7Pqc07cvWPKJohyL+RwCqxOSxckl/r7xttxQF2o=; b=Abslefouzkh2IdU/OX2t6UsgENuhqOmsNveZ4AmxNSCaNWTSrJY3p45lhUeGW7L76B NzjF3VfN7QLUw8HWZAtkpeagAP7qCU9gh63j4FjVdHB3THaEyRGQ/fBMiuhxCu3/nw6Y igQBwZ54237Vz6TKJWsfdo64hDRgr1FLVYxv0= 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=XmVz7Pqc07cvWPKJohyL+RwCqxOSxckl/r7xttxQF2o=; b=Lfi/A9yL7wBfbRyyyTLq5gtfzK6ImeYrNcskp/d/xzgvw7JoFRYYwPttSw+sJW66kV wnrg2D+3KSz5+jr3U8Vto1jq3AK3fLFBTC1zPeRjHlkaml0gz+dbzmQNdW4GOXhHDC54 5eTld04jDiYdw4yIjW1YMUy2axhwlkk3f1dU5FfUyYol/VS+7IhpukdrZAWIUFAfOt6O 1md86a+Bru+kuCmE1oUDD5e+xdAcCEeoomA8P3t4TxY1OC4mTo2wAi9Y1AsPp4R6p+lV XUg9xZwAZc75jzXFToLssWD0wM2jOWq27SsI9sa8pzJIQSR99PG+Pp2BOg+Di4hRDKgl lt8A== X-Gm-Message-State: AD7BkJLONLPTIPuQMMSP7n2uRXAk/DM+nX03knF0bhzR/j0cvAODb4i7Oc5eGHWB8h0XUw== X-Received: by 10.140.237.204 with SMTP id i195mr4446529qhc.55.1458745347367; Wed, 23 Mar 2016 08:02:27 -0700 (PDT) Received: from [192.168.2.84] ([200.129.79.65]) by smtp.googlemail.com with ESMTPSA id d65sm1229697qgf.30.2016.03.23.08.02.25 for (version=TLSv1/SSLv3 cipher=OTHER); Wed, 23 Mar 2016 08:02:26 -0700 (PDT) Subject: Re: looking for areas to contribute To: freebsd-hackers@freebsd.org References: <56ED75D8.1050800@tysdomain.com> From: =?UTF-8?B?T3RhY8OtbGlv?= Message-ID: <56F2AFEC.7020102@bsd.com.br> Date: Wed, 23 Mar 2016 12:02:04 -0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <56ED75D8.1050800@tysdomain.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit 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, 23 Mar 2016 15:02:28 -0000 Em 19/03/2016 12:52, Littlefield, Tyler escreveu: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > All, > I've asked this before, but I'm in a better position now to make this > work. > > I'm fluent with C and other languages and want to start contributing > to BSD. I'm happy to work where ever I can be of use, I love more > lower level stuff but anything that has me working on code would be > great. My questions: > > 1) How do people usually have their environments set up? I'm thinking > of running fbsd11 in BHyve where I can do testing, but if there's a > better way to test that won't require so many resources that would be > nice as well. I didn't want to break my host with testing since it's > going to run various other services. > 2) How do you prevent rebuilding world and kernel for simple patches? > 3) ideas on what to work on would be great. I haven't gotten into > really advanced BSD work for a while now, so I haven't found anything > that is incredibly broken. > > Also although this may be off topic, I'm hoping I might find someone > who uses IOCage here since this seems to be out of the realm of what > most people do. Has anyone used IOCage on FreeBSD 11? If so, how did > you manage to fetch the release? I pointed it to the snapshot FTP path > and it fetched and extracted (freebsd-update failed to get public > keys), but it doesn't show it as a release. My second thought is if > I'm working on world then I can just rebuild world under the jail. Is > this a good solution? > > Thanks, > - -- > Take care, > Ty > Twitter: @sorressean > Web: https://tysdomain.com > Pubkey: https://tysdomain.com/files/pubkey.asc > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2 > > iQEcBAEBAgAGBQJW7XXYAAoJEAdP60+BYxejT/YIAIFzhdY6Z0dEWwbqIbXx3sZu > 5Md/o4rR3Nui5x1DyM7p+g666cmJd+2TX1cl1nkbhYUt9sNiQbrHHfup+pIKGsaU > F38lkBfGZ+t7vFEgSmiTd9B71IYrLHOkOmgUZE0WMpc3zJs7Y+Stku7kL2R3ej+w > qaR+bSMpc9RQ6rgtBbKS4ubim5gyjdaOdQpp4FUt40eJGGDN+k+ecc3jgRE6S2z+ > 7F4uwck+NLUhSybH+kjB6HHqX0oRcEu+XqNveFp7kGKY2aFSPdhgPdD+MAoKFunW > ZzCwCgvY3aaGnKy/VfFP9oQ+P3gdVY4DccnQvufE3AyvNN7d+fl+b4HsZMGXXmI= > =Ybcf > -----END PGP SIGNATURE----- > Hello Tyler I'm not expert in FreeBSD but maybe I can give some hints for you. 1) For setup a enviroment for build, test and debug I'm using Virtualbox on a Windows 10 Host. Until now FreeBSD don't have a port of the Virtualbox 5, so for use Hyper-V with VT-x and nested pages I need a Windows host. My processor is a i7-3517U. After setup Virtualbox on windows I create a virtual machine, download a bootonly FreeBSD ISO from https://www.freebsd.org/where.html and install in this virtual machine. I do not install ports or src because I always do a checkout from the svn repo. So, after install I do a checkout of the most recents sources from svn repo. I use this command: # svnlite co https://svn.freebsd.org/base/head /usr/src After, I rebuild the entire system using thre procedure that you can find here on topic 23.6.1: # https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html After the rebuild you will running the version that you checkou from repositoy. So I do a checkout of ports. # svnlite co https://svn.freebsd.org/ports /usr/ports And then I install the virtualbox guest drivers: # cd /usr/ports/emulators/virtualbox-ose-additions/ && make install clean So afther this I have a system with the latest versions. For do a partial build you can use the procedure listed here on topic 23.6.6: https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html Remember, this list of commands is not complete, it is only a partial list of what to do. Somo commands needs others (like install the virtualbox guest driver), but when doing, messages will tell you what to do. 2) About do a partial build of kernel modules you can read here the procedure: https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-building.html (topic 8.5) Jean Sébastien Pédron did a great job writing a article about Getting started with kernel projects. You can read here: https://wiki.freebsd.org/Graphics/Getting%20started%20with%20kernel%20projects 3) About ideas for projects, what do you think about port the latest version of virtual box host to FreeBSD :-)? []'s -Otacilio From owner-freebsd-hackers@freebsd.org Wed Mar 23 16:01:01 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 A60DAADB605 for ; Wed, 23 Mar 2016 16:01:01 +0000 (UTC) (envelope-from dan_partelly@rdsor.ro) Received: from mail.rdsor.ro (mail.rdsor.ro [193.231.238.10]) by mx1.freebsd.org (Postfix) with ESMTP id 6AEFF1741 for ; Wed, 23 Mar 2016 16:01:00 +0000 (UTC) (envelope-from dan_partelly@rdsor.ro) Received: from [192.168.1.101] (unknown [79.117.100.196]) by mail.rdsor.ro (Postfix) with ESMTP id 57C44232F0; Wed, 23 Mar 2016 17:55:30 +0200 (EET) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Subject: Re: looking for areas to contribute From: Dan Partelly In-Reply-To: <56ED75D8.1050800@tysdomain.com> Date: Wed, 23 Mar 2016 17:55:30 +0200 Cc: freebsd-hackers@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <56ED75D8.1050800@tysdomain.com> To: tyler@tysdomain.com X-Mailer: Apple Mail (2.3112) 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, 23 Mar 2016 16:01:01 -0000 For your point 2: Once the initial kernel build is completed you should rebuild with make buildkernel KERNFAST=3D=E2=80=9Ccfg=E2=80=9D=20 where =E2=80=9Ccfg=E2=80=9D is your config file.=20 For world : make buildworld NO_CLEAN=3DYES. Relevant manual: build(7) =20 > On 19 Mar 2016, at 17:52, Littlefield, Tyler = wrote: >=20 > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > All, > I've asked this before, but I'm in a better position now to make this > work. >=20 > I'm fluent with C and other languages and want to start contributing > to BSD. I'm happy to work where ever I can be of use, I love more > lower level stuff but anything that has me working on code would be > great. My questions: >=20 > 1) How do people usually have their environments set up? I'm thinking > of running fbsd11 in BHyve where I can do testing, but if there's a > better way to test that won't require so many resources that would be > nice as well. I didn't want to break my host with testing since it's > going to run various other services. > 2) How do you prevent rebuilding world and kernel for simple patches? > 3) ideas on what to work on would be great. I haven't gotten into > really advanced BSD work for a while now, so I haven't found anything > that is incredibly broken. >=20 > Also although this may be off topic, I'm hoping I might find someone > who uses IOCage here since this seems to be out of the realm of what > most people do. Has anyone used IOCage on FreeBSD 11? If so, how did > you manage to fetch the release? I pointed it to the snapshot FTP path > and it fetched and extracted (freebsd-update failed to get public > keys), but it doesn't show it as a release. My second thought is if > I'm working on world then I can just rebuild world under the jail. Is > this a good solution? >=20 > Thanks, > - --=20 > Take care, > Ty > Twitter: @sorressean > Web: https://tysdomain.com > Pubkey: https://tysdomain.com/files/pubkey.asc > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2 >=20 > iQEcBAEBAgAGBQJW7XXYAAoJEAdP60+BYxejT/YIAIFzhdY6Z0dEWwbqIbXx3sZu > 5Md/o4rR3Nui5x1DyM7p+g666cmJd+2TX1cl1nkbhYUt9sNiQbrHHfup+pIKGsaU > F38lkBfGZ+t7vFEgSmiTd9B71IYrLHOkOmgUZE0WMpc3zJs7Y+Stku7kL2R3ej+w > qaR+bSMpc9RQ6rgtBbKS4ubim5gyjdaOdQpp4FUt40eJGGDN+k+ecc3jgRE6S2z+ > 7F4uwck+NLUhSybH+kjB6HHqX0oRcEu+XqNveFp7kGKY2aFSPdhgPdD+MAoKFunW > ZzCwCgvY3aaGnKy/VfFP9oQ+P3gdVY4DccnQvufE3AyvNN7d+fl+b4HsZMGXXmI=3D > =3DYbcf > -----END PGP SIGNATURE----- > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to = "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@freebsd.org Wed Mar 23 22:36:03 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 527C1ADBFD1 for ; Wed, 23 Mar 2016 22:36:03 +0000 (UTC) (envelope-from munro@penski.net) Received: from mail-io0-x22b.google.com (mail-io0-x22b.google.com [IPv6:2607:f8b0:4001:c06::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 297211C47 for ; Wed, 23 Mar 2016 22:36:02 +0000 (UTC) (envelope-from munro@penski.net) Received: by mail-io0-x22b.google.com with SMTP id 124so67724289iov.3 for ; Wed, 23 Mar 2016 15:36:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=penski-net.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:date:message-id:subject:from:to; bh=amA+F05cSCF6aw9u2Ux7H3Txc945j/CSAGvtHLMTPJA=; b=WRuCJpMHrzt2Y+sZ5VHkRPw9gGTwvQ64yVmkJ6q1Q/2T6fKzpcpSgyZ7Pn7n4usYSb jANLXSrjwpJiVhhozOQPoBxSssim7OUVeOlAyecyKeRh2CkdDNCZqZnLILI45rH0jKhs D6W/GHlSsv+U5NjyYXeNxosPaOq9vOBJz9WycNUPz3VRLbsm1nk43VH1mh6wgJ4j5NU+ yoBEVAfnPQjQKpdkMHRTItXmLRgEMWO9IyyK2GI1a0SJMX4I3D0t2VJH1pQQt4ouSI2n ZZcXefPZQ89/s2gUpR2RrIvGe5gA5dR2amC9XYU/ZlSZWnAsbKQGPP2cu5der4MUuIO7 lCcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:date:message-id:subject:from :to; bh=amA+F05cSCF6aw9u2Ux7H3Txc945j/CSAGvtHLMTPJA=; b=lPFccWO/sembA9/EE5jSeVQw7YTOGMcmzj6uMsFOxgbDFOLWh8HlOL9Ik7sEJhA0FK SHQLkIDnOpOLTqnFmw7nmG06VMYNy2FMkJD3d06qgsNdsf9GqBAJBtMv7j8F+qzgcGeF O/S/LfTX8hnsJ6CMjADgbFgClvlwR0IFPkXKTVHdetdNZpsBunOnPgcm3IZAe/VEIFX4 Ipg51yLKtBKDJ2n0H9ErZyLGl+tO5BLrF203JI0l7QkMRnPAAOsLSKNvOTljSwrK9OXY HTNBV8oFoU0g2fDVKyMiC9QE83EUeYsLOH6UD/kqoh7GhJHw8+0tQ15BmK0oakGI2qyk jrxA== X-Gm-Message-State: AD7BkJLb+CyFbYImNLPrhodjnqNfwNcuud505ciOFfookTc8FSwKSlEX2+7LOBEGMz2lHFvCJv/tItFwLp5TYQ== MIME-Version: 1.0 X-Received: by 10.107.10.137 with SMTP id 9mr6242149iok.167.1458772562262; Wed, 23 Mar 2016 15:36:02 -0700 (PDT) Sender: munro@penski.net Received: by 10.36.147.199 with HTTP; Wed, 23 Mar 2016 15:36:02 -0700 (PDT) X-Originating-IP: [121.73.38.77] Date: Thu, 24 Mar 2016 11:36:02 +1300 X-Google-Sender-Auth: T_duQzzvuT-wI5XjaM62ttsR3bw Message-ID: Subject: strcoll and strxfrm do not always agree in -CURRENT From: Thomas Munro To: freebsd-hackers@freebsd.org 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: Wed, 23 Mar 2016 22:36:03 -0000 Hi, The PostgreSQL hackers wrote a test program to study a collation bug on another operating system. The test generates random strings and checks if strxfrm and strcoll agree on their ordering, according to each collation available on the system. I decided to try it out on FreeBSD and found that it passes on 10.2, but fails miserably on 11.0-CURRENT. The test program is here: http://www.postgresql.org/message-id/19132.1458688784@sss.pgh.pa.us I had to increase MAXXFRMLEN to (MAXSTRLEN * 10) for it to work. Thanks! From owner-freebsd-hackers@freebsd.org Wed Mar 23 22:45: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 3DB0BADB1B4 for ; Wed, 23 Mar 2016 22:45:51 +0000 (UTC) (envelope-from munro@penski.net) Received: from mail-io0-x235.google.com (mail-io0-x235.google.com [IPv6:2607:f8b0:4001:c06::235]) (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 0945210ED for ; Wed, 23 Mar 2016 22:45:51 +0000 (UTC) (envelope-from munro@penski.net) Received: by mail-io0-x235.google.com with SMTP id c63so71525789iof.0 for ; Wed, 23 Mar 2016 15:45:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=penski-net.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to; bh=KTI+SWYIJo5HAsaa+vcoF0HWdScnxymbhSZxl8/0esU=; b=o2DebjPj9nym7ALW7nHK/uyQfYB1poy6eg+MQE0QvCHZDGRzSnaYSmiC6QyBoEL6No 8s3Sic6c2XqUuOM/xOebYsHx8H8+xk5+mH/jsomAgc8JVDofigJOXP2cWRBRkPwIF1jG Q9hL/BwQ2qzQU0c460SebCPweyTWJKeDUx6oXH36R34RTuW7Z5jRh4zVbh1VnHDYlNEj ZKscbN3T3kgCYikn3oAdpW0Y3jirXIbiC6LZRKQFAyspilbPEOPlByDPvTyr0UAynJcL 6140lL8y2XmUMeFuAcKbbyPbxKT2ybK71nXXBpgnNDULlHaKxpnSF1FoKiSVEJuJTBrV fbXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to; bh=KTI+SWYIJo5HAsaa+vcoF0HWdScnxymbhSZxl8/0esU=; b=Lmn+NsLxS6yRQbWYJIYP0ALV/u0uMIMRMnExgAlQUCSyCrKjz2KRASaL3htiuvIdF8 r4kFNUw+xd6rQBFbyU6ISCkRMSde6sPLNah2szUaj74tkcVDZWfiHty/l/MOorVeFjdS fMv9b/TLO1V0wyvSbF+HEFJdDrFq5roxRDgO6m4oX3NRSAqfOu92vVL/nWs1J26WvD/m kJ7SO12vFPEw00xB/llqsoWK8OCLWQk2OGuOgEZc2Fj/E1NVaHz8t/YgnNfoVlogEROK Uo55HOleQHt9vYkMkoB4e18BK/ByRu8yJd7lrFBsf8j7zWbe/m2KGFr1r6dV6tDFaKOw pUhw== X-Gm-Message-State: AD7BkJLKpoWDY3a0dOZl2ODkpS30vCFC/tezrCUB3qy0uoqFVXDDV3KYdh4uLc0VEfq/0xGjE6ZE6kZpHqz6YA== MIME-Version: 1.0 X-Received: by 10.107.7.20 with SMTP id 20mr5953845ioh.181.1458773150416; Wed, 23 Mar 2016 15:45:50 -0700 (PDT) Sender: munro@penski.net Received: by 10.36.147.199 with HTTP; Wed, 23 Mar 2016 15:45:50 -0700 (PDT) X-Originating-IP: [121.73.38.77] In-Reply-To: References: Date: Thu, 24 Mar 2016 11:45:50 +1300 X-Google-Sender-Auth: qO3xlov8t8oYrVG1UxG3ycBdUPs Message-ID: Subject: Re: strcoll and strxfrm do not always agree in -CURRENT From: Thomas Munro To: freebsd-hackers@freebsd.org 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: Wed, 23 Mar 2016 22:45:51 -0000 On 24 March 2016 at 11:36, Thomas Munro wrote: > Hi, > > The PostgreSQL hackers wrote a test program to study a collation bug > on another operating system. The test generates random strings and > checks if strxfrm and strcoll agree on their ordering, according to > each collation available on the system. I decided to try it out on > FreeBSD and found that it passes on 10.2, but fails miserably on > 11.0-CURRENT. > > The test program is here: > > http://www.postgresql.org/message-id/19132.1458688784@sss.pgh.pa.us > > I had to increase MAXXFRMLEN to (MAXSTRLEN * 10) for it to work. Oops, I missed this updated version which doesn't require that modification. The result is the same: pass on 10.2, fail on 11.0. http://www.postgresql.org/message-id/31913.1458747836@sss.pgh.pa.us Best regards, Thomas Munro From owner-freebsd-hackers@freebsd.org Thu Mar 24 13:37:13 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 206AAADBD61 for ; Thu, 24 Mar 2016 13:37:13 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from mail.embedded-brains.de (mail.embedded-brains.de [82.135.62.35]) (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 CC246104A for ; Thu, 24 Mar 2016 13:37:12 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 8D73D2A1855 for ; Thu, 24 Mar 2016 14:30:00 +0100 (CET) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 5NQXs4Td6B0R for ; Thu, 24 Mar 2016 14:30:00 +0100 (CET) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 212692A0974 for ; Thu, 24 Mar 2016 14:30:00 +0100 (CET) X-Virus-Scanned: amavisd-new at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Mk5ukDe0ayDy for ; Thu, 24 Mar 2016 14:30:00 +0100 (CET) Received: from [192.168.96.129] (unknown [192.168.96.129]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 066752A096D for ; Thu, 24 Mar 2016 14:30:00 +0100 (CET) To: freebsd-hackers@freebsd.org From: Sebastian Huber Subject: Code Formatter for STYLE(9)? Message-ID: <56F3EBB1.1060603@embedded-brains.de> Date: Thu, 24 Mar 2016 14:29:22 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable 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, 24 Mar 2016 13:37:13 -0000 Hello, is there a ready to use C code formatter available that honours=20 STYLE(9)? I tried clang-format, but it knows only LLVM, Google,=20 Chromium, Mozilla by default. The GNU indent --original seems to produce=20 nothing usable. Same problem with astyle --style=3Dbsd. --=20 Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.huber@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine gesch=C3=A4ftliche Mitteilung im Sinne des EHUG= . From owner-freebsd-hackers@freebsd.org Thu Mar 24 13:44:05 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 2EE46ADC098 for ; Thu, 24 Mar 2016 13:44:05 +0000 (UTC) (envelope-from fabian.freyer@physik.tu-berlin.de) Received: from mail.tu-berlin.de (mail.tu-berlin.de [130.149.7.33]) (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 EA63F171C for ; Thu, 24 Mar 2016 13:44:04 +0000 (UTC) (envelope-from fabian.freyer@physik.tu-berlin.de) X-tubIT-Incoming-IP: 130.149.58.163 Received: from mail.physik-pool.tu-berlin.de ([130.149.58.163] helo=mail.physik.tu-berlin.de) by mail.tu-berlin.de (exim-4.76/mailfrontend-7) with esmtp for id 1aj5YQ-0001bk-0B; Thu, 24 Mar 2016 14:44:03 +0100 Received: from [130.149.58.170] (firefox.physik-pool.tu-berlin.de [130.149.58.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.physik.tu-berlin.de (Postfix) with ESMTPSA id 2F18C56ED for ; Thu, 24 Mar 2016 13:44:00 +0000 (UTC) To: freebsd-hackers@freebsd.org From: Fabian Freyer Subject: [GSOC 2016] Introduction and proposal X-Enigmail-Draft-Status: N1110 Message-ID: <56F3EF1F.4030909@physik.tu-berlin.de> Date: Thu, 24 Mar 2016 14:43:59 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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, 24 Mar 2016 13:44:05 -0000 Hi! First of all, I would like to introduce myself: My name is Fabian Freyer, I am a physics student at the TU Berlin where I have been working as a FreeBSD Sysadmin for about 3 years. I am fluent in C and python and am interested in OS development; in fact I have been working on a toy operating system and boot loader as a side project for a while now. I enjoy playing CTFs and am working on my skills at reading and writing x86, amd64 and arm assembly. I have not yet participated in a GSOC due to other projects, but would like to participate this year. I started using bhyve with libvirt around a year ago to play around with, and have been using it as my main supervisor on server and development systems since; especially the debugging interface has proven useful to me on many occasions. I could imagine working on one or more of the following projects, since these are all features I would like to see in bhyve: 1) Implementing suspend / resume / snapshot behaviour for bhyve vm's 2) Going further from 1) implementing porcelain for migrating zvol-backed bhyve guests using zfs-send and moving state between hypervisors 3) Working on better libvirt support for bhyve. However, I haven't yet had much contact with hypervisor code. I have started looking into SimpleVisor [1] and the usr.sbin/bhyve/ source. I would greatly appreciate some guidance in that direction. Fabian Freyer Links: [1] - https://github.com/ionescu007/SimpleVisor -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? From owner-freebsd-hackers@freebsd.org Thu Mar 24 14:55:10 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 AD06DADB3CF for ; Thu, 24 Mar 2016 14:55:10 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.117.100]) (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 694E01731 for ; Thu, 24 Mar 2016 14:55:10 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from zero-gravitas.local (unknown [85.199.232.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id 81584EBB0 for ; Thu, 24 Mar 2016 14:54:56 +0000 (UTC) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=FreeBSD.org Authentication-Results: smtp.infracaninophile.co.uk/81584EBB0; dkim=none; dkim-atps=neutral Subject: Re: Code Formatter for STYLE(9)? To: freebsd-hackers@freebsd.org References: <56F3EBB1.1060603@embedded-brains.de> From: Matthew Seaman Message-ID: <56F3FFB3.6070801@FreeBSD.org> Date: Thu, 24 Mar 2016 14:54:43 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56F3EBB1.1060603@embedded-brains.de> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gxo3K9GJqMfeePIVvU7vAnF3BwKVC66HU" X-Virus-Scanned: clamav-milter 0.99.1 at smtp.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=2.2 required=5.0 tests=RDNS_NONE,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.1 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on smtp.infracaninophile.co.uk 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, 24 Mar 2016 14:55:10 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --gxo3K9GJqMfeePIVvU7vAnF3BwKVC66HU Content-Type: multipart/mixed; boundary="vTsKK3L3WElK1GJhwtsRPrd4gA2HowraP" From: Matthew Seaman To: freebsd-hackers@freebsd.org Message-ID: <56F3FFB3.6070801@FreeBSD.org> Subject: Re: Code Formatter for STYLE(9)? References: <56F3EBB1.1060603@embedded-brains.de> In-Reply-To: <56F3EBB1.1060603@embedded-brains.de> --vTsKK3L3WElK1GJhwtsRPrd4gA2HowraP Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2016/03/24 13:29, Sebastian Huber wrote: > Hello, >=20 > is there a ready to use C code formatter available that honours > STYLE(9)? I tried clang-format, but it knows only LLVM, Google, > Chromium, Mozilla by default. The GNU indent --original seems to produc= e > nothing usable. Same problem with astyle --style=3Dbsd. >=20 pkg uses uncrustify with this config file: https://github.com/freebsd/pkg/blob/master/freebsd.cfg It's approximately what style(9) describes but doesn't cover things like sorting include files and I don't think it was updated in response to the recent change allowing { brackets } around certain single-line statements. Cheers, Matthew --vTsKK3L3WElK1GJhwtsRPrd4gA2HowraP-- --gxo3K9GJqMfeePIVvU7vAnF3BwKVC66HU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQJ8BAEBCgBmBQJW8/+6XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxOUYxNTRFQ0JGMTEyRTUwNTQ0RTNGMzAw MDUxM0YxMEUwQTlFNEU3AAoJEABRPxDgqeTnFYwP/A1oTwAxt54CSTzhtUw+vn8M /ZXyvFWZKYd3qVXNAq3ke0XllHAv3xCbEEKwE4yAgwaCJmLWO3AoLe+PRbK8t+Jb LA05vZtS+lRWn6W+dcU2IKtg7dyElTCkbOzodwpucg387KtWd28BDksF/zc6nUFg cVOTR2DGIbr3i5RUXwMrtemVi5bmStgjzbxW6VZXGddnlLHlbp2YqRfz+d+pI5RA G4fSyuEs9NFi6k6GKH4X7uvIGCVpTZMcerf/pyirjDv/GbfgXNCxnYjjcYC2/oHM xeNiZ1snTo9Sg8POcEJIbmgcBYpt7RFCP5yNQQ2QXD7oxfguMM9TsgtoVm6P8Om6 LUUQvf2WTEHOCxITs6uMumaQry5i6bu0UuL2Rc50DS9C22iePkHgnlcmhCkZHZ0B IO5C1222G8dDC6BwKsu6eK6P7u2y5jSw7/AOVtrMuRRwxDbEYqHJeR7Z+V7P4/D7 ZQn0SLcyERw5Vxr06cMsKDLCwnTECrjVitlKwLulvRVrk9mC0nQPj8ZU8ywQwsbc yqvRqpP8vOjTg4OCmgfiwEh/IkDlP+0n/uxCKObgFJw9Dyb2pESKOQ5YP8OWKCBs nD3fqSd179oPXPRMqtNXmnvvnimAwmgc94IpMZ4pqn0/5vaAktrxGQqJ/VMNZVri fF9+Lu3Vfc2NTZItXOMs =c9h3 -----END PGP SIGNATURE----- --gxo3K9GJqMfeePIVvU7vAnF3BwKVC66HU-- From owner-freebsd-hackers@freebsd.org Thu Mar 24 16: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 E84E6ADC153; Thu, 24 Mar 2016 16:31:29 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from mail.ptrcrt.ch (gahr.cloud.tilaa.com [84.22.109.158]) (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 11DDB1764; Thu, 24 Mar 2016 16:31:28 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from webmail.ptrcrt.ch (www.gahr.ch [192.168.1.2]) by mail.ptrcrt.ch (OpenSMTPD) with ESMTPSA id db9388a3 TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO; Thu, 24 Mar 2016 16:24:43 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 24 Mar 2016 17:24:43 +0100 From: Pietro Cerutti To: Matthew Seaman Cc: freebsd-hackers@freebsd.org, owner-freebsd-hackers@freebsd.org Subject: Re: Code Formatter for STYLE(9)? Organization: The FreeBSD Project In-Reply-To: <56F3FFB3.6070801@FreeBSD.org> References: <56F3EBB1.1060603@embedded-brains.de> <56F3FFB3.6070801@FreeBSD.org> Message-ID: <1fc0f5efcc94822f7f5ca9bbcb850faf@gahr.ch> X-Sender: gahr@FreeBSD.org User-Agent: Roundcube Webmail/1.1.4 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, 24 Mar 2016 16:31:30 -0000 On 2016-03-24 15:54, Matthew Seaman wrote: > On 2016/03/24 13:29, Sebastian Huber wrote: >> Hello, >> >> is there a ready to use C code formatter available that honours >> STYLE(9)? I tried clang-format, but it knows only LLVM, Google, >> Chromium, Mozilla by default. The GNU indent --original seems to >> produce >> nothing usable. Same problem with astyle --style=bsd. >> > > pkg uses uncrustify with this config file: > > https://github.com/freebsd/pkg/blob/master/freebsd.cfg > > It's approximately what style(9) describes but doesn't cover things > like > sorting include files and I don't think it was updated in response to > the recent change allowing { brackets } around certain single-line > statements. It looks like it does: https://github.com/freebsd/pkg/commit/1bc61a4 -- Pietro Cerutti gahr@FreeBSD.org PGP Public Key: http://gahr.ch/pgp From owner-freebsd-hackers@freebsd.org Thu Mar 24 20:22:19 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 31599ADC0EA for ; Thu, 24 Mar 2016 20:22:19 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE32A1FED for ; Thu, 24 Mar 2016 20:22:18 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id A40FF1FE023; Thu, 24 Mar 2016 21:22:09 +0100 (CET) Subject: Re: Code Formatter for STYLE(9)? To: Sebastian Huber , freebsd-hackers@freebsd.org References: <56F3EBB1.1060603@embedded-brains.de> From: Hans Petter Selasky Message-ID: <56F44D23.6090405@selasky.org> Date: Thu, 24 Mar 2016 21:25:07 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <56F3EBB1.1060603@embedded-brains.de> 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, 24 Mar 2016 20:22:19 -0000 On 03/24/16 14:29, Sebastian Huber wrote: > Hello, > > is there a ready to use C code formatter available that honours > STYLE(9)? I tried clang-format, but it knows only LLVM, Google, > Chromium, Mozilla by default. The GNU indent --original seems to produce > nothing usable. Same problem with astyle --style=bsd. > Hi, Maybe you want to contribute to: https://svnweb.freebsd.org/base/head/tools/tools/indent_wrapper It also supports diffs. --HPS From owner-freebsd-hackers@freebsd.org Fri Mar 25 00:15:32 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 57AA6ADB5BF; Fri, 25 Mar 2016 00:15:32 +0000 (UTC) (envelope-from bdrewery@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 3AFBF1330; Fri, 25 Mar 2016 00:15:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 35288123A; Fri, 25 Mar 2016 00:15:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id BAAB720142; Fri, 25 Mar 2016 00:15:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id qePsuLXOybcP; Fri, 25 Mar 2016 00:15:28 +0000 (UTC) Subject: Re: Code Formatter for STYLE(9)? DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 4CD8F2013C To: Pietro Cerutti , Matthew Seaman References: <56F3EBB1.1060603@embedded-brains.de> <56F3FFB3.6070801@FreeBSD.org> <1fc0f5efcc94822f7f5ca9bbcb850faf@gahr.ch> Cc: freebsd-hackers@freebsd.org, owner-freebsd-hackers@freebsd.org From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <56F48322.9030208@FreeBSD.org> Date: Thu, 24 Mar 2016 17:15:30 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1fc0f5efcc94822f7f5ca9bbcb850faf@gahr.ch> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tQwMehaBEknFFUx9HPnPrg81RIpWiGnGg" 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, 25 Mar 2016 00:15:32 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --tQwMehaBEknFFUx9HPnPrg81RIpWiGnGg Content-Type: multipart/mixed; boundary="NQG1e4DpeKdiMcLQlCH5V46sx6sKovkcl" From: Bryan Drewery To: Pietro Cerutti , Matthew Seaman Cc: freebsd-hackers@freebsd.org, owner-freebsd-hackers@freebsd.org Message-ID: <56F48322.9030208@FreeBSD.org> Subject: Re: Code Formatter for STYLE(9)? References: <56F3EBB1.1060603@embedded-brains.de> <56F3FFB3.6070801@FreeBSD.org> <1fc0f5efcc94822f7f5ca9bbcb850faf@gahr.ch> In-Reply-To: <1fc0f5efcc94822f7f5ca9bbcb850faf@gahr.ch> --NQG1e4DpeKdiMcLQlCH5V46sx6sKovkcl Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 3/24/2016 9:24 AM, Pietro Cerutti wrote: > On 2016-03-24 15:54, Matthew Seaman wrote: >> On 2016/03/24 13:29, Sebastian Huber wrote: >>> Hello, >>> >>> is there a ready to use C code formatter available that honours >>> STYLE(9)? I tried clang-format, but it knows only LLVM, Google, >>> Chromium, Mozilla by default. The GNU indent --original seems to prod= uce >>> nothing usable. Same problem with astyle --style=3Dbsd. >>> >> >> pkg uses uncrustify with this config file: >> >> https://github.com/freebsd/pkg/blob/master/freebsd.cfg >> >> It's approximately what style(9) describes but doesn't cover things li= ke >> sorting include files and I don't think it was updated in response to >> the recent change allowing { brackets } around certain single-line >> statements. >=20 > It looks like it does: https://github.com/freebsd/pkg/commit/1bc61a4 >=20 It's not quite right. It is adding {} to single-line if statements in some code. > static __inline struct filemon * > filemon_acquire(struct filemon *filemon) > { > - > - if (filemon !=3D NULL) > + if (filemon !=3D NULL) { > refcount_acquire(&filemon->refcnt); > + } > return (filemon); > } It's also not aware of our (silly?) blank line with no declarations rule:= > static __inline void > filemon_drop(struct filemon *filemon) > { > - > sx_xunlock(&filemon->lock); > filemon_release(filemon); > } And wrapping multiple conditions: > - if (p->p_filemon !=3D NULL && p !=3D curproc) > + if ((p->p_filemon !=3D NULL) && (p !=3D curproc)) { > return (EBUSY); > + } It's also not respecting the wrap rule of tabs + 4 spaces. It's also adding random blank lines before functions and macros. It found a useless 'return;' at least. --=20 Regards, Bryan Drewery --NQG1e4DpeKdiMcLQlCH5V46sx6sKovkcl-- --tQwMehaBEknFFUx9HPnPrg81RIpWiGnGg 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 iQEcBAEBAgAGBQJW9IMiAAoJEDXXcbtuRpfPU1cH/ixdr8/rNMbe1OdzqRkFbQlw jYbi/LkxEdKE34e4wSEwz4prvOYp19Tv1gFirzuPWQvIBQE0wJW9wrE9InF0t2xQ qZSunrxiTu1+YbdpuJyV59B9YN3khNkyAvEyHV3tJpFOgv1TRaslPJNt9ItozE0j 3m185vII0KUx19VwYfqniFR0iKm98bqbBau1WJ7EjLusqNgN/zz+422Qu/+Snv9T eOIWFocMjAJFqU+HQTQl59HmhtQVk7icd3oWHA6fPX7nb9SUBVhQmF+D2KkFN1Y9 pa+DAeB8njSg4ZYQlasvlnDkuKitnQw+elSatWELCU9LondZkwoF68QGgBLnqIg= =W3pr -----END PGP SIGNATURE----- --tQwMehaBEknFFUx9HPnPrg81RIpWiGnGg-- From owner-freebsd-hackers@freebsd.org Fri Mar 25 00:28:16 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 4D4B4ADB94E; Fri, 25 Mar 2016 00:28:16 +0000 (UTC) (envelope-from jonathan@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 2DB9617FA; Fri, 25 Mar 2016 00:28:16 +0000 (UTC) (envelope-from jonathan@FreeBSD.org) Received: from [192.168.42.104] (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 6AA8613D7; Fri, 25 Mar 2016 00:28:15 +0000 (UTC) (envelope-from jonathan@FreeBSD.org) From: "Jonathan Anderson" To: "Bryan Drewery" Cc: "Pietro Cerutti" , "Matthew Seaman" , freebsd-hackers@freebsd.org, owner-freebsd-hackers@freebsd.org Subject: Re: Code Formatter for STYLE(9)? Date: Thu, 24 Mar 2016 21:56:19 -0230 Message-ID: <98F4CDB7-FD74-494E-8D6A-8FBABE3FA982@FreeBSD.org> In-Reply-To: <56F48322.9030208@FreeBSD.org> References: <56F3EBB1.1060603@embedded-brains.de> <56F3FFB3.6070801@FreeBSD.org> <1fc0f5efcc94822f7f5ca9bbcb850faf@gahr.ch> <56F48322.9030208@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=_MailMate_9001ABCE-80DA-43A2-97EC-DFBFE29EA684_="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Mailer: MailMate (1.9.4r5234) 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, 25 Mar 2016 00:28:16 -0000 This is an OpenPGP/MIME signed message (RFC 3156 and 4880). --=_MailMate_9001ABCE-80DA-43A2-97EC-DFBFE29EA684_= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 24 Mar 2016, at 21:45, Bryan Drewery wrote: > On 3/24/2016 9:24 AM, Pietro Cerutti wrote: >> On 2016-03-24 15:54, Matthew Seaman wrote: >>> On 2016/03/24 13:29, Sebastian Huber wrote: >>>> Hello, >>>> >>>> is there a ready to use C code formatter available that honours >>>> STYLE(9)? I tried clang-format, but it knows only LLVM, Google, >>>> Chromium, Mozilla by default. The GNU indent --original seems to pro= duce >>>> nothing usable. Same problem with astyle --style=3Dbsd. >>>> >>> >>> pkg uses uncrustify with this config file: >>> >>> https://github.com/freebsd/pkg/blob/master/freebsd.cfg >>> >>> It's approximately what style(9) describes but doesn't cover things l= ike >>> sorting include files and I don't think it was updated in response to= >>> the recent change allowing { brackets } around certain single-line >>> statements. >> >> It looks like it does: https://github.com/freebsd/pkg/commit/1bc61a4 >> > > It's not quite right. It is adding {} to single-line if statements in > some code. Perhaps some of the `full_brace` cases should use `ignore` rather than `a= dd` or `remove`, since the new rule is "you may put braces around single = lines" rather than "you may not" (as in the old style(9)) or "you must" (= as in this uncrustify config). Jon -- Jonathan Anderson jonathan@FreeBSD.org --=_MailMate_9001ABCE-80DA-43A2-97EC-DFBFE29EA684_= Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJW9IWrAAoJEDusuBaTfFXcWPwP/2JsfCNEZgQ2ROaWXoZcULgw p4QD2/751AmzmgMCWFkmFFDMvLpGBHj92H1AilGHhv32TxqovOxbVEr0A9xzQBCt IX2StMnppWuHrgfdcQNp1FfFvIYT3FYtBq+J0A8J6HipAgrXIx1/HUOjYIp8oq8j J57hFiWkMzGa9Y7uhv/h7Y0JBS8/jV9xjoFIDp0P9eXwiS84cxl0uEuqWGn0VCgb sPdS+E16RYOTlPCFVuFmmAfzQG3hSqVPXyp8uJlh256TolC+zfTZwAZEw4a1t7UT +v424mFVp/NDvTDdgaJkPQcuWbr1BhFuk5R/oWkgQY6qyai0UPwLUxP8IAzn+Z+Y G7BBD/6RLutbFqqiT6XFJRk0f85SD60pQrpiF4dULh7EGYLDjKqOVON6eJ3fkCbk 9Ic6RdDrvjuhdQ9RUK+qqCjudr3MjAbWpBWdZrjzf8VKrQCH+drgfHKgMuD/ap1i XuCSdGcjn0qD5fjgnQNVnef9LpgcU+lpDGX73uqkyK+ocHUsjvzCPcR820vnWp+h bT2cB/Tr3p+2YV6xZYKRywHgN20lmMmK9f6kiTJTQD84mATUzYJUPqPPKqF2VLH2 547K0SjrmfoyDHCr6cvPDtaqDxLFJhmXvpawfJIfNc8K4xaMLFogwse+Dclfgc0j YvLQHPZZsdlnppcFuVKn =Jkq2 -----END PGP SIGNATURE----- --=_MailMate_9001ABCE-80DA-43A2-97EC-DFBFE29EA684_=-- From owner-freebsd-hackers@freebsd.org Fri Mar 25 06:37:34 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 C14A2ADD597 for ; Fri, 25 Mar 2016 06:37:34 +0000 (UTC) (envelope-from ms.soumya12@gmail.com) Received: from mail-ig0-x229.google.com (mail-ig0-x229.google.com [IPv6:2607:f8b0:4001:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 841EF181D for ; Fri, 25 Mar 2016 06:37:34 +0000 (UTC) (envelope-from ms.soumya12@gmail.com) Received: by mail-ig0-x229.google.com with SMTP id ig19so8035017igb.1 for ; Thu, 24 Mar 2016 23:37:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=7VFLNPTbMJbzKl3X6L1Dcd6tQ88C20BJr1PL8Xoi5W0=; b=h6ZwgrGNF0wW2aspIdwe3MwiE7E753RZQ7sMq8HKvhq0ZSWIr7LnwCVZlYXWrwJ9Jc o8ruALFas8bigavJKphkemRNMbl63V0gOiY6VLRPWRh2QW9SEI0LJk14TzdHEC5X6L9+ gbBmSSeS3Fba9Et+qoQ5pDrXHOzaHGDCQTcw8rJkXz4HU8OyRTmVspI1m9gwJCjlzpj3 4Jqf+ElBUaIM4RM80ZYngZ/J0uuWEyeMXO1I54K+PpgkT1f9sREABqYyo97rAGFJFdF0 KX2jFZ0SOfY4tw5jbqfwAkbgt1QcymTWH7DD1IyjKd7QwJjwLIBtKAmpDZcuoJpVyROW fICg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=7VFLNPTbMJbzKl3X6L1Dcd6tQ88C20BJr1PL8Xoi5W0=; b=OXzbBBToW/3juT79013WQMHLQ7+bUtQbOTcnlxMm7sxYmhYhKLvXp42Y9i9dt1vNcl /qY+C8yJ/npSACFdgcPyCDm4F1CMr5wTCudI7C70EoUItGn2Q0Ag7ENXQZg4gl0ljOYG ykI2Q54ZWYst/i2l5KgUdut26uBwZXStiFv+O/W48YJVQQNJvRO+qBuxASTZBl9VZbcV Nv8DtCJ4OHBHSTeJx9UToO1QMhxcw7f8vWL5Wktt6k+KvGT3RIDO0MMmpe2eRzNmGgJd dbXgrfDQHjAC8jB2ojzOXjPkiL+ESsVorgp5Ej0eKsmQrtgSsKR/A73S9exkCtBbhMYh vkwg== X-Gm-Message-State: AD7BkJL/3Wf66D2DqGdZGTpmrybTbFTPR3OC4YxKEG0h3mNlSfmE1UMLo6ABbIeD8pkvvdhFEfyflkrll8fIYA== MIME-Version: 1.0 X-Received: by 10.50.61.232 with SMTP id t8mr12884630igr.83.1458887853477; Thu, 24 Mar 2016 23:37:33 -0700 (PDT) Received: by 10.64.240.207 with HTTP; Thu, 24 Mar 2016 23:37:33 -0700 (PDT) Date: Fri, 25 Mar 2016 12:07:33 +0530 Message-ID: Subject: [Gsoc 2016] Guidance to information for "Overhaul the config system" project From: Ms ms To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 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: Fri, 25 Mar 2016 06:37:34 -0000 Hi, I'm interested in working on "Overhaul the config system" project for the summer. To give a brief introduction of myself: I'm an MS by Research student at the International Institute of Information and Technology, Hyderabad (IIIT-H). I have 1 year experience being a Systems Administrator(including configuration management using Ansible, setting up basic infrastructure like the DNS, router etc.) in a government project. I enjoy working on systems administration stuff and have my thesis directed towards it. I would like to know more details about this project to fill in a proposal. With regards, Soumya. From owner-freebsd-hackers@freebsd.org Fri Mar 25 07:47:39 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 497C3ADC7A4; Fri, 25 Mar 2016 07:47:39 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c:c09::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 D4E471388; Fri, 25 Mar 2016 07:47:38 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by mail-wm0-x230.google.com with SMTP id l68so11746173wml.0; Fri, 25 Mar 2016 00:47:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=TkO5CpTynLZVbl+BNAmaaREiU9HHVUXsExB9Zvq9RGk=; b=ZjfAEfrDJMb2wchswuQkOJDKsb0YxW8JRjyiehKt2aElgKHtN1T6qOLaiaBIJb69SL iVZb2FE39jtDWx2r+s0+2qTyMkHkjL5GD6VY34ols7aVxZ+KQ/nQ/AeBl69ft391fmkp md1FV8/siwSElbsmMPng8mMOa/+3QXgDclXfbbbnj18C/LzcebyZhiAaFQFQARrN1zPF ncD2/DE9C1pobjRMXasIhn1AMcbo4QXmNRrUEr5IT5iDqAfAxC12IapVTQaQyJch4hSZ HRc1+1N39l0WcHYOgV+x7tpTP8cu0sR7u1jyUgczyFqcppD+FuTS60R9hTE9QZgxcDxx 5guQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=TkO5CpTynLZVbl+BNAmaaREiU9HHVUXsExB9Zvq9RGk=; b=K8yj2fjXMWA44AnZ1K8eDCGVlGA3Frkz/JjP+IzQyFbBjPfTRbDxEdT5mKOU4tB2An 9HXsUR0vh1KxmPKBQsEe9PfQW37wz7lyUib5lp+5O5oUx9hMtwV0u0mtdGK7nqMaCrp1 YwmmcUucYCKlmKGnG5yH0nYGxD4Ig5Sm1i10KwqFadx9IopYzbiCppwKlfxb6DppG4yt j+pjhnqelH41QVDfJE/sRdyofXGko4UQgqgFk5ZlvM+f1JkMorE7ZqZcKjB04a0xBOjN jzoXlW2ejxWTLCUEmTLgAEMWkeX1xSvmcB+i/4JubiWclTGmTPU7hkh3p+L/RQ5DTmuv z3cw== X-Gm-Message-State: AD7BkJK9BetOBnHXNILX52o5SnU1OYl1Mlz3QCGO+etHUcsd7WVlfehQPX7aF2JE/kA9OQ== X-Received: by 10.194.23.67 with SMTP id k3mr13259244wjf.177.1458892057282; Fri, 25 Mar 2016 00:47:37 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id v2sm1956949wmd.24.2016.03.25.00.47.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Mar 2016 00:47:35 -0700 (PDT) Sender: Baptiste Daroussin Date: Fri, 25 Mar 2016 08:47:33 +0100 From: Baptiste Daroussin To: Bryan Drewery Cc: Pietro Cerutti , Matthew Seaman , freebsd-hackers@freebsd.org, owner-freebsd-hackers@freebsd.org Subject: Re: Code Formatter for STYLE(9)? Message-ID: <20160325074733.GA36953@ivaldir.etoilebsd.net> References: <56F3EBB1.1060603@embedded-brains.de> <56F3FFB3.6070801@FreeBSD.org> <1fc0f5efcc94822f7f5ca9bbcb850faf@gahr.ch> <56F48322.9030208@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GvXjxJ+pjyke8COw" Content-Disposition: inline In-Reply-To: <56F48322.9030208@FreeBSD.org> 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: Fri, 25 Mar 2016 07:47:39 -0000 --GvXjxJ+pjyke8COw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 24, 2016 at 05:15:30PM -0700, Bryan Drewery wrote: > On 3/24/2016 9:24 AM, Pietro Cerutti wrote: > > On 2016-03-24 15:54, Matthew Seaman wrote: > >> On 2016/03/24 13:29, Sebastian Huber wrote: > >>> Hello, > >>> > >>> is there a ready to use C code formatter available that honours > >>> STYLE(9)? I tried clang-format, but it knows only LLVM, Google, > >>> Chromium, Mozilla by default. The GNU indent --original seems to prod= uce > >>> nothing usable. Same problem with astyle --style=3Dbsd. > >>> > >> > >> pkg uses uncrustify with this config file: > >> > >> https://github.com/freebsd/pkg/blob/master/freebsd.cfg > >> > >> It's approximately what style(9) describes but doesn't cover things li= ke > >> sorting include files and I don't think it was updated in response to > >> the recent change allowing { brackets } around certain single-line > >> statements. > >=20 > > It looks like it does: https://github.com/freebsd/pkg/commit/1bc61a4 > >=20 >=20 > It's not quite right. It is adding {} to single-line if statements in > some code. Yes this is un purpose for pkg >=20 > > static __inline struct filemon * > > filemon_acquire(struct filemon *filemon) > > { > > - > > - if (filemon !=3D NULL) > > + if (filemon !=3D NULL) { > > refcount_acquire(&filemon->refcnt); > > + } > > return (filemon); > > } >=20 > It's also not aware of our (silly?) blank line with no declarations rule: I couldn't find how to make that >=20 > > static __inline void > > filemon_drop(struct filemon *filemon) > > { > > - > > sx_xunlock(&filemon->lock); > > filemon_release(filemon); > > } >=20 > And wrapping multiple conditions: >=20 > > - if (p->p_filemon !=3D NULL && p !=3D curproc) > > + if ((p->p_filemon !=3D NULL) && (p !=3D curproc)) { > > return (EBUSY); > > + } Same I couldn't find how to make that better >=20 > It's also not respecting the wrap rule of tabs + 4 spaces. same >=20 > It's also adding random blank lines before functions and macros. yup The above reasons are why it has not been automatically used in pkg. It is the closer I could get, I would be happy to get patches to improve Best regards, Bapt --GvXjxJ+pjyke8COw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJW9O0PAAoJEGOJi9zxtz5aRoEP/Rg8W8woYQ+qkchAV8QOVX3B uSgqNqV03kmOT5ZvSGpwgKx4LWTZOnn2WglZiCGtflL+TkuYyVhw8D2hxznRgmsu zsJakqkEGARRmW6GA/H7x3B+SEMUVGiV9IHEamGhtUEEtw2k+3Cn5jRFFny3JI3T nGbgceEFewlhnDg1sco8VZIk9eFVE5Lbp72FPtW5AmOm2tN6XN4neUwj/SBT6QGl Hykgrn+WYyV9k7J3OMqpX0HUQ/f+LZGl9oX7yGBKJ4R9SaImLvaSvVtIZoquRvok ct/dFojkc5+wtb6bc48I3Kgu2EsOYg2rn91Q8t1ITvs6uCjrh5HxuWcbdoNx4wcr BF5ewkilcGZE7yhFsfQJfoQCQ5HHoUGs+1/LVO7YCg2EGxTQJe3984hbqVacB72i FqgIFstYh97gJWsdmPHgsLL7c+LX3oqdpC/fSOtQnZPIPcP2hnzB109mXZV7WfLz Pfy22W1BLuxWMYZd4SD4qsmBYB1apyj9nK9dJOknsT/AJ93ALe2BXemHeFnHRNso ezIak10QKEwDxpw02H33enwC3vH7DwQT+W+HEZjrAoUep9KuZbly5SqWwVUTleVA OyxUPknmeyorpmj0kW3B6YriCgr16hx42RiH0AMwgkpXyXCjG9QPtTECZ1il1kDL 2Roq+EKfDD2+n5aVZpWW =Wmj1 -----END PGP SIGNATURE----- --GvXjxJ+pjyke8COw-- From owner-freebsd-hackers@freebsd.org Fri Mar 25 09:36: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 CC5E6ADC84A for ; Fri, 25 Mar 2016 09:36: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 84317119F for ; Fri, 25 Mar 2016 09:36:51 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (ppp121-45-238-157.lns20.per1.internode.on.net [121.45.238.157]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id u2P9aeuN093811 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Fri, 25 Mar 2016 02:36:43 -0700 (PDT) (envelope-from julian@freebsd.org) Subject: Re: Code Formatter for STYLE(9)? To: freebsd-hackers@freebsd.org References: <56F3EBB1.1060603@embedded-brains.de> <56F3FFB3.6070801@FreeBSD.org> <1fc0f5efcc94822f7f5ca9bbcb850faf@gahr.ch> <56F48322.9030208@FreeBSD.org> From: Julian Elischer Message-ID: <56F506A3.80203@freebsd.org> Date: Fri, 25 Mar 2016 17:36:35 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56F48322.9030208@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 25 Mar 2016 09:36:51 -0000 On 25/03/2016 8:15 AM, Bryan Drewery wrote: > On 3/24/2016 9:24 AM, Pietro Cerutti wrote: >> On 2016-03-24 15:54, Matthew Seaman wrote: >>> On 2016/03/24 13:29, Sebastian Huber wrote: >>>> Hello, >>>> >>>> is there a ready to use C code formatter available that honours >>>> STYLE(9)? I tried clang-format, but it knows only LLVM, Google, >>>> Chromium, Mozilla by default. The GNU indent --original seems to produce >>>> nothing usable. Same problem with astyle --style=bsd. there was an indent() config that was quite close. >>> pkg uses uncrustify with this config file: >>> >>> https://github.com/freebsd/pkg/blob/master/freebsd.cfg >>> >>> It's approximately what style(9) describes but doesn't cover things like >>> sorting include files and I don't think it was updated in response to >>> the recent change allowing { brackets } around certain single-line >>> statements. >> It looks like it does: https://github.com/freebsd/pkg/commit/1bc61a4 >> > It's not quite right. It is adding {} to single-line if statements in > some code. > >> static __inline struct filemon * >> filemon_acquire(struct filemon *filemon) >> { >> - >> - if (filemon != NULL) >> + if (filemon != NULL) { >> refcount_acquire(&filemon->refcnt); >> + } >> return (filemon); >> } > It's also not aware of our (silly?) blank line with no declarations rule: > >> static __inline void >> filemon_drop(struct filemon *filemon) >> { >> - >> sx_xunlock(&filemon->lock); >> filemon_release(filemon); >> } > And wrapping multiple conditions: > >> - if (p->p_filemon != NULL && p != curproc) >> + if ((p->p_filemon != NULL) && (p != curproc)) { >> return (EBUSY); >> + } > It's also not respecting the wrap rule of tabs + 4 spaces. > > It's also adding random blank lines before functions and macros. > > It found a useless 'return;' at least. > From owner-freebsd-hackers@freebsd.org Fri Mar 25 09:39:08 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 540EAADC8FF for ; Fri, 25 Mar 2016 09:39:08 +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 0B0DE12E1 for ; Fri, 25 Mar 2016 09:39:07 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (ppp121-45-238-157.lns20.per1.internode.on.net [121.45.238.157]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id u2P9d3n3093821 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Fri, 25 Mar 2016 02:39:06 -0700 (PDT) (envelope-from julian@freebsd.org) Subject: Re: Code Formatter for STYLE(9)? To: freebsd-hackers@freebsd.org References: <56F3EBB1.1060603@embedded-brains.de> <56F3FFB3.6070801@FreeBSD.org> <1fc0f5efcc94822f7f5ca9bbcb850faf@gahr.ch> <56F48322.9030208@FreeBSD.org> <56F506A3.80203@freebsd.org> From: Julian Elischer Message-ID: <56F50732.2040703@freebsd.org> Date: Fri, 25 Mar 2016 17:38:58 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56F506A3.80203@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.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, 25 Mar 2016 09:39:08 -0000 On 25/03/2016 5:36 PM, Julian Elischer wrote: > On 25/03/2016 8:15 AM, Bryan Drewery wrote: >> On 3/24/2016 9:24 AM, Pietro Cerutti wrote: >>> On 2016-03-24 15:54, Matthew Seaman wrote: >>>> On 2016/03/24 13:29, Sebastian Huber wrote: >>>>> Hello, >>>>> >>>>> is there a ready to use C code formatter available that honours >>>>> STYLE(9)? I tried clang-format, but it knows only LLVM, Google, >>>>> Chromium, Mozilla by default. The GNU indent --original seems to >>>>> produce >>>>> nothing usable. Same problem with astyle --style=bsd. > > there was an indent() config that was quite close. I'm talking abut hte indnet in freebsd /usr/bin >>>> pkg uses uncrustify with this config file: >>>> >>>> https://github.com/freebsd/pkg/blob/master/freebsd.cfg >>>> >>>> It's approximately what style(9) describes but doesn't cover >>>> things like >>>> sorting include files and I don't think it was updated in >>>> response to >>>> the recent change allowing { brackets } around certain single-line >>>> statements. >>> It looks like it does: https://github.com/freebsd/pkg/commit/1bc61a4 >>> >> It's not quite right. It is adding {} to single-line if statements in >> some code. >> >>> static __inline struct filemon * >>> filemon_acquire(struct filemon *filemon) >>> { >>> - >>> - if (filemon != NULL) >>> + if (filemon != NULL) { >>> refcount_acquire(&filemon->refcnt); >>> + } >>> return (filemon); >>> } >> It's also not aware of our (silly?) blank line with no declarations >> rule: >> >>> static __inline void >>> filemon_drop(struct filemon *filemon) >>> { >>> - >>> sx_xunlock(&filemon->lock); >>> filemon_release(filemon); >>> } >> And wrapping multiple conditions: >> >>> - if (p->p_filemon != NULL && p != curproc) >>> + if ((p->p_filemon != NULL) && (p != curproc)) { >>> return (EBUSY); >>> + } >> It's also not respecting the wrap rule of tabs + 4 spaces. >> >> It's also adding random blank lines before functions and macros. >> >> It found a useless 'return;' at least. >> > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to > "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@freebsd.org Fri Mar 25 06:26:57 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 5BF2DADD442 for ; Fri, 25 Mar 2016 06:26:57 +0000 (UTC) (envelope-from ms.soumya12@gmail.com) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 3F9701531 for ; Fri, 25 Mar 2016 06:26:57 +0000 (UTC) (envelope-from ms.soumya12@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 3A671ADD441; Fri, 25 Mar 2016 06:26:57 +0000 (UTC) Delivered-To: hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A02BADD440 for ; Fri, 25 Mar 2016 06:26:57 +0000 (UTC) (envelope-from ms.soumya12@gmail.com) Received: from mail-ig0-x233.google.com (mail-ig0-x233.google.com [IPv6:2607:f8b0:4001:c05::233]) (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 F27D4152F for ; Fri, 25 Mar 2016 06:26:56 +0000 (UTC) (envelope-from ms.soumya12@gmail.com) Received: by mail-ig0-x233.google.com with SMTP id l20so7954250igf.0 for ; Thu, 24 Mar 2016 23:26:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=uYEagz616km3pcfk1N/eXRrNHRCJu5KLtxugJepGiMc=; b=Vdh3lxYjbRmALG/v/8VnTQiekhbeNrOSokXdt6HHxF1hVbbreKWEssKfdk3VrB6E/z h6WDe6zBY6Y/y00uOL6flGwfmxhPTFLqugYr/r6T7vMKE+pH0kiX91MFd6Jx6l7HqRxU I1szQWsdVzDt77W0sDbYd8WTcLymZC+6pRm4Ce6vOPHFMzbHOb9q8teG8cpelcWAjDX6 0vBQi0kIeHeUJhaq3AteWhJABAMD9ziVNT3FwYhKvKzndCpEwPw1DjnwjHbm5anD0ZS4 /F+ZKUsbsVd+7lvj2NZ5mVJ+2z39BLeP4lsvP+X/aUuhWI3XE6w5fxNqB0t0PkcwKrIU S6cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=uYEagz616km3pcfk1N/eXRrNHRCJu5KLtxugJepGiMc=; b=NOGkC8PzRUIsGT0QRO/e7IYIaTEeRDnh4Y5qePoQdeunKoDUvEC3ja0Y1rgX7chJjV P79tNZg+VsECONczwyFmRti3mM/XTvj3sU5BFeQzidf2F5UuN6epq6ohzjg9Gi1fGikB NK31kR6W3K9yzse4syJITd+DcaNYbQoPl6loDhdsFEI1L9NowVlS5c9MBGypZDvI1xDk fHsFomK3AAObY3q8kDwtZkZPooImp7MUBc1EIb6+if9EiLUe1pV5Mtakze/1p6z+N/Nm 1fSO5fsxr7B+vOIfbW9pD7+1/l0YeKlXSbJw1FzrphH6eoxw6jybns4mtd3fgAM+p+xS zR9Q== X-Gm-Message-State: AD7BkJJ9KVycdZ0M6t4mXPTE+lKI3KEsbiuJ+B5TVaxhzHNkP2vaDr04Eqj/nu3aJEBzBJM5xGP9OCEWEpkHiQ== MIME-Version: 1.0 X-Received: by 10.50.64.178 with SMTP id p18mr33797380igs.83.1458887216247; Thu, 24 Mar 2016 23:26:56 -0700 (PDT) Received: by 10.64.240.207 with HTTP; Thu, 24 Mar 2016 23:26:56 -0700 (PDT) Date: Fri, 25 Mar 2016 11:56:56 +0530 Message-ID: Subject: [Gsoc 2016] Guidance to information for "Overhaul the config system" project From: Ms ms To: hackers@FreeBSD.org X-Mailman-Approved-At: Fri, 25 Mar 2016 11:02:16 +0000 Content-Type: text/plain; charset=UTF-8 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: Fri, 25 Mar 2016 06:26:57 -0000 Hi, I'm interested in working on "Overhaul the config system" project for the summer. To give a brief introduction of myself: I'm an MS by Research student at the International Institute of Information and Technology, Hyderabad (IIIT-H). I have 1 year experience being a Systems Administrator(including configuration management using Ansible, setting up basic infrastructure like the DNS, router etc.) in a government project. I enjoy working on systems administration stuff and have my thesis directed towards it. I would like to know more details about this project to fill in a proposal. With regards, Soumya.