RE: [PATCH rdma-next v2 7/7] RDMA/nldev: Provide detailed QP information

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

 




> -----Original Message-----
> From: linux-rdma-owner@xxxxxxxxxxxxxxx [mailto:linux-rdma-
> owner@xxxxxxxxxxxxxxx] On Behalf Of Jason Gunthorpe
> Sent: Tuesday, January 09, 2018 2:09 PM
> To: Leon Romanovsky <leon@xxxxxxxxxx>
> Cc: Doug Ledford <dledford@xxxxxxxxxx>; RDMA mailing list <linux-
> rdma@xxxxxxxxxxxxxxx>; Mark Bloch <markb@xxxxxxxxxxxx>; Leon
> Romanovsky <leonro@xxxxxxxxxxxx>
> Subject: Re: [PATCH rdma-next v2 7/7] RDMA/nldev: Provide detailed QP
> information
> 
> On Tue, Jan 02, 2018 at 10:18:32AM +0200, Leon Romanovsky wrote:
> 
> > +	/* PID == 0 means that this QP was created by kernel */
> > +	if (qp->res.pid && nla_put_u32(msg,
> > +				       RDMA_NLDEV_ATTR_RES_PID, qp-
> >res.pid))
> 
> This is returning a pid in the init name space, obtained here:
> 
> +		res->pid = task_pid_nr(current);
> 
> And since the netlink user is not running in the init name space this will return the
> wrong pid #, and worse potentially pids the current name space should not see.
> 
> This API also needs to filter the results and only return pids visible, and translate
> the pids as well..
> 
Same fix needed for rdma_accept() and rdma_create_id() in near future.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux