On Wed, Mar 08, 2023 at 12:34:49AM +0100, Rodrigo Campos wrote: > On 3/7/23 17:50, Christian Brauner wrote: > > On Tue, Mar 07, 2023 at 12:45:02PM +0100, Rodrigo Campos wrote: > > > Future patches will call these tests within a userns. So, let's skip > > > operations not allowed inside a userns. > > > > > > Signed-off-by: Rodrigo Campos <rodrigo@xxxxxxxxxxx> > > > --- > > > > On newer kernels you can always do: > > > > mknodat(open_tree_fd, CHRDEV1, S_IFCHR | 0644, makedev(0, 0))) > > > > but you'd still need the t_inside_userns then anyway so sure, > > Actually, no, changing the makedev to that does the trick and it works > inside a userns (at least in kernels where tmpfs supports idmap mounts). Oh right, good point. We only need to care about kernels with idmapped mount support for tmpfs. Excellent.