* Re: [PATCH v25 0/7] firmware: imx: driver for NXP secure-enclave [not found] ` <6543cf20-01e3-4dc2-b4b0-08935527f440@kontron.de> @ 2026-04-21 7:52 ` Frieder Schrempf 2026-04-21 8:57 ` Frank Li 0 siblings, 1 reply; 4+ messages in thread From: Frieder Schrempf @ 2026-04-21 7:52 UTC (permalink / raw) To: Pankaj Gupta, Jonathan Corbet, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Frank Li On 24.02.26 12:18, Frieder Schrempf wrote: > On 29.01.26 17:58, Pankaj Gupta wrote: >> Hi Shawn, >> >> This is a gentle follow‑up regarding the patch-set. >> >> In v25, I addressed all automated feedback from kernel CI (warning fixes and checkpatch‑strict resolution), with no further changes requested by reviewers. >> Patch 5/7 has also received a Reviewed-by tag from Frank Li (NXP). >> >> I have not seen additional feedback. >> I would appreciate any update on the review/merge status, or guidance on further changes needed to move the series forward. >> >> Thanks for your time and continued support. > > How close are we to getting this patchset merged? Work on this has been > ongoing for almost three years now and it would be really helpful to > have this in the kernel. > > Thanks! Gentle ping! Can someone please provide information on what needs to be done to get this merged? Thanks! ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v25 0/7] firmware: imx: driver for NXP secure-enclave 2026-04-21 7:52 ` [PATCH v25 0/7] firmware: imx: driver for NXP secure-enclave Frieder Schrempf @ 2026-04-21 8:57 ` Frank Li 0 siblings, 0 replies; 4+ messages in thread From: Frank Li @ 2026-04-21 8:57 UTC (permalink / raw) To: Frieder Schrempf Cc: Pankaj Gupta, Jonathan Corbet, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org On Tue, Apr 21, 2026 at 09:52:13AM +0200, Frieder Schrempf wrote: > On 24.02.26 12:18, Frieder Schrempf wrote: > > On 29.01.26 17:58, Pankaj Gupta wrote: > >> Hi Shawn, > >> > >> This is a gentle follow‑up regarding the patch-set. > >> > >> In v25, I addressed all automated feedback from kernel CI (warning fixes and checkpatch‑strict resolution), with no further changes requested by reviewers. > >> Patch 5/7 has also received a Reviewed-by tag from Frank Li (NXP). > >> > >> I have not seen additional feedback. > >> I would appreciate any update on the review/merge status, or guidance on further changes needed to move the series forward. > >> > >> Thanks for your time and continued support. > > > > How close are we to getting this patchset merged? Work on this has been > > ongoing for almost three years now and it would be really helpful to > > have this in the kernel. > > > > Thanks! > > Gentle ping! Can someone please provide information on what needs to be > done to get this merged? Thank you test this. I just took over imx ownship from shawn. I need get famillar with work flow and get dts part merge smoothly. I will try to send this as independent pull request at earily of v7.1 Frank > > Thanks! ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: (subset) [PATCH v25 0/7] firmware: imx: driver for NXP secure-enclave [not found] <20260122-imx-se-if-v25-0-5c3e3e3b69a8@nxp.com> [not found] ` <AM9PR04MB86047EA92BB21C6D522FC007959EA@AM9PR04MB8604.eurprd04.prod.outlook.com> @ 2026-05-05 15:53 ` Frank Li [not found] ` <20260122-imx-se-if-v25-5-5c3e3e3b69a8@nxp.com> 2 siblings, 0 replies; 4+ messages in thread From: Frank Li @ 2026-05-05 15:53 UTC (permalink / raw) To: Jonathan Corbet, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, Pankaj Gupta Cc: linux-doc, linux-kernel, devicetree, imx, linux-arm-kernel On Thu, 22 Jan 2026 17:19:12 +0530, Pankaj Gupta wrote: > The NXP's i.MX EdgeLock Enclave, a HW IP creating an embedded secure > enclave within the SoC boundary to enable features like > - HSM > - SHE > - V2X > > Communicates via message unit with linux kernel. This driver is > enables communication ensuring well defined message sequence protocol > between Application Core and enclave's firmware. > > [...] Applied, thanks! [1/7] Documentation/firmware: add imx/se to other_interfaces commit: 3b4531c6e0f4c8874f0266853a410438eda1fc24 [2/7] dt-bindings: arm: fsl: add imx-se-fw binding doc commit: 4d7bcf0869686d7d7fbf16244453b987e5ca6d14 [3/7] firmware: imx: add driver for NXP EdgeLock Enclave commit: 338529a73c2bf2c277013b745cfe6f19b84b70af [4/7] firmware: imx: device context dedicated to priv commit: 2d733ed67f608ee85abb854157011f88d7f280a8 [5/7] firmware: drivers: imx: adds miscdev commit: 4de71839142b5f43846e3593f4eb236e1d733885 Best regards, -- Frank Li <Frank.Li@nxp.com> ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <20260122-imx-se-if-v25-5-5c3e3e3b69a8@nxp.com>]
* Re: [PATCH v25 5/7] firmware: drivers: imx: adds miscdev [not found] ` <20260122-imx-se-if-v25-5-5c3e3e3b69a8@nxp.com> @ 2026-05-06 21:18 ` Arnd Bergmann 0 siblings, 0 replies; 4+ messages in thread From: Arnd Bergmann @ 2026-05-06 21:18 UTC (permalink / raw) To: Pankaj Gupta, Jonathan Corbet, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam Cc: linux-doc, linux-kernel, devicetree, imx, linux-arm-kernel, Frank Li On Thu, Jan 22, 2026, at 12:49, Pankaj Gupta wrote: > +/* IOCTL definitions. */ > + > +struct se_ioctl_setup_iobuf { > + void __user *user_buf; > + __u32 length; > + __u32 flags; > + __u64 ele_addr; > +}; > + > +struct se_ioctl_cmd_snd_rcv_rsp_info { > + __u32 __user *tx_buf; > + int tx_buf_sz; > + __u32 __user *rx_buf; > + int rx_buf_sz; These just showed up in linux-next and triggered warnings in my (still private) uapi checks: ./usr/include/linux/se_ioctl.h:22:15: error: padding struct to align 'ele_addr' [-Werror=padded] 22 | __u64 ele_addr; | ^~~~~~~~ ./usr/include/linux/se_ioctl.h:45:16: error: padding struct to align 'rx_buf' [-Werror=padded] 45 | __u32 *rx_buf; | ^~~~~~ ./usr/include/linux/se_ioctl.h:47:1: error: padding struct size to alignment boundary with 4 bytes [-Werror=padded] 47 | }; The problem here is the use of indirect pointers, which are nor recommended in ABI structures because of the implied padding and the need for compat mode handlers, see Documentation/driver-api/ioctl.rst. I think the fixup below should address all of this, but I have not reviewed the driver in detail to see if thats's all. I also noticed that the __user annotations are inconsistent, so please also run this through 'make C=1' and fix up the warnings you get. Arnd diff --git a/drivers/firmware/imx/se_ctrl.c b/drivers/firmware/imx/se_ctrl.c index 2ba0a6988a39..d0e3d981d1e0 100644 --- a/drivers/firmware/imx/se_ctrl.c +++ b/drivers/firmware/imx/se_ctrl.c @@ -384,7 +384,7 @@ static int add_b_desc_to_pending_list(void *shared_ptr_with_pos, return -ENOMEM; b_desc->shared_buf_ptr = shared_ptr_with_pos; - b_desc->usr_buf_ptr = io->user_buf; + b_desc->usr_buf_ptr = u64_to_user_ptr(io->user_buf); b_desc->size = io->length; if (io->flags & SE_IO_BUF_FLAGS_IS_INPUT) { @@ -526,13 +526,13 @@ static int se_ioctl_cmd_snd_rcv_rsp_handler(struct se_if_device_ctx *dev_ctx, } if (cmd_snd_rcv_rsp_info.tx_buf_sz < SE_MU_HDR_SZ) { - dev_err(priv->dev, "%s: User buffer too small(%d < %d)", + dev_err(priv->dev, "%s: User buffer too small(%lld < %d)", dev_ctx->devname, cmd_snd_rcv_rsp_info.tx_buf_sz, SE_MU_HDR_SZ); se_ioctl_cmd_snd_rcv_cleanup(dev_ctx, uarg, &cmd_snd_rcv_rsp_info); return -ENOSPC; } - err = se_chk_tx_msg_hdr(priv, (struct se_msg_hdr *)cmd_snd_rcv_rsp_info.tx_buf); + err = se_chk_tx_msg_hdr(priv, u64_to_user_ptr(cmd_snd_rcv_rsp_info.tx_buf)); if (err) { se_ioctl_cmd_snd_rcv_cleanup(dev_ctx, uarg, &cmd_snd_rcv_rsp_info); return err; @@ -546,7 +546,7 @@ static int se_ioctl_cmd_snd_rcv_rsp_handler(struct se_if_device_ctx *dev_ctx, } struct se_api_msg *tx_msg __free(kfree) = - memdup_user(cmd_snd_rcv_rsp_info.tx_buf, + memdup_user(u64_to_user_ptr(cmd_snd_rcv_rsp_info.tx_buf), cmd_snd_rcv_rsp_info.tx_buf_sz); if (IS_ERR(tx_msg)) { err = PTR_ERR(tx_msg); @@ -593,8 +593,8 @@ static int se_ioctl_cmd_snd_rcv_rsp_handler(struct se_if_device_ctx *dev_ctx, print_hex_dump_debug("to user ", DUMP_PREFIX_OFFSET, 4, 4, rx_msg, cmd_snd_rcv_rsp_info.rx_buf_sz, false); - if (copy_to_user(cmd_snd_rcv_rsp_info.rx_buf, rx_msg, - cmd_snd_rcv_rsp_info.rx_buf_sz)) { + if (copy_to_user(u64_to_user_ptr(cmd_snd_rcv_rsp_info.rx_buf), + rx_msg, cmd_snd_rcv_rsp_info.rx_buf_sz)) { dev_err(priv->dev, "%s: Failed to copy to user.", dev_ctx->devname); err = -EFAULT; } @@ -655,7 +655,7 @@ static int se_ioctl_setup_iobuf_handler(struct se_if_device_ctx *dev_ctx, return -EFAULT; } - dev_dbg(dev_ctx->priv->dev, "%s: io [buf: %p(%d) flag: %x].", dev_ctx->devname, + dev_dbg(dev_ctx->priv->dev, "%s: io [buf: %llx(%d) flag: %x].", dev_ctx->devname, io.user_buf, io.length, io.flags); if (io.length == 0 || !io.user_buf) { @@ -696,7 +696,8 @@ static int se_ioctl_setup_iobuf_handler(struct se_if_device_ctx *dev_ctx, * buffer is input: * copy data from user space to this allocated buffer. */ - if (copy_from_user(shared_mem->ptr + pos, io.user_buf, io.length)) { + if (copy_from_user(shared_mem->ptr + pos, + u64_to_user_ptr(io.user_buf), io.length)) { dev_err(dev_ctx->priv->dev, "%s: Failed copy data to shared memory.", dev_ctx->devname); diff --git a/include/uapi/linux/se_ioctl.h b/include/uapi/linux/se_ioctl.h index 0c948bdc8c26..9fb81cb72b94 100644 --- a/include/uapi/linux/se_ioctl.h +++ b/include/uapi/linux/se_ioctl.h @@ -16,7 +16,7 @@ /* IOCTL definitions. */ struct se_ioctl_setup_iobuf { - void __user *user_buf; + __u64 user_buf; __u32 length; __u32 flags; __u64 ele_addr; @@ -40,10 +40,10 @@ struct se_ioctl_get_if_info { }; struct se_ioctl_cmd_snd_rcv_rsp_info { - __u32 __user *tx_buf; - int tx_buf_sz; - __u32 __user *rx_buf; - int rx_buf_sz; + __u64 tx_buf; + __u64 tx_buf_sz; + __u64 rx_buf; + __u64 rx_buf_sz; }; struct se_ioctl_get_soc_info { ^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-05-06 21:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260122-imx-se-if-v25-0-5c3e3e3b69a8@nxp.com>
[not found] ` <AM9PR04MB86047EA92BB21C6D522FC007959EA@AM9PR04MB8604.eurprd04.prod.outlook.com>
[not found] ` <6543cf20-01e3-4dc2-b4b0-08935527f440@kontron.de>
2026-04-21 7:52 ` [PATCH v25 0/7] firmware: imx: driver for NXP secure-enclave Frieder Schrempf
2026-04-21 8:57 ` Frank Li
2026-05-05 15:53 ` (subset) " Frank Li
[not found] ` <20260122-imx-se-if-v25-5-5c3e3e3b69a8@nxp.com>
2026-05-06 21:18 ` [PATCH v25 5/7] firmware: drivers: imx: adds miscdev Arnd Bergmann
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox