Hi All,

Adding more clarification on top of what Michal said:
Here ioctl is not a system ioctl and just a eemi API like other interface APIs. 
It cannot be called from userspace. Only Linux drivers can use this API for 
defined ioctl operations. This API is meant for any platform specific 
operations which needs to be managed by firmware. Firmware will always validate 
the request for action being performed.
Debugfs interface is just for debugging during development. We can remove 
debugfs support for ioctl API if you suggest.

Thanks,
Jolly Shah


> -----Original Message-----
> From: Olof Johansson [mailto:[email protected]]
> Sent: Saturday, September 08, 2018 6:19 PM
> To: Jolly Shah <[email protected]>
> Cc: [email protected]; Ingo Molnar <[email protected]>; Greg Kroah-
> Hartman <[email protected]>; [email protected]; Sudeep
> Holla <[email protected]>; [email protected]; Kees Cook
> <[email protected]>; Dmitry Torokhov <[email protected]>;
> Michael Turquette <[email protected]>; Stephen Boyd
> <[email protected]>; Michal Simek <[email protected]>; Rob Herring
> <[email protected]>; Mark Rutland <[email protected]>; linux-clk
> <[email protected]>; Rajan Vaja <[email protected]>; Linux ARM
> Mailing List <[email protected]>; Linux Kernel Mailing List
> <[email protected]>; DTML <[email protected]>; Jolly
> Shah <[email protected]>
> Subject: Re: [PATCH v11 03/11] firmware: xilinx: Add zynqmp IOCTL API for
> device control
> 
> Hi,
> 
> On Fri, Aug 3, 2018 at 10:53 AM, Jolly Shah <[email protected]> wrote:
> > From: Rajan Vaja <[email protected]>
> >
> > Add ZynqMP firmware IOCTL API to control and configure devices like
> > PLLs, SD, Gem, etc.
> >
> > Signed-off-by: Rajan Vaja <[email protected]>
> > Signed-off-by: Jolly Shah <[email protected]>
> 
> This patch worries me somewhat. It's a transparent pass-through ioctl driver. 
> Is
> there a spec available for what the implemented IOCTLs are?
> 
> Should some of them be proper drivers instead of an opaque pass-through like
> this? Could some of them have stability impact on the platform such that there
> are security concerns and the list of arguments should somehow be sanitized?
> 
> What's the intended usecase anyway? Just a debug tool during development, or
> something that you expect heavy use of by some userspace middleware?
> 
> 
> -Olof

Reply via email to