From owner-freebsd-fs@freebsd.org Wed Sep 16 16:30:36 2015 Return-Path: Delivered-To: freebsd-fs@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 4C5969C28D9 for ; Wed, 16 Sep 2015 16:30:36 +0000 (UTC) (envelope-from toasty@dragondata.com) 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 1CC7F1CB7 for ; Wed, 16 Sep 2015 16:30:35 +0000 (UTC) (envelope-from toasty@dragondata.com) Received: by ioiz6 with SMTP id z6so234894219ioi.2 for ; Wed, 16 Sep 2015 09:30:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dragondata.com; s=google; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; bh=5IFYWb3IHMDZsk6zJzWLtjcK+UvR6XsnWTRBsfJPjKU=; b=pF11sW/qBq8enoA9Su+Vo9z5tqkp3pOy/jYP7WQJu3p1ITNl7sNZZQd/bzEkpnJGLA C+Ek50ZmobHYkDdGbJezBbFMy6Kys0JqSREubqLuXNW2dy2ixPBUpaP/JfVKcb+1X4B4 /wzrAmfxzMyzDjyXpvYnwITucr1YdjvKnKxt0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-type:content-transfer-encoding :subject:message-id:date:to:mime-version; bh=5IFYWb3IHMDZsk6zJzWLtjcK+UvR6XsnWTRBsfJPjKU=; b=QsFst08ebUefOVrZRUPZASXf+h0NgU2KUjkFtIjEsjytt7wRpLXiPRwOgk6uJHWT4K 4EXJqCBGbNbF1Wov1+QEhrnILxf9bzDFoWnykoa5aPRN4pOoovflFKsnTW5hwy5EMJYE 95aJO8JJT8LXSFY4Z+SMymAwzU/F71HeHKqFIi23Clc2SWJiBY9KrsI8dLqfSyImacB8 SIQCBVdJiaXl+Jl/vKV2kxle46YBxqjBYTj5/MYdYVc8gc+H41VUN4/Yytclbqq1Lpfk 5V9Ea9EbXFVbL8l6JLBNIjmPzSxWgSI3xYTvmeL6IcEGIVALCUTdxNto4HlRYIKgd4nV x1tw== X-Gm-Message-State: ALoCoQnXC0VNi8WrElkhqN3mqem9Row/Q/1OaqqV57CrVQ0NyWhfaaU15h1eoh1Anc7L2pafM7ij X-Received: by 10.107.137.75 with SMTP id l72mr1556152iod.121.1442421035202; Wed, 16 Sep 2015 09:30:35 -0700 (PDT) Received: from unassigned.v6.your.org ([2001:4978:1:45:7029:bae0:76fe:ae62]) by smtp.gmail.com with ESMTPSA id a4sm2220968igh.16.2015.09.16.09.30.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 16 Sep 2015 09:30:34 -0700 (PDT) From: Kevin Day Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Neutered devices in jails (per FS flag?) Message-Id: Date: Wed, 16 Sep 2015 11:30:33 -0500 To: freebsd-fs@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 9.0 \(3094\)) X-Mailer: Apple Mail (2.3094) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Sep 2015 16:30:36 -0000 We=E2=80=99re currently using jails to allow servers to copy backups of = themselves to a central backup server. The problem we=E2=80=99re having = is with mknod/devices. Currently jails don=E2=80=99t allow device files = to be created, which makes sense - you don=E2=80=99t want them to be = able to bypass the jail by opening /dev/kmem or something. We want jails = to be able to create device files, just not be able to open/use them. Has anyone given any thought to changing this behavior? Allowing jails = to create/manipulate device files, but not actually opening them? I.e. = instead of returning EPERM on creating the device, instead return EPERM = on opening it? This would likely need to be a filesystem flag, because = jails still require some devices to work (a separate devfs mount or = something). We could make the jail=E2=80=99s /dev read only or use devfs = so those devices still work, but have the parent jail directory with a = =E2=80=9Cnoopendev=E2=80=9D flag or something similar. Has anyone gone down this path before? =E2=80=94 Kevin