Re: [PATCH bpf-next v10 2/4] bpf: new helper to obtain namespace data from current task New bpf helper bpf_get_current_pidns_info.

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

 



On Fri, Sep 06, 2019 at 04:46:47PM +0100, Al Viro wrote:

> > Where do I begin?
> > 	* getname_kernel() is there for purpose
> > 	* so's kern_path(), damnit
> 
> Oh, and filename_lookup() *CAN* sleep, obviously.  So that
> GFP_ATOMIC above is completely pointless.
> 
> > > +
> > > +	inode = d_backing_inode(kp.dentry);
> > > +	pidns_info->dev = (u32)inode->i_rdev;

In the original variant of patchset it used to be ->i_sb->s_dev,
which is also bloody strange - you are not asking filename_lookup()
to follow symlinks, so you'd get that of whatever filesystem
/proc/self/ns resides on.

->i_rdev use makes no sense whatsoever - it's a symlink and
neither it nor its target are device nodes; ->i_rdev will be
left zero for both.

What data are you really trying to get there?



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux