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: <CAHp75VdBh0k_XU3GG99EvgLOztOFWn87QXknpokcDy=29yu=Aw@mail.gmail.com>
Date: Wed, 11 Oct 2023 18:36:11 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Kartik <kkartik@...dia.com>
Cc: thierry.reding@...il.com, jonathanh@...dia.com, keescook@...omium.org, 
	andy@...nel.org, akpm@...ux-foundation.org, arnd@...db.de, 
	petlozup@...dia.com, pshete@...dia.com, ulf.hansson@...aro.org, 
	frank.li@...o.com, robh@...nel.org, stefank@...dia.com, 
	pdeschrijver@...dia.com, linux-tegra@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org, 
	linux-mm@...ck.org
Subject: Re: [PATCH v4 1/8] mm/util: Introduce kmemdup_array() to duplicate an array

On Wed, Oct 11, 2023 at 2:17 PM Kartik <kkartik@...dia.com> wrote:
>
> Introduce function kmemdup_array(), that will copy `n` number of
> elements from a given array `src` to `dst`.
>
> On success, kmemdup_array() returns 0 and copy the elements from `src`
> to newly allocated array `dst`, it also stores number of elements
> copied from `src` array to `dst_count` parameter. On failure, this
> returns a negative integer value containing the error value.

Hmm... Why is it so complicated?

Can it be as simple as

  return kmemdup(size_mul());

?

--
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ