From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45BB3C6377D for ; Thu, 22 Jul 2021 14:44:00 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E80ED60FEE for ; Thu, 22 Jul 2021 14:43:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E80ED60FEE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=mit.edu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 381B16B0036; Thu, 22 Jul 2021 10:43:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 331C66B005D; Thu, 22 Jul 2021 10:43:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 246F96B006C; Thu, 22 Jul 2021 10:43:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0148.hostedemail.com [216.40.44.148]) by kanga.kvack.org (Postfix) with ESMTP id 07B446B0036 for ; Thu, 22 Jul 2021 10:43:59 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id A2005144FA for ; Thu, 22 Jul 2021 14:43:58 +0000 (UTC) X-FDA: 78390493356.07.354EB3C Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by imf11.hostedemail.com (Postfix) with ESMTP id 0B5BBF00059D for ; Thu, 22 Jul 2021 14:43:57 +0000 (UTC) Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 16MEhiTZ010171 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Jul 2021 10:43:45 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id 9126515C37C0; Thu, 22 Jul 2021 10:43:44 -0400 (EDT) Date: Thu, 22 Jul 2021 10:43:44 -0400 From: "Theodore Ts'o" To: "Matthew Wilcox (Oracle)" Cc: Al Viro , Qualys Security Advisory , Eric Sandeen , Linus Torvalds , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm: Make kvmalloc refuse to allocate more than 2GB Message-ID: References: <20210721184131.2264356-1-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210721184131.2264356-1-willy@infradead.org> Authentication-Results: imf11.hostedemail.com; dkim=none; spf=none (imf11.hostedemail.com: domain of tytso@mit.edu has no SPF policy when checking 18.9.28.11) smtp.mailfrom=tytso@mit.edu; dmarc=none X-Stat-Signature: cgspf7peeca3jo3gt3zssauky9jcw6rn X-Rspamd-Queue-Id: 0B5BBF00059D X-Rspamd-Server: rspam01 X-HE-Tag: 1626965037-615391 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Jul 21, 2021 at 07:41:31PM +0100, Matthew Wilcox (Oracle) wrote: > It's generally dangerous to allocate such large quantities of memory > within the kernel owing to our propensity to use 'int' to represent > a length. If somebody really needs it, we can add a kvmalloc_large() > later, but let's default to "You can't allocate that much memory". If we really need it, maybe we can add a GFP_LARGE_ALLOC to allow allocations larger than 2GB later on? I can't quite see why that would ever be needed, but that's probably a failure of my imagination. :-) - Ted