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] [day] [month] [year] [list]
Message-ID: <ZsSdEHxsmkb2B2WS@ashyti-mobl2.lan>
Date: Tue, 20 Aug 2024 15:41:36 +0200
From: Andi Shyti <andi.shyti@...ux.intel.com>
To: Lucas De Marchi <lucas.demarchi@...el.com>
Cc: Yu Jiaoliang <yujiaoliang@...o.com>,
	Jani Nikula <jani.nikula@...ux.intel.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>,
	Tejas Upadhyay <tejas.upadhyay@...el.com>,
	Gustavo Sousa <gustavo.sousa@...el.com>,
	Shekhar Chauhan <shekhar.chauhan@...el.com>,
	intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
	linux-kernel@...r.kernel.org, opensource.kernel@...o.com,
	Jani Nikula <jani.nikula@...el.com>
Subject: Re: [PATCH v2] drm/i915/gt: Use kmemdup_array instead of kmemdup for
 multiple allocation

Hi Lucas,

On Tue, Aug 20, 2024 at 07:53:10AM -0500, Lucas De Marchi wrote:
> On Tue, Aug 20, 2024 at 05:53:02PM GMT, Yu Jiaoliang wrote:
> > Let the kememdup_array() take care about multiplication and possible
> > overflows.
> > 
> > v2:
> > - Change subject
> > - Leave one blank line between the commit log and the tag section
> > - Fix code alignment issue
> > 
> > Signed-off-by: Yu Jiaoliang <yujiaoliang@...o.com>
> > Reviewed-by: Jani Nikula <jani.nikula@...el.com>
> > Reviewed-by: Andi Shyti <andi.shyti@...ux.intel.com>
> > ---
> > drivers/gpu/drm/i915/gt/intel_workarounds.c | 5 ++---
> > 1 file changed, 2 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> > index d90348c56765..0fcfd55c62b4 100644
> > --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
> > +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> > @@ -111,9 +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_array(wal->list,
> 
> 					^
> 
> it was already kmemdup_array, not kmemdup. Am I missing anything?

I see kmemdup() in drm-tip.

What Yu has done here is to change kmemdup to kmemdup_array and
send the patch. Received the reviews and made a new commit on top
of the previous one; then he sent only this second commit.

Yu needs to make sure that:

 1. the patch applies correctly on a clean drm-tip
 2. drm-tip + patch compiles
 3. there are no checkpatch and sparse new errors

We missed point 1 here :-)

Andi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ