Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3753831ybl; Mon, 12 Aug 2019 05:57:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqw3kaBUgJTmTi88Re8nLYi4yfoUiwrHquyXytzWgyyAtbqmeCp7/4Q4D8Bcq9+xfJ43HI7S X-Received: by 2002:a65:6552:: with SMTP id a18mr30832755pgw.208.1565614674121; Mon, 12 Aug 2019 05:57:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565614674; cv=none; d=google.com; s=arc-20160816; b=VpUxeoTTUjGsugNJK92alnDS9ja+DltQHMN79dWctvvuJZnDsMcEAvmy9WoLdFkFlW 1vDYRiZaEkVg6KLg1A+OaDPAL6TRA9dCrAsfi85b7/iXuIkFN4oJrSHNLmRTyVF4emCA 0xJUrbYawL6Sfr+wpFHpGVz9tGSv6RVcp0iZ6NGxIvtr3g1Lln/drdQF9kU9LKbotQma SJMtjutwE3mZzCs8EEKOVmoeO1n4UAdDrVZDWBk6GnQmrj3+FPVffzj28oQz9h7mVONF XK0ytWAG3ALI3oC5Izim14YCytacFMu+4CAQx+ebsHLgul0UNpvWXSwfdpQUzIe9XmaX 7Y5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=RZrf7NZzH+vdCw2gLf7+ZBuLnZEsuhfH6dxY4YOOuwE=; b=hkKB5TPzmjKHBM+iLswjeFMXVWwuvpvFEU7yWBr4IH7RyjkEAkrlOmtNI6a8+AS1UA Im9QriF5FSJzZbbvFQUGaPB4x/oB9S9Trkv2FcKB05NaKithThqqX+pnFG+m/lq3hp1z AgsjIh6dq7MQot4XigmwTy4D7U7uVF4aBUsjFcBm4HF4GUVJ+2v7qhw1g4MZH/S6yGW2 ByXHvEqTd5MSg/YI0dhAJiIP1mDyhbymAE3k1ZqpT9d8/jOjFM5zvPSzGX8i8F2e0L34 a3ba5HghO0btOgTJh8TpfawFv4FgXDT4ztdlpYk42Wcc9JPcatFPoj0e4TN4LzTFVXoV t5Bw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d13si3382378plr.239.2019.08.12.05.57.38; Mon, 12 Aug 2019 05:57:54 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728680AbfHLM5J (ORCPT + 99 others); Mon, 12 Aug 2019 08:57:09 -0400 Received: from www62.your-server.de ([213.133.104.62]:40366 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726219AbfHLM5I (ORCPT ); Mon, 12 Aug 2019 08:57:08 -0400 Received: from sslproxy06.your-server.de ([78.46.172.3]) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1hx9sj-0006FN-BN; Mon, 12 Aug 2019 14:57:01 +0200 Received: from [178.193.45.231] (helo=pc-63.home) by sslproxy06.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1hx9sj-000XKt-1f; Mon, 12 Aug 2019 14:57:01 +0200 Subject: Re: [PATCH v2 bpf-next] mm: mmap: increase sockets maximum memory size pgoff for 32bits To: Ivan Khoronzhuk , 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 References: <20190812113429.2488-1-ivan.khoronzhuk@linaro.org> <20190812124326.32146-1-ivan.khoronzhuk@linaro.org> From: Daniel Borkmann Message-ID: <389f9d64-cfcd-6cc3-bf72-83c35d3e9512@iogearbox.net> Date: Mon, 12 Aug 2019 14:57:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190812124326.32146-1-ivan.khoronzhuk@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.100.3/25539/Mon Aug 12 10:15:24 2019) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/12/19 2:43 PM, Ivan Khoronzhuk wrote: > 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 This is mainly for Andrew to pick rather than bpf-next, but I presume it would apply cleanly to his tree as well. > 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; >