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: <CAH5fLgh=r7QSOHu=P=QY_4Xk6FXZR0G3eG63qqrq8cgHzFQxfw@mail.gmail.com>
Date: Fri, 10 Jan 2025 10:12:13 +0100
From: Alice Ryhl <aliceryhl@...gle.com>
To: "Isaac J. Manjarres" <isaacmanjarres@...gle.com>
Cc: lorenzo.stoakes@...cle.com, Andrew Morton <akpm@...ux-foundation.org>, 
	kaleshsingh@...gle.com, jstultz@...gle.com, surenb@...gle.com, 
	kernel-team@...roid.com, linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/2] mm/memfd: Refactor and cleanup the logic in memfd_create()

On Thu, Jan 9, 2025 at 7:59 PM Isaac J. Manjarres
<isaacmanjarres@...gle.com> wrote:
>
> memfd_create() is a pretty busy function that could be easier to read
> if some of the logic was split out into helper functions.
>
> Therefore, split the flags sanitization, name allocation, and file
> structure allocation into their own helper functions.
>
> No functional change.
>
> Signed-off-by: Isaac J. Manjarres <isaacmanjarres@...gle.com>

This looks reasonable to me. One nit below, but:

Reviewed-by: Alice Ryhl <aliceryhl@...gle.com>

>         fd_install(fd, file);
> +       /* name is not needed beyond this point. */
>         kfree(name);
>         return fd;

This comment seems superfluous at this point, since kfree(name) is the
last statement of the function.

Alice

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ