Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3743083ybl; Mon, 12 Aug 2019 05:45:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqxwtci6mx8uv9fGuZ0aem5YiFHiIg2L00lcU7s9FfQtYL7jOLI02W7EwCGYf8scA0Ahz57J X-Received: by 2002:a17:902:566:: with SMTP id 93mr24915964plf.172.1565613944651; Mon, 12 Aug 2019 05:45:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565613944; cv=none; d=google.com; s=arc-20160816; b=JvoEBaUQ6ttwgsc8aM3Ntt81lcMSI8ZRnZYvEgviyDdudboHEU8uHZ4IORmlinAt+n P83NjIChZ/utf4jkOgKj/Desh0tJ52HdYShfvQvRvck8pLyt2ZmdsTc7nbGYR+7vGfxn NiRSwRZQ38ekzJ3HrM7ayRHSbrsejP5O62WqIKy9DjFxMUSrzg0XjWa74dSpSon3J7ZA 2V1DUF+h8omZDKljksc+b1K33eeOnPRCDeJo+jPhd38DmVQU2C0CDZrqcSwEQrgoU2ZK CU0XKyaPTpqHVu8Lvn1AYcT1hxpiShpNLCi8GxmWrT8Z5r7BX5HaRg7PqgP7Jo02iCek fLlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=CzrTbiHopzrJu+YLYHoIsujt53sT7XN4YE3jA26/XGg=; b=C8dFvRht2JzgSfXxkphHwlpKmqgku5Dzzf3QdqA7JNIWV+4ShQfYJxfYns1/ESj+Gh l3MLLfhg4S0g6sluiAt3gLSbQexb7PrRZ4mTQcdvDER7UB/IpwQ374jAd8crlP+nOiYV B8Y7IJp6PZQY2B2heSa8cMf4N3gwqR0ZuvK/Reqhr7kdEGfA4S9hWZhERqCIvFbzRI/k GAJbHABFcPdBO8Ixys22MkBiOAANEAwBnip/8uKKf99oXBvxUDylUFDYO+rHj9360Q5D POI+zMTbJuxCAysMlGetXqe9LXWGmYwzZ2gARe2oSq6fjCPgQKnarGuGV/EDpA4OUG9C F6/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="CZL/I2MF"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p2si4709502pff.169.2019.08.12.05.45.28; Mon, 12 Aug 2019 05:45:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="CZL/I2MF"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727525AbfHLMol (ORCPT + 99 others); Mon, 12 Aug 2019 08:44:41 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:40913 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726673AbfHLMok (ORCPT ); Mon, 12 Aug 2019 08:44:40 -0400 Received: by mail-lj1-f195.google.com with SMTP id e27so3002580ljb.7 for ; Mon, 12 Aug 2019 05:44:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CzrTbiHopzrJu+YLYHoIsujt53sT7XN4YE3jA26/XGg=; b=CZL/I2MFhnHG7WsGfil0Lhj0/vUbG22b1Ey4JJ+4mOZyN1TTt0k7l4o5BUszI4UGSt 1n6tFYW9r96cIcKCqEuEC/X0AeIYX4H3btbse/XxA6HbmKV6iGxNC4/567RVUaDZR3nC HaBGbThoAuqSmKQ7S0HRYvg4C1CynhZlxF5TTej5/B6iJps7QKNTM4USoP9kAw899Z8y njUfwG3frFnuvYBLJG70NZ9gAM/sazFT3OtdhJd6YwKSg4tw6mibwBU/2nf6qJlB+PYs nEdfm2RkSbLQDJX7Q+RXVjY0XgH2jzOz2zIp+b1IMwxFfO6/cYmvcAAZd1PeK0vVqpsO voQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CzrTbiHopzrJu+YLYHoIsujt53sT7XN4YE3jA26/XGg=; b=D+0gQJMlHRUijCVotO4387HTxactd660g8m/p3UugMTpDpScgDb00Y0phWwBSUsdT6 sGGIU9x/XOz/sY69147nRJiGRqer7c4DPfuXfkPypjp1vjOHRk/GqchQyYeXkKDSVu8D LyR2/dmUNC/nB3NZYGn1OWMMFQi/mCeldUJeZpJFsM2LX0kKemccNTXFy+5fHbMJzW2q CQbdcGTlEbCwmoTDe2feYTCSplWC4QDnT+HaoPDgxLfNSzfQwzuJm+6JgwoLgNhSVid+ Q39QBF+5PgeDXcNJLGWo9KNU2PEueoEgskTY/xlxPBvJVN7KaMxTS2xPi2DY8GOPAUUD iGbA== X-Gm-Message-State: APjAAAVYtsQWA7PPhVcSPw6ChbTTz0k/NOcOcH5STkFiZA/wMftdisV7 gGOQ8k+kG0Oz8YRiRVY4qvQZBA== X-Received: by 2002:a2e:1459:: with SMTP id 25mr18650455lju.153.1565613878719; Mon, 12 Aug 2019 05:44:38 -0700 (PDT) Received: from localhost.localdomain (168-200-94-178.pool.ukrtel.net. [178.94.200.168]) by smtp.gmail.com with ESMTPSA id y25sm23432747lja.45.2019.08.12.05.44.37 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 12 Aug 2019 05:44:38 -0700 (PDT) From: Ivan Khoronzhuk To: bjorn.topel@intel.com, linux-mm@kvack.org Cc: xdp-newbies@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, ast@kernel.org, magnus.karlsson@intel.com, Ivan Khoronzhuk Subject: [PATCH v2 bpf-next] mm: mmap: increase sockets maximum memory size pgoff for 32bits Date: Mon, 12 Aug 2019 15:43:26 +0300 Message-Id: <20190812124326.32146-1-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190812113429.2488-1-ivan.khoronzhuk@linaro.org> References: <20190812113429.2488-1-ivan.khoronzhuk@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The AF_XDP sockets umem mapping interface uses XDP_UMEM_PGOFF_FILL_RING and XDP_UMEM_PGOFF_COMPLETION_RING offsets. The offsets seems like are established already and are part of configuration interface. But for 32-bit systems, while AF_XDP socket configuration, the values are to large to pass maximum allowed file size verification. The offsets can be tuned ofc, but instead of changing existent interface - extend max allowed file size for sockets. Signed-off-by: Ivan Khoronzhuk --- Based on bpf-next/master v2..v1: removed not necessarily #ifdev as ULL and UL for 64 has same size mm/mmap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mm/mmap.c b/mm/mmap.c index 7e8c3e8ae75f..578f52812361 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -1358,6 +1358,9 @@ static inline u64 file_mmap_size_max(struct file *file, struct inode *inode) 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; -- 2.17.1