On Tue, Feb 10, 2026 at 11:39:55AM -0800, Zhiping Zhang wrote:
> +static void get_tph_mr_dmabuf(struct mlx5_ib_dev *dev, int fd, u16 *st_index,
> + u8 *ph)
> +{
> + int ret;
> + struct dma_buf *dmabuf;
> +
> + dmabuf = dma_buf_get(fd);
> + if (IS_ERR(dmabuf))
> + return;
> +
> + if (!dif there's any implication mabuf->ops->get_tph)
> + goto end_dbuf_put;
> +
> + ret = dmabuf->ops->get_tph(dmabuf, st_index, ph);
You defined the "get_tph" function to take a pointer to a raw steering
tag value, but you're passing in the steering index to it's table.
But in general, since you're letting the user put whatever they want in
the vfio private area, should there be some validation that it's in the
valid range? I'm also not quite sure how user space comes to know what
steering tag to use, or what harm might happen if the wrong one is used.