From: sashiko-bot@kernel.org
To: "Antoine Bouyer" <antoine.bouyer@nxp.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org,
Frank.Li@kernel.org, imx@lists.linux.dev
Subject: Re: [PATCH v3 4/8] media: uapi: Add NXP NEOISP user interface header file
Date: Fri, 12 Jun 2026 13:34:04 +0000 [thread overview]
Message-ID: <20260612133405.0A2341F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260612132039.2089051-5-antoine.bouyer@nxp.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] UAPI Compilation Failure due to undefined struct `v4l2_isp_block_header`
- [Medium] Implicit compiler padding (holes) in UAPI structures
--
commit 07ff92ed00f28aef4b4e762772b07f402cd3490d
Author: Antoine Bouyer <antoine.bouyer@nxp.com>
media: uapi: Add NXP NEOISP user interface header file
Add user space api header file for meta data structures definitions.
This header describes parameters buffer for the ISP blocks control by
userspace, and statistics buffer for userspace and IPA handling.
> diff --git a/include/uapi/linux/media/nxp/nxp_neoisp.h b/include/uapi/linux/media/nxp/nxp_neoisp.h
> new file mode 100644
> index 0000000000000..2dafa19df3242
> --- /dev/null
> +++ b/include/uapi/linux/media/nxp/nxp_neoisp.h
[ ... ]
> +struct neoisp_obwb_cfg_s {
> + __u8 ctrl_obpp;
> + __u16 r_ctrl_gain;
> + __u16 r_ctrl_offset;
[Severity: Medium]
Is there an implicit 1-byte compiler padding hole after ctrl_obpp to align
the __u16 r_ctrl_gain field?
UAPI guidelines generally require explicit reserved fields to fill all
holes. This guarantees a stable ABI and prevents uninitialized kernel memory
from potentially leaking to userspace.
[ ... ]
> +struct neoisp_ir_compress_cfg_s {
> + __u8 ctrl_obpp;
> + __u32 knee_point1_kneepoint;
[Severity: Medium]
Does this introduce a 3-byte implicit padding hole after ctrl_obpp to align
the __u32 knee_point1_kneepoint field?
[ ... ]
> +struct neoisp_bnr_cfg_s {
> + __u8 ctrl_debug;
> + __u8 ctrl_obpp;
> + __u8 ctrl_nhood;
> + __u8 ypeak_peak_outsel;
> + __u8 ypeak_peak_sel;
> + __u16 ypeak_peak_low;
[Severity: Medium]
Are there implicit padding holes in this structure, such as a 1-byte hole
after ypeak_peak_sel?
[ ... ]
> +struct neoisp_rgb2yuv_cfg_s {
> + __u16 gain_ctrl_rgain;
> + __u16 gain_ctrl_bgain;
> + __s16 mat_rxcy[NEO_RGB2YUV_MATRIX_SIZE][NEO_RGB2YUV_MATRIX_SIZE];
> + __s32 csc_offsets[NEO_RGB2YUV_MATRIX_SIZE];
> +};
[Severity: Medium]
Is there a 2-byte implicit padding hole after the 18-byte mat_rxcy array to
align the __s32 csc_offsets field?
[ ... ]
> +struct neoisp_ee_cfg_s {
> + __u8 ctrl_debug;
> + __u8 maskgain_gain;
> + __u32 coring_coring;
[Severity: Medium]
Does this leave a 2-byte implicit padding hole after maskgain_gain?
[ ... ]
> +struct neoisp_pipe_conf_cfg_es {
> + struct v4l2_isp_block_header header;
> + struct neoisp_pipe_conf_cfg_s cfg;
> +} __attribute__((aligned(8)));
[Severity: High]
Will embedding struct v4l2_isp_block_header by value cause an incomplete
type compilation error?
The struct v4l2_isp_block_header does not appear to be defined anywhere,
as the generic V4L2 ISP framework defines v4l2_isp_params_block_header
instead. This seems to break compilation for both the driver and any
userspace program including this header.
[ ... ]
> +struct neoisp_ctemp_reg_stats_es {
> + struct v4l2_isp_block_header header;
> + struct neoisp_ctemp_reg_stats_s stat;
> +} __attribute__((aligned(8)));
[Severity: Medium]
Does forcing 8-byte alignment here add 4 bytes of implicit trailing padding
to this statistics wrapper structure?
Adding explicit padding fields might be needed to prevent uninitialized
kernel memory from leaking to userspace via the statistics buffer.
[ ... ]
> +struct neoisp_nr_reg_stats_es {
> + struct v4l2_isp_block_header header;
> + struct neoisp_nr_reg_stats_s stat;
> +} __attribute__((aligned(8)));
[Severity: Medium]
Does this also contain 4 bytes of implicit trailing padding due to the
explicit 8-byte alignment requirement?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260612132039.2089051-1-antoine.bouyer@nxp.com?part=4
next prev parent reply other threads:[~2026-06-12 13:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-12 13:20 [PATCH v3 0/8] media: Add iMX95 neoisp driver Antoine Bouyer
2026-06-12 13:20 ` [PATCH v3 1/8] dt-bindings: media: Add nxp neoisp support Antoine Bouyer
2026-06-12 15:39 ` Frank Li
2026-06-12 13:20 ` [PATCH v3 2/8] media: v4l2-ctrls: Add user control base for NXP neoisp controls Antoine Bouyer
2026-06-12 16:52 ` Frank Li
2026-06-12 13:20 ` [PATCH v3 3/8] media: Add meta formats supported by NXP neoisp driver Antoine Bouyer
2026-06-12 16:55 ` Frank Li
2026-06-12 13:20 ` [PATCH v3 4/8] media: uapi: Add NXP NEOISP user interface header file Antoine Bouyer
2026-06-12 13:34 ` sashiko-bot [this message]
2026-06-12 18:31 ` Frank Li
2026-06-12 13:20 ` [PATCH v3 5/8] media: Documentation: Add NXP neoisp driver documentation Antoine Bouyer
2026-06-12 13:20 ` [PATCH v3 6/8] media: platform: Add NXP Neoisp Image Signal Processor Antoine Bouyer
2026-06-12 13:41 ` sashiko-bot
2026-06-12 19:25 ` Frank Li
2026-06-12 13:20 ` [PATCH v3 7/8] media: platform: neoisp: Add debugfs support Antoine Bouyer
2026-06-12 13:34 ` sashiko-bot
2026-06-12 16:49 ` Frank Li
2026-06-12 13:20 ` [PATCH v3 8/8] arm64: dts: freescale: imx95: Add NXP neoisp device tree node Antoine Bouyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260612133405.0A2341F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=antoine.bouyer@nxp.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=imx@lists.linux.dev \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox