RE: [PATCH v11 03/11] firmware: xilinx: Add zynqmp IOCTL API for device control

From: Jolly Shah
Date: Mon Sep 10 2018 - 15:17:59 EST


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:olof@xxxxxxxxx]
> Sent: Saturday, September 08, 2018 6:19 PM
> To: Jolly Shah <JOLLYS@xxxxxxxxxx>
> Cc: ard.biesheuvel@xxxxxxxxxx; Ingo Molnar <mingo@xxxxxxxxxx>; Greg Kroah-
> Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>; matt@xxxxxxxxxxxxxxxxxxx; Sudeep
> Holla <sudeep.holla@xxxxxxx>; hkallweit1@xxxxxxxxx; Kees Cook
> <keescook@xxxxxxxxxxxx>; Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>;
> Michael Turquette <mturquette@xxxxxxxxxxxx>; Stephen Boyd
> <sboyd@xxxxxxxxxxxxxx>; Michal Simek <michals@xxxxxxxxxx>; Rob Herring
> <robh+dt@xxxxxxxxxx>; Mark Rutland <mark.rutland@xxxxxxx>; linux-clk
> <linux-clk@xxxxxxxxxxxxxxx>; Rajan Vaja <RAJANV@xxxxxxxxxx>; Linux ARM
> Mailing List <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>; Linux Kernel Mailing List
> <linux-kernel@xxxxxxxxxxxxxxx>; DTML <devicetree@xxxxxxxxxxxxxxx>; Jolly
> Shah <JOLLYS@xxxxxxxxxx>
> 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 <jolly.shah@xxxxxxxxxx> wrote:
> > From: Rajan Vaja <rajanv@xxxxxxxxxx>
> >
> > Add ZynqMP firmware IOCTL API to control and configure devices like
> > PLLs, SD, Gem, etc.
> >
> > Signed-off-by: Rajan Vaja <rajanv@xxxxxxxxxx>
> > Signed-off-by: Jolly Shah <jollys@xxxxxxxxxx>
>
> 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