From owner-freebsd-arch@freebsd.org Sun May 20 23:52:42 2018 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 956F5EF5012 for ; Sun, 20 May 2018 23:52:42 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 2B40C77B87 for ; Sun, 20 May 2018 23:52:42 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id DA7CBEF5006; Sun, 20 May 2018 23:52:41 +0000 (UTC) Delivered-To: arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7F30EF5004 for ; Sun, 20 May 2018 23:52:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 643CA77B79 for ; Sun, 20 May 2018 23:52:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 8F86F1D3E0 for ; Sun, 20 May 2018 23:52:40 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w4KNqeul093554 for ; Sun, 20 May 2018 23:52:40 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w4KNqe3l093551 for arch@FreeBSD.org; Sun, 20 May 2018 23:52:40 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: arch@FreeBSD.org Subject: [Bug 121073] [kernel] [patch] run chroot as an unprivileged user Date: Sun, 20 May 2018 23:52:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 8.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: eadler@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2018 23:52:42 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D121073 Eitan Adler changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Progress |Open --- Comment #11 from Eitan Adler --- For bugs matching the following conditions: - Status =3D=3D In Progress - Assignee =3D=3D "bugs@FreeBSD.org" - Last Modified Year <=3D 2017 Do - Set Status to "Open" --=20 You are receiving this mail because: You are on the CC list for the bug.= From owner-freebsd-arch@freebsd.org Mon May 21 03:51:36 2018 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5772EDB5BE for ; Mon, 21 May 2018 03:51:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 4D54E6AC10 for ; Mon, 21 May 2018 03:51:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 0E2BAEDB5BB; Mon, 21 May 2018 03:51:36 +0000 (UTC) Delivered-To: arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFD6EEDB5B9 for ; Mon, 21 May 2018 03:51:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E3176AC06 for ; Mon, 21 May 2018 03:51:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id D31521F74E for ; Mon, 21 May 2018 03:51:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w4L3pYqc013648 for ; Mon, 21 May 2018 03:51:34 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w4L3pYqA013643 for arch@FreeBSD.org; Mon, 21 May 2018 03:51:34 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: arch@FreeBSD.org Subject: [Bug 121073] [kernel] [patch] run chroot as an unprivileged user Date: Mon, 21 May 2018 03:51:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 8.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: julian@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 03:51:37 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D121073 Julian Elischer changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian@FreeBSD.org --- Comment #12 from Julian Elischer --- If the ability to do this operation (unpriv chroot) is inherited, and the ability to set that bit is only settable by root then a process can only do this if a root ancestor has said that security is being lowered by this fam= ily of processes. I would even go as far as saying secure level would disable it along with a "no return" policy. (by which I mean once it is set in a proce= ss and then used you cannot get that ability back ... full stop.) This would allow the use of the functionality for "build machine" type situations where in reality it is root or trusted proxy doing the chroot. In addition it should be a one-shot.. you use it , you lose it. With the advent of "everyone has there own computer" I am not sure how important it is to have "real users" be able to do builds. --=20 You are receiving this mail because: You are on the CC list for the bug.= From owner-freebsd-arch@freebsd.org Mon May 21 17:22:56 2018 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BD27EF9E04 for ; Mon, 21 May 2018 17:22:56 +0000 (UTC) (envelope-from bounces+654355-6dfc-freebsd-arch=freebsd.org@email.youpic.com) Received: from o1.email.youpic.com (o1.email.youpic.com [208.117.51.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60AD8680B7 for ; Mon, 21 May 2018 17:22:54 +0000 (UTC) (envelope-from bounces+654355-6dfc-freebsd-arch=freebsd.org@email.youpic.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=youpic.com; h=content-type:from:mime-version:to:subject; s=m1; bh=j71alHMZQgUo5mpq2L6pjidm68w=; b=otdu6sS9eZa7qLqrDKvtw+EKxqRVA jm9X66Av2iqpMZr4fIet9DFJSDOFllm6qMDmYQM04ddVxb3EbK3o8NKU0moIpW8T TzO/XgBnRedGbZRlPgmkV792pn4Ey7TONFticZjlkJ9bUfak+Ym2jTss2sudlAsS 83TQkFTo1bc/RY= Received: by filter0611p1iad2.sendgrid.net with SMTP id filter0611p1iad2-30970-5B030047-12 2018-05-21 17:22:15.767128621 +0000 UTC Received: from NjU0MzU1 (ec2-54-247-45-131.eu-west-1.compute.amazonaws.com [54.247.45.131]) by ismtpd0002p1lon1.sendgrid.net (SG) with HTTP id 6_DGwOSHSHmO4a2hxMdiNA Mon, 21 May 2018 17:22:15.473 +0000 (UTC) Date: Mon, 21 May 2018 17:22:43 +0000 (UTC) From: "YouPic Team" Mime-Version: 1.0 To: freebsd-arch@freebsd.org" Message-ID: <6_DGwOSHSHmO4a2hxMdiNA@ismtpd0002p1lon1.sendgrid.net> Subject: Let's stay in touch! X-SG-EID: t2fXfoZHCw6vGsGKHqKxJ1vvZFmqZoRBNxUXljRrVNYAo0UyIem80Z0ziNtoPqqnEdZS+nJUTCcdzD UM421MPTx93zxF98MHa1NNrfP+4225KMHh8olNUDU7rGiQkpTWzTGRduwSUbQNBASzQeq1ZJZOIBCl WbbDjxsaWVjwB5mEwuToaFPefVKRrD2EXhIZyS7vgAkpoy8GhYRwXA1Iofu/Bh7MjVeY8nXrAdiGm7 A= X-SG-ID: 2tgRB5vxOlJxbt1/F1Ovl13Ox/6zW5JEpiR4EEaJF8gfLxyUfbNLTqFQeL3qBiYsnvnc986EEtn9tz v+cwAnuF8va8Ev/1pyGYE43+2uAwM= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 17:22:56 -0000 Welcome=0D =0D http://youpic.com?utm_content=3DEmail&utm_campaign=3DEmail%20marketing&utm_= source=3DSendGrid&utm_term=3DEmail%20marketing&utm_medium=3DEmail=0D =0D Hello YouPic Community!=0D =0D We need your help. Due to the recent tragedy in Manchester, we have decided= to bring our community together and show every day life in Manchester. As = we all know, photography has a way of telling a great story without words. = Whether you are a resident in Manchester or there on vacation, we want to c= reate a photo series "Life in Manchester". We want to show that the world i= s still standing strong and kindness continues to fill the air. =C2=A0=0D =0D We will choose 20 photos and of course credit each of them. =C2=A0We look f= orward to seeing your photos. Lets make this happen!=0D =0D Don't forget to hashtag #lovemanchester=0D =0D Deadline: Sunday=C2=A0=0D =0D Take me to YouPic http://youpic.com/?utm_content=3DEmail&utm_campaign=3DEma= il%20marketing&utm_source=3DSendGrid&utm_term=3DEmail%20marketing&utm_mediu= m=3DEmail=0D =0D Sent with =E2=99=A5 from YouPic=0D =0D Holtermansgatan 1, 41129 Gothenburg, Sweden=0D =0D Unsubscribe https://youpic.com/settings?utm_content=3DEmail&utm_campaign=3D= Email%20marketing&utm_source=3DSendGrid&utm_term=3DEmail%20marketing&utm_me= dium=3DEmail= From owner-freebsd-arch@freebsd.org Thu May 24 15:46:37 2018 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A96AAEF57A5 for ; Thu, 24 May 2018 15:46:36 +0000 (UTC) (envelope-from from@mailer.igoe.ie) Received: from emx4.mmunic.email (emx4.mmunic.email [84.45.254.137]) (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 3109273778 for ; Thu, 24 May 2018 15:46:36 +0000 (UTC) (envelope-from from@mailer.igoe.ie) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; s=dkim_1024; d=mailer.igoe.ie; h=Date:To:From:Reply-To:Subject:List-Unsubscribe:MIME-Version:Content-Type:Message-ID; i=from@mailer.igoe.ie; bh=Te/jBDBjtUPr1qbnPChaBRAeC3Q=; b=f/Kejajw7Y2r7DqrAXdswfcorVxjoLjFimfn7ekVDQ884jtAIKi0TqGVK4pRd4zJPsd/t507BURU BlwU9/AMc6J/bQ4gQ5HAn2z0vnVGO4Snef7l5X5T315nB2wzrv6SZqXqghaf31EauS+MjjL4YPSe dcDH0tIkw1vA5rFjax4= Received: by emx4.mmunic.email id h0rf5o28o6ko for ; Thu, 24 May 2018 16:16:19 +0100 (envelope-from ) Date: Thu, 24 May 2018 16:14:40 +0100 To: "freebsd-arch@FreeBSD.org" From: Igoe International Reply-To: Igoe International Subject: Opt-In to keep receiving our emails x-track-version: 4 x-track-source: instiller_mmunic x-track-spooler-id: 23326 x-track-spooler-split-id: 26260 x-track-spooler-segment-id: 41010 x-render: pmta-4-003 Feedback-ID: 23326-optin_to_keep_receiving_our_emails:igoe_international_:CAMPAIGN:mmunic x-track-contact-id: 5047091 MIME-Version: 1.0 Message-ID: <0.0.268.105.1D3F3722AE97C0C.0@emx4.mmunic.email> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 15:46:37 -0000 Call us on:=C2=A0 353-1-830-2250 =C2=A0 Visit Our Website(http://clicks.igo= e.ie/email/S-26260@736074@UXO-hmhyVwPmZpFg34QH_CqqgyoNTClQpS-ZtmD8Z2o.@)=0A= =0A=0A=0A=0AThe law on data protection is changing from 25 May 2018.=0A=0AW= e will never bombard you with useless emails. However, we would like to kee= p you informed on relevant new products, applications and construction and = property maintenance projects. So please do not miss this opportunity to re= ceive our future communications. If you want to receive information from us= in the future all you need to do is...=C2=A0=0A=0AClick the link to give y= our consent, please click the link below.=0A=0A=C2=A0 Please Opt Me in to k= eep receiving your emails(http://clicks.igoe.ie/email/S-26260@736075@UXO-hm= hyVwPmZpFg34QH_CqqgyoNTClQpS-ZtmD8Z2o.@)=0A=0A=0AView this email online her= e=C2=A0 | If you no longer wish to receive our newsletter=C2=A0you can unsu= bscribe by=0AClicking Here(http://clicks.igoe.ie/profile/S-26260@UXO-hmhyVw= PmZpFg34QH_CqqgyoNTClQpS-ZtmD8Z2o.@1)| Please add=C2=A0from@mailer.igoe.ie= =C2=A0to your address book.=0A=0A=0A=0A=0A135 Slaney Road, Dublin Industria= l Estate, Glasnevin, Dublin D11 AW6D | Tel: 353-1-3830-2250 From owner-freebsd-arch@freebsd.org Fri May 25 21:28:47 2018 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E98AEF4F72 for ; Fri, 25 May 2018 21:28:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 39A8D7571D for ; Fri, 25 May 2018 21:28:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id EC632EF4F71; Fri, 25 May 2018 21:28:46 +0000 (UTC) Delivered-To: arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA02AEF4F70 for ; Fri, 25 May 2018 21:28:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from smtp.freebsd.org (unknown [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 899A97571C for ; Fri, 25 May 2018 21:28:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 48F031D0E3 for ; Fri, 25 May 2018 21:28:46 +0000 (UTC) (envelope-from jhb@freebsd.org) From: John Baldwin To: arch@freebsd.org Subject: RFC: Create a default wlan for wireless NICs Date: Fri, 25 May 2018 14:28:42 -0700 Message-ID: <6686653.ooTk0CQ0bF@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 21:28:47 -0000 >From the bikeshed department.... The change at https://reviews.freebsd.org/D15481 would create a default wlan for wireless NICs by default. The default wlan's ifnet name would match the name of the adapter (e.g. "iwn0"). Existing configurations would still be honored and people who need multiple wlan devices can still do so using existing configuration variables in rc.conf, etc. However, the out of the box experience on a new machine would be that 'ifconfig iwn0' would Just Work(tm) for wireless NICs as it does now for wired NICs, and you could just use 'ifconfig_iwn0="WPA DHCP"' in rc.conf. I think this is more consistent with how we present NICs to users in general. -- John Baldwin From owner-freebsd-arch@freebsd.org Fri May 25 21:37:12 2018 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46598EF51E5 for ; Fri, 25 May 2018 21:37:12 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id C7A4475B94 for ; Fri, 25 May 2018 21:37:11 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mailman.ysv.freebsd.org (Postfix) id 7D8D9EF51E4; Fri, 25 May 2018 21:37:11 +0000 (UTC) Delivered-To: arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 591BEEF51E3 for ; Fri, 25 May 2018 21:37:11 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x235.google.com (mail-it0-x235.google.com [IPv6:2607:f8b0:4001:c0b::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 E233575B91 for ; Fri, 25 May 2018 21:37:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x235.google.com with SMTP id 70-v6so8533932ity.2 for ; Fri, 25 May 2018 14:37:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nX8+vMv5TZCJy0JjpGuFSlsTnpTovPHsHEuhsatTnm4=; b=uiRIXUalg5M2/A6R+tZRjiQ6ulrnFKNxA7Yb61mw5dsTxa/TDxv8o35CAuLNCF5Pek fVDvm+yrQEgtom2MzfnVgDYbNYN7gl5sqfVLrOhjR3KEZieojB6wYeNEFwZeFH14FI76 7TLVODfQcjzAIh7Ucp3UMIe2E33Plp/q4XMqkb8V1Qp7YdNUkOreAFJ8ESE0eR8fsoy6 a5F3otxjXj1o1yy2XnYuo3BPtgHUO5S/PyW1CEq2O9jFyws7xw++3paIfwLOhRHBFZyx js91US1aMjOmnGM3KAmi6auX/vpJldzxYXn7h8T76AkFXI4zUlv6jL9j6YJv3FmMHcP7 OmGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nX8+vMv5TZCJy0JjpGuFSlsTnpTovPHsHEuhsatTnm4=; b=O2Nv8sAw2w4TNKTk2M4PnGfzOeECnKZnk1/tYN3wua4m/nFzRj2Y+t3ELOaOmxph6F JSYIWa1KYLwKpZ6pPI6OxHAf3O8tsxUmBQVKN2Ho3VT4jznTvpO7nzsJUsU6pZJs3fik DsCbpmtCVdvyolZAeMODCvi64cHNn+k4vISSEgEs+BKpr0I8ArSYXaGNd6pl4aRNjhH2 CboIiTGj6tAPdrQQqY0eR7GMemUZZ5RRwT7sG3Fh/7igdeRkgAkIobqfCIHTvIkgVn9t CHnRpXA5E7AxbpFpTbq7z2c3gOgsxWo5waBEcf6EwbB3nVrQh0HOC2pQU2iOFbMab6+Y Enuw== X-Gm-Message-State: ALKqPwen7zxr8ZwUz9dsVsj2M1PavLX5CQUhY/RLdW9MIVrRE+as+gck mxuzQBu08Zsh3Gt4vq8WDtqboDjsZfPVtqq+/dJeBA== X-Google-Smtp-Source: ADUXVKLphNz6/m0XNQjL3mOlvm6U4x0xVKFFFeDSDv9g9fS+3eDya+2KGYa5mnkK5Kd7JvBpnhXYmXtp7T7PTBtv6mQ= X-Received: by 2002:a24:4c55:: with SMTP id a82-v6mr3562890itb.1.1527284230233; Fri, 25 May 2018 14:37:10 -0700 (PDT) MIME-Version: 1.0 References: <6686653.ooTk0CQ0bF@ralph.baldwin.cx> In-Reply-To: <6686653.ooTk0CQ0bF@ralph.baldwin.cx> From: Warner Losh Date: Fri, 25 May 2018 15:36:59 -0600 Message-ID: Subject: Re: RFC: Create a default wlan for wireless NICs To: John Baldwin Cc: "freebsd-arch@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 21:37:12 -0000 On Fri, May 25, 2018, 3:29 PM John Baldwin wrote: > From the bikeshed department.... > > The change at https://reviews.freebsd.org/D15481 would create a default > wlan for wireless NICs by default. The default wlan's ifnet name would > match the name of the adapter (e.g. "iwn0"). Existing configurations > would still be honored and people who need multiple wlan devices can > still do so using existing configuration variables in rc.conf, etc. > > However, the out of the box experience on a new machine would be that > 'ifconfig iwn0' would Just Work(tm) for wireless NICs as it does now for > wired NICs, and you could just use 'ifconfig_iwn0="WPA DHCP"' in rc.conf. > I think this is more consistent with how we present NICs to users in > Love it. Warner > From owner-freebsd-arch@freebsd.org Fri May 25 21:55:39 2018 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A887EF5A74 for ; Fri, 25 May 2018 21:55:39 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 31AC476EE7 for ; Fri, 25 May 2018 21:55:39 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mailman.ysv.freebsd.org (Postfix) id E5938EF5A72; Fri, 25 May 2018 21:55:38 +0000 (UTC) Delivered-To: arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D170DEF5A71 for ; Fri, 25 May 2018 21:55:38 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yb0-x22a.google.com (mail-yb0-x22a.google.com [IPv6:2607:f8b0:4002:c09::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6CB1776EE4 for ; Fri, 25 May 2018 21:55:38 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yb0-x22a.google.com with SMTP id y3-v6so2313636ybb.2 for ; Fri, 25 May 2018 14:55:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=qm7jcF8Wr/KcE2+w8XmbhLsn+7BWF5JuLnD8pmEzpSw=; b=G+PusFim8EzZSR8UdTeKaovJFiue4lqp41hqshrJWR78gs5n9cDHUfGnEShuy7bz2Y QpbZsX2HLc+nZECm3trjmxDXnqBhPHu2+v+iYZokMSv5bz0xX4t0UDDfwBRaLR1TTHLa aQzOldxS7IPQkt20+ncW7hoTz1sUdnHx+6GCc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=qm7jcF8Wr/KcE2+w8XmbhLsn+7BWF5JuLnD8pmEzpSw=; b=EgJpFDFcZjP2R+rc39Gg1bydz+NKTmBnAjFmzVHlu0M6x2JH/xV6FGwcXWv0qNCi2a 6456b/qiYT3BTbeBmnUUgGdCvhKzJ5DkkNWoNQwfWbe7hfFY97DHSqWjP7aVtujfAanL n07UR/C6kxeRZjE+EPgPKJdunQQA75pPANTr4C7JZxkX9Bmyt89Zf0AQ52xhxZGZYWM+ bf8llKo60NDwJ7ppt0l/8nf7vG/+DBj6L9dGo25Z04pqCHmV8tj3D+a/I865KwDBV8UO c+EFVVG8FZsrwsa938FfrbP8Fed/6FAuiXnR14X+gCXzan9ima/afqUgjd8W3rCliVvB Q74g== X-Gm-Message-State: ALKqPwcXbKgJvbBIOBZ66QBA+26mmIZWEvjceHkX6xy7m8jd6crdHNAT 9B8oRgSVDhzvCyrM18NBUjphyqHIUJ25qZJYumkU1w== X-Google-Smtp-Source: ADUXVKLkAoH28627WwtzUyh4a2lzuCOp1PUiEC4y9IRLZrUuHA5ElQssVL+awlrZ2vRbziDQxdjv9Ce6xZ8S6/4X0+Y= X-Received: by 2002:a25:786:: with SMTP id 128-v6mr2477841ybh.338.1527285337621; Fri, 25 May 2018 14:55:37 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:c709:0:0:0:0:0 with HTTP; Fri, 25 May 2018 14:55:07 -0700 (PDT) In-Reply-To: References: <6686653.ooTk0CQ0bF@ralph.baldwin.cx> From: Eitan Adler Date: Fri, 25 May 2018 14:55:07 -0700 Message-ID: Subject: Re: RFC: Create a default wlan for wireless NICs To: Warner Losh Cc: John Baldwin , "freebsd-arch@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2018 21:55:39 -0000 On 25 May 2018 at 14:36, Warner Losh wrote: > On Fri, May 25, 2018, 3:29 PM John Baldwin wrote: > >> From the bikeshed department.... >> >> The change at https://reviews.freebsd.org/D15481 would create a default >> wlan for wireless NICs by default. The default wlan's ifnet name would >> match the name of the adapter (e.g. "iwn0"). Existing configurations >> would still be honored and people who need multiple wlan devices can >> still do so using existing configuration variables in rc.conf, etc. >> >> However, the out of the box experience on a new machine would be that >> 'ifconfig iwn0' would Just Work(tm) for wireless NICs as it does now for >> wired NICs, and you could just use 'ifconfig_iwn0="WPA DHCP"' in rc.conf. >> I think this is more consistent with how we present NICs to users in >> > > Love it. Yes please! -- Eitan Adler From owner-freebsd-arch@freebsd.org Sat May 26 00:08:28 2018 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B595BEF8030 for ; Sat, 26 May 2018 00:08:28 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 51FA97A339 for ; Sat, 26 May 2018 00:08:28 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: by mailman.ysv.freebsd.org (Postfix) id 07957EF802C; Sat, 26 May 2018 00:08:28 +0000 (UTC) Delivered-To: arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA2B5EF802B for ; Sat, 26 May 2018 00:08:27 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (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 59C3E7A337; Sat, 26 May 2018 00:08:26 +0000 (UTC) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w4Q08NAb048244; Fri, 25 May 2018 17:08:23 -0700 (PDT) (envelope-from freebsd-rwg@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd-rwg@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w4Q08NoU048243; Fri, 25 May 2018 17:08:23 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201805260008.w4Q08NoU048243@pdx.rh.CN85.dnsmgr.net> Subject: Re: RFC: Create a default wlan for wireless NICs In-Reply-To: <6686653.ooTk0CQ0bF@ralph.baldwin.cx> To: John Baldwin Date: Fri, 25 May 2018 17:08:23 -0700 (PDT) CC: arch@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 00:08:28 -0000 > >From the bikeshed department.... > > The change at https://reviews.freebsd.org/D15481 would create a default > wlan for wireless NICs by default. The default wlan's ifnet name would > match the name of the adapter (e.g. "iwn0"). Existing configurations > would still be honored and people who need multiple wlan devices can > still do so using existing configuration variables in rc.conf, etc. > > However, the out of the box experience on a new machine would be that > 'ifconfig iwn0' would Just Work(tm) for wireless NICs as it does now for > wired NICs, and you could just use 'ifconfig_iwn0="WPA DHCP"' in rc.conf. > I think this is more consistent with how we present NICs to users in > general. Yes, Blue Please, with a red stripe. :) I asked about documentation in the review, but about all I can find is: /etc/defaults/rc.conf: #wlans_ath0="wlan0" # wlan(4) interfaces for ath0 device There is probably stuff in the wiki that would need updated though. -- Rod Grimes rgrimes@freebsd.org From owner-freebsd-arch@freebsd.org Sat May 26 07:19:19 2018 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89C95F6B266 for ; Sat, 26 May 2018 07:19:19 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 16EC985B20 for ; Sat, 26 May 2018 07:19:19 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: by mailman.ysv.freebsd.org (Postfix) id CBC9FF6B264; Sat, 26 May 2018 07:19:18 +0000 (UTC) Delivered-To: arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6C10F6B263 for ; Sat, 26 May 2018 07:19:18 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 18C3885B1F for ; Sat, 26 May 2018 07:19:17 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.55.3]) by phk.freebsd.dk (Postfix) with ESMTP id 569F21484E for ; Sat, 26 May 2018 07:19:16 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.15.2/8.15.2) with ESMTPS id w4Q7JE5b004516 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sat, 26 May 2018 07:19:14 GMT (envelope-from phk@critter.freebsd.dk) Received: (from phk@localhost) by critter.freebsd.dk (8.15.2/8.15.2/Submit) id w4Q7JEfq004515; Sat, 26 May 2018 07:19:14 GMT (envelope-from phk) To: arch@freebsd.org Subject: To assert() or not to assert(), that is not really a question... From: Poul-Henning Kamp MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4513.1527319154.1@critter.freebsd.dk> Date: Sat, 26 May 2018 07:19:14 +0000 Message-ID: <4514.1527319154@critter.freebsd.dk> X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 07:19:19 -0000 When I started writing Varnish Cache, on of the first decision was that I would pepper the source code with asserts even "pointless" ones, and I did to the order of 10% of all source file lines, and it is probably the best decision I have ever made. The primary effects of all the asserts is that we get crash-dumps from the earliest possible point in time the trouble could be spotted. For a process which can rutinely have several thousands threads, that is what makes debugging possible in the first place. The secondary effect is that the sheer number of asserts means that crashes can almost always be isolated to a very small stretch of code based on the assert location. The one benefit from all the asserts I had not anticipated is that they almost always prevent program bugs from turning into information leakage vulnerabilities: We stop before we send wrong data out. The biggest impact of all the asserts however, is that Varnish Cache went 11 years while moving a very large fraction of all HTTP traffic on the net, without a major security issue. When we finally got our first big CVE, it was not a remote excution, an information leak or anything horrible bad: It was a "harmless" DoS caused by a wrong assert test, but a DoS is still pretty bad news when so much traffic goes through Varnish. I think FreeBSD needs to learn from Varnish Cache's experience: We should have far more asserts in FreeBSD. We already have a "private" assert facility in the kernel, and people should simply use it more. But in userland our asserts come from , and that is a problem. The main trouble with using assert(3) is that random people illadvisedly set NDEBUG expecting their code to run faster as a result. It does not. Almost all the asserts in Varnish happens on values already in CPU registers and/or cache and I have never been able to credibly measure a performance impact from the asserts in Varnish. Besides, many of the asserts never make it to the CPU, modern compilers have strong analysis which can see that the can never trigger, so they are removed in optimization. We cannot change to get rid of the NDEBUG mistake, and in a more abstract line of thought we probably should not even use for FreeBSD source code - it sort of belongs to the users. I suggest and strongly urge that we add a set of userland assert-macros which are never compiled out, for use *only* in FreeBSD userland source code, and that we sprinkle them liberally, in particular anything setuid etc. In Varnish Cache we have four "kinds" of asserts, which allows us to communicate crucial information in the message to the users. I don't know if a similar subdivision of asserts would make sense for FreeBSD, but I mention it here as inspiration: 1. "Regular asserts" - things which are just plain wrong, which probably means we have a genuine bug somewhere. Examples could be null pointers where previous checks should have ensured this not be so. Also error situations for which there is no saner handling that killing the projcess. 2. "xxx asserts" - situations which should (almost) never happen, and for which we could do more productive error handling, but where the seldomness of the condition makes it a bad idea (ie: untested code) and a bad investment of our developer time to do so. Disk full is a good example for Varnish. 3. "wrong asserts" - Internal state is messed up, program flow has taken a "impossible" branch. A good example is the default branch of a switch on a finite input set. 4. "Incomplete asserts" - Code we have not written yet, extension points not open for business yet, very strange corner-cases belived to be impossible, but not proven to be so yet. Poul-Henning -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-arch@freebsd.org Sat May 26 08:10:00 2018 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4A77F6D2CB for ; Sat, 26 May 2018 08:09:59 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 626A686CEB for ; Sat, 26 May 2018 08:09:59 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 1CC6BF6D2CA; Sat, 26 May 2018 08:09:59 +0000 (UTC) Delivered-To: arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECD5FF6D2C8 for ; Sat, 26 May 2018 08:09:58 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-yw0-x241.google.com (mail-yw0-x241.google.com [IPv6:2607:f8b0:4002:c05::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 8D44086CE9 for ; Sat, 26 May 2018 08:09:58 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-yw0-x241.google.com with SMTP id i201-v6so2445462ywe.6 for ; Sat, 26 May 2018 01:09:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=TJbCd9anqR2I1ENrdlIWToWr5xKmNo7Mp3WHl8+jFHo=; b=cmvaU5/XUj7PatG+IVwfk1YmEPJqw2+Nf4vMW3XaKhMu94rYzvJRweI6+3m0nNMMaW aDglaNiumS8ph4Pt9yLN/Rvz8cO2pwha5Xisn8raGt3bm6uAEK98Kc9MzkhLbOZ3ecDn WB8BZt0mLtK6r2qNIvXgLejGACXa35cRfiGqrN5cAoIRrRDkC6NdENB54yhEc/h8XBCB 65v34N7n/i0vnPIHMvbPxGJsxtSkGblN7IyBfw8N94PGQp1+/jEkv1QAOesWNzuFELKA HVeIfWuJaZffDgxPw62AjT2c/5Voaf7x+GUT91dfHBUjLO9zJ/lqsLK+Mwgtl+L9njNa I8TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=TJbCd9anqR2I1ENrdlIWToWr5xKmNo7Mp3WHl8+jFHo=; b=coSNF/UbGKhNmWUUzmTB2ypCwjPvpaHLQvsuF8Q2VP6iqGTL85WjE2XnMGiF2sbGqq NIcTnck7L73DQI8PhJvIHyesMgl8xRHUOa7Kl0S+2tmXCHw1/U81KAMLcE4p7Ihtd4kr 8RNJ5dyv47/FEWN/D/dYi29dvW5TDFcD/VHpokp3JXVHqKl6N6hsWdVPldygN8//EcbU 1wzvSvJikdjfnSrs5zXmADa4yxWd4sGlRMRxc+msLqu6B0TRGDApLwFjndNWbDk4jtyq u8cStg5comYkDJ3zckeD/plYm08kLASiP64Dk+/R+qMBry/Opt81uUr5UDkT7Kw0IU3d PDXQ== X-Gm-Message-State: ALKqPwfPWkJiFhMK92Q3pvT2n0wkfr8AwefKyleayDOBWh9FJ/mi59ku 5eIk6s2ybYSMB97HGO3hN4ycMH1qXRlHtxbCEdkLRw== X-Google-Smtp-Source: ADUXVKJ65855vsh74AbfsFG7++2Q9kja5lzu6qnTnY4EfEOUvOXdUVzH0Z4d4Dr1C4ymyeuIgRO0xwcirQ1UJA43Ws0= X-Received: by 2002:a0d:ff85:: with SMTP id p127-v6mr3088040ywf.41.1527322197745; Sat, 26 May 2018 01:09:57 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:3894:0:0:0:0:0 with HTTP; Sat, 26 May 2018 01:09:57 -0700 (PDT) In-Reply-To: <4514.1527319154@critter.freebsd.dk> References: <4514.1527319154@critter.freebsd.dk> From: Oliver Pinter Date: Sat, 26 May 2018 10:09:57 +0200 Message-ID: Subject: Re: To assert() or not to assert(), that is not really a question... To: Poul-Henning Kamp Cc: "arch@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 08:10:00 -0000 On Saturday, May 26, 2018, Poul-Henning Kamp wrote: > When I started writing Varnish Cache, on of the first decision was > that I would pepper the source code with asserts even "pointless" > ones, and I did to the order of 10% of all source file lines, and > it is probably the best decision I have ever made. > > The primary effects of all the asserts is that we get crash-dumps > from the earliest possible point in time the trouble could be > spotted. For a process which can rutinely have several thousands > threads, that is what makes debugging possible in the first place. > > The secondary effect is that the sheer number of asserts means > that crashes can almost always be isolated to a very small stretch > of code based on the assert location. > > The one benefit from all the asserts I had not anticipated is that > they almost always prevent program bugs from turning into information > leakage vulnerabilities: We stop before we send wrong data out. > > The biggest impact of all the asserts however, is that Varnish Cache > went 11 years while moving a very large fraction of all HTTP traffic > on the net, without a major security issue. > > When we finally got our first big CVE, it was not a remote excution, > an information leak or anything horrible bad: It was a "harmless" > DoS caused by a wrong assert test, but a DoS is still pretty bad > news when so much traffic goes through Varnish. > > I think FreeBSD needs to learn from Varnish Cache's experience: > We should have far more asserts in FreeBSD. > > We already have a "private" assert facility in the kernel, and > people should simply use it more. This private assert facility exists in the kernel, but used only in a limited scope. It's only used in -CURRENT. It would be a really big step forward, if we were enable them for -STABLE branches too, because these beaches changes significantly too without enabled KASSERT. > > But in userland our asserts come from , and that is a > problem. > > The main trouble with using assert(3) is that random people > illadvisedly set NDEBUG expecting their code to run faster as a > result. > > It does not. > > Almost all the asserts in Varnish happens on values already in CPU > registers and/or cache and I have never been able to credibly measure > a performance impact from the asserts in Varnish. > > Besides, many of the asserts never make it to the CPU, modern > compilers have strong analysis which can see that the can never > trigger, so they are removed in optimization. > > We cannot change to get rid of the NDEBUG mistake, and > in a more abstract line of thought we probably should not even use > for FreeBSD source code - it sort of belongs to the users. > > I suggest and strongly urge that we add a set of userland assert-macros > which are never compiled out, for use *only* in FreeBSD userland > source code, and that we sprinkle them liberally, in particular > anything setuid etc. > > In Varnish Cache we have four "kinds" of asserts, which allows us > to communicate crucial information in the message to the users. I > don't know if a similar subdivision of asserts would make sense for > FreeBSD, but I mention it here as inspiration: > > 1. "Regular asserts" - things which are just plain wrong, which > probably means we have a genuine bug somewhere. Examples could > be null pointers where previous checks should have ensured this > not be so. Also error situations for which there is no saner > handling that killing the projcess. > > 2. "xxx asserts" - situations which should (almost) never happen, > and for which we could do more productive error handling, but > where the seldomness of the condition makes it a bad idea (ie: > untested code) and a bad investment of our developer time to do > so. Disk full is a good example for Varnish. > > 3. "wrong asserts" - Internal state is messed up, program flow > has taken a "impossible" branch. A good example is the > default branch of a switch on a finite input set. > > 4. "Incomplete asserts" - Code we have not written yet, extension > points not open for business yet, very strange corner-cases > belived to be impossible, but not proven to be so yet. > > Poul-Henning > > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence. > _______________________________________________ > freebsd-arch@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" > From owner-freebsd-arch@freebsd.org Sat May 26 12:50:15 2018 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 606E0F74E55 for ; Sat, 26 May 2018 12:50:15 +0000 (UTC) (envelope-from mark@grondar.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id E34D86EA35 for ; Sat, 26 May 2018 12:50:14 +0000 (UTC) (envelope-from mark@grondar.org) Received: by mailman.ysv.freebsd.org (Postfix) id A104AF74E54; Sat, 26 May 2018 12:50:14 +0000 (UTC) Delivered-To: arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F456F74E53 for ; Sat, 26 May 2018 12:50:14 +0000 (UTC) (envelope-from mark@grondar.org) Received: from gromit.grondar.org (grandfather.grondar.org [IPv6:2a01:348:0:15:5d59:5c20:0:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E13C6EA34 for ; Sat, 26 May 2018 12:50:14 +0000 (UTC) (envelope-from mark@grondar.org) Received: from graveyard.grondar.org ([88.96.155.33] helo=gronkulator.grondar.org) by gromit.grondar.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91 (FreeBSD)) (envelope-from ) id 1fMYeC-000GNI-0z; Sat, 26 May 2018 13:50:12 +0100 Content-Type: multipart/signed; boundary="Apple-Mail=_7486C140-E5A2-43E3-9782-C406DA279BEE"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Subject: Re: To assert() or not to assert(), that is not really a question... From: Mark R V Murray In-Reply-To: <4514.1527319154@critter.freebsd.dk> Date: Sat, 26 May 2018 13:50:10 +0100 Cc: arch@freebsd.org Message-Id: <2144EF77-0A5C-4917-84A1-C86404D1BAB3@grondar.org> References: <4514.1527319154@critter.freebsd.dk> To: Poul-Henning Kamp X-Mailer: Apple Mail (2.3445.6.18) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 12:50:15 -0000 --Apple-Mail=_7486C140-E5A2-43E3-9782-C406DA279BEE Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On 26 May 2018, at 08:19, Poul-Henning Kamp wrote: > > When I started writing Varnish Cache, on of the first decision was > that I would pepper the source code with asserts even "pointless" > ones, and I did to the order of 10% of all source file lines, and > it is probably the best decision I have ever made. +1 from day-job experience! M -- Mark R V Murray --Apple-Mail=_7486C140-E5A2-43E3-9782-C406DA279BEE Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 Comment: GPGTools - http://gpgtools.org iQEzBAEBCgAdFiEEyzPHvybPbOpU9MCxQlsJDh9CUqAFAlsJWAIACgkQQlsJDh9C UqBZ7gf/aAcmwBwpb4HShPDIB9KJiavhstybyQvZIk3+D4yTDL7fs1kDZcgsUWfk pY99yi9LwcqLBYg2k8M679Yy00zxGutDwbGhlQEeVP2JshawHkruys/qGKUcUY5d Y/x3VSKCx8UXKXqsEQ3nvo6g4FrfOcK3Az2iJ5wSz3bftOBRbSMXnsIqC77cT9Sz ysB4U/6+KRYPPBpz3jFVBxTHv6p7cQFTWCLIT+17sR5Sa3wKH0nwjKBSqNhJb+im Mlc0z9L3s2oO3jpzIXrPLezkLzF8jIYYPeb5qtFwhayn/Pw9pkmxIShjMV+0xot9 4K0ryw6z1Jr443jzXII7U/LMX/6uYQ== =PNqd -----END PGP SIGNATURE----- --Apple-Mail=_7486C140-E5A2-43E3-9782-C406DA279BEE-- From owner-freebsd-arch@freebsd.org Sat May 26 17:21:07 2018 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3716EEF01C for ; Sat, 26 May 2018 17:21:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 91ED078252 for ; Sat, 26 May 2018 17:21:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: by mailman.ysv.freebsd.org (Postfix) id 53C88EEF01B; Sat, 26 May 2018 17:21:06 +0000 (UTC) Delivered-To: arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FEA0EEF01A for ; Sat, 26 May 2018 17:21:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D43DC7814F for ; Sat, 26 May 2018 17:21:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (unknown [IPv6:2601:648:8880:1e30:c025:1597:8351:5324]) by mail.baldwin.cx (Postfix) with ESMTPSA id 8EC4F10AFCD; Sat, 26 May 2018 13:21:04 -0400 (EDT) Subject: Re: RFC: Create a default wlan for wireless NICs To: "Rodney W. Grimes" References: <201805260008.w4Q08NoU048243@pdx.rh.CN85.dnsmgr.net> Cc: arch@freebsd.org From: John Baldwin Message-ID: <7c016932-1b9e-e277-1c8a-6385511fbae3@FreeBSD.org> Date: Sat, 26 May 2018 10:21:03 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <201805260008.w4Q08NoU048243@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Sat, 26 May 2018 13:21:04 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 17:21:07 -0000 On 5/25/18 5:08 PM, Rodney W. Grimes wrote: >> >From the bikeshed department.... >> >> The change at https://reviews.freebsd.org/D15481 would create a default >> wlan for wireless NICs by default. The default wlan's ifnet name would >> match the name of the adapter (e.g. "iwn0"). Existing configurations >> would still be honored and people who need multiple wlan devices can >> still do so using existing configuration variables in rc.conf, etc. >> >> However, the out of the box experience on a new machine would be that >> 'ifconfig iwn0' would Just Work(tm) for wireless NICs as it does now for >> wired NICs, and you could just use 'ifconfig_iwn0="WPA DHCP"' in rc.conf. >> I think this is more consistent with how we present NICs to users in >> general. > > Yes, Blue Please, with a red stripe. :) > > I asked about documentation in the review, but about all I can > find is: > /etc/defaults/rc.conf: > #wlans_ath0="wlan0" # wlan(4) interfaces for ath0 device > > There is probably stuff in the wiki that would need updated though. I think there are also installer bits that could be simplified. Right now the installer has to use a special sysctl to identify wireless NICs so it can add them to the list of NICs, etc. It also then creates wlan_foo variables in rc.conf. That would need to be updated for this change as well. -- John Baldwin