lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ikvv634c.fsf@intel.com>
Date: Tue, 20 Aug 2024 10:54:27 +0300
From: Jani Nikula <jani.nikula@...ux.intel.com>
To: Yu Jiaoliang <yujiaoliang@...o.com>, Joonas Lahtinen
 <joonas.lahtinen@...ux.intel.com>, Rodrigo Vivi <rodrigo.vivi@...el.com>,
 Tvrtko Ursulin <tursulin@...ulin.net>, David Airlie <airlied@...il.com>,
 Daniel Vetter <daniel@...ll.ch>, Matt Roper <matthew.d.roper@...el.com>,
 Andi Shyti <andi.shyti@...ux.intel.com>, Michal Mrozek
 <michal.mrozek@...el.com>, Gustavo Sousa <gustavo.sousa@...el.com>, Lucas
 De Marchi <lucas.demarchi@...el.com>, Tejas Upadhyay
 <tejas.upadhyay@...el.com>, Shekhar Chauhan <shekhar.chauhan@...el.com>,
 intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
 linux-kernel@...r.kernel.org
Cc: opensource.kernel@...o.com, Yu Jiaoliang <yujiaoliang@...o.com>
Subject: Re: [PATCH v1] drivers:gt:Switch to use kmemdup_array()

On Tue, 20 Aug 2024, Yu Jiaoliang <yujiaoliang@...o.com> wrote:
> Let the kememdup_array() take care about multiplication and possible
> overflows.
> Signed-off-by: Yu Jiaoliang <yujiaoliang@...o.com>

For future reference, please look at git log for the file instead of
inventing subject prefixes.

There should be a blank line between commit message and trailers.

Other than that,

Reviewed-by: Jani Nikula <jani.nikula@...el.com>


> ---
>  drivers/gpu/drm/i915/gt/intel_workarounds.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> index 09a287c1aedd..d90348c56765 100644
> --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
> +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> @@ -111,8 +111,8 @@ static void wa_init_finish(struct i915_wa_list *wal)
>  {
>  	/* Trim unused entries. */
>  	if (!IS_ALIGNED(wal->count, WA_LIST_CHUNK)) {
> -		struct i915_wa *list = kmemdup(wal->list,
> -					       wal->count * sizeof(*list),
> +		struct i915_wa *list = kmemdup_array(wal->list,
> +					       wal->count, sizeof(*list),
>  					       GFP_KERNEL);
>  
>  		if (list) {

-- 
Jani Nikula, Intel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ