Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3674453ybl; Mon, 12 Aug 2019 04:35:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqxGYwsRl9lVsg2FZKlbl3btH7U32FzCqi5ZKyCjdUIHkzdOHTGEZCMNZiJEnHHbbHZt26Gu X-Received: by 2002:a17:90b:28f:: with SMTP id az15mr22764931pjb.18.1565609751896; Mon, 12 Aug 2019 04:35:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565609751; cv=none; d=google.com; s=arc-20160816; b=dCwZj7C1glX18qU29wMFqv9+i4BuG5J31nlF1vf/pARyHmlMqCg82C0gdlCv7Faqb6 VtSGZpq5Vb81yM4TW69ChlX4s/UA3KBrWKdqTqs3sWBKpLlSyNR3akwT0ic1j1sR2Lk3 3f+ACUgl0bylwEdwbZUER86hC5ux9bjRfilFV5Lvn11SS7DYEOQ6f+WfiKQ7SadsdRLI g3mMdPxmdENzJybZCOVR5RHac19SJtSKWcm8J+1/fzEm286anYVZUf/5Q1SqC864y6Bp YQPfwuHUTwP8VPyBByHYpvk4imcRR7R83r7a9/d9pl0nVkXECxMTX2EfBGclJ0iFLI6F bBjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=IkqOR8n2+d0i33XDKFM1W8wAyFU3lbQkmsZ60SEYyPM=; b=tDe+MqSRqLSVIV1iB7mX96dUCt6U6ph3kMTK+IPNnVNBYkK+s/CryV1cIsXLlE1gvH NVbQC5l22YUlp2iziEq0+SXymchwTml06jyiPLWs5Ll8pd1ncwqUzCV/15FhJr97XV+M +4PiIz7AlKZaq/a0ygQJwQHfEZuu4qRxRIkr6N+8smFDno4V7Fj2bd9ijNVo/efB0Gs/ RuxTzE0hmLQUlR0jvdWVdE8O01figgj1zxTqrIu/+foTeGvE8NNmpkf0UlaSRWdvfn+e wZSOQ5PyFlzOBSxW8zXOiMi0MOaLpRtAUsZVotBZ11nniv69/LlQLoMsPwhn1PrU4EGm 7S9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f9vf1iLt; 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 s6si47489216plq.213.2019.08.12.04.35.35; Mon, 12 Aug 2019 04:35: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=f9vf1iLt; 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 S1728179AbfHLLef (ORCPT + 99 others); Mon, 12 Aug 2019 07:34:35 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:42522 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728002AbfHLLef (ORCPT ); Mon, 12 Aug 2019 07:34:35 -0400 Received: by mail-lf1-f67.google.com with SMTP id s19so11300649lfb.9 for ; Mon, 12 Aug 2019 04:34:34 -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; bh=IkqOR8n2+d0i33XDKFM1W8wAyFU3lbQkmsZ60SEYyPM=; b=f9vf1iLtiab+eHV3kZOQO62bnPIg2kpxRLOsLdE2aePP2MavO1FwnSfZTKU2gG1Vid FTSXW6pJnPelXkdyHDsD8HnaKbrZ8HBK1UrAEznDBMiKpWHgKIGy04tN/b/3O7U9FwxN RkELHnQEtDoNEU47ZI+JgZeawx6ZbBzPTqYu3d0adXTAmWT+6iTmJSi0qFzbLiM94EKR b1aOm9gYSrwfwhemeWN5g2PPwPKL9uwujCri85WIHhBMFRpsErG37m7EsTSDMq9v/XwW wwlYlwM5ARj1kSy+dG3Ew25OoxHrFFHqWWqlcwYDkH+ysW1WQUH6cwos+LR+g4T3K/Vt /7FQ== 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; bh=IkqOR8n2+d0i33XDKFM1W8wAyFU3lbQkmsZ60SEYyPM=; b=EENrK6IBr6cxSxHdQ8w2bk4n+G2nCk7Rd+XdMo6IM1Qjr7Jc/yuMu1jWNH2/WwNdbS xwujdOris9hsgXiY/rWTnUFMpnfEKBB7mrxV7+ojKLBZdrBt22kb5RaAyPxcPBExaGRe haMIW48a1stH0IldwF7F6BArZw/vLJNpdspM3xs0qXE/iUxkQEHPZ2GPCM4QMdqmXN/U nZ73C/kspKEUO/wzj0JE53X7aTHhMVa916CJVd0yeVJKJRiP1lgAgzghU63Iw9HUoycN ZqJRSGrgHKoQYfhfiB77coEHjK9FOoDVOTHA1JR6+JqypqXCdUCJAPgJVf1Gz0AOYwRM J6SQ== X-Gm-Message-State: APjAAAXKI23tK8haEQK4kqL3O9ixqBy4Wf1dHkSogwO/WmAbe0NiKQUe y4ezwRwN1C80OH4oNDHNaI6N7A== X-Received: by 2002:ac2:4157:: with SMTP id c23mr19159300lfi.173.1565609673727; Mon, 12 Aug 2019 04:34:33 -0700 (PDT) Received: from localhost.localdomain (168-200-94-178.pool.ukrtel.net. [178.94.200.168]) by smtp.gmail.com with ESMTPSA id a70sm20899745ljf.57.2019.08.12.04.34.32 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 12 Aug 2019 04:34:33 -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 bpf-next] mm: mmap: increase sockets maximum memory size pgoff for 32bits Date: Mon, 12 Aug 2019 14:34:29 +0300 Message-Id: <20190812113429.2488-1-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 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. The 64-bit systems seems like ok with this, so extend threshold only for 32-bits for now. Signed-off-by: Ivan Khoronzhuk --- Based on bpf-next/master mm/mmap.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mm/mmap.c b/mm/mmap.c index 7e8c3e8ae75f..238ce6b71405 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -1358,6 +1358,11 @@ static inline u64 file_mmap_size_max(struct file *file, struct inode *inode) if (S_ISBLK(inode->i_mode)) return MAX_LFS_FILESIZE; +#if BITS_PER_LONG == 32 + if (S_ISSOCK(inode->i_mode)) + return MAX_LFS_FILESIZE; +#endif + /* Special "we do even unsigned file positions" case */ if (file->f_mode & FMODE_UNSIGNED_OFFSET) return 0; -- 2.17.1