Re: [PATCH 06/11] vfs: Prepare tests in &s_idmapped_mounts to be reused inside a userns

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



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.



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux