lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 27 Mar 2020 22:55:14 -0400 (EDT)
From:   Nicolas Pitre <nico@...xnic.net>
To:     Chen Wandun <chenwandun@...wei.com>
cc:     jslaby@...e.com, gregkh@...uxfoundation.org,
        daniel.vetter@...ll.ch, sam@...nborg.org, b.zolnierkie@...sung.com,
        lukas@...ner.de, ghalat@...hat.com, kilobyte@...band.pl,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH next] vt: fix a warning when kmalloc alloc large memory

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.

Still, GFP_NOWARN is not a proper fix. This kmalloc() should rather be 
replaced by vmalloc(), and corresponding kfree() should then be vfree(). 
There is no need for this allocation to be physically contiguous.


Nicolas

Powered by blists - more mailing lists