Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp758221ybb; Sat, 28 Mar 2020 09:21:43 -0700 (PDT) X-Google-Smtp-Source: ADFU+vu0ZiQdgbSur0Wjwli4t9jU8DVnuEACKPJTTM/bEIi0PZKn0N+nThWkBSFfQhTRfRM/UhD4 X-Received: by 2002:a4a:e211:: with SMTP id b17mr3817441oot.79.1585412503505; Sat, 28 Mar 2020 09:21:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585412503; cv=none; d=google.com; s=arc-20160816; b=Vohek+Tlw5gABM0IePtu5V3A/7dSBXdA16FWWDS+8v9vdIAjivmqib7MhpeLkKxYAO OlHftaGVpeM2tdnLJ6gpJrvDlsMAk4bWfP3BgAQYwXHhKojoCktvdc6EGScm0ycOf0T3 rbcz+DhoSbbgEP252/wIMHg6SNYNhQF+RD14MrQiGUwP9wuOxigzlzIcSTbP3gf3rORc 7pllXK5y/a+mYSvQ0J1wI65tn7F72MdslZspTiSs3blgGnvo8ITZXZvPtHTPgykdI73L 06WgItcLR7XaJB9VDoASEVxbb6zPtcFW1QOOb5GpQC5YOFDA2TYxRyaJzJyL/d0ptiyw NEjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=lnsWB2vVJUN3tJq9OIpIw/CFCfFeMgz5wrn5wGTEX1s=; b=k/avBsC5Xmszt0NFHTgFd/A1RX1+lKegQhOjO01uUKXwKKrtzXCJPfB1DLN059AqdA MolmkSL8xbxLtrZ8jz5RPDQruXknK1VtaCDuEx14EtBWuFt/NT+mgYhpUnRSrz2X1k83 eMc07Fv7gdxx9WuCfQcBr9M2taFhqP7+KhMnG0WVPBS9bl8pGikItq0VWglzr2gdWrWV I0QEd0fJaHNZLRFiL06EWfBu6c0jiLqiDaHdoWYm9V794CNNncz/UOJAEAYxtFNozsax CGLHTeNZrP9mb3jsIw/vvEy1+rhtkIY6e7pDZFoamyL9zqlHlL6GDRFHX0qSuhPSR9At PcxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pobox.com header.s=sasl header.b=CmSjGkAs; dkim=temperror (no key for signature) header.i=@fluxnic.net header.s=2016-12.pbsmtp header.b=QPsazEEI; 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 q19si3768945otk.11.2020.03.28.09.21.16; Sat, 28 Mar 2020 09:21:43 -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=@pobox.com header.s=sasl header.b=CmSjGkAs; dkim=temperror (no key for signature) header.i=@fluxnic.net header.s=2016-12.pbsmtp header.b=QPsazEEI; 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 S1727118AbgC1QUK (ORCPT + 99 others); Sat, 28 Mar 2020 12:20:10 -0400 Received: from pb-smtp21.pobox.com ([173.228.157.53]:57927 "EHLO pb-smtp21.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726389AbgC1QUJ (ORCPT ); Sat, 28 Mar 2020 12:20:09 -0400 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 84856C3778; Sat, 28 Mar 2020 12:20:07 -0400 (EDT) (envelope-from nico@fluxnic.net) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=date:from:to :cc:subject:in-reply-to:message-id:references:mime-version :content-type; s=sasl; bh=ogo8rb0hMjtxC4ELJWZtM1LYWnQ=; b=CmSjGk AsBucxzh/wG7AwoenkMlyCw4u/+KnJQboSkkDI/wnfciTGeOejRG9YzFVyJJprv1 dJX1oDJpGdvx1rnMdoOPrsJZEZqGJi7c3rDkRJOyOPTnuuMpzR3VTmcWSiegb+PU 3VDZ0ZUQNvw7QwYCe8fijP8lWTc9SMyfTi27g= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 7C75FC3777; Sat, 28 Mar 2020 12:20:07 -0400 (EDT) (envelope-from nico@fluxnic.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=fluxnic.net; h=date:from:to:cc:subject:in-reply-to:message-id:references:mime-version:content-type; s=2016-12.pbsmtp; bh=sT0yvJaG2S1Yvkeio7Xw+/HiKCgi5bPRp3U/rvRIHWE=; b=QPsazEEItO1TiH2NT1cRiG5iaQlH2BudY3c3w/eb0EDpV7RYgV9SsiipBBr6cVokYmLNkn3mbmqjcImBwPjIg5aob5X19Qg0mkKDYj4E0lmwlazT9vUEzY2NFWEUUstNVPXLX6kmCEAAIltxlcnkj9WhLtvD6PHpdlXAVxxk/sU= Received: from yoda.home (unknown [24.203.50.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id 57EE9C376F; Sat, 28 Mar 2020 12:20:03 -0400 (EDT) (envelope-from nico@fluxnic.net) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTPSA id 616642DA0185; Sat, 28 Mar 2020 12:20:01 -0400 (EDT) Date: Sat, 28 Mar 2020 12:20:01 -0400 (EDT) From: Nicolas Pitre To: Adam Borowski 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 In-Reply-To: <20200328031257.GA30454@angband.pl> Message-ID: References: <20200328021340.27315-1-chenwandun@huawei.com> <20200328031257.GA30454@angband.pl> User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Pobox-Relay-ID: FAC3642A-710F-11EA-8B7B-8D86F504CC47-78420484!pb-smtp21.pobox.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 28 Mar 2020, Adam Borowski wrote: > 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. Right. And that's ridiculous. This ought to be limited to something much saner. Nicolas