Re: [PATCH v4 03/14] net: ionic: Export the APIs from net driver to support device commands

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

 




On 8/2/25 01:51, Jakub Kicinski wrote:
On Fri, 1 Aug 2025 14:00:14 -0300 Jason Gunthorpe wrote:
Perhaps I misunderstand things, or otherwise am on the wrong track here.
But this seems to open the possibility of users of ionic_adminq_post_wait(),
outside the Ethernet driver, executing a wide range or admin commands.
It seems to me that it would be nice to narrow that surface.
The kernel is monolithic, it is not normal to spend performance
aggressively policing APIs.

mlx5 and other drivers already have interfaces almost exactly like this.
Which is not to say that it's a good idea.

Thank you for the feedback, and apologies for the delay. This discussion prompted a thorough internal review. Although a precedent for similar interfaces exists in other RDMA drivers, the point is well-taken and we understand the concern about a wide API. To address this, two potential approaches are being considered, 1. The function can be documented as a privileged, clarifying that it performs no input sanitization and making the caller responsible for device access. 2. Alternatively, a new, narrower function could be introduced specifically for RDMA use that validates commands against an explicit allow list.

We are open to either approach and would appreciate a guidance on the preferred direction.

Abhijit






[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