Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp5230091imm; Fri, 18 May 2018 20:21:03 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrOMsLm1HEsgJv1djhVAHprpnVHsjeSugSpsn+1LK2uRH+X6TUd4/0REjHt0FNUyqHYiq3r X-Received: by 2002:a17:902:8bc5:: with SMTP id r5-v6mr12159909plo.182.1526700063785; Fri, 18 May 2018 20:21:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526700063; cv=none; d=google.com; s=arc-20160816; b=Qh/ezjYDhhyW8110X6dPWK1nxEocbUSSLacHwm7rpYgLcCD0AB27j5LdEMMRhvqJ5t L3LruOOC8113sqg/7UBXUaiDEwE7L5792CkOGywJy/a0bwKBpX1oTOhizoNDEmLGbs+E 7gGAFigrkDIUWuQJ2micZSAeZD4bhRPBez1ObpjmKhjkRDlcqY21xahj1pCGTBOegAzn gJPHuyfHTopjZrWp7tOrC+FrKXeXj/gqa4xHt3W9rE/JYuYkoCjvZxX5jpdKcDABSFty hoqP8w+wg9EI955vHvt2xtS7LKRj2A4/ivmcfRMGWwKPnNax6PvTDJBoA1JIea8+J71i Xtfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=e3DuZhO2jAmVqnVUuqdTJomBEZometWesqvyDNcDAGI=; b=J3vTEVhnA7LtuOfUI31cyRskKgyTS+xfszhCMMBL/5mTF0dM38UCESeruOw8yx1T7l kJFSIHWoiQoo6fw4UleXZPX8dukWJPBV2laIyqNSIasNS1LZpJBXK8NnqFiKHINsZzvA N3whhRjo8FuHcjFbD2c5OHkIDt5GAWKvXJTNPCGSBEblMfWi7ouGoGVaIDoSSE7Ht+I5 bbv96/myAqiPLEP+bqs21PV/F4mdfk/6Pe7q0fs7vAveRd83HaUYZ+0txx9Om9vNXvXS qB4FjSn7eLMaUZWaDKCEG8MB2QMGNshlrDmcHyq7WkORV2eeE9IvZN8tIJ2R4eE7rGmO HL5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=fadBKt1u; 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 61-v6si8502360plc.173.2018.05.18.20.20.49; Fri, 18 May 2018 20:21:03 -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=@linux-foundation.org header.s=google header.b=fadBKt1u; 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 S1752175AbeESDUk (ORCPT + 99 others); Fri, 18 May 2018 23:20:40 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:37559 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751700AbeESDUh (ORCPT ); Fri, 18 May 2018 23:20:37 -0400 Received: by mail-io0-f193.google.com with SMTP id e20-v6so8470808iof.4 for ; Fri, 18 May 2018 20:20:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=e3DuZhO2jAmVqnVUuqdTJomBEZometWesqvyDNcDAGI=; b=fadBKt1uFvFgHjoE27MHBNQ+/9h1T0EmdYmDNU370yA7duxrHh8JrL0ebGPwm4loGP ynr37ZzrC3QiZB/0QHpPTLKpT/nIgJucU6uIeWtT6LawF3xza2fFRpbDgm533ImAbwMy zitfzKB2x6lCwcgBU2Mf9rOeMWFuQrCSMSfEE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=e3DuZhO2jAmVqnVUuqdTJomBEZometWesqvyDNcDAGI=; b=clPd9xZJ2QOuQJTLTh5ZWWoHNQCST3KRiIgSwd55XlS1zFZ2gWwZGWtcRnXPHgynq/ 76e7YIzpRxHNM6X3M48g8woHJEyOOvY7AiK3OCS8FjB0aq8syuiXm7byfYNTO2y5R4A2 DNgXDqyo2mI+bGEZI8tNXgALUBJDAuVJ0sUj9lPrBa18jmtZI0JT76LpZvIVNjDM+y+E ioNBX/FAeSy0tfb5vGYrIe8SC1npM6Q2lMCW9lDGSyuhyvBfHjoCy5FetbJreOSf2yF3 DNlMie9ybHbprfqGq8x1Dofn8AuCCYTky2kkaAYNRBiFWaltBDa5VgPDvgpj2ccZC/pI NAaQ== X-Gm-Message-State: ALKqPwe00VV8Ot+oGj11WZ3V28i/+fSWYRkIS3mT3RSmJ54ilXtKw6G+ GdGuA6stWMDVCEQOmrGLPSVI9ocvyrgXxsDnqNM= X-Received: by 2002:a6b:dc12:: with SMTP id s18-v6mr13904562ioc.203.1526700036825; Fri, 18 May 2018 20:20:36 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Fri, 18 May 2018 20:20:26 -0700 Message-ID: Subject: Re: [PATCH] procfs: fix mmap() for /proc/vmcore To: gor@linux.ibm.com Cc: Andrew Morton , Al Viro , Linux Kernel Mailing List , Heiko Carstens Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 18, 2018 at 8:15 PM Vasily Gorbik wrote: > Commit be83bbf80682 ("mmap: introduce sane default mmap limits") > introduced "pgoff" limits checks for mmap, considering fs max file size > as upper limit, which made it impossible to mmap /proc/vmcore file > contents above 2Gb (/proc/vmcore appears to be the only procfs file > supporting mmap). > Reuse MAX_LFS_FILESIZE as procfs s_maxbytes value. Ugh. /proc is where a lot of problems *have* been. Admittedly not as much as random drivers, but still. If proc doesn't set s_maxbytes, then we should not raise it here magically, there might be various /proc files that get offset accounting wrong. I'd *much* rather just set FMODE_UNSIGNED_OFFSET for /proc/vmcore _only_, rather than open up all proc files to issues with 4G+ offsets. Linus