From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Zijun Hu <zijun_hu@icloud.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Rob Herring (Arm)" <robh@kernel.org>,
Len Brown <lenb@kernel.org>, Daniel Scally <djrscally@gmail.com>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
Zijun Hu <quic_zijuhu@quicinc.com>
Subject: Re: [PATCH RFC v2] of: property: Fix potential firmware node reference's argument count got out of range
Date: Tue, 14 Jan 2025 19:01:26 +0200 [thread overview]
Message-ID: <Z4aYZtR3WcbpCRui@smile.fi.intel.com> (raw)
In-Reply-To: <20250114-fix_arg_count-v2-1-efa35ee6572b@quicinc.com>
On Tue, Jan 14, 2025 at 11:51:13PM +0800, Zijun Hu wrote:
> From: Zijun Hu <quic_zijuhu@quicinc.com>
>
> Currently, the following two macros have different values:
>
> // The maximal argument count for firmware node reference
> #define NR_FWNODE_REFERENCE_ARGS 8
> // The maximal argument count for OF node reference
> #define MAX_PHANDLE_ARGS 16
>
> But of_fwnode_get_reference_args() directly assigns OF node
> reference argument count @of_args.args_count to frimware
firmware
> @args->nargs, and may cause firmware node reference argument
> count @of_args.args_count got out of range, namely, in [9, 16].
>
> Fix by increasing NR_FWNODE_REFERENCE_ARGS to 16 to meet OF requirement.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2025-01-14 17:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-14 15:51 [PATCH RFC v2] of: property: Fix potential firmware node reference's argument count got out of range Zijun Hu
2025-01-14 17:01 ` Andy Shevchenko [this message]
2025-01-15 13:43 ` Zijun Hu
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=Z4aYZtR3WcbpCRui@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=djrscally@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_zijuhu@quicinc.com \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=zijun_hu@icloud.com \
/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