* [PATCH] fwctl: pds: report device information length
@ 2026-10-28 12:55 Avi Weiss
2026-10-28 15:05 ` Dave Jiang
0 siblings, 1 reply; 2+ messages in thread
From: Avi Weiss @ 2026-10-28 12:55 UTC (permalink / raw)
To: Brett Creeley, Jason Gunthorpe
Cc: Dave Jiang, Saeed Mahameed, Zhi Wang, Jonathan Cameron,
linux-kernel, Avi Weiss
pdsfc_info() allocates and populates struct fwctl_info_pds but leaves
the output length unset. Consequently, fwctl_cmd_info() copies no
PDS-specific data and reports a zero device_data_len even when userspace
provides an output buffer.
Set *length to sizeof(*info) before returning the structure.
Fixes: 4d09dd11d7d0 ("pds_fwctl: initial driver framework")
Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
---
drivers/fwctl/pds/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/fwctl/pds/main.c b/drivers/fwctl/pds/main.c
index 68fe254dd10ad..01abc7e83975f 100644
--- a/drivers/fwctl/pds/main.c
+++ b/drivers/fwctl/pds/main.c
@@ -63,6 +63,7 @@ static void *pdsfc_info(struct fwctl_uctx *uctx, size_t *length)
return ERR_PTR(-ENOMEM);
info->uctx_caps = pdsfc_uctx->uctx_caps;
+ *length = sizeof(*info);
return info;
}
base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] fwctl: pds: report device information length
2026-10-28 12:55 [PATCH] fwctl: pds: report device information length Avi Weiss
@ 2026-10-28 15:05 ` Dave Jiang
0 siblings, 0 replies; 2+ messages in thread
From: Dave Jiang @ 2026-10-28 15:05 UTC (permalink / raw)
To: Avi Weiss, Brett Creeley, Jason Gunthorpe
Cc: Saeed Mahameed, Zhi Wang, Jonathan Cameron, linux-kernel
On 10/28/26 5:55 AM, Avi Weiss wrote:
> pdsfc_info() allocates and populates struct fwctl_info_pds but leaves
> the output length unset. Consequently, fwctl_cmd_info() copies no
> PDS-specific data and reports a zero device_data_len even when userspace
> provides an output buffer.
>
> Set *length to sizeof(*info) before returning the structure.
>
> Fixes: 4d09dd11d7d0 ("pds_fwctl: initial driver framework")
> Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
Looks pretty straight forward fix
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> ---
> drivers/fwctl/pds/main.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/fwctl/pds/main.c b/drivers/fwctl/pds/main.c
> index 68fe254dd10ad..01abc7e83975f 100644
> --- a/drivers/fwctl/pds/main.c
> +++ b/drivers/fwctl/pds/main.c
> @@ -63,6 +63,7 @@ static void *pdsfc_info(struct fwctl_uctx *uctx, size_t *length)
> return ERR_PTR(-ENOMEM);
>
> info->uctx_caps = pdsfc_uctx->uctx_caps;
> + *length = sizeof(*info);
>
> return info;
> }
>
> base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-28 15:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-28 12:55 [PATCH] fwctl: pds: report device information length Avi Weiss
2026-10-28 15:05 ` Dave Jiang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®