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
| ||
|
Message-ID: <bfcae61d-e34e-e04d-62f5-a5359df8fcf1@oracle.com> Date: Tue, 10 Apr 2018 10:55:04 -0600 From: Khalid Aziz <khalid.aziz@...cle.com> To: Mike Kravetz <mike.kravetz@...cle.com>, linux-mm@...ck.org, linux-kernel@...r.kernel.org Cc: Matthew Wilcox <willy@...radead.org>, Hugh Dickins <hughd@...gle.com>, Andrea Arcangeli <aarcange@...hat.com>, Michal Hocko <mhocko@...nel.org>, Marc-André Lureau <marcandre.lureau@...il.com>, David Herrmann <dh.herrmann@...il.com>, Andrew Morton <akpm@...ux-foundation.org> Subject: Re: [PATCH v3 3/3] mm: restructure memfd code On 04/09/2018 05:05 PM, Mike Kravetz wrote: > With the addition of memfd hugetlbfs support, we now have the situation > where memfd depends on TMPFS -or- HUGETLBFS. Previously, memfd was only > supported on tmpfs, so it made sense that the code resided in shmem.c. > In the current code, memfd is only functional if TMPFS is defined. If > HUGETLFS is defined and TMPFS is not defined, then memfd functionality > will not be available for hugetlbfs. This does not cause BUGs, just a > lack of potentially desired functionality. > > Code is restructured in the following way: > - include/linux/memfd.h is a new file containing memfd specific > definitions previously contained in shmem_fs.h. > - mm/memfd.c is a new file containing memfd specific code previously > contained in shmem.c. > - memfd specific code is removed from shmem_fs.h and shmem.c. > - A new config option MEMFD_CREATE is added that is defined if TMPFS > or HUGETLBFS is defined. > > No functional changes are made to the code: restructuring only. > > Signed-off-by: Mike Kravetz <mike.kravetz@...cle.com> > --- > fs/Kconfig | 3 + > fs/fcntl.c | 2 +- > include/linux/memfd.h | 16 +++ > include/linux/shmem_fs.h | 13 -- > mm/Makefile | 1 + > mm/memfd.c | 344 +++++++++++++++++++++++++++++++++++++++++++++++ > mm/shmem.c | 323 -------------------------------------------- > 7 files changed, 365 insertions(+), 337 deletions(-) > create mode 100644 include/linux/memfd.h > create mode 100644 mm/memfd.c > Reviewed-by: Khalid Aziz <khalid.aziz@...cle.com>
Powered by blists - more mailing lists