Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp594466pxv; Thu, 22 Jul 2021 07:46:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVMENVMk6VRpO1valneDBi74aC/56JnA606P/stAEdhRdaRaUcUAWHHVvyDESmChK1Z/Tt X-Received: by 2002:a17:906:b2d5:: with SMTP id cf21mr255525ejb.514.1626965163770; Thu, 22 Jul 2021 07:46:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626965163; cv=none; d=google.com; s=arc-20160816; b=kLxqdC/tQRtH2Ko6cVs8vSAeQGWL02LbyJkv6x6LEjfo6s9Ie1ERqseXGHPQtXc3eP 0wXILzK1ozg11HYHqZJY3ZlKHEYQMwEoV/459Hu81omkFgMRPM/+Q3+wz3OUVAFCCsAl GwknhRTq4zuRCPaDxbsY1mEU9OycICzvBjJHYNsdnRuRIjWy4Pwt2oB/pj/Ajm3vM9K9 vV+siTbMbFrE3Mt50gudemeDqFFbrExydNLUGrIwpKu7qd4zo3WLD4zNtFGZ5JdmuqGk +mPca0ulnARxR1GMDjj7O9Z1B6Zytz+uZvkMJkzwE15zutC3qjIQAU+/4Gt1rxG28Dsx 18gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=NtOQBmLM4Pr1AKfU2mJIgV+tplie3+4URLC2R6Z3+14=; b=N0mXWhDXF3wpdZKIF28uoHzynn/1CqL3FgBCNskTg2meKPxulqEWtt9TAJphKRI5kP AMqilYjwTE5vE5x+SrnJaL753LHJcLWYOLJyeFR+VxnqakUA75NmABku/q43VrlV3+LI r3qxLHDanT+jEIEl38HWMJWhJeiq4lJjNKwlaKyGTS17cwJ58GpNcEfsy0WIUoCD5oef lRN9aQiW5qrS9Qds7wdGNpxvpHflKdBabqJa1cd0pGFtkwQvJlx2t5YVrROcWkcSg/lR i7XQghINI/60qGIaBxR2VmIvZtIr86knxGV6KW5l45gFqw6pThHV5b+jCYPVkBXHNjfm r1bA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e21si30959771ejd.669.2021.07.22.07.45.40; Thu, 22 Jul 2021 07:46:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232414AbhGVOD3 (ORCPT + 99 others); Thu, 22 Jul 2021 10:03:29 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:34754 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230343AbhGVOD2 (ORCPT ); Thu, 22 Jul 2021 10:03:28 -0400 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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