Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp217456ybb; Fri, 27 Mar 2020 20:13:54 -0700 (PDT) X-Google-Smtp-Source: ADFU+vth5okwVnuYmlcRjKHnmtQNBGA+U5fVKdIc2uwaoO3wyuK+4GvZJZHRWxCxCmC/1/NLVz4N X-Received: by 2002:aca:3dd7:: with SMTP id k206mr1409113oia.63.1585365234728; Fri, 27 Mar 2020 20:13:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585365234; cv=none; d=google.com; s=arc-20160816; b=UwYw6hu8x+Gg352ylVhICsn2V+zGy/Kk5hCYY1t8lO2gD+sDdNQdYEuCMfMrKaJqy3 j4+ui9hT+ziSpV2bx/nIu2lud7YtuooHTZJ7pQuKTee4qRH0xji/Pc9qHA/LNJiI9zXq QcBN0v6o1TXEFiuLHockkI1ZpM3M5UqRFKqfZe6Q8Vc0flQILrpvqOPxjYlQSdMuSxWD 4ifZFbFWEkiZx+ojBQQmJo3D2GAhJ1NoAYsL4Vn4zA6GlGaRUrDsO5nvKhfPO2/z4oph jcdj9gIpQUnEUjglHMpcSyMyFIZnNVnIVXWNpEsGwgb24AnHvmDd7BKeM1ttuTCbwXPI tZxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=P0x9X1mhOIOLlPOSXSJlX4Y+ydpBjVxICUvFu3HhNBs=; b=ugt7L1pYPib192t8LhMrDJbOTx1IerPqdOjHBxERDG/Va3YFv9ee2FwcMQbKHh9ibQ UERmW2jkewt4WPFYPGszpiCCITkHw5cc5QvckQNOKqNkrSemT+BK/mL/DsFAAeQLpddG SZw4MigUtvK3psRDlJ4IGMwoFzoQ+8txU8FOZto9XM1HnqDh7QndAtPDMbIVTwcKfl0t IsD/kADIL87oL7WjLotUHYITcNXgpuYGlcQd9RMzYjPhfZLEXaHdLDVLF/Itw4C8OsKd r8ybQwuwM/aQMLY9To2PY0v8J3mJmPdhGYo8fk3u0ISSbCwcn+bOHekK5AxTH1n20dCz xx+Q== ARC-Authentication-Results: i=1; mx.google.com; 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 d4si2627154ote.265.2020.03.27.20.13.40; Fri, 27 Mar 2020 20:13:54 -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; 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 S1726937AbgC1DNR (ORCPT + 99 others); Fri, 27 Mar 2020 23:13:17 -0400 Received: from tartarus.angband.pl ([54.37.238.230]:47178 "EHLO tartarus.angband.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726291AbgC1DNR (ORCPT ); Fri, 27 Mar 2020 23:13:17 -0400 Received: from kilobyte by tartarus.angband.pl with local (Exim 4.92) (envelope-from ) id 1jI1u5-0007vu-4a; Sat, 28 Mar 2020 04:12:57 +0100 Date: Sat, 28 Mar 2020 04:12:57 +0100 From: Adam Borowski To: Nicolas Pitre Cc: Chen Wandun , jslaby@suse.com, gregkh@linuxfoundation.org, daniel.vetter@ffwll.ch, sam@ravnborg.org, b.zolnierkie@samsung.com, lukas@wunner.de, ghalat@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH next] vt: fix a warning when kmalloc alloc large memory Message-ID: <20200328031257.GA30454@angband.pl> References: <20200328021340.27315-1-chenwandun@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Junkbait: aaron@angband.pl, zzyx@angband.pl User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: kilobyte@angband.pl X-SA-Exim-Scanned: No (on tartarus.angband.pl); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 27, 2020 at 10:55:14PM -0400, Nicolas Pitre wrote: > On Sat, 28 Mar 2020, Chen Wandun wrote: > > > If the memory size that use kmalloc() to allocate exceed MAX_ORDER pages, > > it will hit the WARN_ON_ONCE(!(gfp_mask & __GFP_NOWARN)), so add memory > > allocation flag __GFP_NOWARN to silence a warning, othervise, it will > > cause panic if panic_on_warn is enable. > > Wow! How do you manage that? You need something like a 1024x1024 text > screen to get such a big memory allocation. ioctl(VT_RESIZE) allows up to 32767x32767, unprivileged for a local user. That's 4GB per console. Meow! -- ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ in the beginning was the boot and root floppies and they were good. ⢿⡄⠘⠷⠚⠋⠀ -- on #linux-sunxi ⠈⠳⣄⠀⠀⠀⠀