Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp768749ybl; Tue, 13 Aug 2019 02:14:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqwMFCYQgpkzaew/IKD6SpDorjJVCcshBv3+I6kGxRcxn48vOQaUAz1EcJoZ0qPowB6/sU6s X-Received: by 2002:aa7:91cc:: with SMTP id z12mr39903016pfa.76.1565687691078; Tue, 13 Aug 2019 02:14:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565687691; cv=none; d=google.com; s=arc-20160816; b=QnhiOS6yQgxWvM0+X/tXLmCjhqdiofp7MOvvEQqFZHDi+EZ7Lb4T03B+ny7olAzM4b lQsbkO1DNny638ZMl5AF+6CJe3xrnPQwJL5fe+p6OHc4baAo7EDlyQGwF409VdUBCxWD WGwIjpoPTe0aUot/swgVwBkZ3g05TKJL30HAZhcDTqKpnhPxQZpAy1/0ffEYZnfBuAG0 ayKD7LOl54gpdLFBJmUVzzCZsae3eaycuufgcao3gWpa0vQ6V+ulKhJEtOJYXs6jaGzn vUrvIM6Vjf2axBySqtjZnixYHO4fHC8R4r4G00TIhm5ynY8ZLDPrA8V6lvMD/+dfGz7l xXFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=Fqm1qEXgId3LWA2NcOGNLytQeIXWcu4whGK205OK+oE=; b=I9j9wNQIY11lz3+YALhhMQH8p0crt8aMdjDxIz9PI5z36kanil9gS7aE97O0/QH92g LK9rjTIS+kBu4RMZBRxtcp6FW9DHmwE3L5wGxUFLe6DkmDmKogBgFe2FFqgTFJMeFzWB sIkjdgvfiPaNd6tz2pkM3rCmrIF0S1+4q+9dlgN1Av9gO50z4F4ureImq058hpCQXG07 y0icUERy3YvmmVnvWppi2LfQ0ma/C7SA60WUhVImrNrlpAbrC9w/ZNb3Vl9Rd6Jc3sQr 4uQueS++DXrJQuefQG5PcR3MzqVhsPiBo/VI6XuDtdEunV+tKc6xJPIkx7SXZr3pyufv OJqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hfRt+z+D; 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 h68si60255930plb.281.2019.08.13.02.14.35; Tue, 13 Aug 2019 02:14:51 -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=hfRt+z+D; 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 S1727342AbfHMJMe (ORCPT + 99 others); Tue, 13 Aug 2019 05:12:34 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:37944 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726974AbfHMJMe (ORCPT ); Tue, 13 Aug 2019 05:12:34 -0400 Received: by mail-lj1-f196.google.com with SMTP id r9so100863346ljg.5 for ; Tue, 13 Aug 2019 02:12:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Fqm1qEXgId3LWA2NcOGNLytQeIXWcu4whGK205OK+oE=; b=hfRt+z+D9yk1sJYudtDMXBHyY6D+2qiqV/Q0A5uC517NkQfhn84w03CEm+CUmcg/YO xJPqvrGgLs16lDH/3dloHHlkGbp2h3r9rIgnDvmKfVTplppEulAeS2WQtVGZ8wWFs15M R5qBYokxyKXI2Jfql/W33mwqvH+OuFprJVGNGTsHQu5VItj8aJMS6Ur6rJYb6Hy7WRn/ AX4hDuDNWmPdJr+yZFLhP6VsHFefhVLaK4WsyRhEk2D+tu0eVkerETdtQ8N8zpk4CR7G z7+Z3ORP+em5lWvkHic+zqfbFKZVaZBuXDwrPHPXLdvyLr95YD3Zita8cZ6CQHogX55V lS0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=Fqm1qEXgId3LWA2NcOGNLytQeIXWcu4whGK205OK+oE=; b=av1fwLR9TQhRjBckvjzlxhPhcphS7vfv3QWwuUc8H6BtzE0N1BRgnQuSFJM/MpzCeh U6LYy4WDfxdfqz0BYsx1GyDUbaKymDbuMPhzlJ/T/0kjPoEjyeemklXH9i0vYEBdjYXe 3G7vvVWmzgnq4qo8atQVTwDFPu0TGfvgCw/QKXGLBGBAiFeAgLXTusI1dIMJcaEfQgb5 1by05FZ0tnCQ8Kf9y44pevRPp1pOdLDZ/S3ySDJjZJ4/C7LO7a5JNRb0b9R+slnSz/XQ UgMGpBaCV8jqdhnBC79xKp2Hq0yC7HtEMdLO9BpJKT9VM3NHrhXINzByQTymi4lNT3+P 4MwQ== X-Gm-Message-State: APjAAAV90UihFgfs55ApArZWXux0HmrtpJBe3cFjPfKVEjAKftskteBQ Jad0SpWtYdxiDfT64r/gYvw69w== X-Received: by 2002:a2e:3a13:: with SMTP id h19mr20948011lja.220.1565687552537; Tue, 13 Aug 2019 02:12:32 -0700 (PDT) Received: from khorivan (168-200-94-178.pool.ukrtel.net. [178.94.200.168]) by smtp.gmail.com with ESMTPSA id l23sm21497274lje.106.2019.08.13.02.12.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Aug 2019 02:12:31 -0700 (PDT) Date: Tue, 13 Aug 2019 12:12:29 +0300 From: Ivan Khoronzhuk To: Magnus Karlsson Cc: =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , linux-mm@kvack.org, Xdp , Network Development , bpf , linux-kernel@vger.kernel.org, akpm@linux-foundation.org, Alexei Starovoitov , "Karlsson, Magnus" Subject: Re: [PATCH v2 bpf-next] mm: mmap: increase sockets maximum memory size pgoff for 32bits Message-ID: <20190813091228.GA6951@khorivan> Mail-Followup-To: Magnus Karlsson , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , linux-mm@kvack.org, Xdp , Network Development , bpf , linux-kernel@vger.kernel.org, akpm@linux-foundation.org, Alexei Starovoitov , "Karlsson, Magnus" References: <20190812113429.2488-1-ivan.khoronzhuk@linaro.org> <20190812124326.32146-1-ivan.khoronzhuk@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 13, 2019 at 10:02:54AM +0200, Magnus Karlsson wrote: >On Mon, Aug 12, 2019 at 2:45 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. > >Can you use mmap2() instead that takes a larger offset (2^44) even on >32-bit systems? That's for mmap2. > >/Magnus > >> 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 >> -- Regards, Ivan Khoronzhuk