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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,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 0E9F2C2D0A3 for ; Wed, 4 Nov 2020 18:19:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5ACD12071A for ; Wed, 4 Nov 2020 18:19:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="cMSc75Bd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5ACD12071A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9993F6B0073; Wed, 4 Nov 2020 13:19:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 923416B0074; Wed, 4 Nov 2020 13:19:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 811056B0075; Wed, 4 Nov 2020 13:19:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0169.hostedemail.com [216.40.44.169]) by kanga.kvack.org (Postfix) with ESMTP id 514FD6B0073 for ; Wed, 4 Nov 2020 13:19:10 -0500 (EST) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id E72DE1EE6 for ; Wed, 4 Nov 2020 18:19:09 +0000 (UTC) X-FDA: 77447547618.21.self46_5a1591e272c3 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin21.hostedemail.com (Postfix) with ESMTP id C7437180442C2 for ; Wed, 4 Nov 2020 18:19:09 +0000 (UTC) X-HE-Tag: self46_5a1591e272c3 X-Filterd-Recvd-Size: 2780 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf28.hostedemail.com (Postfix) with ESMTP for ; Wed, 4 Nov 2020 18:19:09 +0000 (UTC) Received: from X1 (unknown [208.106.6.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C328D2071A; Wed, 4 Nov 2020 18:19:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604513948; bh=hBY3OxHvgD9edHwGrbC/R6dK36vAKmqbgDjOtmnEbxI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=cMSc75BdW0DOGUv5md2jm+OMNL0uNpzESkfxzmvNU0khAaL1R7nFpshAULeGUPnCo hOjEEo9WxAESdHpmBGTa1OtXZ9g8zE3zbM5DjHdd8GD7Nb1V9igpQI0j+5g/rZsVVw VbHs+K/kKhT/Orb6FlGRFNGoMcEX/Rv0w9tDIwLM= Date: Wed, 4 Nov 2020 10:19:01 -0800 From: Andrew Morton To: Hsin-Hui Wu Cc: bugzilla-daemon@bugzilla.kernel.org, linux-mm@kvack.org Subject: Re: [Bug 210023] New: Crash when allocating > 2 TB memory Message-Id: <20201104101901.b9750cc1a4413bc8fdc17239@linux-foundation.org> In-Reply-To: References: <20201103162740.6a7c835276b5a704d5b219cc@linux-foundation.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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, 4 Nov 2020 08:55:11 -0500 Hsin-Hui Wu wrote: > > With a machine with 3 TB (more than 2 TB memory). If you use vmalloc to > > allocate > 2 TB memory, the array_size below will be overflowed. > > How was this observed? > > Is there any know userspace operation which causes the kernel to try to > vmalloc such a large hunk of memory? > > [Frank] The Dell PowerEdge R740/R940 can have up to 3TB/6TB memory. > installed. Our application requires reserve consecutive memory in the kernel > space and protected from userspace programs. Did this require custom kernel changes? If not, precisely which system calls were used to cause this allocation attempt? > ---------------------------------------------------------------------------------------------------- > OK, thanks. Against current mainline your proposed change would look > like this, yes? > > [Frank] Yes. This will support up to less than 16 TB. If you want to support > more than 16 TB, we need to expand nr_pages to unsigned long as > Matthew pointed out. > > Will it be possible to add this to kernel 3.10.0-957.27.2.el7.x86_64? That is up to Red Hat to decide.