From owner-freebsd-bugs@FreeBSD.ORG Thu Jan 8 22:41:53 2015 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 505E7D9D for ; Thu, 8 Jan 2015 22:41:53 +0000 (UTC) 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 mx1.freebsd.org (Postfix) with ESMTPS id 1F0803CE for ; Thu, 8 Jan 2015 22:41:53 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id t08MfrNu061261 for ; Thu, 8 Jan 2015 22:41:53 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 196474] jls causes kernel panic Date: Thu, 08 Jan 2015 22:41:51 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: jamie@FreeBSD.org X-Bugzilla-Status: In Progress X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: jamie@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to bug_status attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2015 22:41:53 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196474 Jamie Gritton changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|freebsd-bugs@FreeBSD.org |jamie@FreeBSD.org Status|New |In Progress --- Comment #10 from Jamie Gritton --- Created attachment 151509 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=151509&action=edit Don't set pr_ip4s to -1 I'm with Bjoern in that I see the problem on the jail_set end, and not the jail_get end. But I wouldn't want to make the command fail. It seems a reasonable analog to (the correct) "ip4=disable", and in fact ends up treating it the same way in every respect except the jail_get panic. It's never proper for pr_ip4 to have a negative value. It used to be, before the PR_IP4_DISABLE flag, and I would test for it in the proper places. But I was incorrect to keep that vestige when I added the flag. I must have considered it proper at the time since I took pains to keep it, but a years-later code review concludes differently. My patch merely gets rid of the -1 that doesn't belong. After that, the only difference between an ip4-disabled jail and one that is set to no addresses is the PR_IP4_DISABLED flag. Both have no addresses, and will not admit to supporting IPV4. In fact, PR_IP4_DISABLED, which is only ever referenced in kern_jail.c, becomes write-only and useless. I plan to issue a second patch which removes it entirely. But that isn't quite part of this bug. -- You are receiving this mail because: You are the assignee for the bug.