+ mm-mmap-increase-sockets-maximum-memory-size-pgoff-for-32bits.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm: mmap: increase sockets maximum memory size pgoff for 32bits
has been added to the -mm tree.  Its filename is
     mm-mmap-increase-sockets-maximum-memory-size-pgoff-for-32bits.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-mmap-increase-sockets-maximum-memory-size-pgoff-for-32bits.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-mmap-increase-sockets-maximum-memory-size-pgoff-for-32bits.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Ivan Khoronzhuk <ivan.khoronzhuk@xxxxxxxxxx>
Subject: mm: mmap: increase sockets maximum memory size pgoff for 32bits

The AF_XDP sockets umem mapping interface uses XDP_UMEM_PGOFF_FILL_RING
and XDP_UMEM_PGOFF_COMPLETION_RING offsets.  These offsets are established
already and are part of the configuration interface.

But for 32-bit systems, using AF_XDP socket configuration, these values
are too large to pass the maximum allowed file size verification.  The
offsets can be tuned off, but instead of changing the existing interface,
let's extend the max allowed file size for sockets.

Link: http://lkml.kernel.org/r/20190812124326.32146-1-ivan.khoronzhuk@xxxxxxxxxx
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@xxxxxxxxxx>
Cc: Björn Töpel <bjorn.topel@xxxxxxxxx>
Cc: Alexei Starovoitov <ast@xxxxxxxxxx>
Cc: Magnus Karlsson <magnus.karlsson@xxxxxxxxx>
Cc: Daniel Borkmann <daniel@xxxxxxxxxxxxx>
Cc: David Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/mmap.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/mm/mmap.c~mm-mmap-increase-sockets-maximum-memory-size-pgoff-for-32bits
+++ a/mm/mmap.c
@@ -1358,6 +1358,9 @@ static inline u64 file_mmap_size_max(str
 	if (S_ISBLK(inode->i_mode))
 		return MAX_LFS_FILESIZE;
 
+	if (S_ISSOCK(inode->i_mode))
+		return MAX_LFS_FILESIZE;
+
 	/* Special "we do even unsigned file positions" case */
 	if (file->f_mode & FMODE_UNSIGNED_OFFSET)
 		return 0;
_

Patches currently in -mm which might be from ivan.khoronzhuk@xxxxxxxxxx are

mm-mmap-increase-sockets-maximum-memory-size-pgoff-for-32bits.patch





[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux